mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 11:50:51 -08:00
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.
This commit is contained in:
parent
cb4db86319
commit
1599688e95
39 changed files with 414 additions and 290 deletions
|
|
@ -1,3 +1,52 @@
|
|||
2015-01-07 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
Don't use <class> as a variable and don't assume that <class>-list-p is
|
||||
automatically defined.
|
||||
|
||||
* ede/speedbar.el (ede-speedbar-compile-line)
|
||||
(ede-speedbar-get-top-project-for-line):
|
||||
* ede.el (ede-buffer-belongs-to-target-p)
|
||||
(ede-buffer-belongs-to-project-p, ede-build-forms-menu)
|
||||
(ede-add-project-to-global-list):
|
||||
* semantic/db-typecache.el (semanticdb-get-typecache):
|
||||
* semantic/db-file.el (semanticdb-load-database):
|
||||
* semantic/db-el.el (semanticdb-elisp-sym->tag):
|
||||
* semantic/db-ebrowse.el (semanticdb-ebrowse-load-helper):
|
||||
* ede/project-am.el (project-am-preferred-target-type):
|
||||
* ede/proj.el (ede-proj-load):
|
||||
* ede/custom.el (ede-customize-current-target, ede-customize-target):
|
||||
* semantic/ede-grammar.el ("semantic grammar"):
|
||||
* semantic/scope.el (semantic-scope-reset-cache)
|
||||
(semantic-calculate-scope):
|
||||
* srecode/map.el (srecode-map-update-map):
|
||||
* srecode/insert.el (srecode-insert-show-error-report)
|
||||
(srecode-insert-method, srecode-insert-include-lookup)
|
||||
(srecode-insert-method):
|
||||
* srecode/fields.el (srecode-active-template-region):
|
||||
* srecode/compile.el (srecode-flush-active-templates)
|
||||
(srecode-compile-inserter): Don't use <class> as a variable.
|
||||
Use `oref-default' for class slots.
|
||||
|
||||
* semantic/grammar.el (semantic-grammar-eldoc-last-data): New var.
|
||||
(semantic-grammar-eldoc-get-macro-docstring): Use it instead of
|
||||
eldoc-last-data.
|
||||
* semantic/fw.el (semantic-exit-on-input): Use `declare'.
|
||||
(semantic-throw-on-input): Use `with-current-buffer'.
|
||||
* semantic/db.el (semanticdb-abstract-table-list): Define if not
|
||||
pre-defined.
|
||||
* semantic/db-find.el (semanticdb-find-tags-collector):
|
||||
Use save-current-buffer.
|
||||
(semanticdb-find-tags-collector): Don't use <class> as a variable.
|
||||
* 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.
|
||||
* semantic/bovine/make.el (semantic-analyze-possible-completions):
|
||||
Use with-current-buffer.
|
||||
* semantic.el (semantic-parser-warnings): Declare.
|
||||
* ede/base.el (ede-target-list): Define if not pre-defined.
|
||||
(ede-with-projectfile): Prefer find-file-noselect over
|
||||
save-window-excursion.
|
||||
|
||||
2014-12-22 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* srecode/srt-mode.el (srecode-macro-help): Use eieio-class-children.
|
||||
|
|
@ -3379,7 +3428,7 @@
|
|||
;; coding: utf-8
|
||||
;; End:
|
||||
|
||||
Copyright (C) 2009-2014 Free Software Foundation, Inc.
|
||||
Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Emacs.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; ede.el --- Emacs Development Environment gloss
|
||||
|
||||
;; Copyright (C) 1998-2005, 2007-2014 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1998-2005, 2007-2015 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||
;; Keywords: project, make
|
||||
|
|
@ -248,12 +248,12 @@ Argument LIST-O-O is the list of objects to choose from."
|
|||
(let ((obj ede-object))
|
||||
(if (consp obj)
|
||||
(setq obj (car obj)))
|
||||
(and obj (obj-of-class-p obj ede-target))))
|
||||
(and obj (obj-of-class-p obj 'ede-target))))
|
||||
|
||||
(defun ede-buffer-belongs-to-project-p ()
|
||||
"Return non-nil if this buffer belongs to at least one project."
|
||||
(if (or (null ede-object) (consp ede-object)) nil
|
||||
(obj-of-class-p ede-object-project ede-project)))
|
||||
(obj-of-class-p ede-object-project 'ede-project)))
|
||||
|
||||
(defun ede-menu-obj-of-class-p (class)
|
||||
"Return non-nil if some member of `ede-object' is a child of CLASS."
|
||||
|
|
@ -281,7 +281,7 @@ Argument MENU-DEF is the menu definition to use."
|
|||
;; First, collect the build items from the project
|
||||
(setq newmenu (append newmenu (ede-menu-items-build obj t)))
|
||||
;; Second, declare the current target menu items
|
||||
(if (and ede-obj (ede-menu-obj-of-class-p ede-target))
|
||||
(if (and ede-obj (ede-menu-obj-of-class-p 'ede-target))
|
||||
(while ede-obj
|
||||
(setq newmenu (append newmenu
|
||||
(ede-menu-items-build (car ede-obj) t))
|
||||
|
|
@ -1078,7 +1078,7 @@ On success, return the added project."
|
|||
(error "No project created to add to master list"))
|
||||
(when (not (eieio-object-p proj))
|
||||
(error "Attempt to add non-object to master project list"))
|
||||
(when (not (obj-of-class-p proj ede-project-placeholder))
|
||||
(when (not (obj-of-class-p proj 'ede-project-placeholder))
|
||||
(error "Attempt to add a non-project to the ede projects list"))
|
||||
(add-to-list 'ede-projects proj)
|
||||
proj)
|
||||
|
|
@ -1099,6 +1099,8 @@ Flush the dead projects from the project cache."
|
|||
(ede-delete-project-from-global-list D))
|
||||
))
|
||||
|
||||
(defvar ede--disable-inode) ;Defined in ede/files.el.
|
||||
|
||||
(defun ede-global-list-sanity-check ()
|
||||
"Perform a sanity check to make sure there are no duplicate projects."
|
||||
(interactive)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; ede/base.el --- Baseclasses for EDE.
|
||||
|
||||
;; Copyright (C) 2010-2014 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||
|
||||
|
|
@ -159,6 +159,9 @@ and querying them will cause the actual project to get loaded.")
|
|||
;; Projects can also affect how EDE works, by changing what appears in
|
||||
;; the EDE menu, or how some keys are bound.
|
||||
;;
|
||||
(unless (fboundp 'ede-target-list-p)
|
||||
(cl-deftype ede-target-list () '(list-of ede-target)))
|
||||
|
||||
(defclass ede-project (ede-project-placeholder)
|
||||
((subproj :initform nil
|
||||
:type list
|
||||
|
|
@ -287,16 +290,18 @@ All specific project types must derive from this project."
|
|||
;;
|
||||
(defmacro ede-with-projectfile (obj &rest forms)
|
||||
"For the project in which OBJ resides, execute FORMS."
|
||||
`(save-window-excursion
|
||||
(let* ((pf (if (obj-of-class-p ,obj ede-target)
|
||||
(ede-target-parent ,obj)
|
||||
,obj))
|
||||
(dbka (get-file-buffer (oref pf file))))
|
||||
(if (not dbka) (find-file (oref pf file))
|
||||
(switch-to-buffer dbka))
|
||||
(declare (indent 1))
|
||||
(unless (symbolp obj)
|
||||
(message "Beware! ede-with-projectfile's first arg is copied: %S" obj))
|
||||
`(let* ((pf (if (obj-of-class-p ,obj 'ede-target)
|
||||
(ede-target-parent ,obj)
|
||||
,obj))
|
||||
(dbka (get-file-buffer (oref pf file))))
|
||||
(with-current-buffer
|
||||
(if (not dbka) (find-file-noselect (oref pf file))
|
||||
dbka)
|
||||
,@forms
|
||||
(if (not dbka) (kill-buffer (current-buffer))))))
|
||||
(put 'ede-with-projectfile 'lisp-indent-function 1)
|
||||
|
||||
;;; The EDE persistent cache.
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; ede/custom.el --- customization of EDE projects.
|
||||
|
||||
;; Copyright (C) 2010-2014 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
"Edit fields of the current target through EIEIO & Custom."
|
||||
(interactive)
|
||||
(require 'eieio-custom)
|
||||
(if (not (obj-of-class-p ede-object ede-target))
|
||||
(if (not (obj-of-class-p ede-object 'ede-target))
|
||||
(error "Current file is not part of a target"))
|
||||
(ede-customize-target ede-object))
|
||||
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
"Edit fields of the current target through EIEIO & Custom.
|
||||
OBJ is the target object to customize."
|
||||
(require 'eieio-custom)
|
||||
(if (and obj (not (obj-of-class-p obj ede-target)))
|
||||
(if (and obj (not (obj-of-class-p obj 'ede-target)))
|
||||
(error "No logical target to customize"))
|
||||
(ede-customize obj))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; ede/proj.el --- EDE Generic Project file driver
|
||||
|
||||
;; Copyright (C) 1998-2003, 2007-2014 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1998-2003, 2007-2015 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||
;; Keywords: project, make
|
||||
|
|
@ -297,7 +297,7 @@ for the tree being read in. If ROOTPROJ is nil, then assume that
|
|||
the PROJECT being read in is the root project."
|
||||
(save-excursion
|
||||
(let ((ret (eieio-persistent-read (concat project "Project.ede")
|
||||
ede-proj-project))
|
||||
'ede-proj-project))
|
||||
(subdirs (directory-files project nil "[^.].*" nil)))
|
||||
(if (not (object-of-class-p ret 'ede-proj-project))
|
||||
(error "Corrupt project file"))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; project-am.el --- A project management scheme based on automake files.
|
||||
|
||||
;; Copyright (C) 1998-2000, 2003, 2005, 2007-2014
|
||||
;; Copyright (C) 1998-2000, 2003, 2005, 2007-2015
|
||||
;; Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||
|
|
@ -853,13 +853,13 @@ Argument FILE is the file to extract the end directory name from."
|
|||
(defun project-am-preferred-target-type (file)
|
||||
"For FILE, return the preferred type for that file."
|
||||
(cond ((string-match "\\.texi?\\(nfo\\)$" file)
|
||||
project-am-texinfo)
|
||||
'project-am-texinfo)
|
||||
((string-match "\\.[0-9]$" file)
|
||||
project-am-man)
|
||||
'project-am-man)
|
||||
((string-match "\\.el$" file)
|
||||
project-am-lisp)
|
||||
'project-am-lisp)
|
||||
(t
|
||||
project-am-program)))
|
||||
'project-am-program)))
|
||||
|
||||
(defmethod ede-buffer-header-file((this project-am-objectcode) buffer)
|
||||
"There are no default header files."
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; ede/speedbar.el --- Speedbar viewing of EDE projects
|
||||
|
||||
;; Copyright (C) 1998-2001, 2003, 2005, 2007-2014 Free Software
|
||||
;; Copyright (C) 1998-2001, 2003, 2005, 2007-2015 Free Software
|
||||
;; Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||
|
|
@ -121,9 +121,9 @@ Argument DIR is the directory from which to derive the list of objects."
|
|||
(let ((obj (eieio-speedbar-find-nearest-object)))
|
||||
(if (not (eieio-object-p obj))
|
||||
nil
|
||||
(cond ((obj-of-class-p obj ede-project)
|
||||
(cond ((obj-of-class-p obj 'ede-project)
|
||||
(project-compile-project obj))
|
||||
((obj-of-class-p obj ede-target)
|
||||
((obj-of-class-p obj 'ede-target)
|
||||
(project-compile-target obj))
|
||||
(t (error "Error in speedbar structure"))))))
|
||||
|
||||
|
|
@ -133,9 +133,9 @@ Argument DIR is the directory from which to derive the list of objects."
|
|||
(let ((obj (eieio-speedbar-find-nearest-object)))
|
||||
(if (not (eieio-object-p obj))
|
||||
(error "Error in speedbar or ede structure")
|
||||
(if (obj-of-class-p obj ede-target)
|
||||
(if (obj-of-class-p obj 'ede-target)
|
||||
(setq obj (ede-target-parent obj)))
|
||||
(if (obj-of-class-p obj ede-project)
|
||||
(if (obj-of-class-p obj 'ede-project)
|
||||
obj
|
||||
(error "Error in speedbar or ede structure")))))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; semantic.el --- Semantic buffer evaluator.
|
||||
|
||||
;; Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||
;; Keywords: syntax tools
|
||||
|
|
@ -573,6 +573,7 @@ string."
|
|||
;; The best way to call the parser from programs is via
|
||||
;; `semantic-fetch-tags'. This, in turn, uses other internal
|
||||
;; API functions which plug-in parsers can take advantage of.
|
||||
(defvar semantic-parser-warnings)
|
||||
|
||||
(defun semantic-fetch-tags ()
|
||||
"Fetch semantic tags from the current buffer.
|
||||
|
|
@ -602,49 +603,49 @@ was marked unparseable, then do nothing, and return the cache."
|
|||
(garbage-collect)
|
||||
(cond
|
||||
|
||||
;;;; Try the incremental parser to do a fast update.
|
||||
((semantic-parse-tree-needs-update-p)
|
||||
(setq res (semantic-parse-changes))
|
||||
(if (semantic-parse-tree-needs-rebuild-p)
|
||||
;; If the partial reparse fails, jump to a full reparse.
|
||||
(semantic-fetch-tags)
|
||||
;; Clear the cache of unmatched syntax tokens
|
||||
;;
|
||||
;; NOTE TO SELF:
|
||||
;;
|
||||
;; Move this into the incremental parser. This is a bug.
|
||||
;;
|
||||
(semantic-clear-unmatched-syntax-cache)
|
||||
(run-hook-with-args ;; Let hooks know the updated tags
|
||||
'semantic-after-partial-cache-change-hook res))
|
||||
(setq semantic--completion-cache nil))
|
||||
;; Try the incremental parser to do a fast update.
|
||||
((semantic-parse-tree-needs-update-p)
|
||||
(setq res (semantic-parse-changes))
|
||||
(if (semantic-parse-tree-needs-rebuild-p)
|
||||
;; If the partial reparse fails, jump to a full reparse.
|
||||
(semantic-fetch-tags)
|
||||
;; Clear the cache of unmatched syntax tokens
|
||||
;;
|
||||
;; NOTE TO SELF:
|
||||
;;
|
||||
;; Move this into the incremental parser. This is a bug.
|
||||
;;
|
||||
(semantic-clear-unmatched-syntax-cache)
|
||||
(run-hook-with-args ;; Let hooks know the updated tags
|
||||
'semantic-after-partial-cache-change-hook res))
|
||||
(setq semantic--completion-cache nil))
|
||||
|
||||
;;;; Parse the whole system.
|
||||
((semantic-parse-tree-needs-rebuild-p)
|
||||
;; Use Emacs's built-in progress-reporter (only interactive).
|
||||
(if noninteractive
|
||||
(setq res (semantic-parse-region (point-min) (point-max)))
|
||||
(let ((semantic--progress-reporter
|
||||
(and (>= (point-max) semantic-minimum-working-buffer-size)
|
||||
(eq semantic-working-type 'percent)
|
||||
(make-progress-reporter
|
||||
(semantic-parser-working-message (buffer-name))
|
||||
0 100))))
|
||||
(setq res (semantic-parse-region (point-min) (point-max)))
|
||||
(if semantic--progress-reporter
|
||||
(progress-reporter-done semantic--progress-reporter))))
|
||||
;; Parse the whole system.
|
||||
((semantic-parse-tree-needs-rebuild-p)
|
||||
;; Use Emacs's built-in progress-reporter (only interactive).
|
||||
(if noninteractive
|
||||
(setq res (semantic-parse-region (point-min) (point-max)))
|
||||
(let ((semantic--progress-reporter
|
||||
(and (>= (point-max) semantic-minimum-working-buffer-size)
|
||||
(eq semantic-working-type 'percent)
|
||||
(make-progress-reporter
|
||||
(semantic-parser-working-message (buffer-name))
|
||||
0 100))))
|
||||
(setq res (semantic-parse-region (point-min) (point-max)))
|
||||
(if semantic--progress-reporter
|
||||
(progress-reporter-done semantic--progress-reporter))))
|
||||
|
||||
;; Clear the caches when we see there were no errors.
|
||||
;; But preserve the unmatched syntax cache and warnings!
|
||||
(let (semantic-unmatched-syntax-cache
|
||||
semantic-unmatched-syntax-cache-check
|
||||
semantic-parser-warnings)
|
||||
(semantic-clear-toplevel-cache))
|
||||
;; Set up the new overlays
|
||||
(semantic--tag-link-list-to-buffer res)
|
||||
;; Set up the cache with the new results
|
||||
(semantic--set-buffer-cache res)
|
||||
))))
|
||||
;; Clear the caches when we see there were no errors.
|
||||
;; But preserve the unmatched syntax cache and warnings!
|
||||
(let (semantic-unmatched-syntax-cache
|
||||
semantic-unmatched-syntax-cache-check
|
||||
semantic-parser-warnings)
|
||||
(semantic-clear-toplevel-cache))
|
||||
;; Set up the new overlays
|
||||
(semantic--tag-link-list-to-buffer res)
|
||||
;; Set up the cache with the new results
|
||||
(semantic--set-buffer-cache res)
|
||||
))))
|
||||
|
||||
;; Always return the current parse tree.
|
||||
semantic--buffer-cache)
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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.")
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; srecode/compile --- Compilation of srecode template files.
|
||||
|
||||
;; Copyright (C) 2005, 2007-2014 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2005, 2007-2015 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||
;; Keywords: codegeneration
|
||||
|
|
@ -87,10 +87,10 @@ for push, pop, and peek for the active template.")
|
|||
Useful if something goes wrong in SRecode, and the active template
|
||||
stack is broken."
|
||||
(interactive)
|
||||
(if (oref srecode-template active)
|
||||
(if (oref-default 'srecode-template active)
|
||||
(when (y-or-n-p (format "%d active templates. Flush? "
|
||||
(length (oref srecode-template active))))
|
||||
(oset-default srecode-template active nil))
|
||||
(length (oref-default 'srecode-template active))))
|
||||
(oset-default 'srecode-template active nil))
|
||||
(message "No active templates to flush."))
|
||||
)
|
||||
|
||||
|
|
@ -514,7 +514,7 @@ to the inserter constructor."
|
|||
;;(message "Compile: %s %S" name props)
|
||||
(if (not key)
|
||||
(apply 'srecode-template-inserter-variable name props)
|
||||
(let ((classes (eieio-class-children srecode-template-inserter))
|
||||
(let ((classes (eieio-class-children 'srecode-template-inserter))
|
||||
(new nil))
|
||||
;; Loop over the various subclasses and
|
||||
;; create the correct inserter.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; srecode/fields.el --- Handling type-in fields in a buffer.
|
||||
;;
|
||||
;; Copyright (C) 2009-2014 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2009-2015 Free Software Foundation, Inc.
|
||||
;;
|
||||
;; Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
|
|
@ -237,7 +237,7 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO."
|
|||
|
||||
(defsubst srecode-active-template-region ()
|
||||
"Return the active region for template fields."
|
||||
(oref srecode-template-inserted-region active-region))
|
||||
(oref-default 'srecode-template-inserted-region active-region))
|
||||
|
||||
(defun srecode-field-post-command ()
|
||||
"Srecode field handler in the post command hook."
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; srecode/insert.el --- Insert srecode templates to an output stream.
|
||||
|
||||
;; Copyright (C) 2005, 2007-2014 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2005, 2007-2015 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ insertions."
|
|||
(propertize " (most recent at bottom)" 'face '(:slant italic))
|
||||
":\n")
|
||||
(data-debug-insert-stuff-list
|
||||
(reverse (oref srecode-template active)) "> ")
|
||||
(reverse (oref-default 'srecode-template active)) "> ")
|
||||
;; Show the current dictionary.
|
||||
(insert (propertize "Dictionary" 'face '(:weight bold)) "\n")
|
||||
(data-debug-insert-thing dictionary "" "> ")
|
||||
|
|
@ -396,7 +396,7 @@ Specify the :blank argument to enable this inserter.")
|
|||
(pm (point-marker)))
|
||||
(when (and inbuff
|
||||
;; Don't do this if we are not the active template.
|
||||
(= (length (oref srecode-template active)) 1))
|
||||
(= (length (oref-default 'srecode-template active)) 1))
|
||||
|
||||
(when (and (eq i t) inbuff (not (eq (oref sti where) 'begin)))
|
||||
(indent-according-to-mode)
|
||||
|
|
@ -773,7 +773,7 @@ generalized marker will do something else. See
|
|||
;; valid. Compare this to the actual template nesting depth and
|
||||
;; maybe use the override function which is stored in the cdr.
|
||||
(if (and srecode-template-inserter-point-override
|
||||
(<= (length (oref srecode-template active))
|
||||
(<= (length (oref-default 'srecode-template active))
|
||||
(car srecode-template-inserter-point-override)))
|
||||
;; Disable the old override while we do this.
|
||||
(let ((over (cdr srecode-template-inserter-point-override))
|
||||
|
|
@ -943,7 +943,7 @@ this template instance."
|
|||
;; Calculate and store the discovered template
|
||||
(let ((tmpl (srecode-template-get-table (srecode-table)
|
||||
templatenamepart))
|
||||
(active (oref srecode-template active))
|
||||
(active (oref-default 'srecode-template active))
|
||||
ctxt)
|
||||
(when (not tmpl)
|
||||
;; If it isn't just available, scan back through
|
||||
|
|
@ -1053,7 +1053,7 @@ template where a ^ inserter occurs."
|
|||
(lexical-let ((inserter1 sti))
|
||||
(cons
|
||||
;; DEPTH
|
||||
(+ (length (oref srecode-template active)) 1)
|
||||
(+ (length (oref-default 'srecode-template active)) 1)
|
||||
;; FUNCTION
|
||||
(lambda (dict)
|
||||
(let ((srecode-template-inserter-point-override nil))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; srecode/map.el --- Manage a template file map
|
||||
|
||||
;; Copyright (C) 2008-2014 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2008-2015 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||
|
||||
|
|
@ -298,7 +298,7 @@ if that file is NEW, otherwise assume the mode has not changed."
|
|||
(when (not srecode-current-map)
|
||||
(condition-case nil
|
||||
(setq srecode-current-map
|
||||
(eieio-persistent-read srecode-map-save-file srecode-map))
|
||||
(eieio-persistent-read srecode-map-save-file 'srecode-map))
|
||||
(error
|
||||
;; There was an error loading the old map. Create a new one.
|
||||
(setq srecode-current-map
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue