[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 5f06b9c 3/3: Remove semantic-make-local-hook call f
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 5f06b9c 3/3: Remove semantic-make-local-hook call from CEDET |
Date: |
Fri, 4 Oct 2019 09:30:23 -0400 (EDT) |
branch: master
commit 5f06b9c478894c828fc5467b0aae360e2c2d1fd2
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Remove semantic-make-local-hook call from CEDET
* 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 | 1 -
lisp/cedet/semantic/decorate/mode.el | 3 ---
lisp/cedet/semantic/fw.el | 4 +---
lisp/cedet/semantic/grammar-wy.el | 1 -
lisp/cedet/semantic/grammar.el | 2 --
lisp/cedet/semantic/imenu.el | 2 --
lisp/cedet/semantic/mru-bookmark.el | 1 -
lisp/cedet/semantic/util-modes.el | 11 -----------
lisp/cedet/semantic/wisent/grammar.el | 1 -
9 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index 8ffdbf0..0b878ca 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -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)
diff --git a/lisp/cedet/semantic/decorate/mode.el
b/lisp/cedet/semantic/decorate/mode.el
index 4e3ca2c..9825f35 100644
--- a/lisp/cedet/semantic/decorate/mode.el
+++ b/lisp/cedet/semantic/decorate/mode.el
@@ -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
diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el
index 216a475..e07f090 100644
--- a/lisp/cedet/semantic/fw.el
+++ b/lisp/cedet/semantic/fw.el
@@ -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)
diff --git a/lisp/cedet/semantic/grammar-wy.el
b/lisp/cedet/semantic/grammar-wy.el
index b5066d3..3b99469 100644
--- a/lisp/cedet/semantic/grammar-wy.el
+++ b/lisp/cedet/semantic/grammar-wy.el
@@ -428,7 +428,6 @@
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))
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index 4237f9c..813580b 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -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))
diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el
index 5119eb6..7dcf75f 100644
--- a/lisp/cedet/semantic/imenu.el
+++ b/lisp/cedet/semantic/imenu.el
@@ -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)))
diff --git a/lisp/cedet/semantic/mru-bookmark.el
b/lisp/cedet/semantic/mru-bookmark.el
index 627c71a..13cfc58 100644
--- a/lisp/cedet/semantic/mru-bookmark.el
+++ b/lisp/cedet/semantic/mru-bookmark.el
@@ -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
diff --git a/lisp/cedet/semantic/util-modes.el
b/lisp/cedet/semantic/util-modes.el
index 954181c..9e9f054 100644
--- a/lisp/cedet/semantic/util-modes.el
+++ b/lisp/cedet/semantic/util-modes.el
@@ -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
diff --git a/lisp/cedet/semantic/wisent/grammar.el
b/lisp/cedet/semantic/wisent/grammar.el
index d23e293..e6b389b 100644
--- a/lisp/cedet/semantic/wisent/grammar.el
+++ b/lisp/cedet/semantic/wisent/grammar.el
@@ -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)