]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/semantic/util-modes.el
* lisp/cedet/semantic: Remove some dead code
[gnu-emacs] / lisp / cedet / semantic / util-modes.el
index 36d1479ac65ee123af095b131cdbc5d950af39c5..c080642f670c9093ec42097c7f0fee20de06c2de 100644 (file)
@@ -1,7 +1,6 @@
 ;;; 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>
@@ -110,7 +109,7 @@ Only minor modes that are locally enabled are shown in the mode line."
                  (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.
@@ -222,11 +221,11 @@ minor mode is enabled."
            (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
@@ -439,7 +438,7 @@ The state is indicated in the modeline with the following characters:
  `-'  ->  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
@@ -461,8 +460,8 @@ minor mode is enabled."
                (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
@@ -492,7 +491,7 @@ minor mode is enabled."
     (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)
@@ -525,7 +524,7 @@ This marker is one of the following:
  `-'  ->  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."
@@ -685,15 +684,11 @@ when it lands in the sticky line."
 (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
@@ -720,7 +715,7 @@ minor mode is enabled."
        (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))