Remove a few redundant `:group` arguments as well.
* lisp/cedet/ede.el: Use lexical-binding.
Don't load `ede/files` at compile-time.
(ede-speedbar): Declare function.
(ede-load-project-file): Allow `rootreturn` to be a reference rather
than a symbol.
(ede-initialize-state-current-buffer): Pass `ROOT` as a reference
rather than a symbol to `ede-directory-get-open-project` and
`ede-load-project-file` so we don't need to make it dynamically scoped.
(ede-flush-deleted-projects): Avoid `add-to-list` on a local var.
* lisp/cedet/ede/files.el: Use lexical-binding.
(ede-directory-get-open-project): Allow `rootreturn` to be a reference
rather than a symbol.
(ede-project-root-directory): Remove unused var `root`.
(ede-expand-filename-impl): Remove unused vars `path` and `proj`.
* lisp/cedet/cedet-idutils.el: Use lexical-binding.
(cedet-idutils-search): Remove always-nil variable `scopeflags`.
* lisp/cedet/data-debug.el: Use lexical-binding.
(data-debug-insert-overlay-button, data-debug-insert-overlay-list-button)
(data-debug-insert-buffer-button, data-debug-insert-buffer-list-button)
(data-debug-insert-process-button): Remove always-nil variable `tip`.
(data-debug-insert-ring-button): Remove unused var `ringthing`.
(data-debug-insert-widget-properties): Remove unused var `type`.
* lisp/cedet/semantic.el: Use lexical-binding.
(semantic-mode): Strength-reduce `eval` to `symbol-value`.
* lisp/cedet/ede/custom.el: Use lexical-binding.
(ede-project-sort-targets): Remove unused vars `count`, `current`, and
`order`.
* lisp/cedet/ede/pconf.el: Use lexical-binding.
(ede-proj-configure-synchronize): Remove unused var `add-missing`.
* lisp/cedet/ede/pmake.el (ede-proj-makefile-garbage-patterns):
Simplify via η-reduction.
(ede-proj-makefile-dependencies): Use `seq-some` rather than `eval+or`.
* lisp/cedet/ede/proj-elisp.el: Use lexical-binding.
(project-compile-target): Remove unused var `elc`.
(ede-update-version-in-source): Remove unused var `match`.
(project-compile-target): Declare function `cedet-update-autoloads`
from file we don't have.
* lisp/cedet/cedet-cscope.el: Use lexical-binding.
* lisp/cedet/cedet-files.el: Use lexical-binding.
* lisp/cedet/cedet-global.el: Use lexical-binding.
* lisp/cedet/cedet.el: Use lexical-binding.
* lisp/cedet/ede/auto.el: Use lexical-binding.
* lisp/cedet/ede/autoconf-edit.el: Use lexical-binding.
* lisp/cedet/ede/config.el: Use lexical-binding.
* lisp/cedet/ede/cpp-root.el: Use lexical-binding.
* lisp/cedet/ede/detect.el: Use lexical-binding.
* lisp/cedet/ede/generic.el: Use lexical-binding.
* lisp/cedet/ede/linux.el: Use lexical-binding.
* lisp/cedet/ede/locate.el: Use lexical-binding.
* lisp/cedet/ede/makefile-edit.el: Use lexical-binding.
* lisp/cedet/ede/proj-info.el: Use lexical-binding.
* lisp/cedet/ede/proj-obj.el: Use lexical-binding.
* lisp/cedet/ede/proj-prog.el: Use lexical-binding.
* lisp/cedet/ede/proj-shared.el: Use lexical-binding.
* lisp/cedet/ede/proj.el: Use lexical-binding.
* lisp/cedet/ede/shell.el: Use lexical-binding.
* lisp/cedet/ede/simple.el: Use lexical-binding.
* lisp/cedet/ede/source.el: Use lexical-binding.
* lisp/cedet/ede/speedbar.el: Use lexical-binding.
* lisp/cedet/ede/util.el: Use lexical-binding.
-;;; cedet-cscope.el --- CScope support for CEDET
+;;; cedet-cscope.el --- CScope support for CEDET -*- lexical-binding: t; -*-
;;; Copyright (C) 2009-2021 Free Software Foundation, Inc.
:type 'string
:group 'cedet)
-(defun cedet-cscope-search (searchtext texttype type scope)
+(defun cedet-cscope-search (searchtext texttype type _scope)
"Perform a search with CScope, return the created buffer.
SEARCHTEXT is text to find.
TEXTTYPE is the type of text, such as `regexp', `string', `tagname',
(with-current-buffer b
(setq default-directory cd)
(erase-buffer))
- (apply 'call-process cedet-cscope-command
+ (apply #'call-process cedet-cscope-command
nil b nil
flags)
b))
-;;; cedet-files.el --- Common routines dealing with file names.
+;;; cedet-files.el --- Common routines dealing with file names. -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
-;;; cedet-global.el --- GNU Global support for CEDET.
+;;; cedet-global.el --- GNU Global support for CEDET. -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
(with-current-buffer b
(setq default-directory cd)
(erase-buffer))
- (apply 'call-process cedet-global-command
+ (apply #'call-process cedet-global-command
nil b nil
flags)
b))
(with-current-buffer b
(setq default-directory cd)
(erase-buffer))
- (apply 'call-process cedet-global-gtags-command
+ (apply #'call-process cedet-global-gtags-command
nil b nil
flags)
-;;; cedet-idutils.el --- ID Utils support for CEDET.
+;;; cedet-idutils.el --- ID Utils support for CEDET. -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2021 Free Software Foundation, Inc.
:type 'string
:group 'cedet)
-(defun cedet-idutils-search (searchtext texttype type scope)
+(defun cedet-idutils-search (searchtext texttype type _scope)
"Perform a search with ID Utils, return the created buffer.
SEARCHTEXT is text to find.
TEXTTYPE is the type of text, such as `regexp', `string', `tagname',
(let* ((resultflg (if (eq texttype 'tagcompletions)
(list "--key=token")
(list "--result=grep")))
- (scopeflgs nil) ; (cond ((eq scope 'project) "" ) ((eq scope 'target) "l")))
+ ;; (scopeflgs (cond ((eq scope 'project) "" ) ((eq scope 'target) "l")))
(stflag (cond ((or (eq texttype 'tagname)
(eq texttype 'tagregexp))
(list "-r" "-w"))
;; t means 'symbol
(t (list "-l" "-w"))))
)
- (cedet-idutils-lid-call (append resultflg scopeflgs stflag
+ (cedet-idutils-lid-call (append resultflg nil stflag ;; scopeflgs
(list searchtext))))))
(defun cedet-idutils-fnid-call (flags)
(with-current-buffer b
(setq default-directory cd)
(erase-buffer))
- (apply 'call-process cedet-idutils-file-command
+ (apply #'call-process cedet-idutils-file-command
nil b nil
flags)
b))
(with-current-buffer b
(setq default-directory cd)
(erase-buffer))
- (apply 'call-process cedet-idutils-token-command
+ (apply #'call-process cedet-idutils-token-command
nil b nil
flags)
b))
(with-current-buffer b
(setq default-directory cd)
(erase-buffer))
- (apply 'call-process cedet-idutils-make-command
+ (apply #'call-process cedet-idutils-make-command
nil b nil
flags)
b))
(if (looking-at "[^ \n]*fnid: ")
(error "ID Utils not available")
(split-string (buffer-string) "\n" t)))))
- (setq ans (mapcar 'expand-file-name ans))
+ (setq ans (mapcar #'expand-file-name ans))
(when (called-interactively-p 'interactive)
(if ans
(if (= (length ans) 1)
-;;; cedet.el --- Setup CEDET environment
+;;; cedet.el --- Setup CEDET environment -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
(defvar cedet-menu-map ;(make-sparse-keymap "CEDET menu")
(let ((map (make-sparse-keymap "CEDET menu")))
- (define-key map [semantic-force-refresh] 'undefined)
- (define-key map [semantic-edit-menu] 'undefined)
- (define-key map [navigate-menu] 'undefined)
- (define-key map [semantic-options-separator] 'undefined)
- (define-key map [global-semantic-highlight-func-mode] 'undefined)
- (define-key map [global-semantic-stickyfunc-mode] 'undefined)
- (define-key map [global-semantic-decoration-mode] 'undefined)
- (define-key map [global-semantic-idle-completions-mode] 'undefined)
- (define-key map [global-semantic-idle-summary-mode] 'undefined)
- (define-key map [global-semantic-idle-scheduler-mode] 'undefined)
- (define-key map [global-semanticdb-minor-mode] 'undefined)
- (define-key map [cedet-menu-separator] 'undefined)
- (define-key map [ede-find-file] 'undefined)
- (define-key map [ede-speedbar] 'undefined)
- (define-key map [ede] 'undefined)
- (define-key map [ede-new] 'undefined)
- (define-key map [ede-target-options] 'undefined)
- (define-key map [ede-project-options] 'undefined)
- (define-key map [ede-build-forms-menu] 'undefined)
+ (define-key map [semantic-force-refresh] #'undefined)
+ (define-key map [semantic-edit-menu] #'undefined)
+ (define-key map [navigate-menu] #'undefined)
+ (define-key map [semantic-options-separator] #'undefined)
+ (define-key map [global-semantic-highlight-func-mode] #'undefined)
+ (define-key map [global-semantic-stickyfunc-mode] #'undefined)
+ (define-key map [global-semantic-decoration-mode] #'undefined)
+ (define-key map [global-semantic-idle-completions-mode] #'undefined)
+ (define-key map [global-semantic-idle-summary-mode] #'undefined)
+ (define-key map [global-semantic-idle-scheduler-mode] #'undefined)
+ (define-key map [global-semanticdb-minor-mode] #'undefined)
+ (define-key map [cedet-menu-separator] #'undefined)
+ (define-key map [ede-find-file] #'undefined)
+ (define-key map [ede-speedbar] #'undefined)
+ (define-key map [ede] #'undefined)
+ (define-key map [ede-new] #'undefined)
+ (define-key map [ede-target-options] #'undefined)
+ (define-key map [ede-project-options] #'undefined)
+ (define-key map [ede-build-forms-menu] #'undefined)
map)
"Menu keymap for the CEDET package.
This is used by `semantic-mode' and `global-ede-mode'.")
-;;; data-debug.el --- Data structure debugger
+;;; data-debug.el --- Data structure debugger -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
;;; Compatibility
;;
-(define-obsolete-function-alias 'data-debug-overlay-properties 'overlay-properties "28.1")
-(define-obsolete-function-alias 'data-debug-overlay-p 'overlayp "28.1")
-(define-obsolete-function-alias 'dd-propertize 'propertize "28.1")
+(define-obsolete-function-alias 'data-debug-overlay-properties #'overlay-properties "28.1")
+(define-obsolete-function-alias 'data-debug-overlay-p #'overlayp "28.1")
+(define-obsolete-function-alias 'dd-propertize #'propertize "28.1")
;;; GENERIC STUFF
;;
(let ((start (point))
(end nil)
(str (format "%s" overlay))
- (tip nil))
+ ) ;; (tip nil)
(insert prefix prebuttontext str)
(setq end (point))
(put-text-property (- end (length str)) end 'face 'font-lock-comment-face)
(put-text-property start end 'ddebug overlay)
(put-text-property start end 'ddebug-indent(length prefix))
(put-text-property start end 'ddebug-prefix prefix)
- (put-text-property start end 'help-echo tip)
+ ;; (put-text-property start end 'help-echo tip)
(put-text-property start end 'ddebug-function
'data-debug-insert-overlay-from-point)
(insert "\n")
(let ((start (point))
(end nil)
(str (format "#<overlay list: %d entries>" (length overlaylist)))
- (tip nil))
+ ) ;; (tip nil)
(insert prefix prebuttontext str)
(setq end (point))
(put-text-property (- end (length str)) end 'face 'font-lock-comment-face)
(put-text-property start end 'ddebug overlaylist)
(put-text-property start end 'ddebug-indent(length prefix))
(put-text-property start end 'ddebug-prefix prefix)
- (put-text-property start end 'help-echo tip)
+ ;; (put-text-property start end 'help-echo tip)
(put-text-property start end 'ddebug-function
'data-debug-insert-overlay-list-from-point)
(insert "\n")
(let ((start (point))
(end nil)
(str (format "%S" buffer))
- (tip nil))
+ ) ;; (tip nil)
(insert prefix prebuttontext str)
(setq end (point))
(put-text-property (- end (length str)) end 'face 'font-lock-comment-face)
(put-text-property start end 'ddebug buffer)
(put-text-property start end 'ddebug-indent(length prefix))
(put-text-property start end 'ddebug-prefix prefix)
- (put-text-property start end 'help-echo tip)
+ ;; (put-text-property start end 'help-echo tip)
(put-text-property start end 'ddebug-function
'data-debug-insert-buffer-from-point)
(insert "\n")
(let ((start (point))
(end nil)
(str (format "#<buffer list: %d entries>" (length bufferlist)))
- (tip nil))
+ ) ;; (tip nil)
(insert prefix prebuttontext str)
(setq end (point))
(put-text-property (- end (length str)) end 'face 'font-lock-comment-face)
(put-text-property start end 'ddebug bufferlist)
(put-text-property start end 'ddebug-indent(length prefix))
(put-text-property start end 'ddebug-prefix prefix)
- (put-text-property start end 'help-echo tip)
+ ;; (put-text-property start end 'help-echo tip)
(put-text-property start end 'ddebug-function
'data-debug-insert-buffer-list-from-point)
(insert "\n")
(let ((start (point))
(end nil)
(str (format "%S : %s" process (process-status process)))
- (tip nil))
+ ) ;; (tip nil)
(insert prefix prebuttontext str)
(setq end (point))
(put-text-property (- end (length str)) end 'face 'font-lock-comment-face)
(put-text-property start end 'ddebug process)
(put-text-property start end 'ddebug-indent(length prefix))
(put-text-property start end 'ddebug-prefix prefix)
- (put-text-property start end 'help-echo tip)
+ ;; (put-text-property start end 'help-echo tip)
(put-text-property start end 'ddebug-function
'data-debug-insert-process-from-point)
(insert "\n")
(str (format "#<RING: %d, %d max>"
(ring-length ring)
(ring-size ring)))
- (ringthing
- (if (= (ring-length ring) 0) nil (ring-ref ring 0)))
+ ;; (ringthing
+ ;; (if (= (ring-length ring) 0) nil (ring-ref ring 0)))
(tip (format "Ring max-size %d, length %d."
(ring-size ring)
(ring-length ring)))
;; Widgets have a long list of properties
(defun data-debug-insert-widget-properties (widget prefix)
"Insert the contents of WIDGET inserting PREFIX before each element."
- (let ((type (car widget))
+ (let (;; (type (car widget))
(rest (cdr widget)))
(while rest
(data-debug-insert-thing (car (cdr rest))
)
;;; nil thing
-(defun data-debug-insert-nil (thing prefix prebuttontext)
+(defun data-debug-insert-nil (_thing prefix prebuttontext)
"Insert one simple THING with a face.
PREFIX is the text that precedes the button.
PREBUTTONTEXT is some text between prefix and the thing.
(defvar data-debug-mode-map
(let ((km (make-sparse-keymap)))
(suppress-keymap km)
- (define-key km [mouse-2] 'data-debug-expand-or-contract-mouse)
- (define-key km " " 'data-debug-expand-or-contract)
- (define-key km "\C-m" 'data-debug-expand-or-contract)
- (define-key km "n" 'data-debug-next)
- (define-key km "p" 'data-debug-prev)
- (define-key km "N" 'data-debug-next-expando)
- (define-key km "P" 'data-debug-prev-expando)
+ (define-key km [mouse-2] #'data-debug-expand-or-contract-mouse)
+ (define-key km " " #'data-debug-expand-or-contract)
+ (define-key km "\C-m" #'data-debug-expand-or-contract)
+ (define-key km "n" #'data-debug-next)
+ (define-key km "p" #'data-debug-prev)
+ (define-key km "N" #'data-debug-next-expando)
+ (define-key km "P" #'data-debug-prev-expando)
km)
"Keymap used in data-debug.")
(defcustom data-debug-mode-hook nil
"Hook run when data-debug starts."
- :group 'data-debug
:type 'hook)
(define-derived-mode data-debug-mode fundamental-mode "DATA-DEBUG"
nil read-expression-map t
'read-expression-history))
))
- (let ((v (eval expr)))
+ (let ((v (eval expr t)))
(if (not v)
(message "Expression %s is nil." expr)
(data-debug-show-stuff v "expression"))))
(let (result)
(if (null eval-expression-debug-on-error)
- (setq result (values--store-value (eval expr)))
+ (setq result (values--store-value (eval expr t)))
(let ((old-value (make-symbol "t")) new-value)
;; Bind debug-on-error to something unique so that we can
;; detect when evalled code changes it.
(let ((debug-on-error old-value))
- (setq result (values--store-value (eval expr)))
+ (setq result (values--store-value (eval expr t)))
(setq new-value debug-on-error))
;; If evalled code has changed the value of debug-on-error,
;; propagate that change to the global binding.
-;;; ede.el --- Emacs Development Environment gloss
+;;; ede.el --- Emacs Development Environment gloss -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2005, 2007-2021 Free Software Foundation, Inc.
the file, then it is automatically added to that target. If the
value is `ask', then the user is always asked, unless there is no
target willing to take the file. `never' means never perform the check."
- :group 'ede
:type '(choice (const always)
(const multi-ask)
(const ask)
(defcustom ede-debug-program-function 'gdb
"Default Emacs command used to debug a target."
- :group 'ede
:type 'function) ; make this be a list of options some day
(defcustom ede-project-directories nil
that is not listed, Emacs will offer to add it to the list.
Any other value disables searching for EDE project files."
- :group 'ede
:type '(choice (const :tag "Any directory" t)
(repeat :tag "List of directories"
(directory))
\f
;;; Menu and Keymap
+(declare-function ede-speedbar "ede/speedbar" ())
+
(defvar ede-minor-mode-map
(let ((map (make-sparse-keymap))
(pmap (make-sparse-keymap)))
- (define-key pmap "e" 'ede-edit-file-target)
- (define-key pmap "a" 'ede-add-file)
- (define-key pmap "d" 'ede-remove-file)
- (define-key pmap "t" 'ede-new-target)
- (define-key pmap "g" 'ede-rescan-toplevel)
- (define-key pmap "s" 'ede-speedbar)
- (define-key pmap "f" 'ede-find-file)
- (define-key pmap "C" 'ede-compile-project)
- (define-key pmap "c" 'ede-compile-target)
- (define-key pmap "\C-c" 'ede-compile-selected)
- (define-key pmap "D" 'ede-debug-target)
- (define-key pmap "R" 'ede-run-target)
+ (define-key pmap "e" #'ede-edit-file-target)
+ (define-key pmap "a" #'ede-add-file)
+ (define-key pmap "d" #'ede-remove-file)
+ (define-key pmap "t" #'ede-new-target)
+ (define-key pmap "g" #'ede-rescan-toplevel)
+ (define-key pmap "s" #'ede-speedbar)
+ (define-key pmap "f" #'ede-find-file)
+ (define-key pmap "C" #'ede-compile-project)
+ (define-key pmap "c" #'ede-compile-target)
+ (define-key pmap "\C-c" #'ede-compile-selected)
+ (define-key pmap "D" #'ede-debug-target)
+ (define-key pmap "R" #'ede-run-target)
;; bind our submap into map
(define-key map "\C-c." pmap)
map)
If this file is contained, or could be contained in an EDE
controlled project, then this mode is activated automatically
provided `global-ede-mode' is enabled."
- :group 'ede
+ :global nil
(cond ((or (eq major-mode 'dired-mode)
(eq major-mode 'vc-dir-mode))
(ede-dired-minor-mode (if ede-minor-mode 1 -1)))
;; If we fail to have a project here, turn it back off.
(ede-minor-mode -1)))))
+(declare-function ede-directory-project-cons "ede/files" (dir &optional force))
+(declare-function ede-toplevel-project-or-nil "ede/files" (dir))
+
(defun ede-initialize-state-current-buffer ()
"Initialize the current buffer's state for EDE.
Sets buffer local variables for EDE."
;; Init the buffer.
(let* ((ROOT nil)
(proj (ede-directory-get-open-project default-directory
- 'ROOT)))
+ (gv-ref ROOT))))
(when (not proj)
;; If there is no open project, look up the project
(ede-directory-safe-p top)))
;; The project is safe, so load it in.
- (setq proj (ede-load-project-file default-directory projdetect 'ROOT))))))
+ (setq proj (ede-load-project-file default-directory projdetect
+ (gv-ref ROOT)))))))
;; If PROJ is now loaded in, we can initialize our buffer to it.
(when proj
This global minor mode enables `ede-minor-mode' in all buffers in
an EDE controlled project."
:global t
- :group 'ede
(if global-ede-mode
;; Turn on global-ede-mode
(progn
(if semantic-mode
(define-key cedet-menu-map [cedet-menu-separator] '("--")))
- (add-hook 'semanticdb-project-predicate-functions 'ede-directory-project-p)
- (add-hook 'semanticdb-project-root-functions 'ede-toplevel-project-or-nil)
- (add-hook 'ecb-source-path-functions 'ede-ecb-project-paths)
+ (add-hook 'semanticdb-project-predicate-functions #'ede-directory-project-p)
+ (add-hook 'semanticdb-project-root-functions #'ede-toplevel-project-or-nil)
+ (add-hook 'ecb-source-path-functions #'ede-ecb-project-paths)
;; Append our hook to the end. This allows mode-local to finish
;; it's stuff before we start doing misc file loads, etc.
- (add-hook 'find-file-hook 'ede-turn-on-hook t)
- (add-hook 'dired-mode-hook 'ede-turn-on-hook)
- (add-hook 'kill-emacs-hook 'ede-save-cache)
+ (add-hook 'find-file-hook #'ede-turn-on-hook t)
+ (add-hook 'dired-mode-hook #'ede-turn-on-hook)
+ (add-hook 'kill-emacs-hook #'ede-save-cache)
(ede-load-cache)
(ede-reset-all-buffers))
;; Turn off global-ede-mode
(define-key cedet-menu-map [cedet-menu-separator] nil)
- (remove-hook 'semanticdb-project-predicate-functions 'ede-directory-project-p)
- (remove-hook 'semanticdb-project-root-functions 'ede-toplevel-project-or-nil)
- (remove-hook 'ecb-source-path-functions 'ede-ecb-project-paths)
- (remove-hook 'find-file-hook 'ede-turn-on-hook)
- (remove-hook 'dired-mode-hook 'ede-turn-on-hook)
- (remove-hook 'kill-emacs-hook 'ede-save-cache)
+ (remove-hook 'semanticdb-project-predicate-functions #'ede-directory-project-p)
+ (remove-hook 'semanticdb-project-root-functions #'ede-toplevel-project-or-nil)
+ (remove-hook 'ecb-source-path-functions #'ede-ecb-project-paths)
+ (remove-hook 'find-file-hook #'ede-turn-on-hook)
+ (remove-hook 'dired-mode-hook #'ede-turn-on-hook)
+ (remove-hook 'kill-emacs-hook #'ede-save-cache)
(ede-save-cache)
(ede-reset-all-buffers)))
(let ((dead nil))
(dolist (P ede-projects)
(when (not (file-exists-p (oref P file)))
- (add-to-list 'dead P)))
+ (cl-pushnew P dead :test #'equal)))
(dolist (D dead)
(ede-delete-project-from-global-list D))
))
"Project file independent way to read a project in from DIR.
Optional DETECTIN is an autoload cons from `ede-detect-directory-for-project'
which can be passed in to save time.
-Optional ROOTRETURN will return the root project for DIR."
+Optional ROOTRETURN reference will return the root project for DIR."
;; Don't do anything if we are in the process of
;; constructing an EDE object.
;;
(setq o (ede-auto-load-project autoloader toppath))))
;; Return the found root project.
- (when rootreturn (set rootreturn o))
+ (when rootreturn (if (symbolp rootreturn) (set rootreturn o)
+ (setf (gv-deref rootreturn) o)))
;; The project has been found (in the global list) or loaded from
;; disk (via autoloader.) We can now search for the project asked
;;; Integration with project.el
(defun project-try-ede (dir)
+ ;; FIXME: This passes the `ROOT' dynbound variable, but I don't know
+ ;; where it comes from!
(let ((project-dir
(locate-dominating-file
dir
(provide 'ede)
;; Include this last because it depends on ede.
-(require 'ede/files)
+(if t (require 'ede/files)) ;; Don't bother loading it at compile-time.
;; If this does not occur after the provide, we can get a recursive
;; load. Yuck!
-;;; ede/auto.el --- Autoload features for EDE
+;;; ede/auto.el --- Autoload features for EDE -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
;; See if we can do without them.
;; @FIXME - delete from loaddefs to remove this.
-(cl-defmethod ede-project-root ((this ede-project-autoload))
+(cl-defmethod ede-project-root ((_this ede-project-autoload))
"If a project knows its root, return it here.
Allows for one-project-object-for-a-tree type systems."
nil)
;; @FIXME - delete from loaddefs to remove this.
-(cl-defmethod ede-project-root-directory ((this ede-project-autoload) &optional file)
+(cl-defmethod ede-project-root-directory ((_this ede-project-autoload) &optional _file)
"" nil)
(provide 'ede/auto)
-;;; ede/autoconf-edit.el --- Keymap for autoconf
+;;; ede/autoconf-edit.el --- Keymap for autoconf -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2000, 2009-2021 Free Software Foundation, Inc.
-;;; ede/config.el --- Configuration Handler baseclass
+;;; ede/config.el --- Configuration Handler baseclass -*- lexical-binding: t; -*-
;; Copyright (C) 2014-2021 Free Software Foundation, Inc.
(oset config project proj)))
config))
-(cl-defmethod ede-config-setup-configuration ((proj ede-project-with-config) config)
+(cl-defmethod ede-config-setup-configuration ((_proj ede-project-with-config) _config)
"Default configuration setup method."
nil)
(let ((config (ede-config-get-configuration proj t)))
(eieio-customize-object config)))
-(cl-defmethod ede-customize ((target ede-target-with-config))
+(cl-defmethod ede-customize ((_target ede-target-with-config))
"Customize the EDE TARGET by actually configuring the config object."
;; Nothing unique for the targets, use the project.
(ede-customize-project))
"Class to mix into a project with configuration for builds.
This class brings in method overloads for building.")
-(cl-defmethod project-compile-project ((proj ede-project-with-config-build) &optional command)
+(cl-defmethod project-compile-project ((proj ede-project-with-config-build) &optional _command)
"Compile the entire current project PROJ.
Argument COMMAND is the command to use when compiling."
(let* ((config (ede-config-get-configuration proj t))
(comp (oref config build-command)))
(compile comp)))
-(cl-defmethod project-compile-target ((obj ede-target-with-config-build) &optional command)
+(cl-defmethod project-compile-target ((_obj ede-target-with-config-build) &optional command)
"Compile the current target OBJ.
Argument COMMAND is the command to use for compiling the target."
(project-compile-project (ede-current-project) command))
-;;; ede/cpp-root.el --- A simple way to wrap a C++ project with a single root
+;;; ede/cpp-root.el --- A simple way to wrap a C++ project with a single root -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
;; objects is deleted.
(cl-defmethod initialize-instance ((this ede-cpp-root-project)
- &rest fields)
+ &rest _fields)
"Make sure the :file is fully expanded."
;; Add ourselves to the master list
(cl-call-next-method)
;; project, simplifying authoring new single-point projects.
(cl-defmethod ede-find-subproject-for-directory ((proj ede-cpp-root-project)
- dir)
+ _dir)
"Return PROJ, for handling all subdirs below DIR."
proj)
;; Creating new targets on a per directory basis is a good way to keep
;; files organized. See ede-emacs for an example with multiple file
;; types.
-(cl-defmethod ede-find-target ((proj ede-cpp-root-project) buffer)
+(cl-defmethod ede-find-target ((proj ede-cpp-root-project) _buffer)
"Find an EDE target in PROJ for BUFFER.
If one doesn't exist, create a new one for this directory."
(let* ((targets (oref proj targets))
"Get the pre-processor map for project THIS."
(ede-preprocessor-map (ede-target-parent this)))
-(cl-defmethod project-compile-project ((proj ede-cpp-root-project) &optional command)
+(cl-defmethod project-compile-project ((proj ede-cpp-root-project) &optional _command)
"Compile the entire current project PROJ.
Argument COMMAND is the command to use when compiling."
;; we need to be in the proj root dir for this to work
(project-compile-project (oref obj project) command)))
-(cl-defmethod project-rescan ((this ede-cpp-root-project))
+(cl-defmethod project-rescan ((_this ede-cpp-root-project))
"Don't rescan this project from the sources."
(message "cpp-root has nothing to rescan."))
-;;; ede/custom.el --- customization of EDE projects.
+;;; ede/custom.el --- customization of EDE projects. -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
"Create a custom-like buffer for sorting targets of current project."
(interactive)
(let ((proj (ede-current-project))
- (count 1)
- current order)
+ ;; (count 1)
+ ) ;; current order
(switch-to-buffer (get-buffer-create "*EDE sort targets*"))
(erase-buffer)
(setq ede-object-project proj)
(widget-create 'push-button
- :notify (lambda (&rest ignore)
+ :notify (lambda (&rest _ignore)
(let ((targets (oref ede-object-project targets))
cur newtargets)
(while (setq cur (pop ede-project-sort-targets-order))
" Accept ")
(widget-insert " ")
(widget-create 'push-button
- :notify (lambda (&rest ignore)
+ :notify (lambda (&rest _ignore)
(kill-buffer))
" Cancel ")
(widget-insert "\n\n")
(widget-insert " "))
(widget-insert (concat " " (number-to-string (1+ count)) ".: "
(oref (nth (nth count ede-project-sort-targets-order)
- targets) name) "\n"))
+ targets)
+ name)
+ "\n"))
(setq count (1+ count))))))
;;; Customization hooks
;; These two methods should be implemented by subclasses of
;; project and targets in order to account for user specified
;; changes.
-(cl-defmethod eieio-done-customizing ((target ede-target))
+(cl-defmethod eieio-done-customizing ((_target ede-target))
"Call this when a user finishes customizing TARGET."
nil)
-(cl-defmethod ede-commit-project ((proj ede-project))
+(cl-defmethod ede-commit-project ((_proj ede-project))
"Commit any change to PROJ to its file."
nil
)
-;;; ede/detect.el --- EDE project detection and file associations
+;;; ede/detect.el --- EDE project detection and file associations -*- lexical-binding: t; -*-
;; Copyright (C) 2014-2021 Free Software Foundation, Inc.
(defvar ede-dired-keymap
(let ((map (make-sparse-keymap)))
- (define-key map ".a" 'ede-dired-add-to-target)
- (define-key map ".t" 'ede-new-target)
- (define-key map ".s" 'ede-speedbar)
- (define-key map ".C" 'ede-compile-project)
- (define-key map ".d" 'ede-make-dist)
+ (define-key map ".a" #'ede-dired-add-to-target)
+ (define-key map ".t" #'ede-new-target)
+ (define-key map ".s" #'ede-speedbar)
+ (define-key map ".C" #'ede-compile-project)
+ (define-key map ".d" #'ede-make-dist)
(easy-menu-define
ede-dired-menu map "EDE Dired Minor Mode Menu"
-;;; ede/files.el --- Associate projects with files and directories.
+;;; ede/files.el --- Associate projects with files and directories. -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
;; till no ede-project-autoload structure matches.
;;
+(require 'eieio)
(require 'ede)
(declare-function ede-locate-file-in-hash "ede/locate")
(oref this rootproject))
(cl-defmethod ede-project-root-directory ((this ede-project-placeholder)
- &optional file)
+ &optional _file)
"If a project knows its root, return it here.
Allows for one-project-object-for-a-tree type systems.
Optional FILE is the file to test. It is ignored in preference
of the anchor file for the project."
- (let ((root (or (ede-project-root this) this)))
- (file-name-directory (expand-file-name (oref this file)))))
+ ;; (let ((root (or (ede-project-root this) this)))
+ (file-name-directory (expand-file-name (oref this file)))) ;; )
;; Why INODEs?
(defun ede-directory-get-open-project (dir &optional rootreturn)
"Return an already open project that is managing DIR.
-Optional ROOTRETURN specifies a symbol to set to the root project.
+Optional ROOTRETURN specifies a `gv-ref' to set to the root project.
If DIR is the root project, then it is the same."
(let* ((inode (ede--inode-for-dir dir))
(ft (file-name-as-directory (expand-file-name dir)))
;; Default answer is this project
(setq ans proj)
;; Save.
- (when rootreturn (set rootreturn proj))
+ (when rootreturn (if (symbolp rootreturn) (set rootreturn proj)
+ (setf (gv-deref rootreturn) proj)))
;; Find subprojects.
(when (and proj (if ede--disable-inode
(not (string= ft (expand-file-name
(remhash (file-name-as-directory dir) ede-project-directory-hash)
;; Look for all subdirs of D, and remove them.
(let ((match (concat "^" (regexp-quote dir))))
- (maphash (lambda (K O)
+ (maphash (lambda (K _O)
(when (string-match match K)
(remhash K ede-project-directory-hash)))
ede-project-directory-hash)))
(t nil))))
-(defalias 'ede-toplevel-project-or-nil 'ede-toplevel-project)
+(defalias 'ede-toplevel-project-or-nil #'ede-toplevel-project)
;;; DIRECTORY CONVERSION STUFF
;;
ans))
-(cl-defmethod ede-expand-filename-impl ((this ede-project) filename &optional force)
+(cl-defmethod ede-expand-filename-impl ((this ede-project) filename &optional _force)
"Return a fully qualified file name based on project THIS.
FILENAME should be just a filename which occurs in a directory controlled
by this project.
Optional argument FORCE forces the default filename to be provided even if it
doesn't exist."
(let ((loc (ede-get-locator-object this))
- (path (ede-project-root-directory this))
- (proj (oref this subproj))
+ ;; (path (ede-project-root-directory this))
+ ;; (proj (oref this subproj))
(found nil))
;; find it Locally.
(setq found (or (ede-expand-filename-local this filename)
-;;; ede/generic.el --- Base Support for generic build systems
+;;; ede/generic.el --- Base Support for generic build systems -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
)
"User Configuration object for a generic project.")
-(defun ede-generic-load (dir &optional rootproj)
+(defun ede-generic-load (dir &optional _rootproj)
"Return a Generic Project object if there is a match.
Return nil if there isn't one.
Argument DIR is the directory it is created for.
:abstract t)
(cl-defmethod initialize-instance ((this ede-generic-project)
- &rest fields)
+ &rest _fields)
"Make sure the targets slot is bound."
(cl-call-next-method)
(unless (slot-boundp this 'targets)
this)
(cl-defmethod ede-find-subproject-for-directory ((proj ede-generic-project)
- dir)
+ _dir)
"Return PROJ, for handling all subdirs below DIR."
proj)
)
"Generic Project for makefiles.")
-(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config)
+(cl-defmethod ede-generic-setup-configuration ((_proj ede-generic-makefile-project) config)
"Setup a configuration for Make."
(oset config build-command "make -k")
(oset config debug-command "gdb ")
)
"Generic Project for scons.")
-(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-scons-project) config)
+(cl-defmethod ede-generic-setup-configuration ((_proj ede-generic-scons-project) config)
"Setup a configuration for SCONS."
(oset config build-command "scons")
(oset config debug-command "gdb ")
)
"Generic Project for cmake.")
-(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-cmake-project) config)
+(cl-defmethod ede-generic-setup-configuration ((_proj ede-generic-cmake-project) config)
"Setup a configuration for CMake."
(oset config build-command "cmake")
(oset config debug-command "gdb ")
()
"Generic project found via Version Control files.")
-(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-vc-project) config)
+(cl-defmethod ede-generic-setup-configuration ((_proj ede-generic-vc-project) _config)
"Setup a configuration for projects identified by revision control."
- )
+ nil)
(provide 'ede/generic)
-;;; ede/linux.el --- Special project for Linux
+;;; ede/linux.el --- Special project for Linux -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
(defcustom project-linux-build-directory-default 'ask
"Build directory."
:version "24.4"
- :group 'project-linux
:type '(choice (const :tag "Same as source directory" same)
(const :tag "Ask the user" ask)))
(defcustom project-linux-architecture-default 'ask
"Target architecture to assume when not auto-detected."
:version "24.4"
- :group 'project-linux
:type '(choice (string :tag "Architecture name")
(const :tag "Ask the user" ask)))
(defcustom project-linux-compile-target-command (concat ede-make-command " -k -C %s SUBDIRS=%s")
"Default command used to compile a target."
- :group 'project-linux
:type 'string)
(defcustom project-linux-compile-project-command (concat ede-make-command " -k -C %s")
"Default command used to compile a project."
- :group 'project-linux
:type 'string)
(defun ede-linux-version (dir)
-;;; ede/locate.el --- Locate support
+;;; ede/locate.el --- Locate support -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
)
"Baseclass for LOCATE feature in EDE.")
-(cl-defmethod initialize-instance ((loc ede-locate-base) &rest fields)
+(cl-defmethod initialize-instance ((loc ede-locate-base) &rest _fields)
"Make sure we have a hash table."
;; Basic setup.
(cl-call-next-method)
(ede-locate-flush-hash loc)
)
-(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-base))
- root)
+(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-base))
+ _root)
"Is it ok to use this project type under ROOT."
t)
(oset loc lastanswer ans)
ans))
-(cl-defmethod ede-locate-file-in-project-impl ((loc ede-locate-base)
- filesubstring
- )
+(cl-defmethod ede-locate-file-in-project-impl ((_loc ede-locate-base)
+ _filesubstring)
"Locate with LOC occurrences of FILESUBSTRING.
Searches are done under the current root of the EDE project
that created this EDE locate object."
- nil
- )
+ nil)
(cl-defmethod ede-locate-create/update-root-database
- ((loc (subclass ede-locate-base)) root)
+ ((loc (subclass ede-locate-base)) _root)
"Create or update the database for the current project.
You cannot create projects for the baseclass."
(error "Cannot create/update a database of type %S"
Configure the Emacs `locate-program' variable to also
configure the use of EDE locate.")
-(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-locate))
- root)
+(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-locate))
+ _root)
"Is it ok to use this project type under ROOT."
(or (featurep 'locate) (locate-library "locate"))
)
(with-current-buffer b
(setq default-directory cd)
(erase-buffer))
- (apply 'call-process locate-command
+ (apply #'call-process locate-command
nil b nil
searchstr nil)
(with-current-buffer b
variable `cedet-global-command'.")
(cl-defmethod initialize-instance ((loc ede-locate-global)
- &rest slots)
+ &rest _slots)
"Make sure that we can use GNU Global."
(require 'cedet-global)
;; Get ourselves initialized.
(oref loc root))))
)
-(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-global))
- root)
+(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-global))
+ root)
"Is it ok to use this project type under ROOT."
(require 'cedet-global)
(cedet-gnu-global-version-check)
(cedet-gnu-global-expand-filename filesubstring)))
(cl-defmethod ede-locate-create/update-root-database
- ((loc (subclass ede-locate-global)) root)
+ ((_loc (subclass ede-locate-global)) root)
"Create or update the GNU Global database for the current project."
(cedet-gnu-global-create/update-database root))
file name searching variable `cedet-idutils-file-command'.")
(cl-defmethod initialize-instance ((loc ede-locate-idutils)
- &rest slots)
+ &rest _slots)
"Make sure that we can use IDUtils."
;; Get ourselves initialized.
(cl-call-next-method)
(oref loc root)))
)
-(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-idutils))
- root)
+(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-idutils))
+ root)
"Is it ok to use this project type under ROOT."
(require 'cedet-idutils)
(cedet-idutils-version-check)
(cedet-idutils-expand-filename filesubstring)))
(cl-defmethod ede-locate-create/update-root-database
- ((loc (subclass ede-locate-idutils)) root)
+ ((_loc (subclass ede-locate-idutils)) root)
"Create or update the GNU Global database for the current project."
(cedet-idutils-create/update-database root))
file name searching variable `cedet-cscope-file-command'.")
(cl-defmethod initialize-instance ((loc ede-locate-cscope)
- &rest slots)
+ &rest _slots)
"Make sure that we can use Cscope."
;; Get ourselves initialized.
(cl-call-next-method)
(oref loc root)))
)
-(cl-defmethod ede-locate-ok-in-project ((loc (subclass ede-locate-cscope))
- root)
+(cl-defmethod ede-locate-ok-in-project ((_loc (subclass ede-locate-cscope))
+ root)
"Is it ok to use this project type under ROOT."
(require 'cedet-cscope)
(cedet-cscope-version-check)
(cedet-cscope-expand-filename filesubstring)))
(cl-defmethod ede-locate-create/update-root-database
- ((loc (subclass ede-locate-cscope)) root)
+ ((_loc (subclass ede-locate-cscope)) root)
"Create or update the Cscope database for the current project."
(require 'cedet-cscope)
(cedet-cscope-create/update-database root))
-;;; makefile-edit.el --- Makefile editing/scanning commands.
+;;; makefile-edit.el --- Makefile editing/scanning commands. -*- lexical-binding: t; -*-
;; Copyright (C) 2009-2021 Free Software Foundation, Inc.
-;;; ede/pconf.el --- configure.ac maintenance for EDE
+;;; ede/pconf.el --- configure.ac maintenance for EDE -*- lexical-binding: t; -*-
;;; Copyright (C) 1998-2000, 2005, 2008-2021 Free Software Foundation,
;;; Inc.
;;(td (file-name-directory (ede-proj-configure-file this)))
(targs (oref this targets))
(postcmd "")
- (add-missing nil))
+ ) ;; (add-missing nil)
;; First, make sure we have a file.
(if (not (file-exists-p (ede-proj-configure-file this)))
(autoconf-new-program b (oref this name) "Project.ede"))
(ede-map-targets sp #'ede-proj-flush-autoconf)))
(ede-map-all-subprojects
this
- (lambda (sp)
+ (lambda (_sp)
(ede-map-targets this #'ede-proj-tweak-autoconf)))
;; Now save
(save-buffer)
(ede-proj-configure-test-required-file this "README")
(ede-proj-configure-test-required-file this "ChangeLog")
;; Let specific targets get missing files.
- (mapc 'ede-proj-configure-create-missing targs)
+ (mapc #'ede-proj-configure-create-missing targs)
;; Verify that we have a make system.
(if (or (not (ede-expand-filename (ede-toplevel this) "Makefile"))
;; Now is this one of our old Makefiles?
(with-current-buffer
(find-file-noselect
(ede-expand-filename (ede-toplevel this)
- "Makefile" t) t)
+ "Makefile" t)
+ t)
(goto-char (point-min))
;; Here is the unique piece for our makefiles.
(re-search-forward "For use with: make" nil t)))
"Tweak the configure file (current buffer) to accommodate THIS."
;; Check the compilers belonging to THIS, and call the autoconf
;; setup for those compilers.
- (mapc 'ede-proj-tweak-autoconf (ede-proj-compilers this))
- (mapc 'ede-proj-tweak-autoconf (ede-proj-linkers this))
+ (mapc #'ede-proj-tweak-autoconf (ede-proj-compilers this))
+ (mapc #'ede-proj-tweak-autoconf (ede-proj-linkers this))
)
-(cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target))
+(cl-defmethod ede-proj-flush-autoconf ((_this ede-proj-target))
"Flush the configure file (current buffer) to accommodate THIS.
By flushing, remove any cruft that may be in the file. Subsequent
calls to `ede-proj-tweak-autoconf' can restore items removed by flush."
;; @TODO - No-one calls this ???
-(cl-defmethod ede-proj-configure-add-missing ((this ede-proj-target))
+(cl-defmethod ede-proj-configure-add-missing ((_this ede-proj-target))
"Query if any files needed by THIS provided by automake are missing.
Results in --add-missing being passed to automake."
nil)
;; @TODO - No-one implements this yet.
-(cl-defmethod ede-proj-configure-create-missing ((this ede-proj-target))
+(cl-defmethod ede-proj-configure-create-missing ((_this ede-proj-target))
"Add any missing files for THIS by creating them."
nil)
(require 'ede/proj)
(require 'ede/proj-obj)
(require 'ede/proj-comp)
+(require 'seq)
(declare-function ede-srecode-setup "ede/srecode")
(declare-function ede-srecode-insert "ede/srecode")
(let* ((targ (if isdist (oref this targets) mt))
(sp (oref this subproj))
- (df (apply 'append
+ (df (apply #'append
(mapcar (lambda (tg)
(ede-proj-makefile-dependency-files tg))
targ))))
;; Distribution variables
(ede-compiler-begin-unique
- (mapc 'ede-proj-makefile-insert-variables targ))
+ (mapc #'ede-proj-makefile-insert-variables targ))
;; Only add the distribution stuff in when depth != 0
(let ((top (ede-toplevel this))
(tmp this)
(concat ".deps/"
(file-name-nondirectory
(file-name-sans-extension
- f)) ".P"))
+ f))
+ ".P"))
df " "))))
;;
;; Insert ALL Rule
;;
(ede-compiler-begin-unique
(ede-proj-makefile-insert-rules this)
- (mapc 'ede-proj-makefile-insert-rules targ))
+ (mapc #'ede-proj-makefile-insert-rules targ))
;;
;; phony targets for sub projects
;;
- (mapc 'ede-proj-makefile-insert-subproj-rules sp)
+ (mapc #'ede-proj-makefile-insert-subproj-rules sp)
;;
;; Distribution rules such as CLEAN and DIST
;;
;; Distribution variables
(let ((targ (if isdist (oref this targets) mt)))
(ede-compiler-begin-unique
- (mapc 'ede-proj-makefile-insert-automake-pre-variables targ))
+ (mapc #'ede-proj-makefile-insert-automake-pre-variables targ))
(ede-compiler-begin-unique
- (mapc 'ede-proj-makefile-insert-source-variables targ))
+ (mapc #'ede-proj-makefile-insert-source-variables targ))
(ede-compiler-begin-unique
- (mapc 'ede-proj-makefile-insert-automake-post-variables targ))
+ (mapc #'ede-proj-makefile-insert-automake-post-variables targ))
(ede-compiler-begin-unique
(ede-proj-makefile-insert-user-rules this))
(insert "\n# End of Makefile.am\n")
"Return a list of patterns that are considered garbage to THIS.
These are removed with make clean."
(let ((mc (ede-map-targets
- this (lambda (c) (ede-proj-makefile-garbage-patterns c))))
+ this #'ede-proj-makefile-garbage-patterns))
(uniq nil))
- (setq mc (sort (apply 'append mc) 'string<))
+ (setq mc (sort (apply #'append mc) #'string<))
;; Filter out duplicates from the targets.
(while mc
(if (and (car uniq) (string= (car uniq) (car mc)))
(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-project))
"Insert rules needed by THIS target."
- (mapc 'ede-proj-makefile-insert-rules (oref this inference-rules))
+ (mapc #'ede-proj-makefile-insert-rules (oref this inference-rules))
)
(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((this ede-proj-project))
"Insert any symbols that the DIST rule should depend on.
Argument THIS is the project that should insert stuff."
- (mapc 'ede-proj-makefile-insert-dist-dependencies (oref this targets))
+ (mapc #'ede-proj-makefile-insert-dist-dependencies (oref this targets))
)
(cl-defmethod ede-proj-makefile-insert-dist-dependencies ((_this ede-proj-target))
(cl-defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile))
"Insert rules needed by THIS target."
- (mapc 'ede-proj-makefile-insert-rules (oref this rules))
+ (mapc #'ede-proj-makefile-insert-rules (oref this rules))
(let ((c (ede-proj-compilers this)))
(when c
- (mapc 'ede-proj-makefile-insert-rules c)
+ (mapc #'ede-proj-makefile-insert-rules c)
(if (oref this phony)
(insert ".PHONY: " (ede-proj-makefile-target-name this) "\n"))
(insert (ede-proj-makefile-target-name this) ": "
(cl-defmethod ede-proj-makefile-insert-commands ((this ede-proj-target-makefile))
"Insert the commands needed by target THIS.
For targets, insert the commands needed by the chosen compiler."
- (mapc 'ede-proj-makefile-insert-commands (ede-proj-compilers this))
+ (mapc #'ede-proj-makefile-insert-commands (ede-proj-compilers this))
(when (object-assoc t :uselinker (ede-proj-compilers this))
- (mapc 'ede-proj-makefile-insert-commands (ede-proj-linkers this))))
+ (mapc #'ede-proj-makefile-insert-commands (ede-proj-linkers this))))
(cl-defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-project))
This is different from `ede-proj-makefile-insert-rules' in that this
function won't create the building rules which are auto created with
automake."
- (mapc 'ede-proj-makefile-insert-user-rules (oref this inference-rules)))
+ (mapc #'ede-proj-makefile-insert-user-rules (oref this inference-rules)))
(cl-defmethod ede-proj-makefile-insert-user-rules ((this ede-proj-target))
"Insert user specified rules needed by THIS target."
- (mapc 'ede-proj-makefile-insert-rules (oref this rules)))
+ (mapc #'ede-proj-makefile-insert-rules (oref this rules)))
(cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-makefile))
"Return a string representing the dependencies for THIS.
have a list of intermediates (object files), and others don't care.
This allows customization of how these elements appear."
(let* ((c (ede-proj-compilers this))
- (io (eval (cons 'or (mapcar 'ede-compiler-intermediate-objects-p c))))
+ (io (seq-some #'ede-compiler-intermediate-objects-p c))
(out nil))
(if io
(progn
(setq out
(concat out "$(" (ede-compiler-intermediate-object-variable
(car c)
- (ede-proj-makefile-target-name this)) ")")
+ (ede-proj-makefile-target-name this))
+ ")")
c (cdr c)))
out)
(let ((sv (ede-proj-makefile-sourcevar this))
(cl-defmethod ede-proj-makefile-insert-rules ((this ede-compilation-program))
"Insert rules needed for THIS compiler object."
(ede-compiler-only-once this
- (mapc 'ede-proj-makefile-insert-rules (oref this rules))))
+ (mapc #'ede-proj-makefile-insert-rules (oref this rules))))
(cl-defmethod ede-proj-makefile-insert-rules ((this ede-makefile-rule))
"Insert rules needed for THIS rule object."
-;;; ede-proj-elisp.el --- EDE Generic Project Emacs Lisp support
+;;; ede-proj-elisp.el --- EDE Generic Project Emacs Lisp support -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2005, 2007-2021 Free Software Foundation, Inc.
(when preloads
(insert (format "%s: PRELOADS=%s\n"
(oref this name)
- (mapconcat 'identity preloads " ")))))
+ (mapconcat #'identity preloads " ")))))
(insert "\n"))
(cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp))
(utd 0))
(mapc (lambda (src)
(let* ((fsrc (expand-file-name src dir))
- (elc (concat (file-name-sans-extension fsrc) ".elc")))
+ ) ;; (elc (concat (file-name-sans-extension fsrc) ".elc"))
(with-no-warnings
(if (eq (byte-recompile-file fsrc nil 0) t)
(setq comp (1+ comp))
(if (and (slot-boundp this 'versionsource)
(oref this versionsource))
(let ((vs (oref this versionsource))
- (match nil))
+ ) ;; (match nil)
(while vs
(with-current-buffer (find-file-noselect
(ede-expand-filename this (car vs)))
(let ((case-fold-search t))
(if (re-search-forward "-version\\s-+\"\\([^\"]+\\)\"" nil t)
(progn
- (setq match t)
+ ;; (setq match t)
(delete-region (match-beginning 1)
(match-end 1))
(goto-char (match-beginning 1))
If the `compiler' slot is empty, get the car of the compilers list."
(let ((comp (oref obj compiler)))
(if comp
- (if (listp comp)
- (setq comp (mapcar 'symbol-value comp))
- (setq comp (list (symbol-value comp))))
+ (setq comp (if (listp comp)
+ (mapcar #'symbol-value comp)
+ (list (symbol-value comp))))
;; Get the first element from our list of compilers.
- (let ((avail (mapcar 'symbol-value (oref obj availablecompilers))))
+ (let ((avail (mapcar #'symbol-value (oref obj availablecompilers))))
(setq comp (list (car avail)))))
comp))
-(cl-defmethod ede-proj-makefile-insert-source-variables ((this ede-proj-target-elisp-autoloads)
- &optional
- moresource)
+(cl-defmethod ede-proj-makefile-insert-source-variables ((_this ede-proj-target-elisp-autoloads)
+ &optional
+ _moresource)
"Insert the source variables needed by THIS.
Optional argument MORESOURCE is a list of additional sources to add to the
sources variable."
nil)
-(cl-defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-elisp-autoloads))
+(cl-defmethod ede-proj-makefile-sourcevar ((_this ede-proj-target-elisp-autoloads))
"Return the variable name for THIS's sources."
nil) ; "LOADDEFS")
-(cl-defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp-autoloads))
+(cl-defmethod ede-proj-makefile-dependencies ((_this ede-proj-target-elisp-autoloads))
"Return a string representing the dependencies for THIS.
Always return an empty string for an autoloads generator."
"")
(ede-pmake-insert-variable-shared "LOADDEFS"
(insert (oref this autoload-file)))
(ede-pmake-insert-variable-shared "LOADDIRS"
- (insert (mapconcat 'identity
+ (insert (mapconcat #'identity
(or (oref this autoload-dirs) '("."))
" ")))
)
(cl-defmethod project-compile-target ((obj ede-proj-target-elisp-autoloads))
"Create or update the autoload target."
- (require 'cedet-autogen)
+ (require 'cedet-autogen) ;FIXME: We don't have this file!
+ (declare-function cedet-update-autoloads "cedet-autogen")
(let ((default-directory (ede-expand-filename obj ".")))
- (apply 'cedet-update-autoloads
+ (apply #'cedet-update-autoloads
(oref obj autoload-file)
(oref obj autoload-dirs))
))
-(cl-defmethod ede-update-version-in-source ((this ede-proj-target-elisp-autoloads) version)
+(cl-defmethod ede-update-version-in-source ((_this ede-proj-target-elisp-autoloads) _version)
"In a Lisp file, updated a version string for THIS to VERSION.
There are standards in Elisp files specifying how the version string
is found, such as a `-version' variable, or the standard header."
(insert " " (oref this autoload-file))
)
-(cl-defmethod ede-proj-tweak-autoconf ((this ede-proj-target-elisp-autoloads))
+(cl-defmethod ede-proj-tweak-autoconf ((_this ede-proj-target-elisp-autoloads))
"Tweak the configure file (current buffer) to accommodate THIS."
(error "Autoloads not supported in autoconf yet"))
-(cl-defmethod ede-proj-flush-autoconf ((this ede-proj-target-elisp-autoloads))
+(cl-defmethod ede-proj-flush-autoconf ((_this ede-proj-target-elisp-autoloads))
"Flush the configure file (current buffer) to accommodate THIS."
nil)
-;;; ede-proj-info.el --- EDE Generic Project texinfo support
+;;; ede-proj-info.el --- EDE Generic Project texinfo support -*- lexical-binding: t; -*-
;;; Copyright (C) 1998-2001, 2004, 2007-2021 Free Software Foundation,
;;; Inc.
;;; Makefile generation
;;
(cl-defmethod ede-proj-configure-add-missing
- ((this ede-proj-target-makefile-info))
+ ((_this ede-proj-target-makefile-info))
"Query if any files needed by THIS provided by automake are missing.
Results in --add-missing being passed to automake."
(not (ede-expand-filename (ede-toplevel) "texinfo.tex")))
(insert menu))
;; Now insert the rest of the source elsewhere
(ede-pmake-insert-variable-shared sv
- (insert (mapconcat 'identity src " ")))
+ (insert (mapconcat #'identity src " ")))
(if moresource
(error "Texinfo files should not have moresource")))))
-;;; ede/proj-obj.el --- EDE Generic Project Object code generation support
+;;; ede/proj-obj.el --- EDE Generic Project Object code generation support -*- lexical-binding: t; -*-
;;; Copyright (C) 1998-2000, 2005, 2008-2021 Free Software Foundation,
;;; Inc.
(append (oref this source) (oref this auxsource)))
(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-objectcode)
- &optional moresource)
+ &optional _moresource)
"Insert variables needed by target THIS.
Optional argument MORESOURCE is not used."
(let ((ede-proj-objectcode-dodependencies
(oref (ede-target-parent this) automatic-dependencies)))
(cl-call-next-method)))
-(cl-defmethod ede-buffer-header-file((this ede-proj-target-makefile-objectcode)
- buffer)
+(cl-defmethod ede-buffer-header-file ((this ede-proj-target-makefile-objectcode)
+ _buffer)
"There are no default header files."
(or (cl-call-next-method)
;; Ok, nothing obvious. Try looking in ourselves.
-;;; ede-proj-prog.el --- EDE Generic Project program support
+;;; ede-proj-prog.el --- EDE Generic Project program support -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2001, 2005, 2008-2021 Free Software Foundation,
;; Inc.
(cl-defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-program))
"Insert variables needed by the compiler THIS."
(cl-call-next-method)
- (let ((lf (mapconcat 'identity (oref this ldflags) " ")))
+ (let ((lf (mapconcat #'identity (oref this ldflags) " ")))
(with-slots (ldlibs) this
(if ldlibs
(setq lf
- (concat lf " -l" (mapconcat 'identity ldlibs " -l")))))
+ (concat lf " -l" (mapconcat #'identity ldlibs " -l")))))
;; LDFLAGS as needed.
(when (and lf (not (string= "" lf)))
(ede-pmake-insert-variable-once "LDDEPS" (insert lf)))))
-;;; ede-proj-shared.el --- EDE Generic Project shared library support
+;;; ede-proj-shared.el --- EDE Generic Project shared library support -*- lexical-binding: t; -*-
;;; Copyright (C) 1998-2000, 2009-2021 Free Software Foundation, Inc.
)
(cl-defmethod ede-proj-configure-add-missing
- ((this ede-proj-target-makefile-shared-object))
+ ((_this ede-proj-target-makefile-shared-object))
"Query if any files needed by THIS provided by automake are missing.
Results in --add-missing being passed to automake."
(not (and (ede-expand-filename (ede-toplevel) "ltconfig")
(insert (concat "lib" (ede-name this) ".la"))))
(cl-defmethod ede-proj-makefile-insert-automake-post-variables
- ((this ede-proj-target-makefile-shared-object))
+ ((_this ede-proj-target-makefile-shared-object))
"Insert bin_PROGRAMS variables needed by target THIS.
We need to override -program which has an LDADD element."
nil)
-;;; ede/proj.el --- EDE Generic Project file driver
+;;; ede/proj.el --- EDE Generic Project file driver -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2003, 2007-2021 Free Software Foundation, Inc.
(cl-call-next-method)
(ede-proj-save proj))
-(cl-defmethod eieio-done-customizing ((target ede-proj-target))
+(cl-defmethod eieio-done-customizing ((_target ede-proj-target))
"Call this when a user finishes customizing this object.
Argument TARGET is the project we are completing customization on."
(cl-call-next-method)
(object-remove-from-list target 'auxsource (ede-convert-path target file))
(ede-proj-save))
-(cl-defmethod project-update-version ((this ede-proj-project))
+(cl-defmethod project-update-version ((_this ede-proj-project))
"The :version of project THIS has changed."
(ede-proj-save))
(concat (oref this name) "-" (oref this version) ".tar.gz")
))
-(cl-defmethod project-compile-project ((proj ede-proj-project) &optional command)
+(cl-defmethod project-compile-project ((proj ede-proj-project) &optional _command)
"Compile the entire current project PROJ.
Argument COMMAND is the command to use when compiling."
(let ((pm (ede-proj-dist-makefile proj))
;;; Target type specific compilations/debug
;;
-(cl-defmethod project-compile-target ((obj ede-proj-target) &optional command)
+(cl-defmethod project-compile-target ((_obj ede-proj-target) &optional command)
"Compile the current target OBJ.
Argument COMMAND is the command to use for compiling the target."
(project-compile-project (ede-current-project) command))
(cl-defmethod project-compile-target ((obj ede-proj-target-makefile)
- &optional command)
+ &optional _command)
"Compile the current target program OBJ.
Optional argument COMMAND is the s the alternate command to use."
(ede-proj-setup-buildenvironment (ede-current-project))
(if comp
;; Now that we have a pre-set compilers to use, convert tye symbols
;; into objects for ease of use
- (if (listp comp)
- (setq comp (mapcar 'symbol-value comp))
- (setq comp (list (symbol-value comp))))
+ (setq comp (if (listp comp)
+ (mapcar #'symbol-value comp)
+ (list (symbol-value comp))))
(let* ((acomp (oref obj availablecompilers))
- (avail (mapcar 'symbol-value acomp))
+ (avail (mapcar #'symbol-value acomp))
(st (oref obj sourcetype))
(sources (oref obj source)))
;; COMP is not specified, so generate a list from the available
(setq link (list (symbol-value link)))
(error ":linker is not a symbol. Howd you do that?"))
(let* ((alink (oref obj availablelinkers))
- (avail (mapcar 'symbol-value alink))
+ (avail (mapcar #'symbol-value alink))
(st (oref obj sourcetype))
(sources (oref obj source)))
;; LINKER is not specified, so generate a list from the available
-;;; ede/shell.el --- A shell controlled by EDE.
+;;; ede/shell.el --- A shell controlled by EDE. -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2009-2021 Free Software Foundation, Inc.
;;
-;;; ede/simple.el --- Overlay an EDE structure on an existing project
+;;; ede/simple.el --- Overlay an EDE structure on an existing project -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
ede-simple-save-file-name)
))
-(defun ede-simple-load (dir &optional rootproj)
+(defun ede-simple-load (dir &optional _rootproj)
"Load a project of type `Simple' for the directory DIR.
Return nil if there isn't one.
ROOTPROJ is nil, since we will only create a single EDE project here."
(eieio-persistent-save proj))
(cl-defmethod ede-find-subproject-for-directory ((proj ede-simple-project)
- dir)
+ _dir)
"Return PROJ, for handling all subdirs below DIR."
proj)
-;; ede/source.el --- EDE source code object
+;; ede/source.el --- EDE source code object -*- lexical-binding: t; -*-
;; Copyright (C) 2000, 2008-2021 Free Software Foundation, Inc.
;;; Methods
;;
-(cl-defmethod initialize-instance :after ((this ede-sourcecode) &rest fields)
+(cl-defmethod initialize-instance :after ((this ede-sourcecode) &rest _fields)
"Make sure that all ede compiler objects are cached in
`ede-compiler-list'."
(let ((lst ede-sourcecode-list))
-;;; ede/speedbar.el --- Speedbar viewing of EDE projects
+;;; ede/speedbar.el --- Speedbar viewing of EDE projects -*- lexical-binding: t; -*-
;; Copyright (C) 1998-2001, 2003, 2005, 2007-2021 Free Software
;; Foundation, Inc.
(setq ede-speedbar-key-map (speedbar-make-specialized-keymap))
;; General viewing things
- (define-key ede-speedbar-key-map "\C-m" 'speedbar-edit-line)
- (define-key ede-speedbar-key-map "+" 'speedbar-expand-line)
- (define-key ede-speedbar-key-map "=" 'speedbar-expand-line)
- (define-key ede-speedbar-key-map "-" 'speedbar-contract-line)
- (define-key ede-speedbar-key-map " " 'speedbar-toggle-line-expansion)
+ (define-key ede-speedbar-key-map "\C-m" #'speedbar-edit-line)
+ (define-key ede-speedbar-key-map "+" #'speedbar-expand-line)
+ (define-key ede-speedbar-key-map "=" #'speedbar-expand-line)
+ (define-key ede-speedbar-key-map "-" #'speedbar-contract-line)
+ (define-key ede-speedbar-key-map " " #'speedbar-toggle-line-expansion)
;; Some object based things
- (define-key ede-speedbar-key-map "C" 'eieio-speedbar-customize-line)
+ (define-key ede-speedbar-key-map "C" #'eieio-speedbar-customize-line)
;; Some project based things
- (define-key ede-speedbar-key-map "R" 'ede-speedbar-remove-file-from-target)
- (define-key ede-speedbar-key-map "b" 'ede-speedbar-compile-line)
- (define-key ede-speedbar-key-map "B" 'ede-speedbar-compile-project)
- (define-key ede-speedbar-key-map "D" 'ede-speedbar-make-distribution)
- (define-key ede-speedbar-key-map "E" 'ede-speedbar-edit-projectfile)
+ (define-key ede-speedbar-key-map "R" #'ede-speedbar-remove-file-from-target)
+ (define-key ede-speedbar-key-map "b" #'ede-speedbar-compile-line)
+ (define-key ede-speedbar-key-map "B" #'ede-speedbar-compile-project)
+ (define-key ede-speedbar-key-map "D" #'ede-speedbar-make-distribution)
+ (define-key ede-speedbar-key-map "E" #'ede-speedbar-edit-projectfile)
)
(defvar ede-speedbar-menu
(speedbar-get-focus)
)
-(defun ede-speedbar-toplevel-buttons (dir)
+(defun ede-speedbar-toplevel-buttons (_dir)
"Return a list of objects to display in speedbar.
Argument DIR is the directory from which to derive the list of objects."
ede-projects
(setq depth (1- depth)))
(speedbar-line-token))))
-(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-project) &optional depth)
+(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-project) &optional _depth)
"Return the path to OBJ.
Optional DEPTH is the depth we start at."
(file-name-directory (oref obj file))
)
-(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-target) &optional depth)
+(cl-defmethod eieio-speedbar-derive-line-path ((obj ede-target) &optional _depth)
"Return the path to OBJ.
Optional DEPTH is the depth we start at."
(let ((proj (ede-target-parent obj)))
"Provide a speedbar description for OBJ."
(ede-description obj))
-(cl-defmethod eieio-speedbar-child-description ((obj ede-target))
+(cl-defmethod eieio-speedbar-child-description ((_obj ede-target))
"Provide a speedbar description for a plain-child of OBJ.
A plain child is a child element which is not an EIEIO object."
(or (speedbar-item-info-file-helper)
;;; Generic file management for TARGETS
;;
-(defun ede-file-find (text token indent)
+(defun ede-file-find (_text token indent)
"Find the file TEXT at path TOKEN.
INDENT is the current indentation level."
(speedbar-find-file-in-frame
(t (error "Ooops... not sure what to do")))
(speedbar-center-buffer-smartly))
-(defun ede-tag-find (text token indent)
+(defun ede-tag-find (_text token _indent)
"For the tag TEXT in a file TOKEN, goto that position.
INDENT is the current indentation level."
(let ((file (ede-find-nearest-file-line)))
(defvar ede-speedbar-file-menu-additions
'("----"
["Create EDE Target" ede-new-target (ede-current-project) ]
- ["Add to project" ede-speedbar-file-add-to-project (ede-current-project) ]
+ ;; ["Add to project" ede-speedbar-file-add-to-project (ede-current-project) ]
["Compile project" ede-speedbar-compile-project (ede-current-project) ]
- ["Compile file target" ede-speedbar-compile-file-target (ede-current-project) ]
+ ;; ["Compile file target" ede-speedbar-compile-file-target (ede-current-project) ]
["Make distribution" ede-make-dist (ede-current-project) ]
)
"Set of menu items to splice into the speedbar menu.")
(defvar ede-speedbar-file-keymap
(let ((km (make-sparse-keymap)))
- (define-key km "a" 'ede-speedbar-file-add-to-project)
- (define-key km "t" 'ede-new-target)
- (define-key km "s" 'ede-speedbar)
- (define-key km "C" 'ede-speedbar-compile-project)
- (define-key km "c" 'ede-speedbar-compile-file-target)
- (define-key km "d" 'ede-make-dist)
+ ;; (define-key km "a" #'ede-speedbar-file-add-to-project)
+ (define-key km "t" #'ede-new-target)
+ (define-key km "s" #'ede-speedbar)
+ (define-key km "C" #'ede-speedbar-compile-project)
+ ;; (define-key km "c" #'ede-speedbar-compile-file-target)
+ (define-key km "d" #'ede-make-dist)
km)
"Keymap spliced into the speedbar keymap.")
-;;; ede/util.el --- EDE utilities
+;;; ede/util.el --- EDE utilities -*- lexical-binding: t; -*-
;; Copyright (C) 2000, 2005, 2009-2021 Free Software Foundation, Inc.
(put :override-with-args 'lisp-indent-function 1)
(define-obsolete-function-alias 'define-overload
- 'define-overloadable-function "27.1")
+ #'define-overloadable-function "27.1")
(define-obsolete-function-alias 'function-overload-p
#'mode-local--function-overload-p "27.1")
(progn
(overlay-put o 'face (or face 'pulse-highlight-start-face))
(add-hook 'pre-command-hook
- 'pulse-momentary-unhighlight))
+ #'pulse-momentary-unhighlight))
;; Pulse it.
(overlay-put o 'face 'pulse-highlight-face)
;; The pulse function puts FACE onto 'pulse-highlight-face.
(cancel-timer pulse-momentary-timer))
;; Remove this hook.
- (remove-hook 'pre-command-hook 'pulse-momentary-unhighlight))
+ (remove-hook 'pre-command-hook #'pulse-momentary-unhighlight))
;;;###autoload
(defun pulse-momentary-highlight-one-line (point &optional face)
-;;; semantic.el --- Semantic buffer evaluator.
+;;; semantic.el --- Semantic buffer evaluator. -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
'semantic-inhibit-functions)))
;; Make sure that if this buffer is cloned, our tags and overlays
;; don't go along for the ride.
- (add-hook 'clone-indirect-buffer-hook 'semantic-clear-toplevel-cache
+ (add-hook 'clone-indirect-buffer-hook #'semantic-clear-toplevel-cache
nil t)
;; Specify that this function has done its work. At this point
;; we can consider that semantic is active in this buffer.
;; Nuke all semantic overlays. This is faster than deleting based
;; on our data structure.
(let ((l (overlay-lists)))
- (mapc 'semantic-delete-overlay-maybe (car l))
- (mapc 'semantic-delete-overlay-maybe (cdr l))
+ (mapc #'semantic-delete-overlay-maybe (car l))
+ (mapc #'semantic-delete-overlay-maybe (cdr l))
)
(semantic-parse-tree-set-needs-rebuild)
;; Remove this hook which tracks if a buffer is up to date or not.
- (remove-hook 'after-change-functions 'semantic-change-function t)
+ (remove-hook 'after-change-functions #'semantic-change-function t)
(run-hook-with-args 'semantic-after-toplevel-cache-change-hook
semantic--buffer-cache)
;; This is specific to the bovine parser.
(setq-local semantic-bovinate-nonterminal-check-obarray nil)
(semantic-parse-tree-set-up-to-date)
- (add-hook 'after-change-functions 'semantic-change-function nil t)
+ (add-hook 'after-change-functions #'semantic-change-function nil t)
(run-hook-with-args 'semantic-after-toplevel-cache-change-hook
semantic--buffer-cache)
(setq semantic--completion-cache nil)
(defvar semantic-mode-map
(let ((map (make-sparse-keymap)))
;; Key bindings:
- ;; (define-key km "f" 'senator-search-set-tag-class-filter)
- ;; (define-key km "i" 'senator-isearch-toggle-semantic-mode)
- (define-key map "\C-c,j" 'semantic-complete-jump-local)
- (define-key map "\C-c,J" 'semantic-complete-jump)
- (define-key map "\C-c,m" 'semantic-complete-jump-local-members)
- (define-key map "\C-c,g" 'semantic-symref-symbol)
- (define-key map "\C-c,G" 'semantic-symref)
- (define-key map "\C-c,p" 'senator-previous-tag)
- (define-key map "\C-c,n" 'senator-next-tag)
- (define-key map "\C-c,u" 'senator-go-to-up-reference)
- (define-key map "\C-c, " 'semantic-complete-analyze-inline)
- (define-key map "\C-c,\C-w" 'senator-kill-tag)
- (define-key map "\C-c,\M-w" 'senator-copy-tag)
- (define-key map "\C-c,\C-y" 'senator-yank-tag)
- (define-key map "\C-c,r" 'senator-copy-tag-to-register)
- (define-key map "\C-c,," 'semantic-force-refresh)
- (define-key map [?\C-c ?, up] 'senator-transpose-tags-up)
- (define-key map [?\C-c ?, down] 'senator-transpose-tags-down)
- (define-key map "\C-c,l" 'semantic-analyze-possible-completions)
+ ;; (define-key km "f" #'senator-search-set-tag-class-filter)
+ ;; (define-key km "i" #'senator-isearch-toggle-semantic-mode)
+ (define-key map "\C-c,j" #'semantic-complete-jump-local)
+ (define-key map "\C-c,J" #'semantic-complete-jump)
+ (define-key map "\C-c,m" #'semantic-complete-jump-local-members)
+ (define-key map "\C-c,g" #'semantic-symref-symbol)
+ (define-key map "\C-c,G" #'semantic-symref)
+ (define-key map "\C-c,p" #'senator-previous-tag)
+ (define-key map "\C-c,n" #'senator-next-tag)
+ (define-key map "\C-c,u" #'senator-go-to-up-reference)
+ (define-key map "\C-c, " #'semantic-complete-analyze-inline)
+ (define-key map "\C-c,\C-w" #'senator-kill-tag)
+ (define-key map "\C-c,\M-w" #'senator-copy-tag)
+ (define-key map "\C-c,\C-y" #'senator-yank-tag)
+ (define-key map "\C-c,r" #'senator-copy-tag-to-register)
+ (define-key map "\C-c,," #'semantic-force-refresh)
+ (define-key map [?\C-c ?, up] #'senator-transpose-tags-up)
+ (define-key map [?\C-c ?, down] #'senator-transpose-tags-down)
+ (define-key map "\C-c,l" #'semantic-analyze-possible-completions)
;; This hack avoids showing the CEDET menu twice if ede-minor-mode
;; and Semantic are both enabled. Is there a better way?
(define-key map [menu-bar cedet-menu]
(file-exists-p semanticdb-default-system-save-directory))
(require 'semantic/db-ebrowse)
(semanticdb-load-ebrowse-caches)))
- (add-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
+ (add-hook 'mode-local-init-hook #'semantic-new-buffer-fcn)
;; Add semantic-ia-complete-symbol to
;; completion-at-point-functions, so that it is run from
;; M-TAB.
;; Note: The first entry added is the last entry run, so the
;; most specific entry should be last.
(add-hook 'completion-at-point-functions
- 'semantic-analyze-nolongprefix-completion-at-point-function)
+ #'semantic-analyze-nolongprefix-completion-at-point-function)
(add-hook 'completion-at-point-functions
- 'semantic-analyze-notc-completion-at-point-function)
+ #'semantic-analyze-notc-completion-at-point-function)
(add-hook 'completion-at-point-functions
- 'semantic-analyze-completion-at-point-function)
+ #'semantic-analyze-completion-at-point-function)
(if (bound-and-true-p global-ede-mode)
(define-key cedet-menu-map [cedet-menu-separator] '("--")))
;; introduced in the buffer is pretty much futile, but we have to
;; clean the hooks and delete Semantic-related overlays, so that
;; Semantic can be re-activated cleanly.
- (remove-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
+ (remove-hook 'mode-local-init-hook #'semantic-new-buffer-fcn)
(remove-hook 'completion-at-point-functions
- 'semantic-analyze-completion-at-point-function)
+ #'semantic-analyze-completion-at-point-function)
(remove-hook 'completion-at-point-functions
- 'semantic-analyze-notc-completion-at-point-function)
+ #'semantic-analyze-notc-completion-at-point-function)
(remove-hook 'completion-at-point-functions
- 'semantic-analyze-nolongprefix-completion-at-point-function)
+ #'semantic-analyze-nolongprefix-completion-at-point-function)
(remove-hook 'after-change-functions
- 'semantic-change-function)
+ #'semantic-change-function)
(define-key cedet-menu-map [cedet-menu-separator] nil)
(define-key cedet-menu-map [semantic-options-separator] nil)
;; FIXME: handle semanticdb-load-ebrowse-caches
(dolist (mode semantic-submode-list)
- (if (and (boundp mode) (eval mode))
+ (if (and (boundp mode) (symbol-value mode))
(funcall mode -1)))
;; Unlink buffer and clear cache
(semantic--tag-unlink-cache-from-buffer)