summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic/decorate
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cedet/semantic/decorate')
-rw-r--r--lisp/cedet/semantic/decorate/include.el16
-rw-r--r--lisp/cedet/semantic/decorate/mode.el30
2 files changed, 22 insertions, 24 deletions
diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el
index ee7fad1fc5f..a3bf4e252f7 100644
--- a/lisp/cedet/semantic/decorate/include.el
+++ b/lisp/cedet/semantic/decorate/include.el
@@ -1,4 +1,4 @@
-;;; semantic/decorate/include.el --- Decoration modes for include statements
+;;; semantic/decorate/include.el --- Decoration modes for include statements -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
@@ -55,7 +55,7 @@ Used by the decoration style: `semantic-decoration-on-includes'."
(defvar semantic-decoration-on-include-map
(let ((km (make-sparse-keymap)))
- (define-key km semantic-decoration-mouse-3 'semantic-decoration-include-menu)
+ (define-key km semantic-decoration-mouse-3 #'semantic-decoration-include-menu)
km)
"Keymap used on includes.")
@@ -114,7 +114,7 @@ Used by the decoration style: `semantic-decoration-on-unknown-includes'."
(defvar semantic-decoration-on-unknown-include-map
(let ((km (make-sparse-keymap)))
;(define-key km [ mouse-2 ] 'semantic-decoration-unknown-include-describe)
- (define-key km semantic-decoration-mouse-3 'semantic-decoration-unknown-include-menu)
+ (define-key km semantic-decoration-mouse-3 #'semantic-decoration-unknown-include-menu)
km)
"Keymap used on unparsed includes.")
@@ -169,7 +169,7 @@ Used by the decoration style: `semantic-decoration-on-fileless-includes'."
(defvar semantic-decoration-on-fileless-include-map
(let ((km (make-sparse-keymap)))
;(define-key km [ mouse-2 ] 'semantic-decoration-fileless-include-describe)
- (define-key km semantic-decoration-mouse-3 'semantic-decoration-fileless-include-menu)
+ (define-key km semantic-decoration-mouse-3 #'semantic-decoration-fileless-include-menu)
km)
"Keymap used on unparsed includes.")
@@ -223,7 +223,7 @@ Used by the decoration style: `semantic-decoration-on-unparsed-includes'."
(defvar semantic-decoration-on-unparsed-include-map
(let ((km (make-sparse-keymap)))
- (define-key km semantic-decoration-mouse-3 'semantic-decoration-unparsed-include-menu)
+ (define-key km semantic-decoration-mouse-3 #'semantic-decoration-unparsed-include-menu)
km)
"Keymap used on unparsed includes.")
@@ -535,7 +535,7 @@ Argument EVENT is the mouse clicked event."
(interactive)
(let* ((tag (semantic-current-tag))
(table (semanticdb-find-table-for-include tag (current-buffer)))
- (mm major-mode))
+ ) ;; (mm major-mode)
(with-output-to-temp-buffer (help-buffer) ; "*Help*"
(help-setup-xref (list #'semantic-decoration-fileless-include-describe)
(called-interactively-p 'interactive))
@@ -793,7 +793,7 @@ any decorated referring includes.")
(let ((table (oref obj table)))
;; This is a hack. Add in something better?
(semanticdb-notify-references
- table (lambda (tab me)
+ table (lambda (tab _me)
(semantic-decoration-unparsed-include-refrence-reset tab)
))
))
@@ -805,7 +805,7 @@ any decorated referring includes.")
(semantic-reset cache)))
(cl-defmethod semanticdb-synchronize ((cache semantic-decoration-unparsed-include-cache)
- new-tags)
+ _new-tags)
"Synchronize a CACHE with some NEW-TAGS."
(semantic-reset cache))
diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el
index 884b066d77f..c6bf15205fd 100644
--- a/lisp/cedet/semantic/decorate/mode.el
+++ b/lisp/cedet/semantic/decorate/mode.el
@@ -1,4 +1,4 @@
-;;; semantic/decorate/mode.el --- Minor mode for decorating tags
+;;; semantic/decorate/mode.el --- Minor mode for decorating tags -*- lexical-binding: t; -*-
;; Copyright (C) 2000-2005, 2007-2021 Free Software Foundation, Inc.
@@ -254,7 +254,7 @@ available and the current buffer was set up for parsing. Return
non-nil if the minor mode is enabled."
;;
;;\\{semantic-decoration-map}"
- nil nil nil
+ :lighter nil
(if semantic-decoration-mode
(if (not (and (featurep 'semantic) (semantic-active-p)))
(progn
@@ -264,9 +264,9 @@ non-nil if the minor mode is enabled."
(buffer-name)))
;; Add hooks
(add-hook 'semantic-after-partial-cache-change-hook
- 'semantic-decorate-tags-after-partial-reparse nil t)
+ #'semantic-decorate-tags-after-partial-reparse nil t)
(add-hook 'semantic-after-toplevel-cache-change-hook
- 'semantic-decorate-tags-after-full-reparse nil t)
+ #'semantic-decorate-tags-after-full-reparse nil t)
;; Add decorations to available tags. The above hooks ensure
;; that new tags will be decorated when they become available.
;; However, don't do this immediately, because EDE will be
@@ -282,9 +282,9 @@ non-nil if the minor mode is enabled."
(semantic-decorate-flush-decorations)
;; Remove hooks
(remove-hook 'semantic-after-partial-cache-change-hook
- 'semantic-decorate-tags-after-partial-reparse t)
+ #'semantic-decorate-tags-after-partial-reparse t)
(remove-hook 'semantic-after-toplevel-cache-change-hook
- 'semantic-decorate-tags-after-full-reparse t)))
+ #'semantic-decorate-tags-after-full-reparse t)))
(semantic-add-minor-mode 'semantic-decoration-mode
"")
@@ -350,20 +350,18 @@ Return non-nil if the decoration style is enabled."
(defun semantic-decoration-build-style-menu (style)
"Build a menu item for controlling a specific decoration STYLE."
- (vector (car style)
- `(lambda () (interactive)
- (semantic-toggle-decoration-style
- ,(car style)))
- :style 'toggle
- :selected `(semantic-decoration-style-enabled-p ,(car style))
- ))
-
-(defun semantic-build-decoration-mode-menu (&rest ignore)
+ (let ((s (car style)))
+ (vector s
+ (lambda () (interactive) (semantic-toggle-decoration-style s))
+ :style 'toggle
+ :selected `(semantic-decoration-style-enabled-p ',s))))
+
+(defun semantic-build-decoration-mode-menu (&rest _ignore)
"Create a menu listing all the known decorations for toggling.
IGNORE any input arguments."
(or semantic-decoration-menu-cache
(setq semantic-decoration-menu-cache
- (mapcar 'semantic-decoration-build-style-menu
+ (mapcar #'semantic-decoration-build-style-menu
(reverse semantic-decoration-styles))
)))