]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove semantic-make-local-hook call from CEDET
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 4 Oct 2019 13:29:30 +0000 (15:29 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 4 Oct 2019 13:29:47 +0000 (15:29 +0200)
* lisp/cedet/semantic/wisent/grammar.el
(wisent-grammar-setupcode-builder):
* lisp/cedet/semantic/util-modes.el (semantic-highlight-edits-mode)
(semantic-show-unmatched-syntax-mode)
(semantic-show-parser-state-mode):
* lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode):
* lisp/cedet/semantic/imenu.el (semantic-create-imenu-index):
* lisp/cedet/semantic/grammar.el (semantic-grammar-mode):
* lisp/cedet/semantic/grammar-wy.el
(semantic-grammar-wy--install-parser):
* lisp/cedet/semantic/decorate/mode.el
(semantic-decorate-add-pending-decoration)
(semantic-decoration-mode):
* lisp/cedet/semantic.el (semantic--set-buffer-cache): Remove all
calls to the function.

* lisp/cedet/semantic/fw.el (semantic-make-local-hook): Made
obsolete alias for #'ignore by removing XEmacs compat code.

lisp/cedet/semantic.el
lisp/cedet/semantic/decorate/mode.el
lisp/cedet/semantic/fw.el
lisp/cedet/semantic/grammar-wy.el
lisp/cedet/semantic/grammar.el
lisp/cedet/semantic/imenu.el
lisp/cedet/semantic/mru-bookmark.el
lisp/cedet/semantic/util-modes.el
lisp/cedet/semantic/wisent/grammar.el

index 8ffdbf0ff2a338abdd2e5bc51f0f8c04463e65c3..0b878cae525fa22fc25ce359999a34d3ae24c54c 100644 (file)
@@ -535,7 +535,6 @@ is requested."
   (set (make-local-variable 'semantic-bovinate-nonterminal-check-obarray)
        nil)
   (semantic-parse-tree-set-up-to-date)
-  (semantic-make-local-hook 'after-change-functions)
   (add-hook 'after-change-functions 'semantic-change-function nil t)
   (run-hook-with-args 'semantic-after-toplevel-cache-change-hook
                      semantic--buffer-cache)
index 4e3ca2c6ee3996aa11d7053f4ad22636eb859063..9825f353ce829c441f77e20545514b3773ef8013 100644 (file)
@@ -213,7 +213,6 @@ Applies only to the current BUFFER.
 The setting of FCN will be removed after it is run."
   (save-excursion
     (when buffer (set-buffer buffer))
-    (semantic-make-local-hook 'semantic-decorate-flush-pending-decorations)
     (add-hook 'semantic-decorate-pending-decoration-hook fcn nil t)))
 
 (defun semantic-decorate-flush-pending-decorations (&optional buffer)
@@ -267,10 +266,8 @@ non-nil if the minor mode is enabled."
             (error "Buffer %s was not set up for parsing"
                    (buffer-name)))
         ;; Add hooks
-        (semantic-make-local-hook 'semantic-after-partial-cache-change-hook)
         (add-hook 'semantic-after-partial-cache-change-hook
                   'semantic-decorate-tags-after-partial-reparse nil t)
-        (semantic-make-local-hook 'semantic-after-toplevel-cache-change-hook)
         (add-hook 'semantic-after-toplevel-cache-change-hook
                   'semantic-decorate-tags-after-full-reparse nil t)
         ;; Add decorations to available tags.  The above hooks ensure
index 216a47547dcf7b311ece16ae4e955cf576030f62..e07f0901849f396d3dc14b681f8096b7433ad347 100644 (file)
@@ -62,9 +62,7 @@
   "Extract the window from EVENT."
   (car (car (cdr event))))
 
-(defalias 'semantic-make-local-hook
-  (if (featurep 'emacs)
-      #'identity  #'make-local-hook))
+(define-obsolete-function-alias 'semantic-make-local-hook #'identity "27.1")
 
 (defalias 'semantic-mode-line-update #'force-mode-line-update)
 
index b5066d3d27bf6b38f6cdb549ef44ba853d3c1de7..3b99469f558af5033a2d750241f46f664f6f012e 100644 (file)
        semantic-flex-keywords-obarray semantic-grammar-wy--keyword-table
        semantic-lex-types-obarray semantic-grammar-wy--token-table)
   ;; Collect unmatched syntax lexical tokens
-  (semantic-make-local-hook 'wisent-discarding-token-functions)
   (add-hook 'wisent-discarding-token-functions
            'wisent-collect-unmatched-syntax nil t))
 
index 4237f9cef115ee551409fde3bc9f5400246cbc34..813580ba6c2d814f9c0d962cc049638f506ed154 100644 (file)
@@ -1348,11 +1348,9 @@ the change bounds to encompass the whole nonterminal tag."
        '(nonterminal))
   ;; Before each change, clear the cached regexp used to highlight
   ;; macros local in this grammar.
-  (semantic-make-local-hook 'before-change-functions)
   (add-hook 'before-change-functions
             'semantic--grammar-clear-macros-regexp-2 nil t)
   ;; Handle safe re-parse of grammar rules.
-  (semantic-make-local-hook 'semantic-edits-new-change-functions)
   (add-hook 'semantic-edits-new-change-functions
             'semantic-grammar-edits-new-change-hook-fcn
             nil t))
index 5119eb62f3d7abe5c91c967444e163d85beb8548..7dcf75fefa6f427243e1cbe4fb995adb8e8b746a 100644 (file)
@@ -240,10 +240,8 @@ Optional argument STREAM is an optional stream of tags used to create menus."
           (or stream (semantic-fetch-tags-fast)))
         (semantic-create-imenu-index-1
         (or stream (semantic-fetch-tags-fast)) nil))
-    (semantic-make-local-hook 'semantic-after-toplevel-cache-change-hook)
     (add-hook 'semantic-after-toplevel-cache-change-hook
               'semantic-imenu-flush-fcn nil t)
-    (semantic-make-local-hook 'semantic-after-partial-cache-change-hook)
     (add-hook 'semantic-after-partial-cache-change-hook
               'semantic-imenu-flush-fcn nil t)))
 
index 627c71a01b80b18dda6d406c98cd917e0eeee68d..13cfc586fd7c26e3a8c3de74db40142225913f8e 100644 (file)
@@ -288,7 +288,6 @@ non-nil if the minor mode is enabled."
             (setq semantic-mru-bookmark-mode nil)
             (error "Buffer %s was not set up for parsing"
                    (buffer-name)))
-        (semantic-make-local-hook 'semantic-edits-new-change-functions)
         (add-hook 'semantic-edits-new-change-functions
                   'semantic-mru-bookmark-change-hook-fcn nil t)
         (add-hook 'semantic-edits-move-change-hooks
index 954181c2cd92ceac85adbfd0b9127bf7c2ac013c..9e9f054d7374de4e44f5c5b530ecbe9f0de48549 100644 (file)
@@ -220,7 +220,6 @@ non-nil if the 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-functions)
        (add-hook 'semantic-edits-new-change-functions
                  'semantic-highlight-edits-new-change-hook-fcn nil t))
     ;; Remove hooks
@@ -372,10 +371,8 @@ non-nil if the minor mode is enabled.
             (error "Buffer %s was not set up for parsing"
                    (buffer-name)))
         ;; Add hooks
-        (semantic-make-local-hook 'semantic-unmatched-syntax-hook)
         (add-hook 'semantic-unmatched-syntax-hook
                   'semantic-show-unmatched-syntax nil t)
-       (semantic-make-local-hook 'semantic-pre-clean-token-hooks)
        (add-hook 'semantic-pre-clean-token-hooks
                  'semantic-clean-token-of-unmatched-syntax nil t)
         ;; Show unmatched syntax elements
@@ -456,31 +453,23 @@ non-nil if the minor mode is enabled."
                (append mode-line-modified
                        '(semantic-show-parser-state-string))))
        ;; Add 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
                  'semantic-show-parser-state-marker nil t)
-       (semantic-make-local-hook 'semantic-after-partial-cache-change-hook)
        (add-hook 'semantic-after-partial-cache-change-hook
                  'semantic-show-parser-state-marker nil t)
-       (semantic-make-local-hook 'semantic-after-toplevel-cache-change-hook)
        (add-hook 'semantic-after-toplevel-cache-change-hook
                  'semantic-show-parser-state-marker nil t)
        (semantic-show-parser-state-marker)
 
-       (semantic-make-local-hook 'semantic-before-auto-parse-hooks)
        (add-hook 'semantic-before-auto-parse-hooks
                  'semantic-show-parser-state-auto-marker nil t)
-       (semantic-make-local-hook 'semantic-after-auto-parse-hooks)
        (add-hook 'semantic-after-auto-parse-hooks
                  'semantic-show-parser-state-marker nil t)
 
-       (semantic-make-local-hook 'semantic-before-idle-scheduler-reparse-hook)
        (add-hook 'semantic-before-idle-scheduler-reparse-hook
                  'semantic-show-parser-state-auto-marker nil t)
-       (semantic-make-local-hook 'semantic-after-idle-scheduler-reparse-hook)
        (add-hook 'semantic-after-idle-scheduler-reparse-hook
                  'semantic-show-parser-state-marker nil t))
     ;; Remove parts of mode line
index d23e293552a2a763c1929cbab61e10d7bf67622f..e6b389b60ba73be19bc569674e0041a91774f7fd 100644 (file)
@@ -304,7 +304,6 @@ Return the expanded expression."
           semantic-flex-keywords-obarray %s\n\
           semantic-lex-types-obarray %s)\n\
     ;; Collect unmatched syntax lexical tokens\n\
-    (semantic-make-local-hook 'wisent-discarding-token-functions)\n\
     (add-hook 'wisent-discarding-token-functions\n\
               'wisent-collect-unmatched-syntax nil t)"
    (semantic-grammar-parsetable)