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
|
|
|
|
;;; semantic/ctxt.el --- Context calculations for Semantic tools.
|
2009-08-28 19:18:35 +00:00
|
|
|
|
|
2015-01-01 14:26:41 -08:00
|
|
|
|
;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
|
2009-08-28 19:18:35 +00:00
|
|
|
|
|
|
|
|
|
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
|
|
|
|
;; Keywords: syntax
|
|
|
|
|
|
|
|
|
|
;; 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
|
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
;;
|
|
|
|
|
;; Semantic, as a tool, provides a nice list of searchable tags.
|
|
|
|
|
;; That information can provide some very accurate answers if the current
|
|
|
|
|
;; context of a position is known.
|
|
|
|
|
;;
|
|
|
|
|
;; This library provides the hooks needed for a language to specify how
|
|
|
|
|
;; the current context is calculated.
|
|
|
|
|
;;
|
|
|
|
|
(require 'semantic)
|
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
(defvar semantic-command-separation-character
|
|
|
|
|
";"
|
|
|
|
|
"String which indicates the end of a command.
|
|
|
|
|
Used for identifying the end of a single command.")
|
|
|
|
|
(make-variable-buffer-local 'semantic-command-separation-character)
|
|
|
|
|
|
|
|
|
|
(defvar semantic-function-argument-separation-character
|
|
|
|
|
","
|
|
|
|
|
"String which indicates the end of an argument.
|
|
|
|
|
Used for identifying arguments to functions.")
|
|
|
|
|
(make-variable-buffer-local 'semantic-function-argument-separation-character)
|
|
|
|
|
|
|
|
|
|
;;; Local Contexts
|
|
|
|
|
;;
|
|
|
|
|
;; These context are nested blocks of code, such as code in an
|
|
|
|
|
;; if clause
|
2009-09-02 04:37:10 +00:00
|
|
|
|
(declare-function semantic-current-tag-of-class "semantic/find")
|
|
|
|
|
|
2009-08-28 19:18:35 +00:00
|
|
|
|
(define-overloadable-function semantic-up-context (&optional point bounds-type)
|
|
|
|
|
"Move point up one context from POINT.
|
|
|
|
|
Return non-nil if there are no more context levels.
|
|
|
|
|
Overloaded functions using `up-context' take no parameters.
|
|
|
|
|
BOUNDS-TYPE is a symbol representing a tag class to restrict
|
|
|
|
|
movement to. If this is nil, 'function is used.
|
|
|
|
|
This will find the smallest tag of that class (function, variable,
|
|
|
|
|
type, etc) and make sure non-nil is returned if you cannot
|
|
|
|
|
go up past the bounds of that tag."
|
2009-09-02 04:37:10 +00:00
|
|
|
|
(require 'semantic/find)
|
2009-08-28 19:18:35 +00:00
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
(let ((nar (semantic-current-tag-of-class (or bounds-type 'function))))
|
|
|
|
|
(if nar
|
|
|
|
|
(semantic-with-buffer-narrowed-to-tag nar (:override-with-args ()))
|
|
|
|
|
(when bounds-type
|
|
|
|
|
(error "No context of type %s to advance in" bounds-type))
|
|
|
|
|
(:override-with-args ()))))
|
|
|
|
|
|
|
|
|
|
(defun semantic-up-context-default ()
|
|
|
|
|
"Move the point up and out one context level.
|
|
|
|
|
Works with languages that use parenthetical grouping."
|
|
|
|
|
;; By default, assume that the language uses some form of parenthetical
|
|
|
|
|
;; do dads for their context.
|
|
|
|
|
(condition-case nil
|
|
|
|
|
(progn
|
|
|
|
|
(up-list -1)
|
|
|
|
|
nil)
|
|
|
|
|
(error t)))
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-beginning-of-context (&optional point)
|
|
|
|
|
"Move POINT to the beginning of the current context.
|
|
|
|
|
Return non-nil if there is no upper context.
|
|
|
|
|
The default behavior uses `semantic-up-context'.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-beginning-of-context-default (&optional point)
|
2009-10-01 04:54:05 +00:00
|
|
|
|
"Move POINT to the beginning of the current context via parenthesis.
|
2009-08-28 19:18:35 +00:00
|
|
|
|
Return non-nil if there is no upper context."
|
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
(if (semantic-up-context)
|
|
|
|
|
t
|
|
|
|
|
(forward-char 1)
|
|
|
|
|
nil))
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-end-of-context (&optional point)
|
|
|
|
|
"Move POINT to the end of the current context.
|
|
|
|
|
Return non-nil if there is no upper context.
|
|
|
|
|
Be default, this uses `semantic-up-context', and assumes parenthetical
|
|
|
|
|
block delimiters.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-end-of-context-default (&optional point)
|
2009-10-01 04:54:05 +00:00
|
|
|
|
"Move POINT to the end of the current context via parenthesis.
|
2009-08-28 19:18:35 +00:00
|
|
|
|
Return non-nil if there is no upper context."
|
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
(let ((start (point)))
|
|
|
|
|
(if (semantic-up-context)
|
|
|
|
|
t
|
2011-11-03 21:03:45 +01:00
|
|
|
|
;; Go over the list, and back over the end parenthesis.
|
2009-08-28 19:18:35 +00:00
|
|
|
|
(condition-case nil
|
|
|
|
|
(progn
|
|
|
|
|
(forward-sexp 1)
|
|
|
|
|
(forward-char -1))
|
|
|
|
|
(error
|
|
|
|
|
;; If an error occurs, get the current tag from the cache,
|
|
|
|
|
;; and just go to the end of that. Make sure we end up at least
|
|
|
|
|
;; where start was so parse-region type calls work.
|
|
|
|
|
(if (semantic-current-tag)
|
|
|
|
|
(progn
|
|
|
|
|
(goto-char (semantic-tag-end (semantic-current-tag)))
|
|
|
|
|
(when (< (point) start)
|
|
|
|
|
(goto-char start)))
|
|
|
|
|
(goto-char start))
|
|
|
|
|
t)))
|
|
|
|
|
nil))
|
|
|
|
|
|
|
|
|
|
(defun semantic-narrow-to-context ()
|
|
|
|
|
"Narrow the buffer to the extent of the current context."
|
|
|
|
|
(let (b e)
|
|
|
|
|
(save-excursion
|
|
|
|
|
(if (semantic-beginning-of-context)
|
|
|
|
|
nil
|
|
|
|
|
(setq b (point))))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(if (semantic-end-of-context)
|
|
|
|
|
nil
|
|
|
|
|
(setq e (point))))
|
|
|
|
|
(if (and b e) (narrow-to-region b e))))
|
|
|
|
|
|
|
|
|
|
(defmacro semantic-with-buffer-narrowed-to-context (&rest body)
|
|
|
|
|
"Execute BODY with the buffer narrowed to the current context."
|
|
|
|
|
`(save-restriction
|
|
|
|
|
(semantic-narrow-to-context)
|
|
|
|
|
,@body))
|
|
|
|
|
(put 'semantic-with-buffer-narrowed-to-context 'lisp-indent-function 0)
|
|
|
|
|
(add-hook 'edebug-setup-hook
|
|
|
|
|
(lambda ()
|
|
|
|
|
(def-edebug-spec semantic-with-buffer-narrowed-to-context
|
|
|
|
|
(def-body))))
|
|
|
|
|
|
|
|
|
|
;;; Local Variables
|
|
|
|
|
;;
|
|
|
|
|
;;
|
|
|
|
|
(define-overloadable-function semantic-get-local-variables (&optional point)
|
|
|
|
|
"Get the local variables based on POINT's context.
|
|
|
|
|
Local variables are returned in Semantic tag format.
|
2011-11-14 22:00:24 +01:00
|
|
|
|
This can be overridden with `get-local-variables'."
|
2009-11-08 22:53:30 +00:00
|
|
|
|
;; Disable parsing messages
|
|
|
|
|
(let ((semantic--progress-reporter nil))
|
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
|
|
|
|
(save-excursion
|
|
|
|
|
(if point (goto-char point))
|
2009-11-08 22:53:30 +00:00
|
|
|
|
(let* ((case-fold-search semantic-case-fold))
|
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
|
|
|
|
(:override-with-args ())))))
|
2009-08-28 19:18:35 +00:00
|
|
|
|
|
|
|
|
|
(defun semantic-get-local-variables-default ()
|
|
|
|
|
"Get local values from a specific context.
|
|
|
|
|
Uses the bovinator with the special top-symbol `bovine-inner-scope'
|
|
|
|
|
to collect tags, such as local variables or prototypes."
|
|
|
|
|
;; This assumes a bovine parser. Make sure we don't do
|
|
|
|
|
;; anything in that case.
|
Merge with CEDET upstream.
* admin/grammars/c.by (expr-binop): Add MOD.
(variablearg): Add 'opt-assign'.
(variablearg, varnamelist): Add default values so that it can be
later expanded into the tag.
(opt-stuff-after-symbol): Rename to 'brackets-after-symbol' and
remove empty match.
(multi-stage-dereference): Adapt to above rename.
(unaryexpression): Use 'symbol' instead of 'namespace-symbol',
since the latter also leads to an empty match at the end which
would make this too greedy.
(variablearg-opt-name): Support parsing of function pointers
inside an argument list.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Always add scope to
the local miniscope for each type. Otherwise, structure tags are
not analyzed correctly. Also, always search the extended
miniscope even when not dealing with types.
* semantic/ctxt.el (semantic-get-local-variables-default): Also
try to parse local variables for buffers which are currently
marked as unparseable. Otherwise, it is often impossible to
complete local variables.
* semantic/scope.el (semantic-analyze-scoped-types-default): If we
cannot find a type in the typecache, also look into the the types
we already found. This is necessary since in C++, a 'using
namespace' can be dependend on a previous one.
(semantic-completable-tags-from-type): When creating the list of
completable types, pull in types which are referenced through
'using' statements, and also preserve their filenames.
* semanitc/bovine/c.el (semantic/analyze/refs): Require.
(semantic-analyze-tag-references): New override. Mainly copied
from the default implementation, but if nothing could be found (or
just the tag itself), drop all namespaces from the scope and
search again. This is necessary for implementations which are
defined outside of the namespace and only pull those in through
'using' statements.
(semantic-ctxt-scoped-types): Go through all tags around point and
search them for using statements. In the case for using
statements outside of function scope, append them in the correct
order instead of using 'cons'. This is important since using
statements may depend on previous ones.
(semantic-expand-c-tag-namelist): Do not try to parse struct
definitions as default values. The grammar parser seems to return
the point positions slightly differently (as a cons instead of a
list). Also, set parent for typedefs to 'nil'. It does not
really make sense to set a parent class for typedefs, and it can
also lead to endless loops when calculating scope.
(semantic-c-reconstitute-token): Change handling of function
pointers; instead of seeing them as variables, handle them as
functions with a 'function-pointer' attribute. Also, correctly
deal with function pointers as function arguments.
(semantic-c-reconstitute-function-arglist): New function to parse
function pointers inside an argument list.
(semantic-format-tag-name): Use 'function-pointer' attribute
instead of the old 'functionpointer-flag'.
(semantic-cpp-lexer): Use new `semantic-lex-spp-paren-or-list'.
* semantic/bovine/gcc.el (semantic-gcc-setup): Add 'features.h' to
the list of files whose preprocessor symbols are included. This
pulls in things like __USE_POSIX and similar.
* semantic/format.el (semantic-format-tag-prototype-default):
Display default values if available.
* semantic/analyze/refs.el (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): Add 'default-value' as ignorable in
call to `semantic-tag-similar-p'.
* semantic/db-mode.el (semanticdb-semantic-init-hook-fcn): Always
set buffer for `semanticdb-current-table'.
* semantic/db.el (semanticdb-table::semanticdb-refresh-table): The
previous change turned up a bug in this method. Since the current
table now correctly has a buffer set, the first clause in the
`cond' would be taken, but there was a `save-excursion' missing.
* semantic/lex-spp.el (semantic-c-end-of-macro): Declare.
(semantic-lex-spp-token-macro-to-macro-stream): Deal with macros
which open/close a scope. For this, leave an overlay if we
encounter a single open paren and return a semantic-list in the
lexer. When this list gets expanded, retrieve the old position
from the overlay. See the comments in the function for further
details.
(semantic-lex-spp-find-closing-macro): New function to find the
next macro which closes scope (i.e., has a closing paren).
(semantic-lex-spp-replace-or-symbol-or-keyword): Go to end of
closing macro if necessary.
(semantic-lex-spp-paren-or-list): New lexer to specially deal with
parens in macro definitions.
* semantic/decorate/mode.el (semantic-decoration-mode): Do not
decorate available tags immediately but in an idle timer, since
EDE will usually not be activated yet, which will make it
impossible to find project includes.
* semantic/decorate/include.el
(semantic-decoration-on-includes-highlight-default): Remove
'unloaded' from throttle when decorating includes, otherwise all
would be loaded. Rename 'table' to 'currenttable' to make things
clearer.
* ede/linux.el (cl): Require during compile.
* ede/linux.el (project-linux-build-directory-default)
(project-linux-architecture-default): Add customizable variables.
(ede-linux-project): Add additional slots to track Linux-specific
information (out-of-tree build directory and selected
architecture).
(ede-linux--get-build-directory, ede-linux--get-archs)
(ede-linux--detect-architecture, ede-linux--get-architecture)
(ede-linux--include-path): Added function to detect Linux-specific
information.
(ede-linux-load): Set new Linux-specific information when creating
a project.
(ede-expand-filename-impl): Use new and more accurate include
information.
* semantic/scope.el (semantic-calculate-scope): Return a clone of
the scopecache, so that everyone is working with its own (shallow)
copy. Otherwise, if one caller is resetting the scope, it would
be reset for all others working with the scope cache as well.
2013-12-12 22:33:06 +01:00
|
|
|
|
(when (and semantic--parse-table (not (eq semantic--parse-table t)))
|
2009-08-28 19:18:35 +00:00
|
|
|
|
(let ((vars (semantic-get-cache-data 'get-local-variables)))
|
|
|
|
|
(if vars
|
|
|
|
|
(progn
|
|
|
|
|
;;(message "Found cached vars.")
|
|
|
|
|
vars)
|
|
|
|
|
(let ((vars2 nil)
|
|
|
|
|
;; We want nothing to do with funny syntaxing while doing this.
|
|
|
|
|
(semantic-unmatched-syntax-hook nil)
|
|
|
|
|
(start (point))
|
|
|
|
|
(firstusefulstart nil)
|
|
|
|
|
)
|
|
|
|
|
(while (not (semantic-up-context (point) 'function))
|
|
|
|
|
(when (not vars)
|
|
|
|
|
(setq firstusefulstart (point)))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(forward-char 1)
|
|
|
|
|
(setq vars
|
|
|
|
|
;; Note to self: semantic-parse-region returns cooked
|
|
|
|
|
;; but unlinked tags. File information is lost here
|
|
|
|
|
;; and is added next.
|
|
|
|
|
(append (semantic-parse-region
|
|
|
|
|
(point)
|
|
|
|
|
(save-excursion (semantic-end-of-context) (point))
|
|
|
|
|
'bovine-inner-scope
|
|
|
|
|
nil
|
|
|
|
|
t)
|
|
|
|
|
vars))))
|
|
|
|
|
;; Modify the tags in place.
|
|
|
|
|
(setq vars2 vars)
|
|
|
|
|
(while vars2
|
|
|
|
|
(semantic--tag-put-property (car vars2) :filename (buffer-file-name))
|
|
|
|
|
(setq vars2 (cdr vars2)))
|
|
|
|
|
;; Hash our value into the first context that produced useful results.
|
|
|
|
|
(when (and vars firstusefulstart)
|
|
|
|
|
(let ((end (save-excursion
|
|
|
|
|
(goto-char firstusefulstart)
|
|
|
|
|
(save-excursion
|
|
|
|
|
(unless (semantic-end-of-context)
|
|
|
|
|
(point))))))
|
|
|
|
|
;;(message "Caching values %d->%d." firstusefulstart end)
|
|
|
|
|
(semantic-cache-data-to-buffer
|
|
|
|
|
(current-buffer) firstusefulstart
|
|
|
|
|
(or end
|
|
|
|
|
;; If the end-of-context fails,
|
|
|
|
|
;; just use our cursor starting
|
|
|
|
|
;; position.
|
|
|
|
|
start)
|
|
|
|
|
vars 'get-local-variables 'exit-cache-zone))
|
|
|
|
|
)
|
|
|
|
|
;; Return our list.
|
|
|
|
|
vars)))))
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-get-local-arguments (&optional point)
|
|
|
|
|
"Get arguments (variables) from the current context at POINT.
|
|
|
|
|
Parameters are available if the point is in a function or method.
|
|
|
|
|
Return a list of tags unlinked from the originating buffer.
|
|
|
|
|
Arguments are obtained by overriding `get-local-arguments', or by the
|
|
|
|
|
default function `semantic-get-local-arguments-default'. This, must
|
|
|
|
|
return a list of tags, or a list of strings that will be converted to
|
|
|
|
|
tags."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
(let* ((case-fold-search semantic-case-fold)
|
|
|
|
|
(args (:override-with-args ()))
|
|
|
|
|
arg tags)
|
|
|
|
|
;; Convert unsafe arguments to the right thing.
|
|
|
|
|
(while args
|
|
|
|
|
(setq arg (car args)
|
|
|
|
|
args (cdr args)
|
|
|
|
|
tags (cons (cond
|
|
|
|
|
((semantic-tag-p arg)
|
|
|
|
|
;; Return a copy of tag without overlay.
|
|
|
|
|
;; The overlay is preserved.
|
|
|
|
|
(semantic-tag-copy arg nil t))
|
|
|
|
|
((stringp arg)
|
|
|
|
|
(semantic--tag-put-property
|
|
|
|
|
(semantic-tag-new-variable arg nil nil)
|
|
|
|
|
:filename (buffer-file-name)))
|
|
|
|
|
(t
|
|
|
|
|
(error "Unknown parameter element %S" arg)))
|
|
|
|
|
tags)))
|
|
|
|
|
(nreverse tags))))
|
|
|
|
|
|
|
|
|
|
(defun semantic-get-local-arguments-default ()
|
|
|
|
|
"Get arguments (variables) from the current context.
|
|
|
|
|
Parameters are available if the point is in a function or method."
|
|
|
|
|
(let ((tag (semantic-current-tag)))
|
|
|
|
|
(if (and tag (semantic-tag-of-class-p tag 'function))
|
|
|
|
|
(semantic-tag-function-arguments tag))))
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-get-all-local-variables (&optional point)
|
|
|
|
|
"Get all local variables for this context, and parent contexts.
|
|
|
|
|
Local variables are returned in Semantic tag format.
|
|
|
|
|
Be default, this gets local variables, and local arguments.
|
|
|
|
|
Optional argument POINT is the location to start getting the variables from.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-get-all-local-variables-default (&optional point)
|
|
|
|
|
"Get all local variables for this context.
|
|
|
|
|
Optional argument POINT is the location to start getting the variables from.
|
|
|
|
|
That is a cons (LOCAL-ARGUMENTS . LOCAL-VARIABLES) where:
|
|
|
|
|
|
|
|
|
|
- LOCAL-ARGUMENTS is collected by `semantic-get-local-arguments'.
|
|
|
|
|
- LOCAL-VARIABLES is collected by `semantic-get-local-variables'."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
(let ((case-fold-search semantic-case-fold))
|
|
|
|
|
(append (semantic-get-local-arguments)
|
|
|
|
|
(semantic-get-local-variables)))))
|
|
|
|
|
|
|
|
|
|
;;; Local context parsing
|
|
|
|
|
;;
|
|
|
|
|
;; Context parsing assumes a series of language independent commonalities.
|
|
|
|
|
;; These terms are used to describe those contexts:
|
|
|
|
|
;;
|
|
|
|
|
;; command - One command in the language.
|
|
|
|
|
;; symbol - The symbol the cursor is on.
|
|
|
|
|
;; This would include a series of type/field when applicable.
|
|
|
|
|
;; assignment - The variable currently being assigned to
|
|
|
|
|
;; function - The function call the cursor is on/in
|
|
|
|
|
;; argument - The index to the argument the cursor is on.
|
|
|
|
|
;;
|
|
|
|
|
;;
|
|
|
|
|
(define-overloadable-function semantic-end-of-command ()
|
|
|
|
|
"Move to the end of the current command.
|
|
|
|
|
Be default, uses `semantic-command-separation-character'.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-end-of-command-default ()
|
|
|
|
|
"Move to the end of the current command.
|
|
|
|
|
Depends on `semantic-command-separation-character' to find the
|
|
|
|
|
beginning and end of a command."
|
|
|
|
|
(semantic-with-buffer-narrowed-to-context
|
|
|
|
|
(let ((case-fold-search semantic-case-fold))
|
|
|
|
|
(with-syntax-table semantic-lex-syntax-table
|
|
|
|
|
|
|
|
|
|
(if (re-search-forward (regexp-quote semantic-command-separation-character)
|
|
|
|
|
nil t)
|
|
|
|
|
(forward-char -1)
|
|
|
|
|
;; If there wasn't a command after this, we are the last
|
|
|
|
|
;; command, and we are incomplete.
|
|
|
|
|
(goto-char (point-max)))))))
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-beginning-of-command ()
|
|
|
|
|
"Move to the beginning of the current command.
|
|
|
|
|
Be default, uses `semantic-command-separation-character'.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-beginning-of-command-default ()
|
|
|
|
|
"Move to the beginning of the current command.
|
|
|
|
|
Depends on `semantic-command-separation-character' to find the
|
|
|
|
|
beginning and end of a command."
|
|
|
|
|
(semantic-with-buffer-narrowed-to-context
|
|
|
|
|
(with-syntax-table semantic-lex-syntax-table
|
|
|
|
|
(let ((case-fold-search semantic-case-fold))
|
|
|
|
|
(skip-chars-backward semantic-command-separation-character)
|
|
|
|
|
(if (re-search-backward (regexp-quote semantic-command-separation-character)
|
|
|
|
|
nil t)
|
|
|
|
|
(goto-char (match-end 0))
|
|
|
|
|
;; If there wasn't a command after this, we are the last
|
|
|
|
|
;; command, and we are incomplete.
|
|
|
|
|
(goto-char (point-min)))
|
|
|
|
|
(skip-chars-forward " \t\n")
|
|
|
|
|
))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defsubst semantic-point-at-beginning-of-command ()
|
|
|
|
|
"Return the point at the beginning of the current command."
|
|
|
|
|
(save-excursion (semantic-beginning-of-command) (point)))
|
|
|
|
|
|
|
|
|
|
(defsubst semantic-point-at-end-of-command ()
|
|
|
|
|
"Return the point at the beginning of the current command."
|
|
|
|
|
(save-excursion (semantic-end-of-command) (point)))
|
|
|
|
|
|
|
|
|
|
(defsubst semantic-narrow-to-command ()
|
|
|
|
|
"Narrow the current buffer to the current command."
|
|
|
|
|
(narrow-to-region (semantic-point-at-beginning-of-command)
|
|
|
|
|
(semantic-point-at-end-of-command)))
|
|
|
|
|
|
|
|
|
|
(defmacro semantic-with-buffer-narrowed-to-command (&rest body)
|
|
|
|
|
"Execute BODY with the buffer narrowed to the current command."
|
|
|
|
|
`(save-restriction
|
|
|
|
|
(semantic-narrow-to-command)
|
|
|
|
|
,@body))
|
|
|
|
|
(put 'semantic-with-buffer-narrowed-to-command 'lisp-indent-function 0)
|
|
|
|
|
(add-hook 'edebug-setup-hook
|
|
|
|
|
(lambda ()
|
|
|
|
|
(def-edebug-spec semantic-with-buffer-narrowed-to-command
|
|
|
|
|
(def-body))))
|
|
|
|
|
|
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
|
|
|
|
(define-overloadable-function semantic-ctxt-end-of-symbol (&optional point)
|
|
|
|
|
"Move point to the end of the current symbol under POINT.
|
|
|
|
|
This skips forward over symbols in a complex reference.
|
|
|
|
|
For example, in the C statement:
|
|
|
|
|
this.that().entry;
|
|
|
|
|
|
|
|
|
|
If the cursor is on 'this', will move point to the ; after entry.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-ctxt-end-of-symbol-default (&optional point)
|
2013-06-10 16:02:33 -07:00
|
|
|
|
"Move point to the end of the current symbol under POINT.
|
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
|
|
|
|
This will move past type/field names when applicable.
|
|
|
|
|
Depends on `semantic-type-relation-separator-character', and will
|
|
|
|
|
work on C like languages."
|
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
(let* ((fieldsep1 (mapconcat (lambda (a) (regexp-quote a))
|
|
|
|
|
semantic-type-relation-separator-character
|
|
|
|
|
"\\|"))
|
|
|
|
|
;; NOTE: The [ \n] expression below should used \\s-, but that
|
|
|
|
|
;; doesn't work in C since \n means end-of-comment, and isn't
|
|
|
|
|
;; really whitespace.
|
|
|
|
|
(fieldsep (concat "[ \t\n\r]*\\(" fieldsep1 "\\)[ \t\n\r]*\\(\\w\\|\\s_\\)"))
|
|
|
|
|
(case-fold-search semantic-case-fold)
|
|
|
|
|
(continuesearch t)
|
|
|
|
|
(end nil)
|
|
|
|
|
)
|
|
|
|
|
(with-syntax-table semantic-lex-syntax-table
|
|
|
|
|
(cond ((looking-at "\\w\\|\\s_")
|
|
|
|
|
;; In the middle of a symbol, move to the end.
|
|
|
|
|
(forward-sexp 1))
|
|
|
|
|
((looking-at fieldsep1)
|
|
|
|
|
;; We are in a fine spot.. do nothing.
|
|
|
|
|
nil
|
|
|
|
|
)
|
|
|
|
|
((save-excursion
|
|
|
|
|
(and (condition-case nil
|
|
|
|
|
(progn (forward-sexp -1)
|
|
|
|
|
(forward-sexp 1)
|
|
|
|
|
t)
|
|
|
|
|
(error nil))
|
|
|
|
|
(looking-at fieldsep1)))
|
|
|
|
|
(forward-sexp -1)
|
|
|
|
|
;; Skip array expressions.
|
|
|
|
|
(while (looking-at "\\s(") (forward-sexp -1))
|
|
|
|
|
(forward-sexp 1))
|
|
|
|
|
)
|
|
|
|
|
;; Set the current end marker.
|
|
|
|
|
(setq end (point))
|
|
|
|
|
|
|
|
|
|
;; Cursor is at the safe end of some symbol. Look until we
|
|
|
|
|
;; find the logical end of this current complex symbol.
|
|
|
|
|
(condition-case nil
|
|
|
|
|
(while continuesearch
|
|
|
|
|
;; If there are functional arguments, arrays, etc, skip them.
|
|
|
|
|
(when (looking-at "\\s(")
|
|
|
|
|
(forward-sexp 1))
|
|
|
|
|
|
|
|
|
|
;; If there is a field separator, then skip that, plus
|
|
|
|
|
;; the next expected symbol.
|
|
|
|
|
(if (not (looking-at fieldsep1))
|
|
|
|
|
;; We hit the end.
|
|
|
|
|
(error nil)
|
|
|
|
|
|
|
|
|
|
;; Skip the separator and the symbol.
|
|
|
|
|
(goto-char (match-end 0))
|
2013-06-10 16:02:33 -07:00
|
|
|
|
|
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
|
|
|
|
(if (looking-at "\\w\\|\\s_")
|
|
|
|
|
;; Skip symbols
|
|
|
|
|
(forward-sexp 1)
|
|
|
|
|
;; No symbol, exit the search...
|
|
|
|
|
(setq continuesearch nil))
|
2013-06-10 16:02:33 -07:00
|
|
|
|
|
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
|
|
|
|
(setq end (point)))
|
2013-06-10 16:02:33 -07:00
|
|
|
|
|
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
|
|
|
|
;; Cont...
|
|
|
|
|
)
|
2013-06-10 16:02:33 -07:00
|
|
|
|
|
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
|
|
|
|
;; Restore position if we go to far....
|
|
|
|
|
(error (goto-char end)) )
|
|
|
|
|
|
|
|
|
|
)))
|
2009-08-28 19:18:35 +00:00
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-ctxt-current-symbol (&optional point)
|
|
|
|
|
"Return the current symbol the cursor is on at POINT in a list.
|
|
|
|
|
The symbol includes all logical parts of a complex reference.
|
|
|
|
|
For example, in C the statement:
|
|
|
|
|
this.that().entry
|
|
|
|
|
|
|
|
|
|
Would be object `this' calling method `that' which returns some structure
|
|
|
|
|
whose field `entry' is being reference. In this case, this function
|
|
|
|
|
would return the list:
|
|
|
|
|
( \"this\" \"that\" \"entry\" )")
|
|
|
|
|
|
|
|
|
|
(defun semantic-ctxt-current-symbol-default (&optional point)
|
|
|
|
|
"Return the current symbol the cursor is on at POINT in a list.
|
|
|
|
|
This will include a list of type/field names when applicable.
|
|
|
|
|
Depends on `semantic-type-relation-separator-character'."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
(let* ((fieldsep1 (mapconcat (lambda (a) (regexp-quote a))
|
|
|
|
|
semantic-type-relation-separator-character
|
|
|
|
|
"\\|"))
|
|
|
|
|
;; NOTE: The [ \n] expression below should used \\s-, but that
|
|
|
|
|
;; doesn't work in C since \n means end-of-comment, and isn't
|
|
|
|
|
;; really whitespace.
|
|
|
|
|
(fieldsep (concat "[ \t\n\r]*\\(" fieldsep1 "\\)[ \t\n\r]*\\(\\w\\|\\s_\\)"))
|
|
|
|
|
(case-fold-search semantic-case-fold)
|
|
|
|
|
(symlist nil)
|
|
|
|
|
end)
|
|
|
|
|
(with-syntax-table semantic-lex-syntax-table
|
|
|
|
|
(save-excursion
|
|
|
|
|
(cond ((looking-at "\\w\\|\\s_")
|
|
|
|
|
;; In the middle of a symbol, move to the end.
|
|
|
|
|
(forward-sexp 1))
|
|
|
|
|
((looking-at fieldsep1)
|
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
|
|
|
|
;; We are in a fine spot.. do nothing.
|
2009-08-28 19:18:35 +00:00
|
|
|
|
nil
|
|
|
|
|
)
|
|
|
|
|
((save-excursion
|
|
|
|
|
(and (condition-case nil
|
|
|
|
|
(progn (forward-sexp -1)
|
|
|
|
|
(forward-sexp 1)
|
|
|
|
|
t)
|
|
|
|
|
(error nil))
|
|
|
|
|
(looking-at fieldsep1)))
|
|
|
|
|
(setq symlist (list ""))
|
|
|
|
|
(forward-sexp -1)
|
|
|
|
|
;; Skip array expressions.
|
|
|
|
|
(while (looking-at "\\s(") (forward-sexp -1))
|
|
|
|
|
(forward-sexp 1))
|
|
|
|
|
)
|
|
|
|
|
;; Set our end point.
|
|
|
|
|
(setq end (point))
|
|
|
|
|
|
2011-11-15 18:37:37 +01:00
|
|
|
|
;; Now that we have gotten started, let's do the rest.
|
2009-08-28 19:18:35 +00:00
|
|
|
|
(condition-case nil
|
|
|
|
|
(while (save-excursion
|
|
|
|
|
(forward-char -1)
|
|
|
|
|
(looking-at "\\w\\|\\s_"))
|
|
|
|
|
;; We have a symbol.. Do symbol things
|
|
|
|
|
(forward-sexp -1)
|
|
|
|
|
(setq symlist (cons (buffer-substring-no-properties (point) end)
|
|
|
|
|
symlist))
|
|
|
|
|
;; Skip the next syntactic expression backwards, then go forwards.
|
|
|
|
|
(let ((cp (point)))
|
|
|
|
|
(forward-sexp -1)
|
|
|
|
|
(forward-sexp 1)
|
|
|
|
|
;; If we end up at the same place we started, we are at the
|
|
|
|
|
;; beginning of a buffer, or narrowed to a command and
|
|
|
|
|
;; have to stop.
|
|
|
|
|
(if (<= cp (point)) (error nil)))
|
|
|
|
|
(if (looking-at fieldsep)
|
|
|
|
|
(progn
|
|
|
|
|
(forward-sexp -1)
|
|
|
|
|
;; Skip array expressions.
|
|
|
|
|
(while (and (looking-at "\\s(") (not (bobp)))
|
|
|
|
|
(forward-sexp -1))
|
|
|
|
|
(forward-sexp 1)
|
|
|
|
|
(setq end (point)))
|
|
|
|
|
(error nil))
|
|
|
|
|
)
|
|
|
|
|
(error nil)))
|
|
|
|
|
symlist))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-ctxt-current-symbol-and-bounds (&optional point)
|
|
|
|
|
"Return the current symbol and bounds the cursor is on at POINT.
|
|
|
|
|
The symbol should be the same as returned by `semantic-ctxt-current-symbol'.
|
|
|
|
|
Return (PREFIX ENDSYM BOUNDS).")
|
|
|
|
|
|
|
|
|
|
(defun semantic-ctxt-current-symbol-and-bounds-default (&optional point)
|
|
|
|
|
"Return the current symbol and bounds the cursor is on at POINT.
|
|
|
|
|
Uses `semantic-ctxt-current-symbol' to calculate the symbol.
|
|
|
|
|
Return (PREFIX ENDSYM BOUNDS)."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(when point (goto-char (point)))
|
|
|
|
|
(let* ((prefix (semantic-ctxt-current-symbol))
|
|
|
|
|
(endsym (car (reverse prefix)))
|
|
|
|
|
;; @todo - Can we get this data direct from ctxt-current-symbol?
|
|
|
|
|
(bounds (save-excursion
|
|
|
|
|
(cond ((string= endsym "")
|
|
|
|
|
(cons (point) (point))
|
|
|
|
|
)
|
|
|
|
|
((and prefix (looking-at endsym))
|
|
|
|
|
(cons (point) (progn
|
|
|
|
|
(condition-case nil
|
|
|
|
|
(forward-sexp 1)
|
|
|
|
|
(error nil))
|
|
|
|
|
(point))))
|
|
|
|
|
(prefix
|
|
|
|
|
(condition-case nil
|
|
|
|
|
(cons (progn (forward-sexp -1) (point))
|
|
|
|
|
(progn (forward-sexp 1) (point)))
|
|
|
|
|
(error nil)))
|
|
|
|
|
(t nil))))
|
|
|
|
|
)
|
|
|
|
|
(list prefix endsym bounds))))
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-ctxt-current-assignment (&optional point)
|
|
|
|
|
"Return the current assignment near the cursor at POINT.
|
|
|
|
|
Return a list as per `semantic-ctxt-current-symbol'.
|
|
|
|
|
Return nil if there is nothing relevant.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-ctxt-current-assignment-default (&optional point)
|
|
|
|
|
"Return the current assignment near the cursor at POINT.
|
|
|
|
|
By default, assume that \"=\" indicates an assignment."
|
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
(let ((case-fold-search semantic-case-fold))
|
|
|
|
|
(with-syntax-table semantic-lex-syntax-table
|
|
|
|
|
(condition-case nil
|
|
|
|
|
(semantic-with-buffer-narrowed-to-command
|
|
|
|
|
(save-excursion
|
|
|
|
|
(skip-chars-forward " \t=")
|
|
|
|
|
(condition-case nil (forward-char 1) (error nil))
|
|
|
|
|
(re-search-backward "[^=]=\\([^=]\\|$\\)")
|
|
|
|
|
;; We are at an equals sign. Go backwards a sexp, and
|
|
|
|
|
;; we'll have the variable. Otherwise we threw an error
|
|
|
|
|
(forward-sexp -1)
|
|
|
|
|
(semantic-ctxt-current-symbol)))
|
|
|
|
|
(error nil)))))
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-ctxt-current-function (&optional point)
|
|
|
|
|
"Return the current function call the cursor is in at POINT.
|
|
|
|
|
The function returned is the one accepting the arguments that
|
|
|
|
|
the cursor is currently in. It will not return function symbol if the
|
|
|
|
|
cursor is on the text representing that function.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-ctxt-current-function-default (&optional point)
|
|
|
|
|
"Return the current function call the cursor is in at POINT.
|
2009-10-01 04:54:05 +00:00
|
|
|
|
The call will be identified for C like languages with the form
|
2009-08-28 19:18:35 +00:00
|
|
|
|
NAME ( args ... )"
|
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
(let ((case-fold-search semantic-case-fold))
|
|
|
|
|
(with-syntax-table semantic-lex-syntax-table
|
|
|
|
|
(save-excursion
|
|
|
|
|
(semantic-up-context)
|
|
|
|
|
(when (looking-at "(")
|
|
|
|
|
(semantic-ctxt-current-symbol))))
|
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-ctxt-current-argument (&optional point)
|
|
|
|
|
"Return the index of the argument position the cursor is on at POINT.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-ctxt-current-argument-default (&optional point)
|
|
|
|
|
"Return the index of the argument the cursor is on at POINT.
|
|
|
|
|
Depends on `semantic-function-argument-separation-character'."
|
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
(let ((case-fold-search semantic-case-fold))
|
|
|
|
|
(with-syntax-table semantic-lex-syntax-table
|
|
|
|
|
(when (semantic-ctxt-current-function)
|
|
|
|
|
(save-excursion
|
|
|
|
|
;; Only get the current arg index if we are in function args.
|
|
|
|
|
(let ((p (point))
|
|
|
|
|
(idx 1))
|
|
|
|
|
(semantic-up-context)
|
|
|
|
|
(while (re-search-forward
|
|
|
|
|
(regexp-quote semantic-function-argument-separation-character)
|
|
|
|
|
p t)
|
|
|
|
|
(setq idx (1+ idx)))
|
|
|
|
|
idx))))))
|
|
|
|
|
|
|
|
|
|
(defun semantic-ctxt-current-thing ()
|
|
|
|
|
"Calculate a thing identified by the current cursor position.
|
|
|
|
|
Calls previously defined `semantic-ctxt-current-...' calls until something
|
|
|
|
|
gets a match. See `semantic-ctxt-current-symbol',
|
|
|
|
|
`semantic-ctxt-current-function', and `semantic-ctxt-current-assignment'
|
|
|
|
|
for details on the return value."
|
|
|
|
|
(or (semantic-ctxt-current-symbol)
|
|
|
|
|
(semantic-ctxt-current-function)
|
|
|
|
|
(semantic-ctxt-current-assignment)))
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-ctxt-current-class-list (&optional point)
|
|
|
|
|
"Return a list of tag classes that are allowed at POINT.
|
|
|
|
|
If POINT is nil, the current buffer location is used.
|
|
|
|
|
For example, in Emacs Lisp, the symbol after a ( is most likely
|
|
|
|
|
a function. In a makefile, symbols after a : are rules, and symbols
|
|
|
|
|
after a $( are variables.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-ctxt-current-class-list-default (&optional point)
|
|
|
|
|
"Return a list of tag classes that are allowed at POINT.
|
|
|
|
|
Assume a functional typed language. Uses very simple rules."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(if point (goto-char point))
|
|
|
|
|
|
|
|
|
|
(let ((tag (semantic-current-tag)))
|
|
|
|
|
(if tag
|
|
|
|
|
(cond ((semantic-tag-of-class-p tag 'function)
|
|
|
|
|
'(function variable type))
|
|
|
|
|
((or (semantic-tag-of-class-p tag 'type)
|
|
|
|
|
(semantic-tag-of-class-p tag 'variable))
|
|
|
|
|
'(type))
|
|
|
|
|
(t nil))
|
|
|
|
|
'(type)
|
|
|
|
|
))))
|
|
|
|
|
|
2009-09-03 03:58:13 +00:00
|
|
|
|
;;;###autoload
|
2009-08-28 19:18:35 +00:00
|
|
|
|
(define-overloadable-function semantic-ctxt-current-mode (&optional point)
|
|
|
|
|
"Return the major mode active at POINT.
|
|
|
|
|
POINT defaults to the value of point in current buffer.
|
|
|
|
|
You should override this function in multiple mode buffers to
|
|
|
|
|
determine which major mode apply at point.")
|
|
|
|
|
|
|
|
|
|
(defun semantic-ctxt-current-mode-default (&optional point)
|
|
|
|
|
"Return the major mode active at POINT.
|
|
|
|
|
POINT defaults to the value of point in current buffer.
|
|
|
|
|
This default implementation returns the current major mode."
|
|
|
|
|
major-mode)
|
|
|
|
|
|
|
|
|
|
;;; Scoped Types
|
|
|
|
|
;;
|
|
|
|
|
;; Scoped types are types that the current code would have access to.
|
|
|
|
|
;; The come from the global namespace or from special commands such as "using"
|
|
|
|
|
(define-overloadable-function semantic-ctxt-scoped-types (&optional point)
|
|
|
|
|
"Return a list of type names currently in scope at POINT.
|
|
|
|
|
The return value can be a mixed list of either strings (names of
|
|
|
|
|
types that are in scope) or actual tags (type declared locally
|
|
|
|
|
that may or may not have a name.)")
|
|
|
|
|
|
|
|
|
|
(defun semantic-ctxt-scoped-types-default (&optional point)
|
|
|
|
|
"Return a list of scoped types by name for the current context at POINT.
|
|
|
|
|
This is very different for various languages, and does nothing unless
|
2009-10-01 04:54:05 +00:00
|
|
|
|
overridden."
|
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
|
|
|
|
nil)
|
|
|
|
|
|
|
|
|
|
(define-overloadable-function semantic-ctxt-imported-packages (&optional point)
|
|
|
|
|
"Return a list of package tags or names which are being imported at POINT.
|
|
|
|
|
The return value is a list of strings which are package names
|
|
|
|
|
that are implied in code. Thus a C++ symbol:
|
|
|
|
|
foo::bar();
|
|
|
|
|
where there is a statement such as:
|
|
|
|
|
using baz;
|
|
|
|
|
means that the first symbol might be:
|
|
|
|
|
baz::foo::bar();"
|
|
|
|
|
nil)
|
2009-08-28 19:18:35 +00:00
|
|
|
|
|
|
|
|
|
(provide 'semantic/ctxt)
|
|
|
|
|
|
2009-09-03 03:58:13 +00:00
|
|
|
|
;; Local variables:
|
|
|
|
|
;; generated-autoload-file: "loaddefs.el"
|
2009-09-05 01:00:36 +00:00
|
|
|
|
;; generated-autoload-load-name: "semantic/ctxt"
|
2009-09-03 03:58:13 +00:00
|
|
|
|
;; End:
|
|
|
|
|
|
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
|
|
|
|
;;; semantic/ctxt.el ends here
|