emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6a68334d546 2/2: Prefer defcustom :local specifier in semantic


From: Stefan Kangas
Subject: master 6a68334d546 2/2: Prefer defcustom :local specifier in semantic
Date: Tue, 1 Oct 2024 18:52:19 -0400 (EDT)

branch: master
commit 6a68334d54667f78879deb2b03676e4c28d7a6a6
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Prefer defcustom :local specifier in semantic
    
    * lisp/cedet/semantic/db-find.el (semanticdb-find-default-throttle):
    * lisp/cedet/semantic/imenu.el (semantic-imenu-summary-function)
    (semantic-imenu-bucketize-file, semantic-imenu-buckets-to-submenu)
    (semantic-imenu-expand-type-members)
    (semantic-imenu-bucketize-type-members)
    (semantic-imenu-sort-bucket-function):
    * lisp/cedet/semantic/senator.el (senator-highlight-found):
    * lisp/cedet/semantic/symref.el (semantic-symref-tool): Prefer defcustom
    :local specifier to using 'make-variable-buffer-local' directly.
---
 lisp/cedet/semantic/db-find.el |  5 ++---
 lisp/cedet/semantic/imenu.el   | 24 ++++++++++++------------
 lisp/cedet/semantic/senator.el |  4 ++--
 lisp/cedet/semantic/symref.el  |  2 +-
 4 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index 586cb1cf23b..f980e52c315 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -166,9 +166,8 @@ the following keys:
                  in `semanticdb-project-system-databases'.
                  The Emacs Lisp system DB is an omniscience database."
   :group 'semanticdb
-  :type semanticdb-find-throttle-custom-list)
-
-(make-variable-buffer-local 'semanticdb-find-default-throttle)
+  :type semanticdb-find-throttle-custom-list
+  :local t)
 
 (defun semanticdb-find-throttle-active-p (access-type)
   "Non-nil if ACCESS-TYPE is an active throttle type."
diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el
index e13eec209ed..6043e096a0a 100644
--- a/lisp/cedet/semantic/imenu.el
+++ b/lisp/cedet/semantic/imenu.el
@@ -60,14 +60,14 @@
 (defcustom semantic-imenu-summary-function 'semantic-format-tag-abbreviate
   "Function to use when creating items in Imenu.
 Some useful functions are found in `semantic-format-tag-functions'."
-  :type semantic-format-tag-custom-list)
-(make-variable-buffer-local 'semantic-imenu-summary-function)
+  :type semantic-format-tag-custom-list
+  :local t)
 
 ;;;###autoload
 (defcustom semantic-imenu-bucketize-file t
   "Non-nil if tags in a file are to be grouped into buckets."
-  :type 'boolean)
-(make-variable-buffer-local 'semantic-imenu-bucketize-file)
+  :type 'boolean
+  :local t)
 
 (defcustom semantic-imenu-adopt-external-members t
   "Non-nil if types in a file should adopt externally defined members.
@@ -78,21 +78,21 @@ definition."
 (defcustom semantic-imenu-buckets-to-submenu t
   "Non-nil if buckets of tags are to be turned into submenus.
 This option is ignored if `semantic-imenu-bucketize-file' is nil."
-  :type 'boolean)
-(make-variable-buffer-local 'semantic-imenu-buckets-to-submenu)
+  :type 'boolean
+  :local t)
 
 ;;;###autoload
 (defcustom semantic-imenu-expand-type-members t
   "Non-nil if types should have submenus with members in them."
-  :type 'boolean)
-(make-variable-buffer-local 'semantic-imenu-expand-type-members)
+  :type 'boolean
+  :local t)
 
 (defcustom semantic-imenu-bucketize-type-members t
   "Non-nil if members of a type should be grouped into buckets.
 A nil value means to keep them in the same order.
 Overridden to nil if `semantic-imenu-bucketize-file' is nil."
-  :type 'boolean)
-(make-variable-buffer-local 'semantic-imenu-bucketize-type-members)
+  :type 'boolean
+  :local t)
 
 (defcustom semantic-imenu-sort-bucket-function nil
   "Function to use when sorting tags in the buckets of functions.
@@ -107,8 +107,8 @@ on this function."
                (const semantic-sort-tags-by-name-decreasing-ci)
                (const semantic-sort-tags-by-type-increasing-ci)
                (const semantic-sort-tags-by-type-decreasing-ci)
-               (function)))
-(make-variable-buffer-local 'semantic-imenu-sort-bucket-function)
+                (function))
+  :local t)
 
 (defcustom semantic-imenu-index-directory nil
   "Non-nil to index the entire directory for tags.
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index aec251a0dc6..94d91105fda 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -85,8 +85,8 @@ tag, where possible."
 
 (defcustom senator-highlight-found nil
   "If non-nil, Senator commands momentarily highlight found tags."
-  :type 'boolean)
-(make-variable-buffer-local 'senator-highlight-found)
+  :type 'boolean
+  :local t)
 
 ;;; Faces
 (defface senator-momentary-highlight-face
diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el
index 5c487a7f44d..a9148bd80ed 100644
--- a/lisp/cedet/semantic/symref.el
+++ b/lisp/cedet/semantic/symref.el
@@ -81,8 +81,8 @@
 The tool symbol can be `detect', or a symbol that is the name of
 a tool that can be used for symbol referencing."
   :type 'symbol
+  :local t
   :group 'semantic)
-(make-variable-buffer-local 'semantic-symref-tool)
 
 ;;; TOOL SETUP
 ;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]