From 54af0d4298fbd60692a7b5339b5b909242909bf4 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 26 Feb 2021 15:50:41 +0100 Subject: Remove redundant requires of easymenu * lisp/allout.el: * lisp/emacs-lisp/edebug.el: * lisp/emacs-lisp/ert.el: * lisp/erc/erc-menu.el: * lisp/help-mode.el: * lisp/net/dictionary.el: * lisp/nxml/rng-nxml.el: * lisp/progmodes/ebrowse.el: * lisp/progmodes/meta-mode.el: * lisp/progmodes/prolog.el: * lisp/progmodes/ps-mode.el: * lisp/progmodes/vera-mode.el: * lisp/wid-browse.el: Remove redundant require of easymenu. We only use the autoloaded macro 'easy-menu-define' here. --- lisp/progmodes/ebrowse.el | 1 - 1 file changed, 1 deletion(-) (limited to 'lisp/progmodes/ebrowse.el') diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index a174d4851e5..40bdaad574f 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -35,7 +35,6 @@ (require 'cl-lib) (require 'seq) -(require 'easymenu) (require 'view) (require 'ebuff-menu) -- cgit v1.2.3 From b21f6193fe1b92382bf7efbd9d44eba0613f3168 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 11 Mar 2021 13:29:14 -0500 Subject: * lisp: Remove yet more always-nil variables * lisp/align.el (align-region): Remove always-nil variable `group-c`. * lisp/ido.el (ido-make-prompt): Remove always-nil variable `prefix`. * lisp/xdg.el (xdg-mime-collect-associations): Remove always-nil variable `end`. * lisp/calc/calc-yank.el (calc-edit): Remove always-nil variable `flag`. * lisp/calendar/todo-mode.el (todo-edit-item--header): Remove always-nil variable `dayname`. (todo-show-categories-table): Remove always-nil variable `sortkey`. * lisp/emacs-lisp/checkdoc.el (checkdoc-ispell-docstring-engine): Remove always-nil variable `err`. * lisp/emacs-lisp/tcover-ses.el: Remove always-nil variable `pause`. * lisp/eshell/em-ls.el (eshell-ls-files): Remove always-nil variable `ignore`. * lisp/net/ange-ftp.el (ange-ftp-copy-file-internal): Remove always-nil variable `temp2`. * lisp/progmodes/cperl-mode.el (cperl-tags-hier-init): Remove always-nil variables `l1`, `l2`, `l3`. (cperl-tags-treeify): Remove always-nil variable `l1`. * lisp/progmodes/ebrowse.el (ebrowse-tags-read-member+class-name): Remove always-nil variable `class`. * lisp/textmodes/artist.el (artist-draw-ellipse-with-0-height): Remove always-nil variable `fill-info`. * lisp/textmodes/flyspell.el (flyspell-emacs-popup): Remove always-nil variable `show-affix-info`. * lisp/textmodes/rst.el (rst-Ado): Remove always-nil variable `char`. * lisp/vc/vc.el (vc-diff-build-argument-list-internal): Remove always-nil variable `rev2-default`. --- lisp/align.el | 4 ++-- lisp/calc/calc-yank.el | 5 +++-- lisp/calendar/todo-mode.el | 8 ++++---- lisp/emacs-lisp/checkdoc.el | 6 +++--- lisp/emacs-lisp/tcover-ses.el | 4 ++-- lisp/eshell/em-ls.el | 6 +++--- lisp/ido.el | 4 ++-- lisp/net/ange-ftp.el | 4 ++-- lisp/progmodes/cperl-mode.el | 8 ++++---- lisp/progmodes/ebrowse.el | 4 ++-- lisp/textmodes/artist.el | 4 ++-- lisp/textmodes/flyspell.el | 4 ++-- lisp/textmodes/rst.el | 2 +- lisp/vc/vc.el | 7 ++++--- lisp/xdg.el | 4 ++-- 15 files changed, 38 insertions(+), 36 deletions(-) (limited to 'lisp/progmodes/ebrowse.el') diff --git a/lisp/align.el b/lisp/align.el index 1a1d3dd7ec1..7ae067f8c53 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -1310,7 +1310,7 @@ aligner would have dealt with are." (thissep (if rulesep (cdr rulesep) separate)) same (eol 0) search-start - groups group-c + groups ;; group-c spacing spacing-c tab-stop tab-stop-c repeat repeat-c @@ -1434,7 +1434,7 @@ aligner would have dealt with are." ;; lookup the `group' attribute the first time ;; that we need it - (unless group-c + (unless nil ;; group-c (setq groups (or (cdr (assq 'group rule)) 1)) (unless (listp groups) (setq groups (list groups))) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index e5f05236f3a..762adbd407e 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -639,7 +639,7 @@ Interactively, reads the register using `register-read-with-preview'." (calc-slow-wrapper (when (eq n 0) (setq n (calc-stack-size))) - (let* ((flag nil) + (let* (;; (flag nil) (allow-ret (> n 1)) (list (math-showing-full-precision (mapcar (if (> n 1) @@ -651,7 +651,8 @@ Interactively, reads the register using `register-read-with-preview'." (if (> n 0) (calc-top-list n) (calc-top-list 1 (- n))))))) - (calc--edit-mode (lambda () (calc-finish-stack-edit (or flag n))) allow-ret) + (calc--edit-mode (lambda () (calc-finish-stack-edit n)) ;; (or flag n) + allow-ret) (while list (insert (car list) "\n") (setq list (cdr list))))) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 0daa1530109..dab468d0c1d 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -2279,7 +2279,7 @@ made in the number or names of categories." (inc (prefix-numeric-value inc)) (buffer-read-only nil) ndate ntime - year monthname month day dayname) + year monthname month day) ;; dayname (when marked (todo--user-error-if-marked-done-item)) (save-excursion (or (and marked (goto-char (point-min))) (todo-item-start)) @@ -2437,7 +2437,7 @@ made in the number or names of categories." (monthname monthname) (month month) (day day) - (dayname dayname)) + (dayname nil)) ;; dayname (mapconcat #'eval calendar-date-display-form ""))))) (when ndate (replace-match ndate nil nil nil 1)) ;; Add new time string to the header, if it was supplied. @@ -3450,8 +3450,8 @@ containing only archived items, provided user option are shown in `todo-archived-only' face." (interactive) (todo-display-categories) - (let (sortkey) - (todo-update-categories-display sortkey))) + ;; (let (sortkey) + (todo-update-categories-display nil)) ;; sortkey (defun todo-next-button (n) "Move point to the Nth next button in the table of categories." diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index ee2e77480d5..62851660c66 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2134,8 +2134,8 @@ buffer, otherwise stop after the first error." (user-error "No spellchecker installed: check the variable `ispell-program-name'")) (save-excursion (skip-chars-forward "^a-zA-Z") - (let (word sym case-fold-search err word-beginning word-end) - (while (and (not err) (< (point) end)) + (let (word sym case-fold-search word-beginning word-end) ;; err + (while (and (< (point) end)) ;; (not err) (if (save-excursion (forward-char -1) (looking-at "[('`]")) ;; Skip lists describing meta-syntax, or bound variables (forward-sexp 1) @@ -2167,7 +2167,7 @@ buffer, otherwise stop after the first error." (sit-for 0) (message "Continuing...")))))))) (skip-chars-forward "^a-zA-Z")) - err)))) + nil)))) ;; err ;;; Rogue space checking engine ;; diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el index 12b0dcfff95..d9db1d3cdc9 100644 --- a/lisp/emacs-lisp/tcover-ses.el +++ b/lisp/emacs-lisp/tcover-ses.el @@ -32,8 +32,8 @@ ;;;Here are some macros that exercise SES. Set `pause' to t if you want the ;;;macros to pause after each step. -(let* ((pause nil) - (x (if pause "\^Xq" "")) +(let* (;; (pause nil) + (x (if nil "\^Xq" "")) ;; pause (y "\^X\^Fses-test.ses\r\^[<")) ;;Fiddle with the existing spreadsheet (fset 'ses-exercise-example diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index e942ae26928..3d7c43b404b 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -680,12 +680,12 @@ Each member of FILES is either a string or a cons cell of the form (let ((f files) last-f display-files - ignore) + ) ;; ignore (while f (if (cdar f) (setq last-f f f (cdr f)) - (unless ignore + (unless nil ;; ignore (funcall error-func (format "%s: No such file or directory\n" (caar f)))) (if (eq f files) @@ -698,7 +698,7 @@ Each member of FILES is either a string or a cons cell of the form (setcar f (cadr f)) (setcdr f (cddr f)))))) (if (not show-size) - (setq display-files (mapcar 'eshell-ls-annotate files)) + (setq display-files (mapcar #'eshell-ls-annotate files)) (dolist (file files) (let* ((str (eshell-ls-printable-size (file-attribute-size (cdr file)) t)) (len (length str))) diff --git a/lisp/ido.el b/lisp/ido.el index 3ed0d952f36..93629046801 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1746,7 +1746,7 @@ is enabled then some keybindings are changed in the keymap." ido-max-file-prompt-width)) (literal (and (boundp 'ido-find-literal) ido-find-literal "(literal) ")) (vc-off (and ido-saved-vc-hb (not vc-handled-backends) "[-VC] ")) - (prefix nil) + ;; (prefix nil) (rule ido-rewrite-file-prompt-rules)) (let ((case-fold-search nil)) (while rule @@ -1762,7 +1762,7 @@ is enabled then some keybindings are changed in the keymap." ; (if ido-process-ignore-lists "" "&") (or literal "") (or vc-off "") - (or prefix "") + ;; (or prefix "") (let ((l (length dirname))) (if (and max-width (> max-width 0) (> l max-width)) (let* ((s (substring dirname (- max-width))) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index d27eeab82b1..86b5d449872 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -3716,7 +3716,7 @@ so return the size on the remote host exactly. See RFC 3659." (binary (or (ange-ftp-binary-file filename) (ange-ftp-binary-file newname))) temp1 - temp2) + ) ;; temp2 ;; check to see if we can overwrite (if (or (not ok-if-already-exists) @@ -3750,7 +3750,7 @@ so return the size on the remote host exactly. See RFC 3659." filename newname binary msg f-parsed f-host f-user f-name f-abbr t-parsed t-host t-user t-name t-abbr - temp1 temp2 cont nowait) + temp1 nil cont nowait) ;; temp2 nowait)) ;; filename wasn't remote. newname must be remote. call the diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 649eff19cf4..734797b3ad2 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -6701,9 +6701,9 @@ One may build such TAGS files from CPerl mode menu." (or (nthcdr 2 elt) ;; Only in one file (setcdr elt (cdr (nth 1 elt)))))) - to l1 l2 l3) + to) ;; l1 l2 l3 ;; (setq cperl-hierarchy '(() () ())) ; Would write into '() later! - (setq cperl-hierarchy (list l1 l2 l3)) + (setq cperl-hierarchy (list () () ())) ;; (list l1 l2 l3) (or tags-table-list (call-interactively 'visit-tags-table)) (mapc @@ -6749,7 +6749,7 @@ One may build such TAGS files from CPerl mode menu." "\\)\\(::\\)?")) (packages (cdr (nth 1 to))) (methods (cdr (nth 2 to))) - l1 head cons1 cons2 ord writeto recurse + head cons1 cons2 ord writeto recurse ;; l1 root-packages root-functions (move-deeper (lambda (elt) @@ -6769,7 +6769,7 @@ One may build such TAGS files from CPerl mode menu." (setq root-functions (cons elt root-functions))) (t (setq root-packages (cons elt root-packages))))))) - (setcdr to l1) ; Init to dynamic space + (setcdr to nil) ;; l1 ; Init to dynamic space (setq writeto to) (setq ord 1) (mapc move-deeper packages) diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 40bdaad574f..cafdb3b8289 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -3184,8 +3184,8 @@ MEMBER-NAME is the name of the member found." (let* ((start (point)) (name (progn (skip-chars-forward "a-zA-Z0-9_") (buffer-substring start (point)))) - class) - (list class name)))) + ) ;; class + (list nil name)))) ;; class (defun ebrowse-tags-choose-class (_tree header name initial-class-name) diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 9a886d23971..3d081220910 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -3466,7 +3466,7 @@ The Y-RADIUS must be 0, but the X-RADIUS must not be 0." (line-char (if artist-line-char-set artist-line-char ?-)) (i 0) (point-list nil) - (fill-info nil) + ;; (fill-info nil) (shape-info (make-vector 2 0))) (while (< i width) (let* ((line-x (+ left-edge i)) @@ -3479,7 +3479,7 @@ The Y-RADIUS must be 0, but the X-RADIUS must not be 0." (setq point-list (append point-list (list new-coord))) (setq i (1+ i)))) (aset shape-info 0 point-list) - (aset shape-info 1 fill-info) + (aset shape-info 1 nil) ;; fill-info (artist-make-2point-object (artist-make-endpoint x1 y1) (artist-make-endpoint x-radius y-radius) shape-info))) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 83dba7177ab..a48b3457aa2 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -2293,8 +2293,8 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement." corrects) '())) (affix (car (cdr (cdr (cdr poss))))) - show-affix-info - (base-menu (let ((save (if (and (consp affix) show-affix-info) + ;; show-affix-info + (base-menu (let ((save (if nil ;; (and (consp affix) show-affix-info) (list (list (concat "Save affix: " (car affix)) 'save) diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index c51285d3de6..ce156370d57 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -616,7 +616,7 @@ After interpretation of ARGS the results are concatenated as for (:constructor rst-Ado-new-transition (&aux - (char nil) + ;; (char nil) (-style 'transition))) ;; Construct a simple section header. (:constructor diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index b926c3819dd..95126fac100 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1832,7 +1832,7 @@ Return t if the buffer had changes, nil otherwise." (backend (car vc-fileset)) (first (car files)) (rev1-default nil) - (rev2-default nil)) + ) ;; (rev2-default nil) (cond ;; someday we may be able to do revision completion on non-singleton ;; filesets, but not yet. @@ -1856,9 +1856,10 @@ Return t if the buffer had changes, nil otherwise." rev1-default "): ") "Older revision: ")) (rev2-prompt (concat "Newer revision (default " - (or rev2-default "current source") "): ")) + ;; (or rev2-default + "current source): ")) (rev1 (vc-read-revision rev1-prompt files backend rev1-default)) - (rev2 (vc-read-revision rev2-prompt files backend rev2-default))) + (rev2 (vc-read-revision rev2-prompt files backend nil))) ;; rev2-default (when (string= rev1 "") (setq rev1 nil)) (when (string= rev2 "") (setq rev2 nil)) (list files rev1 rev2)))) diff --git a/lisp/xdg.el b/lisp/xdg.el index 0f0df53d27e..11039499ea9 100644 --- a/lisp/xdg.el +++ b/lisp/xdg.el @@ -256,8 +256,8 @@ which is expected to be ordered by priority as in (when (file-readable-p f) (insert-file-contents-literally f nil nil nil t) (goto-char (point-min)) - (let (end) - (while (not (or (eobp) end)) + (let () ;; end + (while (not (or (eobp))) ;; end (if (= (following-char) ?\[) (progn (setq sec (char-after (1+ (point)))) (forward-line)) -- cgit v1.2.3 From 71b14f28068d9327eb236b8577ccbddd65e3b38b Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 22 Apr 2021 04:11:02 +0200 Subject: Avoid lowering gc-cons-threshold * lisp/cedet/semantic/wisent/comp.el (wisent--compile-grammar): * lisp/international/mule-cmds.el (ucs-names): * lisp/progmodes/ebrowse.el (ebrowse-read): * test/src/coding-tests.el (benchmark-decoder): Avoid lowering gc-cons-treshold. --- lisp/cedet/semantic/wisent/comp.el | 2 +- lisp/international/mule-cmds.el | 2 +- lisp/progmodes/ebrowse.el | 2 +- test/src/coding-tests.el | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lisp/progmodes/ebrowse.el') diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el index b96fa400d95..a87ed518909 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -3427,7 +3427,7 @@ where: (if (wisent-automaton-p grammar) grammar ;; Grammar already compiled just return it (wisent-with-context compile-grammar - (let* ((gc-cons-threshold 1000000)) + (let* ((gc-cons-threshold (max gc-cons-threshold 1000000))) (garbage-collect) (setq wisent-new-log-flag t) ;; Parse input grammar diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 578d97bcc0a..b99db46e458 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -3047,7 +3047,7 @@ on encoding." (#x1D000 . #x1FFFF) ;; (#x20000 . #xDFFFF) CJK Ideograph Extension A, B, etc, unused (#xE0000 . #xE01FF))) - (gc-cons-threshold 10000000) + (gc-cons-threshold (max gc-cons-threshold 10000000)) (names (make-hash-table :size 42943 :test #'equal))) (dolist (range ranges) (let ((c (car range)) diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index cafdb3b8289..7524c280f25 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -794,7 +794,7 @@ and TREE is a list of `ebrowse-ts' structures forming the class tree." (ebrowse-hs-version header) ebrowse-version-string)) ;; Read Lisp objects. Temporarily increase `gc-cons-threshold' to ;; prevent a GC that would not free any memory. - (let ((gc-cons-threshold 2000000)) + (let ((gc-cons-threshold (max gc-cons-threshold 2000000))) (while (not (progn (skip-chars-forward " \t\n") (eobp))) (let* ((root (read (current-buffer))) (old-root-ptr (ebrowse-class-in-tree root tree))) diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el index 0bdcff22ce5..0309b2b1ad6 100644 --- a/test/src/coding-tests.el +++ b/test/src/coding-tests.el @@ -359,7 +359,7 @@ (delete-region (point-min) (point)))))) (defun benchmark-decoder () - (let ((gc-cons-threshold 4000000)) + (let ((gc-cons-threshold (max gc-cons-threshold 4000000))) (insert "Without optimization:\n") (dolist (files test-file-list) (dolist (file (cdr files)) -- cgit v1.2.3