diff options
Diffstat (limited to 'lisp/cedet/semantic')
-rw-r--r-- | lisp/cedet/semantic/bovine/c.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/bovine/el.el | 6 | ||||
-rw-r--r-- | lisp/cedet/semantic/complete.el | 8 | ||||
-rw-r--r-- | lisp/cedet/semantic/db-el.el | 45 | ||||
-rw-r--r-- | lisp/cedet/semantic/db-find.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/db-global.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/db.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/decorate/include.el | 8 | ||||
-rw-r--r-- | lisp/cedet/semantic/decorate/mode.el | 6 | ||||
-rw-r--r-- | lisp/cedet/semantic/format.el | 4 | ||||
-rw-r--r-- | lisp/cedet/semantic/ia.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/idle.el | 6 | ||||
-rw-r--r-- | lisp/cedet/semantic/imenu.el | 20 | ||||
-rw-r--r-- | lisp/cedet/semantic/lex-spp.el | 8 | ||||
-rw-r--r-- | lisp/cedet/semantic/lex.el | 6 | ||||
-rw-r--r-- | lisp/cedet/semantic/mru-bookmark.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/sb.el | 6 | ||||
-rw-r--r-- | lisp/cedet/semantic/symref.el | 194 | ||||
-rw-r--r-- | lisp/cedet/semantic/symref/grep.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/util-modes.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/wisent/comp.el | 14 | ||||
-rw-r--r-- | lisp/cedet/semantic/wisent/wisent.el | 5 |
22 files changed, 182 insertions, 170 deletions
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index c902ce92d34..bef4b179b23 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -296,7 +296,7 @@ Return the defined symbol as a special spp lex token." ;;; Conditional Skipping ;; (defcustom semantic-c-obey-conditional-section-parsing-flag t - "*Non-nil means to interpret preprocessor #if sections. + "Non-nil means to interpret preprocessor #if sections. This implies that some blocks of code will not be parsed based on the values of the conditions in the #if blocks." :group 'c diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el index 9dcef40cd98..ba6b05d7600 100644 --- a/lisp/cedet/semantic/bovine/el.el +++ b/lisp/cedet/semantic/bovine/el.el @@ -149,8 +149,10 @@ compound strings." (nth 1 form)) (t nil))) -(defvar semantic-elisp-store-documentation-in-tag nil - "*When non-nil, store documentation strings in the created tags.") +(defcustom semantic-elisp-store-documentation-in-tag nil + "When non-nil, store documentation strings in the created tags." + :type 'boolean + :group 'semantic) (defun semantic-elisp-do-doc (str) "Return STR as a documentation string IF they are enabled." diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 28dff4fdbb1..5bd76f018a1 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -568,7 +568,7 @@ if INLINE, then completion is happening inline in a buffer." (:underline "yellow")) (((class color) (background light)) (:underline "brown"))) - "*Face used to show the region being completed inline. + "Face used to show the region being completed inline. The face is used in `semantic-complete-inline-tag-engine'." :group 'semantic-faces) @@ -1370,7 +1370,7 @@ This object type doesn't do focus, so will never have a focus object." ;; Traditional displayor (defcustom semantic-completion-displayor-format-tag-function #'semantic-format-tag-name - "*A Tag format function to use when showing completions." + "A Tag format function to use when showing completions." :group 'semantic :type semantic-format-tag-custom-list) @@ -1871,7 +1871,7 @@ Use this to enable custom editing.") (defcustom semantic-complete-inline-analyzer-displayor-class 'semantic-displayor-traditional - "*Class for displayor to use with inline completion." + "Class for displayor to use with inline completion." :group 'semantic :type semantic-complete-inline-custom-type ) @@ -2075,7 +2075,7 @@ completion works." (defcustom semantic-complete-inline-analyzer-idle-displayor-class 'semantic-displayor-ghost - "*Class for displayor to use with inline completion at idle time." + "Class for displayor to use with inline completion at idle time." :group 'semantic :type semantic-complete-inline-custom-type ) diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index 70e823dfc9d..89bbd1c0c29 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el @@ -44,19 +44,19 @@ ) "A table for returning search results from Emacs.") -(cl-defmethod semanticdb-refresh-table ((obj semanticdb-table-emacs-lisp) &optional force) +(cl-defmethod semanticdb-refresh-table ((_obj semanticdb-table-emacs-lisp) &optional _force) "Do not refresh Emacs Lisp table. It does not need refreshing." nil) -(cl-defmethod semanticdb-needs-refresh-p ((obj semanticdb-table-emacs-lisp)) +(cl-defmethod semanticdb-needs-refresh-p ((_obj semanticdb-table-emacs-lisp)) "Return nil, we never need a refresh." nil) (cl-defmethod object-print ((obj semanticdb-table-emacs-lisp) &rest strings) "Pretty printer extension for `semanticdb-table-emacs-lisp'. Adds the number of tags in this file to the object print name." - (apply 'call-next-method obj (cons " (proxy)" strings))) + (apply #'cl-call-next-method obj (cons " (proxy)" strings))) (defclass semanticdb-project-database-emacs-lisp (semanticdb-project-database eieio-singleton) @@ -71,15 +71,15 @@ Adds the number of tags in this file to the object print name." "Pretty printer extension for `semanticdb-table-emacs-lisp'. Adds the number of tags in this file to the object print name." (let ((count 0)) - (mapatoms (lambda (sym) (setq count (1+ count)))) - (apply 'call-next-method obj (cons - (format " (%d known syms)" count) - strings)))) + (mapatoms (lambda (_sym) (setq count (1+ count)))) + (apply #'cl-call-next-method obj (cons + (format " (%d known syms)" count) + strings)))) ;; Create the database, and add it to searchable databases for Emacs Lisp mode. (defvar-mode-local emacs-lisp-mode semanticdb-project-system-databases (list - (semanticdb-project-database-emacs-lisp "Emacs")) + (make-instance 'semanticdb-project-database-emacs-lisp)) "Search Emacs core for symbols.") (defvar-mode-local emacs-lisp-mode semanticdb-find-default-throttle @@ -96,32 +96,32 @@ Create one of our special tables that can act as an intermediary." ;; We need to return something since there is always the "master table" ;; The table can then answer file name type questions. (when (not (slot-boundp obj 'tables)) - (let ((newtable (semanticdb-table-emacs-lisp "Emacs System Table"))) + (let ((newtable (make-instance 'semanticdb-table-emacs-lisp))) (oset obj tables (list newtable)) (oset newtable parent-db obj) (oset newtable tags nil) )) (cl-call-next-method)) -(cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-emacs-lisp) filename) +(cl-defmethod semanticdb-file-table ((obj semanticdb-project-database-emacs-lisp) _filename) "From OBJ, return FILENAME's associated table object. For Emacs Lisp, creates a specialized table." (car (semanticdb-get-database-tables obj)) ) -(cl-defmethod semanticdb-get-tags ((table semanticdb-table-emacs-lisp )) +(cl-defmethod semanticdb-get-tags ((_table semanticdb-table-emacs-lisp )) "Return the list of tags belonging to TABLE." ;; specialty table ? Probably derive tags at request time. nil) -(cl-defmethod semanticdb-equivalent-mode ((table semanticdb-table-emacs-lisp) &optional buffer) +(cl-defmethod semanticdb-equivalent-mode ((_table semanticdb-table-emacs-lisp) &optional buffer) "Return non-nil if TABLE's mode is equivalent to BUFFER. Equivalent modes are specified by the `semantic-equivalent-major-modes' local variable." (with-current-buffer buffer (eq (or mode-local-active-mode major-mode) 'emacs-lisp-mode))) -(cl-defmethod semanticdb-full-filename ((obj semanticdb-table-emacs-lisp)) +(cl-defmethod semanticdb-full-filename ((_obj semanticdb-table-emacs-lisp)) "Fetch the full filename that OBJ refers to. For Emacs Lisp system DB, there isn't one." nil) @@ -151,7 +151,7 @@ If Emacs cannot resolve this symbol to a particular file, then return nil." 'defvar) )) (sym (intern (semantic-tag-name tag))) - (file (condition-case err + (file (condition-case nil (symbol-file sym type) ;; Older [X]Emacs don't have a 2nd argument. (error (symbol-file sym)))) @@ -169,7 +169,6 @@ If Emacs cannot resolve this symbol to a particular file, then return nil." (setq file (concat file ".gz")))) (let* ((tab (semanticdb-file-table-object file)) - (alltags (when tab (semanticdb-get-tags tab))) (newtags (when tab (semanticdb-find-tags-by-name-method tab (semantic-tag-name tag)))) (match nil)) @@ -248,7 +247,7 @@ TOKTYPE is a hint to the type of tag desired." "Variable used to collect `mapatoms' output.") (cl-defmethod semanticdb-find-tags-by-name-method - ((table semanticdb-table-emacs-lisp) name &optional tags) + ((_table semanticdb-table-emacs-lisp) name &optional tags) "Find all tags named NAME in TABLE. Uses `intern-soft' to match NAME to Emacs symbols. Return a list of tags." @@ -269,26 +268,26 @@ Return a list of tags." )))) (cl-defmethod semanticdb-find-tags-by-name-regexp-method - ((table semanticdb-table-emacs-lisp) regex &optional tags) + ((_table semanticdb-table-emacs-lisp) regex &optional tags) "Find all tags with name matching REGEX in TABLE. Optional argument TAGS is a list of tags to search. Uses `apropos-internal' to find matches. Return a list of tags." (if tags (cl-call-next-method) - (delq nil (mapcar 'semanticdb-elisp-sym->tag + (delq nil (mapcar #'semanticdb-elisp-sym->tag (apropos-internal regex))))) (cl-defmethod semanticdb-find-tags-for-completion-method - ((table semanticdb-table-emacs-lisp) prefix &optional tags) + ((_table semanticdb-table-emacs-lisp) prefix &optional tags) "In TABLE, find all occurrences of tags matching PREFIX. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." (if tags (cl-call-next-method) - (delq nil (mapcar 'semanticdb-elisp-sym->tag + (delq nil (mapcar #'semanticdb-elisp-sym->tag (all-completions prefix obarray))))) (cl-defmethod semanticdb-find-tags-by-class-method - ((table semanticdb-table-emacs-lisp) class &optional tags) + ((_table semanticdb-table-emacs-lisp) _class &optional tags) "In TABLE, find all occurrences of tags of CLASS. Optional argument TAGS is a list of tags to search. Returns a table of all matching tags." @@ -323,7 +322,7 @@ Like `semanticdb-find-tags-for-completion-method' for Emacs Lisp." ;;; Advanced Searches ;; (cl-defmethod semanticdb-find-tags-external-children-of-type-method - ((table semanticdb-table-emacs-lisp) type &optional tags) + ((_table semanticdb-table-emacs-lisp) type &optional tags) "Find all nonterminals which are child elements of TYPE Optional argument TAGS is a list of tags to search. Return a list of tags." @@ -333,7 +332,7 @@ Return a list of tags." (let* ((class (intern-soft type)) (taglst (when class (delq nil - (mapcar 'semanticdb-elisp-sym->tag + (mapcar #'semanticdb-elisp-sym->tag ;; Fancy eieio function that knows all about ;; built in methods belonging to CLASS. (cl-generic-all-functions class))))) diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index 7a4beea3650..c09af59ea70 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el @@ -902,7 +902,7 @@ instead." This makes it appear more like the results of a `semantic-find-' call. This is like `semanticdb-strip-find-results', except the input list RESULTS will be changed." - (apply #'nconc (mapcar #'cdr results))) + (mapcan #'cdr results)) (defun semanticdb-find-results-p (resultp) "Non-nil if RESULTP is in the form of a semanticdb search result. diff --git a/lisp/cedet/semantic/db-global.el b/lisp/cedet/semantic/db-global.el index 2b78aac7258..8cb9dab5aaa 100644 --- a/lisp/cedet/semantic/db-global.el +++ b/lisp/cedet/semantic/db-global.el @@ -47,7 +47,7 @@ in a GNU Global supported hierarchy. Two sanity checks are performed to assure (a) that GNU global program exists and (b) that the GNU global program version is compatibility with the database -version. If optional NOERROR is nil, then an error may be signalled on version +version. If optional NOERROR is nil, then an error may be signaled on version mismatch. If NOERROR is not nil, then no error will be signaled. Instead return value will indicate success or failure with non-nil or nil respective values." diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index 0f3a87c3b10..d9eef326161 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el @@ -814,7 +814,7 @@ local variable." ;; associated databases. (defcustom semanticdb-project-roots nil - "*List of directories, where each directory is the root of some project. + "List of directories, where each directory is the root of some project. All subdirectories of a root project are considered a part of one project. Values in this string can be overridden by project management programs via the `semanticdb-project-root-functions' variable." diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el index f828a1aef5f..c7b5eb55ef1 100644 --- a/lisp/cedet/semantic/decorate/include.el +++ b/lisp/cedet/semantic/decorate/include.el @@ -49,7 +49,7 @@ ;; (defface semantic-decoration-on-includes nil - "*Overlay Face used on includes that are not in some other state. + "Overlay Face used on includes that are not in some other state. Used by the decoration style: `semantic-decoration-on-includes'." :group 'semantic-faces) @@ -119,7 +119,7 @@ Used by the decoration style: `semantic-decoration-on-includes'." (:background "#900000")) (((class color) (background light)) (:background "#fff0f0"))) - "*Face used to show includes that cannot be found. + "Face used to show includes that cannot be found. Used by the decoration style: `semantic-decoration-on-unknown-includes'." :group 'semantic-faces) @@ -182,7 +182,7 @@ Used by the decoration style: `semantic-decoration-on-unknown-includes'." (:background "#009000")) (((class color) (background light)) (:background "#f0fdf0"))) - "*Face used to show includes that have no file, but do have a DB table. + "Face used to show includes that have no file, but do have a DB table. Used by the decoration style: `semantic-decoration-on-fileless-includes'." :group 'semantic-faces) @@ -245,7 +245,7 @@ Used by the decoration style: `semantic-decoration-on-fileless-includes'." (:background "#555500")) (((class color) (background light)) (:background "#ffff55"))) - "*Face used to show includes that have not yet been parsed. + "Face used to show includes that have not yet been parsed. Used by the decoration style: `semantic-decoration-on-unparsed-includes'." :group 'semantic-faces) diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el index fa181daa8c5..a749fca9ccd 100644 --- a/lisp/cedet/semantic/decorate/mode.el +++ b/lisp/cedet/semantic/decorate/mode.el @@ -455,7 +455,7 @@ Does not provide overlines for prototypes.") (:overline "cyan")) (((class color) (background light)) (:overline "blue"))) - "*Face used to show long tags in. + "Face used to show long tags in. Used by decoration style: `semantic-tag-boundary'." :group 'semantic-faces) @@ -504,7 +504,7 @@ Used by decoration style: `semantic-tag-boundary'." (:background "#200000")) (((class color) (background light)) (:background "#8fffff"))) - "*Face used to show privately scoped tags in. + "Face used to show privately scoped tags in. Used by the decoration style: `semantic-decoration-on-private-members'." :group 'semantic-faces) @@ -526,7 +526,7 @@ Use a primary decoration." (:background "#000020")) (((class color) (background light)) (:background "#fffff8"))) - "*Face used to show protected scoped tags in. + "Face used to show protected scoped tags in. Used by the decoration style: `semantic-decoration-on-protected-members'." :group 'semantic-faces) diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el index a59baef2979..b724429850a 100644 --- a/lisp/cedet/semantic/format.el +++ b/lisp/cedet/semantic/format.el @@ -559,14 +559,14 @@ Optional argument COLOR means highlight the prototype with font-lock colors." ;;; UML display styles ;; (defcustom semantic-uml-colon-string " : " - "*String used as a color separator between parts of a UML string. + "String used as a color separator between parts of a UML string. In UML, a variable may appear as `varname : type'. Change this variable to change the output separator." :group 'semantic :type 'string) (defcustom semantic-uml-no-protection-string "" - "*String used to describe when no protection is specified. + "String used to describe when no protection is specified. Used by `semantic-format-tag-uml-protection-to-string'." :group 'semantic :type 'string) diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el index 5614cdaee6a..4696388a9c0 100644 --- a/lisp/cedet/semantic/ia.el +++ b/lisp/cedet/semantic/ia.el @@ -146,7 +146,7 @@ Completion options are calculated with `semantic-analyze-possible-completions'." (defcustom semantic-ia-completion-menu-format-tag-function 'semantic-format-tag-uml-concise-prototype - "*Function used to convert a tag to a string during completion." + "Function used to convert a tag to a string during completion." :group 'semantic :type semantic-format-tag-custom-list) diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index acb13e6dba5..787748692e1 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el @@ -141,7 +141,7 @@ Use the command `semantic-idle-scheduler-mode' to change this variable.") (make-variable-buffer-local 'semantic-idle-scheduler-mode) (defcustom semantic-idle-scheduler-max-buffer-size 0 - "*Maximum size in bytes of buffers where idle-scheduler is enabled. + "Maximum size in bytes of buffers where idle-scheduler is enabled. If this value is less than or equal to 0, idle-scheduler is enabled in all buffers regardless of their size." :group 'semantic @@ -303,13 +303,13 @@ call additional functions registered with the timer calls." ;; Unlike the shorter timer, the WORK timer will kick of tasks that ;; may take a long time to complete. (defcustom semantic-idle-work-parse-neighboring-files-flag nil - "*Non-nil means to parse files in the same dir as the current buffer. + "Non-nil means to parse files in the same dir as the current buffer. Disable to prevent lots of excessive parsing in idle time." :group 'semantic :type 'boolean) (defcustom semantic-idle-work-update-headers-flag nil - "*Non-nil means to parse through header files in idle time. + "Non-nil means to parse through header files in idle time. Disable to prevent idle time parsing of many files. If completion is called that work will be done then instead." :group 'semantic diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el index df45b289f7c..a521f313f99 100644 --- a/lisp/cedet/semantic/imenu.el +++ b/lisp/cedet/semantic/imenu.el @@ -57,7 +57,7 @@ ;;;###autoload (defcustom semantic-imenu-summary-function 'semantic-format-tag-abbreviate - "*Function to use when creating items in Imenu. + "Function to use when creating items in Imenu. Some useful functions are found in `semantic-format-tag-functions'." :group 'semantic-imenu :type semantic-format-tag-custom-list) @@ -65,20 +65,20 @@ Some useful functions are found in `semantic-format-tag-functions'." ;;;###autoload (defcustom semantic-imenu-bucketize-file t - "*Non-nil if tags in a file are to be grouped into buckets." + "Non-nil if tags in a file are to be grouped into buckets." :group 'semantic-imenu :type 'boolean) (make-variable-buffer-local 'semantic-imenu-bucketize-file) (defcustom semantic-imenu-adopt-external-members t - "*Non-nil if types in a file should adopt externally defined members. + "Non-nil if types in a file should adopt externally defined members. C++ and CLOS can define methods that are not in the body of a class definition." :group 'semantic-imenu :type 'boolean) (defcustom semantic-imenu-buckets-to-submenu t - "*Non-nil if buckets of tags are to be turned into submenus. + "Non-nil if buckets of tags are to be turned into submenus. This option is ignored if `semantic-imenu-bucketize-file' is nil." :group 'semantic-imenu :type 'boolean) @@ -86,7 +86,7 @@ This option is ignored if `semantic-imenu-bucketize-file' is nil." ;;;###autoload (defcustom semantic-imenu-expand-type-members t - "*Non-nil if types should have submenus with members in them." + "Non-nil if types should have submenus with members in them." :group 'semantic-imenu :type 'boolean) (make-variable-buffer-local 'semantic-imenu-expand-type-members) @@ -94,7 +94,7 @@ This option is ignored if `semantic-imenu-bucketize-file' is nil." 'semantic-imenu-expand-type-members "23.2") (defcustom semantic-imenu-bucketize-type-members t - "*Non-nil if members of a type should be grouped into buckets. + "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." :group 'semantic-imenu @@ -104,7 +104,7 @@ Overridden to nil if `semantic-imenu-bucketize-file' is nil." 'semantic-imenu-bucketize-type-members "23.2") (defcustom semantic-imenu-sort-bucket-function nil - "*Function to use when sorting tags in the buckets of functions. + "Function to use when sorting tags in the buckets of functions. See `semantic-bucketize' and the FILTER argument for more details on this function." :group 'semantic-imenu :type '(radio (const :tag "No Sorting" nil) @@ -120,7 +120,7 @@ See `semantic-bucketize' and the FILTER argument for more details on this functi (make-variable-buffer-local 'semantic-imenu-sort-bucket-function) (defcustom semantic-imenu-index-directory nil - "*Non nil to index the entire directory for tags. + "Non nil to index the entire directory for tags. Doesn't actually parse the entire directory, but displays tags for all files currently listed in the current Semantic database. This variable has no meaning if semanticdb is not active." @@ -128,7 +128,7 @@ This variable has no meaning if semanticdb is not active." :type 'boolean) (defcustom semantic-imenu-auto-rebuild-directory-indexes nil - "*If non-nil automatically rebuild directory index imenus. + "If non-nil automatically rebuild directory index imenus. That is when a directory index imenu is updated, automatically rebuild other buffer local ones based on the same semanticdb." :group 'semantic-imenu @@ -498,7 +498,7 @@ Clears all imenu menus that may be depending on the database." "Function to convert semantic tags into `which-function' text.") (defcustom semantic-which-function-use-color nil - "*Use color when displaying the current function with `which-function'." + "Use color when displaying the current function with `which-function'." :group 'semantic-imenu :type 'boolean) diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index ef2cab3153f..8d6467e5ed0 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el @@ -1239,7 +1239,7 @@ of type `spp-macro-undef' is to be created." ;; written yet. ;; (defcustom semantic-lex-spp-use-headers-flag nil - "*Non-nil means to pre-parse headers as we go. + "Non-nil means to pre-parse headers as we go. For languages that use the Semantic pre-processor, this can improve the accuracy of parsed files where include files can change the state of what's parsed in the current file. @@ -1306,8 +1306,10 @@ where a valid symbol is 'system, or nil." ;; ;; These routines are for saving macro lists into an EIEIO persistent ;; file. -(defvar semantic-lex-spp-macro-max-length-to-save 200 - "*Maximum length of an SPP macro before we opt to not save it.") +(defcustom semantic-lex-spp-macro-max-length-to-save 200 + "Maximum length of an SPP macro before we opt to not save it." + :type 'integer + :group 'semantic) ;;;###autoload (defun semantic-lex-spp-table-write-slot-value (value) diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index 252944ce161..2e8817e13a1 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el @@ -739,8 +739,10 @@ a LOCAL option.") ;; Stack of nested blocks. (defvar semantic-lex-block-stack nil) -;;(defvar semantic-lex-timeout 5 -;; "*Number of sections of lexing before giving up.") +;;(defcustom semantic-lex-timeout 5 +;; "Number of sections of lexing before giving up." +;; :type 'integer +;; :group 'semantic) (defsubst semantic-lex-debug-break (token) "Break during lexical analysis at TOKEN." diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index a609a90cfbd..067439d4772 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -263,7 +263,7 @@ If ARG is positive or nil, enable, if it is negative, disable." 'semantic-mru-bookmark-mode (if global-semantic-mru-bookmark-mode 1 -1))) (defcustom semantic-mru-bookmark-mode-hook nil - "*Hook run at the end of function `semantic-mru-bookmark-mode'." + "Hook run at the end of function `semantic-mru-bookmark-mode'." :group 'semantic :type 'hook) diff --git a/lisp/cedet/semantic/sb.el b/lisp/cedet/semantic/sb.el index 8b04644c056..41fe8857ccf 100644 --- a/lisp/cedet/semantic/sb.el +++ b/lisp/cedet/semantic/sb.el @@ -38,7 +38,7 @@ (declare-function semanticdb-file-stream "semantic/db") (defcustom semantic-sb-autoexpand-length 1 - "*Length of a semantic bucket to autoexpand in place. + "Length of a semantic bucket to autoexpand in place. This will replace the named bucket that would have usually occurred here." :group 'speedbar :type 'integer) @@ -49,12 +49,12 @@ Make this buffer local for modes that have different types of tags that should be ignored.") (defcustom semantic-sb-button-format-tag-function 'semantic-format-tag-abbreviate - "*Function called to create the text for a but from a token." + "Function called to create the text for a but from a token." :group 'speedbar :type semantic-format-tag-custom-list) (defcustom semantic-sb-info-format-tag-function 'semantic-format-tag-summarize - "*Function called to create the text for info display from a token." + "Function called to create the text for info display from a token." :group 'speedbar :type semantic-format-tag-custom-list) diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index 9daf8c59858..a16672e39de 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el @@ -65,6 +65,8 @@ ;; Your tool should then create an instance of `semantic-symref-result'. (require 'semantic) +(eval-when-compile (require 'semantic/find)) ;For semantic-find-tags-* +(eval-when-compile (require 'ede/proj)) ;For `metasubproject' warning. (defvar ede-minor-mode) (declare-function data-debug-new-buffer "data-debug") @@ -74,10 +76,12 @@ (declare-function ede-up-directory "ede/files") ;;; Code: -(defvar semantic-symref-tool 'detect - "*The active symbol reference tool name. +(defcustom semantic-symref-tool 'detect + "The active symbol reference tool name. The tool symbol can be 'detect, or a symbol that is the name of -a tool that can be used for symbol referencing.") +a tool that can be used for symbol referencing." + :type 'symbol + :group 'semantic) (make-variable-buffer-local 'semantic-symref-tool) ;;; TOOL SETUP @@ -109,7 +113,7 @@ Start with an EDE project, or use the default directory." default-directory))) (if (and rootproj (condition-case nil ;; Hack for subprojects. - (oref rootproj :metasubproject) + (oref rootproj metasubproject) (error nil))) (ede-up-directory rootdirbase) rootdirbase))) @@ -271,7 +275,7 @@ Optional SCOPE specifies which file set to search. Defaults to `project'. Refers to `semantic-symref-tool', to determine the reference tool to use for the current buffer. Returns an object of class `semantic-symref-result'." - (interactive "sEgrep style Regexp: ") + (interactive "sGrep -E style Regexp: ") (let* ((inst (semantic-symref-instantiate :searchfor text :searchtype 'regexp @@ -284,6 +288,80 @@ Returns an object of class `semantic-symref-result'." (semantic-symref-data-debug-last-result)))) ) +;;; SYMREF TOOLS +;; +;; The base symref tool provides something to hang new tools off of +;; for finding symbol references. +(defclass semantic-symref-tool-baseclass () + ((searchfor :initarg :searchfor + :type string + :documentation "The thing to search for.") + (searchtype :initarg :searchtype + :type symbol + :documentation "The type of search to do. +Values could be 'symbol, 'regexp, 'tagname, or 'completion.") + (searchscope :initarg :searchscope + :type symbol + :documentation + "The scope to search for. +Can be 'project, 'target, or 'file.") + (resulttype :initarg :resulttype + :type symbol + :documentation + "The kind of search results desired. +Can be 'line, 'file, or 'tag. +The type of result can be converted from 'line to 'file, or 'line to 'tag, +but not from 'file to 'line or 'tag.") + ) + "Baseclass for all symbol references tools. +A symbol reference tool supplies functionality to identify the locations of +where different symbols are used. + +Subclasses should be named `semantic-symref-tool-NAME', where +NAME is the name of the tool used in the configuration variable +`semantic-symref-tool'" + :abstract t) + +(cl-defmethod semantic-symref-get-result ((tool semantic-symref-tool-baseclass)) + "Calculate the results of a search based on TOOL. +The symref TOOL should already contain the search criteria." + (let ((answer (semantic-symref-perform-search tool)) + ) + (when answer + (let ((answersym (if (eq (oref tool resulttype) 'file) + :hit-files + (if (stringp (car answer)) + :hit-text + :hit-lines)))) + (semantic-symref-result (oref tool searchfor) + answersym + answer + :created-by tool)) + ) + )) + +(cl-defmethod semantic-symref-perform-search ((_tool semantic-symref-tool-baseclass)) + "Base search for symref tools should throw an error." + (error "Symref tool objects must implement `semantic-symref-perform-search'")) + +(cl-defmethod semantic-symref-parse-tool-output ((tool semantic-symref-tool-baseclass) + outputbuffer) + "Parse the entire OUTPUTBUFFER of a symref tool. +Calls the method `semantic-symref-parse-tool-output-one-line' over and +over until it returns nil." + (with-current-buffer outputbuffer + (goto-char (point-min)) + (let ((result nil) + (hit nil)) + (while (setq hit (semantic-symref-parse-tool-output-one-line tool)) + (setq result (cons hit result))) + (nreverse result))) + ) + +(cl-defmethod semantic-symref-parse-tool-output-one-line ((_tool semantic-symref-tool-baseclass)) + "Base tool output parser is not implemented." + (error "Symref tool objects must implement `semantic-symref-parse-tool-output-one-line'")) + ;;; RESULTS ;; ;; The results class and methods provide features for accessing hits. @@ -316,9 +394,9 @@ Use the `semantic-symref-hit-tags' method to get this list.") (cl-defmethod semantic-symref-result-get-files ((result semantic-symref-result)) "Get the list of files from the symref result RESULT." - (if (slot-boundp result :hit-files) + (if (slot-boundp result 'hit-files) (oref result hit-files) - (let* ((lines (oref result :hit-lines)) + (let* ((lines (oref result hit-lines)) (files (mapcar (lambda (a) (cdr a)) lines)) (ans nil)) (setq ans (list (car files)) @@ -359,12 +437,12 @@ Optional OPEN-BUFFERS indicates that the buffers that the hits are in should remain open after scanning. Note: This can be quite slow if most of the hits are not in buffers already." - (if (and (slot-boundp result :hit-tags) (oref result hit-tags)) + (if (and (slot-boundp result 'hit-tags) (oref result hit-tags)) (oref result hit-tags) ;; Calculate the tags. - (let ((lines (oref result :hit-lines)) - (txt (oref (oref result :created-by) :searchfor)) - (searchtype (oref (oref result :created-by) :searchtype)) + (let ((lines (oref result hit-lines)) + (txt (oref (oref result created-by) searchfor)) + (searchtype (oref (oref result created-by) searchtype)) (ans nil) (out nil)) (save-excursion @@ -390,7 +468,7 @@ already." (semantic--tag-put-property (car out) :hit lines))) )) ;; Out is reversed... twice - (oset result :hit-tags (nreverse out))))) + (oset result hit-tags (nreverse out))))) (defun semantic-symref-hit-to-tag-via-db (hit searchtxt searchtype) "Convert the symref HIT into a TAG by looking up the tag via a database. @@ -403,20 +481,18 @@ If there is no database, of if the searchtype is wrong, return nil." ;; tagname, tagregexp, tagcompletions (if (not (memq searchtype '(tagname tagregexp tagcompletions))) nil - (let* ((line (car hit)) - (file (cdr hit)) + (let* ((file (cdr hit)) ;; FAIL here vv - don't load is not obeyed if no table found. (db (semanticdb-file-table-object file t)) - (found nil) + (found + (cond ((eq searchtype 'tagname) + (semantic-find-tags-by-name searchtxt db)) + ((eq searchtype 'tagregexp) + (semantic-find-tags-by-name-regexp searchtxt db)) + ((eq searchtype 'tagcompletions) + (semantic-find-tags-for-completion searchtxt db)))) (hit nil) ) - (cond ((eq searchtype 'tagname) - (setq found (semantic-find-tags-by-name searchtxt db))) - ((eq searchtype 'tagregexp) - (setq found (semantic-find-tags-by-name-regexp searchtxt db))) - ((eq searchtype 'tagcompletions) - (setq found (semantic-find-tags-for-completion searchtxt db))) - ) ;; Loop over FOUND to see if we can line up a match with a line number. (when (= (length found) 1) (setq hit (car found))) @@ -501,80 +577,6 @@ buffers that were opened." (semantic--tag-put-property tag :hit (list line))) tag)) -;;; SYMREF TOOLS -;; -;; The base symref tool provides something to hang new tools off of -;; for finding symbol references. -(defclass semantic-symref-tool-baseclass () - ((searchfor :initarg :searchfor - :type string - :documentation "The thing to search for.") - (searchtype :initarg :searchtype - :type symbol - :documentation "The type of search to do. -Values could be 'symbol, 'regexp, 'tagname, or 'completion.") - (searchscope :initarg :searchscope - :type symbol - :documentation - "The scope to search for. -Can be 'project, 'target, or 'file.") - (resulttype :initarg :resulttype - :type symbol - :documentation - "The kind of search results desired. -Can be 'line, 'file, or 'tag. -The type of result can be converted from 'line to 'file, or 'line to 'tag, -but not from 'file to 'line or 'tag.") - ) - "Baseclass for all symbol references tools. -A symbol reference tool supplies functionality to identify the locations of -where different symbols are used. - -Subclasses should be named `semantic-symref-tool-NAME', where -NAME is the name of the tool used in the configuration variable -`semantic-symref-tool'" - :abstract t) - -(cl-defmethod semantic-symref-get-result ((tool semantic-symref-tool-baseclass)) - "Calculate the results of a search based on TOOL. -The symref TOOL should already contain the search criteria." - (let ((answer (semantic-symref-perform-search tool)) - ) - (when answer - (let ((answersym (if (eq (oref tool :resulttype) 'file) - :hit-files - (if (stringp (car answer)) - :hit-text - :hit-lines)))) - (semantic-symref-result (oref tool searchfor) - answersym - answer - :created-by tool)) - ) - )) - -(cl-defmethod semantic-symref-perform-search ((tool semantic-symref-tool-baseclass)) - "Base search for symref tools should throw an error." - (error "Symref tool objects must implement `semantic-symref-perform-search'")) - -(cl-defmethod semantic-symref-parse-tool-output ((tool semantic-symref-tool-baseclass) - outputbuffer) - "Parse the entire OUTPUTBUFFER of a symref tool. -Calls the method `semantic-symref-parse-tool-output-one-line' over and -over until it returns nil." - (with-current-buffer outputbuffer - (goto-char (point-min)) - (let ((result nil) - (hit nil)) - (while (setq hit (semantic-symref-parse-tool-output-one-line tool)) - (setq result (cons hit result))) - (nreverse result))) - ) - -(cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-baseclass)) - "Base tool output parser is not implemented." - (error "Symref tool objects must implement `semantic-symref-parse-tool-output-one-line'")) - (provide 'semantic/symref) ;; Local variables: diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el index b5fa69fc397..42dc40cce04 100644 --- a/lisp/cedet/semantic/symref/grep.el +++ b/lisp/cedet/semantic/symref/grep.el @@ -81,7 +81,7 @@ Optional argument MODE specifies the `major-mode' to test." (if (null (cdr args)) args `("(" ,@args - ,@(apply #'nconc (mapcar (lambda (s) `("-o" "-name" ,s)) pat)) + ,@(mapcan (lambda (s) `("-o" "-name" ,s)) pat) ")")))))) (defvar grepflags) diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el index de03c054328..70f3a343343 100644 --- a/lisp/cedet/semantic/util-modes.el +++ b/lisp/cedet/semantic/util-modes.el @@ -712,7 +712,7 @@ minor mode is enabled." ;; Disable minor mode if semantic stuff not available (setq semantic-stickyfunc-mode nil) (error "Buffer %s was not set up for parsing" (buffer-name))) - (unless (boundp 'default-header-line-format) + (unless (boundp 'header-line-format) ;; Disable if there are no header lines to use. (setq semantic-stickyfunc-mode nil) (error "Sticky Function mode requires Emacs")) diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index 2009a53a029..cb19b1b861f 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -187,8 +187,10 @@ If optional LEFT is non-nil insert spaces on left." (defvar wisent-new-log-flag nil "Non-nil means to start a new report.") -(defvar wisent-verbose-flag nil - "*Non-nil means to report verbose information on generated parser.") +(defcustom wisent-verbose-flag nil + "Non-nil means to report verbose information on generated parser." + :group 'wisent + :type 'boolean) (defun wisent-toggle-verbose-flag () "Toggle whether to report verbose information on generated parser." @@ -2261,12 +2263,14 @@ tables so that there is no longer a conflict." (setq i (1+ i)))) rrc-count)) -(defvar wisent-expected-conflicts nil - "*If non-nil suppress the warning about shift/reduce conflicts. +(defcustom wisent-expected-conflicts nil + "If non-nil suppress the warning about shift/reduce conflicts. It is a decimal integer N that says there should be no warning if there are N shift/reduce conflicts and no reduce/reduce conflicts. A warning is given if there are either more or fewer conflicts, or if -there are any reduce/reduce conflicts.") +there are any reduce/reduce conflicts." + :group 'wisent + :type '(choice (const nil) integer)) (defun wisent-total-conflicts () "Report the total number of conflicts." diff --git a/lisp/cedet/semantic/wisent/wisent.el b/lisp/cedet/semantic/wisent/wisent.el index 48df7545dd2..36dff019792 100644 --- a/lisp/cedet/semantic/wisent/wisent.el +++ b/lisp/cedet/semantic/wisent/wisent.el @@ -127,8 +127,9 @@ POSITIONS are available." (apply #'max (mapcar #'cdr pl)))))) ;;; Reporting -(defvar wisent-parse-verbose-flag nil - "*Non-nil means to issue more messages while parsing.") +(defcustom wisent-parse-verbose-flag nil + "Non-nil means to issue more messages while parsing." + :type 'boolean) (defun wisent-parse-toggle-verbose-flag () "Toggle whether to issue more messages while parsing." |