summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2015-01-07 23:11:58 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2015-01-07 23:11:58 -0500
commit1599688e95802c34f35819f5600a48a81248732c (patch)
tree30de69970ba2e145c374e78b3a1606a443169771 /lisp/cedet/semantic
parentcb4db863192aed6c4d0b28e6490f08d5518ff3e7 (diff)
downloademacs-1599688e95802c34f35819f5600a48a81248732c.tar.gz
emacs-1599688e95802c34f35819f5600a48a81248732c.tar.bz2
emacs-1599688e95802c34f35819f5600a48a81248732c.zip
lisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility): New var.
* lisp/cedet/ede/speedbar.el (ede-speedbar-compile-line) (ede-speedbar-get-top-project-for-line): * lisp/cedet/ede.el (ede-buffer-belongs-to-target-p) (ede-buffer-belongs-to-project-p, ede-build-forms-menu) (ede-add-project-to-global-list): * lisp/cedet/semantic/db-typecache.el (semanticdb-get-typecache): * lisp/cedet/semantic/db-file.el (semanticdb-load-database): * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag): * lisp/cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-load-helper): * lisp/cedet/ede/project-am.el (project-am-preferred-target-type): * lisp/cedet/ede/proj.el (ede-proj-load): * lisp/cedet/ede/custom.el (ede-customize-current-target, ede-customize-target): * lisp/cedet/semantic/ede-grammar.el ("semantic grammar"): * lisp/cedet/semantic/scope.el (semantic-scope-reset-cache) (semantic-calculate-scope): * lisp/cedet/srecode/map.el (srecode-map-update-map): * lisp/cedet/srecode/insert.el (srecode-insert-show-error-report) (srecode-insert-method, srecode-insert-include-lookup) (srecode-insert-method): * lisp/cedet/srecode/fields.el (srecode-active-template-region): * lisp/cedet/srecode/compile.el (srecode-flush-active-templates) (srecode-compile-inserter): Don't use <class> as a variable. Use `oref-default' for class slots. * lisp/cedet/semantic/grammar.el (semantic-grammar-eldoc-last-data): New var. (semantic-grammar-eldoc-get-macro-docstring): Use it instead of eldoc-last-data. * lisp/cedet/semantic/fw.el (semantic-exit-on-input): Use `declare'. (semantic-throw-on-input): Use `with-current-buffer'. * lisp/cedet/semantic/db.el (semanticdb-abstract-table-list): Define if not pre-defined. * lisp/cedet/semantic/db-find.el (semanticdb-find-tags-collector): Use save-current-buffer. (semanticdb-find-tags-collector): Don't use <class> as a variable. * lisp/cedet/semantic/complete.el (semantic-complete-active-default) (semantic-complete-current-matched-tag): Declare. (semantic-complete-inline-custom-type): Don't use <class> as a variable. * lisp/cedet/semantic/bovine/make.el (semantic-analyze-possible-completions): Use with-current-buffer. * lisp/cedet/semantic.el (semantic-parser-warnings): Declare. * lisp/cedet/ede/base.el (ede-target-list): Define if not pre-defined. (ede-with-projectfile): Prefer find-file-noselect over save-window-excursion. * lisp/emacs-lisp/chart.el (chart-add-sequence, chart-bar-quickie): Don't use <class> as a variable. * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value): Improve error messages. (eieio-persistent-slot-type-is-class-p): Handle `list-of' types, as well as user-defined types. Emit errors for legacy types like <class>-child and <class>-list, if not eieio-backward-compatibility. * lisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility): New var. (eieio-defclass-autoload): Obey it. (eieio--class-object): Improve error behavior. (eieio-class-children-fast, same-class-fast-p): Remove. Inline at every use site. (eieio--defgeneric-form-primary-only): Rename from eieio-defgeneric-form-primary-only; update all callers. (eieio--defgeneric-form-primary-only-one): Rename from eieio-defgeneric-form-primary-only-one; update all callers. (eieio-defgeneric-reset-generic-form) (eieio-defgeneric-reset-generic-form-primary-only) (eieio-defgeneric-reset-generic-form-primary-only-one): Remove. (eieio--method-optimize-primary): New function to replace them. (eieio--defmethod, eieio-defmethod): Use it. (eieio--perform-slot-validation): Rename from eieio-perform-slot-validation; update all callers. (eieio--validate-slot-value): Rename from eieio-validate-slot-value. Change `class' to be a class object. Update all callers. (eieio--validate-class-slot-value): Rename from eieio-validate-class-slot-value. Change `class' to be a class object. Update all callers. (eieio-oset-default): Accept class object as well. (eieio--generic-call-primary-only): Rename from eieio-generic-call-primary-only. Update all callers. * lisp/emacs-lisp/eieio-opt.el (eieio-read-generic-p): Remove. (eieio-read-generic): Use `generic-p' instead. * lisp/emacs-lisp/eieio.el (same-class-p): Accept class object as well. (call-next-method): Simplify. (clone): Obey eieio-backward-compatibility. * lisp/gnus/registry.el: Don't use <class> as a variable. * test/automated/eieio-test-methodinvoke.el (eieio-test-method-order-list-4): Don't use <class> as a variable. * test/automated/eieio-test-persist.el (persistent-with-objs-list-slot): Don't use <class>-list type. * test/automated/eieio-tests.el: Use cl-lib. Don't use <class> as a variable. Don't use <class>-list types and <class>-list-p predicates.
Diffstat (limited to 'lisp/cedet/semantic')
-rw-r--r--lisp/cedet/semantic/analyze.el2
-rw-r--r--lisp/cedet/semantic/bovine/make.el7
-rw-r--r--lisp/cedet/semantic/complete.el6
-rw-r--r--lisp/cedet/semantic/db-ebrowse.el4
-rw-r--r--lisp/cedet/semantic/db-el.el4
-rw-r--r--lisp/cedet/semantic/db-file.el5
-rw-r--r--lisp/cedet/semantic/db-find.el8
-rw-r--r--lisp/cedet/semantic/db-typecache.el4
-rw-r--r--lisp/cedet/semantic/db.el6
-rw-r--r--lisp/cedet/semantic/ede-grammar.el4
-rw-r--r--lisp/cedet/semantic/fw.el21
-rw-r--r--lisp/cedet/semantic/grammar.el11
-rw-r--r--lisp/cedet/semantic/ia.el2
-rw-r--r--lisp/cedet/semantic/idle.el2
-rw-r--r--lisp/cedet/semantic/scope.el6
15 files changed, 49 insertions, 43 deletions
diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el
index 77e091721c8..846501e13cc 100644
--- a/lisp/cedet/semantic/analyze.el
+++ b/lisp/cedet/semantic/analyze.el
@@ -1,6 +1,6 @@
;;; semantic/analyze.el --- Analyze semantic tags against local context
-;; Copyright (C) 2000-2005, 2007-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2005, 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/bovine/make.el b/lisp/cedet/semantic/bovine/make.el
index 56a520334ec..c001a4dab5f 100644
--- a/lisp/cedet/semantic/bovine/make.el
+++ b/lisp/cedet/semantic/bovine/make.el
@@ -1,6 +1,6 @@
;;; semantic/bovine/make.el --- Makefile parsing rules.
-;; Copyright (C) 2000-2004, 2008-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2004, 2008-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -178,9 +178,8 @@ This is the same as a regular prototype."
makefile-mode (context)
"Return a list of possible completions in a Makefile.
Uses default implementation, and also gets a list of filenames."
- (save-excursion
- (require 'semantic/analyze/complete)
- (set-buffer (oref context buffer))
+ (require 'semantic/analyze/complete)
+ (with-current-buffer (oref context buffer)
(let* ((normal (semantic-analyze-possible-completions-default context))
(classes (oref context :prefixclass))
(filetags nil))
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index 91f9daf7547..3f726ee56fd 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -1,6 +1,6 @@
;;; semantic/complete.el --- Routines for performing tag completion
-;; Copyright (C) 2003-2005, 2007-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2005, 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
@@ -188,6 +188,8 @@ Value should be a ... what?")
"Default history variable for any unhistoried prompt.
Keeps STRINGS only in the history.")
+(defvar semantic-complete-active-default)
+(defvar semantic-complete-current-matched-tag)
(defun semantic-complete-read-tag-engine (collector displayor prompt
default-tag initial-input
@@ -1871,7 +1873,7 @@ completion text in ghost text."
(list 'const
:tag doc1
C)))
- (eieio-build-class-alist semantic-displayor-abstract t))
+ (eieio-build-class-alist 'semantic-displayor-abstract t))
)
"Possible options for inline completion displayors.
Use this to enable custom editing.")
diff --git a/lisp/cedet/semantic/db-ebrowse.el b/lisp/cedet/semantic/db-ebrowse.el
index f89c6a6878c..2590dd1208d 100644
--- a/lisp/cedet/semantic/db-ebrowse.el
+++ b/lisp/cedet/semantic/db-ebrowse.el
@@ -1,6 +1,6 @@
;;; semantic/db-ebrowse.el --- Semanticdb backend using ebrowse.
-;; Copyright (C) 2005-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2015 Free Software Foundation, Inc.
;; Authors: Eric M. Ludlam <zappo@gnu.org>
;; Joakim Verona
@@ -192,7 +192,7 @@ is specified by `semanticdb-default-save-directory'."
If DIRECTORY is found to be defunct, it won't load the DB, and will
warn instead."
(if (file-directory-p directory)
- (semanticdb-create-database semanticdb-project-database-ebrowse
+ (semanticdb-create-database 'semanticdb-project-database-ebrowse
directory)
(let* ((BF (semanticdb-ebrowse-file-for-directory directory))
(BFL (concat BF "-load.el"))
diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el
index f37aa07ebe6..be9ffe31b87 100644
--- a/lisp/cedet/semantic/db-el.el
+++ b/lisp/cedet/semantic/db-el.el
@@ -1,6 +1,6 @@
;;; semantic/db-el.el --- Semantic database extensions for Emacs Lisp
-;;; Copyright (C) 2002-2014 Free Software Foundation, Inc.
+;;; Copyright (C) 2002-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: tags
@@ -225,7 +225,7 @@ TOKTYPE is a hint to the type of tag desired."
(semantic-elisp-desymbolify
;; FIXME: This only gives the instance slots and ignores the
;; class-allocated slots.
- (eieio--class-public-a (find-class semanticdb-project-database))) ;; slots ;FIXME: eieio--
+ (eieio--class-public-a (find-class 'semanticdb-project-database))) ;; slots ;FIXME: eieio--
(semantic-elisp-desymbolify (eieio-class-parents sym)) ;; parents
))
((not toktype)
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el
index 785b5c704d9..0360e0680e7 100644
--- a/lisp/cedet/semantic/db-file.el
+++ b/lisp/cedet/semantic/db-file.el
@@ -1,6 +1,6 @@
;;; semantic/db-file.el --- Save a semanticdb to a cache file.
-;;; Copyright (C) 2000-2005, 2007-2014 Free Software Foundation, Inc.
+;;; Copyright (C) 2000-2005, 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: tags
@@ -158,7 +158,8 @@ If DIRECTORY doesn't exist, create a new one."
(defun semanticdb-load-database (filename)
"Load the database FILENAME."
(condition-case foo
- (let* ((r (eieio-persistent-read filename semanticdb-project-database-file))
+ (let* ((r (eieio-persistent-read filename
+ 'semanticdb-project-database-file))
(c (semanticdb-get-database-tables r))
(tv (oref r semantic-tag-version))
(fv (oref r semanticdb-version))
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index 9134506ef40..dd36cc1a01e 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -1,6 +1,6 @@
;;; semantic/db-find.el --- Searching through semantic databases.
-;; Copyright (C) 2000-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: tags
@@ -1114,7 +1114,7 @@ for backward compatibility.
If optional argument BRUTISH is non-nil, then ignore include statements,
and search all tables in this project tree."
(let (found match)
- (save-excursion
+ (save-current-buffer
;; If path is a buffer, set ourselves up in that buffer
;; so that the override methods work correctly.
(when (bufferp path) (set-buffer path))
@@ -1127,7 +1127,7 @@ and search all tables in this project tree."
;; databases and not associated with a file.
(unless (and find-file-match
(obj-of-class-p
- (car tableandtags) semanticdb-search-results-table))
+ (car tableandtags) 'semanticdb-search-results-table))
(when (setq match (funcall function
(car tableandtags) (cdr tableandtags)))
(when find-file-match
@@ -1144,7 +1144,7 @@ and search all tables in this project tree."
;; `semanticdb-search-results-table', since those are system
;; databases and not associated with a file.
(unless (and find-file-match
- (obj-of-class-p table semanticdb-search-results-table))
+ (obj-of-class-p table 'semanticdb-search-results-table))
(when (and table (setq match (funcall function table nil)))
(semanticdb-find-log-activity table match)
(when find-file-match
diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el
index fd45e79f306..723b7bd28bc 100644
--- a/lisp/cedet/semantic/db-typecache.el
+++ b/lisp/cedet/semantic/db-typecache.el
@@ -1,6 +1,6 @@
;;; semantic/db-typecache.el --- Manage Datatypes
-;; Copyright (C) 2007-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <eric@siege-engine.com>
@@ -180,7 +180,7 @@ If there is no table, create one, and fill it in."
(defmethod semanticdb-get-typecache ((db semanticdb-project-database))
"Retrieve the typecache from the semantic database DB.
If there is no table, create one, and fill it in."
- (semanticdb-cache-get db semanticdb-database-typecache)
+ (semanticdb-cache-get db 'semanticdb-database-typecache)
)
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index 0732f225779..b2c1252c502 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -1,6 +1,6 @@
;;; semantic/db.el --- Semantic tag database manager
-;; Copyright (C) 2000-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: tags
@@ -330,6 +330,10 @@ Adds the number of tags in this file to the object print name."
;;; DATABASE BASE CLASS
;;
+(unless (fboundp 'semanticdb-abstract-table-list-p)
+ (cl-deftype semanticdb-abstract-table-list ()
+ '(list-of semanticdb-abstract-table)))
+
(defclass semanticdb-project-database (eieio-instance-tracker)
((tracking-symbol :initform semanticdb-database-list)
(reference-directory :type string
diff --git a/lisp/cedet/semantic/ede-grammar.el b/lisp/cedet/semantic/ede-grammar.el
index 679c660e06c..67f0cfeea6d 100644
--- a/lisp/cedet/semantic/ede-grammar.el
+++ b/lisp/cedet/semantic/ede-grammar.el
@@ -1,6 +1,6 @@
;;; semantic/ede-grammar.el --- EDE support for Semantic Grammar Files
-;; Copyright (C) 2003-2004, 2007-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2004, 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
@@ -213,7 +213,7 @@ Argument THIS is the target that should insert stuff."
;; "Target class for Emacs/Semantic grammar files." nil nil)
(ede-proj-register-target "semantic grammar"
- semantic-ede-proj-target-grammar)
+ 'semantic-ede-proj-target-grammar)
(provide 'semantic/ede-grammar)
diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el
index 9545dba703c..a0c36944d48 100644
--- a/lisp/cedet/semantic/fw.el
+++ b/lisp/cedet/semantic/fw.el
@@ -1,6 +1,6 @@
;;; semantic/fw.el --- Framework for Semantic
-;;; Copyright (C) 1999-2014 Free Software Foundation, Inc.
+;;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -378,11 +378,11 @@ If FORMS includes a call to `semantic-throw-on-input', then
if a user presses any key during execution, this form macro
will exit with the value passed to `semantic-throw-on-input'.
If FORMS completes, then the return value is the same as `progn'."
+ (declare (indent 1))
`(let ((semantic-current-input-throw-symbol ,symbol)
(semantic--on-input-start-marker (point-marker)))
(catch ,symbol
,@forms)))
-(put 'semantic-exit-on-input 'lisp-indent-function 1)
(defmacro semantic-throw-on-input (from)
"Exit with `throw' when in `semantic-exit-on-input' on user input.
@@ -391,15 +391,14 @@ to pass to `throw'. It is recommended to use the name of the function
calling this one."
`(when (and semantic-current-input-throw-symbol
(or (input-pending-p)
- (save-excursion
- ;; Timers might run during accept-process-output.
- ;; If they redisplay, point must be where the user
- ;; expects. (Bug#15045)
- (set-buffer (marker-buffer
- semantic--on-input-start-marker))
- (goto-char (marker-position
- semantic--on-input-start-marker))
- (accept-process-output))))
+ (with-current-buffer
+ ;; Timers might run during accept-process-output.
+ ;; If they redisplay, point must be where the user
+ ;; expects. (Bug#15045)
+ (marker-buffer semantic--on-input-start-marker)
+ (save-excursion
+ (goto-char semantic--on-input-start-marker)
+ (accept-process-output)))))
(throw semantic-current-input-throw-symbol ,from)))
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index 625736d9998..7a92a12ed53 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -1,6 +1,6 @@
;;; semantic/grammar.el --- Major mode framework for Semantic grammars
-;; Copyright (C) 2002-2005, 2007-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2005, 2007-2015 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
;; Maintainer: David Ponce <david@dponce.com>
@@ -1665,13 +1665,14 @@ Select the buffer containing the tag's definition, and move point there."
(declare-function eldoc-get-fnsym-args-string "eldoc")
(declare-function eldoc-get-var-docstring "eldoc")
+(defvar semantic-grammar-eldoc-last-data (cons nil nil))
+
(defun semantic-grammar-eldoc-get-macro-docstring (macro expander)
"Return a one-line docstring for the given grammar MACRO.
EXPANDER is the name of the function that expands MACRO."
(require 'eldoc)
- (if (and (eq expander (aref eldoc-last-data 0))
- (eq 'function (aref eldoc-last-data 2)))
- (aref eldoc-last-data 1)
+ (if (eq expander (car semantic-grammar-eldoc-last-data))
+ (cdr semantic-grammar-eldoc-last-data)
(let ((doc (help-split-fundoc (documentation expander t) expander)))
(cond
(doc
@@ -1684,7 +1685,7 @@ EXPANDER is the name of the function that expands MACRO."
(setq doc
(eldoc-docstring-format-sym-doc
macro (format "==> %s %s" expander doc) 'default))
- (eldoc-last-data-store expander doc 'function))
+ (setq semantic-grammar-eldoc-last-data (cons expander doc)))
doc)))
(define-mode-local-override semantic-idle-summary-current-symbol-info
diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el
index 8a5cbac4129..2216fa9e964 100644
--- a/lisp/cedet/semantic/ia.el
+++ b/lisp/cedet/semantic/ia.el
@@ -1,6 +1,6 @@
;;; semantic/ia.el --- Interactive Analysis functions
-;;; Copyright (C) 2000-2014 Free Software Foundation, Inc.
+;;; Copyright (C) 2000-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index f54139260ce..790315381c1 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -1,6 +1,6 @@
;;; idle.el --- Schedule parsing tasks in idle time
-;; Copyright (C) 2003-2006, 2008-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2006, 2008-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el
index 396f19c6c60..c56cbc3c126 100644
--- a/lisp/cedet/semantic/scope.el
+++ b/lisp/cedet/semantic/scope.el
@@ -1,6 +1,6 @@
;;; semantic/scope.el --- Analyzer Scope Calculations
-;; Copyright (C) 2007-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <eric@siege-engine.com>
@@ -134,7 +134,7 @@ Saves scoping information between runs of the analyzer.")
"Get the current cached scope, and reset it."
(when semanticdb-current-table
(let ((co (semanticdb-cache-get semanticdb-current-table
- semantic-scope-cache)))
+ 'semantic-scope-cache)))
(semantic-reset co))))
(defmethod semantic-scope-set-typecache ((cache semantic-scope-cache)
@@ -706,7 +706,7 @@ The class returned from the scope calculation is variable
(let* ((TAG (semantic-current-tag))
(scopecache
(semanticdb-cache-get semanticdb-current-table
- semantic-scope-cache))
+ 'semantic-scope-cache))
)
(when (not (semantic-equivalent-tag-p TAG (oref scopecache tag)))
(semantic-reset scopecache))