* admin/admin.el: Use lexical-binding.
(manual-misc-manuals): Pass a limit to `looking-back`.
(reminder-for-release-blocking-bugs): Don't use `_` for a real variable.
* admin/authors.el: Use lexical-binding.
(authors-disambiguate-file-name): Remove unused var `parent`.
* admin/cus-test.el:
* admin/find-gc.el:
* admin/gitmerge.el: Use lexical-binding.
-;;; admin.el --- utilities for Emacs administration
+;;; admin.el --- utilities for Emacs administration -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
(search-forward "INFO_COMMON = ")
(let ((start (point)))
(end-of-line)
- (while (and (looking-back "\\\\")
+ (while (and (looking-back "\\\\" (- (point) 2))
(zerop (forward-line 1)))
(end-of-line))
(append (split-string (replace-regexp-in-string
(interactive
(list (progn
(require 'debbugs-gnu)
+ (defvar debbugs-gnu-emacs-blocking-reports)
+ (defvar debbugs-gnu-emacs-current-release)
(completing-read
"Emacs release: "
(mapcar #'identity debbugs-gnu-emacs-blocking-reports)
nil t debbugs-gnu-emacs-current-release))))
(require 'debbugs-gnu)
+ (declare-function debbugs-get-status "debbugs" (&rest bug-numbers))
+ (declare-function debbugs-get-attribute "debbugs" (bug-or-message attribute))
(require 'reporter)
+ (declare-function mail-position-on-field "sendmail" (field &optional soft))
+ (declare-function mail-text "sendmail" ())
(when-let ((id (alist-get version debbugs-gnu-emacs-blocking-reports
nil nil #'string-equal))
(insert "
The following bugs are regarded as release-blocking for Emacs " version ".
People are encouraged to work on them with priority.\n\n")
- (dolist (_ blockedby-status)
- (unless (equal (debbugs-get-attribute _ 'pending) "done")
+ (dolist (i blockedby-status)
+ (unless (equal (debbugs-get-attribute i 'pending) "done")
(insert (format "bug#%d %s\n"
- (debbugs-get-attribute _ 'id)
- (debbugs-get-attribute _ 'subject)))))
+ (debbugs-get-attribute i 'id)
+ (debbugs-get-attribute i 'subject)))))
(insert "
If you use the debbugs package from GNU ELPA, you can apply the
following form to see all bugs which block a given release:
-;;; authors.el --- utility for maintaining Emacs's AUTHORS file
+;;; authors.el --- utility for maintaining Emacs's AUTHORS file -*- lexical-binding: t; -*-
;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
(defun authors-disambiguate-file-name (fullname)
"Convert FULLNAME to an unambiguous relative-name."
(let ((relname (file-name-nondirectory fullname))
- dir parent)
+ dir)
(if (and (member relname authors-ambiguous-files)
;; Try to identify the top-level directory.
;; FIXME should really use ROOT from M-x authors.
;; I think it looks weird to see eg "lisp/simple.el".
;; But for eg Makefile.in, we do want to say "lisp/Makefile.in".
(if (and (string-equal "lisp"
- (setq parent (file-name-nondirectory
- (directory-file-name dir))))
+ (file-name-nondirectory
+ (directory-file-name dir)))
;; TODO better to simply have hard-coded list?
;; Only really Makefile.in where this applies.
(not (file-exists-p
(cons (cons file (cdr (assq :changed actions)))
changed-list))))))
(if wrote-list
- (setq wrote-list (sort wrote-list 'string-lessp)))
+ (setq wrote-list (sort wrote-list #'string-lessp)))
(if cowrote-list
- (setq cowrote-list (sort cowrote-list 'string-lessp)))
+ (setq cowrote-list (sort cowrote-list #'string-lessp)))
(when changed-list
(setq changed-list (sort changed-list
(lambda (a b)
(string-lessp (car a) (car b))
(> (cdr a) (cdr b))))))
(setq nchanged (length changed-list))
- (setq changed-list (mapcar 'car changed-list)))
+ (setq changed-list (mapcar #'car changed-list)))
(if (> (- nchanged authors-many-files) 2)
(setcdr (nthcdr authors-many-files changed-list)
(list (format "and %d other files" (- nchanged authors-many-files)))))
(when authors-invalid-file-names
(insert "Unrecognized file entries found:\n\n")
(mapc (lambda (f) (if (not (string-match "^[A-Za-z]+$" f)) (insert f "\n")))
- (sort authors-invalid-file-names 'string-lessp)))
+ (sort authors-invalid-file-names #'string-lessp)))
(when authors-ignored-names
(insert "\n\nThese authors were ignored:\n\n"
(mapconcat
- 'identity
- (sort authors-ignored-names 'string-lessp) "\n")))
+ #'identity
+ (sort authors-ignored-names #'string-lessp) "\n")))
(goto-char (point-min))
(compilation-mode)
(message "Errors were found. See buffer %s" (buffer-name))))
-;;; cus-test.el --- tests for custom types and load problems
+;;; cus-test.el --- tests for custom types and load problems -*- lexical-binding: t; -*-
;; Copyright (C) 1998, 2000, 2002-2021 Free Software Foundation, Inc.
;; This avoids a hang of `cus-test-apropos' in 21.2.
;; (add-to-list 'cus-test-skip-list 'sh-alias-alist)
+(defvar viper-mode)
(or noninteractive
;; Never Viperize.
(setq viper-mode nil))
mismatch)
(when (default-boundp symbol)
(push (funcall get symbol) values)
- (push (eval (car (get symbol 'standard-value))) values))
+ (push (eval (car (get symbol 'standard-value)) t) values))
(if (boundp symbol)
(push (symbol-value symbol) values))
;; That does not work.
(get symbol 'standard-value))))
(and (consp c-value)
(boundp symbol)
- (not (equal (eval (car c-value)) (symbol-value symbol)))
+ (not (equal (eval (car c-value) t) (symbol-value symbol)))
(add-to-list 'cus-test-vars-with-changed-state symbol)))
(if mismatch
(defun cus-test-cus-load-groups (&optional cus-load)
"Return a list of current custom groups.
If CUS-LOAD is non-nil, include groups from cus-load.el."
- (append (mapcar 'cdr custom-current-group-alist)
+ (append (mapcar #'cdr custom-current-group-alist)
(if cus-load
(with-temp-buffer
(insert-file-contents (locate-library "cus-load.el"))
"Call `custom-load-symbol' on all atoms."
(interactive)
(if noninteractive (let (noninteractive) (require 'dunnet)))
- (mapatoms 'custom-load-symbol)
+ (mapatoms #'custom-load-symbol)
(run-hooks 'cus-test-after-load-libs-hook))
(defmacro cus-test-load-1 (&rest body)
(prog1
;; Hack to remove leading "./".
(mapcar (lambda (e) (substring e 2))
- (apply 'process-lines find-program
+ (apply #'process-lines find-program
"." "-name" "obsolete" "-prune" "-o"
"-name" "[^.]*.el" ; ignore .dir-locals.el
(if all
(message "No options not loaded by custom-load-symbol found")
(message "The following options were not loaded by custom-load-symbol:")
(cus-test-message
- (sort cus-test-vars-not-cus-loaded 'string<)))
+ (sort cus-test-vars-not-cus-loaded #'string<)))
(dolist (o groups-loaded)
(setq groups-not-loaded (delete o groups-not-loaded)))
(if (not groups-not-loaded)
(message "No groups not in cus-load.el found")
(message "The following groups are not in cus-load.el:")
- (cus-test-message (sort groups-not-loaded 'string<)))))
+ (cus-test-message (sort groups-not-loaded #'string<)))))
(provide 'cus-test)
-;;; find-gc.el --- detect functions that call the garbage collector
+;;; find-gc.el --- detect functions that call the garbage collector -*- lexical-binding: t; -*-
;; Copyright (C) 1992, 2001-2021 Free Software Foundation, Inc.
Each entry has the form (FUNCTION . FUNCTIONS-IT-CALLS).")
-;;; Functions on this list are safe, even if they appear to be able
-;;; to call the target.
+;; Functions on this list are safe, even if they appear to be able
+;; to call the target.
(defvar find-gc-noreturn-list '(Fsignal Fthrow wrong_type_argument))
-;;; This was originally generated directory-files, but there were
-;;; too many files there that were not actually compiled. The
-;;; list below was created for a HP-UX 7.0 system.
+;; This was originally generated directory-files, but there were
+;; too many files there that were not actually compiled. The
+;; list below was created for a HP-UX 7.0 system.
(defvar find-gc-source-files
'("dispnew.c" "scroll.c" "xdisp.c" "window.c"
(lambda (x y)
(string-lessp (car x) (car y))))))
-;;; This does a depth-first search to find all functions that can
-;;; ultimately call the function "target". The result is an a-list
-;;; in find-gc-unsafe-list; the cars are the unsafe functions, and the cdrs
-;;; are (one of) the unsafe functions that these functions directly
-;;; call.
+;; This does a depth-first search to find all functions that can
+;; ultimately call the function "target". The result is an a-list
+;; in find-gc-unsafe-list; the cars are the unsafe functions, and the cdrs
+;; are (one of) the unsafe functions that these functions directly
+;; call.
(defun find-unsafe-funcs (target)
(setq find-gc-unsafe-list (list (list target)))
(setcdr entry (cons name (cdr entry)))))))))))))
(defun trace-use-tree ()
- (setq find-gc-subrs-callers (mapcar 'list (mapcar 'car find-gc-subrs-called)))
+ (setq find-gc-subrs-callers
+ (mapcar #'list (mapcar #'car find-gc-subrs-called)))
(let ((ptr find-gc-subrs-called)
p2 found)
(while ptr
-;;; gitmerge.el --- help merge one Emacs branch into another
+;;; gitmerge.el --- help merge one Emacs branch into another -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
(if end "s were " " was ")
"skipped:\n\n")
""))
- (apply 'call-process "git" nil t nil "log" "--oneline"
+ (apply #'call-process "git" nil t nil "log" "--oneline"
(if end (list (concat beg "~.." end))
`("-1" ,beg)))
(insert "\n")
(unless end
(setq end beg))
(unless (zerop
- (apply 'call-process "git" nil t nil "merge" "--no-ff"
+ (apply #'call-process "git" nil t nil "merge" "--no-ff"
(append (when skip '("-s" "ours"))
`("-m" ,commitmessage ,end))))
(gitmerge-write-missing missing from)