From a89738531bf9c37293d4d2fdfcf52fa660abd19c Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 14 Aug 2020 13:40:29 +0200 Subject: [PATCH] Remove cedet items obsolete since 23.2 * lisp/cedet/semantic.el (semantic-toplevel-bovine-table) (semantic-toplevel-bovine-cache) (semantic-before-toplevel-bovination-hook) (semantic-after-toplevel-bovinate-hook, semantic-init-hooks) (semantic-init-mode-hooks, semantic-init-db-hooks) (semantic-bovination-working-type, semantic-bovinate-toplevel) (semantic-bovinate-region-until-error) (semantic-bovinate-from-nonterminal-full): * lisp/cedet/semantic/db-mode.el (semanticdb-mode-hooks): * lisp/cedet/semantic/decorate/mode.el (semantic-decorate-pending-decoration-hooks): * lisp/cedet/semantic/edit.el (semantic-edits-incremental-reparse-failed-hooks): * lisp/cedet/semantic/fw.el (define-mode-overload-implementation): * lisp/cedet/semantic/idle.el (semantic-before-idle-scheduler-reparse-hooks) (semantic-after-idle-scheduler-reparse-hooks): (semantic-eldoc-current-symbol-info) * lisp/cedet/semantic/imenu.el (semantic-imenu-expand-type-parts) (semantic-imenu-bucketize-type-parts) (semantic-imenu-expandable-token): * lisp/cedet/semantic/java.el (semantic-java-prototype-nonterminal): * lisp/cedet/semantic/lex.el (semantic-flex-token-start) (semantic-flex-token-end, semantic-flex-token-text) (semantic-flex-make-keyword-table, semantic-flex-keyword-p) (semantic-flex-keyword-put, semantic-flex-keyword-get) (semantic-flex-map-keywords, semantic-flex-keywords) (semantic-flex-buffer, semantic-flex-list, semantic-flex): * lisp/cedet/semantic/tag-file.el (semantic-find-nonterminal) (semantic-find-dependency): * lisp/cedet/semantic/tag-ls.el (semantic-nonterminal-full-name) (semantic-nonterminal-protection, semantic-nonterminal-abstract) (semantic-nonterminal-leaf): * lisp/cedet/semantic/tag.el (semantic-token-type-parent) (semantic-tag-make-assoc-list, semantic-expand-nonterminal): * lisp/cedet/semantic/util.el (semantic-file-token-stream) (semantic-something-to-stream): * lisp/cedet/semantic/wisent.el (wisent-lex-make-token-table): Delete many items obsolete since Emacs 23.2. * lisp/cedet/semantic.el (semantic--set-buffer-cache) (semantic-fetch-tags): Don't run removed hooks 'semantic-after-toplevel-bovinate-hook' and 'semantic-before-toplevel-bovination-hook'. * lisp/cedet/semantic/bovine/el.el: Remove reference to obsolete variable 'define-mode-overload-implementation'. * lisp/cedet/semantic/doc.el (semantic-doc-snarf-comment-for-tag): Don't bind removed variable 'semantic-ignore-comments'. * lisp/cedet/semantic/fw.el (semantic-overload-symbol-from-function) (semantic-alias-obsolete, semantic-varalias-obsolete): Declare obsolete in favor of standard Emacs 'define-obsolete-*-alias'. * lisp/cedet/semantic/grammar.el (semantic-grammar-ASSOC): Don't use obsolete names. * lisp/cedet/semantic/tag-ls.el (semantic-tag-full-package) (semantic-tag-full-name): Doc fixes. * lisp/cedet/semantic/util.el (semantic-describe-buffer): Don't bind removed variable 'semantic-after-toplevel-bovinate-hook'. * lisp/cedet/semantic/lex.el (semantic-flex-tokens) (semantic-flex-unterminated-syntax-end-function) (semantic-flex-extensions, semantic-flex-syntax-modifications) (semantic-ignore-comments, semantic-flex-enable-newlines) (semantic-flex-enable-whitespace, semantic-flex-enable-bol) (semantic-number-expression, semantic-flex-depth): Make unused variables obsolete. ; * etc/NEWS: List removed items. --- etc/NEWS | 33 +++- lisp/cedet/semantic.el | 79 +-------- lisp/cedet/semantic/bovine/el.el | 1 - lisp/cedet/semantic/db-mode.el | 4 - lisp/cedet/semantic/decorate/mode.el | 3 - lisp/cedet/semantic/doc.el | 3 +- lisp/cedet/semantic/edit.el | 3 - lisp/cedet/semantic/fw.el | 13 +- lisp/cedet/semantic/grammar.el | 2 +- lisp/cedet/semantic/idle.el | 9 -- lisp/cedet/semantic/imenu.el | 6 - lisp/cedet/semantic/java.el | 3 - lisp/cedet/semantic/lex.el | 231 ++------------------------- lisp/cedet/semantic/tag-file.el | 13 -- lisp/cedet/semantic/tag-ls.el | 16 +- lisp/cedet/semantic/tag.el | 20 --- lisp/cedet/semantic/util.el | 7 - lisp/cedet/semantic/wisent.el | 5 - 18 files changed, 53 insertions(+), 398 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e0ea8f53cc..13e145cec1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1146,8 +1146,8 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el. 'completion-base-size', 'completion-common-substring', 'crm-minibuffer-complete', 'crm-minibuffer-complete-and-exit', 'crm-minibuffer-completion-help', 'custom-mode', 'custom-mode-hook', -'detect-coding-with-priority', 'dirtrack-debug', -'dirtrack-debug-toggle', 'dynamic-completion-table', +'define-mode-overload-implementation', 'detect-coding-with-priority', +'dirtrack-debug', 'dirtrack-debug-toggle', 'dynamic-completion-table', 'easy-menu-precalculate-equivalent-keybindings', 'epa-display-verify-result', 'epg-passphrase-callback-function', 'eshell-report-bug', 'eval-next-after-load', 'exchange-dot-and-mark', @@ -1167,13 +1167,40 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el. 'pre-abbrev-expand-hook', 'princ-list', 'print-help-return-message', 'process-filter-multibyte-p', 'read-file-name-predicate', 'remember-buffer', 'rmail-highlight-face', 'rmail-message-filter', +'semantic-after-idle-scheduler-reparse-hooks', +'semantic-after-toplevel-bovinate-hook', +'semantic-before-idle-scheduler-reparse-hooks', +'semantic-before-toplevel-bovination-hook', +'semantic-bovinate-from-nonterminal-full', +'semantic-bovinate-region-until-error', 'semantic-bovinate-toplevel', +'semantic-bovination-working-type', +'semantic-decorate-pending-decoration-hooks', +'semantic-edits-incremental-reparse-failed-hooks', +'semantic-eldoc-current-symbol-info', 'semantic-expand-nonterminal', +'semantic-file-token-stream', 'semantic-find-dependency', +'semantic-find-nonterminal', 'semantic-flex', 'semantic-flex-buffer', +'semantic-flex-keyword-get', 'semantic-flex-keyword-p', +'semantic-flex-keyword-put', 'semantic-flex-keywords', +'semantic-flex-list', 'semantic-flex-make-keyword-table', +'semantic-flex-map-keywords', 'semantic-flex-token-end', +'semantic-flex-token-start', 'semantic-flex-token-text', +'semantic-imenu-bucketize-type-parts', +'semantic-imenu-expand-type-parts', 'semantic-imenu-expandable-token', +'semantic-init-db-hooks)', 'semantic-init-hooks', +'semantic-init-mode-hooks', 'semantic-java-prototype-nonterminal', +'semantic-nonterminal-abstract', 'semantic-nonterminal-full-name', +'semantic-nonterminal-leaf', 'semantic-nonterminal-protection', +'semantic-something-to-stream', 'semantic-tag-make-assoc-list', +'semantic-token-type-parent', 'semantic-toplevel-bovine-cache', +'semantic-toplevel-bovine-table', 'semanticdb-mode-hooks', 'set-coding-priority', 'set-process-filter-multibyte', 'shadows-compare-text-p', 'shell-dirtrack-toggle', 't-mouse-mode', 'term-dynamic-simple-complete', 'tooltip-hook', 'tpu-have-ispell', 'url-generate-unique-filename', 'url-temporary-directory', 'vc-arch-command', 'vc-default-working-revision' (variable), 'vc-mtn-command', 'vc-revert-buffer', 'vc-workfile-version', -'vcursor-toggle-vcursor-map', 'w32-focus-frame', 'w32-select-font'. +'vcursor-toggle-vcursor-map', 'w32-focus-frame', 'w32-select-font', +'wisent-lex-make-token-table'. * Lisp Changes in Emacs 28.1 diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el index 58a35d7d8a..71321e12da 100644 --- a/lisp/cedet/semantic.el +++ b/lisp/cedet/semantic.el @@ -82,8 +82,6 @@ semantic--parse-table This variable is for internal use only, and its content depends on the external parser used.") (make-variable-buffer-local 'semantic--parse-table) -(semantic-varalias-obsolete 'semantic-toplevel-bovine-table - 'semantic--parse-table "23.2") (defvar semantic-symbol->name-assoc-list '((type . "Types") @@ -112,17 +110,6 @@ semantic-case-fold "Value for `case-fold-search' when parsing.") (make-variable-buffer-local 'semantic-case-fold) -(defvar semantic-expand-nonterminal nil - "Function to call for each nonterminal production. -Return a list of non-terminals derived from the first argument, or nil -if it does not need to be expanded. -Languages with compound definitions should use this function to expand -from one compound symbol into several. For example, in C the definition - int a, b; -is easily parsed into one tag. This function should take this -compound tag and turn it into two tags, one for A, and the other for B.") -(make-variable-buffer-local 'semantic-expand-nonterminal) - (defvar semantic--buffer-cache nil "A cache of the fully parsed buffer. If no significant changes have been made (based on the state) then @@ -134,8 +121,6 @@ semantic--buffer-cache cached values for some reason, chances are you can add a hook to `semantic-after-toplevel-cache-change-hook'.") (make-variable-buffer-local 'semantic--buffer-cache) -(semantic-varalias-obsolete 'semantic-toplevel-bovine-cache - 'semantic--buffer-cache "23.2") (defvar semantic-unmatched-syntax-cache nil "A cached copy of unmatched syntax tokens.") @@ -171,18 +156,6 @@ semantic--before-fetch-tags-hook `semantic-fetch-tags' by an application. If any hook returns a nil value, the cached value is returned immediately, even if it is empty.") -(semantic-varalias-obsolete 'semantic-before-toplevel-bovination-hook - 'semantic--before-fetch-tags-hook "23.2") - -(defvar semantic-after-toplevel-bovinate-hook nil - "Hooks run after a toplevel parse. -It is not run if the toplevel parse command is called, and buffer does -not need to be fully reparsed. -For language specific hooks, make sure you define this as a local hook. - -This hook should not be used any more. -Use `semantic-after-toplevel-cache-change-hook' instead.") -(make-obsolete-variable 'semantic-after-toplevel-bovinate-hook nil "23.2") (defvar semantic-after-toplevel-cache-change-hook nil "Hooks run after the buffer tag list has changed. @@ -305,13 +278,6 @@ semantic-init-db-hook This guarantees that the DB will go before other modes that require a parse of the buffer.") -(semantic-varalias-obsolete 'semantic-init-hooks - 'semantic-init-hook "23.2") -(semantic-varalias-obsolete 'semantic-init-mode-hooks - 'semantic-init-mode-hook "23.2") -(semantic-varalias-obsolete 'semantic-init-db-hooks - 'semantic-init-db-hook "23.2") - (defsubst semantic-error-if-unparsed () "Raise an error if current buffer was not parsed by Semantic." (unless semantic-new-buffer-fcn-was-run @@ -516,8 +482,6 @@ semantic-clear-toplevel-cache (semantic-parse-tree-set-needs-rebuild) ;; Remove this hook which tracks if a buffer is up to date or not. (remove-hook 'after-change-functions 'semantic-change-function t) - ;; Old model. Delete someday. - ;;(run-hooks 'semantic-after-toplevel-bovinate-hook) (run-hook-with-args 'semantic-after-toplevel-cache-change-hook semantic--buffer-cache) @@ -540,17 +504,12 @@ semantic--set-buffer-cache (setq semantic--completion-cache nil) ;; Refresh the display of unmatched syntax tokens if enabled (run-hook-with-args 'semantic-unmatched-syntax-hook - semantic-unmatched-syntax-cache) - ;; Old Semantic 1.3 hook API. Maybe useful forever? - (run-hooks 'semantic-after-toplevel-bovinate-hook) - ) + semantic-unmatched-syntax-cache)) (defvar semantic-working-type 'percent "The type of working message to use when parsing. 'percent means we are doing a linear parse through the buffer. 'dynamic means we are reparsing specific tags.") -(semantic-varalias-obsolete 'semantic-bovination-working-type - 'semantic-working-type "23.2") (defvar semantic-minimum-working-buffer-size (* 1024 5) "The minimum size of a buffer before working messages are displayed. @@ -585,8 +544,6 @@ semantic-fetch-tags ;; Is this a semantic enabled buffer? (semantic-active-p) ;; Application hooks say the buffer is safe for parsing - (run-hook-with-args-until-failure - 'semantic-before-toplevel-bovination-hook) (run-hook-with-args-until-failure 'semantic--before-fetch-tags-hook) ;; If the buffer was previously marked unparseable, @@ -690,11 +647,6 @@ semantic-refresh-tags-safe ;; Return if we are lexically safe lexically-safe)))) -(defun semantic-bovinate-toplevel (&optional ignored) - "Backward compatibility function." - (semantic-fetch-tags)) -(make-obsolete 'semantic-bovinate-toplevel 'semantic-fetch-tags "23.2") - ;; Another approach is to let Emacs call the parser on idle time, when ;; needed, use `semantic-fetch-available-tags' to only retrieve ;; available tags, and setup the `semantic-after-*-hook' hooks to @@ -812,20 +764,6 @@ semantic-dump-parser-warnings ;; Please move away from these functions, and try using semantic 2.x ;; interfaces instead. ;; -(defsubst semantic-bovinate-region-until-error - (start end nonterm &optional depth) - "NOTE: Use `semantic-parse-region' instead. - -Bovinate between START and END starting with NONTERM. -Optional DEPTH specifies how many levels of parenthesis to enter. -This command will parse until an error is encountered, and return -the list of everything found until that moment. -This is meant for finding variable definitions at the beginning of -code blocks in methods. If `bovine-inner-scope' can also support -commands, use `semantic-bovinate-from-nonterminal-full'." - (semantic-parse-region start end nonterm depth t)) -(make-obsolete 'semantic-bovinate-region-until-error - 'semantic-parse-region "23.2") (defsubst semantic-bovinate-from-nonterminal (start end nonterm &optional depth length) @@ -840,21 +778,6 @@ semantic-bovinate-from-nonterminal (semantic-lex start end (or depth 1) length) nonterm)))) -(defsubst semantic-bovinate-from-nonterminal-full - (start end nonterm &optional depth) - "NOTE: Use `semantic-parse-region' instead. - -Bovinate from within a nonterminal lambda from START to END. -Iterates until all the space between START and END is exhausted. -Argument NONTERM is the nonterminal symbol to start with. -If NONTERM is nil, use `bovine-block-toplevel'. -Optional argument DEPTH is the depth of lists to dive into. -When used in a `lambda' of a MATCH-LIST, there is no need to include -a START and END part." - (semantic-parse-region start end nonterm (or depth 1))) -(make-obsolete 'semantic-bovinate-from-nonterminal-full - 'semantic-parse-region "23.2") - ;;; User interface (defun semantic-force-refresh () diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el index 656c63b7ee..822ec176a3 100644 --- a/lisp/cedet/semantic/bovine/el.el +++ b/lisp/cedet/semantic/bovine/el.el @@ -420,7 +420,6 @@ semantic-elisp-use-read :parent (symbol-name (nth 2 form)) :documentation (semantic-elisp-do-doc (nth 4 form)) ))) - define-mode-overload-implementation ;; obsoleted define-mode-local-override ) diff --git a/lisp/cedet/semantic/db-mode.el b/lisp/cedet/semantic/db-mode.el index 0ab03ef49e..16a30b6cfb 100644 --- a/lisp/cedet/semantic/db-mode.el +++ b/lisp/cedet/semantic/db-mode.el @@ -69,10 +69,6 @@ global-semanticdb-minor-mode (dolist (elt semanticdb-hooks) (remove-hook (cadr elt) (car elt))))) -(semantic-varalias-obsolete 'semanticdb-mode-hooks - 'global-semanticdb-minor-mode-hook "23.2") - - (defun semanticdb-toggle-global-mode () "Toggle use of the Semantic Database feature. Update the environment of Semantic enabled buffers accordingly." diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el index 8eb6a3bbd5..293692000d 100644 --- a/lisp/cedet/semantic/decorate/mode.el +++ b/lisp/cedet/semantic/decorate/mode.el @@ -204,9 +204,6 @@ semantic-decorate-add-decorations (defvar semantic-decorate-pending-decoration-hook nil "Normal hook run to perform pending decoration changes.") -(semantic-varalias-obsolete 'semantic-decorate-pending-decoration-hooks - 'semantic-decorate-pending-decoration-hook "23.2") - (defun semantic-decorate-add-pending-decoration (fcn &optional buffer) "Add a pending decoration change represented by FCN. Applies only to the current BUFFER. diff --git a/lisp/cedet/semantic/doc.el b/lisp/cedet/semantic/doc.el index 8b39e77578..896bc3bb42 100644 --- a/lisp/cedet/semantic/doc.el +++ b/lisp/cedet/semantic/doc.el @@ -93,8 +93,7 @@ semantic-doc-snarf-comment-for-tag Attempt to strip out comment syntactic sugar. Argument NOSNARF means don't modify the found text. If NOSNARF is `lex', then return the lex token." - (let* ((semantic-ignore-comments nil) - (semantic-lex-analyzer #'semantic-comment-lexer)) + (let* ((semantic-lex-analyzer #'semantic-comment-lexer)) (if (memq nosnarf '(lex flex)) ;; keep `flex' for compatibility (car (semantic-lex (point) (1+ (point)))) (let ((ct (semantic-lex-token-text diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el index a1225dfeee..e4319c7d1b 100644 --- a/lisp/cedet/semantic/edit.el +++ b/lisp/cedet/semantic/edit.el @@ -121,9 +121,6 @@ semantic-edits-incremental-reparse-failed-hook "Hook run after the incremental parser fails. When this happens, the buffer is marked as needing a full reparse.") -(semantic-varalias-obsolete 'semantic-edits-incremental-reparse-failed-hooks - 'semantic-edits-incremental-reparse-failed-hook "23.2") - (defcustom semantic-edits-verbose-flag nil "Non-nil means the incremental parser is verbose. If nil, errors are still displayed, but informative messages are not." diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el index e347c99f19..c86cd3abf3 100644 --- a/lisp/cedet/semantic/fw.el +++ b/lisp/cedet/semantic/fw.el @@ -173,6 +173,7 @@ semantic-test-data-cache ;; (defun semantic-overload-symbol-from-function (name) "Return the symbol for overload used by NAME, the defined symbol." + (declare (obsolete define-obsolete-function-alias "28.1")) (let ((sym-name (symbol-name name))) (if (string-match "^semantic-" sym-name) (intern (substring sym-name (match-end 0))) @@ -182,6 +183,7 @@ semantic-alias-obsolete "Make OLDFNALIAS an alias for NEWFN. Mark OLDFNALIAS as obsolete, such that the byte compiler will throw a warning when it encounters this symbol." + (declare (obsolete define-obsolete-function-alias "28.1")) (defalias oldfnalias newfn) (make-obsolete oldfnalias newfn when) (when (and (mode-local--function-overload-p newfn) @@ -196,13 +198,14 @@ semantic-alias-obsolete "%s: `%s' obsoletes overload `%s'" byte-compile-current-file newfn - (semantic-overload-symbol-from-function oldfnalias)) - )) + (with-suppressed-warnings ((obsolete semantic-overload-symbol-from-function)) + (semantic-overload-symbol-from-function oldfnalias))))) (defun semantic-varalias-obsolete (oldvaralias newvar when) "Make OLDVARALIAS an alias for variable NEWVAR. Mark OLDVARALIAS as obsolete, such that the byte compiler will throw a warning when it encounters this symbol." + (declare (obsolete define-obsolete-variable-alias "28.1")) (make-obsolete-variable oldvaralias newvar when) (condition-case nil (defvaralias oldvaralias newvar) @@ -256,9 +259,6 @@ semantic-map-buffers (defalias 'semantic-map-mode-buffers 'mode-local-map-mode-buffers) -(semantic-alias-obsolete 'define-mode-overload-implementation - 'define-mode-local-override "23.2") - (defun semantic-install-function-overrides (overrides &optional transient) "Install the function OVERRIDES in the specified environment. OVERRIDES must be an alist ((OVERLOAD . FUNCTION) ...) where OVERLOAD @@ -396,13 +396,10 @@ semanticdb-without-unloaded-file-searches ;; "define-lex-regex-type-analyzer" ;; "define-lex-string-type-analyzer" ;; "define-lex-block-type-analyzer" -;; ;;"define-mode-overload-implementation" ;; ;;"define-semantic-child-mode" ;; "define-semantic-idle-service" ;; "define-semantic-decoration-style" ;; "define-wisent-lexer" -;; "semantic-alias-obsolete" -;; "semantic-varalias-obsolete" ;; "semantic-make-obsolete-overload" ;; "defcustom-mode-local-semantic-dependency-system-include-path" ;; )) diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index 6cd4832165..f71ac6c413 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -142,7 +142,7 @@ semantic-grammar-ASSOC "Return expansion of built-in ASSOC expression. ARGS are ASSOC's key value list." (let ((key t)) - `(semantic-tag-make-assoc-list + `(semantic-tag-make-plist ,@(mapcar #'(lambda (i) (prog1 (if key diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index 76218249c5..8301b19530 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el @@ -472,11 +472,6 @@ semantic-after-idle-scheduler-reparse-hook If any hook function throws an error, this variable is reset to nil. This hook is not protected from lexical errors.") -(semantic-varalias-obsolete 'semantic-before-idle-scheduler-reparse-hooks - 'semantic-before-idle-scheduler-reparse-hook "23.2") -(semantic-varalias-obsolete 'semantic-after-idle-scheduler-reparse-hooks - 'semantic-after-idle-scheduler-reparse-hook "23.2") - (defun semantic-idle-scheduler-refresh-tags () "Refreshes the current buffer's tags. This is called by `semantic-idle-scheduler-function' to update the @@ -734,10 +729,6 @@ semantic-idle-summary-useful-context-p (define-overloadable-function semantic-idle-summary-current-symbol-info () "Return a string message describing the current context.") -(make-obsolete-overload 'semantic-eldoc-current-symbol-info - 'semantic-idle-summary-current-symbol-info - "23.2") - (defcustom semantic-idle-summary-mode-hook nil "Hook run at the end of `semantic-idle-summary'." :group 'semantic diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el index cdf0a23fa0..25f7fdb842 100644 --- a/lisp/cedet/semantic/imenu.el +++ b/lisp/cedet/semantic/imenu.el @@ -88,8 +88,6 @@ semantic-imenu-expand-type-members :group 'semantic-imenu :type 'boolean) (make-variable-buffer-local 'semantic-imenu-expand-type-members) -(semantic-varalias-obsolete 'semantic-imenu-expand-type-parts - '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. @@ -98,8 +96,6 @@ semantic-imenu-bucketize-type-members :group 'semantic-imenu :type 'boolean) (make-variable-buffer-local 'semantic-imenu-bucketize-type-members) -(semantic-varalias-obsolete 'semantic-imenu-bucketize-type-parts - '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. @@ -145,8 +141,6 @@ semantic-imenu-expandable-tag-classes By default, a `type' has interesting children. In Texinfo, however, a `section' has interesting children.") (make-variable-buffer-local 'semantic-imenu-expandable-tag-classes) -(semantic-varalias-obsolete 'semantic-imenu-expandable-token - 'semantic-imenu-expandable-tag-classes "23.2") ;;; Code: (defun semantic-imenu-tag-overlay (tag) diff --git a/lisp/cedet/semantic/java.el b/lisp/cedet/semantic/java.el index 80d03dc629..2aa0ab0e3f 100644 --- a/lisp/cedet/semantic/java.el +++ b/lisp/cedet/semantic/java.el @@ -253,9 +253,6 @@ semantic-format-tag-prototype 'semantic-format-tag-prototype-default) tag parent color))) -(semantic-alias-obsolete 'semantic-java-prototype-nonterminal - 'semantic-format-tag-prototype-java-mode "23.2") - ;; Include Tag Name ;; diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index 500a09d492..cb17f9fd93 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el @@ -1754,29 +1754,11 @@ semantic-lex-catch-errors ;; ;; NOTE: DELETE THIS SOMEDAY SOON -(semantic-alias-obsolete 'semantic-flex-start 'semantic-lex-token-start "23.2") -(semantic-alias-obsolete 'semantic-flex-end 'semantic-lex-token-end "23.2") -(semantic-alias-obsolete 'semantic-flex-text 'semantic-lex-token-text "23.2") -(semantic-alias-obsolete 'semantic-flex-make-keyword-table 'semantic-lex-make-keyword-table "23.2") -(semantic-alias-obsolete 'semantic-flex-keyword-p 'semantic-lex-keyword-p "23.2") -(semantic-alias-obsolete 'semantic-flex-keyword-put 'semantic-lex-keyword-put "23.2") -(semantic-alias-obsolete 'semantic-flex-keyword-get 'semantic-lex-keyword-get "23.2") -(semantic-alias-obsolete 'semantic-flex-map-keywords 'semantic-lex-map-keywords "23.2") -(semantic-alias-obsolete 'semantic-flex-keywords 'semantic-lex-keywords "23.2") -(semantic-alias-obsolete 'semantic-flex-buffer 'semantic-lex-buffer "23.2") -(semantic-alias-obsolete 'semantic-flex-list 'semantic-lex-list "23.2") - -;; This simple scanner uses the syntax table to generate a stream of -;; simple tokens of the form: -;; -;; (SYMBOL START . END) -;; -;; Where symbol is the type of thing it is. START and END mark that -;; objects boundary. - (defvar semantic-flex-tokens semantic-lex-tokens "An alist of semantic token types. See variable `semantic-lex-tokens'.") +(make-obsolete-variable 'semantic-flex-tokens + 'semantic-lex-tokens "28.1") (defvar semantic-flex-unterminated-syntax-end-function (lambda (_syntax _syntax-start flex-end) flex-end) @@ -1788,6 +1770,8 @@ semantic-flex-unterminated-syntax-end-function This function can be used for languages that can intelligently fix up broken syntax, or the exit lexical analysis via `throw' or `signal' when finding unterminated syntax.") +(make-obsolete-variable 'semantic-flex-unterminated-syntax-end-function + nil "28.1") (defvar semantic-flex-extensions nil "Buffer local extensions to the lexical analyzer. @@ -1799,6 +1783,7 @@ semantic-flex-extensions TYPE can be any type of symbol, as long as it doesn't occur as a nonterminal in the language definition.") (make-variable-buffer-local 'semantic-flex-extensions) +(make-obsolete-variable 'semantic-flex-extensions nil "28.1") (defvar semantic-flex-syntax-modifications nil "Changes to the syntax table for this buffer. @@ -1809,237 +1794,47 @@ semantic-flex-syntax-modifications and CLASS is the string also passed to `modify-syntax-entry' to define what syntax class CHAR has.") (make-variable-buffer-local 'semantic-flex-syntax-modifications) +(make-obsolete-variable 'semantic-flex-syntax-modifications nil "28.1") (defvar semantic-ignore-comments t "Default comment handling. The value t means to strip comments when flexing; nil means to keep comments as part of the token stream.") (make-variable-buffer-local 'semantic-ignore-comments) +(make-obsolete-variable 'semantic-ignore-comments nil "28.1") (defvar semantic-flex-enable-newlines nil "When flexing, report newlines as syntactic elements. Useful for languages where the newline is a special case terminator. Only set this on a per mode basis, not globally.") (make-variable-buffer-local 'semantic-flex-enable-newlines) +(make-obsolete-variable 'semantic-flex-enable-newlines nil "28.1") (defvar semantic-flex-enable-whitespace nil "When flexing, report whitespace as syntactic elements. Useful for languages where the syntax is whitespace dependent. Only set this on a per mode basis, not globally.") (make-variable-buffer-local 'semantic-flex-enable-whitespace) +(make-obsolete-variable 'semantic-flex-enable-whitespace nil "28.1") (defvar semantic-flex-enable-bol nil "When flexing, report beginning of lines as syntactic elements. Useful for languages like python which are indentation sensitive. Only set this on a per mode basis, not globally.") (make-variable-buffer-local 'semantic-flex-enable-bol) +(make-obsolete-variable 'semantic-flex-enable-bol nil "28.1") (defvar semantic-number-expression semantic-lex-number-expression "See variable `semantic-lex-number-expression'.") (make-variable-buffer-local 'semantic-number-expression) +(make-obsolete-variable 'semantic-number-expression + 'semantic-lex-number-expression "28.1") (defvar semantic-flex-depth 0 "Default flexing depth. This specifies how many lists to create tokens in.") (make-variable-buffer-local 'semantic-flex-depth) - -(defun semantic-flex (start end &optional depth length) - "Using the syntax table, do something roughly equivalent to flex. -Semantically check between START and END. Optional argument DEPTH -indicates at what level to scan over entire lists. -The return value is a token stream. Each element is a list, such of -the form (symbol start-expression . end-expression) where SYMBOL -denotes the token type. -See `semantic-flex-tokens' variable for details on token types. -END does not mark the end of the text scanned, only the end of the -beginning of text scanned. Thus, if a string extends past END, the -end of the return token will be larger than END. To truly restrict -scanning, use `narrow-to-region'. -The last argument, LENGTH specifies that `semantic-flex' should only -return LENGTH tokens." - (declare (obsolete define-lex "23.2")) - (if (not semantic-flex-keywords-obarray) - (setq semantic-flex-keywords-obarray [ nil ])) - (let ((ts nil) - (pos (point)) - (ep nil) - (curdepth 0) - (cs (if comment-start-skip - (concat "\\(\\s<\\|" comment-start-skip "\\)") - (concat "\\(\\s<\\)"))) - (newsyntax (copy-syntax-table (syntax-table))) - (mods semantic-flex-syntax-modifications) - ;; Use the default depth if it is not specified. - (depth (or depth semantic-flex-depth))) - ;; Update the syntax table - (while mods - (modify-syntax-entry (car (car mods)) (car (cdr (car mods))) newsyntax) - (setq mods (cdr mods))) - (with-syntax-table newsyntax - (goto-char start) - (while (and (< (point) end) (or (not length) (<= (length ts) length))) - (cond - ;; catch beginning of lines when needed. - ;; Must be done before catching any other tokens! - ((and semantic-flex-enable-bol - (bolp) - ;; Just insert a (bol N . N) token in the token stream, - ;; without moving the point. N is the point at the - ;; beginning of line. - (setq ts (cons (cons 'bol (cons (point) (point))) ts)) - nil)) ;; CONTINUE - ;; special extensions, includes whitespace, nl, etc. - ((and semantic-flex-extensions - (let ((fe semantic-flex-extensions) - (r nil)) - (while fe - (if (looking-at (car (car fe))) - (setq ts (cons (funcall (cdr (car fe))) ts) - r t - fe nil - ep (point))) - (setq fe (cdr fe))) - (if (and r (not (car ts))) (setq ts (cdr ts))) - r))) - ;; catch newlines when needed - ((looking-at "\\s-*\\(\n\\|\\s>\\)") - (if semantic-flex-enable-newlines - (setq ep (match-end 1) - ts (cons (cons 'newline - (cons (match-beginning 1) ep)) - ts)))) - ;; catch whitespace when needed - ((looking-at "\\s-+") - (if semantic-flex-enable-whitespace - ;; Language wants whitespaces, link them together. - (if (eq (car (car ts)) 'whitespace) - (setcdr (cdr (car ts)) (match-end 0)) - (setq ts (cons (cons 'whitespace - (cons (match-beginning 0) - (match-end 0))) - ts))))) - ;; numbers - ((and semantic-number-expression - (looking-at semantic-number-expression)) - (setq ts (cons (cons 'number - (cons (match-beginning 0) - (match-end 0))) - ts))) - ;; symbols - ((looking-at "\\(\\sw\\|\\s_\\)+") - (setq ts (cons (cons - ;; Get info on if this is a keyword or not - (or (semantic-lex-keyword-p (match-string 0)) - 'symbol) - (cons (match-beginning 0) (match-end 0))) - ts))) - ;; Character quoting characters (ie, \n as newline) - ((looking-at "\\s\\+") - (setq ts (cons (cons 'charquote - (cons (match-beginning 0) (match-end 0))) - ts))) - ;; Open parens, or semantic-lists. - ((looking-at "\\s(") - (if (or (not depth) (< curdepth depth)) - (progn - (setq curdepth (1+ curdepth)) - (setq ts (cons (cons 'open-paren - (cons (match-beginning 0) (match-end 0))) - ts))) - (setq ts (cons - (cons 'semantic-list - (cons (match-beginning 0) - (save-excursion - (condition-case nil - (forward-list 1) - ;; This case makes flex robust - ;; to broken lists. - (error - (goto-char - (funcall - semantic-flex-unterminated-syntax-end-function - 'semantic-list - start end)))) - (setq ep (point))))) - ts)))) - ;; Close parens - ((looking-at "\\s)") - (setq ts (cons (cons 'close-paren - (cons (match-beginning 0) (match-end 0))) - ts)) - (setq curdepth (1- curdepth))) - ;; String initiators - ((looking-at "\\s\"") - ;; Zing to the end of this string. - (setq ts (cons (cons 'string - (cons (match-beginning 0) - (save-excursion - (condition-case nil - (forward-sexp 1) - ;; This case makes flex - ;; robust to broken strings. - (error - (goto-char - (funcall - semantic-flex-unterminated-syntax-end-function - 'string - start end)))) - (setq ep (point))))) - ts))) - ;; comments - ((looking-at cs) - (if (and semantic-ignore-comments - (not semantic-flex-enable-whitespace)) - ;; If the language doesn't deal with comments nor - ;; whitespaces, ignore them here. - (let ((comment-start-point (point))) - (forward-comment 1) - (if (eq (point) comment-start-point) - ;; In this case our start-skip string failed - ;; to work properly. Lets try and move over - ;; whatever white space we matched to begin - ;; with. - (skip-syntax-forward "-.'" (point-at-eol)) - ;;(forward-comment 1) - ;; Generate newline token if enabled - (if (and semantic-flex-enable-newlines - (bolp)) - (backward-char 1))) - (if (eq (point) comment-start-point) - (error "Strange comment syntax prevents lexical analysis")) - (setq ep (point))) - (let ((tk (if semantic-ignore-comments 'whitespace 'comment))) - (save-excursion - (forward-comment 1) - ;; Generate newline token if enabled - (if (and semantic-flex-enable-newlines - (bolp)) - (backward-char 1)) - (setq ep (point))) - ;; Language wants comments or want them as whitespaces, - ;; link them together. - (if (eq (car (car ts)) tk) - (setcdr (cdr (car ts)) ep) - (setq ts (cons (cons tk (cons (match-beginning 0) ep)) - ts)))))) - ;; punctuation - ((looking-at "\\(\\s.\\|\\s$\\|\\s'\\)") - (setq ts (cons (cons 'punctuation - (cons (match-beginning 0) (match-end 0))) - ts))) - ;; unknown token - (t - (error "What is that?"))) - (goto-char (or ep (match-end 0))) - (setq ep nil))) - ;; maybe catch the last beginning of line when needed - (and semantic-flex-enable-bol - (= (point) end) - (bolp) - (setq ts (cons (cons 'bol (cons (point) (point))) ts))) - (goto-char pos) - ;;(message "Flexing muscles...done") - (nreverse ts))) +(make-obsolete-variable 'semantic-flex-depth nil "28.1") (provide 'semantic/lex) diff --git a/lisp/cedet/semantic/tag-file.el b/lisp/cedet/semantic/tag-file.el index 50d43fe934..23f4b29cbd 100644 --- a/lisp/cedet/semantic/tag-file.el +++ b/lisp/cedet/semantic/tag-file.el @@ -101,9 +101,6 @@ semantic-go-to-tag ) ) -(make-obsolete-overload 'semantic-find-nonterminal - 'semantic-go-to-tag "23.2") - ;;; Dependencies ;; ;; A tag which is of type 'include specifies a dependency. @@ -175,9 +172,6 @@ semantic-dependency-tag-file nil) ))) -(make-obsolete-overload 'semantic-find-dependency - 'semantic-dependency-tag-file "23.2") - ;;; PROTOTYPE FILE ;; ;; In C, a function in the .c file often has a representation in a @@ -199,13 +193,6 @@ semantic-prototype-file (if (re-search-forward "::Header:: \\([a-zA-Z0-9.]+\\)" nil t) (match-string 1)))))) -(semantic-alias-obsolete 'semantic-find-nonterminal - 'semantic-go-to-tag "23.2") - -(semantic-alias-obsolete 'semantic-find-dependency - 'semantic-dependency-tag-file "23.2") - - (provide 'semantic/tag-file) ;; Local variables: diff --git a/lisp/cedet/semantic/tag-ls.el b/lisp/cedet/semantic/tag-ls.el index 16179a53cd..3ee11df7d8 100644 --- a/lisp/cedet/semantic/tag-ls.el +++ b/lisp/cedet/semantic/tag-ls.el @@ -190,7 +190,7 @@ semantic-tag-similar-p-default ;; will contain the info needed to determine the full name. (define-overloadable-function semantic-tag-full-package (tag &optional stream-or-buffer) "Return the fully qualified package name of TAG in a package hierarchy. -STREAM-OR-BUFFER can be anything convertible by `semantic-something-to-stream', +STREAM-OR-BUFFER can be anything convertible by `semantic-something-to-tag-table', but must be a toplevel semantic tag stream that contains TAG. A Package Hierarchy is defined in UML by the way classes and methods are organized on disk. Some languages use this concept such that a @@ -213,7 +213,7 @@ semantic-tag-full-package-default (define-overloadable-function semantic-tag-full-name (tag &optional stream-or-buffer) "Return the fully qualified name of TAG in the package hierarchy. -STREAM-OR-BUFFER can be anything convertible by `semantic-something-to-stream', +STREAM-OR-BUFFER can be anything convertible by `semantic-something-to-tag-table', but must be a toplevel semantic tag stream that contains TAG. A Package Hierarchy is defined in UML by the way classes and methods are organized on disk. Some languages use this concept such that a @@ -233,9 +233,6 @@ semantic-tag-full-name (or stream-or-buffer tag)))) (:override-with-args (tag stream)))) -(make-obsolete-overload 'semantic-nonterminal-full-name - 'semantic-tag-full-name "23.2") - (defun semantic-tag-full-name-default (tag stream) "Default method for `semantic-tag-full-name'. Return the name of TAG found in the toplevel STREAM." @@ -287,9 +284,6 @@ semantic-tag-protection (setq parent (semantic-tag-calculate-parent tag))) (:override)) -(make-obsolete-overload 'semantic-nonterminal-protection - 'semantic-tag-protection "23.2") - (defun semantic-tag-protection-default (tag &optional parent) "Return the protection of TAG as a child of PARENT default action. See `semantic-tag-protection'." @@ -377,9 +371,6 @@ semantic-tag-abstract-p The default behavior (if not overridden with `tag-abstract-p' is to return true if `abstract' is in the type modifiers.") -(make-obsolete-overload 'semantic-nonterminal-abstract - 'semantic-tag-abstract-p "23.2") - (defun semantic-tag-abstract-p-default (tag &optional parent) "Return non-nil if TAG is abstract as a child of PARENT default action. See `semantic-tag-abstract-p'." @@ -400,9 +391,6 @@ semantic-tag-leaf-p The default behavior (if not overridden with `tag-leaf-p' is to return true if `leaf' is in the type modifiers.") -(make-obsolete-overload 'semantic-nonterminal-leaf - 'semantic-tag-leaf-p "23.2") - (defun semantic-tag-leaf-p-default (tag &optional parent) "Return non-nil if TAG is leaf as a child of PARENT default action. See `semantic-tag-leaf-p'." diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el index ca5c068d34..e677264c5a 100644 --- a/lisp/cedet/semantic/tag.el +++ b/lisp/cedet/semantic/tag.el @@ -1328,26 +1328,6 @@ semantic-token-version (defconst semantic-token-incompatible-version semantic-tag-incompatible-version) -(defsubst semantic-token-type-parent (tag) - "Return the parent of the type that TAG describes. -The return value is a list. A value of nil means no parents. -The `car' of the list is either the parent class, or a list -of parent classes. The `cdr' of the list is the list of -interfaces, or abstract classes which are parents of TAG." - (cons (semantic-tag-get-attribute tag :superclasses) - (semantic-tag-type-interfaces tag))) - -(make-obsolete 'semantic-token-type-parent - "\ -use `semantic-tag-type-superclass' \ -and `semantic-tag-type-interfaces' instead" "23.2") - -(semantic-alias-obsolete 'semantic-tag-make-assoc-list - 'semantic-tag-make-plist "23.2") - -(semantic-varalias-obsolete 'semantic-expand-nonterminal - 'semantic-tag-expand-function "23.2") - (provide 'semantic/tag) ;; Local variables: diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el index c64d56b2e2..7df7dfcb75 100644 --- a/lisp/cedet/semantic/util.el +++ b/lisp/cedet/semantic/util.el @@ -79,9 +79,6 @@ semantic-file-tag-table (with-current-buffer (find-file-noselect file) (semantic-fetch-tags)))))) -(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) @@ -137,9 +134,6 @@ semantic-something-to-tag-table ;; don't know what it is (t nil))) -(semantic-alias-obsolete 'semantic-something-to-stream - 'semantic-something-to-tag-table "23.2") - ;;; Completion APIs ;; ;; These functions provide minibuffer reading/completion for lists of @@ -307,7 +301,6 @@ semantic-describe-buffer semantic-init-db-hook semantic-unmatched-syntax-hook semantic--before-fetch-tags-hook - semantic-after-toplevel-bovinate-hook semantic-after-toplevel-cache-change-hook semantic-before-toplevel-cache-flush-hook semantic-dump-parse diff --git a/lisp/cedet/semantic/wisent.el b/lisp/cedet/semantic/wisent.el index 527a35c9ae..15d1313dfa 100644 --- a/lisp/cedet/semantic/wisent.el +++ b/lisp/cedet/semantic/wisent.el @@ -43,11 +43,6 @@ wisent-lex-lookahead "Extra lookahead token. When non-nil it is directly returned by `wisent-lex-function'.") -;; Maintain this alias for compatibility until all WY grammars have -;; been translated again to Elisp code. -(semantic-alias-obsolete 'wisent-lex-make-token-table - 'semantic-lex-make-type-table "23.2") - (defmacro wisent-lex-eoi () "Return an End-Of-Input lexical token. The EOI token is like this: ($EOI \"\" POINT-MAX . POINT-MAX)." -- 2.28.0