2009-08-23 03:46:01 +00:00
|
|
|
|
;;; semantic.el --- Semantic buffer evaluator.
|
|
|
|
|
|
2021-01-01 01:13:56 -08:00
|
|
|
|
;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
Synch Semantic to CEDET 1.0.
Move CEDET ChangeLog entries to new file lisp/cedet/ChangeLog.
* semantic.el (semantic-version): Update to 2.0.
(semantic-mode-map): Add "," and "m" bindings.
(navigate-menu): Update.
* semantic/symref.el (semantic-symref-calculate-rootdir):
New function.
(semantic-symref-detect-symref-tool): Use it.
* semantic/symref/grep.el (semantic-symref-grep-shell): New var.
(semantic-symref-perform-search): Use it. Calculate root dir with
semantic-symref-calculate-rootdir.
(semantic-symref-derive-find-filepatterns): Improve error message.
* semantic/symref/list.el
(semantic-symref-results-mode-map): New bindings.
(semantic-symref-auto-expand-results): New option.
(semantic-symref-results-dump): Obey auto-expand.
(semantic-symref-list-expand-all, semantic-symref-regexp)
(semantic-symref-list-contract-all)
(semantic-symref-list-map-open-hits)
(semantic-symref-list-update-open-hits)
(semantic-symref-list-create-macro-on-open-hit)
(semantic-symref-list-call-macro-on-open-hits): New functions.
(semantic-symref-list-menu-entries)
(semantic-symref-list-menu): New vars.
(semantic-symref-list-map-open-hits): Move cursor to beginning of
match before calling the mapped function.
* semantic/doc.el
(semantic-documentation-comment-preceeding-tag): Do nothing if the
mode doesn't provide comment-start-skip.
* semantic/scope.el
(semantic-analyze-scope-nested-tags-default): Strip duplicates.
(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
looking for as part of the scoped tags list.
* semantic/html.el (semantic-default-html-setup): Add
senator-step-at-tag-classes.
* semantic/decorate/include.el
(semantic-decoration-on-unknown-includes): Change light bgcolor.
(semantic-decoration-on-includes-highlight-default): Check that
the include tag has a postion.
* semantic/complete.el (semantic-collector-local-members):
(semantic-complete-read-tag-local-members)
(semantic-complete-jump-local-members): New class and functions.
(semantic-complete-self-insert): Save excursion before completing.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): If no completions
are found, return the raw by-name-only completion list. Add FLAGS
arguments. Add support for 'no-tc (type constraint) and
'no-unique, or no stripping duplicates.
(semantic-analyze-possible-completions-default): Add FLAGS arg.
* semantic/util-modes.el
(semantic-stickyfunc-show-only-functions-p): New option.
(semantic-stickyfunc-fetch-stickyline): Don't show stickytext for
the very first line in a buffer.
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-describe-buffer): Fix expand-nonterminal. Add
lex-syntax-mods, type relation separator char, and command
separation char.
(semantic-sanity-check): Only message if called interactively.
* semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the
:filename property and the tag position.
* semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Add recursion limit.
* semantic/imenu.el (semantic-imenu-bucketize-type-members):
Make this buffer local, not the obsoleted variable.
* semantic/idle.el: Add breadcrumbs support.
(semantic-idle-summary-current-symbol-info-default)
(semantic-idle-tag-highlight)
(semantic-idle-completion-list-default): Use
semanticdb-without-unloaded-file-searches for speed, and to
conform to the controls that specify if the idle timer is supposed
to be parsing unparsed includes.
(semantic-idle-symbol-highlight-face)
(semantic-idle-symbol-maybe-highlight): Rename from *-summary-*.
Callers changed.
(semantic-idle-work-parse-neighboring-files-flag): Default to nil.
(semantic-idle-work-update-headers-flag): New var.
(semantic-idle-work-for-one-buffer): Use it.
(semantic-idle-local-symbol-highlight): Rename from
semantic-idle-tag-highlight.
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.
* semantic/grammar.el (semantic-grammar-create-package):
Save the buffer even in batch mode.
* semantic/fw.el
(semanticdb-without-unloaded-file-searches): New macro.
* semantic/dep.el (semantic-dependency-find-file-on-path):
Fix case dereferencing ede-object when it is a list.
* semantic/db-typecache.el (semanticdb-expand-nested-tag)
(semanticdb-typecache-faux-namespace): New functions.
(semanticdb-typecache-file-tags)
(semanticdb-typecache-merge-streams): Use them.
(semanticdb-typecache-file-tags): When deriving tags from a file,
give the mode a chance to monkey with the tag copy.
(semanticdb-typecache-find-default): Wrap find in save-excursion.
(semanticdb-typecache-find-by-name-helper): Merge found names down.
* semantic/db-global.el
(semanticdb-enable-gnu-global-in-buffer): Don't show messages if
GNU Global is not available and we don't want to throw an error.
* semantic/db-find.el (semanticdb-find-result-nth-in-buffer):
When trying to normalize the tag to a buffer, don't error if
set-buffer method doesn't exist.
* semantic/db-file.el (semanticdb-save-db): Simplify msg.
* semantic/db.el (semanticdb-refresh-table): If forcing a
refresh on a file not in a buffer, use semantic-find-file-noselect
and delete the buffer after use.
(semanticdb-current-database-list): When calculating root via
hooks, force it through true-filename and skip the list of
possible roots.
* semantic/ctxt.el (semantic-ctxt-imported-packages): New.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-tag): Reset standard output to
current buffer.
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype): Change "prefix" to
"symbol" in messages.
* semantic/analyze/refs.el: (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): When calculating value, make sure
the found tag is 'similar' to the originating tag.
(semantic--analyze-refs-find-tags-with-parent): Attempt to
identify matches via imported symbols of parents.
(semantic--analyze-refs-full-lookup-with-parents): Do a deep
search during the brute search.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Be robust to
calculated scopes being nil.
* semantic/bovine/c.el (semantic-c-describe-environment): Add
project macro symbol array.
(semantic-c-parse-lexical-token): Add recursion limit.
(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
New overrides.
(semantic-expand-c-tag-namelist): Split a full type from a typedef
out to its own tag.
(semantic-expand-c-tag-namelist): Do not split out a typedef'd
inline type if it is an anonymous type.
(semantic-c-reconstitute-token): Use the optional initializers as
a clue that some function is probably a constructor. When
defining the type of these constructors, split the parent name,
and use only the class part, if applicable.
* semantic/bovine/c-by.el:
* semantic/wisent/python-wy.el: Regenerate.
2010-09-18 22:49:54 -04:00
|
|
|
|
;; Keywords: syntax tools
|
2013-01-31 20:58:56 +01:00
|
|
|
|
;; Version: 2.2
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 15:52:52 -07:00
|
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
;;
|
|
|
|
|
;; API for providing the semantic content of a buffer.
|
|
|
|
|
;;
|
2009-12-13 01:55:09 +00:00
|
|
|
|
;; The Semantic API provides an interface to a series of different parser
|
2009-08-23 03:46:01 +00:00
|
|
|
|
;; implementations. Each parser outputs a parse tree in a similar format
|
|
|
|
|
;; designed to handle typical functional and object oriented languages.
|
2009-12-13 01:55:09 +00:00
|
|
|
|
;;
|
|
|
|
|
;; To enable Semantic, turn on `semantic-mode', a global minor mode
|
|
|
|
|
;; (M-x semantic-mode RET, or "Source Code Parsers" from the Tools
|
|
|
|
|
;; menu). To enable it at startup, put (semantic-mode 1) in your init
|
|
|
|
|
;; file.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(require 'cedet)
|
2009-08-28 15:01:48 +00:00
|
|
|
|
(require 'semantic/tag)
|
|
|
|
|
(require 'semantic/lex)
|
2017-04-06 07:36:36 -06:00
|
|
|
|
(require 'cl-lib)
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
2013-01-31 20:58:56 +01:00
|
|
|
|
(defvar semantic-version "2.2"
|
2009-09-20 03:44:02 +00:00
|
|
|
|
"Current version of Semantic.")
|
|
|
|
|
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(declare-function inversion-test "inversion")
|
2009-09-21 19:05:56 +00:00
|
|
|
|
(declare-function semanticdb-load-ebrowse-caches "semantic/db-ebrowse")
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defun semantic-require-version (major minor &optional beta)
|
2010-01-18 05:39:40 +01:00
|
|
|
|
"Non-nil if this version of Semantic does not satisfy a specific version.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
Arguments can be:
|
|
|
|
|
|
|
|
|
|
(MAJOR MINOR &optional BETA)
|
|
|
|
|
|
|
|
|
|
Values MAJOR and MINOR must be integers. BETA can be an integer, or
|
|
|
|
|
excluded if a released version is required.
|
|
|
|
|
|
|
|
|
|
It is assumed that if the current version is newer than that specified,
|
|
|
|
|
everything passes. Exceptions occur when known incompatibilities are
|
|
|
|
|
introduced."
|
2021-03-03 19:54:37 +01:00
|
|
|
|
(declare (obsolete emacs-version "28.1"))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(require 'inversion)
|
|
|
|
|
(inversion-test 'semantic
|
|
|
|
|
(concat major "." minor
|
|
|
|
|
(when beta (concat "beta" beta)))))
|
|
|
|
|
|
|
|
|
|
(defgroup semantic nil
|
|
|
|
|
"Parser Generator and parser framework."
|
2010-02-16 09:35:45 -05:00
|
|
|
|
:group 'tools)
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defgroup semantic-faces nil
|
|
|
|
|
"Faces used for Semantic enabled tools."
|
|
|
|
|
:group 'semantic)
|
|
|
|
|
|
2009-08-28 15:01:48 +00:00
|
|
|
|
(require 'semantic/fw)
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
;;; Variables and Configuration
|
|
|
|
|
;;
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic--parse-table nil
|
2009-08-23 03:46:01 +00:00
|
|
|
|
"Variable that defines how to parse top level items in a buffer.
|
|
|
|
|
This variable is for internal use only, and its content depends on the
|
|
|
|
|
external parser used.")
|
|
|
|
|
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic-symbol->name-assoc-list
|
2009-08-23 03:46:01 +00:00
|
|
|
|
'((type . "Types")
|
|
|
|
|
(variable . "Variables")
|
|
|
|
|
(function . "Functions")
|
|
|
|
|
(include . "Dependencies")
|
|
|
|
|
(package . "Provides"))
|
|
|
|
|
"Association between symbols returned, and a string.
|
|
|
|
|
The string is used to represent a group of objects of the given type.
|
|
|
|
|
It is sometimes useful for a language to use a different string
|
|
|
|
|
in place of the default, even though that language will still
|
|
|
|
|
return a symbol. For example, Java return's includes, but the
|
|
|
|
|
string can be replaced with `Imports'.")
|
|
|
|
|
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic-symbol->name-assoc-list-for-type-parts nil
|
2009-08-23 03:46:01 +00:00
|
|
|
|
"Like `semantic-symbol->name-assoc-list' for type parts.
|
|
|
|
|
Some tags that have children (see `semantic-tag-children-compatibility')
|
|
|
|
|
will want to define the names of classes of tags differently than at
|
|
|
|
|
the top level. For example, in C++, a Function may be called a
|
|
|
|
|
Method. In addition, there may be new types of tags that exist only
|
|
|
|
|
in classes, such as protection labels.")
|
|
|
|
|
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic-case-fold nil
|
2009-08-23 03:46:01 +00:00
|
|
|
|
"Value for `case-fold-search' when parsing.")
|
|
|
|
|
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic--buffer-cache nil
|
2009-08-23 03:46:01 +00:00
|
|
|
|
"A cache of the fully parsed buffer.
|
|
|
|
|
If no significant changes have been made (based on the state) then
|
|
|
|
|
this is returned instead of re-parsing the buffer.
|
|
|
|
|
|
|
|
|
|
DO NOT USE THIS VARIABLE IN PROGRAMS.
|
|
|
|
|
|
|
|
|
|
If you need a tag list, use `semantic-fetch-tags'. If you need the
|
2010-01-18 05:39:40 +01:00
|
|
|
|
cached values for some reason, chances are you can add a hook to
|
2009-08-23 03:46:01 +00:00
|
|
|
|
`semantic-after-toplevel-cache-change-hook'.")
|
|
|
|
|
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic-unmatched-syntax-cache nil
|
2009-08-23 03:46:01 +00:00
|
|
|
|
"A cached copy of unmatched syntax tokens.")
|
|
|
|
|
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic-unmatched-syntax-cache-check nil
|
2010-01-18 05:39:40 +01:00
|
|
|
|
"Non-nil if the unmatched syntax cache is out of date.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
This is tracked with `semantic-change-function'.")
|
|
|
|
|
|
|
|
|
|
(defvar semantic-edits-are-safe nil
|
|
|
|
|
"When non-nil, modifications do not require a reparse.
|
|
|
|
|
This prevents tags from being marked dirty, and it prevents top level
|
|
|
|
|
edits from causing a cache check.
|
|
|
|
|
Use this when writing programs that could cause a full reparse, but
|
|
|
|
|
will not change the tag structure, such as adding or updating
|
|
|
|
|
`top-level' comments.")
|
|
|
|
|
|
|
|
|
|
(defvar semantic-unmatched-syntax-hook nil
|
2010-01-18 05:39:40 +01:00
|
|
|
|
"Hooks run when Semantic detects syntax not matched in a grammar.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
Each individual piece of syntax (such as a symbol or punctuation
|
|
|
|
|
character) is called with this hook when it doesn't match in the
|
|
|
|
|
grammar, and multiple unmatched syntax elements are not grouped
|
2010-01-18 05:39:40 +01:00
|
|
|
|
together. Each hook is called with one argument, which is a list
|
|
|
|
|
of syntax tokens created by the semantic lexer. Use the functions
|
2009-08-23 03:46:01 +00:00
|
|
|
|
`semantic-lex-token-start', `semantic-lex-token-end' and
|
2010-01-18 05:39:40 +01:00
|
|
|
|
`semantic-lex-token-text' to get information about these tokens.
|
|
|
|
|
The current buffer is the buffer these tokens are derived from.")
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defvar semantic--before-fetch-tags-hook nil
|
2010-01-18 05:39:40 +01:00
|
|
|
|
"Hooks run before a buffer is parsed for tags.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
It is called before any request for tags is made via the function
|
|
|
|
|
`semantic-fetch-tags' by an application.
|
|
|
|
|
If any hook returns a nil value, the cached value is returned
|
|
|
|
|
immediately, even if it is empty.")
|
|
|
|
|
|
|
|
|
|
(defvar semantic-after-toplevel-cache-change-hook nil
|
|
|
|
|
"Hooks run after the buffer tag list has changed.
|
|
|
|
|
This list will change when a buffer is reparsed, or when the tag list
|
|
|
|
|
in a buffer is cleared. It is *NOT* called if the current tag list is
|
|
|
|
|
partially reparsed.
|
|
|
|
|
|
|
|
|
|
Hook functions must take one argument, which is the new list of tags
|
|
|
|
|
associated with this buffer.
|
|
|
|
|
|
|
|
|
|
For language specific hooks, make sure you define this as a local hook.")
|
|
|
|
|
|
|
|
|
|
(defvar semantic-before-toplevel-cache-flush-hook nil
|
|
|
|
|
"Hooks run before the toplevel tag cache is flushed.
|
|
|
|
|
For language specific hooks, make sure you define this as a local
|
|
|
|
|
hook. This hook is called before a corresponding
|
|
|
|
|
`semantic-after-toplevel-cache-change-hook' which is also called
|
|
|
|
|
during a flush when the cache is given a new value of nil.")
|
|
|
|
|
|
|
|
|
|
(defcustom semantic-dump-parse nil
|
|
|
|
|
"When non-nil, dump parsing information."
|
|
|
|
|
:group 'semantic
|
|
|
|
|
:type 'boolean)
|
|
|
|
|
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic-parser-name "LL"
|
2009-08-23 03:46:01 +00:00
|
|
|
|
"Optional name of the parser used to parse input stream.")
|
2009-09-27 03:36:58 +00:00
|
|
|
|
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic--completion-cache nil
|
2009-09-27 03:36:58 +00:00
|
|
|
|
"Internal variable used by `semantic-complete-symbol'.")
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
;;; Parse tree state management API
|
|
|
|
|
;;
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic-parse-tree-state 'needs-rebuild
|
2009-08-23 03:46:01 +00:00
|
|
|
|
"State of the current parse tree.")
|
|
|
|
|
|
|
|
|
|
(defmacro semantic-parse-tree-unparseable ()
|
2020-10-16 11:50:30 +02:00
|
|
|
|
"Indicate that the current buffer is unparseable.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
It is also true that the parse tree will need either updating or
|
|
|
|
|
a rebuild. This state will be changed when the user edits the buffer."
|
2018-11-05 01:22:15 +01:00
|
|
|
|
'(setq semantic-parse-tree-state 'unparseable))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defmacro semantic-parse-tree-unparseable-p ()
|
2020-10-16 11:50:30 +02:00
|
|
|
|
"Return non-nil if the current buffer has been marked unparseable."
|
2018-11-05 01:22:15 +01:00
|
|
|
|
'(eq semantic-parse-tree-state 'unparseable))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defmacro semantic-parse-tree-set-needs-update ()
|
|
|
|
|
"Indicate that the current parse tree needs to be updated.
|
|
|
|
|
The parse tree can be updated by `semantic-parse-changes'."
|
2018-11-05 01:22:15 +01:00
|
|
|
|
'(setq semantic-parse-tree-state 'needs-update))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defmacro semantic-parse-tree-needs-update-p ()
|
|
|
|
|
"Return non-nil if the current parse tree needs to be updated."
|
2018-11-05 01:22:15 +01:00
|
|
|
|
'(eq semantic-parse-tree-state 'needs-update))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defmacro semantic-parse-tree-set-needs-rebuild ()
|
|
|
|
|
"Indicate that the current parse tree needs to be rebuilt.
|
|
|
|
|
The parse tree must be rebuilt by `semantic-parse-region'."
|
2018-11-05 01:22:15 +01:00
|
|
|
|
'(setq semantic-parse-tree-state 'needs-rebuild))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defmacro semantic-parse-tree-needs-rebuild-p ()
|
|
|
|
|
"Return non-nil if the current parse tree needs to be rebuilt."
|
2018-11-05 01:22:15 +01:00
|
|
|
|
'(eq semantic-parse-tree-state 'needs-rebuild))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defmacro semantic-parse-tree-set-up-to-date ()
|
|
|
|
|
"Indicate that the current parse tree is up to date."
|
2018-11-05 01:22:15 +01:00
|
|
|
|
'(setq semantic-parse-tree-state nil))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defmacro semantic-parse-tree-up-to-date-p ()
|
|
|
|
|
"Return non-nil if the current parse tree is up to date."
|
2018-11-05 01:22:15 +01:00
|
|
|
|
'(null semantic-parse-tree-state))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
;;; Interfacing with the system
|
|
|
|
|
;;
|
|
|
|
|
(defcustom semantic-inhibit-functions nil
|
|
|
|
|
"List of functions to call with no arguments before Semantic is setup.
|
|
|
|
|
If any of these functions returns non-nil, the current buffer is not
|
|
|
|
|
setup to use Semantic."
|
|
|
|
|
:group 'semantic
|
|
|
|
|
:type 'hook)
|
|
|
|
|
|
2009-10-04 19:22:09 +00:00
|
|
|
|
(defcustom semantic-new-buffer-setup-functions
|
2010-01-09 19:38:07 -05:00
|
|
|
|
'((c-mode . semantic-default-c-setup)
|
2009-10-04 19:22:09 +00:00
|
|
|
|
(c++-mode . semantic-default-c-setup)
|
|
|
|
|
(html-mode . semantic-default-html-setup)
|
2010-01-09 19:38:07 -05:00
|
|
|
|
(java-mode . wisent-java-default-setup)
|
|
|
|
|
(js-mode . wisent-javascript-setup-parser)
|
|
|
|
|
(python-mode . wisent-python-default-setup)
|
|
|
|
|
(scheme-mode . semantic-default-scheme-setup)
|
2009-10-04 19:22:09 +00:00
|
|
|
|
(srecode-template-mode . srecode-template-setup-parser)
|
2012-10-02 02:10:29 +08:00
|
|
|
|
(texinfo-mode . semantic-default-texi-setup)
|
2009-10-04 19:22:09 +00:00
|
|
|
|
(makefile-automake-mode . semantic-default-make-setup)
|
|
|
|
|
(makefile-gmake-mode . semantic-default-make-setup)
|
|
|
|
|
(makefile-makepp-mode . semantic-default-make-setup)
|
|
|
|
|
(makefile-bsdmake-mode . semantic-default-make-setup)
|
|
|
|
|
(makefile-imake-mode . semantic-default-make-setup)
|
|
|
|
|
(makefile-mode . semantic-default-make-setup))
|
|
|
|
|
"Alist of functions to call to set up Semantic parsing in the buffer.
|
|
|
|
|
Each element has the form (MODE . FN), where MODE is a value of
|
|
|
|
|
`major-mode' for the buffer and FN is the corresponding function
|
|
|
|
|
to call, with no arguments, to set up the parser.
|
|
|
|
|
|
|
|
|
|
These functions are called by `semantic-new-buffer-fcn', before
|
|
|
|
|
`semantic-inhibit-functions'."
|
|
|
|
|
:group 'semantic
|
|
|
|
|
:type '(alist :key-type symbol :value-type function))
|
|
|
|
|
|
2009-09-21 02:14:58 +00:00
|
|
|
|
(defvar semantic-init-hook nil
|
|
|
|
|
"Hook run when a buffer is initialized with a parsing table.")
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic-init-mode-hook nil
|
2009-09-21 02:14:58 +00:00
|
|
|
|
"Hook run when a buffer of a particular mode is initialized.")
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
2009-09-21 02:14:58 +00:00
|
|
|
|
(defvar semantic-init-db-hook nil
|
|
|
|
|
"Hook run when a buffer is initialized with a parsing table for DBs.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
This hook is for database functions which intend to swap in a tag table.
|
|
|
|
|
This guarantees that the DB will go before other modes that require
|
|
|
|
|
a parse of the buffer.")
|
|
|
|
|
|
2012-10-14 21:20:28 +02:00
|
|
|
|
(defsubst semantic-error-if-unparsed ()
|
|
|
|
|
"Raise an error if current buffer was not parsed by Semantic."
|
|
|
|
|
(unless semantic-new-buffer-fcn-was-run
|
|
|
|
|
(error "Buffer was not parsed by Semantic.")))
|
|
|
|
|
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(defsubst semantic--umatched-syntax-needs-refresh-p ()
|
|
|
|
|
"Return non-nil if the unmatched syntax cache needs a refresh.
|
2010-01-18 05:39:40 +01:00
|
|
|
|
That is, if it is dirty or if the current parse tree isn't up to date."
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(or semantic-unmatched-syntax-cache-check
|
|
|
|
|
(not (semantic-parse-tree-up-to-date-p))))
|
|
|
|
|
|
|
|
|
|
(defun semantic-new-buffer-fcn ()
|
|
|
|
|
"Setup the current buffer to use Semantic.
|
|
|
|
|
If the major mode is ready for Semantic, and no
|
|
|
|
|
`semantic-inhibit-functions' disabled it, the current buffer is setup
|
|
|
|
|
to use Semantic, and `semantic-init-hook' is run."
|
2009-10-04 19:22:09 +00:00
|
|
|
|
;; In upstream Semantic, the parser setup functions are called from
|
|
|
|
|
;; mode hooks. In the version bundled with Emacs, we do it here.
|
2017-03-18 23:01:16 +01:00
|
|
|
|
(let ((entry (cl-assoc-if #'derived-mode-p semantic-new-buffer-setup-functions)))
|
2009-10-04 19:22:09 +00:00
|
|
|
|
(when entry
|
|
|
|
|
(funcall (cdr entry))))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
;; Do stuff if semantic was activated by a mode hook in this buffer,
|
|
|
|
|
;; and not afterwards disabled.
|
|
|
|
|
(when (and semantic--parse-table
|
|
|
|
|
(not (semantic-active-p))
|
|
|
|
|
(not (run-hook-with-args-until-success
|
|
|
|
|
'semantic-inhibit-functions)))
|
|
|
|
|
;; Make sure that if this buffer is cloned, our tags and overlays
|
|
|
|
|
;; don't go along for the ride.
|
|
|
|
|
(add-hook 'clone-indirect-buffer-hook 'semantic-clear-toplevel-cache
|
|
|
|
|
nil t)
|
2011-11-20 04:48:53 +01:00
|
|
|
|
;; Specify that this function has done its work. At this point
|
2009-08-23 03:46:01 +00:00
|
|
|
|
;; we can consider that semantic is active in this buffer.
|
|
|
|
|
(setq semantic-new-buffer-fcn-was-run t)
|
|
|
|
|
;; Here are some buffer local variables we can initialize ourselves
|
|
|
|
|
;; of a mode does not choose to do so.
|
|
|
|
|
(semantic-lex-init)
|
|
|
|
|
;; Force this buffer to have its cache refreshed.
|
|
|
|
|
(semantic-clear-toplevel-cache)
|
|
|
|
|
;; Call DB hooks before regular init hooks
|
2009-09-21 02:14:58 +00:00
|
|
|
|
(run-hooks 'semantic-init-db-hook)
|
2009-08-23 03:46:01 +00:00
|
|
|
|
;; Set up semantic modes
|
2009-09-21 02:14:58 +00:00
|
|
|
|
(run-hooks 'semantic-init-hook)
|
2009-08-23 03:46:01 +00:00
|
|
|
|
;; Set up major-mode specific semantic modes
|
2009-09-21 02:14:58 +00:00
|
|
|
|
(run-hooks 'semantic-init-mode-hook)))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defun semantic-fetch-tags-fast ()
|
|
|
|
|
"For use in a hook. When only a partial reparse is needed, reparse."
|
|
|
|
|
(condition-case nil
|
|
|
|
|
(if (semantic-parse-tree-needs-update-p)
|
|
|
|
|
(semantic-fetch-tags))
|
|
|
|
|
(error nil))
|
|
|
|
|
semantic--buffer-cache)
|
|
|
|
|
|
|
|
|
|
;;; Parsing Commands
|
|
|
|
|
;;
|
2019-10-19 11:00:21 +02:00
|
|
|
|
(require 'pp)
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defvar semantic-edebug nil
|
|
|
|
|
"When non-nil, activate the interactive parsing debugger.
|
|
|
|
|
Do not set this yourself. Call `semantic-debug'.")
|
|
|
|
|
|
2012-10-25 22:13:16 +02:00
|
|
|
|
(defsubst semantic-elapsed-time (start end)
|
2010-01-18 05:39:40 +01:00
|
|
|
|
"Copied from elp.el. Was `elp-elapsed-time'.
|
2011-11-20 04:48:53 +01:00
|
|
|
|
Arguments START and END bound the time being calculated."
|
2011-06-30 17:24:48 -07:00
|
|
|
|
(float-time (time-subtract end start)))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defun bovinate (&optional clear)
|
|
|
|
|
"Parse the current buffer. Show output in a temp buffer.
|
|
|
|
|
Optional argument CLEAR will clear the cache before parsing.
|
Update from CEDET trunk.
* grammars/c.by (template-type): Add :template-specifier and
:typevar to capture extra details about the template.
(opt-post-fcn-modifiers): Splice in the found symbol into the
return value correctly.
(QUESTION): New punctuation.
(expression): Add ternary conditional support.
* grammars/scheme.by (MODULE): New token.
(scheme): Handle expanding the MODULE tag.
(scheme-list): Remove closeparen required match.
(scheme-in-list): Remove extraneous matches for DEFINE. Add
support for MODULE Simplify matching for code & make work.
(name-args, name-arg-list, name-arg-expand): Make it work.
* semantic.el (semantic-mode): Add/remove 3
completion-at-point-functions.
(semantic-completion-at-point-function): Removed.
(semantic-analyze-completion-at-point-function)
(semantic-analyze-notc-completion-at-point-function)
(semantic-analyze-nolongprefix-completion-at-point-function): New
completion at point functions.
* semantic/doc.el (semantic-doc-snarf-comment-for-tag): Fix case
when comment-end is empty string.
* semantic/debug.el
(semantic-debug-parser-debugger-source): New buffer local
variable.
(semantic-debug-interface): Add 'nil' initform to overlays.
(semantic-debug-mode): Remove read-only tags from buffers on exit.
(semantic-debug): Add autoload cookie. Force the language
specific debugger to load.
* semantic/db.el (generic::semanticdb-full-filename): New generic
method to allow this method to be used on buffer names via an
associated database.
* semantic/symref.el
(semantic-symref-cleanup-recent-buffers-fcn): When cleaning up
buffers, don't clean up buffers that are being used (i.e., in a
window) when the hook fires.
(semantic-symref-recently-opened-buffers): New tracking variable.
(semantic-symref-cleanup-recent-buffers-fcn): New hook fcn.
(semantic-symref-result-get-tags): Move logic into
`semantic-symref-hit-to-tag-via-buffer', and cleanup buffers via
the symref cleanup function in post-command-hook.
(semantic-symref-hit-to-tag-via-buffer): Logic that used to be
from above.
(semantic-symref-hit-to-tag-via-db): New.
* semantic/analyze.el:
(semantic-analyze-find-tag-sequence-default): If first entry in
sequence is the only one, apply tagclass filter.
(semantic-analyze-princ-sequence): Show slot even if empty.
(semantic-analyze-find-tag-sequence)
(semantic-analyze-find-tag-sequence-default): Add flags argument.
Add support for forcing the final entry of the sequence to be of
class variable.
(semantic-analyze-find-tag): Fix bug where input class filter was
ignored if there was a typecache match.
(semantic-analyze-current-context-default): For assignments, the
assignee now must be of class variable.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): Add
'no-longprefix' flag. When used, the prefix and prefixtypes are
shortened to just the last symbol.
* semantic/bovine/c.el (semantic-c-do-lex-if): Catch errors from
'hideif', and push to the parser warning stack.
(semantic-lex-cpp-define): When a comment is at the end of a
macro, do not subtract an extra 1 from the found position. Fixes
bug with: #define foo (a)/**/ adding an extra ')' to the stream.
* semantic/bovine/scm.el (semantic-lex-scheme-symbol): Allow
symbols to be one char long.
* semantic/bovine/grammar.el
(bovine-grammar-calculate-source-on-path): New.
(bovine-grammar-setupcode-builder): Use it.
* ede.el (ede/detect): New require.
(ede-version): Bump version
(ede-initialize-state-current-buffer): Use new
`ede-detect-directory-for-project' to detect projects first
instead of depending on currente dir only.
(ede-delete-project-from-global-list): New.
(ede-flush-deleted-projects): Use above.
(ede-check-project-query-fcn): New variable
(ede-check-project-directory): Use above when querying the user.
Added to support unit testing of this security measure.
(ede-initialize-state-current-buffer): Use
`ede-directory-project-cons' instead of the -detect- fcn to take
advantage of the cache. Pass found project into
`ede-load-project-file'.
(ede-load-project-file): Add new input DETECTIN.
(ede-rescan-toplevel): Get the proj root a better way.
(ede-load-project-file): Return the loaded object. When asking
for existing project, ask for an exact match.
(ede-initialize-state-current-buffer): Simplify some conditional
logic.
(ede-load-project-file): Simplify conditional logic.
(ede-global-list-sanity-check): New Testing fcn.
(ede-parent-project): Replace old code with call to faster
`ede-find-subproject-for-directory'.
(ede-load-project-file): Use
`ede-directory-get-toplevel-open-project' instead of above
deleted. Rename "pfc" to "autoloader". Use
`ede-directory-project-cons' to detect a project. Delete no
project found case where we search up the tree.
* ede/auto.el (ede-project-autoload): Fix doc typo. Add
`:root-only' slot.
(ede-auto-load-project): Doc update: warn to not use.
(ede-dir-to-projectfile): Deleted.
(ede-project-autoload-dirmatch): Add subdir-only slot. Make
configdatastash unbound by default.
(ede-do-dirmatch): If subdir-only is true, then don't allow exact
matches. Account for configdatastash as unbound. Assume value of
nil means no tool installed. Make sure loaded path matches from
beginning. Stash the regexp, not the raw string.
(ede-project-class-files): Note that makefile and automake are not
root only.
(ede-auto-detect-in-dir): New (for use with `ede/detect.el').
(ede-project-dirmatch-p): Deleted.
(ede-project-root-directory): Remove body, return nil.
(ede-project-autoload): :proj-root-dirmatch can be null & doc fix.
(ede-auto-detect-in-dir): If there is no :proj-file, check for a
dirmatch.
* ede/generic.el (ede/config): Replace require of ede.
(ede-generic-new-autoloader): Generic projects are now safe by
default. Note this is NOT a root only project.
(project-rescan, ede-project-root, ede-generic-target-java)
(ede-java-classpath, ede-find-subproject-for-directory): New.
(ede-enable-generic-projects): Add new autoloaders for git, bzr,
hg, sv, CVS.
(ede-generic-vc-project)
(ede-generic-vc-project::ede-generic-setup-configuration): New.
(ede-generic-config): Remove slots: c-include-path,
c-preprocessor-table, c-preprocessor-files, classpath,
build-command, debug-command, run command. Inherit from
ede-extra-config-build, ede-extra-config-program. Make
run-command :value match :custom so only strings are accepted.
Add some more :group slot specifiers.
(ede-generic-project): Add mixins `ede-project-with-config-c' and
`ede-project-with-config-java'. Inherit from
`ede-project-with-config-build',
`ede-project-with-config-program'. Subclass
`ede-project-with-config'. Remove duplication from new baseclass.
(ede-generic-target): Inherit from `ede-target-with-config-build',
`ede-target-with-config-program'. Subclass `ede-target-with-config'.
(ede-generic-target-c-cpp): Add mixin `ede-target-with-config-c'.
(ede-generic-target-java): Add mixin `ede-target-with-config-java'.
(ede-preprocessor-map, ede-system-include-path)
(edejava-classpath): Deleted, moved to config.el.
(project-compile-project, project-compile-target)
(project-debug-target, project-run-target): Deleted.
(ede-generic-get-configuration, ede-generic-setup-configuration)
(ede-commit-project, project-rescan)
(ede-generic-project::ede-customize)
(ede-generic-target::ede-customize)
(ede-generic-config::eieio-done-customizing)
(ede-generic-config::ede-commit): Deleted. Subsumed by new
baseclass.
(ede-preprocessor-map, ede-system-include-path)
(project-debug-target, project-run-target): Call new
`ede-config-get-configuration' instead of old version.
(ede-generic-load): Do not add to global list here.
* ede/files.el (ede-find-project-root)
(ede-files-find-existing)
(ede-directory-get-toplevel-open-project-new): Deleted.
(ede-project-root-directory): Use `ede-project-root' first.
(ede-project-directory-remove-hash)
(ede--directory-project-from-hash)
(ede--directory-project-add-description-to-hash): Rename to make
internal symbols (via --). Expand input dir first.
(ede-directory-project-p): Doc fix (note obsoleted.)
(ede-toplevel-project-or-nil): Alias to `ede-toplevel-project'.
(ede-toplevel-project): Doc Fix. Delete commented out old code.
Simplify returning result from ede-detect-directory-for-project.
(ede-directory-get-open-project): Support when
inodes are disabled. If disabled to str compare on root project.
(ede-directory-get-toplevel-open-project): Enabled nested
projects. When doing directory name matching, save the 'short'
version of an answer (non-exact match) and eventually select the
shortest answer at the end. Expand the filename of tested
projects. Better support for when inodes are disabled. Add
'exact' option so that it will return a project that is an exact
match.
(ede-find-subproject-for-directory): Small optimization to run
`file-truename' less often.
(ede-directory-project-p): Move content, then use
`ede-directory-project-cons'. Use
`ede-detect-directory-for-project', replacing old detection loop.
(ede-directory-project-cons): New, from above.
(ede-toplevel-project): Toss old scanning code. Use
`ede-detect-directory-for-project' instead.
(ede-directory-get-toplevel-open-project-new): New.
* ede/linux.el (ede-linux-project-root): Deleted.
(ede-project-autoload): Remove dirmatch entry - it is no longer
needed.
* lisp/cedet/ede/proj.el (project-rescan): Replace direct
manipulation of `ede-projects' with equivalent and better
functions.
(ede-proj-load): Replace call to test if dir has project to
explicity ask filesystem if Project.ede is there.
* ede/config.el:
* ede/detect.el: New files.
* ede/project-am.el (project-run-target): Add "./" to program to
run for systems where '.' isn't in PATH.
(project-am-load): Remove old code regarding `ede-constructing'.
Just read in the makefiles.
* ede/linux.el (ede-linux-load): Do not add to global list here.
Don't check for existing anymore.
(project-rescan): New.
(ede-linux-project-list, ede-linux-file-existing): Deleted.
(ede-linux-project-root): Delete body. Need symbol for autoloads
for now.
(ede-linux-project): No longer instance tracker.
(ede-project-autoload): Don't provide :proj-root
* ede/emacs.el (ede-emacs-load): Do not add project to global list
here. Don't look for existing first.
(ede-project-autoload): Remove dirmatch entry - it is no longer
needed. Don't provide proj-root anymore.
(ede-emacs-project-list, ede-emacs-file-existing): Delete.
(ede-emacs-project-root): Remove body (need symbol for loaddefs
still).
(ede-emacs-project): Do not instance track anymore.
* ede/cpp-root.el (initialize-instance): Remove commented code.
Add note about why we are adding the project to the master list.
Make sure if we are replacing a prev version, remove from global
list.
(ede-cpp-root-file-existing)
(ede-cpp-root-project-file-for-dir)
(ede-cpp-root-count, ede-cpp-root-project-root, ede-cpp-root-load)
(ede-project-autoload cpp-root): Deleted.
(ede-project-root-directory): Return :directory instead of
calculating from :file.
(project-rescan): New.
* ede/base.el (ede-toplevel): Only use buffer cached value if
subproj not passed in.
* srecode/java.el (srecode-semantic-handle-:java): Fix case when
an EDE project didn't support java paths.
* lisp/cedet/ede/proj-elisp.el
(ede-proj-target-elisp::ede-proj-tweak-autoconf): Kill buffer
after saving modified elisp-comp script, as to avoid "file has
changed on disk; really edit the buffer" questions when script
gets rewritten.
* emacs-lisp/eieio-custom.el (eieio-customize-object): Set
eieio-cog (current group) to g, which is an improved form of input
group.
* srecode/doc-cpp.srt (mode): Set to c mode so this works with
both C and C++.
2014-11-10 01:04:30 +01:00
|
|
|
|
If CLEAR is negative, it will do a full reparse, and also display
|
2009-08-23 03:46:01 +00:00
|
|
|
|
the output buffer."
|
|
|
|
|
(interactive "P")
|
|
|
|
|
(if clear (semantic-clear-toplevel-cache))
|
|
|
|
|
(if (eq clear '-) (setq clear -1))
|
|
|
|
|
(let* ((start (current-time))
|
Prefer nil to (current-time) when either works
* doc/misc/gnus.texi (Category Syntax):
* lisp/allout-widgets.el (allout-widgets-post-command-business):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay)
(pulse-tick):
* lisp/cedet/semantic.el (bovinate):
* lisp/cedet/semantic/analyze.el:
(semantic-analyze-current-symbol-default, semantic-adebug-analyze):
* lisp/cedet/semantic/analyze/refs.el (semantic-analyze-current-tag):
* lisp/cedet/semantic/lex.el (semantic-lex-test):
* lisp/cedet/semantic/symref/filter.el:
(semantic-symref-test-count-hits-in-tag):
* lisp/cedet/srecode/dictionary.el (srecode-adebug-dictionary):
* lisp/cedet/srecode/map.el (srecode-adebug-maps):
* lisp/desktop.el (desktop-create-buffer):
* lisp/emacs-lisp/benchmark.el (benchmark-elapse):
* lisp/emacs-lisp/elp.el (elp--make-wrapper):
* lisp/epa.el (epa--show-key):
* lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p):
* lisp/gnus/gnus-agent.el (gnus-agent-fetch-articles)
(gnus-agent-expire-group-1, gnus-agent-store-article):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-cloud.el (gnus-cloud-update-newsrc-data)
(gnus-cloud-collect-full-newsrc):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/gnus-html.el (gnus-html-cache-expired):
* lisp/gnus/gnus-score.el (gnus-score-load-file)
(gnus-decay-scores):
* lisp/gnus/nndiary.el (nndiary-expired-article-p):
* lisp/gnus/nnmail.el (nnmail-expired-article-p):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/gnus/score-mode.el (gnus-score-edit-insert-date):
* lisp/image/gravatar.el (gravatar-cache-expired):
* lisp/net/newst-backend.el (newsticker--image-get)
(newsticker--cache-mark-expired):
* lisp/nxml/rng-maint.el (rng-time-function):
* lisp/org/org-agenda.el (org-agenda-to-appt):
* lisp/org/org-clock.el (org-clock-resolve-clock)
(org-clock-resolve, org-resolve-clocks-if-idle):
* lisp/org/org-colview.el (org-columns-edit-value, org-columns)
(org-columns-compute-all, org-agenda-columns):
* lisp/org/org-element.el (org-element--cache-interrupt-p)
(org-element--cache-sync):
* lisp/org/org-habit.el (org-habit-get-faces)
(org-habit-insert-consistency-graphs):
* lisp/org/org-indent.el (org-indent-add-properties):
* lisp/org/org-timer.el (org-timer-start)
(org-timer-pause-or-continue, org-timer-seconds)
(org-timer-show-remaining-time, org-timer-set-timer):
* lisp/org/org.el (org-babel-load-file, org-current-time)
(org-today, org-auto-repeat-maybe, org-read-date-analyze)
(org-small-year-to-year, org-goto-calendar):
* lisp/org/ox.el (org-export-insert-default-template):
* lisp/time.el (emacs-uptime):
* lisp/type-break.el (type-break-mode, type-break)
(type-break-time-warning-schedule, type-break-check):
* lisp/url/url-cache.el (url-cache-expired):
* lisp/url/url.el (url-retrieve-synchronously):
* test/lisp/char-fold-tests.el (char-fold--speed-test):
* test/manual/cedet/semantic-ia-utest.el:
(semantic-symref-test-count-hits-in-tag):
* test/manual/cedet/semantic-tests.el (semantic-idle-pnf-test)
(semantic-lex-test-full-depth):
Use nil instead of (current-time) where either will do, as nil is
a bit more efficient and should have less timing error.
2017-10-20 19:40:09 -07:00
|
|
|
|
(out (semantic-fetch-tags)))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(message "Retrieving tags took %.2f seconds."
|
Prefer nil to (current-time) when either works
* doc/misc/gnus.texi (Category Syntax):
* lisp/allout-widgets.el (allout-widgets-post-command-business):
* lisp/cedet/ede/detect.el (ede-detect-qtest):
* lisp/cedet/pulse.el (pulse-momentary-highlight-overlay)
(pulse-tick):
* lisp/cedet/semantic.el (bovinate):
* lisp/cedet/semantic/analyze.el:
(semantic-analyze-current-symbol-default, semantic-adebug-analyze):
* lisp/cedet/semantic/analyze/refs.el (semantic-analyze-current-tag):
* lisp/cedet/semantic/lex.el (semantic-lex-test):
* lisp/cedet/semantic/symref/filter.el:
(semantic-symref-test-count-hits-in-tag):
* lisp/cedet/srecode/dictionary.el (srecode-adebug-dictionary):
* lisp/cedet/srecode/map.el (srecode-adebug-maps):
* lisp/desktop.el (desktop-create-buffer):
* lisp/emacs-lisp/benchmark.el (benchmark-elapse):
* lisp/emacs-lisp/elp.el (elp--make-wrapper):
* lisp/epa.el (epa--show-key):
* lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p):
* lisp/gnus/gnus-agent.el (gnus-agent-fetch-articles)
(gnus-agent-expire-group-1, gnus-agent-store-article):
* lisp/gnus/gnus-art.el (article-lapsed-string):
* lisp/gnus/gnus-cloud.el (gnus-cloud-update-newsrc-data)
(gnus-cloud-collect-full-newsrc):
* lisp/gnus/gnus-group.el (gnus-group-timestamp-delta):
* lisp/gnus/gnus-html.el (gnus-html-cache-expired):
* lisp/gnus/gnus-score.el (gnus-score-load-file)
(gnus-decay-scores):
* lisp/gnus/nndiary.el (nndiary-expired-article-p):
* lisp/gnus/nnmail.el (nnmail-expired-article-p):
* lisp/gnus/nnmaildir.el (nnmaildir--scan):
* lisp/gnus/score-mode.el (gnus-score-edit-insert-date):
* lisp/image/gravatar.el (gravatar-cache-expired):
* lisp/net/newst-backend.el (newsticker--image-get)
(newsticker--cache-mark-expired):
* lisp/nxml/rng-maint.el (rng-time-function):
* lisp/org/org-agenda.el (org-agenda-to-appt):
* lisp/org/org-clock.el (org-clock-resolve-clock)
(org-clock-resolve, org-resolve-clocks-if-idle):
* lisp/org/org-colview.el (org-columns-edit-value, org-columns)
(org-columns-compute-all, org-agenda-columns):
* lisp/org/org-element.el (org-element--cache-interrupt-p)
(org-element--cache-sync):
* lisp/org/org-habit.el (org-habit-get-faces)
(org-habit-insert-consistency-graphs):
* lisp/org/org-indent.el (org-indent-add-properties):
* lisp/org/org-timer.el (org-timer-start)
(org-timer-pause-or-continue, org-timer-seconds)
(org-timer-show-remaining-time, org-timer-set-timer):
* lisp/org/org.el (org-babel-load-file, org-current-time)
(org-today, org-auto-repeat-maybe, org-read-date-analyze)
(org-small-year-to-year, org-goto-calendar):
* lisp/org/ox.el (org-export-insert-default-template):
* lisp/time.el (emacs-uptime):
* lisp/type-break.el (type-break-mode, type-break)
(type-break-time-warning-schedule, type-break-check):
* lisp/url/url-cache.el (url-cache-expired):
* lisp/url/url.el (url-retrieve-synchronously):
* test/lisp/char-fold-tests.el (char-fold--speed-test):
* test/manual/cedet/semantic-ia-utest.el:
(semantic-symref-test-count-hits-in-tag):
* test/manual/cedet/semantic-tests.el (semantic-idle-pnf-test)
(semantic-lex-test-full-depth):
Use nil instead of (current-time) where either will do, as nil is
a bit more efficient and should have less timing error.
2017-10-20 19:40:09 -07:00
|
|
|
|
(semantic-elapsed-time start nil))
|
Update from CEDET trunk.
* grammars/c.by (template-type): Add :template-specifier and
:typevar to capture extra details about the template.
(opt-post-fcn-modifiers): Splice in the found symbol into the
return value correctly.
(QUESTION): New punctuation.
(expression): Add ternary conditional support.
* grammars/scheme.by (MODULE): New token.
(scheme): Handle expanding the MODULE tag.
(scheme-list): Remove closeparen required match.
(scheme-in-list): Remove extraneous matches for DEFINE. Add
support for MODULE Simplify matching for code & make work.
(name-args, name-arg-list, name-arg-expand): Make it work.
* semantic.el (semantic-mode): Add/remove 3
completion-at-point-functions.
(semantic-completion-at-point-function): Removed.
(semantic-analyze-completion-at-point-function)
(semantic-analyze-notc-completion-at-point-function)
(semantic-analyze-nolongprefix-completion-at-point-function): New
completion at point functions.
* semantic/doc.el (semantic-doc-snarf-comment-for-tag): Fix case
when comment-end is empty string.
* semantic/debug.el
(semantic-debug-parser-debugger-source): New buffer local
variable.
(semantic-debug-interface): Add 'nil' initform to overlays.
(semantic-debug-mode): Remove read-only tags from buffers on exit.
(semantic-debug): Add autoload cookie. Force the language
specific debugger to load.
* semantic/db.el (generic::semanticdb-full-filename): New generic
method to allow this method to be used on buffer names via an
associated database.
* semantic/symref.el
(semantic-symref-cleanup-recent-buffers-fcn): When cleaning up
buffers, don't clean up buffers that are being used (i.e., in a
window) when the hook fires.
(semantic-symref-recently-opened-buffers): New tracking variable.
(semantic-symref-cleanup-recent-buffers-fcn): New hook fcn.
(semantic-symref-result-get-tags): Move logic into
`semantic-symref-hit-to-tag-via-buffer', and cleanup buffers via
the symref cleanup function in post-command-hook.
(semantic-symref-hit-to-tag-via-buffer): Logic that used to be
from above.
(semantic-symref-hit-to-tag-via-db): New.
* semantic/analyze.el:
(semantic-analyze-find-tag-sequence-default): If first entry in
sequence is the only one, apply tagclass filter.
(semantic-analyze-princ-sequence): Show slot even if empty.
(semantic-analyze-find-tag-sequence)
(semantic-analyze-find-tag-sequence-default): Add flags argument.
Add support for forcing the final entry of the sequence to be of
class variable.
(semantic-analyze-find-tag): Fix bug where input class filter was
ignored if there was a typecache match.
(semantic-analyze-current-context-default): For assignments, the
assignee now must be of class variable.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): Add
'no-longprefix' flag. When used, the prefix and prefixtypes are
shortened to just the last symbol.
* semantic/bovine/c.el (semantic-c-do-lex-if): Catch errors from
'hideif', and push to the parser warning stack.
(semantic-lex-cpp-define): When a comment is at the end of a
macro, do not subtract an extra 1 from the found position. Fixes
bug with: #define foo (a)/**/ adding an extra ')' to the stream.
* semantic/bovine/scm.el (semantic-lex-scheme-symbol): Allow
symbols to be one char long.
* semantic/bovine/grammar.el
(bovine-grammar-calculate-source-on-path): New.
(bovine-grammar-setupcode-builder): Use it.
* ede.el (ede/detect): New require.
(ede-version): Bump version
(ede-initialize-state-current-buffer): Use new
`ede-detect-directory-for-project' to detect projects first
instead of depending on currente dir only.
(ede-delete-project-from-global-list): New.
(ede-flush-deleted-projects): Use above.
(ede-check-project-query-fcn): New variable
(ede-check-project-directory): Use above when querying the user.
Added to support unit testing of this security measure.
(ede-initialize-state-current-buffer): Use
`ede-directory-project-cons' instead of the -detect- fcn to take
advantage of the cache. Pass found project into
`ede-load-project-file'.
(ede-load-project-file): Add new input DETECTIN.
(ede-rescan-toplevel): Get the proj root a better way.
(ede-load-project-file): Return the loaded object. When asking
for existing project, ask for an exact match.
(ede-initialize-state-current-buffer): Simplify some conditional
logic.
(ede-load-project-file): Simplify conditional logic.
(ede-global-list-sanity-check): New Testing fcn.
(ede-parent-project): Replace old code with call to faster
`ede-find-subproject-for-directory'.
(ede-load-project-file): Use
`ede-directory-get-toplevel-open-project' instead of above
deleted. Rename "pfc" to "autoloader". Use
`ede-directory-project-cons' to detect a project. Delete no
project found case where we search up the tree.
* ede/auto.el (ede-project-autoload): Fix doc typo. Add
`:root-only' slot.
(ede-auto-load-project): Doc update: warn to not use.
(ede-dir-to-projectfile): Deleted.
(ede-project-autoload-dirmatch): Add subdir-only slot. Make
configdatastash unbound by default.
(ede-do-dirmatch): If subdir-only is true, then don't allow exact
matches. Account for configdatastash as unbound. Assume value of
nil means no tool installed. Make sure loaded path matches from
beginning. Stash the regexp, not the raw string.
(ede-project-class-files): Note that makefile and automake are not
root only.
(ede-auto-detect-in-dir): New (for use with `ede/detect.el').
(ede-project-dirmatch-p): Deleted.
(ede-project-root-directory): Remove body, return nil.
(ede-project-autoload): :proj-root-dirmatch can be null & doc fix.
(ede-auto-detect-in-dir): If there is no :proj-file, check for a
dirmatch.
* ede/generic.el (ede/config): Replace require of ede.
(ede-generic-new-autoloader): Generic projects are now safe by
default. Note this is NOT a root only project.
(project-rescan, ede-project-root, ede-generic-target-java)
(ede-java-classpath, ede-find-subproject-for-directory): New.
(ede-enable-generic-projects): Add new autoloaders for git, bzr,
hg, sv, CVS.
(ede-generic-vc-project)
(ede-generic-vc-project::ede-generic-setup-configuration): New.
(ede-generic-config): Remove slots: c-include-path,
c-preprocessor-table, c-preprocessor-files, classpath,
build-command, debug-command, run command. Inherit from
ede-extra-config-build, ede-extra-config-program. Make
run-command :value match :custom so only strings are accepted.
Add some more :group slot specifiers.
(ede-generic-project): Add mixins `ede-project-with-config-c' and
`ede-project-with-config-java'. Inherit from
`ede-project-with-config-build',
`ede-project-with-config-program'. Subclass
`ede-project-with-config'. Remove duplication from new baseclass.
(ede-generic-target): Inherit from `ede-target-with-config-build',
`ede-target-with-config-program'. Subclass `ede-target-with-config'.
(ede-generic-target-c-cpp): Add mixin `ede-target-with-config-c'.
(ede-generic-target-java): Add mixin `ede-target-with-config-java'.
(ede-preprocessor-map, ede-system-include-path)
(edejava-classpath): Deleted, moved to config.el.
(project-compile-project, project-compile-target)
(project-debug-target, project-run-target): Deleted.
(ede-generic-get-configuration, ede-generic-setup-configuration)
(ede-commit-project, project-rescan)
(ede-generic-project::ede-customize)
(ede-generic-target::ede-customize)
(ede-generic-config::eieio-done-customizing)
(ede-generic-config::ede-commit): Deleted. Subsumed by new
baseclass.
(ede-preprocessor-map, ede-system-include-path)
(project-debug-target, project-run-target): Call new
`ede-config-get-configuration' instead of old version.
(ede-generic-load): Do not add to global list here.
* ede/files.el (ede-find-project-root)
(ede-files-find-existing)
(ede-directory-get-toplevel-open-project-new): Deleted.
(ede-project-root-directory): Use `ede-project-root' first.
(ede-project-directory-remove-hash)
(ede--directory-project-from-hash)
(ede--directory-project-add-description-to-hash): Rename to make
internal symbols (via --). Expand input dir first.
(ede-directory-project-p): Doc fix (note obsoleted.)
(ede-toplevel-project-or-nil): Alias to `ede-toplevel-project'.
(ede-toplevel-project): Doc Fix. Delete commented out old code.
Simplify returning result from ede-detect-directory-for-project.
(ede-directory-get-open-project): Support when
inodes are disabled. If disabled to str compare on root project.
(ede-directory-get-toplevel-open-project): Enabled nested
projects. When doing directory name matching, save the 'short'
version of an answer (non-exact match) and eventually select the
shortest answer at the end. Expand the filename of tested
projects. Better support for when inodes are disabled. Add
'exact' option so that it will return a project that is an exact
match.
(ede-find-subproject-for-directory): Small optimization to run
`file-truename' less often.
(ede-directory-project-p): Move content, then use
`ede-directory-project-cons'. Use
`ede-detect-directory-for-project', replacing old detection loop.
(ede-directory-project-cons): New, from above.
(ede-toplevel-project): Toss old scanning code. Use
`ede-detect-directory-for-project' instead.
(ede-directory-get-toplevel-open-project-new): New.
* ede/linux.el (ede-linux-project-root): Deleted.
(ede-project-autoload): Remove dirmatch entry - it is no longer
needed.
* lisp/cedet/ede/proj.el (project-rescan): Replace direct
manipulation of `ede-projects' with equivalent and better
functions.
(ede-proj-load): Replace call to test if dir has project to
explicity ask filesystem if Project.ede is there.
* ede/config.el:
* ede/detect.el: New files.
* ede/project-am.el (project-run-target): Add "./" to program to
run for systems where '.' isn't in PATH.
(project-am-load): Remove old code regarding `ede-constructing'.
Just read in the makefiles.
* ede/linux.el (ede-linux-load): Do not add to global list here.
Don't check for existing anymore.
(project-rescan): New.
(ede-linux-project-list, ede-linux-file-existing): Deleted.
(ede-linux-project-root): Delete body. Need symbol for autoloads
for now.
(ede-linux-project): No longer instance tracker.
(ede-project-autoload): Don't provide :proj-root
* ede/emacs.el (ede-emacs-load): Do not add project to global list
here. Don't look for existing first.
(ede-project-autoload): Remove dirmatch entry - it is no longer
needed. Don't provide proj-root anymore.
(ede-emacs-project-list, ede-emacs-file-existing): Delete.
(ede-emacs-project-root): Remove body (need symbol for loaddefs
still).
(ede-emacs-project): Do not instance track anymore.
* ede/cpp-root.el (initialize-instance): Remove commented code.
Add note about why we are adding the project to the master list.
Make sure if we are replacing a prev version, remove from global
list.
(ede-cpp-root-file-existing)
(ede-cpp-root-project-file-for-dir)
(ede-cpp-root-count, ede-cpp-root-project-root, ede-cpp-root-load)
(ede-project-autoload cpp-root): Deleted.
(ede-project-root-directory): Return :directory instead of
calculating from :file.
(project-rescan): New.
* ede/base.el (ede-toplevel): Only use buffer cached value if
subproj not passed in.
* srecode/java.el (srecode-semantic-handle-:java): Fix case when
an EDE project didn't support java paths.
* lisp/cedet/ede/proj-elisp.el
(ede-proj-target-elisp::ede-proj-tweak-autoconf): Kill buffer
after saving modified elisp-comp script, as to avoid "file has
changed on disk; really edit the buffer" questions when script
gets rewritten.
* emacs-lisp/eieio-custom.el (eieio-customize-object): Set
eieio-cog (current group) to g, which is an improved form of input
group.
* srecode/doc-cpp.srt (mode): Set to c mode so this works with
both C and C++.
2014-11-10 01:04:30 +01:00
|
|
|
|
(when (or (null clear) (not (listp clear))
|
|
|
|
|
(and (numberp clear) (< 0 clear)))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(pop-to-buffer "*Parser Output*")
|
|
|
|
|
(require 'pp)
|
|
|
|
|
(erase-buffer)
|
|
|
|
|
(insert (pp-to-string out))
|
|
|
|
|
(goto-char (point-min)))))
|
|
|
|
|
|
|
|
|
|
;;; Functions of the parser plug-in API
|
|
|
|
|
;;
|
|
|
|
|
;; Overload these functions to create new types of parsers.
|
|
|
|
|
;;
|
|
|
|
|
(define-overloadable-function semantic-parse-stream (stream nonterminal)
|
|
|
|
|
"Parse STREAM, starting at the first NONTERMINAL rule.
|
|
|
|
|
For bovine and wisent based parsers, STREAM is from the output of
|
2010-01-18 05:39:40 +01:00
|
|
|
|
`semantic-lex', and NONTERMINAL is a rule in the appropriate language
|
2009-08-23 03:46:01 +00:00
|
|
|
|
specific rules file.
|
|
|
|
|
The default parser table used for bovine or wisent based parsers is
|
|
|
|
|
`semantic--parse-table'.
|
|
|
|
|
|
|
|
|
|
Must return a list: (STREAM TAGS) where STREAM is the unused elements
|
2010-01-18 05:39:40 +01:00
|
|
|
|
from STREAM, and TAGS is the list of semantic tags found; usually only
|
|
|
|
|
one tag is returned with the exception of compound statements.")
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-parse-changes ()
|
|
|
|
|
"Reparse changes in the current buffer.
|
|
|
|
|
The list of changes are tracked as a series of overlays in the buffer.
|
|
|
|
|
When overloading this function, use `semantic-changes-in-region' to
|
|
|
|
|
analyze.")
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-parse-region
|
|
|
|
|
(start end &optional nonterminal depth returnonerror)
|
|
|
|
|
"Parse the area between START and END, and return any tags found.
|
|
|
|
|
If END needs to be extended due to a lexical token being too large, it
|
|
|
|
|
will be silently ignored.
|
|
|
|
|
|
|
|
|
|
Optional arguments:
|
|
|
|
|
NONTERMINAL is the rule to start parsing at.
|
2011-11-20 04:48:53 +01:00
|
|
|
|
DEPTH specifies the lexical depth to descend for parsers that use
|
2009-08-23 03:46:01 +00:00
|
|
|
|
lexical analysis as their first step.
|
|
|
|
|
RETURNONERROR specifies that parsing should stop on the first
|
|
|
|
|
unmatched syntax encountered. When nil, parsing skips the syntax,
|
|
|
|
|
adding it to the unmatched syntax cache.
|
|
|
|
|
|
2011-11-22 23:03:56 -08:00
|
|
|
|
Must return a list of semantic tags which have been cooked
|
2009-08-23 03:46:01 +00:00
|
|
|
|
\(repositioned properly) but which DO NOT HAVE OVERLAYS associated
|
|
|
|
|
with them. When overloading this function, use `semantic--tag-expand'
|
|
|
|
|
to cook raw tags.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-parse-region-default
|
|
|
|
|
(start end &optional nonterminal depth returnonerror)
|
|
|
|
|
"Parse the area between START and END, and return any tags found.
|
2010-01-18 05:39:40 +01:00
|
|
|
|
If END needs to be extended due to a lexical token being too large,
|
|
|
|
|
it will be silently ignored.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
Optional arguments:
|
|
|
|
|
NONTERMINAL is the rule to start parsing at if it is known.
|
|
|
|
|
DEPTH specifies the lexical depth to scan.
|
|
|
|
|
RETURNONERROR specifies that parsing should end when encountering
|
|
|
|
|
unterminated syntax."
|
|
|
|
|
(when (or (null semantic--parse-table) (eq semantic--parse-table t))
|
|
|
|
|
;; If there is no table, or it was set to t, then we are here by
|
|
|
|
|
;; some other mistake. Do not throw an error deep in the parser.
|
|
|
|
|
(error "No support found to parse buffer %S" (buffer-name)))
|
|
|
|
|
(save-restriction
|
|
|
|
|
(widen)
|
|
|
|
|
(when (or (< end start) (> end (point-max)))
|
|
|
|
|
(error "Invalid parse region bounds %S, %S" start end))
|
Merge with CEDET upstream (rev. 8499).
lisp/
* eieio/eieio-datadebug.el (data-debug/eieio-insert-slots):
Inhibit read only while inserting objects.
lisp/cedet/
* semantic.el (navigate-menu): Yank Tag :enable. Make sure
`senator-tag-ring' is bound.
(semantic-parse-region-default): Stop reversing the output of
parse-whole-stream.
(semantic-repeat-parse-whole-stream): Append returned tags
differently, so they come out in the right order.
* semantic/sb.el (semantic-sb-filter-tags-of-class): New option.
(semantic-sb-fetch-tag-table): Filter tags being bucketed to exclude
tags belonging to above filtered classes.
* semantic/find.el (semantic-filter-tags-by-class): New function.
* semantic/tag-ls.el (semantic-tag-similar-p-default): Add
short-circuit in case tag1 and 2 are identical.
* semantic/analyze/fcn.el
(semantic-analyze-dereference-metatype-stack): Use
`semantic-tag-similar-p' instead of 'eq' when comparing two tags
during metatype evaluation in case they are the same, but not the same
node. (Tweaked patch from Tomasz Gajewski) (Tiny change)
* semantic/db-find.el (semanticdb-partial-synchronize): Fix require to
semantic/db-typecache to be correct.
(semanticdb-find-tags-external-children-of-type): Make this a brutish
search by default.
* semantic/sort.el (semantic-tag-external-member-children-default):
When calling `semanticdb-find-tags-external-children-of-type', pass in
the input tag as the place to start searching for externally defined
methods.
* semantic/db-file.el (semanticdb-default-save-directory): Doc
fix: Add ref to default value.
* semantic/complete.el (semantic-complete-post-command-hook): When
detecting if cursor is outside completion area, do so if cursor moves
before start of overlay, or the original starting location of the
overlay (i.e., if user deletes past beginning of the overlay region).
(semantic-complete-inline-tag-engine): Initialize original start of
`semantic-complete-inline-overlay'.
* semantic/bovine/c.el (semantic-c-describe-environment): Update some
section titles. Test semanticdb table before printing it.
(semantic-c-reset-preprocessor-symbol-map): Update
`semantic-lex-spp-macro-symbol-obarray' outside the loop over all the
files contributing to its value.
(semantic-c-describe-environment): If there is an EDE project but no
spp symbols from it, say so.
* srecode/args.el (srecode-semantic-handle-:project): New argument
handler. Provide variable values if not in an EDE project.
* srecode/srt-mode.el (srecode-template-mode): Fix typo on srecode
name.
* srecode/cpp.el (srecode-semantic-handle-:c): Replace all characters
in FILENAME_SYMBOL that aren't valid CPP symbol chars.
* srecode/map.el (srecode-map-validate-file-for-mode): Force semantic
to load if it is not active in the template being added to the map.
* srecode/srt.el: Add local variables for setting the autoload file
name.
(srecode-semantic-handle-:srt): New autoload cookie
* ede.el (ede-apply-preprocessor-map): Apply map to
`semantic-lex-spp-project-macro-symbol-obarray' instead of the system
one. Add require for semantic.
* ede/proj-elisp.el (ede-update-version-in-source): In case a file has
both a version variable and a Version: comment, always use
`call-next-method'.
* ede/cpp-root.el (ede-set-project-variables): Deleted.
`ede-preprocessor-map' does the job this function was attempting to do
with :spp-table.
(ede-preprocessor-map): Update file tests to provide better messages.
Do not try to get symbols from a file that is the file in the current
buffer.
* ede/base.el (ede-project-placeholder): Add more documentation to
:file slot.
(ede-load-cache): Use `insert-file-contents' instead of
`find-file-noselect' in order to avoid activating other tools.
* semantic/bovine/c.el (semantic-get-local-variables): Also add a new
variable 'this' if we are in an inline member function. For detecting
this, we check overlays at point if there is a class spanning the
current function. Also, the variable 'this' has to be a pointer.
* semantic/bovine/gcc.el (semantic-gcc-setup): Fail gracefully when
querying g++ for defines returns an error.
* srecode/srt-mode.el:
* srecode/compile.el:
* semantic/elp.el:
* semantic/db-el.el:
* semantic/complete.el:
* ede.el:
* cogre.el:
* srecode/table.el:
* srecode/mode.el:
* srecode/insert.el:
* srecode/compile.el:
* semantic/decorate/include.el:
* semantic/db.el:
* semantic/adebug.el:
* ede/auto.el:
* srecode/dictionary.el:
* semantic/ede-grammar.el:
* semantic/db.el:
* semantic/db-find.el:
* semantic/db-file.el:
* semantic/complete.el:
* semantic/bovine/c.el:
* semantic/analyze.el:
* ede/util.el:
* ede/proj.el:
* ede/proj-elisp.el:
* ede/pconf.el:
* ede/locate.el:
* ede.el: Adapt to EIEIO namespace cleanup: Rename `object-name' to
`eieio-object-name', `object-set-name-string' to
`eieio-object-set-name-string', `object-class' to
`eieio-object-class', `class-parent' to `eieio-class-parent',
`class-parents' to `eieio-class-parents', `class-children' to
`eieio-class-children', `object-name-string' to
`eieio-object-name-string', `object-class-fast' to
`eieio--object-class'. Also replace direct access with new accessor
functions.
* ede/cpp-root.el (ede-project-autoload, initialize-instance): Fix EDE
file symbol to match rename. Fix ede-cpp-root symbol to include
-project in name.
* cedet-files.el (cedet-files-list-recursively): New function.
Recursively find files whose names are matching to given regex
* ede.el (ede-current-project): Rewrite to avoid imperative style.
* ede/files.el (ede-find-file): Simplify code.
* ede/base.el (ede-normalize-file/directory): Add function to
normalize :file or :directory slots if they are missing.
* ede/cpp-root.el (ede-cpp-root-project): Add compile-command slot.
(project-compile-project): Compiles project using value specified in
:compule-command slot or in compile-command local variable. Value of
slot or local variable could be string or function that receives
project and should return string that will be invoked as command.
(project-compile-target): Invokes compilation of whole project
* ede/files.el (ede-find-project-root): New function to find root of
project that contains specific file.
(ede-files-find-existing): New function which checks presence of given
directory in the list of registered projects.
etc/
* srecode/ede-autoconf.srt: Change Copyright to FSF.
(ede-empty): Change AC_INIT to use PROJECT_NAME, and PROJECT_VERSION.
* srecode/ede-make.srt (ede-empty): Add a dependency on :project. Add
header comment specifying the project's relative path.
* srecode/c.srt (header_guard): Upcase the filename symbol.
* srecode/java.srt (empty-main): New.
(class-tag): Decapitalize class.
2013-03-21 23:11:03 +01:00
|
|
|
|
(semantic-repeat-parse-whole-stream
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(or (cdr (assq start semantic-lex-block-streams))
|
|
|
|
|
(semantic-lex start end depth))
|
Merge with CEDET upstream (rev. 8499).
lisp/
* eieio/eieio-datadebug.el (data-debug/eieio-insert-slots):
Inhibit read only while inserting objects.
lisp/cedet/
* semantic.el (navigate-menu): Yank Tag :enable. Make sure
`senator-tag-ring' is bound.
(semantic-parse-region-default): Stop reversing the output of
parse-whole-stream.
(semantic-repeat-parse-whole-stream): Append returned tags
differently, so they come out in the right order.
* semantic/sb.el (semantic-sb-filter-tags-of-class): New option.
(semantic-sb-fetch-tag-table): Filter tags being bucketed to exclude
tags belonging to above filtered classes.
* semantic/find.el (semantic-filter-tags-by-class): New function.
* semantic/tag-ls.el (semantic-tag-similar-p-default): Add
short-circuit in case tag1 and 2 are identical.
* semantic/analyze/fcn.el
(semantic-analyze-dereference-metatype-stack): Use
`semantic-tag-similar-p' instead of 'eq' when comparing two tags
during metatype evaluation in case they are the same, but not the same
node. (Tweaked patch from Tomasz Gajewski) (Tiny change)
* semantic/db-find.el (semanticdb-partial-synchronize): Fix require to
semantic/db-typecache to be correct.
(semanticdb-find-tags-external-children-of-type): Make this a brutish
search by default.
* semantic/sort.el (semantic-tag-external-member-children-default):
When calling `semanticdb-find-tags-external-children-of-type', pass in
the input tag as the place to start searching for externally defined
methods.
* semantic/db-file.el (semanticdb-default-save-directory): Doc
fix: Add ref to default value.
* semantic/complete.el (semantic-complete-post-command-hook): When
detecting if cursor is outside completion area, do so if cursor moves
before start of overlay, or the original starting location of the
overlay (i.e., if user deletes past beginning of the overlay region).
(semantic-complete-inline-tag-engine): Initialize original start of
`semantic-complete-inline-overlay'.
* semantic/bovine/c.el (semantic-c-describe-environment): Update some
section titles. Test semanticdb table before printing it.
(semantic-c-reset-preprocessor-symbol-map): Update
`semantic-lex-spp-macro-symbol-obarray' outside the loop over all the
files contributing to its value.
(semantic-c-describe-environment): If there is an EDE project but no
spp symbols from it, say so.
* srecode/args.el (srecode-semantic-handle-:project): New argument
handler. Provide variable values if not in an EDE project.
* srecode/srt-mode.el (srecode-template-mode): Fix typo on srecode
name.
* srecode/cpp.el (srecode-semantic-handle-:c): Replace all characters
in FILENAME_SYMBOL that aren't valid CPP symbol chars.
* srecode/map.el (srecode-map-validate-file-for-mode): Force semantic
to load if it is not active in the template being added to the map.
* srecode/srt.el: Add local variables for setting the autoload file
name.
(srecode-semantic-handle-:srt): New autoload cookie
* ede.el (ede-apply-preprocessor-map): Apply map to
`semantic-lex-spp-project-macro-symbol-obarray' instead of the system
one. Add require for semantic.
* ede/proj-elisp.el (ede-update-version-in-source): In case a file has
both a version variable and a Version: comment, always use
`call-next-method'.
* ede/cpp-root.el (ede-set-project-variables): Deleted.
`ede-preprocessor-map' does the job this function was attempting to do
with :spp-table.
(ede-preprocessor-map): Update file tests to provide better messages.
Do not try to get symbols from a file that is the file in the current
buffer.
* ede/base.el (ede-project-placeholder): Add more documentation to
:file slot.
(ede-load-cache): Use `insert-file-contents' instead of
`find-file-noselect' in order to avoid activating other tools.
* semantic/bovine/c.el (semantic-get-local-variables): Also add a new
variable 'this' if we are in an inline member function. For detecting
this, we check overlays at point if there is a class spanning the
current function. Also, the variable 'this' has to be a pointer.
* semantic/bovine/gcc.el (semantic-gcc-setup): Fail gracefully when
querying g++ for defines returns an error.
* srecode/srt-mode.el:
* srecode/compile.el:
* semantic/elp.el:
* semantic/db-el.el:
* semantic/complete.el:
* ede.el:
* cogre.el:
* srecode/table.el:
* srecode/mode.el:
* srecode/insert.el:
* srecode/compile.el:
* semantic/decorate/include.el:
* semantic/db.el:
* semantic/adebug.el:
* ede/auto.el:
* srecode/dictionary.el:
* semantic/ede-grammar.el:
* semantic/db.el:
* semantic/db-find.el:
* semantic/db-file.el:
* semantic/complete.el:
* semantic/bovine/c.el:
* semantic/analyze.el:
* ede/util.el:
* ede/proj.el:
* ede/proj-elisp.el:
* ede/pconf.el:
* ede/locate.el:
* ede.el: Adapt to EIEIO namespace cleanup: Rename `object-name' to
`eieio-object-name', `object-set-name-string' to
`eieio-object-set-name-string', `object-class' to
`eieio-object-class', `class-parent' to `eieio-class-parent',
`class-parents' to `eieio-class-parents', `class-children' to
`eieio-class-children', `object-name-string' to
`eieio-object-name-string', `object-class-fast' to
`eieio--object-class'. Also replace direct access with new accessor
functions.
* ede/cpp-root.el (ede-project-autoload, initialize-instance): Fix EDE
file symbol to match rename. Fix ede-cpp-root symbol to include
-project in name.
* cedet-files.el (cedet-files-list-recursively): New function.
Recursively find files whose names are matching to given regex
* ede.el (ede-current-project): Rewrite to avoid imperative style.
* ede/files.el (ede-find-file): Simplify code.
* ede/base.el (ede-normalize-file/directory): Add function to
normalize :file or :directory slots if they are missing.
* ede/cpp-root.el (ede-cpp-root-project): Add compile-command slot.
(project-compile-project): Compiles project using value specified in
:compule-command slot or in compile-command local variable. Value of
slot or local variable could be string or function that receives
project and should return string that will be invoked as command.
(project-compile-target): Invokes compilation of whole project
* ede/files.el (ede-find-project-root): New function to find root of
project that contains specific file.
(ede-files-find-existing): New function which checks presence of given
directory in the list of registered projects.
etc/
* srecode/ede-autoconf.srt: Change Copyright to FSF.
(ede-empty): Change AC_INIT to use PROJECT_NAME, and PROJECT_VERSION.
* srecode/ede-make.srt (ede-empty): Add a dependency on :project. Add
header comment specifying the project's relative path.
* srecode/c.srt (header_guard): Upcase the filename symbol.
* srecode/java.srt (empty-main): New.
(class-tag): Decapitalize class.
2013-03-21 23:11:03 +01:00
|
|
|
|
nonterminal returnonerror)))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
;;; Parsing functions
|
|
|
|
|
;;
|
|
|
|
|
(defun semantic-set-unmatched-syntax-cache (unmatched-syntax)
|
|
|
|
|
"Set the unmatched syntax cache.
|
|
|
|
|
Argument UNMATCHED-SYNTAX is the syntax to set into the cache."
|
|
|
|
|
;; This function is not actually called by the main parse loop.
|
|
|
|
|
;; This is intended for use by semanticdb.
|
|
|
|
|
(setq semantic-unmatched-syntax-cache unmatched-syntax
|
|
|
|
|
semantic-unmatched-syntax-cache-check nil)
|
|
|
|
|
;; Refresh the display of unmatched syntax tokens if enabled
|
|
|
|
|
(run-hook-with-args 'semantic-unmatched-syntax-hook
|
|
|
|
|
semantic-unmatched-syntax-cache))
|
|
|
|
|
|
|
|
|
|
(defun semantic-clear-unmatched-syntax-cache ()
|
|
|
|
|
"Clear the cache of unmatched syntax tokens."
|
|
|
|
|
(setq semantic-unmatched-syntax-cache nil
|
|
|
|
|
semantic-unmatched-syntax-cache-check t))
|
|
|
|
|
|
|
|
|
|
(defun semantic-unmatched-syntax-tokens ()
|
|
|
|
|
"Return the list of unmatched syntax tokens."
|
|
|
|
|
;; If the cache need refresh then do a full re-parse.
|
|
|
|
|
(if (semantic--umatched-syntax-needs-refresh-p)
|
|
|
|
|
;; To avoid a recursive call, temporarily disable
|
|
|
|
|
;; `semantic-unmatched-syntax-hook'.
|
|
|
|
|
(let (semantic-unmatched-syntax-hook)
|
|
|
|
|
(condition-case nil
|
|
|
|
|
(progn
|
|
|
|
|
(semantic-clear-toplevel-cache)
|
|
|
|
|
(semantic-fetch-tags))
|
|
|
|
|
(quit
|
|
|
|
|
(message "semantic-unmatched-syntax-tokens:\
|
|
|
|
|
parsing of buffer canceled"))
|
|
|
|
|
)))
|
|
|
|
|
semantic-unmatched-syntax-cache)
|
|
|
|
|
|
|
|
|
|
(defun semantic-clear-toplevel-cache ()
|
|
|
|
|
"Clear the toplevel tag cache for the current buffer.
|
|
|
|
|
Clearing the cache will force a complete reparse next time a tag list
|
|
|
|
|
is requested."
|
|
|
|
|
(interactive)
|
|
|
|
|
(run-hooks 'semantic-before-toplevel-cache-flush-hook)
|
|
|
|
|
(setq semantic--buffer-cache nil)
|
|
|
|
|
(semantic-clear-unmatched-syntax-cache)
|
|
|
|
|
(semantic-clear-parser-warnings)
|
|
|
|
|
;; Nuke all semantic overlays. This is faster than deleting based
|
|
|
|
|
;; on our data structure.
|
2019-06-20 03:14:11 +02:00
|
|
|
|
(let ((l (overlay-lists)))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(mapc 'semantic-delete-overlay-maybe (car l))
|
|
|
|
|
(mapc 'semantic-delete-overlay-maybe (cdr l))
|
|
|
|
|
)
|
|
|
|
|
(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)
|
|
|
|
|
|
|
|
|
|
(run-hook-with-args 'semantic-after-toplevel-cache-change-hook
|
|
|
|
|
semantic--buffer-cache)
|
2009-09-27 03:36:58 +00:00
|
|
|
|
|
|
|
|
|
(setq semantic--completion-cache nil))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defvar semantic-bovinate-nonterminal-check-obarray)
|
|
|
|
|
|
|
|
|
|
(defun semantic--set-buffer-cache (tagtable)
|
2010-01-18 05:39:40 +01:00
|
|
|
|
"Set the toplevel tag cache to TAGTABLE."
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(setq semantic--buffer-cache tagtable
|
2009-09-05 20:32:50 +00:00
|
|
|
|
semantic-unmatched-syntax-cache-check nil)
|
|
|
|
|
;; This is specific to the bovine parser.
|
2020-12-04 17:55:46 +01:00
|
|
|
|
(setq-local semantic-bovinate-nonterminal-check-obarray nil)
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(semantic-parse-tree-set-up-to-date)
|
|
|
|
|
(add-hook 'after-change-functions 'semantic-change-function nil t)
|
|
|
|
|
(run-hook-with-args 'semantic-after-toplevel-cache-change-hook
|
|
|
|
|
semantic--buffer-cache)
|
2009-09-27 03:36:58 +00:00
|
|
|
|
(setq semantic--completion-cache nil)
|
2009-08-23 03:46:01 +00:00
|
|
|
|
;; Refresh the display of unmatched syntax tokens if enabled
|
|
|
|
|
(run-hook-with-args 'semantic-unmatched-syntax-hook
|
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.
2020-08-14 13:40:29 +02:00
|
|
|
|
semantic-unmatched-syntax-cache))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defvar semantic-working-type 'percent
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"The type of working message to use when parsing.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
'percent means we are doing a linear parse through the buffer.
|
|
|
|
|
'dynamic means we are reparsing specific tags.")
|
|
|
|
|
|
|
|
|
|
(defvar semantic-minimum-working-buffer-size (* 1024 5)
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"The minimum size of a buffer before working messages are displayed.
|
2010-01-18 05:39:40 +01:00
|
|
|
|
Buffers smaller than this will parse silently.
|
2009-10-01 02:39:07 +00:00
|
|
|
|
Buffers larger than this will display the working progress bar.")
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defsubst semantic-parser-working-message (&optional arg)
|
|
|
|
|
"Return the message string displayed while parsing.
|
|
|
|
|
If optional argument ARG is non-nil it is appended to the message
|
|
|
|
|
string."
|
2009-09-21 19:05:56 +00:00
|
|
|
|
(concat "Parsing"
|
|
|
|
|
(if arg (format " %s" arg))
|
|
|
|
|
(if semantic-parser-name (format " (%s)" semantic-parser-name))
|
|
|
|
|
"..."))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
;;; Application Parser Entry Points
|
|
|
|
|
;;
|
|
|
|
|
;; The best way to call the parser from programs is via
|
|
|
|
|
;; `semantic-fetch-tags'. This, in turn, uses other internal
|
|
|
|
|
;; API functions which plug-in parsers can take advantage of.
|
2015-01-07 23:11:58 -05:00
|
|
|
|
(defvar semantic-parser-warnings)
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
(defun semantic-fetch-tags ()
|
|
|
|
|
"Fetch semantic tags from the current buffer.
|
|
|
|
|
If the buffer cache is up to date, return that.
|
|
|
|
|
If the buffer cache is out of date, attempt an incremental reparse.
|
|
|
|
|
If the buffer has not been parsed before, or if the incremental reparse
|
|
|
|
|
fails, then parse the entire buffer.
|
2009-10-01 02:39:07 +00:00
|
|
|
|
If a lexical error had been previously discovered and the buffer
|
2020-10-16 11:50:30 +02:00
|
|
|
|
was marked unparseable, then do nothing, and return the cache."
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(and
|
|
|
|
|
;; 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-fetch-tags-hook)
|
2020-10-16 11:50:30 +02:00
|
|
|
|
;; If the buffer was previously marked unparseable,
|
2009-08-23 03:46:01 +00:00
|
|
|
|
;; then don't waste our time.
|
|
|
|
|
(not (semantic-parse-tree-unparseable-p))
|
|
|
|
|
;; The parse tree actually needs to be refreshed
|
|
|
|
|
(not (semantic-parse-tree-up-to-date-p))
|
|
|
|
|
;; So do it!
|
|
|
|
|
(let* ((gc-cons-threshold (max gc-cons-threshold 10000000))
|
|
|
|
|
(semantic-lex-block-streams nil)
|
|
|
|
|
(res nil))
|
|
|
|
|
(garbage-collect)
|
|
|
|
|
(cond
|
|
|
|
|
|
2015-01-07 23:11:58 -05:00
|
|
|
|
;; Try the incremental parser to do a fast update.
|
|
|
|
|
((semantic-parse-tree-needs-update-p)
|
|
|
|
|
(setq res (semantic-parse-changes))
|
|
|
|
|
(if (semantic-parse-tree-needs-rebuild-p)
|
|
|
|
|
;; If the partial reparse fails, jump to a full reparse.
|
|
|
|
|
(semantic-fetch-tags)
|
|
|
|
|
;; Clear the cache of unmatched syntax tokens
|
|
|
|
|
;;
|
|
|
|
|
;; NOTE TO SELF:
|
|
|
|
|
;;
|
|
|
|
|
;; Move this into the incremental parser. This is a bug.
|
|
|
|
|
;;
|
|
|
|
|
(semantic-clear-unmatched-syntax-cache)
|
|
|
|
|
(run-hook-with-args ;; Let hooks know the updated tags
|
|
|
|
|
'semantic-after-partial-cache-change-hook res))
|
|
|
|
|
(setq semantic--completion-cache nil))
|
|
|
|
|
|
|
|
|
|
;; Parse the whole system.
|
|
|
|
|
((semantic-parse-tree-needs-rebuild-p)
|
|
|
|
|
;; Use Emacs's built-in progress-reporter (only interactive).
|
|
|
|
|
(if noninteractive
|
|
|
|
|
(setq res (semantic-parse-region (point-min) (point-max)))
|
|
|
|
|
(let ((semantic--progress-reporter
|
|
|
|
|
(and (>= (point-max) semantic-minimum-working-buffer-size)
|
|
|
|
|
(eq semantic-working-type 'percent)
|
|
|
|
|
(make-progress-reporter
|
|
|
|
|
(semantic-parser-working-message (buffer-name))
|
|
|
|
|
0 100))))
|
|
|
|
|
(setq res (semantic-parse-region (point-min) (point-max)))
|
|
|
|
|
(if semantic--progress-reporter
|
|
|
|
|
(progress-reporter-done semantic--progress-reporter))))
|
|
|
|
|
|
|
|
|
|
;; Clear the caches when we see there were no errors.
|
|
|
|
|
;; But preserve the unmatched syntax cache and warnings!
|
|
|
|
|
(let (semantic-unmatched-syntax-cache
|
|
|
|
|
semantic-unmatched-syntax-cache-check
|
|
|
|
|
semantic-parser-warnings)
|
|
|
|
|
(semantic-clear-toplevel-cache))
|
|
|
|
|
;; Set up the new overlays
|
|
|
|
|
(semantic--tag-link-list-to-buffer res)
|
|
|
|
|
;; Set up the cache with the new results
|
|
|
|
|
(semantic--set-buffer-cache res)
|
|
|
|
|
))))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
;; Always return the current parse tree.
|
|
|
|
|
semantic--buffer-cache)
|
|
|
|
|
|
|
|
|
|
(defun semantic-refresh-tags-safe ()
|
2010-01-18 05:39:40 +01:00
|
|
|
|
"Refresh the current buffer's tags safely.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
Return non-nil if the refresh was successful.
|
|
|
|
|
Return nil if there is some sort of syntax error preventing a reparse.
|
|
|
|
|
|
|
|
|
|
Does nothing if the current buffer doesn't need reparsing."
|
|
|
|
|
|
|
|
|
|
;; These checks actually occur in `semantic-fetch-tags', but if we
|
|
|
|
|
;; do them here, then all the bovination hooks are not run, and
|
|
|
|
|
;; we save lots of time.
|
|
|
|
|
(cond
|
2020-10-16 11:50:30 +02:00
|
|
|
|
;; If the buffer was previously marked unparseable,
|
2009-08-23 03:46:01 +00:00
|
|
|
|
;; then don't waste our time.
|
|
|
|
|
((semantic-parse-tree-unparseable-p)
|
|
|
|
|
nil)
|
|
|
|
|
;; The parse tree is already ok.
|
|
|
|
|
((semantic-parse-tree-up-to-date-p)
|
|
|
|
|
t)
|
|
|
|
|
(t
|
|
|
|
|
(let* ((inhibit-quit nil)
|
|
|
|
|
(lexically-safe t)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
(unwind-protect
|
|
|
|
|
;; Perform the parsing.
|
|
|
|
|
(progn
|
|
|
|
|
(when (semantic-lex-catch-errors safe-refresh
|
|
|
|
|
(save-excursion (semantic-fetch-tags))
|
|
|
|
|
nil)
|
|
|
|
|
;; If we are here, it is because the lexical step failed,
|
2011-12-04 00:02:42 -08:00
|
|
|
|
;; probably due to unterminated lists or something like that.
|
2009-08-23 03:46:01 +00:00
|
|
|
|
|
|
|
|
|
;; We do nothing, and just wait for the next idle timer
|
|
|
|
|
;; to go off. In the meantime, remember this, and make sure
|
|
|
|
|
;; no other idle services can get executed.
|
|
|
|
|
(setq lexically-safe nil))
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
;; Return if we are lexically safe
|
|
|
|
|
lexically-safe))))
|
|
|
|
|
|
|
|
|
|
;; 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
|
|
|
|
|
;; synchronize with new tags when they become available.
|
|
|
|
|
|
|
|
|
|
(defsubst semantic-fetch-available-tags ()
|
|
|
|
|
"Fetch available semantic tags from the current buffer.
|
|
|
|
|
That is, return tags currently in the cache without parsing the
|
|
|
|
|
current buffer.
|
|
|
|
|
Parse operations happen asynchronously when needed on Emacs idle time.
|
|
|
|
|
Use the `semantic-after-toplevel-cache-change-hook' and
|
|
|
|
|
`semantic-after-partial-cache-change-hook' hooks to synchronize with
|
|
|
|
|
new tags when they become available."
|
|
|
|
|
semantic--buffer-cache)
|
|
|
|
|
|
|
|
|
|
;;; Iterative parser helper function
|
|
|
|
|
;;
|
|
|
|
|
;; Iterative parsers are better than rule-based iterative functions
|
|
|
|
|
;; in that they can handle obscure errors more cleanly.
|
|
|
|
|
;;
|
|
|
|
|
;; `semantic-repeat-parse-whole-stream' abstracts this action for
|
|
|
|
|
;; other parser centric routines.
|
|
|
|
|
;;
|
|
|
|
|
(defun semantic-repeat-parse-whole-stream
|
|
|
|
|
(stream nonterm &optional returnonerror)
|
|
|
|
|
"Iteratively parse the entire stream STREAM starting with NONTERM.
|
|
|
|
|
Optional argument RETURNONERROR indicates that the parser should exit
|
|
|
|
|
with the current results on a parse error.
|
|
|
|
|
This function returns semantic tags without overlays."
|
|
|
|
|
(let ((result nil)
|
|
|
|
|
(case-fold-search semantic-case-fold)
|
|
|
|
|
nontermsym tag)
|
|
|
|
|
(while stream
|
|
|
|
|
(setq nontermsym (semantic-parse-stream stream nonterm)
|
|
|
|
|
tag (car (cdr nontermsym)))
|
|
|
|
|
(if (not nontermsym)
|
|
|
|
|
(error "Parse error @ %d" (car (cdr (car stream)))))
|
|
|
|
|
(if (eq (car nontermsym) stream)
|
|
|
|
|
(error "Parser error: Infinite loop?"))
|
|
|
|
|
(if tag
|
|
|
|
|
(if (car tag)
|
|
|
|
|
(setq tag (mapcar
|
|
|
|
|
#'(lambda (tag)
|
|
|
|
|
;; Set the 'reparse-symbol property to
|
|
|
|
|
;; NONTERM unless it was already setup
|
|
|
|
|
;; by a tag expander
|
|
|
|
|
(or (semantic--tag-get-property
|
|
|
|
|
tag 'reparse-symbol)
|
|
|
|
|
(semantic--tag-put-property
|
|
|
|
|
tag 'reparse-symbol nonterm))
|
|
|
|
|
tag)
|
|
|
|
|
(semantic--tag-expand tag))
|
Merge with CEDET upstream (rev. 8499).
lisp/
* eieio/eieio-datadebug.el (data-debug/eieio-insert-slots):
Inhibit read only while inserting objects.
lisp/cedet/
* semantic.el (navigate-menu): Yank Tag :enable. Make sure
`senator-tag-ring' is bound.
(semantic-parse-region-default): Stop reversing the output of
parse-whole-stream.
(semantic-repeat-parse-whole-stream): Append returned tags
differently, so they come out in the right order.
* semantic/sb.el (semantic-sb-filter-tags-of-class): New option.
(semantic-sb-fetch-tag-table): Filter tags being bucketed to exclude
tags belonging to above filtered classes.
* semantic/find.el (semantic-filter-tags-by-class): New function.
* semantic/tag-ls.el (semantic-tag-similar-p-default): Add
short-circuit in case tag1 and 2 are identical.
* semantic/analyze/fcn.el
(semantic-analyze-dereference-metatype-stack): Use
`semantic-tag-similar-p' instead of 'eq' when comparing two tags
during metatype evaluation in case they are the same, but not the same
node. (Tweaked patch from Tomasz Gajewski) (Tiny change)
* semantic/db-find.el (semanticdb-partial-synchronize): Fix require to
semantic/db-typecache to be correct.
(semanticdb-find-tags-external-children-of-type): Make this a brutish
search by default.
* semantic/sort.el (semantic-tag-external-member-children-default):
When calling `semanticdb-find-tags-external-children-of-type', pass in
the input tag as the place to start searching for externally defined
methods.
* semantic/db-file.el (semanticdb-default-save-directory): Doc
fix: Add ref to default value.
* semantic/complete.el (semantic-complete-post-command-hook): When
detecting if cursor is outside completion area, do so if cursor moves
before start of overlay, or the original starting location of the
overlay (i.e., if user deletes past beginning of the overlay region).
(semantic-complete-inline-tag-engine): Initialize original start of
`semantic-complete-inline-overlay'.
* semantic/bovine/c.el (semantic-c-describe-environment): Update some
section titles. Test semanticdb table before printing it.
(semantic-c-reset-preprocessor-symbol-map): Update
`semantic-lex-spp-macro-symbol-obarray' outside the loop over all the
files contributing to its value.
(semantic-c-describe-environment): If there is an EDE project but no
spp symbols from it, say so.
* srecode/args.el (srecode-semantic-handle-:project): New argument
handler. Provide variable values if not in an EDE project.
* srecode/srt-mode.el (srecode-template-mode): Fix typo on srecode
name.
* srecode/cpp.el (srecode-semantic-handle-:c): Replace all characters
in FILENAME_SYMBOL that aren't valid CPP symbol chars.
* srecode/map.el (srecode-map-validate-file-for-mode): Force semantic
to load if it is not active in the template being added to the map.
* srecode/srt.el: Add local variables for setting the autoload file
name.
(srecode-semantic-handle-:srt): New autoload cookie
* ede.el (ede-apply-preprocessor-map): Apply map to
`semantic-lex-spp-project-macro-symbol-obarray' instead of the system
one. Add require for semantic.
* ede/proj-elisp.el (ede-update-version-in-source): In case a file has
both a version variable and a Version: comment, always use
`call-next-method'.
* ede/cpp-root.el (ede-set-project-variables): Deleted.
`ede-preprocessor-map' does the job this function was attempting to do
with :spp-table.
(ede-preprocessor-map): Update file tests to provide better messages.
Do not try to get symbols from a file that is the file in the current
buffer.
* ede/base.el (ede-project-placeholder): Add more documentation to
:file slot.
(ede-load-cache): Use `insert-file-contents' instead of
`find-file-noselect' in order to avoid activating other tools.
* semantic/bovine/c.el (semantic-get-local-variables): Also add a new
variable 'this' if we are in an inline member function. For detecting
this, we check overlays at point if there is a class spanning the
current function. Also, the variable 'this' has to be a pointer.
* semantic/bovine/gcc.el (semantic-gcc-setup): Fail gracefully when
querying g++ for defines returns an error.
* srecode/srt-mode.el:
* srecode/compile.el:
* semantic/elp.el:
* semantic/db-el.el:
* semantic/complete.el:
* ede.el:
* cogre.el:
* srecode/table.el:
* srecode/mode.el:
* srecode/insert.el:
* srecode/compile.el:
* semantic/decorate/include.el:
* semantic/db.el:
* semantic/adebug.el:
* ede/auto.el:
* srecode/dictionary.el:
* semantic/ede-grammar.el:
* semantic/db.el:
* semantic/db-find.el:
* semantic/db-file.el:
* semantic/complete.el:
* semantic/bovine/c.el:
* semantic/analyze.el:
* ede/util.el:
* ede/proj.el:
* ede/proj-elisp.el:
* ede/pconf.el:
* ede/locate.el:
* ede.el: Adapt to EIEIO namespace cleanup: Rename `object-name' to
`eieio-object-name', `object-set-name-string' to
`eieio-object-set-name-string', `object-class' to
`eieio-object-class', `class-parent' to `eieio-class-parent',
`class-parents' to `eieio-class-parents', `class-children' to
`eieio-class-children', `object-name-string' to
`eieio-object-name-string', `object-class-fast' to
`eieio--object-class'. Also replace direct access with new accessor
functions.
* ede/cpp-root.el (ede-project-autoload, initialize-instance): Fix EDE
file symbol to match rename. Fix ede-cpp-root symbol to include
-project in name.
* cedet-files.el (cedet-files-list-recursively): New function.
Recursively find files whose names are matching to given regex
* ede.el (ede-current-project): Rewrite to avoid imperative style.
* ede/files.el (ede-find-file): Simplify code.
* ede/base.el (ede-normalize-file/directory): Add function to
normalize :file or :directory slots if they are missing.
* ede/cpp-root.el (ede-cpp-root-project): Add compile-command slot.
(project-compile-project): Compiles project using value specified in
:compule-command slot or in compile-command local variable. Value of
slot or local variable could be string or function that receives
project and should return string that will be invoked as command.
(project-compile-target): Invokes compilation of whole project
* ede/files.el (ede-find-project-root): New function to find root of
project that contains specific file.
(ede-files-find-existing): New function which checks presence of given
directory in the list of registered projects.
etc/
* srecode/ede-autoconf.srt: Change Copyright to FSF.
(ede-empty): Change AC_INIT to use PROJECT_NAME, and PROJECT_VERSION.
* srecode/ede-make.srt (ede-empty): Add a dependency on :project. Add
header comment specifying the project's relative path.
* srecode/c.srt (header_guard): Upcase the filename symbol.
* srecode/java.srt (empty-main): New.
(class-tag): Decapitalize class.
2013-03-21 23:11:03 +01:00
|
|
|
|
result (append result tag))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
;; No error in this case, a purposeful nil means don't
|
|
|
|
|
;; store anything.
|
|
|
|
|
)
|
|
|
|
|
(if returnonerror
|
|
|
|
|
(setq stream nil)
|
|
|
|
|
;; The current item in the stream didn't match, so add it to
|
|
|
|
|
;; the list of syntax items which didn't match.
|
|
|
|
|
(setq semantic-unmatched-syntax-cache
|
|
|
|
|
(cons (car stream) semantic-unmatched-syntax-cache))
|
|
|
|
|
))
|
|
|
|
|
;; Designated to ignore.
|
|
|
|
|
(setq stream (car nontermsym))
|
|
|
|
|
(if stream
|
2012-02-28 00:17:21 -08:00
|
|
|
|
;; Use Emacs's built-in progress reporter:
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(and (boundp 'semantic--progress-reporter)
|
|
|
|
|
semantic--progress-reporter
|
cedet/cedet.el (cedet-packages): Bump srecode version.
cedet/data-debug.el: Require `ring' for use of ring-length.
cedet/semantic.el (semantic-repeat-parse-whole-stream): Check
semantic-working-type before updating progress reporter.
cedet/semantic/adebug.el: Fix file header.
cedet/semantic/analyze.el: eval-when-compile semantic/find, for
semantic-find-tags-by-name. Declare semanticdb-strip-find-results and
semanticdb-find-tags-by-name.
cedet/semantic/chart.el: Require semantic/find, semantic/db-mode,
semantic/db-typecache, and semantic/scope.
cedet/semantic/complete.el: Declare
semantic-displayor-focus-abstract-child-p function (needed as the
semantic-displayor-focus-abstract class is defined only after used).
Move semantic-complete-inline-custom-type and
semantic-complete-inline-analyzer-displayor-class variable definitions
up, before they are used, to avoid compiler warning.
Require semantic/decorate, semantic/tag-file, eieio-opt, and
semantic/analyze/complete.
cedet/semantic/ctxt.el: Require semantic/find. Don't
eval-when-compile semantic/db
(semantic-get-local-variables): Use Emacs' built-in progress reporter
instead of working-status-forms.
cedet/semantic/db-debug.el: Require data-debug, semantic/db-mode, and
semantic/format.
cedet/semantic/db-ebrowse.el: Require semantic/db-mode, semantic/find,
semantic/sort, data-debug
(semanticdb-create-database): Require semantic/dep for
semantic-add-system-include.
(semanticdb-table-ebrowse, semanticdb-project-database-ebrowse): Move
class definitions near top of file, before they are used, to avoid
compiler warnings.
(semanticdb-ebrowse-add-tree-to-table): Use split-string.
2009-08-30 21:16:39 +00:00
|
|
|
|
(eq semantic-working-type 'percent)
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(progress-reporter-update
|
|
|
|
|
semantic--progress-reporter
|
2015-07-31 10:12:37 -07:00
|
|
|
|
(floor (* 100.0 (semantic-lex-token-start (car stream)))
|
|
|
|
|
(point-max))))))
|
2009-08-23 03:46:01 +00:00
|
|
|
|
result))
|
|
|
|
|
|
|
|
|
|
;;; Parsing Warnings:
|
|
|
|
|
;;
|
|
|
|
|
;; Parsing a buffer may result in non-critical things that we should
|
|
|
|
|
;; alert the user to without interrupting the normal flow.
|
|
|
|
|
;;
|
|
|
|
|
;; Any parser can use this API to provide a list of warnings during a
|
|
|
|
|
;; parse which a user may want to investigate.
|
Prefer defvar-local in cedet
* lisp/cedet/ede.el (ede-object-root-project)
(ede-object-project, ede-object):
* lisp/cedet/mode-local.el (mode-local-symbol-table):
* lisp/cedet/semantic.el (semantic--parse-table)
(semantic-symbol->name-assoc-list)
(semantic-symbol->name-assoc-list-for-type-parts)
(semantic-case-fold, semantic--buffer-cache)
(semantic-unmatched-syntax-cache)
(semantic-unmatched-syntax-cache-check, semantic-parser-name)
(semantic--completion-cache, semantic-parse-tree-state)
(semantic-init-mode-hook, semantic-parser-warnings):
* lisp/cedet/semantic/bovine.el
(semantic-bovinate-nonterminal-check-obarray):
* lisp/cedet/semantic/complete.el (semantic-collector-per-buffer-list):
* lisp/cedet/semantic/ctxt.el (semantic-command-separation-character)
(semantic-function-argument-separation-character):
* lisp/cedet/semantic/db-find.el (semanticdb-find-lost-includes)
(semanticdb-find-scanned-include-tags):
* lisp/cedet/semantic/db.el (semanticdb-new-database-class)
(semanticdb-default-find-index-class)
(semanticdb-current-database, semanticdb-current-table)
(semanticdb-project-system-databases)
(semanticdb-out-of-buffer-create-table-fcn):
* lisp/cedet/semantic/debug.el (semantic-debug-parser-source)
(semantic-debug-parser-class)
(semantic-debug-parser-debugger-source):
* lisp/cedet/semantic/dep.el (semantic-dependency-include-path)
(semantic-dependency-system-include-path):
* lisp/cedet/semantic/format.el (semantic-function-argument-separator)
(semantic-format-parent-separator):
* lisp/cedet/semantic/fw.el (semantic-new-buffer-fcn-was-run):
* lisp/cedet/semantic/grammar.el (semantic-grammar-macros)
(semantic--grammar-macros-regexp-1)
(semantic--grammar-macros-regexp-2):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-expandable-tag-classes):
* lisp/cedet/semantic/lex-spp.el
(semantic-lex-spp-macro-symbol-obarray)
(semantic-lex-spp-project-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray)
(semantic-lex-spp-dynamic-macro-symbol-obarray-stack):
* lisp/cedet/semantic/lex.el (semantic-flex-keywords-obarray)
(semantic-lex-types-obarray, semantic-lex-analyzer)
(semantic-lex-syntax-modifications, semantic-lex-syntax-table)
(semantic-lex-comment-regex, semantic-lex-number-expression)
(semantic-lex-depth, 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):
* lisp/cedet/semantic/senator.el (senator-isearch-semantic-mode):
* lisp/cedet/semantic/sort.el
(semantic-orphaned-member-metaparent-type):
* lisp/cedet/semantic/tag.el (semantic-tag-expand-function):
* lisp/cedet/semantic/util-modes.el (semantic-show-parser-state-string)
(semantic-stickyfunc-sticky-classes)
(semantic-highlight-func-ct-overlay):
* lisp/cedet/semantic/util.el
(semantic-type-relation-separator-character)
(semantic-equivalent-major-modes):
* lisp/cedet/semantic/wisent.el (wisent-error-function)
(wisent-lexer-function): Prefer defvar-local.
2021-01-31 16:54:54 +01:00
|
|
|
|
(defvar-local semantic-parser-warnings nil
|
2009-08-23 03:46:01 +00:00
|
|
|
|
"A list of parser warnings since the last full reparse.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-clear-parser-warnings ()
|
|
|
|
|
"Clear the current list of parser warnings for this buffer."
|
|
|
|
|
(setq semantic-parser-warnings nil))
|
|
|
|
|
|
|
|
|
|
(defun semantic-push-parser-warning (warning start end)
|
|
|
|
|
"Add a parser WARNING that covers text from START to END."
|
|
|
|
|
(setq semantic-parser-warnings
|
|
|
|
|
(cons (cons warning (cons start end))
|
|
|
|
|
semantic-parser-warnings)))
|
|
|
|
|
|
|
|
|
|
(defun semantic-dump-parser-warnings ()
|
|
|
|
|
"Dump any parser warnings."
|
|
|
|
|
(interactive)
|
|
|
|
|
(if semantic-parser-warnings
|
|
|
|
|
(let ((pw semantic-parser-warnings))
|
|
|
|
|
(pop-to-buffer "*Parser Warnings*")
|
|
|
|
|
(require 'pp)
|
|
|
|
|
(erase-buffer)
|
|
|
|
|
(insert (pp-to-string pw))
|
|
|
|
|
(goto-char (point-min)))
|
|
|
|
|
(message "No parser warnings.")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Compatibility:
|
|
|
|
|
;;
|
|
|
|
|
;; Semantic 1.x parser action helper functions, used by some parsers.
|
|
|
|
|
;; Please move away from these functions, and try using semantic 2.x
|
|
|
|
|
;; interfaces instead.
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
(defsubst semantic-bovinate-from-nonterminal
|
|
|
|
|
(start end nonterm &optional depth length)
|
|
|
|
|
"Bovinate from within a nonterminal lambda from START to END.
|
|
|
|
|
Argument NONTERM is the nonterminal symbol to start with.
|
|
|
|
|
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.
|
|
|
|
|
Optional argument LENGTH specifies we are only interested in LENGTH
|
|
|
|
|
tokens."
|
|
|
|
|
(car-safe (cdr (semantic-parse-stream
|
|
|
|
|
(semantic-lex start end (or depth 1) length)
|
|
|
|
|
nonterm))))
|
|
|
|
|
|
2009-09-21 02:14:58 +00:00
|
|
|
|
;;; User interface
|
|
|
|
|
|
2009-09-27 03:36:58 +00:00
|
|
|
|
(defun semantic-force-refresh ()
|
|
|
|
|
"Force a full refresh of the current buffer's tags.
|
|
|
|
|
Throw away all the old tags, and recreate the tag database."
|
|
|
|
|
(interactive)
|
|
|
|
|
(semantic-clear-toplevel-cache)
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(semantic-fetch-tags)
|
|
|
|
|
(message "Buffer reparsed."))
|
2009-09-27 03:36:58 +00:00
|
|
|
|
|
|
|
|
|
(defvar semantic-mode-map
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(let ((map (make-sparse-keymap)))
|
2009-09-27 03:36:58 +00:00
|
|
|
|
;; Key bindings:
|
|
|
|
|
;; (define-key km "f" 'senator-search-set-tag-class-filter)
|
|
|
|
|
;; (define-key km "i" 'senator-isearch-toggle-semantic-mode)
|
|
|
|
|
(define-key map "\C-c,j" 'semantic-complete-jump-local)
|
|
|
|
|
(define-key map "\C-c,J" 'semantic-complete-jump)
|
Synch Semantic to CEDET 1.0.
Move CEDET ChangeLog entries to new file lisp/cedet/ChangeLog.
* semantic.el (semantic-version): Update to 2.0.
(semantic-mode-map): Add "," and "m" bindings.
(navigate-menu): Update.
* semantic/symref.el (semantic-symref-calculate-rootdir):
New function.
(semantic-symref-detect-symref-tool): Use it.
* semantic/symref/grep.el (semantic-symref-grep-shell): New var.
(semantic-symref-perform-search): Use it. Calculate root dir with
semantic-symref-calculate-rootdir.
(semantic-symref-derive-find-filepatterns): Improve error message.
* semantic/symref/list.el
(semantic-symref-results-mode-map): New bindings.
(semantic-symref-auto-expand-results): New option.
(semantic-symref-results-dump): Obey auto-expand.
(semantic-symref-list-expand-all, semantic-symref-regexp)
(semantic-symref-list-contract-all)
(semantic-symref-list-map-open-hits)
(semantic-symref-list-update-open-hits)
(semantic-symref-list-create-macro-on-open-hit)
(semantic-symref-list-call-macro-on-open-hits): New functions.
(semantic-symref-list-menu-entries)
(semantic-symref-list-menu): New vars.
(semantic-symref-list-map-open-hits): Move cursor to beginning of
match before calling the mapped function.
* semantic/doc.el
(semantic-documentation-comment-preceeding-tag): Do nothing if the
mode doesn't provide comment-start-skip.
* semantic/scope.el
(semantic-analyze-scope-nested-tags-default): Strip duplicates.
(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
looking for as part of the scoped tags list.
* semantic/html.el (semantic-default-html-setup): Add
senator-step-at-tag-classes.
* semantic/decorate/include.el
(semantic-decoration-on-unknown-includes): Change light bgcolor.
(semantic-decoration-on-includes-highlight-default): Check that
the include tag has a postion.
* semantic/complete.el (semantic-collector-local-members):
(semantic-complete-read-tag-local-members)
(semantic-complete-jump-local-members): New class and functions.
(semantic-complete-self-insert): Save excursion before completing.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): If no completions
are found, return the raw by-name-only completion list. Add FLAGS
arguments. Add support for 'no-tc (type constraint) and
'no-unique, or no stripping duplicates.
(semantic-analyze-possible-completions-default): Add FLAGS arg.
* semantic/util-modes.el
(semantic-stickyfunc-show-only-functions-p): New option.
(semantic-stickyfunc-fetch-stickyline): Don't show stickytext for
the very first line in a buffer.
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-describe-buffer): Fix expand-nonterminal. Add
lex-syntax-mods, type relation separator char, and command
separation char.
(semantic-sanity-check): Only message if called interactively.
* semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the
:filename property and the tag position.
* semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Add recursion limit.
* semantic/imenu.el (semantic-imenu-bucketize-type-members):
Make this buffer local, not the obsoleted variable.
* semantic/idle.el: Add breadcrumbs support.
(semantic-idle-summary-current-symbol-info-default)
(semantic-idle-tag-highlight)
(semantic-idle-completion-list-default): Use
semanticdb-without-unloaded-file-searches for speed, and to
conform to the controls that specify if the idle timer is supposed
to be parsing unparsed includes.
(semantic-idle-symbol-highlight-face)
(semantic-idle-symbol-maybe-highlight): Rename from *-summary-*.
Callers changed.
(semantic-idle-work-parse-neighboring-files-flag): Default to nil.
(semantic-idle-work-update-headers-flag): New var.
(semantic-idle-work-for-one-buffer): Use it.
(semantic-idle-local-symbol-highlight): Rename from
semantic-idle-tag-highlight.
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.
* semantic/grammar.el (semantic-grammar-create-package):
Save the buffer even in batch mode.
* semantic/fw.el
(semanticdb-without-unloaded-file-searches): New macro.
* semantic/dep.el (semantic-dependency-find-file-on-path):
Fix case dereferencing ede-object when it is a list.
* semantic/db-typecache.el (semanticdb-expand-nested-tag)
(semanticdb-typecache-faux-namespace): New functions.
(semanticdb-typecache-file-tags)
(semanticdb-typecache-merge-streams): Use them.
(semanticdb-typecache-file-tags): When deriving tags from a file,
give the mode a chance to monkey with the tag copy.
(semanticdb-typecache-find-default): Wrap find in save-excursion.
(semanticdb-typecache-find-by-name-helper): Merge found names down.
* semantic/db-global.el
(semanticdb-enable-gnu-global-in-buffer): Don't show messages if
GNU Global is not available and we don't want to throw an error.
* semantic/db-find.el (semanticdb-find-result-nth-in-buffer):
When trying to normalize the tag to a buffer, don't error if
set-buffer method doesn't exist.
* semantic/db-file.el (semanticdb-save-db): Simplify msg.
* semantic/db.el (semanticdb-refresh-table): If forcing a
refresh on a file not in a buffer, use semantic-find-file-noselect
and delete the buffer after use.
(semanticdb-current-database-list): When calculating root via
hooks, force it through true-filename and skip the list of
possible roots.
* semantic/ctxt.el (semantic-ctxt-imported-packages): New.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-tag): Reset standard output to
current buffer.
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype): Change "prefix" to
"symbol" in messages.
* semantic/analyze/refs.el: (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): When calculating value, make sure
the found tag is 'similar' to the originating tag.
(semantic--analyze-refs-find-tags-with-parent): Attempt to
identify matches via imported symbols of parents.
(semantic--analyze-refs-full-lookup-with-parents): Do a deep
search during the brute search.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Be robust to
calculated scopes being nil.
* semantic/bovine/c.el (semantic-c-describe-environment): Add
project macro symbol array.
(semantic-c-parse-lexical-token): Add recursion limit.
(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
New overrides.
(semantic-expand-c-tag-namelist): Split a full type from a typedef
out to its own tag.
(semantic-expand-c-tag-namelist): Do not split out a typedef'd
inline type if it is an anonymous type.
(semantic-c-reconstitute-token): Use the optional initializers as
a clue that some function is probably a constructor. When
defining the type of these constructors, split the parent name,
and use only the class part, if applicable.
* semantic/bovine/c-by.el:
* semantic/wisent/python-wy.el: Regenerate.
2010-09-18 22:49:54 -04:00
|
|
|
|
(define-key map "\C-c,m" 'semantic-complete-jump-local-members)
|
2009-09-27 03:36:58 +00:00
|
|
|
|
(define-key map "\C-c,g" 'semantic-symref-symbol)
|
|
|
|
|
(define-key map "\C-c,G" 'semantic-symref)
|
|
|
|
|
(define-key map "\C-c,p" 'senator-previous-tag)
|
|
|
|
|
(define-key map "\C-c,n" 'senator-next-tag)
|
|
|
|
|
(define-key map "\C-c,u" 'senator-go-to-up-reference)
|
|
|
|
|
(define-key map "\C-c, " 'semantic-complete-analyze-inline)
|
|
|
|
|
(define-key map "\C-c,\C-w" 'senator-kill-tag)
|
|
|
|
|
(define-key map "\C-c,\M-w" 'senator-copy-tag)
|
|
|
|
|
(define-key map "\C-c,\C-y" 'senator-yank-tag)
|
|
|
|
|
(define-key map "\C-c,r" 'senator-copy-tag-to-register)
|
Synch Semantic to CEDET 1.0.
Move CEDET ChangeLog entries to new file lisp/cedet/ChangeLog.
* semantic.el (semantic-version): Update to 2.0.
(semantic-mode-map): Add "," and "m" bindings.
(navigate-menu): Update.
* semantic/symref.el (semantic-symref-calculate-rootdir):
New function.
(semantic-symref-detect-symref-tool): Use it.
* semantic/symref/grep.el (semantic-symref-grep-shell): New var.
(semantic-symref-perform-search): Use it. Calculate root dir with
semantic-symref-calculate-rootdir.
(semantic-symref-derive-find-filepatterns): Improve error message.
* semantic/symref/list.el
(semantic-symref-results-mode-map): New bindings.
(semantic-symref-auto-expand-results): New option.
(semantic-symref-results-dump): Obey auto-expand.
(semantic-symref-list-expand-all, semantic-symref-regexp)
(semantic-symref-list-contract-all)
(semantic-symref-list-map-open-hits)
(semantic-symref-list-update-open-hits)
(semantic-symref-list-create-macro-on-open-hit)
(semantic-symref-list-call-macro-on-open-hits): New functions.
(semantic-symref-list-menu-entries)
(semantic-symref-list-menu): New vars.
(semantic-symref-list-map-open-hits): Move cursor to beginning of
match before calling the mapped function.
* semantic/doc.el
(semantic-documentation-comment-preceeding-tag): Do nothing if the
mode doesn't provide comment-start-skip.
* semantic/scope.el
(semantic-analyze-scope-nested-tags-default): Strip duplicates.
(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
looking for as part of the scoped tags list.
* semantic/html.el (semantic-default-html-setup): Add
senator-step-at-tag-classes.
* semantic/decorate/include.el
(semantic-decoration-on-unknown-includes): Change light bgcolor.
(semantic-decoration-on-includes-highlight-default): Check that
the include tag has a postion.
* semantic/complete.el (semantic-collector-local-members):
(semantic-complete-read-tag-local-members)
(semantic-complete-jump-local-members): New class and functions.
(semantic-complete-self-insert): Save excursion before completing.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): If no completions
are found, return the raw by-name-only completion list. Add FLAGS
arguments. Add support for 'no-tc (type constraint) and
'no-unique, or no stripping duplicates.
(semantic-analyze-possible-completions-default): Add FLAGS arg.
* semantic/util-modes.el
(semantic-stickyfunc-show-only-functions-p): New option.
(semantic-stickyfunc-fetch-stickyline): Don't show stickytext for
the very first line in a buffer.
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-describe-buffer): Fix expand-nonterminal. Add
lex-syntax-mods, type relation separator char, and command
separation char.
(semantic-sanity-check): Only message if called interactively.
* semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the
:filename property and the tag position.
* semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Add recursion limit.
* semantic/imenu.el (semantic-imenu-bucketize-type-members):
Make this buffer local, not the obsoleted variable.
* semantic/idle.el: Add breadcrumbs support.
(semantic-idle-summary-current-symbol-info-default)
(semantic-idle-tag-highlight)
(semantic-idle-completion-list-default): Use
semanticdb-without-unloaded-file-searches for speed, and to
conform to the controls that specify if the idle timer is supposed
to be parsing unparsed includes.
(semantic-idle-symbol-highlight-face)
(semantic-idle-symbol-maybe-highlight): Rename from *-summary-*.
Callers changed.
(semantic-idle-work-parse-neighboring-files-flag): Default to nil.
(semantic-idle-work-update-headers-flag): New var.
(semantic-idle-work-for-one-buffer): Use it.
(semantic-idle-local-symbol-highlight): Rename from
semantic-idle-tag-highlight.
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.
* semantic/grammar.el (semantic-grammar-create-package):
Save the buffer even in batch mode.
* semantic/fw.el
(semanticdb-without-unloaded-file-searches): New macro.
* semantic/dep.el (semantic-dependency-find-file-on-path):
Fix case dereferencing ede-object when it is a list.
* semantic/db-typecache.el (semanticdb-expand-nested-tag)
(semanticdb-typecache-faux-namespace): New functions.
(semanticdb-typecache-file-tags)
(semanticdb-typecache-merge-streams): Use them.
(semanticdb-typecache-file-tags): When deriving tags from a file,
give the mode a chance to monkey with the tag copy.
(semanticdb-typecache-find-default): Wrap find in save-excursion.
(semanticdb-typecache-find-by-name-helper): Merge found names down.
* semantic/db-global.el
(semanticdb-enable-gnu-global-in-buffer): Don't show messages if
GNU Global is not available and we don't want to throw an error.
* semantic/db-find.el (semanticdb-find-result-nth-in-buffer):
When trying to normalize the tag to a buffer, don't error if
set-buffer method doesn't exist.
* semantic/db-file.el (semanticdb-save-db): Simplify msg.
* semantic/db.el (semanticdb-refresh-table): If forcing a
refresh on a file not in a buffer, use semantic-find-file-noselect
and delete the buffer after use.
(semanticdb-current-database-list): When calculating root via
hooks, force it through true-filename and skip the list of
possible roots.
* semantic/ctxt.el (semantic-ctxt-imported-packages): New.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-tag): Reset standard output to
current buffer.
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype): Change "prefix" to
"symbol" in messages.
* semantic/analyze/refs.el: (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): When calculating value, make sure
the found tag is 'similar' to the originating tag.
(semantic--analyze-refs-find-tags-with-parent): Attempt to
identify matches via imported symbols of parents.
(semantic--analyze-refs-full-lookup-with-parents): Do a deep
search during the brute search.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Be robust to
calculated scopes being nil.
* semantic/bovine/c.el (semantic-c-describe-environment): Add
project macro symbol array.
(semantic-c-parse-lexical-token): Add recursion limit.
(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
New overrides.
(semantic-expand-c-tag-namelist): Split a full type from a typedef
out to its own tag.
(semantic-expand-c-tag-namelist): Do not split out a typedef'd
inline type if it is an anonymous type.
(semantic-c-reconstitute-token): Use the optional initializers as
a clue that some function is probably a constructor. When
defining the type of these constructors, split the parent name,
and use only the class part, if applicable.
* semantic/bovine/c-by.el:
* semantic/wisent/python-wy.el: Regenerate.
2010-09-18 22:49:54 -04:00
|
|
|
|
(define-key map "\C-c,," 'semantic-force-refresh)
|
2009-09-27 03:36:58 +00:00
|
|
|
|
(define-key map [?\C-c ?, up] 'senator-transpose-tags-up)
|
|
|
|
|
(define-key map [?\C-c ?, down] 'senator-transpose-tags-down)
|
|
|
|
|
(define-key map "\C-c,l" 'semantic-analyze-possible-completions)
|
2009-09-27 17:50:53 +00:00
|
|
|
|
;; This hack avoids showing the CEDET menu twice if ede-minor-mode
|
|
|
|
|
;; and Semantic are both enabled. Is there a better way?
|
|
|
|
|
(define-key map [menu-bar cedet-menu]
|
|
|
|
|
(list 'menu-item "Development" cedet-menu-map
|
Merge from CEDET upstream (8564).
* lisp/emacs-lisp:
* emacs-lisp/eieio.el (eieio--defalias, eieio-hook)
(eieio-error-unsupported-class-tags, eieio-skip-typecheck)
(eieio-optimize-primary-methods-flag, eieio-initializing-object)
(eieio-unbound, eieio-default-superclass)
(eieio--define-field-accessors, method-static, method-before)
(method-primary, method-after, method-num-lists)
(method-generic-before, method-generic-primary)
(method-generic-after, method-num-slots)
(eieio-specialized-key-to-generic-key)
(eieio--check-type, class-v, class-p)
(eieio-class-name, define-obsolete-function-alias)
(eieio-class-parents-fast, eieio-class-children-fast)
(same-class-fast-p, class-constructor, generic-p)
(generic-primary-only-p, generic-primary-only-one-p)
(class-option-assoc, class-option, eieio-object-p)
(class-abstract-p, class-method-invocation-order)
(eieio-defclass-autoload-map, eieio-defclass-autoload)
(eieio-class-un-autoload, eieio-defclass)
(eieio-eval-default-p, eieio-perform-slot-validation-for-default)
(eieio-add-new-slot, eieio-copy-parents-into-subclass)
(eieio--defgeneric-init-form, eieio-defgeneric-form)
(eieio-defgeneric-reset-generic-form)
(eieio-defgeneric-form-primary-only)
(eieio-defgeneric-reset-generic-form-primary-only)
(eieio-defgeneric-form-primary-only-one)
(eieio-defgeneric-reset-generic-form-primary-only-one)
(eieio-unbind-method-implementations)
(eieio--defmethod, eieio--typep)
(eieio-perform-slot-validation, eieio-validate-slot-value)
(eieio-validate-class-slot-value, eieio-barf-if-slot-unbound)
(eieio-oref, eieio-oref-default, eieio-default-eval-maybe)
(eieio-oset, eieio-oset-default, eieio-slot-originating-class-p)
(eieio-slot-name-index, eieio-class-slot-name-index)
(eieio-set-defaults, eieio-initarg-to-attribute)
(eieio-attribute-to-initarg, eieio-c3-candidate)
(eieio-c3-merge-lists, eieio-class-precedence-c3)
(eieio-class-precedence-dfs, eieio-class-precedence-bfs)
(eieio-class-precedence-list, eieio-generic-call-methodname)
(eieio-generic-call-arglst, eieio-generic-call-key)
(eieio-generic-call-next-method-list)
(eieio-pre-method-execution-functions, eieio-generic-call)
(eieio-generic-call-primary-only, eieiomt-method-list)
(eieiomt-optimizing-obarray, eieiomt-install)
(eieiomt-add, eieiomt-next, eieiomt-sym-optimize)
(eieio-generic-form, eieio-defmethod, make-obsolete)
(eieio-defgeneric, make-obsolete): Moved to eieio-core.el
(defclass): Remove `eval-and-compile' from macro.
(call-next-method, shared-initialize): Instead of using
`scoped-class' variable, use new eieio--scoped-class, and
eieio--with-scoped-class.
(initialize-instance): Rename local variable 'scoped-class' to
'this-class' to remove ambiguitity from old global.
* emacs-lisp/eieio-core.el: New file. Derived from key parts of
eieio.el.
(eieio--scoped-class-stack): New variable
(eieio--scoped-class): New fcn
(eieio--with-scoped-class): New scoping macro.
(eieio-defclass): Use pushnew instead of add-to-list.
(eieio-defgeneric-form-primary-only-one, eieio-oset-default)
(eieio-slot-name-index, eieio-set-defaults, eieio-generic-call)
(eieio-generic-call-primary-only, eieiomt-add): Instead of using
`scoped-class' variable, use new eieio--scoped-class, and
eieio--with-scoped-class.
* emacs-lisp/eieio-base.el (cl-lib): Require during compile.
* admin/grammars:
* grammars/srecode-template.wy (variable): Accept a single number
as a variable value. Allows the 'priority' to be set to a number.
(wisent-srecode-template-lexer): Move number up so it can be
created.
* etc/srecode:
* srecode/c.srt (header_guard): Add :c parameter so it works
standalone
* lisp/cedet:
* semantic/edit.el (semantic-change-function): Use
`save-match-data' around running hooks.
* semantic/decorate/mode.el
(semantic-decorate-style-predicate-default)
(semantic-decorate-style-highlighter-default): New.
(semantic-decoration-mode): Do not require
`semantic/decorate/include' anymore.
(semantic-toggle-decoration-style): Error if an unknown decoration
style is toggled.
(define-semantic-decoration-style): Add new :load option. When
:load is specified, add autoload tokens for the definition
functions so that code is loaded when the mode is used.
(semantic-decoration-on-includes): New autoload definition for
highlighting includes.
* semantic/bovine/c.el (semantic-lex-c-ifdef): Allow some misc
characters to appear after the tested variable.
* semantic/ede-grammar.el (project-compile-target): Calculate full
src name via ede-expand-filename instead of the crutch of the
current buffer. Enables this target to compile in batch mode.
* semantic/idle.el
(semantic-idle-symbol-maybe-highlight): Wrap highlighting of
remote symbol with `save-excursion'.
(semantic-idle-scheduler-work-parse-neighboring-files): Instead of
using directory-files on each found mode pattern, collect all the
patterns for the current mode, and then for each file, see if it
matches any of them. If it does, parse the file. (Patch
inspiration from Tomasz Gajewski.)
* semantic/ctxt.el (semantic-ctxt-end-of-symbol): New.
(semantic-ctxt-current-symbol-default): New.
* semantic/bovine/el.el (semantic-default-elisp-setup): Add
autoload cookie. Explain existence.
(footer): Add local variable for loaddefs.
* semantic/db.el (semanticdb-file-table-object): Add new filter,
only checking for regular files too.
* semantic/wisent/python.el
(semantic-format-tag-abbreviate): New override. Cuts back on size
of code tags.
* srecode/compile.el (srecode-compile-templates): Fix warning
punctuation. Remove status messages to clean up testing output
* ede/base.el (ede-project-placeholder-cache-file): Update doc to
mention 'nil' value.
(ede-save-cache): Disable cache save if file is nil.
* ede.el (ede-initialize-state-current-buffer): Flush deleted
projects.
(global-ede-mode): Always append our find-file-hook to the end.
(ede-flush-deleted-projects): New command.
* ede/cpp-root.el (ede-preprocessor-map): Protect against init
problems.
* ede/proj.el (ede-proj-target): Added a new "custom" option for
custom symbols representing a compiler or linker instead of
restricting things to only the predefined compilers and linkers.
* semantic.el (semantic-mode-map): To avoid showing showing
Development menu twice, only disable menu item if menu-bar is
actually enabled, otherwise the popup 'global menu' might display
a disabled Development menu.
* semantic/complete.el
(semantic-displayor-show-request): Fix which slot in obj is set to
the max tags.
2013-06-02 15:33:09 +02:00
|
|
|
|
:enable (quote (not (and menu-bar-mode
|
|
|
|
|
(bound-and-true-p global-ede-mode))))))
|
2009-09-27 03:36:58 +00:00
|
|
|
|
;; (define-key km "-" 'senator-fold-tag)
|
|
|
|
|
;; (define-key km "+" 'senator-unfold-tag)
|
|
|
|
|
map))
|
|
|
|
|
|
2009-09-27 17:50:53 +00:00
|
|
|
|
;; Activate the Semantic items in cedet-menu-map
|
|
|
|
|
(let ((navigate-menu (make-sparse-keymap "Navigate Tags"))
|
|
|
|
|
(edit-menu (make-sparse-keymap "Edit Tags")))
|
|
|
|
|
|
|
|
|
|
;; Edit Tags submenu:
|
|
|
|
|
(define-key edit-menu [semantic-analyze-possible-completions]
|
|
|
|
|
'(menu-item "List Completions" semantic-analyze-possible-completions
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (semantic-active-p)
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Display a list of completions for the tag at point"))
|
|
|
|
|
(define-key edit-menu [semantic-complete-analyze-inline]
|
|
|
|
|
'(menu-item "Complete Tag Inline" semantic-complete-analyze-inline
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (semantic-active-p)
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Display inline completion for the tag at point"))
|
|
|
|
|
(define-key edit-menu [semantic-completion-separator]
|
|
|
|
|
'("--"))
|
|
|
|
|
(define-key edit-menu [senator-transpose-tags-down]
|
|
|
|
|
'(menu-item "Transpose Tags Down" senator-transpose-tags-down
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (and (semantic-active-p)
|
|
|
|
|
(semantic-current-tag))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Transpose the current tag and the next tag"))
|
|
|
|
|
(define-key edit-menu [senator-transpose-tags-up]
|
|
|
|
|
'(menu-item "Transpose Tags Up" senator-transpose-tags-up
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (and (semantic-active-p)
|
|
|
|
|
(semantic-current-tag))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Transpose the current tag and the previous tag"))
|
|
|
|
|
(define-key edit-menu [semantic-edit-separator]
|
|
|
|
|
'("--"))
|
|
|
|
|
(define-key edit-menu [senator-yank-tag]
|
|
|
|
|
'(menu-item "Yank Tag" senator-yank-tag
|
Merge with CEDET upstream (rev. 8499).
lisp/
* eieio/eieio-datadebug.el (data-debug/eieio-insert-slots):
Inhibit read only while inserting objects.
lisp/cedet/
* semantic.el (navigate-menu): Yank Tag :enable. Make sure
`senator-tag-ring' is bound.
(semantic-parse-region-default): Stop reversing the output of
parse-whole-stream.
(semantic-repeat-parse-whole-stream): Append returned tags
differently, so they come out in the right order.
* semantic/sb.el (semantic-sb-filter-tags-of-class): New option.
(semantic-sb-fetch-tag-table): Filter tags being bucketed to exclude
tags belonging to above filtered classes.
* semantic/find.el (semantic-filter-tags-by-class): New function.
* semantic/tag-ls.el (semantic-tag-similar-p-default): Add
short-circuit in case tag1 and 2 are identical.
* semantic/analyze/fcn.el
(semantic-analyze-dereference-metatype-stack): Use
`semantic-tag-similar-p' instead of 'eq' when comparing two tags
during metatype evaluation in case they are the same, but not the same
node. (Tweaked patch from Tomasz Gajewski) (Tiny change)
* semantic/db-find.el (semanticdb-partial-synchronize): Fix require to
semantic/db-typecache to be correct.
(semanticdb-find-tags-external-children-of-type): Make this a brutish
search by default.
* semantic/sort.el (semantic-tag-external-member-children-default):
When calling `semanticdb-find-tags-external-children-of-type', pass in
the input tag as the place to start searching for externally defined
methods.
* semantic/db-file.el (semanticdb-default-save-directory): Doc
fix: Add ref to default value.
* semantic/complete.el (semantic-complete-post-command-hook): When
detecting if cursor is outside completion area, do so if cursor moves
before start of overlay, or the original starting location of the
overlay (i.e., if user deletes past beginning of the overlay region).
(semantic-complete-inline-tag-engine): Initialize original start of
`semantic-complete-inline-overlay'.
* semantic/bovine/c.el (semantic-c-describe-environment): Update some
section titles. Test semanticdb table before printing it.
(semantic-c-reset-preprocessor-symbol-map): Update
`semantic-lex-spp-macro-symbol-obarray' outside the loop over all the
files contributing to its value.
(semantic-c-describe-environment): If there is an EDE project but no
spp symbols from it, say so.
* srecode/args.el (srecode-semantic-handle-:project): New argument
handler. Provide variable values if not in an EDE project.
* srecode/srt-mode.el (srecode-template-mode): Fix typo on srecode
name.
* srecode/cpp.el (srecode-semantic-handle-:c): Replace all characters
in FILENAME_SYMBOL that aren't valid CPP symbol chars.
* srecode/map.el (srecode-map-validate-file-for-mode): Force semantic
to load if it is not active in the template being added to the map.
* srecode/srt.el: Add local variables for setting the autoload file
name.
(srecode-semantic-handle-:srt): New autoload cookie
* ede.el (ede-apply-preprocessor-map): Apply map to
`semantic-lex-spp-project-macro-symbol-obarray' instead of the system
one. Add require for semantic.
* ede/proj-elisp.el (ede-update-version-in-source): In case a file has
both a version variable and a Version: comment, always use
`call-next-method'.
* ede/cpp-root.el (ede-set-project-variables): Deleted.
`ede-preprocessor-map' does the job this function was attempting to do
with :spp-table.
(ede-preprocessor-map): Update file tests to provide better messages.
Do not try to get symbols from a file that is the file in the current
buffer.
* ede/base.el (ede-project-placeholder): Add more documentation to
:file slot.
(ede-load-cache): Use `insert-file-contents' instead of
`find-file-noselect' in order to avoid activating other tools.
* semantic/bovine/c.el (semantic-get-local-variables): Also add a new
variable 'this' if we are in an inline member function. For detecting
this, we check overlays at point if there is a class spanning the
current function. Also, the variable 'this' has to be a pointer.
* semantic/bovine/gcc.el (semantic-gcc-setup): Fail gracefully when
querying g++ for defines returns an error.
* srecode/srt-mode.el:
* srecode/compile.el:
* semantic/elp.el:
* semantic/db-el.el:
* semantic/complete.el:
* ede.el:
* cogre.el:
* srecode/table.el:
* srecode/mode.el:
* srecode/insert.el:
* srecode/compile.el:
* semantic/decorate/include.el:
* semantic/db.el:
* semantic/adebug.el:
* ede/auto.el:
* srecode/dictionary.el:
* semantic/ede-grammar.el:
* semantic/db.el:
* semantic/db-find.el:
* semantic/db-file.el:
* semantic/complete.el:
* semantic/bovine/c.el:
* semantic/analyze.el:
* ede/util.el:
* ede/proj.el:
* ede/proj-elisp.el:
* ede/pconf.el:
* ede/locate.el:
* ede.el: Adapt to EIEIO namespace cleanup: Rename `object-name' to
`eieio-object-name', `object-set-name-string' to
`eieio-object-set-name-string', `object-class' to
`eieio-object-class', `class-parent' to `eieio-class-parent',
`class-parents' to `eieio-class-parents', `class-children' to
`eieio-class-children', `object-name-string' to
`eieio-object-name-string', `object-class-fast' to
`eieio--object-class'. Also replace direct access with new accessor
functions.
* ede/cpp-root.el (ede-project-autoload, initialize-instance): Fix EDE
file symbol to match rename. Fix ede-cpp-root symbol to include
-project in name.
* cedet-files.el (cedet-files-list-recursively): New function.
Recursively find files whose names are matching to given regex
* ede.el (ede-current-project): Rewrite to avoid imperative style.
* ede/files.el (ede-find-file): Simplify code.
* ede/base.el (ede-normalize-file/directory): Add function to
normalize :file or :directory slots if they are missing.
* ede/cpp-root.el (ede-cpp-root-project): Add compile-command slot.
(project-compile-project): Compiles project using value specified in
:compule-command slot or in compile-command local variable. Value of
slot or local variable could be string or function that receives
project and should return string that will be invoked as command.
(project-compile-target): Invokes compilation of whole project
* ede/files.el (ede-find-project-root): New function to find root of
project that contains specific file.
(ede-files-find-existing): New function which checks presence of given
directory in the list of registered projects.
etc/
* srecode/ede-autoconf.srt: Change Copyright to FSF.
(ede-empty): Change AC_INIT to use PROJECT_NAME, and PROJECT_VERSION.
* srecode/ede-make.srt (ede-empty): Add a dependency on :project. Add
header comment specifying the project's relative path.
* srecode/c.srt (header_guard): Upcase the filename symbol.
* srecode/java.srt (empty-main): New.
(class-tag): Decapitalize class.
2013-03-21 23:11:03 +01:00
|
|
|
|
:enable (and (boundp 'senator-tag-ring)
|
|
|
|
|
(not (ring-empty-p senator-tag-ring)))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Yank the head of the tag ring into the buffer"))
|
|
|
|
|
(define-key edit-menu [senator-copy-tag-to-register]
|
|
|
|
|
'(menu-item "Copy Tag To Register" senator-copy-tag-to-register
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (and (semantic-active-p)
|
|
|
|
|
(semantic-current-tag))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Yank the head of the tag ring into the buffer"))
|
|
|
|
|
(define-key edit-menu [senator-copy-tag]
|
|
|
|
|
'(menu-item "Copy Tag" senator-copy-tag
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (and (semantic-active-p)
|
|
|
|
|
(semantic-current-tag))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Copy the current tag to the tag ring"))
|
|
|
|
|
(define-key edit-menu [senator-kill-tag]
|
|
|
|
|
'(menu-item "Kill Tag" senator-kill-tag
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (and (semantic-active-p)
|
|
|
|
|
(semantic-current-tag))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Kill the current tag, and copy it to the tag ring"))
|
|
|
|
|
|
|
|
|
|
;; Navigate Tags submenu:
|
|
|
|
|
(define-key navigate-menu [senator-narrow-to-defun]
|
|
|
|
|
'(menu-item "Narrow to Tag" senator-narrow-to-defun
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (and (semantic-active-p)
|
|
|
|
|
(semantic-current-tag))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Narrow the buffer to the bounds of the current tag"))
|
|
|
|
|
(define-key navigate-menu [semantic-narrow-to-defun-separator]
|
|
|
|
|
'("--"))
|
|
|
|
|
(define-key navigate-menu [semantic-symref-symbol]
|
|
|
|
|
'(menu-item "Find Tag References..." semantic-symref-symbol
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (semantic-active-p)
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Read a tag and list the references to it"))
|
|
|
|
|
(define-key navigate-menu [semantic-complete-jump]
|
|
|
|
|
'(menu-item "Find Tag Globally..." semantic-complete-jump
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (semantic-active-p)
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Read a tag name and find it in the current project"))
|
Synch Semantic to CEDET 1.0.
Move CEDET ChangeLog entries to new file lisp/cedet/ChangeLog.
* semantic.el (semantic-version): Update to 2.0.
(semantic-mode-map): Add "," and "m" bindings.
(navigate-menu): Update.
* semantic/symref.el (semantic-symref-calculate-rootdir):
New function.
(semantic-symref-detect-symref-tool): Use it.
* semantic/symref/grep.el (semantic-symref-grep-shell): New var.
(semantic-symref-perform-search): Use it. Calculate root dir with
semantic-symref-calculate-rootdir.
(semantic-symref-derive-find-filepatterns): Improve error message.
* semantic/symref/list.el
(semantic-symref-results-mode-map): New bindings.
(semantic-symref-auto-expand-results): New option.
(semantic-symref-results-dump): Obey auto-expand.
(semantic-symref-list-expand-all, semantic-symref-regexp)
(semantic-symref-list-contract-all)
(semantic-symref-list-map-open-hits)
(semantic-symref-list-update-open-hits)
(semantic-symref-list-create-macro-on-open-hit)
(semantic-symref-list-call-macro-on-open-hits): New functions.
(semantic-symref-list-menu-entries)
(semantic-symref-list-menu): New vars.
(semantic-symref-list-map-open-hits): Move cursor to beginning of
match before calling the mapped function.
* semantic/doc.el
(semantic-documentation-comment-preceeding-tag): Do nothing if the
mode doesn't provide comment-start-skip.
* semantic/scope.el
(semantic-analyze-scope-nested-tags-default): Strip duplicates.
(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
looking for as part of the scoped tags list.
* semantic/html.el (semantic-default-html-setup): Add
senator-step-at-tag-classes.
* semantic/decorate/include.el
(semantic-decoration-on-unknown-includes): Change light bgcolor.
(semantic-decoration-on-includes-highlight-default): Check that
the include tag has a postion.
* semantic/complete.el (semantic-collector-local-members):
(semantic-complete-read-tag-local-members)
(semantic-complete-jump-local-members): New class and functions.
(semantic-complete-self-insert): Save excursion before completing.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): If no completions
are found, return the raw by-name-only completion list. Add FLAGS
arguments. Add support for 'no-tc (type constraint) and
'no-unique, or no stripping duplicates.
(semantic-analyze-possible-completions-default): Add FLAGS arg.
* semantic/util-modes.el
(semantic-stickyfunc-show-only-functions-p): New option.
(semantic-stickyfunc-fetch-stickyline): Don't show stickytext for
the very first line in a buffer.
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-describe-buffer): Fix expand-nonterminal. Add
lex-syntax-mods, type relation separator char, and command
separation char.
(semantic-sanity-check): Only message if called interactively.
* semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the
:filename property and the tag position.
* semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Add recursion limit.
* semantic/imenu.el (semantic-imenu-bucketize-type-members):
Make this buffer local, not the obsoleted variable.
* semantic/idle.el: Add breadcrumbs support.
(semantic-idle-summary-current-symbol-info-default)
(semantic-idle-tag-highlight)
(semantic-idle-completion-list-default): Use
semanticdb-without-unloaded-file-searches for speed, and to
conform to the controls that specify if the idle timer is supposed
to be parsing unparsed includes.
(semantic-idle-symbol-highlight-face)
(semantic-idle-symbol-maybe-highlight): Rename from *-summary-*.
Callers changed.
(semantic-idle-work-parse-neighboring-files-flag): Default to nil.
(semantic-idle-work-update-headers-flag): New var.
(semantic-idle-work-for-one-buffer): Use it.
(semantic-idle-local-symbol-highlight): Rename from
semantic-idle-tag-highlight.
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.
* semantic/grammar.el (semantic-grammar-create-package):
Save the buffer even in batch mode.
* semantic/fw.el
(semanticdb-without-unloaded-file-searches): New macro.
* semantic/dep.el (semantic-dependency-find-file-on-path):
Fix case dereferencing ede-object when it is a list.
* semantic/db-typecache.el (semanticdb-expand-nested-tag)
(semanticdb-typecache-faux-namespace): New functions.
(semanticdb-typecache-file-tags)
(semanticdb-typecache-merge-streams): Use them.
(semanticdb-typecache-file-tags): When deriving tags from a file,
give the mode a chance to monkey with the tag copy.
(semanticdb-typecache-find-default): Wrap find in save-excursion.
(semanticdb-typecache-find-by-name-helper): Merge found names down.
* semantic/db-global.el
(semanticdb-enable-gnu-global-in-buffer): Don't show messages if
GNU Global is not available and we don't want to throw an error.
* semantic/db-find.el (semanticdb-find-result-nth-in-buffer):
When trying to normalize the tag to a buffer, don't error if
set-buffer method doesn't exist.
* semantic/db-file.el (semanticdb-save-db): Simplify msg.
* semantic/db.el (semanticdb-refresh-table): If forcing a
refresh on a file not in a buffer, use semantic-find-file-noselect
and delete the buffer after use.
(semanticdb-current-database-list): When calculating root via
hooks, force it through true-filename and skip the list of
possible roots.
* semantic/ctxt.el (semantic-ctxt-imported-packages): New.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-tag): Reset standard output to
current buffer.
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype): Change "prefix" to
"symbol" in messages.
* semantic/analyze/refs.el: (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): When calculating value, make sure
the found tag is 'similar' to the originating tag.
(semantic--analyze-refs-find-tags-with-parent): Attempt to
identify matches via imported symbols of parents.
(semantic--analyze-refs-full-lookup-with-parents): Do a deep
search during the brute search.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Be robust to
calculated scopes being nil.
* semantic/bovine/c.el (semantic-c-describe-environment): Add
project macro symbol array.
(semantic-c-parse-lexical-token): Add recursion limit.
(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
New overrides.
(semantic-expand-c-tag-namelist): Split a full type from a typedef
out to its own tag.
(semantic-expand-c-tag-namelist): Do not split out a typedef'd
inline type if it is an anonymous type.
(semantic-c-reconstitute-token): Use the optional initializers as
a clue that some function is probably a constructor. When
defining the type of these constructors, split the parent name,
and use only the class part, if applicable.
* semantic/bovine/c-by.el:
* semantic/wisent/python-wy.el: Regenerate.
2010-09-18 22:49:54 -04:00
|
|
|
|
(define-key navigate-menu [semantic-complete-jump-local-members]
|
|
|
|
|
'(menu-item "Find Local Members ..." semantic-complete-jump-local-members
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (semantic-active-p)
|
Synch Semantic to CEDET 1.0.
Move CEDET ChangeLog entries to new file lisp/cedet/ChangeLog.
* semantic.el (semantic-version): Update to 2.0.
(semantic-mode-map): Add "," and "m" bindings.
(navigate-menu): Update.
* semantic/symref.el (semantic-symref-calculate-rootdir):
New function.
(semantic-symref-detect-symref-tool): Use it.
* semantic/symref/grep.el (semantic-symref-grep-shell): New var.
(semantic-symref-perform-search): Use it. Calculate root dir with
semantic-symref-calculate-rootdir.
(semantic-symref-derive-find-filepatterns): Improve error message.
* semantic/symref/list.el
(semantic-symref-results-mode-map): New bindings.
(semantic-symref-auto-expand-results): New option.
(semantic-symref-results-dump): Obey auto-expand.
(semantic-symref-list-expand-all, semantic-symref-regexp)
(semantic-symref-list-contract-all)
(semantic-symref-list-map-open-hits)
(semantic-symref-list-update-open-hits)
(semantic-symref-list-create-macro-on-open-hit)
(semantic-symref-list-call-macro-on-open-hits): New functions.
(semantic-symref-list-menu-entries)
(semantic-symref-list-menu): New vars.
(semantic-symref-list-map-open-hits): Move cursor to beginning of
match before calling the mapped function.
* semantic/doc.el
(semantic-documentation-comment-preceeding-tag): Do nothing if the
mode doesn't provide comment-start-skip.
* semantic/scope.el
(semantic-analyze-scope-nested-tags-default): Strip duplicates.
(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
looking for as part of the scoped tags list.
* semantic/html.el (semantic-default-html-setup): Add
senator-step-at-tag-classes.
* semantic/decorate/include.el
(semantic-decoration-on-unknown-includes): Change light bgcolor.
(semantic-decoration-on-includes-highlight-default): Check that
the include tag has a postion.
* semantic/complete.el (semantic-collector-local-members):
(semantic-complete-read-tag-local-members)
(semantic-complete-jump-local-members): New class and functions.
(semantic-complete-self-insert): Save excursion before completing.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): If no completions
are found, return the raw by-name-only completion list. Add FLAGS
arguments. Add support for 'no-tc (type constraint) and
'no-unique, or no stripping duplicates.
(semantic-analyze-possible-completions-default): Add FLAGS arg.
* semantic/util-modes.el
(semantic-stickyfunc-show-only-functions-p): New option.
(semantic-stickyfunc-fetch-stickyline): Don't show stickytext for
the very first line in a buffer.
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-describe-buffer): Fix expand-nonterminal. Add
lex-syntax-mods, type relation separator char, and command
separation char.
(semantic-sanity-check): Only message if called interactively.
* semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the
:filename property and the tag position.
* semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Add recursion limit.
* semantic/imenu.el (semantic-imenu-bucketize-type-members):
Make this buffer local, not the obsoleted variable.
* semantic/idle.el: Add breadcrumbs support.
(semantic-idle-summary-current-symbol-info-default)
(semantic-idle-tag-highlight)
(semantic-idle-completion-list-default): Use
semanticdb-without-unloaded-file-searches for speed, and to
conform to the controls that specify if the idle timer is supposed
to be parsing unparsed includes.
(semantic-idle-symbol-highlight-face)
(semantic-idle-symbol-maybe-highlight): Rename from *-summary-*.
Callers changed.
(semantic-idle-work-parse-neighboring-files-flag): Default to nil.
(semantic-idle-work-update-headers-flag): New var.
(semantic-idle-work-for-one-buffer): Use it.
(semantic-idle-local-symbol-highlight): Rename from
semantic-idle-tag-highlight.
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.
* semantic/grammar.el (semantic-grammar-create-package):
Save the buffer even in batch mode.
* semantic/fw.el
(semanticdb-without-unloaded-file-searches): New macro.
* semantic/dep.el (semantic-dependency-find-file-on-path):
Fix case dereferencing ede-object when it is a list.
* semantic/db-typecache.el (semanticdb-expand-nested-tag)
(semanticdb-typecache-faux-namespace): New functions.
(semanticdb-typecache-file-tags)
(semanticdb-typecache-merge-streams): Use them.
(semanticdb-typecache-file-tags): When deriving tags from a file,
give the mode a chance to monkey with the tag copy.
(semanticdb-typecache-find-default): Wrap find in save-excursion.
(semanticdb-typecache-find-by-name-helper): Merge found names down.
* semantic/db-global.el
(semanticdb-enable-gnu-global-in-buffer): Don't show messages if
GNU Global is not available and we don't want to throw an error.
* semantic/db-find.el (semanticdb-find-result-nth-in-buffer):
When trying to normalize the tag to a buffer, don't error if
set-buffer method doesn't exist.
* semantic/db-file.el (semanticdb-save-db): Simplify msg.
* semantic/db.el (semanticdb-refresh-table): If forcing a
refresh on a file not in a buffer, use semantic-find-file-noselect
and delete the buffer after use.
(semanticdb-current-database-list): When calculating root via
hooks, force it through true-filename and skip the list of
possible roots.
* semantic/ctxt.el (semantic-ctxt-imported-packages): New.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-tag): Reset standard output to
current buffer.
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype): Change "prefix" to
"symbol" in messages.
* semantic/analyze/refs.el: (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): When calculating value, make sure
the found tag is 'similar' to the originating tag.
(semantic--analyze-refs-find-tags-with-parent): Attempt to
identify matches via imported symbols of parents.
(semantic--analyze-refs-full-lookup-with-parents): Do a deep
search during the brute search.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Be robust to
calculated scopes being nil.
* semantic/bovine/c.el (semantic-c-describe-environment): Add
project macro symbol array.
(semantic-c-parse-lexical-token): Add recursion limit.
(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
New overrides.
(semantic-expand-c-tag-namelist): Split a full type from a typedef
out to its own tag.
(semantic-expand-c-tag-namelist): Do not split out a typedef'd
inline type if it is an anonymous type.
(semantic-c-reconstitute-token): Use the optional initializers as
a clue that some function is probably a constructor. When
defining the type of these constructors, split the parent name,
and use only the class part, if applicable.
* semantic/bovine/c-by.el:
* semantic/wisent/python-wy.el: Regenerate.
2010-09-18 22:49:54 -04:00
|
|
|
|
:help "Read a tag name and find a local member with that name"))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(define-key navigate-menu [semantic-complete-jump-local]
|
|
|
|
|
'(menu-item "Find Tag in This Buffer..." semantic-complete-jump-local
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (semantic-active-p)
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Read a tag name and find it in this buffer"))
|
|
|
|
|
(define-key navigate-menu [semantic-navigation-separator]
|
|
|
|
|
'("--"))
|
|
|
|
|
(define-key navigate-menu [senator-go-to-up-reference]
|
|
|
|
|
'(menu-item "Parent Tag" senator-go-to-up-reference
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (semantic-active-p)
|
2011-11-20 04:48:53 +01:00
|
|
|
|
:help "Navigate up one reference by tag"))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(define-key navigate-menu [senator-next-tag]
|
|
|
|
|
'(menu-item "Next Tag" senator-next-tag
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (semantic-active-p)
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Go to the next tag"))
|
|
|
|
|
(define-key navigate-menu [senator-previous-tag]
|
|
|
|
|
'(menu-item "Previous Tag" senator-previous-tag
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:enable (semantic-active-p)
|
2009-09-27 17:50:53 +00:00
|
|
|
|
:help "Go to the previous tag"))
|
|
|
|
|
|
|
|
|
|
;; Top level menu items:
|
|
|
|
|
(define-key cedet-menu-map [semantic-force-refresh]
|
|
|
|
|
'(menu-item "Reparse Buffer" semantic-force-refresh
|
2011-11-20 04:48:53 +01:00
|
|
|
|
:help "Force a full reparse of the current buffer"
|
2012-10-14 21:20:28 +02:00
|
|
|
|
:visible semantic-mode
|
|
|
|
|
:enable (semantic-active-p)))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(define-key cedet-menu-map [semantic-edit-menu]
|
2009-09-27 21:35:46 +00:00
|
|
|
|
`(menu-item "Edit Tags" ,edit-menu
|
|
|
|
|
:visible semantic-mode))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(define-key cedet-menu-map [navigate-menu]
|
2009-09-27 21:35:46 +00:00
|
|
|
|
`(menu-item "Navigate Tags" ,navigate-menu
|
|
|
|
|
:visible semantic-mode))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(define-key cedet-menu-map [semantic-options-separator]
|
|
|
|
|
'("--"))
|
|
|
|
|
(define-key cedet-menu-map [global-semantic-highlight-func-mode]
|
2009-09-27 21:35:46 +00:00
|
|
|
|
'(menu-item "Highlight Current Function" global-semantic-highlight-func-mode
|
|
|
|
|
:help "Highlight the tag at point"
|
|
|
|
|
:visible semantic-mode
|
|
|
|
|
:button (:toggle . global-semantic-highlight-func-mode)))
|
2012-10-02 02:10:29 +08:00
|
|
|
|
(define-key cedet-menu-map [global-semantic-stickyfunc-mode]
|
|
|
|
|
'(menu-item "Stick Top Tag to Headerline" global-semantic-stickyfunc-mode
|
|
|
|
|
:help "Stick the tag scrolled off the top of the buffer into the header line"
|
|
|
|
|
:visible semantic-mode
|
|
|
|
|
:button (:toggle . (bound-and-true-p
|
|
|
|
|
global-semantic-stickyfunc-mode))))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(define-key cedet-menu-map [global-semantic-decoration-mode]
|
2009-09-27 21:35:46 +00:00
|
|
|
|
'(menu-item "Decorate Tags" global-semantic-decoration-mode
|
|
|
|
|
:help "Decorate tags based on tag attributes"
|
|
|
|
|
:visible semantic-mode
|
|
|
|
|
:button (:toggle . (bound-and-true-p
|
|
|
|
|
global-semantic-decoration-mode))))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(define-key cedet-menu-map [global-semantic-idle-completions-mode]
|
2009-09-27 21:35:46 +00:00
|
|
|
|
'(menu-item "Show Tag Completions" global-semantic-idle-completions-mode
|
|
|
|
|
:help "Show tag completions when idle"
|
|
|
|
|
:visible semantic-mode
|
2009-11-20 01:35:49 +00:00
|
|
|
|
:enable global-semantic-idle-scheduler-mode
|
2009-09-27 21:35:46 +00:00
|
|
|
|
:button (:toggle . global-semantic-idle-completions-mode)))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(define-key cedet-menu-map [global-semantic-idle-summary-mode]
|
2009-09-27 21:35:46 +00:00
|
|
|
|
'(menu-item "Show Tag Summaries" global-semantic-idle-summary-mode
|
|
|
|
|
:help "Show tag summaries when idle"
|
|
|
|
|
:visible semantic-mode
|
2009-11-20 01:35:49 +00:00
|
|
|
|
:enable global-semantic-idle-scheduler-mode
|
2009-09-27 21:35:46 +00:00
|
|
|
|
:button (:toggle . global-semantic-idle-summary-mode)))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
(define-key cedet-menu-map [global-semantic-idle-scheduler-mode]
|
2009-09-27 21:35:46 +00:00
|
|
|
|
'(menu-item "Reparse When Idle" global-semantic-idle-scheduler-mode
|
|
|
|
|
:help "Keep a buffer's parse tree up to date when idle"
|
|
|
|
|
:visible semantic-mode
|
2009-11-20 01:35:49 +00:00
|
|
|
|
:button (:toggle . global-semantic-idle-scheduler-mode)))
|
|
|
|
|
(define-key cedet-menu-map [global-semanticdb-minor-mode]
|
|
|
|
|
'(menu-item "Semantic Database" global-semanticdb-minor-mode
|
|
|
|
|
:help "Store tag information in a database"
|
|
|
|
|
:visible semantic-mode
|
|
|
|
|
:button (:toggle . global-semanticdb-minor-mode))))
|
2009-09-27 17:50:53 +00:00
|
|
|
|
|
2011-11-14 23:55:13 -08:00
|
|
|
|
;; The `semantic-mode' command, in conjunction with the
|
2009-09-27 17:50:53 +00:00
|
|
|
|
;; `semantic-default-submodes' variable, toggles Semantic's various
|
2010-01-17 03:25:53 +01:00
|
|
|
|
;; auxiliary minor modes.
|
2009-09-21 02:14:58 +00:00
|
|
|
|
|
|
|
|
|
(defvar semantic-load-system-cache-loaded nil
|
2010-01-18 05:39:40 +01:00
|
|
|
|
"Non-nil when the Semantic system caches have been loaded.
|
2009-09-21 02:14:58 +00:00
|
|
|
|
Prevent this load system from loading files in twice.")
|
|
|
|
|
|
|
|
|
|
(defconst semantic-submode-list
|
|
|
|
|
'(global-semantic-highlight-func-mode
|
|
|
|
|
global-semantic-decoration-mode
|
|
|
|
|
global-semantic-stickyfunc-mode
|
|
|
|
|
global-semantic-idle-completions-mode
|
|
|
|
|
global-semantic-idle-scheduler-mode
|
|
|
|
|
global-semanticdb-minor-mode
|
|
|
|
|
global-semantic-idle-summary-mode
|
2012-10-02 02:10:29 +08:00
|
|
|
|
global-semantic-mru-bookmark-mode
|
|
|
|
|
global-semantic-idle-local-symbol-highlight-mode
|
|
|
|
|
global-semantic-highlight-edits-mode
|
|
|
|
|
global-semantic-show-unmatched-syntax-mode
|
|
|
|
|
global-semantic-show-parser-state-mode)
|
2009-10-01 02:39:07 +00:00
|
|
|
|
"List of auxiliary minor modes in the Semantic package.")
|
2009-09-21 02:14:58 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defcustom semantic-default-submodes
|
|
|
|
|
'(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode)
|
2009-10-01 02:39:07 +00:00
|
|
|
|
"List of auxiliary Semantic minor modes enabled by `semantic-mode'.
|
2009-09-21 02:14:58 +00:00
|
|
|
|
The possible elements of this list include the following:
|
|
|
|
|
|
2009-11-20 01:35:49 +00:00
|
|
|
|
`global-semanticdb-minor-mode' - Maintain tag database.
|
|
|
|
|
`global-semantic-idle-scheduler-mode' - Reparse buffer when idle.
|
|
|
|
|
`global-semantic-idle-summary-mode' - Show summary of tag at point.
|
|
|
|
|
`global-semantic-idle-completions-mode' - Show completions when idle.
|
|
|
|
|
`global-semantic-decoration-mode' - Additional tag decorations.
|
|
|
|
|
`global-semantic-highlight-func-mode' - Highlight the current tag.
|
|
|
|
|
`global-semantic-stickyfunc-mode' - Show current fun in header line.
|
|
|
|
|
`global-semantic-mru-bookmark-mode' - Provide `switch-to-buffer'-like
|
2012-10-02 02:10:29 +08:00
|
|
|
|
keybinding for tag names.
|
|
|
|
|
`global-semantic-idle-local-symbol-highlight-mode' - Highlight references
|
|
|
|
|
of the symbol under point.
|
|
|
|
|
The following modes are more targeted at people who want to see
|
|
|
|
|
some internal information of the semantic parser in action:
|
|
|
|
|
`global-semantic-highlight-edits-mode' - Visualize incremental parser by
|
|
|
|
|
highlighting not-yet parsed changes.
|
|
|
|
|
`global-semantic-show-unmatched-syntax-mode' - Highlight unmatched lexical
|
|
|
|
|
syntax tokens.
|
|
|
|
|
`global-semantic-show-parser-state-mode' - Display the parser cache state."
|
2009-09-21 02:14:58 +00:00
|
|
|
|
:group 'semantic
|
|
|
|
|
:type `(set ,@(mapcar (lambda (c) (list 'const c))
|
|
|
|
|
semantic-submode-list)))
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(define-minor-mode semantic-mode
|
2011-10-19 20:26:14 -04:00
|
|
|
|
"Toggle parser features (Semantic mode).
|
2009-09-21 02:14:58 +00:00
|
|
|
|
|
|
|
|
|
In Semantic mode, Emacs parses the buffers you visit for their
|
|
|
|
|
semantic content. This information is used by a variety of
|
2010-01-17 03:25:53 +01:00
|
|
|
|
auxiliary minor modes, listed in `semantic-default-submodes';
|
2009-09-21 02:14:58 +00:00
|
|
|
|
all the minor modes in this list are also enabled when you enable
|
2009-09-27 03:36:58 +00:00
|
|
|
|
Semantic mode.
|
|
|
|
|
|
|
|
|
|
\\{semantic-mode-map}"
|
|
|
|
|
:global t
|
2009-09-21 02:14:58 +00:00
|
|
|
|
:group 'semantic
|
|
|
|
|
(if semantic-mode
|
|
|
|
|
;; Turn on Semantic mode
|
|
|
|
|
(progn
|
2010-01-17 03:25:53 +01:00
|
|
|
|
;; Enable all the global auxiliary minor modes in
|
2009-09-27 03:36:58 +00:00
|
|
|
|
;; `semantic-submode-list'.
|
2009-09-21 02:14:58 +00:00
|
|
|
|
(dolist (mode semantic-submode-list)
|
2017-04-13 20:12:02 -04:00
|
|
|
|
(and (memq mode semantic-default-submodes)
|
|
|
|
|
(fboundp mode)
|
|
|
|
|
(funcall mode 1)))
|
2009-09-21 02:14:58 +00:00
|
|
|
|
(unless semantic-load-system-cache-loaded
|
|
|
|
|
(setq semantic-load-system-cache-loaded t)
|
|
|
|
|
(when (and (boundp 'semanticdb-default-system-save-directory)
|
|
|
|
|
(stringp semanticdb-default-system-save-directory)
|
|
|
|
|
(file-exists-p semanticdb-default-system-save-directory))
|
2009-09-21 19:05:56 +00:00
|
|
|
|
(require 'semantic/db-ebrowse)
|
2009-09-21 02:14:58 +00:00
|
|
|
|
(semanticdb-load-ebrowse-caches)))
|
2009-10-04 19:25:26 +00:00
|
|
|
|
(add-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
|
Synch Semantic to CEDET 1.0.
Move CEDET ChangeLog entries to new file lisp/cedet/ChangeLog.
* semantic.el (semantic-version): Update to 2.0.
(semantic-mode-map): Add "," and "m" bindings.
(navigate-menu): Update.
* semantic/symref.el (semantic-symref-calculate-rootdir):
New function.
(semantic-symref-detect-symref-tool): Use it.
* semantic/symref/grep.el (semantic-symref-grep-shell): New var.
(semantic-symref-perform-search): Use it. Calculate root dir with
semantic-symref-calculate-rootdir.
(semantic-symref-derive-find-filepatterns): Improve error message.
* semantic/symref/list.el
(semantic-symref-results-mode-map): New bindings.
(semantic-symref-auto-expand-results): New option.
(semantic-symref-results-dump): Obey auto-expand.
(semantic-symref-list-expand-all, semantic-symref-regexp)
(semantic-symref-list-contract-all)
(semantic-symref-list-map-open-hits)
(semantic-symref-list-update-open-hits)
(semantic-symref-list-create-macro-on-open-hit)
(semantic-symref-list-call-macro-on-open-hits): New functions.
(semantic-symref-list-menu-entries)
(semantic-symref-list-menu): New vars.
(semantic-symref-list-map-open-hits): Move cursor to beginning of
match before calling the mapped function.
* semantic/doc.el
(semantic-documentation-comment-preceeding-tag): Do nothing if the
mode doesn't provide comment-start-skip.
* semantic/scope.el
(semantic-analyze-scope-nested-tags-default): Strip duplicates.
(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
looking for as part of the scoped tags list.
* semantic/html.el (semantic-default-html-setup): Add
senator-step-at-tag-classes.
* semantic/decorate/include.el
(semantic-decoration-on-unknown-includes): Change light bgcolor.
(semantic-decoration-on-includes-highlight-default): Check that
the include tag has a postion.
* semantic/complete.el (semantic-collector-local-members):
(semantic-complete-read-tag-local-members)
(semantic-complete-jump-local-members): New class and functions.
(semantic-complete-self-insert): Save excursion before completing.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): If no completions
are found, return the raw by-name-only completion list. Add FLAGS
arguments. Add support for 'no-tc (type constraint) and
'no-unique, or no stripping duplicates.
(semantic-analyze-possible-completions-default): Add FLAGS arg.
* semantic/util-modes.el
(semantic-stickyfunc-show-only-functions-p): New option.
(semantic-stickyfunc-fetch-stickyline): Don't show stickytext for
the very first line in a buffer.
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-describe-buffer): Fix expand-nonterminal. Add
lex-syntax-mods, type relation separator char, and command
separation char.
(semantic-sanity-check): Only message if called interactively.
* semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the
:filename property and the tag position.
* semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Add recursion limit.
* semantic/imenu.el (semantic-imenu-bucketize-type-members):
Make this buffer local, not the obsoleted variable.
* semantic/idle.el: Add breadcrumbs support.
(semantic-idle-summary-current-symbol-info-default)
(semantic-idle-tag-highlight)
(semantic-idle-completion-list-default): Use
semanticdb-without-unloaded-file-searches for speed, and to
conform to the controls that specify if the idle timer is supposed
to be parsing unparsed includes.
(semantic-idle-symbol-highlight-face)
(semantic-idle-symbol-maybe-highlight): Rename from *-summary-*.
Callers changed.
(semantic-idle-work-parse-neighboring-files-flag): Default to nil.
(semantic-idle-work-update-headers-flag): New var.
(semantic-idle-work-for-one-buffer): Use it.
(semantic-idle-local-symbol-highlight): Rename from
semantic-idle-tag-highlight.
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.
* semantic/grammar.el (semantic-grammar-create-package):
Save the buffer even in batch mode.
* semantic/fw.el
(semanticdb-without-unloaded-file-searches): New macro.
* semantic/dep.el (semantic-dependency-find-file-on-path):
Fix case dereferencing ede-object when it is a list.
* semantic/db-typecache.el (semanticdb-expand-nested-tag)
(semanticdb-typecache-faux-namespace): New functions.
(semanticdb-typecache-file-tags)
(semanticdb-typecache-merge-streams): Use them.
(semanticdb-typecache-file-tags): When deriving tags from a file,
give the mode a chance to monkey with the tag copy.
(semanticdb-typecache-find-default): Wrap find in save-excursion.
(semanticdb-typecache-find-by-name-helper): Merge found names down.
* semantic/db-global.el
(semanticdb-enable-gnu-global-in-buffer): Don't show messages if
GNU Global is not available and we don't want to throw an error.
* semantic/db-find.el (semanticdb-find-result-nth-in-buffer):
When trying to normalize the tag to a buffer, don't error if
set-buffer method doesn't exist.
* semantic/db-file.el (semanticdb-save-db): Simplify msg.
* semantic/db.el (semanticdb-refresh-table): If forcing a
refresh on a file not in a buffer, use semantic-find-file-noselect
and delete the buffer after use.
(semanticdb-current-database-list): When calculating root via
hooks, force it through true-filename and skip the list of
possible roots.
* semantic/ctxt.el (semantic-ctxt-imported-packages): New.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-tag): Reset standard output to
current buffer.
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype): Change "prefix" to
"symbol" in messages.
* semantic/analyze/refs.el: (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): When calculating value, make sure
the found tag is 'similar' to the originating tag.
(semantic--analyze-refs-find-tags-with-parent): Attempt to
identify matches via imported symbols of parents.
(semantic--analyze-refs-full-lookup-with-parents): Do a deep
search during the brute search.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Be robust to
calculated scopes being nil.
* semantic/bovine/c.el (semantic-c-describe-environment): Add
project macro symbol array.
(semantic-c-parse-lexical-token): Add recursion limit.
(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
New overrides.
(semantic-expand-c-tag-namelist): Split a full type from a typedef
out to its own tag.
(semantic-expand-c-tag-namelist): Do not split out a typedef'd
inline type if it is an anonymous type.
(semantic-c-reconstitute-token): Use the optional initializers as
a clue that some function is probably a constructor. When
defining the type of these constructors, split the parent name,
and use only the class part, if applicable.
* semantic/bovine/c-by.el:
* semantic/wisent/python-wy.el: Regenerate.
2010-09-18 22:49:54 -04:00
|
|
|
|
;; Add semantic-ia-complete-symbol to
|
|
|
|
|
;; completion-at-point-functions, so that it is run from
|
|
|
|
|
;; M-TAB.
|
Update from CEDET trunk.
* grammars/c.by (template-type): Add :template-specifier and
:typevar to capture extra details about the template.
(opt-post-fcn-modifiers): Splice in the found symbol into the
return value correctly.
(QUESTION): New punctuation.
(expression): Add ternary conditional support.
* grammars/scheme.by (MODULE): New token.
(scheme): Handle expanding the MODULE tag.
(scheme-list): Remove closeparen required match.
(scheme-in-list): Remove extraneous matches for DEFINE. Add
support for MODULE Simplify matching for code & make work.
(name-args, name-arg-list, name-arg-expand): Make it work.
* semantic.el (semantic-mode): Add/remove 3
completion-at-point-functions.
(semantic-completion-at-point-function): Removed.
(semantic-analyze-completion-at-point-function)
(semantic-analyze-notc-completion-at-point-function)
(semantic-analyze-nolongprefix-completion-at-point-function): New
completion at point functions.
* semantic/doc.el (semantic-doc-snarf-comment-for-tag): Fix case
when comment-end is empty string.
* semantic/debug.el
(semantic-debug-parser-debugger-source): New buffer local
variable.
(semantic-debug-interface): Add 'nil' initform to overlays.
(semantic-debug-mode): Remove read-only tags from buffers on exit.
(semantic-debug): Add autoload cookie. Force the language
specific debugger to load.
* semantic/db.el (generic::semanticdb-full-filename): New generic
method to allow this method to be used on buffer names via an
associated database.
* semantic/symref.el
(semantic-symref-cleanup-recent-buffers-fcn): When cleaning up
buffers, don't clean up buffers that are being used (i.e., in a
window) when the hook fires.
(semantic-symref-recently-opened-buffers): New tracking variable.
(semantic-symref-cleanup-recent-buffers-fcn): New hook fcn.
(semantic-symref-result-get-tags): Move logic into
`semantic-symref-hit-to-tag-via-buffer', and cleanup buffers via
the symref cleanup function in post-command-hook.
(semantic-symref-hit-to-tag-via-buffer): Logic that used to be
from above.
(semantic-symref-hit-to-tag-via-db): New.
* semantic/analyze.el:
(semantic-analyze-find-tag-sequence-default): If first entry in
sequence is the only one, apply tagclass filter.
(semantic-analyze-princ-sequence): Show slot even if empty.
(semantic-analyze-find-tag-sequence)
(semantic-analyze-find-tag-sequence-default): Add flags argument.
Add support for forcing the final entry of the sequence to be of
class variable.
(semantic-analyze-find-tag): Fix bug where input class filter was
ignored if there was a typecache match.
(semantic-analyze-current-context-default): For assignments, the
assignee now must be of class variable.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): Add
'no-longprefix' flag. When used, the prefix and prefixtypes are
shortened to just the last symbol.
* semantic/bovine/c.el (semantic-c-do-lex-if): Catch errors from
'hideif', and push to the parser warning stack.
(semantic-lex-cpp-define): When a comment is at the end of a
macro, do not subtract an extra 1 from the found position. Fixes
bug with: #define foo (a)/**/ adding an extra ')' to the stream.
* semantic/bovine/scm.el (semantic-lex-scheme-symbol): Allow
symbols to be one char long.
* semantic/bovine/grammar.el
(bovine-grammar-calculate-source-on-path): New.
(bovine-grammar-setupcode-builder): Use it.
* ede.el (ede/detect): New require.
(ede-version): Bump version
(ede-initialize-state-current-buffer): Use new
`ede-detect-directory-for-project' to detect projects first
instead of depending on currente dir only.
(ede-delete-project-from-global-list): New.
(ede-flush-deleted-projects): Use above.
(ede-check-project-query-fcn): New variable
(ede-check-project-directory): Use above when querying the user.
Added to support unit testing of this security measure.
(ede-initialize-state-current-buffer): Use
`ede-directory-project-cons' instead of the -detect- fcn to take
advantage of the cache. Pass found project into
`ede-load-project-file'.
(ede-load-project-file): Add new input DETECTIN.
(ede-rescan-toplevel): Get the proj root a better way.
(ede-load-project-file): Return the loaded object. When asking
for existing project, ask for an exact match.
(ede-initialize-state-current-buffer): Simplify some conditional
logic.
(ede-load-project-file): Simplify conditional logic.
(ede-global-list-sanity-check): New Testing fcn.
(ede-parent-project): Replace old code with call to faster
`ede-find-subproject-for-directory'.
(ede-load-project-file): Use
`ede-directory-get-toplevel-open-project' instead of above
deleted. Rename "pfc" to "autoloader". Use
`ede-directory-project-cons' to detect a project. Delete no
project found case where we search up the tree.
* ede/auto.el (ede-project-autoload): Fix doc typo. Add
`:root-only' slot.
(ede-auto-load-project): Doc update: warn to not use.
(ede-dir-to-projectfile): Deleted.
(ede-project-autoload-dirmatch): Add subdir-only slot. Make
configdatastash unbound by default.
(ede-do-dirmatch): If subdir-only is true, then don't allow exact
matches. Account for configdatastash as unbound. Assume value of
nil means no tool installed. Make sure loaded path matches from
beginning. Stash the regexp, not the raw string.
(ede-project-class-files): Note that makefile and automake are not
root only.
(ede-auto-detect-in-dir): New (for use with `ede/detect.el').
(ede-project-dirmatch-p): Deleted.
(ede-project-root-directory): Remove body, return nil.
(ede-project-autoload): :proj-root-dirmatch can be null & doc fix.
(ede-auto-detect-in-dir): If there is no :proj-file, check for a
dirmatch.
* ede/generic.el (ede/config): Replace require of ede.
(ede-generic-new-autoloader): Generic projects are now safe by
default. Note this is NOT a root only project.
(project-rescan, ede-project-root, ede-generic-target-java)
(ede-java-classpath, ede-find-subproject-for-directory): New.
(ede-enable-generic-projects): Add new autoloaders for git, bzr,
hg, sv, CVS.
(ede-generic-vc-project)
(ede-generic-vc-project::ede-generic-setup-configuration): New.
(ede-generic-config): Remove slots: c-include-path,
c-preprocessor-table, c-preprocessor-files, classpath,
build-command, debug-command, run command. Inherit from
ede-extra-config-build, ede-extra-config-program. Make
run-command :value match :custom so only strings are accepted.
Add some more :group slot specifiers.
(ede-generic-project): Add mixins `ede-project-with-config-c' and
`ede-project-with-config-java'. Inherit from
`ede-project-with-config-build',
`ede-project-with-config-program'. Subclass
`ede-project-with-config'. Remove duplication from new baseclass.
(ede-generic-target): Inherit from `ede-target-with-config-build',
`ede-target-with-config-program'. Subclass `ede-target-with-config'.
(ede-generic-target-c-cpp): Add mixin `ede-target-with-config-c'.
(ede-generic-target-java): Add mixin `ede-target-with-config-java'.
(ede-preprocessor-map, ede-system-include-path)
(edejava-classpath): Deleted, moved to config.el.
(project-compile-project, project-compile-target)
(project-debug-target, project-run-target): Deleted.
(ede-generic-get-configuration, ede-generic-setup-configuration)
(ede-commit-project, project-rescan)
(ede-generic-project::ede-customize)
(ede-generic-target::ede-customize)
(ede-generic-config::eieio-done-customizing)
(ede-generic-config::ede-commit): Deleted. Subsumed by new
baseclass.
(ede-preprocessor-map, ede-system-include-path)
(project-debug-target, project-run-target): Call new
`ede-config-get-configuration' instead of old version.
(ede-generic-load): Do not add to global list here.
* ede/files.el (ede-find-project-root)
(ede-files-find-existing)
(ede-directory-get-toplevel-open-project-new): Deleted.
(ede-project-root-directory): Use `ede-project-root' first.
(ede-project-directory-remove-hash)
(ede--directory-project-from-hash)
(ede--directory-project-add-description-to-hash): Rename to make
internal symbols (via --). Expand input dir first.
(ede-directory-project-p): Doc fix (note obsoleted.)
(ede-toplevel-project-or-nil): Alias to `ede-toplevel-project'.
(ede-toplevel-project): Doc Fix. Delete commented out old code.
Simplify returning result from ede-detect-directory-for-project.
(ede-directory-get-open-project): Support when
inodes are disabled. If disabled to str compare on root project.
(ede-directory-get-toplevel-open-project): Enabled nested
projects. When doing directory name matching, save the 'short'
version of an answer (non-exact match) and eventually select the
shortest answer at the end. Expand the filename of tested
projects. Better support for when inodes are disabled. Add
'exact' option so that it will return a project that is an exact
match.
(ede-find-subproject-for-directory): Small optimization to run
`file-truename' less often.
(ede-directory-project-p): Move content, then use
`ede-directory-project-cons'. Use
`ede-detect-directory-for-project', replacing old detection loop.
(ede-directory-project-cons): New, from above.
(ede-toplevel-project): Toss old scanning code. Use
`ede-detect-directory-for-project' instead.
(ede-directory-get-toplevel-open-project-new): New.
* ede/linux.el (ede-linux-project-root): Deleted.
(ede-project-autoload): Remove dirmatch entry - it is no longer
needed.
* lisp/cedet/ede/proj.el (project-rescan): Replace direct
manipulation of `ede-projects' with equivalent and better
functions.
(ede-proj-load): Replace call to test if dir has project to
explicity ask filesystem if Project.ede is there.
* ede/config.el:
* ede/detect.el: New files.
* ede/project-am.el (project-run-target): Add "./" to program to
run for systems where '.' isn't in PATH.
(project-am-load): Remove old code regarding `ede-constructing'.
Just read in the makefiles.
* ede/linux.el (ede-linux-load): Do not add to global list here.
Don't check for existing anymore.
(project-rescan): New.
(ede-linux-project-list, ede-linux-file-existing): Deleted.
(ede-linux-project-root): Delete body. Need symbol for autoloads
for now.
(ede-linux-project): No longer instance tracker.
(ede-project-autoload): Don't provide :proj-root
* ede/emacs.el (ede-emacs-load): Do not add project to global list
here. Don't look for existing first.
(ede-project-autoload): Remove dirmatch entry - it is no longer
needed. Don't provide proj-root anymore.
(ede-emacs-project-list, ede-emacs-file-existing): Delete.
(ede-emacs-project-root): Remove body (need symbol for loaddefs
still).
(ede-emacs-project): Do not instance track anymore.
* ede/cpp-root.el (initialize-instance): Remove commented code.
Add note about why we are adding the project to the master list.
Make sure if we are replacing a prev version, remove from global
list.
(ede-cpp-root-file-existing)
(ede-cpp-root-project-file-for-dir)
(ede-cpp-root-count, ede-cpp-root-project-root, ede-cpp-root-load)
(ede-project-autoload cpp-root): Deleted.
(ede-project-root-directory): Return :directory instead of
calculating from :file.
(project-rescan): New.
* ede/base.el (ede-toplevel): Only use buffer cached value if
subproj not passed in.
* srecode/java.el (srecode-semantic-handle-:java): Fix case when
an EDE project didn't support java paths.
* lisp/cedet/ede/proj-elisp.el
(ede-proj-target-elisp::ede-proj-tweak-autoconf): Kill buffer
after saving modified elisp-comp script, as to avoid "file has
changed on disk; really edit the buffer" questions when script
gets rewritten.
* emacs-lisp/eieio-custom.el (eieio-customize-object): Set
eieio-cog (current group) to g, which is an improved form of input
group.
* srecode/doc-cpp.srt (mode): Set to c mode so this works with
both C and C++.
2014-11-10 01:04:30 +01:00
|
|
|
|
;;
|
|
|
|
|
;; Note: The first entry added is the last entry run, so the
|
|
|
|
|
;; most specific entry should be last.
|
Synch Semantic to CEDET 1.0.
Move CEDET ChangeLog entries to new file lisp/cedet/ChangeLog.
* semantic.el (semantic-version): Update to 2.0.
(semantic-mode-map): Add "," and "m" bindings.
(navigate-menu): Update.
* semantic/symref.el (semantic-symref-calculate-rootdir):
New function.
(semantic-symref-detect-symref-tool): Use it.
* semantic/symref/grep.el (semantic-symref-grep-shell): New var.
(semantic-symref-perform-search): Use it. Calculate root dir with
semantic-symref-calculate-rootdir.
(semantic-symref-derive-find-filepatterns): Improve error message.
* semantic/symref/list.el
(semantic-symref-results-mode-map): New bindings.
(semantic-symref-auto-expand-results): New option.
(semantic-symref-results-dump): Obey auto-expand.
(semantic-symref-list-expand-all, semantic-symref-regexp)
(semantic-symref-list-contract-all)
(semantic-symref-list-map-open-hits)
(semantic-symref-list-update-open-hits)
(semantic-symref-list-create-macro-on-open-hit)
(semantic-symref-list-call-macro-on-open-hits): New functions.
(semantic-symref-list-menu-entries)
(semantic-symref-list-menu): New vars.
(semantic-symref-list-map-open-hits): Move cursor to beginning of
match before calling the mapped function.
* semantic/doc.el
(semantic-documentation-comment-preceeding-tag): Do nothing if the
mode doesn't provide comment-start-skip.
* semantic/scope.el
(semantic-analyze-scope-nested-tags-default): Strip duplicates.
(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
looking for as part of the scoped tags list.
* semantic/html.el (semantic-default-html-setup): Add
senator-step-at-tag-classes.
* semantic/decorate/include.el
(semantic-decoration-on-unknown-includes): Change light bgcolor.
(semantic-decoration-on-includes-highlight-default): Check that
the include tag has a postion.
* semantic/complete.el (semantic-collector-local-members):
(semantic-complete-read-tag-local-members)
(semantic-complete-jump-local-members): New class and functions.
(semantic-complete-self-insert): Save excursion before completing.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): If no completions
are found, return the raw by-name-only completion list. Add FLAGS
arguments. Add support for 'no-tc (type constraint) and
'no-unique, or no stripping duplicates.
(semantic-analyze-possible-completions-default): Add FLAGS arg.
* semantic/util-modes.el
(semantic-stickyfunc-show-only-functions-p): New option.
(semantic-stickyfunc-fetch-stickyline): Don't show stickytext for
the very first line in a buffer.
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-describe-buffer): Fix expand-nonterminal. Add
lex-syntax-mods, type relation separator char, and command
separation char.
(semantic-sanity-check): Only message if called interactively.
* semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the
:filename property and the tag position.
* semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Add recursion limit.
* semantic/imenu.el (semantic-imenu-bucketize-type-members):
Make this buffer local, not the obsoleted variable.
* semantic/idle.el: Add breadcrumbs support.
(semantic-idle-summary-current-symbol-info-default)
(semantic-idle-tag-highlight)
(semantic-idle-completion-list-default): Use
semanticdb-without-unloaded-file-searches for speed, and to
conform to the controls that specify if the idle timer is supposed
to be parsing unparsed includes.
(semantic-idle-symbol-highlight-face)
(semantic-idle-symbol-maybe-highlight): Rename from *-summary-*.
Callers changed.
(semantic-idle-work-parse-neighboring-files-flag): Default to nil.
(semantic-idle-work-update-headers-flag): New var.
(semantic-idle-work-for-one-buffer): Use it.
(semantic-idle-local-symbol-highlight): Rename from
semantic-idle-tag-highlight.
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.
* semantic/grammar.el (semantic-grammar-create-package):
Save the buffer even in batch mode.
* semantic/fw.el
(semanticdb-without-unloaded-file-searches): New macro.
* semantic/dep.el (semantic-dependency-find-file-on-path):
Fix case dereferencing ede-object when it is a list.
* semantic/db-typecache.el (semanticdb-expand-nested-tag)
(semanticdb-typecache-faux-namespace): New functions.
(semanticdb-typecache-file-tags)
(semanticdb-typecache-merge-streams): Use them.
(semanticdb-typecache-file-tags): When deriving tags from a file,
give the mode a chance to monkey with the tag copy.
(semanticdb-typecache-find-default): Wrap find in save-excursion.
(semanticdb-typecache-find-by-name-helper): Merge found names down.
* semantic/db-global.el
(semanticdb-enable-gnu-global-in-buffer): Don't show messages if
GNU Global is not available and we don't want to throw an error.
* semantic/db-find.el (semanticdb-find-result-nth-in-buffer):
When trying to normalize the tag to a buffer, don't error if
set-buffer method doesn't exist.
* semantic/db-file.el (semanticdb-save-db): Simplify msg.
* semantic/db.el (semanticdb-refresh-table): If forcing a
refresh on a file not in a buffer, use semantic-find-file-noselect
and delete the buffer after use.
(semanticdb-current-database-list): When calculating root via
hooks, force it through true-filename and skip the list of
possible roots.
* semantic/ctxt.el (semantic-ctxt-imported-packages): New.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-tag): Reset standard output to
current buffer.
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype): Change "prefix" to
"symbol" in messages.
* semantic/analyze/refs.el: (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): When calculating value, make sure
the found tag is 'similar' to the originating tag.
(semantic--analyze-refs-find-tags-with-parent): Attempt to
identify matches via imported symbols of parents.
(semantic--analyze-refs-full-lookup-with-parents): Do a deep
search during the brute search.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Be robust to
calculated scopes being nil.
* semantic/bovine/c.el (semantic-c-describe-environment): Add
project macro symbol array.
(semantic-c-parse-lexical-token): Add recursion limit.
(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
New overrides.
(semantic-expand-c-tag-namelist): Split a full type from a typedef
out to its own tag.
(semantic-expand-c-tag-namelist): Do not split out a typedef'd
inline type if it is an anonymous type.
(semantic-c-reconstitute-token): Use the optional initializers as
a clue that some function is probably a constructor. When
defining the type of these constructors, split the parent name,
and use only the class part, if applicable.
* semantic/bovine/c-by.el:
* semantic/wisent/python-wy.el: Regenerate.
2010-09-18 22:49:54 -04:00
|
|
|
|
(add-hook 'completion-at-point-functions
|
Update from CEDET trunk.
* grammars/c.by (template-type): Add :template-specifier and
:typevar to capture extra details about the template.
(opt-post-fcn-modifiers): Splice in the found symbol into the
return value correctly.
(QUESTION): New punctuation.
(expression): Add ternary conditional support.
* grammars/scheme.by (MODULE): New token.
(scheme): Handle expanding the MODULE tag.
(scheme-list): Remove closeparen required match.
(scheme-in-list): Remove extraneous matches for DEFINE. Add
support for MODULE Simplify matching for code & make work.
(name-args, name-arg-list, name-arg-expand): Make it work.
* semantic.el (semantic-mode): Add/remove 3
completion-at-point-functions.
(semantic-completion-at-point-function): Removed.
(semantic-analyze-completion-at-point-function)
(semantic-analyze-notc-completion-at-point-function)
(semantic-analyze-nolongprefix-completion-at-point-function): New
completion at point functions.
* semantic/doc.el (semantic-doc-snarf-comment-for-tag): Fix case
when comment-end is empty string.
* semantic/debug.el
(semantic-debug-parser-debugger-source): New buffer local
variable.
(semantic-debug-interface): Add 'nil' initform to overlays.
(semantic-debug-mode): Remove read-only tags from buffers on exit.
(semantic-debug): Add autoload cookie. Force the language
specific debugger to load.
* semantic/db.el (generic::semanticdb-full-filename): New generic
method to allow this method to be used on buffer names via an
associated database.
* semantic/symref.el
(semantic-symref-cleanup-recent-buffers-fcn): When cleaning up
buffers, don't clean up buffers that are being used (i.e., in a
window) when the hook fires.
(semantic-symref-recently-opened-buffers): New tracking variable.
(semantic-symref-cleanup-recent-buffers-fcn): New hook fcn.
(semantic-symref-result-get-tags): Move logic into
`semantic-symref-hit-to-tag-via-buffer', and cleanup buffers via
the symref cleanup function in post-command-hook.
(semantic-symref-hit-to-tag-via-buffer): Logic that used to be
from above.
(semantic-symref-hit-to-tag-via-db): New.
* semantic/analyze.el:
(semantic-analyze-find-tag-sequence-default): If first entry in
sequence is the only one, apply tagclass filter.
(semantic-analyze-princ-sequence): Show slot even if empty.
(semantic-analyze-find-tag-sequence)
(semantic-analyze-find-tag-sequence-default): Add flags argument.
Add support for forcing the final entry of the sequence to be of
class variable.
(semantic-analyze-find-tag): Fix bug where input class filter was
ignored if there was a typecache match.
(semantic-analyze-current-context-default): For assignments, the
assignee now must be of class variable.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): Add
'no-longprefix' flag. When used, the prefix and prefixtypes are
shortened to just the last symbol.
* semantic/bovine/c.el (semantic-c-do-lex-if): Catch errors from
'hideif', and push to the parser warning stack.
(semantic-lex-cpp-define): When a comment is at the end of a
macro, do not subtract an extra 1 from the found position. Fixes
bug with: #define foo (a)/**/ adding an extra ')' to the stream.
* semantic/bovine/scm.el (semantic-lex-scheme-symbol): Allow
symbols to be one char long.
* semantic/bovine/grammar.el
(bovine-grammar-calculate-source-on-path): New.
(bovine-grammar-setupcode-builder): Use it.
* ede.el (ede/detect): New require.
(ede-version): Bump version
(ede-initialize-state-current-buffer): Use new
`ede-detect-directory-for-project' to detect projects first
instead of depending on currente dir only.
(ede-delete-project-from-global-list): New.
(ede-flush-deleted-projects): Use above.
(ede-check-project-query-fcn): New variable
(ede-check-project-directory): Use above when querying the user.
Added to support unit testing of this security measure.
(ede-initialize-state-current-buffer): Use
`ede-directory-project-cons' instead of the -detect- fcn to take
advantage of the cache. Pass found project into
`ede-load-project-file'.
(ede-load-project-file): Add new input DETECTIN.
(ede-rescan-toplevel): Get the proj root a better way.
(ede-load-project-file): Return the loaded object. When asking
for existing project, ask for an exact match.
(ede-initialize-state-current-buffer): Simplify some conditional
logic.
(ede-load-project-file): Simplify conditional logic.
(ede-global-list-sanity-check): New Testing fcn.
(ede-parent-project): Replace old code with call to faster
`ede-find-subproject-for-directory'.
(ede-load-project-file): Use
`ede-directory-get-toplevel-open-project' instead of above
deleted. Rename "pfc" to "autoloader". Use
`ede-directory-project-cons' to detect a project. Delete no
project found case where we search up the tree.
* ede/auto.el (ede-project-autoload): Fix doc typo. Add
`:root-only' slot.
(ede-auto-load-project): Doc update: warn to not use.
(ede-dir-to-projectfile): Deleted.
(ede-project-autoload-dirmatch): Add subdir-only slot. Make
configdatastash unbound by default.
(ede-do-dirmatch): If subdir-only is true, then don't allow exact
matches. Account for configdatastash as unbound. Assume value of
nil means no tool installed. Make sure loaded path matches from
beginning. Stash the regexp, not the raw string.
(ede-project-class-files): Note that makefile and automake are not
root only.
(ede-auto-detect-in-dir): New (for use with `ede/detect.el').
(ede-project-dirmatch-p): Deleted.
(ede-project-root-directory): Remove body, return nil.
(ede-project-autoload): :proj-root-dirmatch can be null & doc fix.
(ede-auto-detect-in-dir): If there is no :proj-file, check for a
dirmatch.
* ede/generic.el (ede/config): Replace require of ede.
(ede-generic-new-autoloader): Generic projects are now safe by
default. Note this is NOT a root only project.
(project-rescan, ede-project-root, ede-generic-target-java)
(ede-java-classpath, ede-find-subproject-for-directory): New.
(ede-enable-generic-projects): Add new autoloaders for git, bzr,
hg, sv, CVS.
(ede-generic-vc-project)
(ede-generic-vc-project::ede-generic-setup-configuration): New.
(ede-generic-config): Remove slots: c-include-path,
c-preprocessor-table, c-preprocessor-files, classpath,
build-command, debug-command, run command. Inherit from
ede-extra-config-build, ede-extra-config-program. Make
run-command :value match :custom so only strings are accepted.
Add some more :group slot specifiers.
(ede-generic-project): Add mixins `ede-project-with-config-c' and
`ede-project-with-config-java'. Inherit from
`ede-project-with-config-build',
`ede-project-with-config-program'. Subclass
`ede-project-with-config'. Remove duplication from new baseclass.
(ede-generic-target): Inherit from `ede-target-with-config-build',
`ede-target-with-config-program'. Subclass `ede-target-with-config'.
(ede-generic-target-c-cpp): Add mixin `ede-target-with-config-c'.
(ede-generic-target-java): Add mixin `ede-target-with-config-java'.
(ede-preprocessor-map, ede-system-include-path)
(edejava-classpath): Deleted, moved to config.el.
(project-compile-project, project-compile-target)
(project-debug-target, project-run-target): Deleted.
(ede-generic-get-configuration, ede-generic-setup-configuration)
(ede-commit-project, project-rescan)
(ede-generic-project::ede-customize)
(ede-generic-target::ede-customize)
(ede-generic-config::eieio-done-customizing)
(ede-generic-config::ede-commit): Deleted. Subsumed by new
baseclass.
(ede-preprocessor-map, ede-system-include-path)
(project-debug-target, project-run-target): Call new
`ede-config-get-configuration' instead of old version.
(ede-generic-load): Do not add to global list here.
* ede/files.el (ede-find-project-root)
(ede-files-find-existing)
(ede-directory-get-toplevel-open-project-new): Deleted.
(ede-project-root-directory): Use `ede-project-root' first.
(ede-project-directory-remove-hash)
(ede--directory-project-from-hash)
(ede--directory-project-add-description-to-hash): Rename to make
internal symbols (via --). Expand input dir first.
(ede-directory-project-p): Doc fix (note obsoleted.)
(ede-toplevel-project-or-nil): Alias to `ede-toplevel-project'.
(ede-toplevel-project): Doc Fix. Delete commented out old code.
Simplify returning result from ede-detect-directory-for-project.
(ede-directory-get-open-project): Support when
inodes are disabled. If disabled to str compare on root project.
(ede-directory-get-toplevel-open-project): Enabled nested
projects. When doing directory name matching, save the 'short'
version of an answer (non-exact match) and eventually select the
shortest answer at the end. Expand the filename of tested
projects. Better support for when inodes are disabled. Add
'exact' option so that it will return a project that is an exact
match.
(ede-find-subproject-for-directory): Small optimization to run
`file-truename' less often.
(ede-directory-project-p): Move content, then use
`ede-directory-project-cons'. Use
`ede-detect-directory-for-project', replacing old detection loop.
(ede-directory-project-cons): New, from above.
(ede-toplevel-project): Toss old scanning code. Use
`ede-detect-directory-for-project' instead.
(ede-directory-get-toplevel-open-project-new): New.
* ede/linux.el (ede-linux-project-root): Deleted.
(ede-project-autoload): Remove dirmatch entry - it is no longer
needed.
* lisp/cedet/ede/proj.el (project-rescan): Replace direct
manipulation of `ede-projects' with equivalent and better
functions.
(ede-proj-load): Replace call to test if dir has project to
explicity ask filesystem if Project.ede is there.
* ede/config.el:
* ede/detect.el: New files.
* ede/project-am.el (project-run-target): Add "./" to program to
run for systems where '.' isn't in PATH.
(project-am-load): Remove old code regarding `ede-constructing'.
Just read in the makefiles.
* ede/linux.el (ede-linux-load): Do not add to global list here.
Don't check for existing anymore.
(project-rescan): New.
(ede-linux-project-list, ede-linux-file-existing): Deleted.
(ede-linux-project-root): Delete body. Need symbol for autoloads
for now.
(ede-linux-project): No longer instance tracker.
(ede-project-autoload): Don't provide :proj-root
* ede/emacs.el (ede-emacs-load): Do not add project to global list
here. Don't look for existing first.
(ede-project-autoload): Remove dirmatch entry - it is no longer
needed. Don't provide proj-root anymore.
(ede-emacs-project-list, ede-emacs-file-existing): Delete.
(ede-emacs-project-root): Remove body (need symbol for loaddefs
still).
(ede-emacs-project): Do not instance track anymore.
* ede/cpp-root.el (initialize-instance): Remove commented code.
Add note about why we are adding the project to the master list.
Make sure if we are replacing a prev version, remove from global
list.
(ede-cpp-root-file-existing)
(ede-cpp-root-project-file-for-dir)
(ede-cpp-root-count, ede-cpp-root-project-root, ede-cpp-root-load)
(ede-project-autoload cpp-root): Deleted.
(ede-project-root-directory): Return :directory instead of
calculating from :file.
(project-rescan): New.
* ede/base.el (ede-toplevel): Only use buffer cached value if
subproj not passed in.
* srecode/java.el (srecode-semantic-handle-:java): Fix case when
an EDE project didn't support java paths.
* lisp/cedet/ede/proj-elisp.el
(ede-proj-target-elisp::ede-proj-tweak-autoconf): Kill buffer
after saving modified elisp-comp script, as to avoid "file has
changed on disk; really edit the buffer" questions when script
gets rewritten.
* emacs-lisp/eieio-custom.el (eieio-customize-object): Set
eieio-cog (current group) to g, which is an improved form of input
group.
* srecode/doc-cpp.srt (mode): Set to c mode so this works with
both C and C++.
2014-11-10 01:04:30 +01:00
|
|
|
|
'semantic-analyze-nolongprefix-completion-at-point-function)
|
|
|
|
|
(add-hook 'completion-at-point-functions
|
|
|
|
|
'semantic-analyze-notc-completion-at-point-function)
|
|
|
|
|
(add-hook 'completion-at-point-functions
|
|
|
|
|
'semantic-analyze-completion-at-point-function)
|
2014-11-16 22:26:17 -08:00
|
|
|
|
|
2017-04-13 20:12:02 -04:00
|
|
|
|
(if (bound-and-true-p global-ede-mode)
|
2009-10-31 18:03:02 +00:00
|
|
|
|
(define-key cedet-menu-map [cedet-menu-separator] '("--")))
|
2009-10-04 19:25:26 +00:00
|
|
|
|
(dolist (b (buffer-list))
|
|
|
|
|
(with-current-buffer b
|
|
|
|
|
(semantic-new-buffer-fcn))))
|
2012-10-02 02:10:29 +08:00
|
|
|
|
;; Disable Semantic features. Removing everything Semantic has
|
|
|
|
|
;; introduced in the buffer is pretty much futile, but we have to
|
|
|
|
|
;; clean the hooks and delete Semantic-related overlays, so that
|
|
|
|
|
;; Semantic can be re-activated cleanly.
|
2009-09-21 02:14:58 +00:00
|
|
|
|
(remove-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
|
Synch Semantic to CEDET 1.0.
Move CEDET ChangeLog entries to new file lisp/cedet/ChangeLog.
* semantic.el (semantic-version): Update to 2.0.
(semantic-mode-map): Add "," and "m" bindings.
(navigate-menu): Update.
* semantic/symref.el (semantic-symref-calculate-rootdir):
New function.
(semantic-symref-detect-symref-tool): Use it.
* semantic/symref/grep.el (semantic-symref-grep-shell): New var.
(semantic-symref-perform-search): Use it. Calculate root dir with
semantic-symref-calculate-rootdir.
(semantic-symref-derive-find-filepatterns): Improve error message.
* semantic/symref/list.el
(semantic-symref-results-mode-map): New bindings.
(semantic-symref-auto-expand-results): New option.
(semantic-symref-results-dump): Obey auto-expand.
(semantic-symref-list-expand-all, semantic-symref-regexp)
(semantic-symref-list-contract-all)
(semantic-symref-list-map-open-hits)
(semantic-symref-list-update-open-hits)
(semantic-symref-list-create-macro-on-open-hit)
(semantic-symref-list-call-macro-on-open-hits): New functions.
(semantic-symref-list-menu-entries)
(semantic-symref-list-menu): New vars.
(semantic-symref-list-map-open-hits): Move cursor to beginning of
match before calling the mapped function.
* semantic/doc.el
(semantic-documentation-comment-preceeding-tag): Do nothing if the
mode doesn't provide comment-start-skip.
* semantic/scope.el
(semantic-analyze-scope-nested-tags-default): Strip duplicates.
(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
looking for as part of the scoped tags list.
* semantic/html.el (semantic-default-html-setup): Add
senator-step-at-tag-classes.
* semantic/decorate/include.el
(semantic-decoration-on-unknown-includes): Change light bgcolor.
(semantic-decoration-on-includes-highlight-default): Check that
the include tag has a postion.
* semantic/complete.el (semantic-collector-local-members):
(semantic-complete-read-tag-local-members)
(semantic-complete-jump-local-members): New class and functions.
(semantic-complete-self-insert): Save excursion before completing.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): If no completions
are found, return the raw by-name-only completion list. Add FLAGS
arguments. Add support for 'no-tc (type constraint) and
'no-unique, or no stripping duplicates.
(semantic-analyze-possible-completions-default): Add FLAGS arg.
* semantic/util-modes.el
(semantic-stickyfunc-show-only-functions-p): New option.
(semantic-stickyfunc-fetch-stickyline): Don't show stickytext for
the very first line in a buffer.
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-describe-buffer): Fix expand-nonterminal. Add
lex-syntax-mods, type relation separator char, and command
separation char.
(semantic-sanity-check): Only message if called interactively.
* semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the
:filename property and the tag position.
* semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Add recursion limit.
* semantic/imenu.el (semantic-imenu-bucketize-type-members):
Make this buffer local, not the obsoleted variable.
* semantic/idle.el: Add breadcrumbs support.
(semantic-idle-summary-current-symbol-info-default)
(semantic-idle-tag-highlight)
(semantic-idle-completion-list-default): Use
semanticdb-without-unloaded-file-searches for speed, and to
conform to the controls that specify if the idle timer is supposed
to be parsing unparsed includes.
(semantic-idle-symbol-highlight-face)
(semantic-idle-symbol-maybe-highlight): Rename from *-summary-*.
Callers changed.
(semantic-idle-work-parse-neighboring-files-flag): Default to nil.
(semantic-idle-work-update-headers-flag): New var.
(semantic-idle-work-for-one-buffer): Use it.
(semantic-idle-local-symbol-highlight): Rename from
semantic-idle-tag-highlight.
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.
* semantic/grammar.el (semantic-grammar-create-package):
Save the buffer even in batch mode.
* semantic/fw.el
(semanticdb-without-unloaded-file-searches): New macro.
* semantic/dep.el (semantic-dependency-find-file-on-path):
Fix case dereferencing ede-object when it is a list.
* semantic/db-typecache.el (semanticdb-expand-nested-tag)
(semanticdb-typecache-faux-namespace): New functions.
(semanticdb-typecache-file-tags)
(semanticdb-typecache-merge-streams): Use them.
(semanticdb-typecache-file-tags): When deriving tags from a file,
give the mode a chance to monkey with the tag copy.
(semanticdb-typecache-find-default): Wrap find in save-excursion.
(semanticdb-typecache-find-by-name-helper): Merge found names down.
* semantic/db-global.el
(semanticdb-enable-gnu-global-in-buffer): Don't show messages if
GNU Global is not available and we don't want to throw an error.
* semantic/db-find.el (semanticdb-find-result-nth-in-buffer):
When trying to normalize the tag to a buffer, don't error if
set-buffer method doesn't exist.
* semantic/db-file.el (semanticdb-save-db): Simplify msg.
* semantic/db.el (semanticdb-refresh-table): If forcing a
refresh on a file not in a buffer, use semantic-find-file-noselect
and delete the buffer after use.
(semanticdb-current-database-list): When calculating root via
hooks, force it through true-filename and skip the list of
possible roots.
* semantic/ctxt.el (semantic-ctxt-imported-packages): New.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-tag): Reset standard output to
current buffer.
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype): Change "prefix" to
"symbol" in messages.
* semantic/analyze/refs.el: (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): When calculating value, make sure
the found tag is 'similar' to the originating tag.
(semantic--analyze-refs-find-tags-with-parent): Attempt to
identify matches via imported symbols of parents.
(semantic--analyze-refs-full-lookup-with-parents): Do a deep
search during the brute search.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Be robust to
calculated scopes being nil.
* semantic/bovine/c.el (semantic-c-describe-environment): Add
project macro symbol array.
(semantic-c-parse-lexical-token): Add recursion limit.
(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
New overrides.
(semantic-expand-c-tag-namelist): Split a full type from a typedef
out to its own tag.
(semantic-expand-c-tag-namelist): Do not split out a typedef'd
inline type if it is an anonymous type.
(semantic-c-reconstitute-token): Use the optional initializers as
a clue that some function is probably a constructor. When
defining the type of these constructors, split the parent name,
and use only the class part, if applicable.
* semantic/bovine/c-by.el:
* semantic/wisent/python-wy.el: Regenerate.
2010-09-18 22:49:54 -04:00
|
|
|
|
(remove-hook 'completion-at-point-functions
|
Update from CEDET trunk.
* grammars/c.by (template-type): Add :template-specifier and
:typevar to capture extra details about the template.
(opt-post-fcn-modifiers): Splice in the found symbol into the
return value correctly.
(QUESTION): New punctuation.
(expression): Add ternary conditional support.
* grammars/scheme.by (MODULE): New token.
(scheme): Handle expanding the MODULE tag.
(scheme-list): Remove closeparen required match.
(scheme-in-list): Remove extraneous matches for DEFINE. Add
support for MODULE Simplify matching for code & make work.
(name-args, name-arg-list, name-arg-expand): Make it work.
* semantic.el (semantic-mode): Add/remove 3
completion-at-point-functions.
(semantic-completion-at-point-function): Removed.
(semantic-analyze-completion-at-point-function)
(semantic-analyze-notc-completion-at-point-function)
(semantic-analyze-nolongprefix-completion-at-point-function): New
completion at point functions.
* semantic/doc.el (semantic-doc-snarf-comment-for-tag): Fix case
when comment-end is empty string.
* semantic/debug.el
(semantic-debug-parser-debugger-source): New buffer local
variable.
(semantic-debug-interface): Add 'nil' initform to overlays.
(semantic-debug-mode): Remove read-only tags from buffers on exit.
(semantic-debug): Add autoload cookie. Force the language
specific debugger to load.
* semantic/db.el (generic::semanticdb-full-filename): New generic
method to allow this method to be used on buffer names via an
associated database.
* semantic/symref.el
(semantic-symref-cleanup-recent-buffers-fcn): When cleaning up
buffers, don't clean up buffers that are being used (i.e., in a
window) when the hook fires.
(semantic-symref-recently-opened-buffers): New tracking variable.
(semantic-symref-cleanup-recent-buffers-fcn): New hook fcn.
(semantic-symref-result-get-tags): Move logic into
`semantic-symref-hit-to-tag-via-buffer', and cleanup buffers via
the symref cleanup function in post-command-hook.
(semantic-symref-hit-to-tag-via-buffer): Logic that used to be
from above.
(semantic-symref-hit-to-tag-via-db): New.
* semantic/analyze.el:
(semantic-analyze-find-tag-sequence-default): If first entry in
sequence is the only one, apply tagclass filter.
(semantic-analyze-princ-sequence): Show slot even if empty.
(semantic-analyze-find-tag-sequence)
(semantic-analyze-find-tag-sequence-default): Add flags argument.
Add support for forcing the final entry of the sequence to be of
class variable.
(semantic-analyze-find-tag): Fix bug where input class filter was
ignored if there was a typecache match.
(semantic-analyze-current-context-default): For assignments, the
assignee now must be of class variable.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): Add
'no-longprefix' flag. When used, the prefix and prefixtypes are
shortened to just the last symbol.
* semantic/bovine/c.el (semantic-c-do-lex-if): Catch errors from
'hideif', and push to the parser warning stack.
(semantic-lex-cpp-define): When a comment is at the end of a
macro, do not subtract an extra 1 from the found position. Fixes
bug with: #define foo (a)/**/ adding an extra ')' to the stream.
* semantic/bovine/scm.el (semantic-lex-scheme-symbol): Allow
symbols to be one char long.
* semantic/bovine/grammar.el
(bovine-grammar-calculate-source-on-path): New.
(bovine-grammar-setupcode-builder): Use it.
* ede.el (ede/detect): New require.
(ede-version): Bump version
(ede-initialize-state-current-buffer): Use new
`ede-detect-directory-for-project' to detect projects first
instead of depending on currente dir only.
(ede-delete-project-from-global-list): New.
(ede-flush-deleted-projects): Use above.
(ede-check-project-query-fcn): New variable
(ede-check-project-directory): Use above when querying the user.
Added to support unit testing of this security measure.
(ede-initialize-state-current-buffer): Use
`ede-directory-project-cons' instead of the -detect- fcn to take
advantage of the cache. Pass found project into
`ede-load-project-file'.
(ede-load-project-file): Add new input DETECTIN.
(ede-rescan-toplevel): Get the proj root a better way.
(ede-load-project-file): Return the loaded object. When asking
for existing project, ask for an exact match.
(ede-initialize-state-current-buffer): Simplify some conditional
logic.
(ede-load-project-file): Simplify conditional logic.
(ede-global-list-sanity-check): New Testing fcn.
(ede-parent-project): Replace old code with call to faster
`ede-find-subproject-for-directory'.
(ede-load-project-file): Use
`ede-directory-get-toplevel-open-project' instead of above
deleted. Rename "pfc" to "autoloader". Use
`ede-directory-project-cons' to detect a project. Delete no
project found case where we search up the tree.
* ede/auto.el (ede-project-autoload): Fix doc typo. Add
`:root-only' slot.
(ede-auto-load-project): Doc update: warn to not use.
(ede-dir-to-projectfile): Deleted.
(ede-project-autoload-dirmatch): Add subdir-only slot. Make
configdatastash unbound by default.
(ede-do-dirmatch): If subdir-only is true, then don't allow exact
matches. Account for configdatastash as unbound. Assume value of
nil means no tool installed. Make sure loaded path matches from
beginning. Stash the regexp, not the raw string.
(ede-project-class-files): Note that makefile and automake are not
root only.
(ede-auto-detect-in-dir): New (for use with `ede/detect.el').
(ede-project-dirmatch-p): Deleted.
(ede-project-root-directory): Remove body, return nil.
(ede-project-autoload): :proj-root-dirmatch can be null & doc fix.
(ede-auto-detect-in-dir): If there is no :proj-file, check for a
dirmatch.
* ede/generic.el (ede/config): Replace require of ede.
(ede-generic-new-autoloader): Generic projects are now safe by
default. Note this is NOT a root only project.
(project-rescan, ede-project-root, ede-generic-target-java)
(ede-java-classpath, ede-find-subproject-for-directory): New.
(ede-enable-generic-projects): Add new autoloaders for git, bzr,
hg, sv, CVS.
(ede-generic-vc-project)
(ede-generic-vc-project::ede-generic-setup-configuration): New.
(ede-generic-config): Remove slots: c-include-path,
c-preprocessor-table, c-preprocessor-files, classpath,
build-command, debug-command, run command. Inherit from
ede-extra-config-build, ede-extra-config-program. Make
run-command :value match :custom so only strings are accepted.
Add some more :group slot specifiers.
(ede-generic-project): Add mixins `ede-project-with-config-c' and
`ede-project-with-config-java'. Inherit from
`ede-project-with-config-build',
`ede-project-with-config-program'. Subclass
`ede-project-with-config'. Remove duplication from new baseclass.
(ede-generic-target): Inherit from `ede-target-with-config-build',
`ede-target-with-config-program'. Subclass `ede-target-with-config'.
(ede-generic-target-c-cpp): Add mixin `ede-target-with-config-c'.
(ede-generic-target-java): Add mixin `ede-target-with-config-java'.
(ede-preprocessor-map, ede-system-include-path)
(edejava-classpath): Deleted, moved to config.el.
(project-compile-project, project-compile-target)
(project-debug-target, project-run-target): Deleted.
(ede-generic-get-configuration, ede-generic-setup-configuration)
(ede-commit-project, project-rescan)
(ede-generic-project::ede-customize)
(ede-generic-target::ede-customize)
(ede-generic-config::eieio-done-customizing)
(ede-generic-config::ede-commit): Deleted. Subsumed by new
baseclass.
(ede-preprocessor-map, ede-system-include-path)
(project-debug-target, project-run-target): Call new
`ede-config-get-configuration' instead of old version.
(ede-generic-load): Do not add to global list here.
* ede/files.el (ede-find-project-root)
(ede-files-find-existing)
(ede-directory-get-toplevel-open-project-new): Deleted.
(ede-project-root-directory): Use `ede-project-root' first.
(ede-project-directory-remove-hash)
(ede--directory-project-from-hash)
(ede--directory-project-add-description-to-hash): Rename to make
internal symbols (via --). Expand input dir first.
(ede-directory-project-p): Doc fix (note obsoleted.)
(ede-toplevel-project-or-nil): Alias to `ede-toplevel-project'.
(ede-toplevel-project): Doc Fix. Delete commented out old code.
Simplify returning result from ede-detect-directory-for-project.
(ede-directory-get-open-project): Support when
inodes are disabled. If disabled to str compare on root project.
(ede-directory-get-toplevel-open-project): Enabled nested
projects. When doing directory name matching, save the 'short'
version of an answer (non-exact match) and eventually select the
shortest answer at the end. Expand the filename of tested
projects. Better support for when inodes are disabled. Add
'exact' option so that it will return a project that is an exact
match.
(ede-find-subproject-for-directory): Small optimization to run
`file-truename' less often.
(ede-directory-project-p): Move content, then use
`ede-directory-project-cons'. Use
`ede-detect-directory-for-project', replacing old detection loop.
(ede-directory-project-cons): New, from above.
(ede-toplevel-project): Toss old scanning code. Use
`ede-detect-directory-for-project' instead.
(ede-directory-get-toplevel-open-project-new): New.
* ede/linux.el (ede-linux-project-root): Deleted.
(ede-project-autoload): Remove dirmatch entry - it is no longer
needed.
* lisp/cedet/ede/proj.el (project-rescan): Replace direct
manipulation of `ede-projects' with equivalent and better
functions.
(ede-proj-load): Replace call to test if dir has project to
explicity ask filesystem if Project.ede is there.
* ede/config.el:
* ede/detect.el: New files.
* ede/project-am.el (project-run-target): Add "./" to program to
run for systems where '.' isn't in PATH.
(project-am-load): Remove old code regarding `ede-constructing'.
Just read in the makefiles.
* ede/linux.el (ede-linux-load): Do not add to global list here.
Don't check for existing anymore.
(project-rescan): New.
(ede-linux-project-list, ede-linux-file-existing): Deleted.
(ede-linux-project-root): Delete body. Need symbol for autoloads
for now.
(ede-linux-project): No longer instance tracker.
(ede-project-autoload): Don't provide :proj-root
* ede/emacs.el (ede-emacs-load): Do not add project to global list
here. Don't look for existing first.
(ede-project-autoload): Remove dirmatch entry - it is no longer
needed. Don't provide proj-root anymore.
(ede-emacs-project-list, ede-emacs-file-existing): Delete.
(ede-emacs-project-root): Remove body (need symbol for loaddefs
still).
(ede-emacs-project): Do not instance track anymore.
* ede/cpp-root.el (initialize-instance): Remove commented code.
Add note about why we are adding the project to the master list.
Make sure if we are replacing a prev version, remove from global
list.
(ede-cpp-root-file-existing)
(ede-cpp-root-project-file-for-dir)
(ede-cpp-root-count, ede-cpp-root-project-root, ede-cpp-root-load)
(ede-project-autoload cpp-root): Deleted.
(ede-project-root-directory): Return :directory instead of
calculating from :file.
(project-rescan): New.
* ede/base.el (ede-toplevel): Only use buffer cached value if
subproj not passed in.
* srecode/java.el (srecode-semantic-handle-:java): Fix case when
an EDE project didn't support java paths.
* lisp/cedet/ede/proj-elisp.el
(ede-proj-target-elisp::ede-proj-tweak-autoconf): Kill buffer
after saving modified elisp-comp script, as to avoid "file has
changed on disk; really edit the buffer" questions when script
gets rewritten.
* emacs-lisp/eieio-custom.el (eieio-customize-object): Set
eieio-cog (current group) to g, which is an improved form of input
group.
* srecode/doc-cpp.srt (mode): Set to c mode so this works with
both C and C++.
2014-11-10 01:04:30 +01:00
|
|
|
|
'semantic-analyze-completion-at-point-function)
|
|
|
|
|
(remove-hook 'completion-at-point-functions
|
|
|
|
|
'semantic-analyze-notc-completion-at-point-function)
|
|
|
|
|
(remove-hook 'completion-at-point-functions
|
|
|
|
|
'semantic-analyze-nolongprefix-completion-at-point-function)
|
|
|
|
|
|
2012-10-02 02:10:29 +08:00
|
|
|
|
(remove-hook 'after-change-functions
|
|
|
|
|
'semantic-change-function)
|
2009-10-31 18:03:02 +00:00
|
|
|
|
(define-key cedet-menu-map [cedet-menu-separator] nil)
|
|
|
|
|
(define-key cedet-menu-map [semantic-options-separator] nil)
|
2009-09-21 02:14:58 +00:00
|
|
|
|
;; FIXME: handle semanticdb-load-ebrowse-caches
|
|
|
|
|
(dolist (mode semantic-submode-list)
|
|
|
|
|
(if (and (boundp mode) (eval mode))
|
2012-10-02 02:10:29 +08:00
|
|
|
|
(funcall mode -1)))
|
|
|
|
|
;; Unlink buffer and clear cache
|
|
|
|
|
(semantic--tag-unlink-cache-from-buffer)
|
|
|
|
|
(setq semantic--buffer-cache nil)
|
|
|
|
|
;; Make sure we run the setup function if Semantic gets
|
|
|
|
|
;; re-activated.
|
|
|
|
|
(setq semantic-new-buffer-fcn-was-run nil)))
|
2009-09-21 02:14:58 +00:00
|
|
|
|
|
2009-09-21 15:59:48 +00:00
|
|
|
|
;;; Autoload some functions that are not in semantic/loaddefs
|
|
|
|
|
|
|
|
|
|
(autoload 'global-semantic-idle-completions-mode "semantic/idle"
|
|
|
|
|
"Toggle global use of `semantic-idle-completions-mode'.
|
|
|
|
|
If ARG is positive, enable, if it is negative, disable.
|
|
|
|
|
If ARG is nil, then toggle." t nil)
|
|
|
|
|
|
|
|
|
|
(autoload 'semantic-idle-completions-mode "semantic/idle"
|
|
|
|
|
"Display a list of possible completions in a tooltip.
|
|
|
|
|
|
|
|
|
|
This is a minor mode which performs actions during idle time.
|
|
|
|
|
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." t nil)
|
|
|
|
|
|
|
|
|
|
(autoload 'global-semantic-idle-summary-mode "semantic/idle"
|
|
|
|
|
"Toggle global use of `semantic-idle-summary-mode'.
|
|
|
|
|
If ARG is positive, enable, if it is negative, disable.
|
|
|
|
|
If ARG is nil, then toggle." t nil)
|
|
|
|
|
|
|
|
|
|
(autoload 'semantic-idle-summary-mode "semantic/idle"
|
|
|
|
|
"Display a tag summary of the lexical token under the cursor.
|
|
|
|
|
Call `semantic-idle-summary-current-symbol-info' for getting the
|
|
|
|
|
current tag to display information.
|
|
|
|
|
|
|
|
|
|
This is a minor mode which performs actions during idle time.
|
|
|
|
|
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." t nil)
|
2009-09-21 02:14:58 +00:00
|
|
|
|
|
2012-10-02 02:10:29 +08:00
|
|
|
|
(autoload 'global-semantic-idle-local-symbol-highlight-mode "semantic/idle"
|
|
|
|
|
"Highlight the tag and symbol references of the symbol under point.
|
|
|
|
|
Call `semantic-analyze-current-context' to find the reference tag.
|
|
|
|
|
Call `semantic-symref-hits-in-region' to identify local references." t nil)
|
|
|
|
|
|
2009-10-03 19:28:05 +00:00
|
|
|
|
(autoload 'srecode-template-setup-parser "srecode/srecode-template"
|
|
|
|
|
"Set up buffer for parsing SRecode template files." t nil)
|
|
|
|
|
|
2019-06-14 15:15:09 +02:00
|
|
|
|
(autoload 'semantic-analyze-completion-at-point-function "semantic/analyze"
|
|
|
|
|
"Return possible analysis completions at point.")
|
|
|
|
|
|
|
|
|
|
(autoload 'semantic-analyze-notc-completion-at-point-function "semantic/analyze"
|
|
|
|
|
"Return possible analysis completions at point.")
|
|
|
|
|
|
|
|
|
|
(autoload 'semantic-analyze-nolongprefix-completion-at-point-function
|
|
|
|
|
"semantic/analyze"
|
|
|
|
|
"Return possible analysis completions at point.")
|
|
|
|
|
|
2009-08-23 03:46:01 +00:00
|
|
|
|
(provide 'semantic)
|
|
|
|
|
|
|
|
|
|
;; Semantic-util is a part of the semantic API. Include it last
|
|
|
|
|
;; because it depends on semantic.
|
2009-08-28 15:01:48 +00:00
|
|
|
|
(require 'semantic/util)
|
2009-09-06 21:22:05 +00:00
|
|
|
|
|
2009-09-21 02:14:58 +00:00
|
|
|
|
;; (require 'semantic/load)
|
|
|
|
|
|
2009-09-06 21:22:05 +00:00
|
|
|
|
;;; semantic.el ends here
|