diff options
Diffstat (limited to 'lisp/cedet/semantic')
33 files changed, 158 insertions, 187 deletions
diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el index d68098b5b9a..9ea7ebf7c1b 100644 --- a/lisp/cedet/semantic/analyze.el +++ b/lisp/cedet/semantic/analyze.el @@ -63,7 +63,6 @@ ;; constant. These need to be returned as there would be no ;; other possible completions. -(eval-when-compile (require 'cl)) (require 'semantic) (require 'semantic/format) (require 'semantic/ctxt) @@ -440,12 +439,11 @@ to provide a large number of non-cached analysis for filtering symbols." (defun semantic-analyze-current-symbol-default (analyzehookfcn position) "Call ANALYZEHOOKFCN on the analyzed symbol at POSITION." (let* ((semantic-analyze-error-stack nil) - (LLstart (current-time)) + ;; (LLstart (current-time)) (prefixandbounds (semantic-ctxt-current-symbol-and-bounds (or position (point)))) (prefix (car prefixandbounds)) (bounds (nth 2 prefixandbounds)) (scope (semantic-calculate-scope position)) - (end nil) ) ;; Only do work if we have bounds (meaning a prefix to complete) (when bounds @@ -464,15 +462,13 @@ to provide a large number of non-cached analysis for filtering symbols." prefix scope 'prefixtypes)) (error (semantic-analyze-push-error err)))) - (setq end (current-time)) - ;;(message "Analysis took %.2f sec" (semantic-elapsed-time LLstart end)) + ;;(message "Analysis took %.2f sec" (semantic-elapsed-time LLstart nil)) ) (when prefix (prog1 (funcall analyzehookfcn (car bounds) (cdr bounds) prefix) - ;;(setq end (current-time)) - ;;(message "hookfcn took %.5f sec" (semantic-elapsed-time LLstart end)) + ;;(message "hookfcn took %.5f sec" (semantic-elapsed-time LLstart nil)) ) ))) @@ -645,7 +641,6 @@ Returns an object based on symbol `semantic-analyze-context'." ;; for the argument. (setq context-return (semantic-analyze-context-functionarg - "functionargument" :buffer (current-buffer) :function fntag :index arg @@ -668,7 +663,6 @@ Returns an object based on symbol `semantic-analyze-context'." (setq context-return (semantic-analyze-context-assignment - "assignment" :buffer (current-buffer) :assignee asstag :scope scope @@ -686,7 +680,6 @@ Returns an object based on symbol `semantic-analyze-context'." ;; Nothing in particular (setq context-return (semantic-analyze-context - "context" :buffer (current-buffer) :scope scope :bounds bounds @@ -723,12 +716,11 @@ Optional argument CTXT is the context to show." (interactive) (require 'data-debug) (let ((start (current-time)) - (ctxt (or ctxt (semantic-analyze-current-context))) - (end (current-time))) + (ctxt (or ctxt (semantic-analyze-current-context)))) (if (not ctxt) (message "No Analyzer Results") (message "Analysis took %.2f seconds." - (semantic-elapsed-time start end)) + (semantic-elapsed-time start nil)) (semantic-analyze-pulse ctxt) (if ctxt (progn diff --git a/lisp/cedet/semantic/analyze/debug.el b/lisp/cedet/semantic/analyze/debug.el index c9927d29f08..d78d850723f 100644 --- a/lisp/cedet/semantic/analyze/debug.el +++ b/lisp/cedet/semantic/analyze/debug.el @@ -558,19 +558,19 @@ PARENT is a possible parent (by nesting) tag." 'mouse-face 'custom-button-pressed-face 'tag tag 'action - `(lambda (button) - (let ((buff nil) - (pnt nil)) - (save-excursion - (semantic-go-to-tag - (button-get button 'tag)) - (setq buff (current-buffer)) - (setq pnt (point))) - (if (get-buffer-window buff) - (select-window (get-buffer-window buff)) - (pop-to-buffer buff t)) - (goto-char pnt) - (pulse-line-hook-function))) + (lambda (button) + (let ((buff nil) + (pnt nil)) + (save-excursion + (semantic-go-to-tag + (button-get button 'tag)) + (setq buff (current-buffer)) + (setq pnt (point))) + (if (get-buffer-window buff) + (select-window (get-buffer-window buff)) + (pop-to-buffer buff t)) + (goto-char pnt) + (pulse-line-hook-function))) )) (princ "\"") (princ str) diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el index 309500b0adb..773210698ad 100644 --- a/lisp/cedet/semantic/analyze/refs.el +++ b/lisp/cedet/semantic/analyze/refs.el @@ -317,9 +317,8 @@ Only works for tags in the global namespace." (let* ((tag (semantic-current-tag)) (start (current-time)) (sac (semantic-analyze-tag-references tag)) - (end (current-time)) ) - (message "Analysis took %.2f seconds." (semantic-elapsed-time start end)) + (message "Analysis took %.2f seconds." (semantic-elapsed-time start nil)) (if sac (progn (require 'eieio-datadebug) diff --git a/lisp/cedet/semantic/bovine.el b/lisp/cedet/semantic/bovine.el index b185765df76..5d174c812ee 100644 --- a/lisp/cedet/semantic/bovine.el +++ b/lisp/cedet/semantic/bovine.el @@ -72,7 +72,7 @@ The return list is a lambda expression to be used in a bovine table." "Return the current nonterminal symbol. Part of the grammar source debugger. Depends on the existing environment of `semantic-bovinate-stream'." - `(if nt-stack + '(if nt-stack (car (aref (car nt-stack) 2)) nonterminal)) diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index 2b2cac11783..5f0ea168e25 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -1990,7 +1990,7 @@ have to be wrapped in that namespace." (list (semantic-tag-new-type inside-ns "namespace" tags nil))) ;; Create new semantic-table for the wrapped tags, since we don't want ;; the namespace to actually be a part of the header file. - (setq newtable (semanticdb-table "include with context")) + (setq newtable (semanticdb-table)) (oset newtable tags newtags) (oset newtable parent-db (oref inctable parent-db)) (oset newtable file (oref inctable file))) diff --git a/lisp/cedet/semantic/bovine/debug.el b/lisp/cedet/semantic/bovine/debug.el index d4f04253dcb..3464e25787f 100644 --- a/lisp/cedet/semantic/bovine/debug.el +++ b/lisp/cedet/semantic/bovine/debug.el @@ -73,8 +73,7 @@ The RULE is for \"thing\" is 1. The MATCH for \"thing\" is 1. COLLECTION is a list of `things' that have been matched so far. LEXTOKEN, is a token returned by the lexer which is being matched." - (let ((frame (semantic-bovine-debug-frame "frame" - :nonterm nonterm + (let ((frame (semantic-bovine-debug-frame :nonterm nonterm :rule rule :match match :collection collection @@ -119,8 +118,7 @@ LEXTOKEN, is a token returned by the lexer which is being matched." (defun semantic-create-bovine-debug-error-frame (condition) "Create an error frame for bovine debugger. Argument CONDITION is the thrown error condition." - (let ((frame (semantic-bovine-debug-error-frame "frame" - :condition condition))) + (let ((frame (semantic-bovine-debug-error-frame :condition condition))) (semantic-debug-set-frame semantic-debug-current-interface frame) frame)) diff --git a/lisp/cedet/semantic/bovine/grammar.el b/lisp/cedet/semantic/bovine/grammar.el index 529958a8075..f77bc9db555 100644 --- a/lisp/cedet/semantic/bovine/grammar.el +++ b/lisp/cedet/semantic/bovine/grammar.el @@ -475,6 +475,7 @@ Menu items are appended to the common grammar menu.") ;; This is with-demoted-errors. (condition-case err (with-current-buffer (find-file-noselect infile) + (setq infile buffer-file-name) (if outdir (setq default-directory outdir)) (semantic-grammar-create-package nil t)) (error (message "%s" (error-message-string err)) nil))) @@ -509,8 +510,12 @@ Menu items are appended to the common grammar menu.") ;;; Commentary: ;; -;; This file was generated from admin/grammars/" - lang ".by. +;; This file was generated from " + (if (string-match "\\(admin/grammars/.*\\.by\\)\\'" infile) + (match-string 1 infile) + (concat "admin/grammars/" + (if (string-equal lang "scm") "scheme" lang) ".by")) +". ;;; Code: ") diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index 1e7bbbd813c..88ddd58059d 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -106,7 +106,6 @@ ;; `semantic-complete-inline-tag-engine' will complete text in ;; a buffer. -(eval-when-compile (require 'cl)) (require 'semantic) (require 'eieio-opt) (require 'semantic/analyze) @@ -1890,8 +1889,8 @@ If INITIAL-INPUT is non-nil, insert it in the minibuffer initially. HISTORY is a symbol representing a variable to store the history in." (semantic-complete-read-tag-engine (semantic-collector-buffer-deep prompt :buffer (current-buffer)) - (semantic-displayor-traditional-with-focus-highlight "simple") - ;;(semantic-displayor-tooltip "simple") + (semantic-displayor-traditional-with-focus-highlight) + ;;(semantic-displayor-tooltip) prompt default-tag initial-input @@ -1912,8 +1911,8 @@ If INITIAL-INPUT is non-nil, insert it in the minibuffer initially. HISTORY is a symbol representing a variable to store the history in." (semantic-complete-read-tag-engine (semantic-collector-local-members prompt :buffer (current-buffer)) - (semantic-displayor-traditional-with-focus-highlight "simple") - ;;(semantic-displayor-tooltip "simple") + (semantic-displayor-traditional-with-focus-highlight) + ;;(semantic-displayor-tooltip) prompt default-tag initial-input @@ -1937,7 +1936,7 @@ HISTORY is a symbol representing a variable to store the history in." :buffer (current-buffer) :path (current-buffer) ) - (semantic-displayor-traditional-with-focus-highlight "simple") + (semantic-displayor-traditional-with-focus-highlight) prompt default-tag initial-input @@ -1954,7 +1953,6 @@ to control how completion options are displayed. See `semantic-complete-inline-tag-engine' for details on how completion works." (let* ((collector (semantic-collector-project-brutish - "inline" :buffer (current-buffer) :path (current-buffer))) (sbounds (semantic-ctxt-current-symbol-and-bounds)) @@ -1984,9 +1982,8 @@ completion works." ;; There are several options. Do the completion. (semantic-complete-inline-tag-engine collector - (funcall semantic-complete-inline-analyzer-displayor-class - "inline displayor") - ;;(semantic-displayor-tooltip "simple") + (funcall semantic-complete-inline-analyzer-displayor-class) + ;;(semantic-displayor-tooltip) (current-buffer) start end)) ))) @@ -2013,7 +2010,7 @@ prompts. these are calculated from the CONTEXT variable passed in." prompt :buffer (oref context buffer) :context context) - (semantic-displayor-traditional-with-focus-highlight "simple") + (semantic-displayor-traditional-with-focus-highlight) (with-current-buffer (oref context buffer) (goto-char (cdr (oref context bounds))) (concat prompt (mapconcat 'identity syms ".") @@ -2037,7 +2034,6 @@ completion works." (if (not context) (setq context (semantic-analyze-current-context (point)))) (if (not context) (error "Nothing to complete on here")) (let* ((collector (semantic-collector-analyze-completions - "inline" :buffer (oref context buffer) :context context)) (syms (semantic-ctxt-current-symbol (point))) @@ -2064,9 +2060,8 @@ completion works." ;; There are several options. Do the completion. (semantic-complete-inline-tag-engine collector - (funcall semantic-complete-inline-analyzer-displayor-class - "inline displayor") - ;;(semantic-displayor-tooltip "simple") + (funcall semantic-complete-inline-analyzer-displayor-class) + ;;(semantic-displayor-tooltip) (oref context buffer) (car (oref context bounds)) (cdr (oref context bounds)) diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el index 496d0a59d24..8dbb337ee55 100644 --- a/lisp/cedet/semantic/db-file.el +++ b/lisp/cedet/semantic/db-file.el @@ -307,8 +307,8 @@ Argument OBJ is the object to write." ;; Make sure that the file size and other attributes are ;; up to date. (let ((fattr (file-attributes (semanticdb-full-filename obj)))) - (oset obj fsize (nth 7 fattr)) - (oset obj lastmodtime (nth 5 fattr)) + (oset obj fsize (file-attribute-size fattr)) + (oset obj lastmodtime (file-attribute-modification-time fattr)) ) ;; Do it! diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index 81691fbbeea..c89ae1392dd 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el @@ -1333,6 +1333,9 @@ Returns a table of all matching tags." (semantic-find-tags-included (or tags (semanticdb-get-tags table))) (semantic-find-tags-by-class class (or tags (semanticdb-get-tags table))))) +(declare-function semantic-find-tags-external-children-of-type + "semantic/find" (type &optional table)) + (cl-defmethod semanticdb-find-tags-external-children-of-type-method ((table semanticdb-abstract-table) parent &optional tags) "In TABLE, find all occurrences of tags whose parent is the PARENT type. Optional argument TAGS is a list of tags to search. @@ -1340,6 +1343,9 @@ Returns a table of all matching tags." (require 'semantic/find) (semantic-find-tags-external-children-of-type parent (or tags (semanticdb-get-tags table)))) +(declare-function semantic-find-tags-subclasses-of-type + "semantic/find" (type &optional table)) + (cl-defmethod semanticdb-find-tags-subclasses-of-type-method ((table semanticdb-abstract-table) parent &optional tags) "In TABLE, find all occurrences of tags whose parent is the PARENT type. Optional argument TAGS is a list of tags to search. diff --git a/lisp/cedet/semantic/db-javascript.el b/lisp/cedet/semantic/db-javascript.el index 230fbfd84ed..5622594a5c3 100644 --- a/lisp/cedet/semantic/db-javascript.el +++ b/lisp/cedet/semantic/db-javascript.el @@ -98,7 +98,7 @@ See bottom of this file for instructions on managing this list.") ;; Create the database, and add it to searchable databases for javascript mode. (defvar-mode-local javascript-mode semanticdb-project-system-databases (list - (semanticdb-project-database-javascript "Javascript")) + (semanticdb-project-database-javascript)) "Search javascript for symbols.") ;; NOTE: Be sure to modify this to the best advantage of your @@ -115,13 +115,13 @@ the omniscience database.") "For a javascript database, there are no explicit tables. Create one of our special tables that can act as an intermediary." ;; NOTE: This method overrides an accessor for the `tables' slot in - ;; a database. You can either construct your own (like tmp here + ;; a database. You can either construct your own (like newtable here ;; or you can manage any number of tables. ;; 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-javascript "tmp"))) + (let ((newtable (semanticdb-table-javascript))) (oset obj tables (list newtable)) (oset newtable parent-db obj) (oset newtable tags nil) diff --git a/lisp/cedet/semantic/db-mode.el b/lisp/cedet/semantic/db-mode.el index c2dd906e8e2..e1d8f632853 100644 --- a/lisp/cedet/semantic/db-mode.el +++ b/lisp/cedet/semantic/db-mode.el @@ -50,10 +50,12 @@ (member (car (car semanticdb-hooks)) (symbol-value (car (cdr (car semanticdb-hooks)))))) +(defvaralias 'semanticdb-mode-hook 'global-semanticdb-minor-mode-hook) +(defvaralias 'semanticdb-global-mode 'global-semanticdb-minor-mode) + ;;;###autoload (define-minor-mode global-semanticdb-minor-mode "Toggle Semantic DB mode. -With ARG, turn Semantic DB mode on if ARG is positive, off otherwise. In Semantic DB mode, Semantic parsers store results in a database, which can be saved for future Emacs sessions." @@ -67,8 +69,6 @@ database, which can be saved for future Emacs sessions." (dolist (elt semanticdb-hooks) (remove-hook (cadr elt) (car elt))))) -(defvaralias 'semanticdb-mode-hook 'global-semanticdb-minor-mode-hook) -(defvaralias 'semanticdb-global-mode 'global-semanticdb-minor-mode) (semantic-varalias-obsolete 'semanticdb-mode-hooks 'global-semanticdb-minor-mode-hook "23.2") @@ -178,8 +178,9 @@ handle it later if need be." (let ((fattr (file-attributes (semanticdb-full-filename semanticdb-current-table)))) - (oset semanticdb-current-table fsize (nth 7 fattr)) - (oset semanticdb-current-table lastmodtime (nth 5 fattr)) + (oset semanticdb-current-table fsize (file-attribute-size fattr)) + (oset semanticdb-current-table lastmodtime + (file-attribute-modification-time fattr)) (oset semanticdb-current-table buffer nil) )) ;; If this messes up, just clear the system diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el index 366fb15cf28..ddac96c7045 100644 --- a/lisp/cedet/semantic/db-ref.el +++ b/lisp/cedet/semantic/db-ref.el @@ -162,8 +162,7 @@ refreshed before dumping the result." (let* ((tab semanticdb-current-table) (myrefs (oref tab db-refs)) (myinc (semanticdb-includes-in-table tab)) - (adbc (semanticdb-ref-adebug "DEBUG" - :i-depend-on myrefs + (adbc (semanticdb-ref-adebug :i-depend-on myrefs :local-table tab :i-include myinc))) (data-debug-new-buffer "*References ADEBUG*") diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index a04d0777aca..1987bc07e29 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el @@ -611,8 +611,8 @@ The file associated with OBJ does not need to be in a buffer." ;; Buffer isn't loaded. The only clue we have is if the file ;; is somehow different from our mark in the semanticdb table. (let* ((stats (file-attributes ff)) - (actualsize (nth 7 stats)) - (actualmod (nth 5 stats)) + (actualsize (file-attribute-size stats)) + (actualmod (file-attribute-modification-time stats)) ) (or (not (slot-boundp obj 'tags)) @@ -631,8 +631,8 @@ The file associated with OBJ does not need to be in a buffer." (oset table tags new-tags) (oset table pointmax (point-max)) (let ((fattr (file-attributes (semanticdb-full-filename table)))) - (oset table fsize (nth 7 fattr)) - (oset table lastmodtime (nth 5 fattr)) + (oset table fsize (file-attribute-size fattr)) + (oset table lastmodtime (file-attribute-modification-time fattr)) ) ;; Assume it is now up to date. (oset table unmatched-syntax semantic-unmatched-syntax-cache) diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el index e4fe243302b..e5c04d1b8d7 100644 --- a/lisp/cedet/semantic/debug.el +++ b/lisp/cedet/semantic/debug.el @@ -36,7 +36,6 @@ ;; Each parser must implement the interface and override any methods as needed. ;; -(eval-when-compile (require 'cl)) (require 'semantic) (require 'eieio) (require 'cl-generic) @@ -361,7 +360,6 @@ Argument ONOFF is non-nil when we are entering debug mode. (semantic-debug-current-interface (let ((parserb (semantic-debug-find-parser-source))) (semantic-debug-interface - "Debug Interface" :parser-buffer parserb :parser-local-map (with-current-buffer parserb (current-local-map)) diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el index d4345a9ab0b..be1d5db069f 100644 --- a/lisp/cedet/semantic/decorate/mode.el +++ b/lisp/cedet/semantic/decorate/mode.el @@ -35,7 +35,7 @@ ;; ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'semantic) (require 'semantic/decorate) (require 'semantic/tag-ls) @@ -82,13 +82,13 @@ add items to this list." (defsubst semantic-decoration-set-property (deco property value) "Set the DECO decoration's PROPERTY to VALUE. Return DECO." - (assert (semantic-decoration-p deco)) + (cl-assert (semantic-decoration-p deco)) (semantic-overlay-put deco property value) deco) (defsubst semantic-decoration-get-property (deco property) "Return the DECO decoration's PROPERTY value." - (assert (semantic-decoration-p deco)) + (cl-assert (semantic-decoration-p deco)) (semantic-overlay-get deco property)) (defsubst semantic-decoration-set-face (deco face) @@ -103,7 +103,7 @@ Return DECO." (defsubst semantic-decoration-set-priority (deco priority) "Set the priority of the decoration DECO to PRIORITY. Return DECO." - (assert (natnump priority)) + (cl-assert (natnump priority)) (semantic-decoration-set-property deco 'priority priority)) (defsubst semantic-decoration-priority (deco) @@ -113,7 +113,7 @@ Return DECO." (defsubst semantic-decoration-move (deco begin end) "Move the decoration DECO on the region between BEGIN and END. Return DECO." - (assert (semantic-decoration-p deco)) + (cl-assert (semantic-decoration-p deco)) (semantic-overlay-move deco begin end) deco) @@ -135,7 +135,7 @@ Return the overlay that makes up the new decoration." (defun semantic-decorate-clear-tag (tag &optional deco) "Remove decorations from TAG. If optional argument DECO is non-nil, remove only that decoration." - (assert (or (null deco) (semantic-decoration-p deco))) + (cl-assert (or (null deco) (semantic-decoration-p deco))) ;; Clear primary decorations. ;; For now, just unhighlight the tag. How to deal with other ;; primary decorations like invisibility, etc. ? Maybe just @@ -249,13 +249,13 @@ by `semantic-decoration-styles'." (define-minor-mode semantic-decoration-mode "Minor mode for decorating tags. -Decorations are specified in `semantic-decoration-styles'. -You can define new decoration styles with +Decorations are specified in `semantic-decoration-styles'. You +can define new decoration styles with `define-semantic-decoration-style'. -With prefix argument ARG, turn on if positive, otherwise off. The -minor mode can be turned on only if semantic feature is available and -the current buffer was set up for parsing. Return non-nil if the -minor mode is enabled." + +The minor mode can be turned on only if semantic feature is +available and the current buffer was set up for parsing. Return +non-nil if the minor mode is enabled." ;; ;;\\{semantic-decoration-map}" nil nil nil diff --git a/lisp/cedet/semantic/dep.el b/lisp/cedet/semantic/dep.el index 5dacc28d9e7..84bb2285b4e 100644 --- a/lisp/cedet/semantic/dep.el +++ b/lisp/cedet/semantic/dep.el @@ -56,7 +56,7 @@ reparsed, the cache will be reset. TODO: use ffap.el to locate such items? NOTE: Obsolete this, or use as special user") -(make-variable-buffer-local `semantic-dependency-include-path) +(make-variable-buffer-local 'semantic-dependency-include-path) (defvar semantic-dependency-system-include-path nil "Defines the system include path. @@ -71,7 +71,7 @@ When searching for a file associated with a name found in a tag of class include, this path will be inspected for includes of type `system'. Some include tags are agnostic to this setting and will check both the project and system directories.") -(make-variable-buffer-local `semantic-dependency-system-include-path) +(make-variable-buffer-local 'semantic-dependency-system-include-path) (defmacro defcustom-mode-local-semantic-dependency-system-include-path (mode name value &optional docstring) diff --git a/lisp/cedet/semantic/ede-grammar.el b/lisp/cedet/semantic/ede-grammar.el index 6e02394f156..4ced6fa80ef 100644 --- a/lisp/cedet/semantic/ede-grammar.el +++ b/lisp/cedet/semantic/ede-grammar.el @@ -67,8 +67,7 @@ For Emacs Lisp, return addsuffix command on source files." (ede-proj-makefile-sourcevar this)))))) (defvar semantic-ede-source-grammar-wisent - (ede-sourcecode "semantic-ede-grammar-source-wisent" - :name "Wisent Grammar" + (ede-sourcecode :name "Wisent Grammar" :sourcepattern "\\.wy$" :garbagepattern '("*-wy.el") ) @@ -80,13 +79,11 @@ For Emacs Lisp, return addsuffix command on source files." (defvar semantic-ede-grammar-compiler-wisent (semantic-ede-grammar-compiler-class - "ede-emacs-wisent-compiler" :name "emacs" :variables '(("EMACS" . "emacs") ("EMACSFLAGS" . "-batch --no-site-file --eval '(setq debug-on-error t)'") ("require" . "$(foreach r,$(1),(require (quote $(r))))")) :rules (list (ede-makefile-rule - "elisp-inference-rule" :target "%-wy.el" :dependencies "%.wy" :rules '("$(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) \ @@ -98,8 +95,7 @@ For Emacs Lisp, return addsuffix command on source files." (defvar semantic-ede-source-grammar-bovine - (ede-sourcecode "semantic-ede-grammar-source-bovine" - :name "Bovine Grammar" + (ede-sourcecode :name "Bovine Grammar" :sourcepattern "\\.by$" :garbagepattern '("*-by.el") ) @@ -107,13 +103,11 @@ For Emacs Lisp, return addsuffix command on source files." (defvar semantic-ede-grammar-compiler-bovine (semantic-ede-grammar-compiler-class - "ede-emacs-wisent-compiler" :name "emacs" :variables '(("EMACS" . "emacs") ("EMACSFLAGS" . "-batch --no-site-file --eval '(setq debug-on-error t)'") ("require" . "$(foreach r,$(1),(require (quote $(r))))")) :rules (list (ede-makefile-rule - "elisp-inference-rule" :target "%-by.el" :dependencies "%.by" :rules '("$(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) \ diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index 9851280e14a..f6d67cf48eb 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -1611,7 +1611,7 @@ Select the buffer containing the tag's definition, and move point there." ;; (defvar semantic-grammar-syntax-help - `( + '( ;; Lexical Symbols ("symbol" . "Syntax: A symbol of alpha numeric and symbol characters") ("number" . "Syntax: Numeric characters.") diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index bb06de25985..a8946301da5 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el @@ -172,11 +172,9 @@ some command requests the list of available tokens. When idle-scheduler is enabled, Emacs periodically checks to see if the buffer is out of date, and reparses while the user is idle (not typing.) -With prefix argument ARG, turn on if positive, otherwise off. The -minor mode can be turned on only if semantic feature is available and -the current buffer was set up for parsing. Return non-nil if the -minor mode is enabled." - nil nil nil +The minor mode can be turned on only if semantic feature is +available and the current buffer was set up for parsing. Return +non-nil if the minor mode is enabled." nil nil nil (if semantic-idle-scheduler-mode (if (not (and (featurep 'semantic) (semantic-active-p))) (progn @@ -776,8 +774,6 @@ current tag to display information." (define-minor-mode semantic-idle-summary-mode "Toggle Semantic Idle Summary mode. -With ARG, turn Semantic Idle Summary mode on if ARG is positive, -off otherwise. When this minor mode is enabled, the echo area displays a summary of the lexical token at point whenever Emacs is idle." @@ -812,8 +808,6 @@ of the lexical token at point whenever Emacs is idle." (define-minor-mode global-semantic-idle-summary-mode "Toggle Global Semantic Idle Summary mode. -With ARG, turn Global Semantic Idle Summary mode on if ARG is -positive, off otherwise. When this minor mode is enabled, `semantic-idle-summary-mode' is turned on in every Semantic-supported buffer." @@ -931,9 +925,10 @@ Call `semantic-symref-hits-in-region' to identify local references." ;;;###autoload (define-minor-mode global-semantic-idle-scheduler-mode "Toggle global use of option `semantic-idle-scheduler-mode'. -The idle scheduler will automatically reparse buffers in idle time, -and then schedule other jobs setup with `semantic-idle-scheduler-add'. -If ARG is positive or nil, enable, if it is negative, disable." + +The idle scheduler will automatically reparse buffers in idle +time, and then schedule other jobs setup with +`semantic-idle-scheduler-add'." :global t :group 'semantic :group 'semantic-modes diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index 7bef6b8324d..2690122f067 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el @@ -658,10 +658,9 @@ If universal argument ARG, then try the whole buffer." (let* ((start (current-time)) (result (semantic-lex (if arg (point-min) (point)) - (point-max))) - (end (current-time))) + (point-max)))) (message "Elapsed Time: %.2f seconds." - (semantic-elapsed-time start end)) + (semantic-elapsed-time start nil)) (pop-to-buffer "*Lexer Output*") (require 'pp) (erase-buffer) @@ -811,7 +810,7 @@ analyzer which might mistake a number for as a symbol." tmp-start (car semantic-lex-token-stream))) (setq tmp-start semantic-lex-end-point) (goto-char semantic-lex-end-point) - ;;(when (> (semantic-elapsed-time starttime (current-time)) + ;;(when (> (semantic-elapsed-time starttime nil) ;; semantic-lex-timeout) ;; (error "Timeout during lex at char %d" (point))) (semantic-throw-on-input 'lex) diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index b9124d80d51..2f38d357804 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -45,7 +45,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) (require 'semantic) (require 'eieio-base) (require 'ring) @@ -166,7 +165,6 @@ We can't use the built-in ring data structure because we need to delete some items from the ring when we don't have the data.") (defvar semantic-mru-bookmark-ring (semantic-bookmark-ring - "Ring" :ring (make-ring 20)) "The MRU bookmark ring. This ring tracks the most recent active tags of interest.") @@ -254,8 +252,7 @@ been edited, and you can re-visit them with \\[semantic-mrub-switch-tags]." ;;;###autoload (define-minor-mode global-semantic-mru-bookmark-mode - "Toggle global use of option `semantic-mru-bookmark-mode'. -If ARG is positive or nil, enable, if it is negative, disable." + "Toggle global use of option `semantic-mru-bookmark-mode'." :global t :group 'semantic :group 'semantic-modes ;; Not needed because it's autoloaded instead. ;; :require 'semantic-util-modes @@ -280,10 +277,9 @@ been edited, and you can re-visit them with \\[semantic-mrub-switch-tags]. \\{semantic-mru-bookmark-mode-map} -With prefix argument ARG, turn on if positive, otherwise off. The -minor mode can be turned on only if semantic feature is available and -the current buffer was set up for parsing. Return non-nil if the -minor mode is enabled." +The minor mode can be turned on only if semantic feature is +available and the current buffer was set up for parsing. Return +non-nil if the minor mode is enabled." :keymap semantic-mru-bookmark-mode-map (if semantic-mru-bookmark-mode (if (not (and (featurep 'semantic) (semantic-active-p))) diff --git a/lisp/cedet/semantic/sb.el b/lisp/cedet/semantic/sb.el index e4471be9aba..6227ac618a9 100644 --- a/lisp/cedet/semantic/sb.el +++ b/lisp/cedet/semantic/sb.el @@ -298,11 +298,7 @@ TEXT TOKEN and INDENT are the details." "Jump to the location specified in token. TEXT TOKEN and INDENT are the details." (let ((file - (or - (cond ((fboundp 'speedbar-line-path) - (speedbar-line-directory indent)) - ((fboundp 'speedbar-line-directory) - (speedbar-line-directory indent))) + (or (speedbar-line-directory indent) ;; If speedbar cannot figure this out, extract the filename from ;; the token. True for Analysis mode. (semantic-tag-file-name token))) diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el index ddb6185a4e9..e0851d309b9 100644 --- a/lisp/cedet/semantic/scope.el +++ b/lisp/cedet/semantic/scope.el @@ -309,7 +309,7 @@ are from nesting data types." (list searchname))) (fullsearchname nil) - (miniscope (semantic-scope-cache "mini")) + (miniscope (semantic-scope-cache)) ptag) ;; Find the next entry in the referenced type for @@ -368,7 +368,7 @@ and PROTECTION is the level of protection offered by the relationship. Optional SCOPETYPES are additional scoped entities in which our parent might be found." (let ((lineage nil) - (miniscope (semantic-scope-cache "mini")) + (miniscope (semantic-scope-cache)) ) (oset miniscope parents parents) (oset miniscope scope scopetypes) @@ -644,7 +644,7 @@ whose tags can be searched when needed, OR it may be a scope object." ;; We need to make a mini scope, and only include the misc bits ;; that will help in finding the parent. We don't really need ;; to do any of the stuff related to variables and what-not. - (setq tmpscope (semantic-scope-cache "mini")) + (setq tmpscope (semantic-scope-cache)) (let* ( ;; Step 1: (scopetypes (cons type (semantic-analyze-scoped-types (point)))) (parents (semantic-analyze-scope-nested-tags (point) scopetypes)) diff --git a/lisp/cedet/semantic/symref/filter.el b/lisp/cedet/semantic/symref/filter.el index 99a629319da..5d166699533 100644 --- a/lisp/cedet/semantic/symref/filter.el +++ b/lisp/cedet/semantic/symref/filter.el @@ -103,7 +103,7 @@ tag that contains point, and return that." (when (called-interactively-p 'interactive) (message "Found %d occurrences of %s in %.2f seconds" Lcount (semantic-tag-name target) - (semantic-elapsed-time start (current-time)))) + (semantic-elapsed-time start nil))) Lcount))) (defun semantic-symref-rename-local-variable () diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el index 3653aa9a1e9..caac757d512 100644 --- a/lisp/cedet/semantic/symref/grep.el +++ b/lisp/cedet/semantic/symref/grep.el @@ -173,14 +173,16 @@ This shell should support pipe redirect syntax." ;; find . -type f -print0 | xargs -0 -e grep -nH -e ;; Note : I removed -e as it is not posix, nor necessary it seems. - (let ((cmd (concat "find " default-directory " -type f " filepattern " -print0 " + (let ((cmd (concat "find " (file-local-name rootdir) + " -type f " filepattern " -print0 " "| xargs -0 grep -H " grepflags "-e " greppat))) ;;(message "Old command: %s" cmd) - (call-process semantic-symref-grep-shell nil b nil + (process-file semantic-symref-grep-shell nil b nil shell-command-switch cmd) ) - (let ((cmd (semantic-symref-grep-use-template rootdir filepattern grepflags greppat))) - (call-process semantic-symref-grep-shell nil b nil + (let ((cmd (semantic-symref-grep-use-template + (file-local-name rootdir) filepattern grepflags greppat))) + (process-file semantic-symref-grep-shell nil b nil shell-command-switch cmd)) )) (setq ans (semantic-symref-parse-tool-output tool b)) diff --git a/lisp/cedet/semantic/symref/list.el b/lisp/cedet/semantic/symref/list.el index 007e86c77d6..50aa5c5740b 100644 --- a/lisp/cedet/semantic/symref/list.el +++ b/lisp/cedet/semantic/symref/list.el @@ -114,7 +114,7 @@ Display the references in `semantic-symref-results-mode'." (define-key km "+" 'semantic-symref-list-toggle-showing) (define-key km "n" 'semantic-symref-list-next-line) (define-key km "p" 'semantic-symref-list-prev-line) - (define-key km "q" 'semantic-symref-hide-buffer) + (define-key km "q" 'quit-window) (define-key km "\C-c\C-e" 'semantic-symref-list-expand-all) (define-key km "\C-c\C-r" 'semantic-symref-list-contract-all) (define-key km "R" 'semantic-symref-list-rename-open-hits) @@ -193,11 +193,6 @@ Display the references in `semantic-symref-results-mode'." (set (make-local-variable 'font-lock-global-modes) nil) (font-lock-mode -1)) -(defun semantic-symref-hide-buffer () - "Hide buffer with semantic-symref results." - (interactive) - (bury-buffer)) - (defcustom semantic-symref-results-summary-function 'semantic-format-tag-prototype "Function to use when creating items in Imenu. Some useful functions are found in `semantic-format-tag-functions'." diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el index f07ab2636e0..f079bf201c8 100644 --- a/lisp/cedet/semantic/texi.el +++ b/lisp/cedet/semantic/texi.el @@ -365,6 +365,8 @@ Optional argument POINT is where to look for the environment." (eval-when-compile (require 'semantic/analyze)) +(declare-function semantic-analyze-context "semantic/analyze") + (define-mode-local-override semantic-analyze-current-context texinfo-mode (point) "Analysis context makes no sense for texinfo. Return nil." @@ -376,7 +378,6 @@ Optional argument POINT is where to look for the environment." (when prefix (require 'semantic/analyze) (semantic-analyze-context - "Context-for-texinfo" :buffer (current-buffer) :scope nil :bounds bounds diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el index 39885627fb9..69df671217d 100644 --- a/lisp/cedet/semantic/util-modes.el +++ b/lisp/cedet/semantic/util-modes.el @@ -170,8 +170,7 @@ too an interactive function used to toggle the mode." ;;;###autoload (define-minor-mode global-semantic-highlight-edits-mode - "Toggle global use of option `semantic-highlight-edits-mode'. -If ARG is positive or nil, enable, if it is negative, disable." + "Toggle global use of option `semantic-highlight-edits-mode'." :global t :group 'semantic :group 'semantic-modes (semantic-toggle-minor-mode-globally 'semantic-highlight-edits-mode @@ -209,10 +208,10 @@ Changes are tracked by semantic so that the incremental parser can work properly. This mode will highlight those changes as they are made, and clear them when the incremental parser accounts for those edits. -With prefix argument ARG, turn on if positive, otherwise off. The -minor mode can be turned on only if semantic feature is available and -the current buffer was set up for parsing. Return non-nil if the -minor mode is enabled." + +The minor mode can be turned on only if semantic feature is +available and the current buffer was set up for parsing. Return +non-nil if the minor mode is enabled." :keymap semantic-highlight-edits-mode-map (if semantic-highlight-edits-mode (if (not (and (featurep 'semantic) (semantic-active-p))) @@ -237,8 +236,7 @@ minor mode is enabled." ;;;###autoload (define-minor-mode global-semantic-show-unmatched-syntax-mode - "Toggle global use of option `semantic-show-unmatched-syntax-mode'. -If ARG is positive or nil, enable, if it is negative, disable." + "Toggle global use of option `semantic-show-unmatched-syntax-mode'." :global t :group 'semantic :group 'semantic-modes ;; Not needed because it's autoloaded instead. ;; :require 'semantic/util-modes @@ -360,10 +358,9 @@ parser rules. These text characters are considered unmatched syntax. Often time, the display of unmatched syntax can expose coding problems before the compiler is run. -With prefix argument ARG, turn on if positive, otherwise off. The -minor mode can be turned on only if semantic feature is available and -the current buffer was set up for parsing. Return non-nil if the -minor mode is enabled. +The minor mode can be turned on only if semantic feature is +available and the current buffer was set up for parsing. Return +non-nil if the minor mode is enabled. \\{semantic-show-unmatched-syntax-mode-map}" :keymap semantic-show-unmatched-syntax-mode-map @@ -410,8 +407,7 @@ minor mode is enabled. ;;;###autoload (define-minor-mode global-semantic-show-parser-state-mode - "Toggle global use of option `semantic-show-parser-state-mode'. -If ARG is positive or nil, enable, if it is negative, disable." + "Toggle global use of option `semantic-show-parser-state-mode'." :global t :group 'semantic ;; Not needed because it's autoloaded instead. ;; :require 'semantic/util-modes @@ -440,10 +436,10 @@ The state is indicated in the modeline with the following characters: `~' -> The cache needs to be incrementally parsed. `%' -> The cache is not currently parsable. `@' -> Auto-parse in progress (not set here.) -With prefix argument ARG, turn on if positive, otherwise off. The -minor mode can be turned on only if semantic feature is available and -the current buffer was set up for parsing. Return non-nil if the -minor mode is enabled." + +The minor mode can be turned on only if semantic feature is +available and the current buffer was set up for parsing. Return +non-nil if the minor mode is enabled." :keymap semantic-show-parser-state-mode-map (if semantic-show-parser-state-mode (if (not (and (featurep 'semantic) (semantic-active-p))) @@ -557,8 +553,7 @@ to indicate a parse in progress." ;;;###autoload (define-minor-mode global-semantic-stickyfunc-mode - "Toggle global use of option `semantic-stickyfunc-mode'. -If ARG is positive or nil, enable, if it is negative, disable." + "Toggle global use of option `semantic-stickyfunc-mode'." :global t :group 'semantic :group 'semantic-modes ;; Not needed because it's autoloaded instead. ;; :require 'semantic/util-modes @@ -700,10 +695,9 @@ A function (or other tag class specified by first line which describes the rest of the construct. This first line is what is displayed in the header line. -With prefix argument ARG, turn on if positive, otherwise off. The -minor mode can be turned on only if semantic feature is available and -the current buffer was set up for parsing. Return non-nil if the -minor mode is enabled." +The minor mode can be turned on only if semantic feature is +available and the current buffer was set up for parsing. Return +non-nil if the minor mode is enabled." ;; Don't need indicator. It's quite visible :keymap semantic-stickyfunc-mode-map (if semantic-stickyfunc-mode @@ -837,8 +831,7 @@ Argument EVENT describes the event that caused this function to be called." ;;;###autoload (define-minor-mode global-semantic-highlight-func-mode - "Toggle global use of option `semantic-highlight-func-mode'. -If ARG is positive or nil, enable, if it is negative, disable." + "Toggle global use of option `semantic-highlight-func-mode'." :global t :group 'semantic :group 'semantic-modes ;; Not needed because it's autoloaded instead. ;; :require 'semantic/util-modes @@ -933,10 +926,9 @@ See `semantic-stickyfunc-mode' for putting a function in the header line. This mode recycles the stickyfunc configuration classes list. -With prefix argument ARG, turn on if positive, otherwise off. The -minor mode can be turned on only if semantic feature is available and -the current buffer was set up for parsing. Return non-nil if the -minor mode is enabled." +The minor mode can be turned on only if semantic feature is +available and the current buffer was set up for parsing. Return +non-nil if the minor mode is enabled." :lighter nil ;; Don't need indicator. It's quite visible. (if semantic-highlight-func-mode (progn diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el index 6b13c41cfe2..943f9c78ef0 100644 --- a/lisp/cedet/semantic/util.el +++ b/lisp/cedet/semantic/util.el @@ -54,6 +54,8 @@ Equivalent modes share a parser, and a set of override methods. A value of nil means that the current major mode is the only one.") (make-variable-buffer-local 'semantic-equivalent-major-modes) +(declare-function semanticdb-file-stream "semantic/db" (file)) + ;; These semanticdb calls will throw warnings in the byte compiler. ;; Doing the right thing to make them available at compile time ;; really messes up the compilation sequence. @@ -80,6 +82,11 @@ If FILE is not loaded, and semanticdb is not available, find the file (semantic-alias-obsolete 'semantic-file-token-stream 'semantic-file-tag-table "23.2") +(declare-function semanticdb-abstract-table-child-p "semantic/db" (obj) t) +(declare-function semanticdb-refresh-table "semantic/db") +(declare-function semanticdb-get-tags "semantic/db" (arg &rest args) t) +(declare-function semanticdb-find-results-p "semantic/db-find" (resultp)) + (defun semantic-something-to-tag-table (something) "Convert SOMETHING into a semantic tag table. Something can be a tag with a valid BUFFER property, a tag table, a @@ -140,6 +147,11 @@ buffer, or a filename. If SOMETHING is nil return nil." (defvar semantic-read-symbol-history nil "History for a symbol read.") +(declare-function semantic-brute-find-tag-by-function + "semantic/find" + (function streamorbuffer + &optional search-parts search-includes)) + (defun semantic-read-symbol (prompt &optional default stream filter) "Read a symbol name from the user for the current buffer. PROMPT is the prompt to use. @@ -154,6 +166,7 @@ FILTER must be a function to call on each element." (setq stream (if filter (semantic--find-tags-by-function filter stream) + (require 'semantic/find) (semantic-brute-find-tag-standard stream))) (if (and default (string-match ":" prompt)) (setq prompt @@ -367,6 +380,11 @@ NOTFIRST indicates that this was not the first call in the recursive use." ;; Symbol completion +(declare-function semanticdb-fast-strip-find-results + "semantic/db-find" (results)) +(declare-function semanticdb-deep-find-tags-for-completion + "semantic/db-find" (prefix &optional path find-file-match)) + (defun semantic-find-tag-for-completion (prefix) "Find all tags with name starting with PREFIX. This uses `semanticdb' when available." diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index 4f6f5b02ba4..db910b1424e 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -41,7 +41,7 @@ ;;; Code: (require 'semantic/wisent) -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) ;;;; ------------------- ;;;; Misc. useful things @@ -139,14 +139,7 @@ If optional LEFT is non-nil insert spaces on left." ;;;; Environment dependencies ;;;; ------------------------ -(defconst wisent-BITS-PER-WORD - (let ((i 1) - (do-shift (if (boundp 'most-positive-fixnum) - (lambda (i) (lsh most-positive-fixnum (- i))) - (lambda (i) (lsh 1 i))))) - (while (not (zerop (funcall do-shift i))) - (setq i (1+ i))) - i)) +(defconst wisent-BITS-PER-WORD (logcount most-positive-fixnum)) (defsubst wisent-WORDSIZE (n) "(N + BITS-PER-WORD - 1) / BITS-PER-WORD." @@ -156,18 +149,18 @@ If optional LEFT is non-nil insert spaces on left." "X[I/BITS-PER-WORD] |= 1 << (I % BITS-PER-WORD)." (let ((k (/ i wisent-BITS-PER-WORD))) (aset x k (logior (aref x k) - (lsh 1 (% i wisent-BITS-PER-WORD)))))) + (ash 1 (% i wisent-BITS-PER-WORD)))))) (defsubst wisent-RESETBIT (x i) "X[I/BITS-PER-WORD] &= ~(1 << (I % BITS-PER-WORD))." (let ((k (/ i wisent-BITS-PER-WORD))) (aset x k (logand (aref x k) - (lognot (lsh 1 (% i wisent-BITS-PER-WORD))))))) + (lognot (ash 1 (% i wisent-BITS-PER-WORD))))))) (defsubst wisent-BITISSET (x i) "(X[I/BITS-PER-WORD] & (1 << (I % BITS-PER-WORD))) != 0." (not (zerop (logand (aref x (/ i wisent-BITS-PER-WORD)) - (lsh 1 (% i wisent-BITS-PER-WORD)))))) + (ash 1 (% i wisent-BITS-PER-WORD)))))) (defsubst wisent-noninteractive () "Return non-nil if running without interactive terminal." @@ -203,11 +196,11 @@ If optional LEFT is non-nil insert spaces on left." (defmacro wisent-log-buffer () "Return the log buffer. Its name is defined in constant `wisent-log-buffer-name'." - `(get-buffer-create wisent-log-buffer-name)) + '(get-buffer-create wisent-log-buffer-name)) (defmacro wisent-clear-log () "Delete the entire contents of the log buffer." - `(with-current-buffer (wisent-log-buffer) + '(with-current-buffer (wisent-log-buffer) (erase-buffer))) (defvar byte-compile-current-file) @@ -2906,7 +2899,7 @@ references found in BODY, and XBODY is BODY expression with (progn (if (wisent-check-$N body n) ;; Accumulate $i symbol - (pushnew body found :test #'equal)) + (cl-pushnew body found :test #'equal)) (cons found body)) ;; BODY is a list, expand inside it (let (xbody sexpr) @@ -2926,7 +2919,7 @@ references found in BODY, and XBODY is BODY expression with ;; $i symbol ((wisent-check-$N sexpr n) ;; Accumulate $i symbol - (pushnew sexpr found :test #'equal)) + (cl-pushnew sexpr found :test #'equal)) ) ;; Accumulate expanded forms (setq xbody (nconc xbody (list sexpr)))) diff --git a/lisp/cedet/semantic/wisent/grammar.el b/lisp/cedet/semantic/wisent/grammar.el index d51e3f33113..7d776712eb4 100644 --- a/lisp/cedet/semantic/wisent/grammar.el +++ b/lisp/cedet/semantic/wisent/grammar.el @@ -194,7 +194,7 @@ See also the function `wisent-skip-block'." "Expand call to SKIP-TOKEN grammar macro. Return the form to skip the lookahead token. See also the function `wisent-skip-token'." - `(wisent-skip-token)) + '(wisent-skip-token)) (defun wisent-grammar-assocs () "Return associativity and precedence level definitions." diff --git a/lisp/cedet/semantic/wisent/python.el b/lisp/cedet/semantic/wisent/python.el index 1edbc05a3a9..c530329baed 100644 --- a/lisp/cedet/semantic/wisent/python.el +++ b/lisp/cedet/semantic/wisent/python.el @@ -41,9 +41,6 @@ (require 'semantic/ctxt) (require 'semantic/format) -(eval-when-compile - (require 'cl)) - ;;; Customization ;; @@ -358,7 +355,7 @@ Set attributes for constructors, special, private and static methods." ;; + first argument is self (when (and (> (length (semantic-tag-function-arguments tag)) 0) (string= (semantic-tag-name - (first (semantic-tag-function-arguments tag))) + (car (semantic-tag-function-arguments tag))) "self")) (semantic-tag-put-attribute tag :parent "dummy")) |