;;; semantic/util-modes.el --- Semantic minor modes
-;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
-;; Free Software Foundation, Inc.
+;; Copyright (C) 2000-2005, 2007-2015 Free Software Foundation, Inc.
;; Authors: Eric M. Ludlam <zappo@gnu.org>
;; David Ponce <david@dponce.com>
(tail (or (memq elem minor-mode-alist)
(setq minor-mode-alist
(cons elem minor-mode-alist)))))
- (setcdr tail (nconc locals (cdr tail)))))))))
+ (setcdr tail (nconc locals (cdr tail)))))))))
(defun semantic-desktop-ignore-this-minor-mode (buffer)
"Installed as a minor-mode initializer for Desktop mode.
(setq semantic-highlight-edits-mode nil)
(error "Buffer %s was not set up for parsing"
(buffer-name)))
- (semantic-make-local-hook 'semantic-edits-new-change-hooks)
- (add-hook 'semantic-edits-new-change-hooks
+ (semantic-make-local-hook 'semantic-edits-new-change-functions)
+ (add-hook 'semantic-edits-new-change-functions
'semantic-highlight-edits-new-change-hook-fcn nil t))
;; Remove hooks
- (remove-hook 'semantic-edits-new-change-hooks
+ (remove-hook 'semantic-edits-new-change-functions
'semantic-highlight-edits-new-change-hook-fcn t)))
(semantic-add-minor-mode 'semantic-highlight-edits-mode
`-' -> The cache is up to date.
`!' -> The cache requires a full update.
`~' -> The cache needs to be incrementally parsed.
- `%' -> The cache is not currently parseable.
+ `%' -> The cache is not currently parsable.
`@' -> Auto-parse in progress (not set here.)
With prefix argument ARG, turn on if positive, otherwise off. The
minor mode can be turned on only if semantic feature is available and
(append mode-line-modified
'(semantic-show-parser-state-string))))
;; Add hooks
- (semantic-make-local-hook 'semantic-edits-new-change-hooks)
- (add-hook 'semantic-edits-new-change-hooks
+ (semantic-make-local-hook 'semantic-edits-new-change-functions)
+ (add-hook 'semantic-edits-new-change-functions
'semantic-show-parser-state-marker nil t)
(semantic-make-local-hook 'semantic-edits-incremental-reparse-failed-hook)
(add-hook 'semantic-edits-incremental-reparse-failed-hook
(setq mode-line-modified
(delq 'semantic-show-parser-state-string mode-line-modified))
;; Remove hooks
- (remove-hook 'semantic-edits-new-change-hooks
+ (remove-hook 'semantic-edits-new-change-functions
'semantic-show-parser-state-marker t)
(remove-hook 'semantic-edits-incremental-reparse-failed-hook
'semantic-show-parser-state-marker t)
`-' -> The cache is up to date.
`!' -> The cache requires a full update.
`~' -> The cache needs to be incrementally parsed.
- `%' -> The cache is not currently parseable.
+ `%' -> The cache is not currently parsable.
`@' -> Auto-parse in progress (not set here.)
Arguments IGNORE are ignored, and accepted so this can be used as a hook
in many situations."
(defconst semantic-stickyfunc-header-line-format
(cond ((featurep 'xemacs)
nil)
- ((>= emacs-major-version 22)
+ (t
'(:eval (list
;; Magic bit I found on emacswiki.
(propertize " " 'display '((space :align-to 0)))
- (semantic-stickyfunc-fetch-stickyline))))
- ((= emacs-major-version 21)
- '(:eval (list semantic-stickyfunc-indent-string
- (semantic-stickyfunc-fetch-stickyline))))
- (t nil))
+ (semantic-stickyfunc-fetch-stickyline)))))
"The header line format used by stickyfunc mode.")
;;;###autoload
(unless (boundp 'default-header-line-format)
;; Disable if there are no header lines to use.
(setq semantic-stickyfunc-mode nil)
- (error "Sticky Function mode requires Emacs 21"))
+ (error "Sticky Function mode requires Emacs"))
;; Enable the mode
;; Save previous buffer local value of header line format.
(when (and (local-variable-p 'header-line-format (current-buffer))