]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer setq-local in cedet
authorStefan Kangas <stefan@marxist.se>
Fri, 4 Dec 2020 16:55:46 +0000 (17:55 +0100)
committerStefan Kangas <stefan@marxist.se>
Fri, 4 Dec 2020 16:55:46 +0000 (17:55 +0100)
* lisp/cedet/data-debug.el (data-debug-mode):
* lisp/cedet/ede/custom.el (ede-customize-project):
* lisp/cedet/ede/project-am.el (project-am-load-makefile):
* lisp/cedet/mode-local.el (mode-local--activate-bindings):
* lisp/cedet/semantic.el (semantic--set-buffer-cache):
* lisp/cedet/semantic/analyze/debug.el
(semantic-analyzer-debug-add-buttons):
* lisp/cedet/semantic/grammar.el (semantic-grammar-mode):
* lisp/cedet/semantic/senator.el (senator-search-set-tag-class-filter):
(senator-isearch-mode-hook):
* lisp/cedet/semantic/symref/list.el
(semantic-symref-produce-list-on-results)
(semantic-symref-results-mode):
* lisp/cedet/semantic/util-modes.el (semantic-stickyfunc-mode):
* lisp/cedet/semantic/wisent/python.el (wisent-python-default-setup):
* lisp/cedet/srecode/srt-mode.el (srecode-template-mode):
Prefer setq-local.

12 files changed:
lisp/cedet/data-debug.el
lisp/cedet/ede/custom.el
lisp/cedet/ede/project-am.el
lisp/cedet/mode-local.el
lisp/cedet/semantic.el
lisp/cedet/semantic/analyze/debug.el
lisp/cedet/semantic/grammar.el
lisp/cedet/semantic/senator.el
lisp/cedet/semantic/symref/list.el
lisp/cedet/semantic/util-modes.el
lisp/cedet/semantic/wisent/python.el
lisp/cedet/srecode/srt-mode.el

index 54b9024ebe2313f1d8fcf620d11b998674fca759..8037c310f41ec5fc6d0dc52fac2fbb97cb36d003 100644 (file)
@@ -881,9 +881,8 @@ If PARENT is non-nil, it is somehow related as a parent to thing."
   (setq-local comment-start-skip
        "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
   (buffer-disable-undo)
-  (set (make-local-variable 'font-lock-global-modes) nil)
-  (font-lock-mode -1)
-  )
+  (setq-local font-lock-global-modes nil)
+  (font-lock-mode -1))
 
 ;;;###autoload
 (defun data-debug-new-buffer (name)
index 18621ad5f12b63481df5f0a1282c80114e286d65..63d8b025c6ce4c523dc332a661490ff7f91c6b6c 100644 (file)
@@ -50,8 +50,7 @@
   (let* ((ov (oref (ede-current-project) local-variables))
         (cp (ede-current-project)))
     (ede-customize cp)
-    (make-local-variable 'eieio-ede-old-variables)
-    (setq eieio-ede-old-variables ov)))
+    (setq-local eieio-ede-old-variables ov)))
 
 ;;;###autoload
 (defalias 'customize-project 'ede-customize-project)
index 61dc8a1fc601f5bf726d3863d9a4bcbcf8770202..9bd3babdf42d1e175d78faa0a3de86bb940cfb5d 100644 (file)
@@ -493,8 +493,7 @@ This is used when subprojects are made in named subdirectories."
                    :file fn)))
        (oset ampf directory (file-name-directory fn))
        (oset ampf configureoutputfiles cof)
-       (make-local-variable 'ede-object)
-       (setq ede-object ampf)
+        (setq-local ede-object ampf)
        ;; Move the rescan after we set ede-object to prevent recursion
        (project-rescan ampf)
        ampf))))
index a1aea30c20d803041e4574748e939a9a8f71c8ad..b965496cf481e18b865dde05f62e6acc94b1b45a 100644 (file)
@@ -314,7 +314,7 @@ Elements are (SYMBOL . PREVIOUS-VALUE), describing one variable."
     ;; Do the normal thing.
     (let (modes table old-locals)
       (unless mode
-       (set (make-local-variable 'mode-local--init-mode) major-mode)
+        (setq-local mode-local--init-mode major-mode)
        (setq mode major-mode))
       ;; Get MODE's parents & MODE in the right order.
       (while mode
index 1be0e33c5fe4dd0eee19cec265648f466056259a..805582ce5e6ced792c4c43d75de8c6db5e38ec3e 100644 (file)
@@ -495,8 +495,7 @@ is requested."
   (setq semantic--buffer-cache tagtable
         semantic-unmatched-syntax-cache-check nil)
   ;; This is specific to the bovine parser.
-  (set (make-local-variable 'semantic-bovinate-nonterminal-check-obarray)
-       nil)
+  (setq-local semantic-bovinate-nonterminal-check-obarray nil)
   (semantic-parse-tree-set-up-to-date)
   (add-hook 'after-change-functions 'semantic-change-function nil t)
   (run-hook-with-args 'semantic-after-toplevel-cache-change-hook
index 6ea54a200c564697d0ba47f07a1754ae297484f6..db5b096033555122fc1a8bfdb1b0740ee5a08563 100644 (file)
@@ -590,7 +590,7 @@ Look for key expressions, and add push-buttons near them."
     (with-current-buffer "*Help*"
       (let ((inhibit-read-only t))
        (goto-char (point-min))
-       (set (make-local-variable 'semantic-analyzer-debug-orig) orig-buffer)
+        (setq-local semantic-analyzer-debug-orig orig-buffer)
        ;; First, add do-in buttons to recommendations.
        (while (re-search-forward "^\\s-*M-x \\(\\(\\w\\|\\s_\\)+\\) " nil t)
          (let ((fcn (match-string 1)))
index b7670ef44b0ed904ded84908e8796e898f6248e7..d3379462f4bc89fbf5ac3f915fab20ff5fe12420 100644 (file)
@@ -1303,28 +1303,25 @@ the change bounds to encompass the whole nonterminal tag."
   "Initialize a buffer for editing Semantic grammars.
 
 \\{semantic-grammar-mode-map}"
-  (set (make-local-variable 'parse-sexp-ignore-comments) t)
-  (set (make-local-variable 'comment-start) ";;")
+  (setq-local parse-sexp-ignore-comments t)
+  (setq-local comment-start ";;")
   ;; Look within the line for a ; following an even number of backslashes
   ;; after either a non-backslash or the line beginning.
-  (set (make-local-variable 'comment-start-skip)
-       "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
-  (set (make-local-variable 'indent-line-function)
-       'semantic-grammar-indent)
-  (set (make-local-variable 'fill-paragraph-function)
-       'lisp-fill-paragraph)
-  (set (make-local-variable 'font-lock-multiline)
-       'undecided)
-  (set (make-local-variable 'font-lock-defaults)
-       '((semantic-grammar-mode-keywords
-          semantic-grammar-mode-keywords-1
-          semantic-grammar-mode-keywords-2
-          semantic-grammar-mode-keywords-3)
-         nil  ;; perform string/comment fontification
-         nil  ;; keywords are case sensitive.
-         ;; This puts _ & - as a word constituent,
-         ;; simplifying our keywords significantly
-         ((?_ . "w") (?- . "w"))))
+  (setq-local comment-start-skip
+              "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
+  (setq-local indent-line-function #'semantic-grammar-indent)
+  (setq-local fill-paragraph-function #'lisp-fill-paragraph)
+  (setq-local font-lock-multiline 'undecided)
+  (setq-local font-lock-defaults
+              '((semantic-grammar-mode-keywords
+                 semantic-grammar-mode-keywords-1
+                 semantic-grammar-mode-keywords-2
+                 semantic-grammar-mode-keywords-3)
+                nil  ;; perform string/comment fontification
+                nil  ;; keywords are case sensitive.
+                ;; This puts _ & - as a word constituent,
+                ;; simplifying our keywords significantly
+                ((?_ . "w") (?- . "w"))))
   ;; Setup Semantic to parse grammar
   (semantic-grammar-wy--install-parser)
   (setq semantic-lex-comment-regex ";;"
@@ -1338,16 +1335,14 @@ the change bounds to encompass the whole nonterminal tag."
           (nonterminal  . "Nonterminal")
           (rule         . "Rule")
           ))
-  (set (make-local-variable 'semantic-format-face-alist)
-       '(
-         (code         . default)
-         (keyword      . font-lock-keyword-face)
-         (token        . font-lock-type-face)
-         (nonterminal  . font-lock-function-name-face)
-         (rule         . default)
-         ))
-  (set (make-local-variable 'semantic-stickyfunc-sticky-classes)
-       '(nonterminal))
+  (setq-local semantic-format-face-alist
+              '((code         . default)
+                (keyword      . font-lock-keyword-face)
+                (token        . font-lock-type-face)
+                (nonterminal  . font-lock-function-name-face)
+                (rule         . default)))
+  (setq-local semantic-stickyfunc-sticky-classes
+              '(nonterminal))
   ;; Before each change, clear the cached regexp used to highlight
   ;; macros local in this grammar.
   (add-hook 'before-change-functions
index e594232353a6adf02c2a600af21b4c04015b773f..49c1933508fc6619e38216395ab5b83c9ab49cd1 100644 (file)
@@ -472,9 +472,9 @@ filters in `senator-search-tag-filter-functions' remain active."
   (if classes
       (let ((tag   (make-symbol "tag"))
             (names (mapconcat 'symbol-name classes "', `")))
-        (set (make-local-variable 'senator--search-filter)
-             `(lambda (,tag)
-                (memq (semantic-tag-class ,tag) ',classes)))
+        (setq-local senator--search-filter
+                    `(lambda (,tag)
+                       (memq (semantic-tag-class ,tag) ',classes)))
         (add-hook 'senator-search-tag-filter-functions
                   senator--search-filter nil t)
         (message "Limit search to `%s' tags" names))
@@ -857,17 +857,17 @@ Use a senator search function when semantic isearch mode is enabled."
        ;; senator one.
        (when (and (local-variable-p 'isearch-search-fun-function)
                   (not (local-variable-p 'senator-old-isearch-search-fun)))
-         (set (make-local-variable 'senator-old-isearch-search-fun)
-              isearch-search-fun-function))
-       (set (make-local-variable 'isearch-search-fun-function)
-            'senator-isearch-search-fun))
+          (setq-local senator-old-isearch-search-fun
+                      isearch-search-fun-function))
+        (setq-local isearch-search-fun-function
+                    'senator-isearch-search-fun))
     ;; When `senator-isearch-semantic-mode' is off restore the
     ;; previous `isearch-search-fun-function'.
     (when (eq isearch-search-fun-function 'senator-isearch-search-fun)
       (if (local-variable-p 'senator-old-isearch-search-fun)
          (progn
-           (set (make-local-variable 'isearch-search-fun-function)
-                senator-old-isearch-search-fun)
+            (setq-local isearch-search-fun-function
+                        senator-old-isearch-search-fun)
            (kill-local-variable 'senator-old-isearch-search-fun))
        (kill-local-variable 'isearch-search-fun-function)))))
 
index fc7f9dbcb64bb35eaf0c109b187ba23df5300f7f..d64d4dd38cde3b180241f0aaa3592d092db9db59 100644 (file)
@@ -176,7 +176,7 @@ Display the references in `semantic-symref-results-mode'."
     (switch-to-buffer-other-window buff)
     (set-buffer buff)
     (semantic-symref-results-mode)
-    (set (make-local-variable 'semantic-symref-current-results) res)
+    (setq-local semantic-symref-current-results res)
     (semantic-symref-results-dump res)
     (goto-char (point-min))))
 
@@ -184,7 +184,7 @@ Display the references in `semantic-symref-results-mode'."
   "Major-mode for displaying Semantic Symbol Reference results."
   (buffer-disable-undo)
   ;; FIXME: Why bother turning off font-lock?
-  (set (make-local-variable 'font-lock-global-modes) nil)
+  (setq-local font-lock-global-modes nil)
   (font-lock-mode -1))
 
 (defcustom semantic-symref-results-summary-function 'semantic-format-tag-prototype
index 24df0098562aaec70bbdcc088a9563e137b8ae6a..776c6b1894ed0a4d8a61b37662b9a2c164c85876 100644 (file)
@@ -701,8 +701,8 @@ non-nil if the minor mode is enabled."
        (when (and (local-variable-p 'header-line-format (current-buffer))
                   (not (eq header-line-format
                            semantic-stickyfunc-header-line-format)))
-         (set (make-local-variable 'semantic-stickyfunc-old-hlf)
-              header-line-format))
+          (setq-local semantic-stickyfunc-old-hlf
+                      header-line-format))
        (setq header-line-format semantic-stickyfunc-header-line-format))
     ;; Disable sticky func mode
     ;; Restore previous buffer local value of header line format if
index 4e3519260a860bb859f8b55b211649da875572b5..66d21f731436a18f04dfb595e9395cda6c32288f 100644 (file)
@@ -503,10 +503,10 @@ Shortens `code' tags, but passes through for others."
 (defun wisent-python-default-setup ()
   "Setup buffer for parse."
   (wisent-python-wy--install-parser)
-  (set (make-local-variable 'parse-sexp-ignore-comments) t)
+  (setq-local parse-sexp-ignore-comments t)
   ;; Give python modes the possibility to overwrite this:
   (if (not comment-start-skip)
-      (set (make-local-variable 'comment-start-skip) "#+\\s-*"))
+      (setq-local comment-start-skip "#+\\s-*"))
   (setq
   ;; Character used to separation a parent/child relationship
    semantic-type-relation-separator-character '(".")
index 4c1e030fceb9df071f5fc47e3456294be23b7fab..d82da40de805068080a20809f3a690ef1493f21e 100644 (file)
@@ -191,18 +191,18 @@ we can tell font lock about them.")
 (define-derived-mode srecode-template-mode fundamental-mode "SRecode"
   ;; FIXME: Shouldn't it derive from prog-mode?
   "Major-mode for writing SRecode macros."
-  (set (make-local-variable 'comment-start) ";;")
-  (set (make-local-variable 'comment-end) "")
-  (set (make-local-variable 'parse-sexp-ignore-comments) t)
-  (set (make-local-variable 'comment-start-skip)
-       "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
-  (set (make-local-variable 'font-lock-defaults)
-       '(srecode-font-lock-keywords
-         nil  ;; perform string/comment fontification
-         nil  ;; keywords are case sensitive.
-         ;; This puts _ & - as a word constituent,
-         ;; simplifying our keywords significantly
-         ((?_ . "w") (?- . "w")))))
+  (setq-local comment-start ";;")
+  (setq-local comment-end "")
+  (setq-local parse-sexp-ignore-comments t)
+  (setq-local comment-start-skip
+              "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
+  (setq-local font-lock-defaults
+              '(srecode-font-lock-keywords
+                nil  ;; perform string/comment fontification
+                nil  ;; keywords are case sensitive.
+                ;; This puts _ & - as a word constituent,
+                ;; simplifying our keywords significantly
+                ((?_ . "w") (?- . "w")))))
 
 ;;;###autoload
 (defalias 'srt-mode 'srecode-template-mode)