summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-10-15 22:54:01 +0200
committerUlrich Müller <ulm@gentoo.org>2023-10-23 19:59:14 +0200
commit2540d721ab2de31dc2ceb80516ae4a49016dcbbd (patch)
treecc07f28fe2fda0be65c6433aee3e2a0edaa2f0d8
parentReplace unnecessary backquotes by normal quotes (diff)
downloadebuild-mode-2540d721ab2de31dc2ceb80516ae4a49016dcbbd.tar.gz
ebuild-mode-2540d721ab2de31dc2ceb80516ae4a49016dcbbd.tar.bz2
ebuild-mode-2540d721ab2de31dc2ceb80516ae4a49016dcbbd.zip
Use #' for quoting of function names
* ebuild-mode.el: * gentoo-newsitem-mode.el: * glep-mode.el: * devbook-mode.el: Sharp-quote all function names. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--ChangeLog5
-rw-r--r--devbook-mode.el3
-rw-r--r--ebuild-mode.el82
-rw-r--r--gentoo-newsitem-mode.el4
-rw-r--r--glep-mode.el19
5 files changed, 60 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index 09b138d..f878b5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2023-10-15 Ulrich Müller <ulm@gentoo.org>
+ * ebuild-mode.el:
+ * gentoo-newsitem-mode.el:
+ * glep-mode.el:
+ * devbook-mode.el: Sharp-quote all function names.
+
* ebuild-mode.el (ebuild-repo-mode-menu):
* gentoo-newsitem-mode.el (gentoo-newsitem-mode-menu):
* glep-mode.el (glep-mode-menu):
diff --git a/devbook-mode.el b/devbook-mode.el
index 33790da..40831d3 100644
--- a/devbook-mode.el
+++ b/devbook-mode.el
@@ -61,8 +61,7 @@
"</chapter>\n"
"</guide>\n")
-(define-key devbook-mode-map
- "\C-c\C-n" 'devbook-insert-skeleton)
+(define-key devbook-mode-map "\C-c\C-n" #'devbook-insert-skeleton)
(easy-menu-define devbook-mode-menu devbook-mode-map
"Menu for `devbook-mode'."
diff --git a/ebuild-mode.el b/ebuild-mode.el
index 7174255..c288512 100644
--- a/ebuild-mode.el
+++ b/ebuild-mode.el
@@ -132,7 +132,7 @@ Returns non-nil if A is less than B by Gentoo keyword ordering."
(concat ebuild-mode-portdir "/profiles/arch.list"))
(while (re-search-forward "#.*$" nil t)
(replace-match ""))
- (sort (split-string (buffer-string)) 'ebuild-mode-arch-lessp))
+ (sort (split-string (buffer-string)) #'ebuild-mode-arch-lessp))
(file-error nil))
;; could not read architectures from repository, so fall back to default
'("alpha" "amd64" "arm" "arm64" "hppa" "ia64" "loong" "m68k" "mips"
@@ -154,7 +154,7 @@ Returns non-nil if A is less than B by Gentoo keyword ordering."
(and (not (member arch archs))
(member arch ebuild-mode-arch-list)
(setq archs (cons arch archs))))
- (sort archs 'ebuild-mode-arch-lessp)))
+ (sort archs #'ebuild-mode-arch-lessp)))
(file-error nil))
(condition-case nil
(with-temp-buffer
@@ -168,7 +168,7 @@ Returns non-nil if A is less than B by Gentoo keyword ordering."
(and (not (member arch archs))
(member arch ebuild-mode-arch-list)
(setq archs (cons arch archs))))
- (sort archs 'ebuild-mode-arch-lessp)))
+ (sort archs #'ebuild-mode-arch-lessp)))
(file-error nil))
;; fall back to list of all architectures
ebuild-mode-arch-list)
@@ -310,7 +310,7 @@ of the elements."
Calls `format-time-string' (which see) for the UTC time zone.
Compatibility function for XEmacs."
(if (and (featurep 'xemacs)
- (not (function-allows-args 'format-time-string 3)))
+ (not (function-allows-args #'format-time-string 3)))
;; format-time-string in older XEmacs versions can take only two
;; arguments. Version 21.5.35 still doesn't support a time zone
;; as third argument, but accepts non-nil to mean Universal Time.
@@ -429,7 +429,7 @@ Compatibility function for XEmacs."
"Add `ebuild-mode' font-lock keywords for the current buffer."
(font-lock-add-keywords nil ebuild-mode-font-lock-keywords))
-(add-hook 'ebuild-mode-hook 'ebuild-mode-add-font-lock)
+(add-hook 'ebuild-mode-hook #'ebuild-mode-add-font-lock)
;;; Run ebuild command.
@@ -446,7 +446,7 @@ If nil, `compilation-mode' will be used.")
(interactive
(list
(completing-read "Run ebuild command(s): "
- 'ebuild-mode-ebuild-cmd-complete
+ #'ebuild-mode-ebuild-cmd-complete
nil nil nil 'ebuild-mode-ebuild-history)))
(or buffer-file-name
(error "No file for this buffer"))
@@ -467,19 +467,19 @@ Emacs version supports it). Variable `ansi-color-for-compilation-mode'
must be non-nil for this to have any effect."
(if (fboundp 'ansi-color-compilation-filter)
(add-hook 'compilation-filter-hook
- 'ansi-color-compilation-filter nil t)))
+ #'ansi-color-compilation-filter nil t)))
(defun ebuild-mode-get-completion-function (mode)
"Get completion function for completion mode MODE."
- (cond ((null mode) 'try-completion)
- ((eq mode t) 'all-completions)
+ (cond ((null mode) #'try-completion)
+ ((eq mode t) #'all-completions)
((eq mode 'lambda)
(if (fboundp 'test-completion)
- 'test-completion
+ #'test-completion
;; XEmacs 21.4 doesn't have test-completion
(lambda (&rest args)
- (eq (apply 'try-completion args) t))))
- (t 'ignore)))
+ (eq (apply #'try-completion args) t))))
+ (t #'ignore)))
(defun ebuild-mode-ebuild-cmd-complete (s predicate mode)
"Completion function for ebuild command.
@@ -529,7 +529,7 @@ an explanation of arguments S, PREDICATE and MODE."
Like `compile', but with autocompletion for pkgdev."
(interactive
(list (completing-read "Run pkgdev command: "
- 'ebuild-mode-command-complete
+ #'ebuild-mode-command-complete
nil nil "pkgdev "
'ebuild-mode-pkgdev-history)))
(let ((process-environment (append ebuild-mode-process-environment
@@ -544,7 +544,7 @@ Like `compile', but with autocompletion for pkgdev."
Like `compile', but with autocompletion for pkgcheck."
(interactive
(list (completing-read "Run pkgcheck command: "
- 'ebuild-mode-command-complete
+ #'ebuild-mode-command-complete
nil nil "pkgcheck "
'ebuild-mode-pkgcheck-history)))
(let ((process-environment (append ebuild-mode-process-environment
@@ -652,7 +652,7 @@ optional second argument NOERROR is non-nil."
;; add keyword
(t (setq keywords (cons k keywords))))))
(ebuild-mode-put-keywords
- (sort keywords 'ebuild-mode-arch-lessp))))
+ (sort keywords #'ebuild-mode-arch-lessp))))
(defun ebuild-mode-keyword (action arch)
"Keyword manipulation.
@@ -664,7 +664,7 @@ architecture from `ebuild-mode-arch-list'."
nil t nil nil "unstable")
ebuild-mode-action-alist))
(completing-read "Architecture: "
- (mapcar 'list
+ (mapcar #'list
(append '("all" "*") ebuild-mode-arch-list))
nil t)))
(ebuild-mode-modify-keywords (list (cons arch action))))
@@ -684,7 +684,7 @@ and `all-completions' for details."
(c2 (funcall
(ebuild-mode-get-completion-function mode)
s2
- (mapcar 'list
+ (mapcar #'list
(if (string-equal s2 "")
'("" "~" "-" "^")
(string-match "^[-^~]?" s2)
@@ -704,7 +704,7 @@ and `all-completions' for details."
KEYWORDS is a whitespace separated string containing the keywords
that shall be manipulated."
(interactive
- (list (completing-read "Keywords: " 'ebuild-mode-ekeyword-complete)))
+ (list (completing-read "Keywords: " #'ebuild-mode-ekeyword-complete)))
(ebuild-mode-modify-keywords
(mapcar (lambda (s)
(string-match "^\\([-^~]?\\)\\(.*\\)" s)
@@ -729,25 +729,25 @@ that shall be manipulated."
"\n"
"EAPI="
(completing-read
- "EAPI: " (mapcar 'list ebuild-mode-eapi-list)
+ "EAPI: " (mapcar #'list ebuild-mode-eapi-list)
nil nil (car (last ebuild-mode-eapi-list))) ; default to most recent EAPI
"\n"
"\n"
;; inherited eclasses
"inherit "
((completing-read "Eclass (null string to terminate): "
- (mapcar 'list ebuild-mode-eclasses))
+ (mapcar #'list ebuild-mode-eclasses))
str & " ")
& -1 & "\n\n" | -8
;; first variables block
"DESCRIPTION=\"" (skeleton-read "Description: ") "\"\n"
"HOMEPAGE=\""
(completing-read "Homepage: "
- (mapcar 'list ebuild-mode-protocols-homepage))
+ (mapcar #'list ebuild-mode-protocols-homepage))
"\"\n"
"SRC_URI=\""
(completing-read "Source URI: "
- (mapcar 'list ebuild-mode-protocols-src_uri))
+ (mapcar #'list ebuild-mode-protocols-src_uri))
"\"\n"
"S=\""
(completing-read "S (null string for default): "
@@ -757,7 +757,7 @@ that shall be manipulated."
;; second variables block
"LICENSE=\""
((completing-read "License (null string to terminate): "
- (mapcar 'list ebuild-mode-licenses))
+ (mapcar #'list ebuild-mode-licenses))
str & " ")
& -1 "\"\n"
"SLOT=\"0\"\n"
@@ -766,17 +766,17 @@ that shall be manipulated."
"Keyword (null string to terminate): "
(nconc
(mapcar (lambda (x) (list (concat "~" x))) ebuild-mode-arch-list)
- (mapcar 'list ebuild-mode-arch-stable-list)))
+ (mapcar #'list ebuild-mode-arch-stable-list)))
str & " ")
& -1 "\"\n"
"IUSE=\""
((completing-read "USE flag (null string to terminate): "
- (mapcar 'list ebuild-mode-use-flags))
+ (mapcar #'list ebuild-mode-use-flags))
str & " ")
& -1 & "\"\n" | -6
"RESTRICT=\""
((completing-read "RESTRICT (null string to terminate): "
- (mapcar 'list ebuild-mode-restrict-list))
+ (mapcar #'list ebuild-mode-restrict-list))
str & " ")
& -1 & "\"\n" | -10
"\n"
@@ -831,10 +831,12 @@ for the format of the tag line.")
;; utf-8-unix doesn't exist in XEmacs 21.4
(setq buffer-file-coding-system 'utf-8-unix))
(if (not (featurep 'xemacs))
- (add-hook 'write-contents-functions 'ebuild-repo-mode-before-save t t)
+ (add-hook 'write-contents-functions
+ #'ebuild-repo-mode-before-save t t)
;; make-local-hook gives a byte-compiler warning in GNU Emacs
(make-local-hook 'write-contents-hooks)
- (add-hook 'write-contents-hooks 'ebuild-repo-mode-before-save t t))
+ (add-hook 'write-contents-hooks
+ #'ebuild-repo-mode-before-save t t))
(unless (local-variable-p 'fill-column (current-buffer)) ; XEmacs wants 2 args
(setq fill-column 72))
(unless (local-variable-p 'tab-width (current-buffer))
@@ -887,15 +889,15 @@ in a Gentoo profile."
;;; Keybindings.
;; sh-mode already uses the following C-c C-<letter> keys: cfilorstuwx
-(define-key ebuild-mode-map "\C-c\C-e" 'ebuild-run-command)
-(define-key ebuild-mode-map "\C-c\C-p" 'ebuild-mode-run-pkgdev)
-(define-key ebuild-mode-map "\C-c\C-q" 'ebuild-mode-run-pkgcheck)
-(define-key ebuild-mode-map "\C-c\C-d" 'ebuild-mode-find-workdir)
-(define-key ebuild-mode-map "\C-c\C-k" 'ebuild-mode-keyword)
-(define-key ebuild-mode-map "\C-c\C-y" 'ebuild-mode-ekeyword)
-(define-key ebuild-mode-map "\C-c\C-b" 'ebuild-mode-all-keywords-unstable)
-(define-key ebuild-mode-map "\C-c\C-n" 'ebuild-mode-insert-skeleton)
-(define-key ebuild-repo-mode-map "\C-c-" 'ebuild-mode-insert-tag-line)
+(define-key ebuild-mode-map "\C-c\C-e" #'ebuild-run-command)
+(define-key ebuild-mode-map "\C-c\C-p" #'ebuild-mode-run-pkgdev)
+(define-key ebuild-mode-map "\C-c\C-q" #'ebuild-mode-run-pkgcheck)
+(define-key ebuild-mode-map "\C-c\C-d" #'ebuild-mode-find-workdir)
+(define-key ebuild-mode-map "\C-c\C-k" #'ebuild-mode-keyword)
+(define-key ebuild-mode-map "\C-c\C-y" #'ebuild-mode-ekeyword)
+(define-key ebuild-mode-map "\C-c\C-b" #'ebuild-mode-all-keywords-unstable)
+(define-key ebuild-mode-map "\C-c\C-n" #'ebuild-mode-insert-skeleton)
+(define-key ebuild-repo-mode-map "\C-c-" #'ebuild-mode-insert-tag-line)
;; Menu support for both Emacs and XEmacs.
(easy-menu-define ebuild-mode-menu ebuild-mode-map
@@ -903,8 +905,8 @@ in a Gentoo profile."
`("Ebuild"
("ebuild commands"
["Run ebuild command" ebuild-run-command]
- ,@(mapcar (lambda (c) (vector c (list 'ebuild-run-command c)))
- (sort (copy-sequence ebuild-commands-list) 'string-lessp)))
+ ,@(mapcar (lambda (c) (vector c (list #'ebuild-run-command c)))
+ (sort (copy-sequence ebuild-commands-list) #'string-lessp)))
["Run pkgdev command" ebuild-mode-run-pkgdev]
["Run pkgcheck command" ebuild-mode-run-pkgcheck]
["Find Portage workdir" ebuild-mode-find-workdir]
@@ -945,7 +947,7 @@ in a Gentoo profile."
(add-hook
;; XEmacs 21.5 doesn't have find-file-hook
(if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks)
- 'ebuild-repo-mode-maybe-enable)
+ #'ebuild-repo-mode-maybe-enable)
(provide 'ebuild-mode)
diff --git a/gentoo-newsitem-mode.el b/gentoo-newsitem-mode.el
index 6980b98..68a5e0d 100644
--- a/gentoo-newsitem-mode.el
+++ b/gentoo-newsitem-mode.el
@@ -80,7 +80,7 @@
"News-Item-Format: "
(setq v1 (completing-read
"News-Item-Format: "
- (mapcar 'list gentoo-newsitem-format-list) nil 'confirm
+ (mapcar #'list gentoo-newsitem-format-list) nil 'confirm
nil nil (car (last gentoo-newsitem-format-list))))
"\n"
(if (string-equal v1 "1.0")
@@ -99,7 +99,7 @@
(define-key gentoo-newsitem-mode-map
- "\C-c\C-n" 'gentoo-newsitem-insert-skeleton)
+ "\C-c\C-n" #'gentoo-newsitem-insert-skeleton)
(easy-menu-define gentoo-newsitem-mode-menu gentoo-newsitem-mode-map
"Menu for `gentoo-newsitem-mode'."
diff --git a/glep-mode.el b/glep-mode.el
index a070937..0c8f12b 100644
--- a/glep-mode.el
+++ b/glep-mode.el
@@ -93,8 +93,8 @@ For efficiency only. Unlimited if nil.")
(setq fill-column 70)
(set (make-local-variable 'sentence-end-double-space) t)
(add-hook 'font-lock-extend-region-functions
- 'glep-mode-font-lock-extend-region t)
- (add-hook 'write-contents-functions 'glep-mode-before-save t t))
+ #'glep-mode-font-lock-extend-region t)
+ (add-hook 'write-contents-functions #'glep-mode-before-save t t))
(defun glep-mode-add-font-lock ()
"Add `glep-mode' font-lock keywords for the current buffer."
@@ -104,7 +104,7 @@ For efficiency only. Unlimited if nil.")
(glep-mode-font-lock-match-preamble
. ,font-lock-keyword-face))))
-(add-hook 'glep-mode-hook 'glep-mode-add-font-lock)
+(add-hook 'glep-mode-hook #'glep-mode-add-font-lock)
(defun glep-mode-preamble-bounds ()
"Return list with begin and end of the preamble, or nil if none found."
@@ -166,7 +166,8 @@ to `font-lock-end'."
(not (and (eq major-mode 'glep-mode)
(glep-mode-in-preamble-p end))))
-(advice-add 'rst-classify-adornment :before-while #'glep-mode-ignore-preamble)
+(advice-add 'rst-classify-adornment
+ :before-while #'glep-mode-ignore-preamble)
;;; Generate HTML from GLEP.
@@ -214,14 +215,14 @@ Calls the external \"glep\" command."
"Type: "
(completing-read
"Type (TAB for completion): "
- (mapcar 'list '("Informational" "Standards Track"))
+ (mapcar #'list '("Informational" "Standards Track"))
nil 'confirm)
"\n"
"Status: "
(completing-read
"Status (TAB for completion): "
- (mapcar 'list '("Draft" "Active" "Accepted" "Deferred" "Withdrawn"
- "Rejected" "Final" "Replaced" "Moribund"))
+ (mapcar #'list '("Draft" "Active" "Accepted" "Deferred" "Withdrawn"
+ "Rejected" "Final" "Replaced" "Moribund"))
nil 'confirm "Draft")
"\n"
"Version: " (skeleton-read "Version: " "1") "\n"
@@ -375,8 +376,8 @@ https://creativecommons.org/licenses/by-sa/4.0/.
")
;; rst-mode already uses the following C-c C-<letter> keys: aclrt
-(define-key glep-mode-map "\C-c\C-n" 'glep-mode-insert-skeleton)
-(define-key glep-mode-map "\C-c\C-f" 'glep-mode-format-html)
+(define-key glep-mode-map "\C-c\C-n" #'glep-mode-insert-skeleton)
+(define-key glep-mode-map "\C-c\C-f" #'glep-mode-format-html)
(easy-menu-define glep-mode-menu glep-mode-map
"Menu for `glep-mode'."