commit 1f790dfe90d914e02182fc4abab6623d9c966ff6 (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Thu Apr 1 10:34:39 2021 +0200 Use lexical-binding in isearchb.el * lisp/isearchb.el: Use lexical-binding. Remove redundant :group args. diff --git a/lisp/isearchb.el b/lisp/isearchb.el index 3713879e3b..67020b76ec 100644 --- a/lisp/isearchb.el +++ b/lisp/isearchb.el @@ -1,4 +1,4 @@ -;;; isearchb --- a marriage between iswitchb and isearch +;;; isearchb.el --- a marriage between iswitchb and isearch -*- lexical-binding: t -*- ;; Copyright (C) 2004-2021 Free Software Foundation, Inc. @@ -89,13 +89,11 @@ "Number of idle seconds before isearchb turns itself off. If nil, don't use a timeout." :type '(choice (integer :tag "Seconds") - (const :tag "Disable" nil)) - :group 'isearchb) + (const :tag "Disable" nil))) (defcustom isearchb-show-completions t "If non-nil, show possible completions in the minibuffer." - :type 'boolean - :group 'isearchb) + :type 'boolean) (defvar isearchb-start-buffer nil) (defvar isearchb-last-buffer nil) commit 41f37c8c828a1c023acc91026a3d0dc76e0c1cd3 Author: Stefan Kangas Date: Thu Apr 1 10:23:21 2021 +0200 Remove redundant #' before lambda in Gnus * lisp/gnus/gnus-group.el (gnus-group-list-cached) (gnus-group-list-dormant, gnus-group-list-ticked): * lisp/gnus/gnus-registry.el (gnus-registry-remove-extra-data): * lisp/gnus/gnus-score.el (gnus-score-edit-file-at-point): * lisp/gnus/gnus-sum.el (gnus-fetch-headers): * lisp/gnus/mm-partial.el (mm-inline-partial): * lisp/gnus/nnselect.el (nnselect-uncompress-artlist) (numbers-by-group, nnselect-request-expire-articles) (nnselect-request-update-info, nnselect-request-thread): * lisp/gnus/nnvirtual.el (nnvirtual-request-expire-articles): * lisp/gnus/spam-stat.el (spam-stat-score-buffer): Remove redundant #' before lambda. diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 909391b6b0..423b180408 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -4697,20 +4697,20 @@ This command may read the active file." (gnus-cache-open)) (funcall gnus-group-prepare-function (or level gnus-level-subscribed) - #'(lambda (info) - (let ((marks (gnus-info-marks info))) - (assq 'cache marks))) + (lambda (info) + (let ((marks (gnus-info-marks info))) + (assq 'cache marks))) lowest - #'(lambda (group) - (or (gethash group - gnus-cache-active-hashtb) - ;; Cache active file might use "." - ;; instead of ":". - (gethash - (mapconcat #'identity - (split-string group ":") - ".") - gnus-cache-active-hashtb)))) + (lambda (group) + (or (gethash group + gnus-cache-active-hashtb) + ;; Cache active file might use "." + ;; instead of ":". + (gethash + (mapconcat #'identity + (split-string group ":") + ".") + gnus-cache-active-hashtb)))) (goto-char (point-min)) (gnus-group-position-point)) @@ -4728,9 +4728,9 @@ This command may read the active file." (gnus-cache-open)) (funcall gnus-group-prepare-function (or level gnus-level-subscribed) - #'(lambda (info) - (let ((marks (gnus-info-marks info))) - (assq 'dormant marks))) + (lambda (info) + (let ((marks (gnus-info-marks info))) + (assq 'dormant marks))) lowest 'ignore) (goto-char (point-min)) @@ -4750,9 +4750,9 @@ This command may read the active file." (gnus-cache-open)) (funcall gnus-group-prepare-function (or level gnus-level-subscribed) - #'(lambda (info) - (let ((marks (gnus-info-marks info))) - (assq 'tick marks))) + (lambda (info) + (let ((marks (gnus-info-marks info))) + (assq 'tick marks))) lowest 'ignore) (goto-char (point-min)) diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index e3b9c19618..6ac646fbea 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -1290,9 +1290,9 @@ from your existing entries." (registry-reindex db) (cl-loop for k being the hash-keys of (oref db data) using (hash-value v) - do (let ((newv (delq nil (mapcar #'(lambda (entry) - (unless (member (car entry) extra) - entry)) + do (let ((newv (delq nil (mapcar (lambda (entry) + (unless (member (car entry) extra) + entry)) v)))) (registry-delete db (list k) nil) (gnus-registry-insert db k newv))) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index ce64dcef04..f40da9e9c4 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -1182,8 +1182,8 @@ If FORMAT, also format the current score file." (when (consp rule) ;; the rule exists (setq rule (if (symbolp (car rule)) (format "(%S)" (car rule)) - (mapconcat #'(lambda (obj) - (regexp-quote (format "%S" obj))) + (mapconcat (lambda (obj) + (regexp-quote (format "%S" obj))) rule sep))) (goto-char (point-min)) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index c30f9a5f35..ac9317ef4e 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5676,9 +5676,9 @@ or a straight list of headers." (or dependencies (with-current-buffer gnus-summary-buffer gnus-newsgroup-dependencies)))) - (delq nil (mapcar #'(lambda (header) - (gnus-dependencies-add-header - header dependencies force-new)) + (delq nil (mapcar (lambda (header) + (gnus-dependencies-add-header + header dependencies force-new)) gnus-headers-retrieved-by))))) (gnus-message 7 "Fetching headers for %s...done" gnus-newsgroup-name))) diff --git a/lisp/gnus/mm-partial.el b/lisp/gnus/mm-partial.el index 0c25c8f8bc..0c628055ac 100644 --- a/lisp/gnus/mm-partial.el +++ b/lisp/gnus/mm-partial.el @@ -72,14 +72,14 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." id (with-current-buffer gnus-summary-buffer (gnus-summary-article-number)))) - #'(lambda (a b) - (let ((anumber (string-to-number - (cdr (assq 'number - (cdr (mm-handle-type a)))))) - (bnumber (string-to-number - (cdr (assq 'number - (cdr (mm-handle-type b))))))) - (< anumber bnumber))))) + (lambda (a b) + (let ((anumber (string-to-number + (cdr (assq 'number + (cdr (mm-handle-type a)))))) + (bnumber (string-to-number + (cdr (assq 'number + (cdr (mm-handle-type b))))))) + (< anumber bnumber))))) (setq gnus-article-mime-handles (mm-merge-handles gnus-article-mime-handles phandles)) (with-current-buffer (generate-new-buffer " *mm*") diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el index 1daa8aa673..e314e1d8d1 100644 --- a/lisp/gnus/nnselect.el +++ b/lisp/gnus/nnselect.el @@ -100,8 +100,8 @@ (setq selection (vconcat (cl-map 'vector - #'(lambda (art) - (vector artgroup art artrsv)) + (lambda (art) + (vector artgroup art artrsv)) (gnus-uncompress-sequence artseq)) selection))) selection))) @@ -211,12 +211,12 @@ as `(keyfunc member)' and the corresponding element is just #'nnselect-article-group #'nnselect-article-number)) ((eq ,type 'tuple) (nnselect-categorize ,articles - #'(lambda (elem) - (nnselect-article-group (car elem))) - #'(lambda (elem) - (cons (nnselect-article-number - (car elem)) - (cdr elem))))) + (lambda (elem) + (nnselect-article-group (car elem))) + (lambda (elem) + (cons (nnselect-article-number + (car elem)) + (cdr elem))))) (t (nnselect-categorize ,articles #'nnselect-article-group @@ -464,8 +464,8 @@ If this variable is nil, or if the provided function returns nil, (error "Group %s does not support article expiration" artgroup)) (unless (gnus-check-server (gnus-find-method-for-group artgroup)) (error "Couldn't open server for group %s" artgroup)) - (push (mapcar #'(lambda (art) - (car (rassq art artids))) + (push (mapcar (lambda (art) + (car (rassq art artids))) (let ((nnimap-expunge 'immediately)) (gnus-request-expire-articles artlist artgroup force))) @@ -549,8 +549,8 @@ If this variable is nil, or if the provided function returns nil, (gnus-add-to-range (gnus-info-read info) (delq nil (mapcar - #'(lambda (art) - (unless (memq (cdr art) unread) (car art))) + (lambda (art) + (unless (memq (cdr art) unread) (car art))) artids)))) (pcase-dolist (`(,type . ,mark-list) marks) (let ((mark-type (gnus-article-mark-to-type type)) new) @@ -560,19 +560,19 @@ If this variable is nil, or if the provided function returns nil, (cond ((eq mark-type 'tuple) (mapcar - #'(lambda (id) - (let (mark) - (when - (setq mark (assq (cdr id) mark-list)) - (cons (car id) (cdr mark))))) + (lambda (id) + (let (mark) + (when + (setq mark (assq (cdr id) mark-list)) + (cons (car id) (cdr mark))))) artids)) (t (setq mark-list (gnus-uncompress-range mark-list)) (mapcar - #'(lambda (id) - (when (memq (cdr id) mark-list) - (car id))) artids))))) + (lambda (id) + (when (memq (cdr id) mark-list) + (car id))) artids))))) (let ((previous (alist-get type newmarks))) (if previous (nconc previous new) @@ -607,8 +607,8 @@ If this variable is nil, or if the provided function returns nil, (let ((thread (gnus-id-to-thread (mail-header-id header)))) (when thread - (cl-some #'(lambda (x) - (when (and x (> x 0)) x)) + (cl-some (lambda (x) + (when (and x (> x 0)) x)) (gnus-articles-in-thread thread))))))))) ;; Check if search-based thread referral is permitted, and ;; available. @@ -642,15 +642,15 @@ If this variable is nil, or if the provided function returns nil, old-arts seq headers) (mapc - #'(lambda (article) - (if - (setq seq - (cl-position article - gnus-newsgroup-selection :test 'equal)) - (push (1+ seq) old-arts) - (setq gnus-newsgroup-selection - (vconcat gnus-newsgroup-selection (vector article))) - (cl-incf last))) + (lambda (article) + (if + (setq seq + (cl-position article + gnus-newsgroup-selection :test 'equal)) + (push (1+ seq) old-arts) + (setq gnus-newsgroup-selection + (vconcat gnus-newsgroup-selection (vector article))) + (cl-incf last))) new-nnselect-artlist) (setq headers (gnus-fetch-headers @@ -671,9 +671,9 @@ If this variable is nil, or if the provided function returns nil, (when (setq new-marks (delq nil (mapcar - #'(lambda (art) - (when (memq (cdr art) marked) - (car art))) + (lambda (art) + (when (memq (cdr art) marked) + (car art))) artids))) (nconc (symbol-value diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index b3b701e412..03a0ff296f 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el @@ -362,9 +362,9 @@ It is computed from the marks of individual component groups.") (dolist (group nnvirtual-component-groups) (setq unexpired (nconc unexpired (mapcar - #'(lambda (article) - (nnvirtual-reverse-map-article - group article)) + (lambda (article) + (nnvirtual-reverse-map-article + group article)) (gnus-uncompress-range (gnus-group-expire-articles-1 group)))))) (sort (delq nil unexpired) #'<))) diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el index 3e804ecb4b..ab9be0da89 100644 --- a/lisp/gnus/spam-stat.el +++ b/lisp/gnus/spam-stat.el @@ -492,7 +492,7 @@ Add user supplied modifications if supplied." (let* ((probs (mapcar #'cadr spam-stat-score-data)) (prod (apply #'* probs)) (score0 - (/ prod (+ prod (apply #'* (mapcar #'(lambda (x) (- 1 x)) + (/ prod (+ prod (apply #'* (mapcar (lambda (x) (- 1 x)) probs))))) (score1s (condition-case nil commit 168d2628b233337a1fbf90d05dbcc3fa39f771e7 Author: Stefan Kangas Date: Thu Apr 1 01:26:52 2021 +0200 Use lexical-binding in avoid.el * lisp/avoid.el: Use lexical-binding. Remove redundant :group args. (mouse-avoidance-fancy): Quote function symbol as such. diff --git a/lisp/avoid.el b/lisp/avoid.el index 3b3848e20d..d3afecf8cc 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -1,4 +1,4 @@ -;;; avoid.el --- make mouse pointer stay out of the way of editing +;;; avoid.el --- make mouse pointer stay out of the way of editing -*- lexical-binding: t -*- ;; Copyright (C) 1993-1994, 2000-2021 Free Software Foundation, Inc. @@ -80,7 +80,6 @@ use either \\[customize] or \\[mouse-avoidance-mode]." :initialize 'custom-initialize-default :type '(choice (const :tag "none" nil) (const banish) (const jump) (const animate) (const exile) (const proteus)) - :group 'avoid :require 'avoid :version "20.3") @@ -89,25 +88,21 @@ use either \\[customize] or \\[mouse-avoidance-mode]." "Average distance that mouse will be moved when approached by cursor. Only applies in Mouse Avoidance mode `jump' and its derivatives. For best results make this larger than `mouse-avoidance-threshold'." - :type 'integer - :group 'avoid) + :type 'integer) (defcustom mouse-avoidance-nudge-var 10 "Variability of `mouse-avoidance-nudge-dist' (which see)." - :type 'integer - :group 'avoid) + :type 'integer) (defcustom mouse-avoidance-animation-delay .01 "Delay between animation steps, in seconds." - :type 'number - :group 'avoid) + :type 'number) (defcustom mouse-avoidance-threshold 5 "Mouse-pointer's flight distance. If the cursor gets closer than this, the mouse pointer will move away. Only applies in Mouse Avoidance modes `animate' and `jump'." - :type 'integer - :group 'avoid) + :type 'integer) (defcustom mouse-avoidance-banish-position '((frame-or-window . frame) (side . right) @@ -380,7 +375,7 @@ redefine this function to suit your own tastes." (mouse-avoidance-nudge-mouse) (if (not (eq (selected-frame) (car old-pos))) ;; This should never happen. - (apply 'set-mouse-position old-pos))))) + (apply #'set-mouse-position old-pos))))) ;;;###autoload (defun mouse-avoidance-mode (&optional mode) commit c59dedcdf17530d22931ec6c8f92215971af09ba Author: Stefan Kangas Date: Wed Mar 31 18:17:15 2021 +0200 Use emacs-version instead of obsolete version variables * lisp/calendar/icalendar.el (icalendar-version): * lisp/dframe.el (dframe-version): * lisp/emacs-lisp/checkdoc.el (checkdoc-version): * lisp/emulation/edt.el (edt-version): * lisp/international/mule.el (mule-version): * lisp/linum.el (linum-version): * lisp/play/bubbles.el (bubbles-version): * lisp/textmodes/remember.el (remember-version): * lisp/url/url-vars.el (url-version): * lisp/woman.el (woman-version): Use emacs-version instead of obsolete version variables. diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index d9cd21e3cd..04b525efc8 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -105,10 +105,6 @@ ;;; Code: -(defconst icalendar-version "0.19" - "Version number of icalendar.el.") -(make-obsolete-variable 'icalendar-version nil "28.1") - ;; ====================================================================== ;; Customizables ;; ====================================================================== @@ -2557,6 +2553,11 @@ the entry." (or (icalendar--get-event-property event 'URL) "") (or (icalendar--get-event-property event 'CLASS) ""))) +;; Obsolete + +(defconst icalendar-version "0.19" "Version number of icalendar.el.") +(make-obsolete-variable 'icalendar-version 'emacs-version "28.1") + (provide 'icalendar) ;;; icalendar.el ends here diff --git a/lisp/dframe.el b/lisp/dframe.el index e61d2ea058..f4208f3755 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -828,7 +828,7 @@ the mode-line." (defvar dframe-version "1.3" "The current version of the dedicated frame library.") -(make-obsolete-variable 'dframe-version nil "28.1") +(make-obsolete-variable 'dframe-version 'emacs-version "28.1") (provide 'dframe) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 62851660c6..96b16f7ed4 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -160,9 +160,6 @@ ;; not specifically docstring related. Would this even be useful? ;;; Code: -(defvar checkdoc-version "0.6.2" - "Release version of checkdoc you are currently running.") -(make-obsolete-variable 'checkdoc-version nil "28.1") (require 'cl-lib) (require 'help-mode) ;; for help-xref-info-regexp @@ -2709,6 +2706,12 @@ function called to create the messages." (custom-add-option 'emacs-lisp-mode-hook 'checkdoc-minor-mode) +;; Obsolete + +(defvar checkdoc-version "0.6.2" + "Release version of checkdoc you are currently running.") +(make-obsolete-variable 'checkdoc-version 'emacs-version "28.1") + (provide 'checkdoc) ;;; checkdoc.el ends here diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 50979c4dbb..f11afb1d02 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -178,9 +178,6 @@ (defvar edt-user-global-map) (defvar rect-start-point) -(defconst edt-version "4.0" "EDT Emulation version number.") -(make-obsolete-variable 'edt-version nil "28.1") - ;;; ;;; User Configurable Variables ;;; @@ -2533,6 +2530,9 @@ G-C-\\: Split Window | FNDNXT | Yank | CUT | (set-frame-width nil 132) (message "Terminal width 132")) +(defconst edt-version "4.0" "EDT Emulation version number.") +(make-obsolete-variable 'edt-version 'emacs-version "28.1") + (provide 'edt) ;;; edt.el ends here diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 52e743e6f3..83cbb44c4d 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -32,7 +32,7 @@ (defconst mule-version "6.0 (HANACHIRUSATO)" "\ Version number and name of this version of MULE (multilingual environment).") -(make-obsolete-variable 'mule-version nil "28.1") +(make-obsolete-variable 'mule-version 'emacs-version "28.1") (defconst mule-version-date "2003.9.1" "\ Distribution date of this version of MULE (multilingual environment).") diff --git a/lisp/linum.el b/lisp/linum.el index f9761d22c6..b0281d366c 100644 --- a/lisp/linum.el +++ b/lisp/linum.el @@ -31,9 +31,6 @@ ;;; Code: -(defconst linum-version "0.9x") -(make-obsolete-variable 'linum-version nil "28.1") - (defvar-local linum-overlays nil "Overlays used in this buffer.") (defvar-local linum-available nil "Overlays available for reuse.") (defvar linum-before-numbering-hook nil @@ -244,6 +241,9 @@ Linum mode is a buffer-local minor mode." ;; continue standard unloading nil) +(defconst linum-version "0.9x") +(make-obsolete-variable 'linum-version 'emacs-version "28.1") + (provide 'linum) ;;; linum.el ends here diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el index 50f65a1215..e695a75e08 100644 --- a/lisp/play/bubbles.el +++ b/lisp/play/bubbles.el @@ -72,9 +72,6 @@ ;;; Code: -(defconst bubbles-version "0.5" "Version number of bubbles.el.") -(make-obsolete-variable 'bubbles-version nil "28.1") - (require 'gamegrid) ;; User options @@ -1405,6 +1402,11 @@ Return t if new char is non-empty." (forward-char 1))) (put-text-property (point-min) (point-max) 'pointer 'arrow))))) +;; Obsolete. + +(defconst bubbles-version "0.5" "Version number of bubbles.el.") +(make-obsolete-variable 'bubbles-version 'emacs-version "28.1") + (provide 'bubbles) ;;; bubbles.el ends here diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index 3affb46201..cd76bf80f1 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el @@ -178,10 +178,6 @@ ;;; Code: -(defconst remember-version "2.0" - "This version of remember.") -(make-obsolete-variable 'remember-version nil "28.1") - (defgroup remember nil "A mode to remember information." :group 'data) @@ -671,6 +667,11 @@ is non-nil, bury it and return nil; otherwise return t." nil) t)) +;; Obsolete + +(defconst remember-version "2.0" "This version of remember.") +(make-obsolete-variable 'remember-version 'emacs-version "28.1") + (provide 'remember) ;;; remember.el ends here diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 8c836f8f64..2aa2e7912f 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -22,10 +22,6 @@ ;;; Code: -(defconst url-version "Emacs" - "Version number of URL package.") -(make-obsolete-variable 'url-version nil "28.1") - (defgroup url nil "Uniform Resource Locator tool." :version "22.1" @@ -427,6 +423,11 @@ Should be one of: This should be set, e.g. by mail user agents rendering HTML to avoid `bugs' which call home.") +;; Obsolete + +(defconst url-version "Emacs" "Version number of URL package.") +(make-obsolete-variable 'url-version 'emacs-version "28.1") + (provide 'url-vars) ;;; url-vars.el ends here diff --git a/lisp/woman.el b/lisp/woman.el index 505fdb4c9e..d9aa573d27 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -390,9 +390,6 @@ (eval-when-compile (require 'cl-lib)) -(defvar woman-version "0.551 (beta)" "WoMan version information.") -(make-obsolete-variable 'woman-version nil "28.1") - (require 'man) (define-button-type 'WoMan-xref-man-page :supertype 'Man-abstract-xref-man-page @@ -4580,6 +4577,11 @@ logging the message." (bookmark-default-handler `("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bookmark))))) +;; Obsolete. + +(defvar woman-version "0.551 (beta)" "WoMan version information.") +(make-obsolete-variable 'woman-version 'emacs-version "28.1") + (provide 'woman) ;;; woman.el ends here commit 4f595cca575f6065f5b866402810a673c7fdf38d Author: Stefan Monnier Date: Wed Mar 31 18:39:52 2021 -0400 * lisp/strokes.el: Use lexical-binding. Remove redundant `:group` args (strokes-char-table): Move initialization into declaration. diff --git a/lisp/strokes.el b/lisp/strokes.el index 55f2ae8cc4..4b682e99fe 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -1,4 +1,4 @@ -;;; strokes.el --- control Emacs through mouse strokes +;;; strokes.el --- control Emacs through mouse strokes -*- lexical-binding: t; -*- ;; Copyright (C) 1997, 2000-2021 Free Software Foundation, Inc. @@ -216,14 +216,12 @@ static char * stroke_xpm[] = { (defcustom strokes-lighter " Strokes" "Mode line identifier for Strokes mode." - :type 'string - :group 'strokes) + :type 'string) (defcustom strokes-character ?@ "Character used when drawing strokes in the strokes buffer. \(The default is `@', which works well.)" - :type 'character - :group 'strokes) + :type 'character) (defcustom strokes-minimum-match-score 1000 "Minimum score for a stroke to be considered a possible match. @@ -239,8 +237,7 @@ then you can set `strokes-minimum-match-score' to something that works for you. The only purpose of this variable is to insure that if you do a bogus stroke that really doesn't match any of the predefined ones, then strokes should NOT pick the one that came closest." - :type 'integer - :group 'strokes) + :type 'integer) (defcustom strokes-grid-resolution 9 "Integer defining dimensions of the stroke grid. @@ -256,14 +253,12 @@ WARNING: Changing the value of this variable will gravely affect the figure out what it should be based on your needs and on how quick the particular platform(s) you're operating on, and only then start programming in your custom strokes." - :type 'integer - :group 'strokes) + :type 'integer) (defcustom strokes-file (locate-user-emacs-file "strokes" ".strokes") "File containing saved strokes for Strokes mode." :version "24.4" ; added locate-user-emacs-file - :type 'file - :group 'strokes) + :type 'file) (defvar strokes-buffer-name " *strokes*" "The name of the buffer that the strokes take place in.") @@ -273,8 +268,7 @@ WARNING: Changing the value of this variable will gravely affect the If nil, strokes will be read the same, however the user will not be able to see the strokes. This be helpful for people who don't like the delay in switching to the strokes buffer." - :type 'boolean - :group 'strokes) + :type 'boolean) ;;; internal variables... @@ -1044,7 +1038,7 @@ o Strokes are a bit computer-dependent in that they depend somewhat on (help-mode) (help-print-return-message))) -(define-obsolete-function-alias 'strokes-report-bug 'report-emacs-bug "24.1") +(define-obsolete-function-alias 'strokes-report-bug #'report-emacs-bug "24.1") (defun strokes-window-configuration-changed-p () "Non-nil if the `strokes-window-configuration' frame properties changed. @@ -1379,8 +1373,8 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead." (defvar strokes-mode-map (let ((map (make-sparse-keymap))) - (define-key map [(shift down-mouse-2)] 'strokes-do-stroke) - (define-key map [(meta down-mouse-2)] 'strokes-do-complex-stroke) + (define-key map [(shift down-mouse-2)] #'strokes-do-stroke) + (define-key map [(meta down-mouse-2)] #'strokes-do-complex-stroke) map)) ;;;###autoload @@ -1399,8 +1393,7 @@ Encode/decode your strokes with \\[strokes-encode-buffer], \\[strokes-decode-buffer]. \\{strokes-mode-map}" - nil strokes-lighter strokes-mode-map - :group 'strokes :global t + nil strokes-lighter strokes-mode-map :global t (cond ((not (display-mouse-p)) (error "Can't use Strokes without a mouse")) (strokes-mode ; turn on strokes @@ -1408,15 +1401,15 @@ Encode/decode your strokes with \\[strokes-encode-buffer], (null strokes-global-map) (strokes-load-user-strokes)) (add-hook 'kill-emacs-query-functions - 'strokes-prompt-user-save-strokes) + #'strokes-prompt-user-save-strokes) (add-hook 'select-frame-hook - 'strokes-update-window-configuration) + #'strokes-update-window-configuration) (strokes-update-window-configuration)) (t ; turn off strokes (if (get-buffer strokes-buffer-name) (kill-buffer (get-buffer strokes-buffer-name))) (remove-hook 'select-frame-hook - 'strokes-update-window-configuration)))) + #'strokes-update-window-configuration)))) ;;;; strokes-xpm stuff (later may be separate)... @@ -1426,74 +1419,75 @@ Encode/decode your strokes with \\[strokes-encode-buffer], (defface strokes-char '((t (:background "lightgray"))) "Face for strokes characters." - :version "21.1" - :group 'strokes) + :version "21.1") (put 'strokes 'char-table-extra-slots 0) -(defconst strokes-char-table (make-char-table 'strokes) ; +(defconst strokes-char-table + (let ((ct (make-char-table 'strokes))) ; + (aset ct ?0 0) + (aset ct ?1 1) + (aset ct ?2 2) + (aset ct ?3 3) + (aset ct ?4 4) + (aset ct ?5 5) + (aset ct ?6 6) + (aset ct ?7 7) + (aset ct ?8 8) + (aset ct ?9 9) + (aset ct ?a 10) + (aset ct ?b 11) + (aset ct ?c 12) + (aset ct ?d 13) + (aset ct ?e 14) + (aset ct ?f 15) + (aset ct ?g 16) + (aset ct ?h 17) + (aset ct ?i 18) + (aset ct ?j 19) + (aset ct ?k 20) + (aset ct ?l 21) + (aset ct ?m 22) + (aset ct ?n 23) + (aset ct ?o 24) + (aset ct ?p 25) + (aset ct ?q 26) + (aset ct ?r 27) + (aset ct ?s 28) + (aset ct ?t 29) + (aset ct ?u 30) + (aset ct ?v 31) + (aset ct ?w 32) + (aset ct ?x 33) + (aset ct ?y 34) + (aset ct ?z 35) + (aset ct ?A 36) + (aset ct ?B 37) + (aset ct ?C 38) + (aset ct ?D 39) + (aset ct ?E 40) + (aset ct ?F 41) + (aset ct ?G 42) + (aset ct ?H 43) + (aset ct ?I 44) + (aset ct ?J 45) + (aset ct ?K 46) + (aset ct ?L 47) + (aset ct ?M 48) + (aset ct ?N 49) + (aset ct ?O 50) + (aset ct ?P 51) + (aset ct ?Q 52) + (aset ct ?R 53) + (aset ct ?S 54) + (aset ct ?T 55) + (aset ct ?U 56) + (aset ct ?V 57) + (aset ct ?W 58) + (aset ct ?X 59) + (aset ct ?Y 60) + (aset ct ?Z 61) + ct) "The table which stores values for the character keys.") -(aset strokes-char-table ?0 0) -(aset strokes-char-table ?1 1) -(aset strokes-char-table ?2 2) -(aset strokes-char-table ?3 3) -(aset strokes-char-table ?4 4) -(aset strokes-char-table ?5 5) -(aset strokes-char-table ?6 6) -(aset strokes-char-table ?7 7) -(aset strokes-char-table ?8 8) -(aset strokes-char-table ?9 9) -(aset strokes-char-table ?a 10) -(aset strokes-char-table ?b 11) -(aset strokes-char-table ?c 12) -(aset strokes-char-table ?d 13) -(aset strokes-char-table ?e 14) -(aset strokes-char-table ?f 15) -(aset strokes-char-table ?g 16) -(aset strokes-char-table ?h 17) -(aset strokes-char-table ?i 18) -(aset strokes-char-table ?j 19) -(aset strokes-char-table ?k 20) -(aset strokes-char-table ?l 21) -(aset strokes-char-table ?m 22) -(aset strokes-char-table ?n 23) -(aset strokes-char-table ?o 24) -(aset strokes-char-table ?p 25) -(aset strokes-char-table ?q 26) -(aset strokes-char-table ?r 27) -(aset strokes-char-table ?s 28) -(aset strokes-char-table ?t 29) -(aset strokes-char-table ?u 30) -(aset strokes-char-table ?v 31) -(aset strokes-char-table ?w 32) -(aset strokes-char-table ?x 33) -(aset strokes-char-table ?y 34) -(aset strokes-char-table ?z 35) -(aset strokes-char-table ?A 36) -(aset strokes-char-table ?B 37) -(aset strokes-char-table ?C 38) -(aset strokes-char-table ?D 39) -(aset strokes-char-table ?E 40) -(aset strokes-char-table ?F 41) -(aset strokes-char-table ?G 42) -(aset strokes-char-table ?H 43) -(aset strokes-char-table ?I 44) -(aset strokes-char-table ?J 45) -(aset strokes-char-table ?K 46) -(aset strokes-char-table ?L 47) -(aset strokes-char-table ?M 48) -(aset strokes-char-table ?N 49) -(aset strokes-char-table ?O 50) -(aset strokes-char-table ?P 51) -(aset strokes-char-table ?Q 52) -(aset strokes-char-table ?R 53) -(aset strokes-char-table ?S 54) -(aset strokes-char-table ?T 55) -(aset strokes-char-table ?U 56) -(aset strokes-char-table ?V 57) -(aset strokes-char-table ?W 58) -(aset strokes-char-table ?X 59) -(aset strokes-char-table ?Y 60) -(aset strokes-char-table ?Z 61) (defconst strokes-base64-chars ;; I wanted to make this a vector of individual like (vector ?0 commit ad5322fcea3f53c121bcd3e8bce797a14304752e Author: Stefan Monnier Date: Wed Mar 31 18:27:14 2021 -0400 * lisp/forms.el: Use lexical-binding. Remove redundant `:group` args (forms--process-format-list, forms--debug): Strength-reduce `eval` to `symbol-value`. diff --git a/lisp/forms.el b/lisp/forms.el index 62c4288869..8696aea98e 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -1,7 +1,6 @@ -;;; forms.el --- Forms mode: edit a file as a form to fill in +;;; forms.el --- Forms mode: edit a file as a form to fill in -*- lexical-binding: t; -*- -;; Copyright (C) 1991, 1994-1997, 2001-2021 Free Software Foundation, -;; Inc. +;; Copyright (C) 1991-2021 Free Software Foundation, Inc. ;; Author: Johan Vromans @@ -298,7 +297,6 @@ (defcustom forms-mode-hook nil "Hook run upon entering Forms mode." - :group 'forms :type 'hook) ;;; Mandatory variables - must be set by evaluating the control file. @@ -316,7 +314,6 @@ (defcustom forms-check-number-of-fields t "If non-nil, warn about records with wrong number of fields." - :group 'forms :type 'boolean) (defvar forms-field-sep "\t" @@ -332,13 +329,11 @@ If not nil: use this character to separate multi-line fields (default C-k).") (defcustom forms-forms-scroll nil "Non-nil means replace scroll-up/down commands in Forms mode. The replacement commands performs forms-next/prev-record." - :group 'forms :type 'boolean) (defcustom forms-forms-jump nil "Non-nil means redefine beginning/end-of-buffer in Forms mode. The replacement commands performs forms-first/last-record." - :group 'forms :type 'boolean) (defvar forms-read-file-filter nil @@ -363,23 +358,19 @@ The contents may NOT be modified.") (defcustom forms-use-text-properties t "Non-nil means to use text properties. " - :group 'forms :type 'boolean) (defcustom forms-insert-after nil "Non-nil means: inserts of new records go after current record. Also, initial position is at last record." - :group 'forms :type 'boolean) (defcustom forms-ro-face 'default "The face (a symbol) that is used to display read-only text on the screen." - :group 'forms :type 'face) (defcustom forms-rw-face 'region "The face (a symbol) that is used to display read-write text on the screen." - :group 'forms :type 'face) ;;; Internal variables. @@ -767,7 +758,7 @@ Commands: Equivalent keys in read-only mode: ;; If it is a symbol, eval it first. (if (and (symbolp el) (boundp el)) - (setq el (eval el))) + (setq el (symbol-value el))) (cond @@ -1261,35 +1252,35 @@ Commands: Equivalent keys in read-only mode: ;; `forms-mode-map' is always accessible via \C-c prefix. (setq forms-mode-map (make-keymap)) - (define-key forms-mode-map "\t" 'forms-next-field) - (define-key forms-mode-map "\C-k" 'forms-delete-record) - (define-key forms-mode-map "\C-q" 'forms-toggle-read-only) - (define-key forms-mode-map "\C-o" 'forms-insert-record) - (define-key forms-mode-map "\C-l" 'forms-jump-record) - (define-key forms-mode-map "\C-n" 'forms-next-record) - (define-key forms-mode-map "\C-p" 'forms-prev-record) - (define-key forms-mode-map "\C-r" 'forms-search-backward) - (define-key forms-mode-map "\C-s" 'forms-search-forward) - (define-key forms-mode-map "\C-x" 'forms-exit) - (define-key forms-mode-map "<" 'forms-first-record) - (define-key forms-mode-map ">" 'forms-last-record) - (define-key forms-mode-map "\C-?" 'forms-prev-record) + (define-key forms-mode-map "\t" #'forms-next-field) + (define-key forms-mode-map "\C-k" #'forms-delete-record) + (define-key forms-mode-map "\C-q" #'forms-toggle-read-only) + (define-key forms-mode-map "\C-o" #'forms-insert-record) + (define-key forms-mode-map "\C-l" #'forms-jump-record) + (define-key forms-mode-map "\C-n" #'forms-next-record) + (define-key forms-mode-map "\C-p" #'forms-prev-record) + (define-key forms-mode-map "\C-r" #'forms-search-backward) + (define-key forms-mode-map "\C-s" #'forms-search-forward) + (define-key forms-mode-map "\C-x" #'forms-exit) + (define-key forms-mode-map "<" #'forms-first-record) + (define-key forms-mode-map ">" #'forms-last-record) + (define-key forms-mode-map "\C-?" #'forms-prev-record) ;; `forms-mode-ro-map' replaces the local map when in read-only mode. (setq forms-mode-ro-map (make-keymap)) (suppress-keymap forms-mode-ro-map) (define-key forms-mode-ro-map "\C-c" forms-mode-map) - (define-key forms-mode-ro-map "q" 'forms-toggle-read-only) - (define-key forms-mode-ro-map "l" 'forms-jump-record) - (define-key forms-mode-ro-map "n" 'forms-next-record) - (define-key forms-mode-ro-map "p" 'forms-prev-record) - (define-key forms-mode-ro-map "r" 'forms-search-backward) - (define-key forms-mode-ro-map "s" 'forms-search-forward) - (define-key forms-mode-ro-map "x" 'forms-exit) - (define-key forms-mode-ro-map "<" 'forms-first-record) - (define-key forms-mode-ro-map ">" 'forms-last-record) - (define-key forms-mode-ro-map "?" 'describe-mode) - (define-key forms-mode-ro-map " " 'forms-next-record) + (define-key forms-mode-ro-map "q" #'forms-toggle-read-only) + (define-key forms-mode-ro-map "l" #'forms-jump-record) + (define-key forms-mode-ro-map "n" #'forms-next-record) + (define-key forms-mode-ro-map "p" #'forms-prev-record) + (define-key forms-mode-ro-map "r" #'forms-search-backward) + (define-key forms-mode-ro-map "s" #'forms-search-forward) + (define-key forms-mode-ro-map "x" #'forms-exit) + (define-key forms-mode-ro-map "<" #'forms-first-record) + (define-key forms-mode-ro-map ">" #'forms-last-record) + (define-key forms-mode-ro-map "?" #'describe-mode) + (define-key forms-mode-ro-map " " #'forms-next-record) (forms--mode-commands1 forms-mode-ro-map) (forms--mode-menu-ro forms-mode-ro-map) @@ -1395,13 +1386,13 @@ Commands: Equivalent keys in read-only mode: (defun forms--mode-commands1 (map) "Helper routine to define keys." - (define-key map "\t" 'forms-next-field) - (define-key map [S-tab] 'forms-prev-field) - (define-key map [next] 'forms-next-record) - (define-key map [prior] 'forms-prev-record) - (define-key map [begin] 'forms-first-record) - (define-key map [last] 'forms-last-record) - (define-key map [backtab] 'forms-prev-field) + (define-key map "\t" #'forms-next-field) + (define-key map [S-tab] #'forms-prev-field) + (define-key map [next] #'forms-next-record) + (define-key map [prior] #'forms-prev-record) + (define-key map [begin] #'forms-first-record) + (define-key map [last] #'forms-last-record) + (define-key map [backtab] #'forms-prev-field) ) ;;; Changed functions @@ -2034,8 +2025,7 @@ Usage: (setq forms-number-of-fields (defcustom forms--debug nil "If non-nil, enable Forms mode debugging." - :type 'boolean - :group 'forms) + :type 'boolean) (defun forms--debug (&rest args) "Internal debugging routine." @@ -2046,7 +2036,7 @@ Usage: (setq forms-number-of-fields (if (stringp el) el (concat (prin1-to-string el) " = " (if (boundp el) - (prin1-to-string (eval el)) + (prin1-to-string (symbol-value el)) "") "\n" (if (fboundp el) commit c1ce0747630e3a2b54c48ac4d00b0ab96454e646 Author: Stefan Monnier Date: Wed Mar 31 18:15:28 2021 -0400 * lisp/progmodes/dcl-mode.el: Use lexical-binding (dcl-guess-option-value, dcl-save-local-variable) (dcl-save-nondefault-options): Strength-reduce `eval` to `symbol-value`. diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 14eefdca1e..7107ae6ea1 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -1,4 +1,4 @@ -;;; dcl-mode.el --- major mode for editing DCL command files +;;; dcl-mode.el --- major mode for editing DCL command files -*- lexical-binding: t; -*- ;; Copyright (C) 1997, 2001-2021 Free Software Foundation, Inc. @@ -270,22 +270,22 @@ See `imenu-generic-expression' for details." (defvar dcl-mode-map (let ((map (make-sparse-keymap))) - (define-key map "\e\n" 'dcl-split-line) - (define-key map "\e\t" 'tempo-complete-tag) - (define-key map "\e^" 'dcl-delete-indentation) - (define-key map "\em" 'dcl-back-to-indentation) - (define-key map "\ee" 'dcl-forward-command) - (define-key map "\ea" 'dcl-backward-command) - (define-key map "\e\C-q" 'dcl-indent-command) - (define-key map "\t" 'dcl-tab) - (define-key map ":" 'dcl-electric-character) - (define-key map "F" 'dcl-electric-character) - (define-key map "f" 'dcl-electric-character) - (define-key map "E" 'dcl-electric-character) - (define-key map "e" 'dcl-electric-character) - (define-key map "\C-c\C-o" 'dcl-set-option) - (define-key map "\C-c\C-f" 'tempo-forward-mark) - (define-key map "\C-c\C-b" 'tempo-backward-mark) + (define-key map "\e\n" #'dcl-split-line) + (define-key map "\e\t" #'tempo-complete-tag) + (define-key map "\e^" #'dcl-delete-indentation) + (define-key map "\em" #'dcl-back-to-indentation) + (define-key map "\ee" #'dcl-forward-command) + (define-key map "\ea" #'dcl-backward-command) + (define-key map "\e\C-q" #'dcl-indent-command) + (define-key map "\t" #'dcl-tab) + (define-key map ":" #'dcl-electric-character) + (define-key map "F" #'dcl-electric-character) + (define-key map "f" #'dcl-electric-character) + (define-key map "E" #'dcl-electric-character) + (define-key map "e" #'dcl-electric-character) + (define-key map "\C-c\C-o" #'dcl-set-option) + (define-key map "\C-c\C-f" #'tempo-forward-mark) + (define-key map "\C-c\C-b" #'tempo-backward-mark) map) "Keymap used in DCL-mode buffers.") @@ -533,7 +533,7 @@ $ There is some minimal font-lock support (see vars `dcl-font-lock-defaults' and `dcl-font-lock-keywords')." - (setq-local indent-line-function 'dcl-indent-line) + (setq-local indent-line-function #'dcl-indent-line) (setq-local comment-start "!") (setq-local comment-end "") (setq-local comment-multi-line nil) @@ -547,7 +547,7 @@ There is some minimal font-lock support (see vars (setq imenu-generic-expression dcl-imenu-generic-expression) (setq imenu-case-fold-search t) - (setq imenu-create-index-function 'dcl-imenu-create-index-function) + (setq imenu-create-index-function #'dcl-imenu-create-index-function) (make-local-variable 'dcl-comment-line-regexp) (make-local-variable 'dcl-block-begin-regexp) @@ -1391,7 +1391,7 @@ regexps in `dcl-electric-reindent-regexps'." (let ((case-fold-search t)) ;; There must be a better way than (memq t ...). ;; (apply 'or ...) didn't work - (if (memq t (mapcar 'dcl-was-looking-at dcl-electric-reindent-regexps)) + (if (memq t (mapcar #'dcl-was-looking-at dcl-electric-reindent-regexps)) (dcl-indent-line))))) @@ -1567,7 +1567,7 @@ Must return a string." ((fboundp action) (funcall action option-assoc)) ((eq action 'toggle) - (not (eval option))) + (not (symbol-value option))) ((eq action 'curval) (cond ((or (stringp (symbol-value option)) (numberp (symbol-value option))) @@ -1735,7 +1735,7 @@ Set or update the value of VAR in the current buffers (setq continue nil) (beginning-of-line) (insert (concat prefix-string (symbol-name var) ": " - (prin1-to-string (eval var)) " " + (prin1-to-string (symbol-value var)) " " suffix-string "\n"))) ;; Is it the variable we are looking for? (if (eq var found-var) @@ -1748,7 +1748,7 @@ Set or update the value of VAR in the current buffers (delete-region (point) (progn (read (current-buffer)) (point))) (insert " ") - (prin1 (eval var) (current-buffer)) + (prin1 (symbol-value var) (current-buffer)) (skip-chars-backward "\n") (skip-chars-forward " \t") (or (if suffix (looking-at suffix) (eolp)) @@ -1781,7 +1781,7 @@ Set or update the value of VAR in the current buffers (concat " " comment-end)))))) (insert (concat def-prefix "Local variables:" def-suffix "\n")) (insert (concat def-prefix (symbol-name var) ": " - (prin1-to-string (eval var)) def-suffix "\n")) + (prin1-to-string (symbol-value var)) def-suffix "\n")) (insert (concat def-prefix "end:" def-suffix))) ))) @@ -1815,7 +1815,8 @@ still be present in the `Local Variables:' section with its old value." (option-name (symbol-name option))) (if (and (string-equal "dcl-" (substring option-name 0 4)) - (not (equal (default-value option) (eval option)))) + (not (equal (default-value option) + (symbol-value option)))) (dcl-save-local-variable option "$! ")))) dcl-option-alist)) commit ed320ebe2859530254f28d481cd164e1553fe607 Author: Michael Albinus Date: Wed Mar 31 21:12:09 2021 +0200 ; Fix last change diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 6440e577a9..73e0807dbc 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3759,7 +3759,7 @@ Fall back to normal file name handler if no Tramp handler exists." (cond ((getenv "EMACS_EMBA_CI") (tramp-set-connection-property - proc "gio-file-monitor" 'GInotifyMonitor)) + proc "gio-file-monitor" 'GInotifyFileMonitor)) ((eq system-type 'cygwin) (tramp-set-connection-property proc "gio-file-monitor" 'GPollFileMonitor)) commit 0f5bd3b7fa01a53bd170da90e556827f3e7f21bb Author: Michael Albinus Date: Wed Mar 31 21:09:55 2021 +0200 * lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter): Make assumption for emba. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index c2dab64d5b..6440e577a9 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3740,6 +3740,8 @@ Fall back to normal file name handler if no Tramp handler exists." "changes done" "changes-done-hint" string) string (tramp-compat-string-replace "renamed to" "moved" string)) + (when (getenv "EMACS_EMBA_CI") + (message "%s" string)) (catch 'doesnt-work ;; https://bugs.launchpad.net/bugs/1742946 @@ -3750,15 +3752,18 @@ Fall back to normal file name handler if no Tramp handler exists." ;; Determine monitor name. (unless (tramp-connection-property-p proc "gio-file-monitor") - (when (getenv "EMACS_EMBA_CI") - (message "%s" string)) (cond - ;; We have seen this only on cygwin gio, which uses the - ;; GPollFileMonitor. + ;; We have seen this on cygwin gio and on emba. Let's make some assumptions. ((string-match "Can't find module 'help' specified in GIO_USE_FILE_MONITOR" string) - (tramp-set-connection-property - proc "gio-file-monitor" 'GPollFileMonitor)) + (cond + ((getenv "EMACS_EMBA_CI") + (tramp-set-connection-property + proc "gio-file-monitor" 'GInotifyMonitor)) + ((eq system-type 'cygwin) + (tramp-set-connection-property + proc "gio-file-monitor" 'GPollFileMonitor)) + (t (tramp-error proc 'file-error "Cannot determine gio monitor")))) ;; TODO: What happens, if several monitor names are reported? ((string-match "\ Supported arguments for GIO_USE_FILE_MONITOR environment variable: commit f236b516b6041384ccb439aa8674c412cb785f42 Author: Stefan Kangas Date: Wed Mar 31 12:59:11 2021 +0200 Use lexical-binding in progmodes/inf-lisp.el * lisp/progmodes/inf-lisp.el: Use lexical-binding. Doc fixes. (inferior-lisp-mode-map, lisp-mode-map) (inferior-lisp-install-letter-bindings): Quote function symbols as such. (inferior-lisp-menu, lisp-compile-string, lisp-eval-string) (lisp-show-variable-documentation): Doc fixes. diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index af6ccce3d6..1ee54673d7 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -1,7 +1,6 @@ -;;; inf-lisp.el --- an inferior-lisp mode +;;; inf-lisp.el --- an inferior-lisp mode -*- lexical-binding: t -*- -;; Copyright (C) 1988, 1993-1994, 2001-2021 Free Software Foundation, -;; Inc. +;; Copyright (C) 1988-2021 Free Software Foundation, Inc. ;; Author: Olin Shivers ;; Keywords: processes, lisp @@ -23,13 +22,13 @@ ;;; Commentary: -;; Hacked from tea.el by Olin Shivers (shivers@cs.cmu.edu). 8/88 +;; Hacked from tea.el by Olin Shivers (shivers@cs.cmu.edu). 8/88 ;; This file defines a lisp-in-a-buffer package (inferior-lisp mode) ;; built on top of comint mode. This version is more featureful, ;; robust, and uniform than the Emacs 18 version. The key bindings are ;; also more compatible with the bindings of Hemlock and Zwei (the -;; Lisp Machine emacs). +;; Lisp Machine Emacs). ;; Since this mode is built on top of the general command-interpreter-in- ;; a-buffer mode (comint mode), it shares a common base functionality, @@ -40,19 +39,19 @@ ;; the hooks available for customizing it, see the file comint.el. ;; For further information on inferior-lisp mode, see the comments below. -;; Needs fixin: +;; Needs fixing: ;; The load-file/compile-file default mechanism could be smarter -- it ;; doesn't know about the relationship between filename extensions and -;; whether the file is source or executable. If you compile foo.lisp +;; whether the file is source or executable. If you compile foo.lisp ;; with compile-file, then the next load-file should use foo.bin for -;; the default, not foo.lisp. This is tricky to do right, particularly +;; the default, not foo.lisp. This is tricky to do right, particularly ;; because the extension for executable files varies so much (.o, .bin, ;; .lbin, .mo, .vo, .ao, ...). ;; ;; It would be nice if inferior-lisp (and inferior scheme, T, ...) modes ;; had a verbose minor mode wherein sending or compiling defuns, etc. ;; would be reflected in the transcript with suitable comments, e.g. -;; ";;; redefining fact". Several ways to do this. Which is right? +;; ";;; redefining fact". Several ways to do this. Which is right? ;; ;; When sending text from a source file to a subprocess, the process-mark can ;; move off the window, so you can lose sight of the process interactions. @@ -81,19 +80,19 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword (defvar inferior-lisp-mode-map (let ((map (copy-keymap comint-mode-map))) (set-keymap-parent map lisp-mode-shared-map) - (define-key map "\C-x\C-e" 'lisp-eval-last-sexp) - (define-key map "\C-c\C-l" 'lisp-load-file) - (define-key map "\C-c\C-k" 'lisp-compile-file) - (define-key map "\C-c\C-a" 'lisp-show-arglist) - (define-key map "\C-c\C-d" 'lisp-describe-sym) - (define-key map "\C-c\C-f" 'lisp-show-function-documentation) - (define-key map "\C-c\C-v" 'lisp-show-variable-documentation) + (define-key map "\C-x\C-e" #'lisp-eval-last-sexp) + (define-key map "\C-c\C-l" #'lisp-load-file) + (define-key map "\C-c\C-k" #'lisp-compile-file) + (define-key map "\C-c\C-a" #'lisp-show-arglist) + (define-key map "\C-c\C-d" #'lisp-describe-sym) + (define-key map "\C-c\C-f" #'lisp-show-function-documentation) + (define-key map "\C-c\C-v" #'lisp-show-variable-documentation) map)) (easy-menu-define inferior-lisp-menu inferior-lisp-mode-map - "Inferior Lisp Menu" + "Inferior Lisp Menu." '("Inf-Lisp" ["Eval Last Sexp" lisp-eval-last-sexp t] "--" @@ -107,20 +106,20 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword ;;; These commands augment Lisp mode, so you can process Lisp code in ;;; the source files. -(define-key lisp-mode-map "\M-\C-x" 'lisp-eval-defun) ; GNU convention -(define-key lisp-mode-map "\C-x\C-e" 'lisp-eval-last-sexp) ; GNU convention -(define-key lisp-mode-map "\C-c\C-e" 'lisp-eval-defun) -(define-key lisp-mode-map "\C-c\C-r" 'lisp-eval-region) -(define-key lisp-mode-map "\C-c\C-n" 'lisp-eval-form-and-next) -(define-key lisp-mode-map "\C-c\C-p" 'lisp-eval-paragraph) -(define-key lisp-mode-map "\C-c\C-c" 'lisp-compile-defun) -(define-key lisp-mode-map "\C-c\C-z" 'switch-to-lisp) -(define-key lisp-mode-map "\C-c\C-l" 'lisp-load-file) -(define-key lisp-mode-map "\C-c\C-k" 'lisp-compile-file) ; "kompile" file -(define-key lisp-mode-map "\C-c\C-a" 'lisp-show-arglist) -(define-key lisp-mode-map "\C-c\C-d" 'lisp-describe-sym) -(define-key lisp-mode-map "\C-c\C-f" 'lisp-show-function-documentation) -(define-key lisp-mode-map "\C-c\C-v" 'lisp-show-variable-documentation) +(define-key lisp-mode-map "\M-\C-x" #'lisp-eval-defun) ; GNU convention +(define-key lisp-mode-map "\C-x\C-e" #'lisp-eval-last-sexp) ; GNU convention +(define-key lisp-mode-map "\C-c\C-e" #'lisp-eval-defun) +(define-key lisp-mode-map "\C-c\C-r" #'lisp-eval-region) +(define-key lisp-mode-map "\C-c\C-n" #'lisp-eval-form-and-next) +(define-key lisp-mode-map "\C-c\C-p" #'lisp-eval-paragraph) +(define-key lisp-mode-map "\C-c\C-c" #'lisp-compile-defun) +(define-key lisp-mode-map "\C-c\C-z" #'switch-to-lisp) +(define-key lisp-mode-map "\C-c\C-l" #'lisp-load-file) +(define-key lisp-mode-map "\C-c\C-k" #'lisp-compile-file) ; "kompile" file +(define-key lisp-mode-map "\C-c\C-a" #'lisp-show-arglist) +(define-key lisp-mode-map "\C-c\C-d" #'lisp-describe-sym) +(define-key lisp-mode-map "\C-c\C-f" #'lisp-show-function-documentation) +(define-key lisp-mode-map "\C-c\C-v" #'lisp-show-variable-documentation) ;; This function exists for backwards compatibility. @@ -133,24 +132,23 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword ;;; (with-eval-after-load 'inf-lisp 'inferior-lisp-install-letter-bindings) ;;;You can modify this function to install just the bindings you want." (defun inferior-lisp-install-letter-bindings () - (define-key lisp-mode-map "\C-ce" 'lisp-eval-defun-and-go) - (define-key lisp-mode-map "\C-cr" 'lisp-eval-region-and-go) - (define-key lisp-mode-map "\C-cc" 'lisp-compile-defun-and-go) - (define-key lisp-mode-map "\C-cz" 'switch-to-lisp) - (define-key lisp-mode-map "\C-cl" 'lisp-load-file) - (define-key lisp-mode-map "\C-ck" 'lisp-compile-file) - (define-key lisp-mode-map "\C-ca" 'lisp-show-arglist) - (define-key lisp-mode-map "\C-cd" 'lisp-describe-sym) - (define-key lisp-mode-map "\C-cf" 'lisp-show-function-documentation) - (define-key lisp-mode-map "\C-cv" 'lisp-show-variable-documentation) - - (define-key inferior-lisp-mode-map "\C-cl" 'lisp-load-file) - (define-key inferior-lisp-mode-map "\C-ck" 'lisp-compile-file) - (define-key inferior-lisp-mode-map "\C-ca" 'lisp-show-arglist) - (define-key inferior-lisp-mode-map "\C-cd" 'lisp-describe-sym) - (define-key inferior-lisp-mode-map "\C-cf" 'lisp-show-function-documentation) - (define-key inferior-lisp-mode-map "\C-cv" - 'lisp-show-variable-documentation)) + (define-key lisp-mode-map "\C-ce" #'lisp-eval-defun-and-go) + (define-key lisp-mode-map "\C-cr" #'lisp-eval-region-and-go) + (define-key lisp-mode-map "\C-cc" #'lisp-compile-defun-and-go) + (define-key lisp-mode-map "\C-cz" #'switch-to-lisp) + (define-key lisp-mode-map "\C-cl" #'lisp-load-file) + (define-key lisp-mode-map "\C-ck" #'lisp-compile-file) + (define-key lisp-mode-map "\C-ca" #'lisp-show-arglist) + (define-key lisp-mode-map "\C-cd" #'lisp-describe-sym) + (define-key lisp-mode-map "\C-cf" #'lisp-show-function-documentation) + (define-key lisp-mode-map "\C-cv" #'lisp-show-variable-documentation) + + (define-key inferior-lisp-mode-map "\C-cl" #'lisp-load-file) + (define-key inferior-lisp-mode-map "\C-ck" #'lisp-compile-file) + (define-key inferior-lisp-mode-map "\C-ca" #'lisp-show-arglist) + (define-key inferior-lisp-mode-map "\C-cd" #'lisp-describe-sym) + (define-key inferior-lisp-mode-map "\C-cf" #'lisp-show-function-documentation) + (define-key inferior-lisp-mode-map "\C-cv" #'lisp-show-variable-documentation)) (defcustom inferior-lisp-program "lisp" "Program name for invoking an inferior Lisp in Inferior Lisp mode." @@ -181,7 +179,7 @@ franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" kcl: \"^>+ *\"" :type 'regexp) -(defvar inferior-lisp-buffer nil "*The current inferior-lisp process buffer. +(defvar inferior-lisp-buffer nil "*The current `inferior-lisp' process buffer. MULTIPLE PROCESS SUPPORT =========================================================================== @@ -326,18 +324,18 @@ Prefix argument means switch to the Lisp buffer afterwards." (if and-go (switch-to-lisp t))) (defun lisp-compile-string (string) - "Send the string to the inferior Lisp process to be compiled and executed." + "Send STRING to the inferior Lisp process to be compiled and executed." (comint-send-string (inferior-lisp-proc) (format "(funcall (compile nil (lambda () %s)))\n" string))) (defun lisp-eval-string (string) - "Send the string to the inferior Lisp process to be executed." + "Send STRING to the inferior Lisp process to be executed." (comint-send-string (inferior-lisp-proc) (concat string "\n"))) (defun lisp-do-defun (do-string do-region) "Send the current defun to the inferior Lisp process. -The actually processing is done by `do-string' and `do-region' +The actually processing is done by DO-STRING and DO-REGION which determine whether the code is compiled before evaluation. DEFVAR forms reset the variables to the init values." (save-excursion @@ -460,7 +458,7 @@ With argument, positions cursor at end of buffer." ;;; (interactive "r") ;;; (save-excursion ;;; (goto-char start) (end-of-defun) (beginning-of-defun) ; error check -;;; (if (< (point) start) (error "region begins in middle of defun")) +;;; (if (< (point) start) (error "Region begins in middle of defun")) ;;; (goto-char start) ;;; (let ((s start)) ;;; (end-of-defun) @@ -591,7 +589,7 @@ See variable `lisp-function-doc-command'." (format lisp-function-doc-command fn))) (defun lisp-show-variable-documentation (var) - "Send a command to the inferior Lisp to give documentation for function FN. + "Send a command to the inferior Lisp to give documentation for variable VAR. See variable `lisp-var-doc-command'." (interactive (lisp-symprompt "Variable doc" (lisp-var-at-pt))) (comint-proc-query (inferior-lisp-proc) (format lisp-var-doc-command var))) @@ -620,8 +618,8 @@ See variable `lisp-describe-sym-command'." (error "No Lisp subprocess; see variable `inferior-lisp-buffer'")))) -;;; Do the user's customization... -;;;=============================== +;; Obsolete. + (defvar inferior-lisp-load-hook nil "This hook is run when the library `inf-lisp' is loaded.") (make-obsolete-variable 'inferior-lisp-load-hook commit 97992a342be65cd448dd115e75686d269734bf68 Author: Michael Albinus Date: Wed Mar 31 11:37:35 2021 +0200 ; * lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter): ; Instrument for emba. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 1764f2ef03..c2dab64d5b 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -3750,6 +3750,8 @@ Fall back to normal file name handler if no Tramp handler exists." ;; Determine monitor name. (unless (tramp-connection-property-p proc "gio-file-monitor") + (when (getenv "EMACS_EMBA_CI") + (message "%s" string)) (cond ;; We have seen this only on cygwin gio, which uses the ;; GPollFileMonitor.