summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-04-19 18:46:50 +0200
committerAndrea Corallo <akrl@sdf.org>2021-04-19 18:46:50 +0200
commitb5c76530fab4b99e76249bfb9a105b30bef4ce67 (patch)
tree319d7a65b6f818cebed9833534a423fbcb79a9b5 /lisp
parente54066f3d459f67a1ee4e44552bf0356d010e03f (diff)
parent0a4dc70830f5e8286b47120cabc750cca07a75c1 (diff)
downloademacs-b5c76530fab4b99e76249bfb9a105b30bef4ce67.tar.gz
emacs-b5c76530fab4b99e76249bfb9a105b30bef4ce67.tar.bz2
emacs-b5c76530fab4b99e76249bfb9a105b30bef4ce67.zip
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp')
-rw-r--r--lisp/align.el2
-rw-r--r--lisp/allout-widgets.el5
-rw-r--r--lisp/allout.el1
-rw-r--r--lisp/autorevert.el1
-rw-r--r--lisp/bs.el1
-rw-r--r--lisp/calc/calc-menu.el2
-rw-r--r--lisp/calc/calc-nlfit.el2
-rw-r--r--lisp/cedet/semantic/bovine/el.el2
-rw-r--r--lisp/cedet/semantic/db-ebrowse.el2
-rw-r--r--lisp/cus-edit.el2
-rw-r--r--lisp/cus-face.el2
-rw-r--r--lisp/cus-theme.el6
-rw-r--r--lisp/custom.el2
-rw-r--r--lisp/dframe.el2
-rw-r--r--lisp/dos-w32.el2
-rw-r--r--lisp/emacs-lisp/bindat.el33
-rw-r--r--lisp/emacs-lisp/bytecomp.el63
-rw-r--r--lisp/emacs-lisp/cconv.el2
-rw-r--r--lisp/emacs-lisp/check-declare.el2
-rw-r--r--lisp/emacs-lisp/cl-indent.el2
-rw-r--r--lisp/emacs-lisp/cl-macs.el4
-rw-r--r--lisp/emacs-lisp/debug.el2
-rw-r--r--lisp/emacs-lisp/easy-mmode.el38
-rw-r--r--lisp/emacs-lisp/edebug.el3
-rw-r--r--lisp/emacs-lisp/eieio-core.el12
-rw-r--r--lisp/emacs-lisp/eieio-custom.el2
-rw-r--r--lisp/emacs-lisp/eieio-opt.el2
-rw-r--r--lisp/emacs-lisp/eieio-speedbar.el2
-rw-r--r--lisp/emacs-lisp/eieio.el2
-rw-r--r--lisp/emacs-lisp/faceup.el5
-rw-r--r--lisp/emacs-lisp/lisp-mnt.el5
-rw-r--r--lisp/emacs-lisp/ring.el2
-rw-r--r--lisp/emacs-lisp/tcover-ses.el4
-rw-r--r--lisp/emacs-lisp/testcover.el4
-rw-r--r--lisp/emacs-lisp/text-property-search.el2
-rw-r--r--lisp/emacs-lisp/unsafep.el2
-rw-r--r--lisp/emulation/edt-mapper.el2
-rw-r--r--lisp/erc/erc-button.el2
-rw-r--r--lisp/erc/erc-desktop-notifications.el2
-rw-r--r--lisp/erc/erc-goodies.el2
-rw-r--r--lisp/erc/erc-imenu.el2
-rw-r--r--lisp/erc/erc-menu.el2
-rw-r--r--lisp/erc/erc-page.el2
-rw-r--r--lisp/erc/erc-replace.el2
-rw-r--r--lisp/erc/erc-ring.el2
-rw-r--r--lisp/eshell/em-xtra.el44
-rw-r--r--lisp/expand.el1
-rw-r--r--lisp/filecache.el4
-rw-r--r--lisp/filenotify.el1
-rw-r--r--lisp/files.el2
-rw-r--r--lisp/gnus/gnus-cus.el2
-rw-r--r--lisp/gnus/gnus-diary.el5
-rw-r--r--lisp/gnus/gnus-group.el3
-rw-r--r--lisp/gnus/gnus-notifications.el2
-rw-r--r--lisp/gnus/gnus-registry.el2
-rw-r--r--lisp/gnus/legacy-gnus-agent.el2
-rw-r--r--lisp/gnus/message.el24
-rw-r--r--lisp/gnus/mm-archive.el2
-rw-r--r--lisp/gnus/nnselect.el1
-rw-r--r--lisp/gnus/spam-report.el2
-rw-r--r--lisp/icomplete.el1
-rw-r--r--lisp/info.el2
-rw-r--r--lisp/isearch.el4
-rw-r--r--lisp/language/burmese.el2
-rw-r--r--lisp/language/cham.el2
-rw-r--r--lisp/language/khmer.el2
-rw-r--r--lisp/language/sinhala.el2
-rw-r--r--lisp/language/tai-viet.el2
-rw-r--r--lisp/language/thai-word.el4
-rw-r--r--lisp/language/tv-util.el3
-rw-r--r--lisp/leim/quail/croatian.el2
-rw-r--r--lisp/leim/quail/hebrew.el2
-rw-r--r--lisp/leim/quail/persian.el2
-rw-r--r--lisp/ls-lisp.el2
-rw-r--r--lisp/mail/rmail-spam-filter.el2
-rw-r--r--lisp/mail/uudecode.el2
-rw-r--r--lisp/mh-e/mh-acros.el2
-rw-r--r--lisp/mh-e/mh-alias.el2
-rw-r--r--lisp/mh-e/mh-buffers.el2
-rw-r--r--lisp/mh-e/mh-comp.el2
-rw-r--r--lisp/mh-e/mh-compat.el2
-rw-r--r--lisp/mh-e/mh-folder.el2
-rw-r--r--lisp/mh-e/mh-funcs.el2
-rw-r--r--lisp/mh-e/mh-gnus.el2
-rw-r--r--lisp/mh-e/mh-identity.el2
-rw-r--r--lisp/mh-e/mh-inc.el2
-rw-r--r--lisp/mh-e/mh-junk.el2
-rw-r--r--lisp/mh-e/mh-letter.el2
-rw-r--r--lisp/mh-e/mh-limit.el2
-rw-r--r--lisp/mh-e/mh-mime.el2
-rw-r--r--lisp/mh-e/mh-print.el2
-rw-r--r--lisp/mh-e/mh-scan.el2
-rw-r--r--lisp/mh-e/mh-search.el6
-rw-r--r--lisp/mh-e/mh-seq.el2
-rw-r--r--lisp/mh-e/mh-show.el4
-rw-r--r--lisp/mh-e/mh-speed.el2
-rw-r--r--lisp/mh-e/mh-thread.el2
-rw-r--r--lisp/mh-e/mh-tool-bar.el2
-rw-r--r--lisp/mh-e/mh-utils.el2
-rw-r--r--lisp/mh-e/mh-xface.el2
-rw-r--r--lisp/misearch.el2
-rw-r--r--lisp/net/ange-ftp.el4
-rw-r--r--lisp/net/newst-ticker.el2
-rw-r--r--lisp/net/rcirc.el5
-rw-r--r--lisp/net/secrets.el2
-rw-r--r--lisp/net/sieve-manage.el2
-rw-r--r--lisp/net/sieve-mode.el2
-rw-r--r--lisp/net/sieve.el2
-rw-r--r--lisp/net/tramp-cmds.el42
-rw-r--r--lisp/net/tramp-sh.el78
-rw-r--r--lisp/net/tramp.el3
-rw-r--r--lisp/notifications.el2
-rw-r--r--lisp/nxml/rng-cmpct.el2
-rw-r--r--lisp/nxml/xmltok.el45
-rw-r--r--lisp/obsolete/fast-lock.el2
-rw-r--r--lisp/obsolete/info-edit.el2
-rw-r--r--lisp/obsolete/lazy-lock.el2
-rw-r--r--lisp/obsolete/nnir.el1
-rw-r--r--lisp/obsolete/old-emacs-lock.el4
-rw-r--r--lisp/obsolete/otodo-mode.el4
-rw-r--r--lisp/obsolete/sb-image.el2
-rw-r--r--lisp/obsolete/sregex.el4
-rw-r--r--lisp/obsolete/tpu-mapper.el2
-rw-r--r--lisp/org/ob-hledger.el2
-rw-r--r--lisp/org/ob-mscgen.el4
-rw-r--r--lisp/org/ol-eshell.el2
-rw-r--r--lisp/org/org-ctags.el4
-rw-r--r--lisp/org/ox-man.el2
-rw-r--r--lisp/progmodes/bug-reference.el2
-rw-r--r--lisp/progmodes/cc-awk.el2
-rw-r--r--lisp/progmodes/cc-bytecomp.el13
-rw-r--r--lisp/progmodes/cc-cmds.el1
-rw-r--r--lisp/progmodes/cc-defs.el199
-rw-r--r--lisp/progmodes/cc-engine.el41
-rw-r--r--lisp/progmodes/cc-fonts.el25
-rw-r--r--lisp/progmodes/cc-guess.el4
-rw-r--r--lisp/progmodes/cc-langs.el17
-rw-r--r--lisp/progmodes/cc-mode.el2
-rw-r--r--lisp/progmodes/glasses.el4
-rw-r--r--lisp/progmodes/gud.el15
-rw-r--r--lisp/progmodes/idlw-shell.el2
-rw-r--r--lisp/progmodes/idlwave.el2
-rw-r--r--lisp/progmodes/js.el7
-rw-r--r--lisp/progmodes/meta-mode.el3
-rw-r--r--lisp/progmodes/project.el25
-rw-r--r--lisp/progmodes/python.el2
-rw-r--r--lisp/progmodes/sql.el4
-rw-r--r--lisp/progmodes/xref.el3
-rw-r--r--lisp/repeat.el125
-rw-r--r--lisp/ses.el2
-rw-r--r--lisp/speedbar.el5
-rw-r--r--lisp/term/konsole.el2
-rw-r--r--lisp/term/linux.el4
-rw-r--r--lisp/term/lk201.el2
-rw-r--r--lisp/term/screen.el2
-rw-r--r--lisp/term/st.el2
-rw-r--r--lisp/term/tmux.el2
-rw-r--r--lisp/term/w32console.el2
-rw-r--r--lisp/textmodes/artist.el2
-rw-r--r--lisp/textmodes/bibtex-style.el1
-rw-r--r--lisp/textmodes/bibtex.el3
-rw-r--r--lisp/textmodes/makeinfo.el1
-rw-r--r--lisp/textmodes/page.el2
-rw-r--r--lisp/textmodes/paragraphs.el8
-rw-r--r--lisp/textmodes/remember.el2
-rw-r--r--lisp/textmodes/table.el2
-rw-r--r--lisp/textmodes/tex-mode.el1
-rw-r--r--lisp/textmodes/texinfmt.el6
-rw-r--r--lisp/textmodes/texnfo-upd.el2
-rw-r--r--lisp/textmodes/tildify.el2
-rw-r--r--lisp/textmodes/two-column.el11
-rw-r--r--lisp/uniquify.el2
-rw-r--r--lisp/url/url-mailto.el2
-rw-r--r--lisp/vc/vc-dispatcher.el2
-rw-r--r--lisp/vc/vc-filewise.el2
-rw-r--r--lisp/vc/vc-hg.el4
-rw-r--r--lisp/widget.el2
177 files changed, 615 insertions, 625 deletions
diff --git a/lisp/align.el b/lisp/align.el
index 7ae067f8c53..a0b626a5c43 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -1587,8 +1587,6 @@ aligner would have dealt with are."
(if report
(message "Aligning...done"))))
-;; Provide:
-
(provide 'align)
(run-hooks 'align-load-hook)
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index 931dfbc961e..0e127040886 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -1,4 +1,4 @@
-;; allout-widgets.el --- Visually highlight allout outline structure. -*- lexical-binding: t; -*-
+;;; allout-widgets.el --- Visually highlight allout outline structure. -*- lexical-binding: t; -*-
;; Copyright (C) 2005-2021 Free Software Foundation, Inc.
@@ -2290,10 +2290,11 @@ The elements of LIST are not copied, just the list structure itself."
(define-obsolete-function-alias 'allout-frame-property #'frame-parameter "28.1")
-;;;_ : provide
(provide 'allout-widgets)
;;;_ . Local emacs vars.
;;;_ , Local variables:
;;;_ , allout-layout: (-1 : 0)
;;;_ , End:
+
+;;; allout-widgets.el ends here
diff --git a/lisp/allout.el b/lisp/allout.el
index f50f5fd4b2c..1605ce2ce33 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -6457,7 +6457,6 @@ If BEG is bigger than END we return 0."
(isearch-repeat 'forward)
(isearch-mode t)))
-;;;_ #11 Provide
(provide 'allout)
;;;_* Local emacs vars.
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 1bb40c90ff5..edd4c7e5e45 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -937,7 +937,6 @@ the timer when no buffers need to be checked."
(cancel-timer auto-revert-timer))
(setq auto-revert-timer nil)))))
-;; The end:
(provide 'autorevert)
(run-hooks 'auto-revert-load-hook)
diff --git a/lisp/bs.el b/lisp/bs.el
index 154e3599f33..494bc426188 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -1504,7 +1504,6 @@ name of buffer configuration."
;; continue standard unloading
nil)
-;; Now provide feature bs
(provide 'bs)
;;; bs.el ends here
diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el
index ac14e36c63c..516f62d7b63 100644
--- a/lisp/calc/calc-menu.el
+++ b/lisp/calc/calc-menu.el
@@ -1669,3 +1669,5 @@
["Quit" calc-quit]))
(provide 'calc-menu)
+
+;;; calc-menu.el ends here
diff --git a/lisp/calc/calc-nlfit.el b/lisp/calc/calc-nlfit.el
index 11867f15e5b..f676b098e58 100644
--- a/lisp/calc/calc-nlfit.el
+++ b/lisp/calc/calc-nlfit.el
@@ -819,3 +819,5 @@
(calc-record traillist "parm")))))
(provide 'calc-nlfit)
+
+;;; calc-nlfit.el ends here
diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el
index 1170e716878..ebb20448ed5 100644
--- a/lisp/cedet/semantic/bovine/el.el
+++ b/lisp/cedet/semantic/bovine/el.el
@@ -585,7 +585,7 @@ Overrides `semantic-nonterminal-static'."
;;; Context parsing
;;
-;; Emacs lisp is very different from C,C++ which most context parsing
+;; Emacs Lisp is very different from C,C++ which most context parsing
;; functions are written. Support them here.
(define-mode-local-override semantic-up-context emacs-lisp-mode
(&optional _point _bounds-type)
diff --git a/lisp/cedet/semantic/db-ebrowse.el b/lisp/cedet/semantic/db-ebrowse.el
index efdf3dfa47a..682a4ccac48 100644
--- a/lisp/cedet/semantic/db-ebrowse.el
+++ b/lisp/cedet/semantic/db-ebrowse.el
@@ -222,7 +222,7 @@ warn instead."
;JAVE this just instantiates a default empty ebrowse struct?
; how would new instances wind up here?
-; the ebrowse class isn't singleton, unlike the emacs lisp one
+; the ebrowse class isn't singleton, unlike the Emacs Lisp one
(defvar-mode-local c++-mode semanticdb-project-system-databases
()
"Search Ebrowse for symbols.")
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index dde6e8997bf..7627930c4c8 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -5155,8 +5155,6 @@ if that value is non-nil."
(put 'Custom-mode 'mode-class 'special)
-;;; The End.
-
(provide 'cus-edit)
;;; cus-edit.el ends here
diff --git a/lisp/cus-face.el b/lisp/cus-face.el
index 21fe89c6214..6c0052bf860 100644
--- a/lisp/cus-face.el
+++ b/lisp/cus-face.el
@@ -395,8 +395,6 @@ This means reset FACE to its value in FROM-THEME."
(define-obsolete-function-alias 'custom-facep #'facep "28.1")
-;;; The End.
-
(provide 'cus-face)
;;; cus-face.el ends here
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index a702fedd245..13fb9f34fa0 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -1,7 +1,7 @@
-;;; cus-theme.el -- custom theme creation user interface -*- lexical-binding: t -*-
-;;
+;;; cus-theme.el --- custom theme creation user interface -*- lexical-binding: t -*-
+
;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
-;;
+
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: emacs-devel@gnu.org
;; Keywords: help, faces
diff --git a/lisp/custom.el b/lisp/custom.el
index 85e5d65ffb2..2c9eadbd479 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -1623,8 +1623,6 @@ If a choice with the same tag already exists, no action is taken."
(put variable 'custom-type
(append choices (list choice))))))
-;;; The End.
-
(provide 'custom)
;;; custom.el ends here
diff --git a/lisp/dframe.el b/lisp/dframe.el
index f4208f3755a..1ddf11a8aac 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -1,4 +1,4 @@
-;;; dframe --- dedicate frame support modes -*- lexical-binding:t -*-
+;;; dframe.el --- dedicate frame support modes -*- lexical-binding:t -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el
index cf753214624..45daaad8eff 100644
--- a/lisp/dos-w32.el
+++ b/lisp/dos-w32.el
@@ -1,4 +1,4 @@
-;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms -*- lexical-binding: t; -*-
+;;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms -*- lexical-binding: t; -*-
;; Copyright (C) 1996, 2001-2021 Free Software Foundation, Inc.
diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el
index 98994963e3e..247fb91379e 100644
--- a/lisp/emacs-lisp/bindat.el
+++ b/lisp/emacs-lisp/bindat.el
@@ -167,7 +167,7 @@
(defun bindat--unpack-strz (len)
(let ((i 0) s)
- (while (and (< i len) (/= (aref bindat-raw (+ bindat-idx i)) 0))
+ (while (and (if len (< i len) t) (/= (aref bindat-raw (+ bindat-idx i)) 0))
(setq i (1+ i)))
(setq s (substring bindat-raw bindat-idx (+ bindat-idx i)))
(setq bindat-idx (+ bindat-idx len))
@@ -439,6 +439,12 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..."
(aset bindat-raw (+ bindat-idx i) (aref v i)))
(setq bindat-idx (+ bindat-idx len)))
+(defun bindat--pack-strz (v)
+ (let ((len (length v)))
+ (dotimes (i len)
+ (aset bindat-raw (+ bindat-idx i) (aref v i)))
+ (setq bindat-idx (+ bindat-idx len 1))))
+
(defun bindat--pack-bits (len v)
(let ((bnum (1- (* 8 len))) j m)
(while (>= bnum 0)
@@ -677,14 +683,23 @@ is the name of a variable that will hold the value we need to pack.")
(`(length . ,_) `(cl-incf bindat-idx ,len))
(`(pack . ,args) `(bindat--pack-str ,len . ,args))))
-(cl-defmethod bindat--type (op (_ (eql strz)) len)
+(cl-defmethod bindat--type (op (_ (eql strz)) &optional len)
(bindat--pcase op
('unpack `(bindat--unpack-strz ,len))
- (`(length . ,_) `(cl-incf bindat-idx ,len))
- ;; Here we don't add the terminating zero because we rely
- ;; on the fact that `bindat-raw' was presumably initialized with
- ;; all-zeroes before we started.
- (`(pack . ,args) `(bindat--pack-str ,len . ,args))))
+ (`(length ,val)
+ `(cl-incf bindat-idx ,(cond
+ ((null len) `(length ,val))
+ ((numberp len) len)
+ (t `(or ,len (length ,val))))))
+ (`(pack . ,args)
+ (macroexp-let2 nil len len
+ `(if ,len
+ ;; Same as non-zero terminated strings since we don't actually add
+ ;; the terminating zero anyway (because we rely on the fact that
+ ;; `bindat-raw' was presumably initialized with all-zeroes before
+ ;; we started).
+ (bindat--pack-str ,len . ,args)
+ (bindat--pack-strz . ,args))))))
(cl-defmethod bindat--type (op (_ (eql bits)) len)
(bindat--pcase op
@@ -812,7 +827,7 @@ is the name of a variable that will hold the value we need to pack.")
'(&or ["uint" def-form]
["uintr" def-form]
["str" def-form]
- ["strz" def-form]
+ ["strz" &optional def-form]
["bits" def-form]
["fill" def-form]
["align" def-form]
@@ -832,7 +847,7 @@ TYPE is a Bindat type expression. It can take the following forms:
uint BITLEN - Big-endian unsigned integer
uintr BITLEN - Little-endian unsigned integer
str LEN - Byte string
- strz LEN - Zero-terminated byte-string
+ strz [LEN] - Zero-terminated byte-string
bits LEN - Bit vector (LEN is counted in bytes)
fill LEN - Just a filler
align LEN - Fill up to the next multiple of LEN bytes
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 30d59137482..9be54ca4f5e 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -4715,10 +4715,15 @@ binding slots have been popped."
(defun byte-compile-condition-case (form)
(let* ((var (nth 1 form))
(body (nth 2 form))
+ (handlers (nthcdr 3 form))
(depth byte-compile-depth)
+ (success-handler (assq :success handlers))
+ (failure-handlers (if success-handler
+ (remq success-handler handlers)
+ handlers))
(clauses (mapcar (lambda (clause)
(cons (byte-compile-make-tag) clause))
- (nthcdr 3 form)))
+ failure-handlers))
(endtag (byte-compile-make-tag)))
(byte-compile-set-symbol-position 'condition-case)
(unless (symbolp var)
@@ -4744,30 +4749,40 @@ binding slots have been popped."
(byte-compile-form body) ;; byte-compile--for-effect
(dolist (_ clauses) (byte-compile-out 'byte-pophandler))
- (byte-compile-goto 'byte-goto endtag)
- (while clauses
- (let ((clause (pop clauses))
- (byte-compile-bound-variables byte-compile-bound-variables)
- (byte-compile--lexical-environment
- byte-compile--lexical-environment))
- (setq byte-compile-depth (1+ depth))
- (byte-compile-out-tag (pop clause))
- (dolist (_ clauses) (byte-compile-out 'byte-pophandler))
- (cond
- ((null var) (byte-compile-discard))
- (lexical-binding
- (push (cons var (1- byte-compile-depth))
- byte-compile--lexical-environment))
- (t (byte-compile-dynamic-variable-bind var)))
- (byte-compile-body (cdr clause)) ;; byte-compile--for-effect
- (cond
- ((null var) nil)
- (lexical-binding (byte-compile-discard 1 'preserve-tos))
- (t (byte-compile-out 'byte-unbind 1)))
- (byte-compile-goto 'byte-goto endtag)))
-
- (byte-compile-out-tag endtag)))
+ (let ((compile-handler-body
+ (lambda (body)
+ (let ((byte-compile-bound-variables byte-compile-bound-variables)
+ (byte-compile--lexical-environment
+ byte-compile--lexical-environment))
+ (cond
+ ((null var) (byte-compile-discard))
+ (lexical-binding
+ (push (cons var (1- byte-compile-depth))
+ byte-compile--lexical-environment))
+ (t (byte-compile-dynamic-variable-bind var)))
+
+ (byte-compile-body body) ;; byte-compile--for-effect
+
+ (cond
+ ((null var))
+ (lexical-binding (byte-compile-discard 1 'preserve-tos))
+ (t (byte-compile-out 'byte-unbind 1)))))))
+
+ (when success-handler
+ (funcall compile-handler-body (cdr success-handler)))
+
+ (byte-compile-goto 'byte-goto endtag)
+
+ (while clauses
+ (let ((clause (pop clauses)))
+ (setq byte-compile-depth (1+ depth))
+ (byte-compile-out-tag (pop clause))
+ (dolist (_ clauses) (byte-compile-out 'byte-pophandler))
+ (funcall compile-handler-body (cdr clause))
+ (byte-compile-goto 'byte-goto endtag)))
+
+ (byte-compile-out-tag endtag))))
(defun byte-compile-save-excursion (form)
(if (and (eq 'set-buffer (car-safe (car-safe (cdr form))))
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el
index b37cfebab31..f6637109028 100644
--- a/lisp/emacs-lisp/cconv.el
+++ b/lisp/emacs-lisp/cconv.el
@@ -1,4 +1,4 @@
-;;; cconv.el --- Closure conversion for statically scoped Emacs lisp. -*- lexical-binding: t -*-
+;;; cconv.el --- Closure conversion for statically scoped Emacs Lisp. -*- lexical-binding: t -*-
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el
index 7c2b23b4ec4..bec4ad92503 100644
--- a/lisp/emacs-lisp/check-declare.el
+++ b/lisp/emacs-lisp/check-declare.el
@@ -328,4 +328,4 @@ Returns non-nil if any false statements are found."
(provide 'check-declare)
-;;; check-declare.el ends here.
+;;; check-declare.el ends here
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index 7d0bfc88b15..c88e15d5a8b 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -27,7 +27,7 @@
;; This package supplies a single entry point, common-lisp-indent-function,
;; which performs indentation in the preferred style for Common Lisp code.
-;; It is also a suitable function for indenting Emacs lisp code.
+;; It is also a suitable function for indenting Emacs Lisp code.
;;
;; To enable it:
;;
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 8b2d3c413af..d7e6c307ed3 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2144,7 +2144,9 @@ Like `cl-flet' but the definitions can refer to previous ones.
((and `(condition-case ,err-var ,bodyform . ,handlers)
(guard (not (eq err-var var))))
`(condition-case ,err-var
- (progn (setq ,retvar ,bodyform) nil)
+ ,(if (assq :success handlers)
+ bodyform
+ `(progn (setq ,retvar ,bodyform) nil))
. ,(mapcar (lambda (h)
(cons (car h) (funcall opt-exps (cdr h))))
handlers)))
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index b2d54c77feb..069c7a90ad0 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -213,7 +213,7 @@ the debugger will not be entered."
last-input-event last-command-event last-nonmenu-event
last-event-frame
overriding-local-map
- load-read-function
+ (load-read-function #'read)
;; If we are inside a minibuffer, allow nesting
;; so that we don't get an error from the `e' command.
(enable-recursive-minibuffers
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index e23ff5ae513..2dd1524a71e 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -116,7 +116,7 @@ it is disabled.")
doc nil nil 1)))))
;;;###autoload
-(defalias 'easy-mmode-define-minor-mode 'define-minor-mode)
+(defalias 'easy-mmode-define-minor-mode #'define-minor-mode)
;;;###autoload
(defmacro define-minor-mode (mode doc &optional init-value lighter keymap &rest body)
"Define a new minor mode MODE.
@@ -143,9 +143,9 @@ BODY contains code to execute each time the mode is enabled or disabled.
It is executed after toggling the mode, and before running MODE-hook.
Before the actual body code, you can write keyword arguments, i.e.
alternating keywords and values. If you provide BODY, then you must
- provide at least one keyword argument. The following special
- keywords are supported (other keywords are passed to `defcustom' if
- the minor mode is global):
+ provide at least one keyword argument (e.g. `:lighter nil`).
+ The following special keywords are supported (other keywords are passed
+ to `defcustom' if the minor mode is global):
:global GLOBAL If non-nil specifies that the minor mode is not meant to be
buffer-local, so don't make the variable MODE buffer-local.
@@ -186,9 +186,11 @@ For example, you could write
...BODY CODE...)
For backward compatibility with the Emacs<21 calling convention,
-BODY can also start with the triplet INIT-VALUE LIGHTER KEYMAP."
+the keywords can also be preceded by the obsolete triplet
+INIT-VALUE LIGHTER KEYMAP.
+
+\(fn MODE DOC [KEYWORD VAL ... &rest BODY])"
(declare (doc-string 2)
- (advertised-calling-convention (mode doc &rest body) "28.1")
(debug (&define name string-or-null-p
[&optional [&not keywordp] sexp
&optional [&not keywordp] sexp
@@ -267,7 +269,7 @@ BODY can also start with the triplet INIT-VALUE LIGHTER KEYMAP."
(unless set (setq set '(:set #'custom-set-minor-mode)))
(unless initialize
- (setq initialize '(:initialize 'custom-initialize-default)))
+ (setq initialize '(:initialize #'custom-initialize-default)))
;; TODO? Mark booleans as safe if booleanp? Eg abbrev-mode.
(unless type (setq type '(:type 'boolean)))
@@ -405,9 +407,9 @@ No problems result if this variable is not bound.
;;;
;;;###autoload
-(defalias 'easy-mmode-define-global-mode 'define-globalized-minor-mode)
+(defalias 'easy-mmode-define-global-mode #'define-globalized-minor-mode)
;;;###autoload
-(defalias 'define-global-minor-mode 'define-globalized-minor-mode)
+(defalias 'define-global-minor-mode #'define-globalized-minor-mode)
;;;###autoload
(defmacro define-globalized-minor-mode (global-mode mode turn-on &rest body)
"Make a global mode GLOBAL-MODE corresponding to buffer-local minor MODE.
@@ -509,12 +511,12 @@ disable it. If called from Lisp, enable the mode if ARG is omitted or nil.\n\n"
(if ,global-mode
(progn
(add-hook 'after-change-major-mode-hook
- ',MODE-enable-in-buffers)
- (add-hook 'find-file-hook ',MODE-check-buffers)
- (add-hook 'change-major-mode-hook ',MODE-cmhh))
- (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers)
- (remove-hook 'find-file-hook ',MODE-check-buffers)
- (remove-hook 'change-major-mode-hook ',MODE-cmhh))
+ #',MODE-enable-in-buffers)
+ (add-hook 'find-file-hook #',MODE-check-buffers)
+ (add-hook 'change-major-mode-hook #',MODE-cmhh))
+ (remove-hook 'after-change-major-mode-hook #',MODE-enable-in-buffers)
+ (remove-hook 'find-file-hook #',MODE-check-buffers)
+ (remove-hook 'change-major-mode-hook #',MODE-cmhh))
;; Go through existing buffers.
(dolist (buf (buffer-list))
@@ -554,7 +556,7 @@ list."
;; A function which checks whether MODE has been disabled in the major
;; mode hook which has just been run.
- (add-hook ',minor-MODE-hook ',MODE-set-explicitly)
+ (add-hook ',minor-MODE-hook #',MODE-set-explicitly)
;; List of buffers left to process.
(defvar ,MODE-buffers nil)
@@ -581,13 +583,13 @@ list."
(defun ,MODE-check-buffers ()
(,MODE-enable-in-buffers)
- (remove-hook 'post-command-hook ',MODE-check-buffers))
+ (remove-hook 'post-command-hook #',MODE-check-buffers))
(put ',MODE-check-buffers 'definition-name ',global-mode)
;; The function that catches kill-all-local-variables.
(defun ,MODE-cmhh ()
(add-to-list ',MODE-buffers (current-buffer))
- (add-hook 'post-command-hook ',MODE-check-buffers))
+ (add-hook 'post-command-hook #',MODE-check-buffers))
(put ',MODE-cmhh 'definition-name ',global-mode))))
(defun easy-mmode--globalized-predicate-p (predicate)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index cbc40193125..b08ee3c4a17 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -459,6 +459,9 @@ invoked without a prefix argument.
If acting on a `defun' for FUNCTION, and the function was instrumented,
`Edebug: FUNCTION' is printed in the minibuffer. If not instrumented,
just FUNCTION is printed."
+ ;; Re-install our advice, in case `debug' re-bound `load-read-function' to
+ ;; its default value.
+ (add-function :around load-read-function #'edebug--read)
(let* ((edebug-all-forms (not (eq (not edebug-it) (not edebug-all-defs))))
(edebug-all-defs edebug-all-forms))
(funcall orig-fun nil)))
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index e7727fd3fc9..2923dffd951 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -169,7 +169,7 @@ Return nil if that option doesn't exist."
(and (recordp obj)
(eieio--class-p (eieio--object-class obj))))
-(define-obsolete-function-alias 'object-p 'eieio-object-p "25.1")
+(define-obsolete-function-alias 'object-p #'eieio-object-p "25.1")
(defun class-abstract-p (class)
"Return non-nil if CLASS is abstract.
@@ -242,9 +242,9 @@ use \\='%s or turn off `eieio-backward-compatibility' instead" cname)
(cl-deftype list-of (elem-type)
`(and list
- (satisfies (lambda (list)
- (cl-every (lambda (elem) (cl-typep elem ',elem-type))
- list)))))
+ (satisfies ,(lambda (list)
+ (cl-every (lambda (elem) (cl-typep elem elem-type))
+ list)))))
(defun eieio-make-class-predicate (class)
@@ -787,7 +787,7 @@ Fills in OBJ's SLOT with its default value."
(cond
;; Is it a function call? If so, evaluate it.
((eieio-eval-default-p val)
- (eval val))
+ (eval val t))
;;;; check for quoted things, and unquote them
;;((and (consp val) (eq (car val) 'quote))
;; (car (cdr val)))
@@ -1029,7 +1029,7 @@ method invocation orders of the involved classes."
(eieio--class-precedence-c3 class))))))
(define-obsolete-function-alias
- 'class-precedence-list 'eieio--class-precedence-list "24.4")
+ 'class-precedence-list #'eieio--class-precedence-list "24.4")
;;; Here are some special types of errors
diff --git a/lisp/emacs-lisp/eieio-custom.el b/lisp/emacs-lisp/eieio-custom.el
index 184b99fdac6..8257f7a4bae 100644
--- a/lisp/emacs-lisp/eieio-custom.el
+++ b/lisp/emacs-lisp/eieio-custom.el
@@ -1,4 +1,4 @@
-;;; eieio-custom.el -- eieio object customization -*- lexical-binding:t -*-
+;;; eieio-custom.el --- eieio object customization -*- lexical-binding:t -*-
;; Copyright (C) 1999-2001, 2005, 2007-2021 Free Software Foundation,
;; Inc.
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el
index e65f424cbab..08a6debc203 100644
--- a/lisp/emacs-lisp/eieio-opt.el
+++ b/lisp/emacs-lisp/eieio-opt.el
@@ -1,4 +1,4 @@
-;;; eieio-opt.el -- eieio optional functions (debug, printing, speedbar) -*- lexical-binding: t; -*-
+;;; eieio-opt.el --- eieio optional functions (debug, printing, speedbar) -*- lexical-binding: t; -*-
;; Copyright (C) 1996, 1998-2003, 2005, 2008-2021 Free Software
;; Foundation, Inc.
diff --git a/lisp/emacs-lisp/eieio-speedbar.el b/lisp/emacs-lisp/eieio-speedbar.el
index 8bf77e20dfa..c25ea8acee9 100644
--- a/lisp/emacs-lisp/eieio-speedbar.el
+++ b/lisp/emacs-lisp/eieio-speedbar.el
@@ -1,4 +1,4 @@
-;;; eieio-speedbar.el -- Classes for managing speedbar displays. -*- lexical-binding:t -*-
+;;; eieio-speedbar.el --- Classes for managing speedbar displays. -*- lexical-binding:t -*-
;; Copyright (C) 1999-2002, 2005, 2007-2021 Free Software Foundation,
;; Inc.
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 910023b841b..31b6b0945bb 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -981,4 +981,4 @@ of `eq'."
(provide 'eieio)
-;;; eieio ends here
+;;; eieio.el ends here
diff --git a/lisp/emacs-lisp/faceup.el b/lisp/emacs-lisp/faceup.el
index 6c3931f9829..162c39634ed 100644
--- a/lisp/emacs-lisp/faceup.el
+++ b/lisp/emacs-lisp/faceup.el
@@ -1170,11 +1170,6 @@ Intended to be called when a file is loaded."
;; File is being evaluated using, for example, `eval-buffer'.
default-directory)))
-
-;; ----------------------------------------------------------------------
-;; The end
-;;
-
(provide 'faceup)
;;; faceup.el ends here
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index 6d9c8c32794..73a33a553fb 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -109,11 +109,6 @@
;; * Footer line --- marks end-of-file so it can be distinguished from
;; an expanded formfeed or the results of truncation.
-;;; Change Log:
-
-;; Tue Jul 14 23:44:17 1992 ESR
-;; * Created.
-
;;; Code:
;;; Variables:
diff --git a/lisp/emacs-lisp/ring.el b/lisp/emacs-lisp/ring.el
index 96894655b45..ea27bb3c31b 100644
--- a/lisp/emacs-lisp/ring.el
+++ b/lisp/emacs-lisp/ring.el
@@ -248,8 +248,6 @@ If SEQ is already a ring, return it."
(ring-insert-at-beginning ring (elt seq count))))
ring)))
-;;; provide ourself:
-
(provide 'ring)
;;; ring.el ends here
diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el
index d9db1d3cdc9..4460fef97bd 100644
--- a/lisp/emacs-lisp/tcover-ses.el
+++ b/lisp/emacs-lisp/tcover-ses.el
@@ -1,4 +1,4 @@
-;;;; testcover-ses.el -- Example use of `testcover' to test "SES" -*- lexical-binding: t; -*-
+;;; tcover-ses.el --- Example use of `testcover' to test "SES" -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
@@ -716,4 +716,4 @@ spreadsheet files with invalid formatting."
;;Could do this here: (testcover-end "ses.el")
(message "Done"))
-;;; testcover-ses.el ends here.
+;;; tcover-ses.el ends here
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index 75b27d08e56..e75f15140aa 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -1,4 +1,4 @@
-;;;; testcover.el -- Visual code-coverage tool -*- lexical-binding:t -*-
+;;; testcover.el --- Visual code-coverage tool -*- lexical-binding:t -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
@@ -675,4 +675,4 @@ The list is 1valued if all of its constituent elements are also 1valued."
(testcover-analyze-coverage (cadr form)))
(t (testcover-analyze-coverage-backquote form))))
-;; testcover.el ends here.
+;;; testcover.el ends here
diff --git a/lisp/emacs-lisp/text-property-search.el b/lisp/emacs-lisp/text-property-search.el
index e909e4bf760..69943a83f1c 100644
--- a/lisp/emacs-lisp/text-property-search.el
+++ b/lisp/emacs-lisp/text-property-search.el
@@ -214,3 +214,5 @@ and if a matching region is found, place point at its end."
(funcall predicate value prop-value))
(provide 'text-property-search)
+
+;;; text-property-search.el ends here
diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el
index d52a6c796db..fa4e0583ed3 100644
--- a/lisp/emacs-lisp/unsafep.el
+++ b/lisp/emacs-lisp/unsafep.el
@@ -1,4 +1,4 @@
-;;;; unsafep.el -- Determine whether a Lisp form is safe to evaluate -*- lexical-binding: t; -*-
+;;; unsafep.el --- Determine whether a Lisp form is safe to evaluate -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el
index 0b152784252..a723dbdbb90 100644
--- a/lisp/emulation/edt-mapper.el
+++ b/lisp/emulation/edt-mapper.el
@@ -26,7 +26,7 @@
;; [Part of the GNU Emacs EDT Emulation.]
-;; This emacs lisp program can be used to create an emacs lisp file
+;; This Emacs Lisp program can be used to create an Emacs Lisp file
;; that defines the mapping of the user's keyboard to the LK-201
;; keyboard function keys and keypad keys (around which EDT has been
;; designed). Please read the "Usage" AND "Known Problems" sections
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index 044776c2363..cb9af92ba12 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -1,4 +1,4 @@
-;; erc-button.el --- A way of buttonizing certain things in ERC buffers -*- lexical-binding:t -*-
+;;; erc-button.el --- A way of buttonizing certain things in ERC buffers -*- lexical-binding:t -*-
;; Copyright (C) 1996-2004, 2006-2021 Free Software Foundation, Inc.
diff --git a/lisp/erc/erc-desktop-notifications.el b/lisp/erc/erc-desktop-notifications.el
index 990f013cd2a..9838b239537 100644
--- a/lisp/erc/erc-desktop-notifications.el
+++ b/lisp/erc/erc-desktop-notifications.el
@@ -1,4 +1,4 @@
-;; erc-desktop-notifications.el -- Send notification on PRIVMSG or mentions -*- lexical-binding:t -*-
+;;; erc-desktop-notifications.el --- Send notification on PRIVMSG or mentions -*- lexical-binding:t -*-
;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
index 1143faa1e26..fc9a8d39ef4 100644
--- a/lisp/erc/erc-goodies.el
+++ b/lisp/erc/erc-goodies.el
@@ -1,4 +1,4 @@
-;; erc-goodies.el --- Collection of ERC modules -*- lexical-binding: t; -*-
+;;; erc-goodies.el --- Collection of ERC modules -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
diff --git a/lisp/erc/erc-imenu.el b/lisp/erc/erc-imenu.el
index b2a2dc588e5..dcf6db7407a 100644
--- a/lisp/erc/erc-imenu.el
+++ b/lisp/erc/erc-imenu.el
@@ -1,4 +1,4 @@
-;;; erc-imenu.el -- Imenu support for ERC -*- lexical-binding: t; -*-
+;;; erc-imenu.el --- Imenu support for ERC -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2002, 2004, 2006-2021 Free Software Foundation,
;; Inc.
diff --git a/lisp/erc/erc-menu.el b/lisp/erc/erc-menu.el
index 0dc819fbbbe..1bee6ff2a67 100644
--- a/lisp/erc/erc-menu.el
+++ b/lisp/erc/erc-menu.el
@@ -1,4 +1,4 @@
-;; erc-menu.el -- Menu-bar definitions for ERC -*- lexical-binding: t; -*-
+;;; erc-menu.el --- Menu-bar definitions for ERC -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2002, 2004-2021 Free Software Foundation, Inc.
diff --git a/lisp/erc/erc-page.el b/lisp/erc/erc-page.el
index 4c244b7984d..457e8cd4684 100644
--- a/lisp/erc/erc-page.el
+++ b/lisp/erc/erc-page.el
@@ -1,4 +1,4 @@
-;; erc-page.el - CTCP PAGE support for ERC -*- lexical-binding: t; -*-
+;;; erc-page.el --- CTCP PAGE support for ERC -*- lexical-binding: t; -*-
;; Copyright (C) 2002, 2004, 2006-2021 Free Software Foundation, Inc.
diff --git a/lisp/erc/erc-replace.el b/lisp/erc/erc-replace.el
index d08d9850c10..3f69c4cb9cc 100644
--- a/lisp/erc/erc-replace.el
+++ b/lisp/erc/erc-replace.el
@@ -1,4 +1,4 @@
-;; erc-replace.el -- wash and massage messages inserted into the buffer -*- lexical-binding: t; -*-
+;;; erc-replace.el --- wash and massage messages inserted into the buffer -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2002, 2004, 2006-2021 Free Software Foundation,
;; Inc.
diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el
index 28299ae46c3..666fd585926 100644
--- a/lisp/erc/erc-ring.el
+++ b/lisp/erc/erc-ring.el
@@ -1,4 +1,4 @@
-;; erc-ring.el -- Command history handling for erc using ring.el -*- lexical-binding: t; -*-
+;;; erc-ring.el --- Command history handling for erc using ring.el -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc.
diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el
index fa3218baf2f..f58e1b85cbd 100644
--- a/lisp/eshell/em-xtra.el
+++ b/lisp/eshell/em-xtra.el
@@ -23,13 +23,10 @@
;;; Code:
+(require 'cl-lib)
(require 'esh-util)
(eval-when-compile
(require 'eshell))
-;; Strictly speaking, should only be needed at compile time.
-;; Require at run-time too to silence compiler.
-(require 'pcomplete)
-(require 'compile)
;; There are no items in this custom group, but eshell modules (ab)use
;; custom groups.
@@ -49,50 +46,45 @@ naturally accessible within Emacs."
(defun eshell/expr (&rest args)
"Implementation of expr, using the calc package."
- (if (not (fboundp 'calc-eval))
- (throw 'eshell-replace-command
- (eshell-parse-command "*expr" (flatten-tree args)))
- ;; to fool the byte-compiler...
- (let ((func 'calc-eval))
- (funcall func (eshell-flatten-and-stringify args)))))
+ (calc-eval (eshell-flatten-and-stringify args)))
(defun eshell/substitute (&rest args)
- "Easy front-end to `intersection', for comparing lists of strings."
- (apply 'substitute (car args) (cadr args) :test 'equal
+ "Easy front-end to `cl-substitute', for comparing lists of strings."
+ (apply #'cl-substitute (car args) (cadr args) :test #'equal
(cddr args)))
(defun eshell/count (&rest args)
- "Easy front-end to `intersection', for comparing lists of strings."
- (apply 'count (car args) (cadr args) :test 'equal
+ "Easy front-end to `cl-count', for comparing lists of strings."
+ (apply #'cl-count (car args) (cadr args) :test #'equal
(cddr args)))
(defun eshell/mismatch (&rest args)
- "Easy front-end to `intersection', for comparing lists of strings."
- (apply 'mismatch (car args) (cadr args) :test 'equal
+ "Easy front-end to `cl-mismatch', for comparing lists of strings."
+ (apply #'cl-mismatch (car args) (cadr args) :test #'equal
(cddr args)))
(defun eshell/union (&rest args)
- "Easy front-end to `intersection', for comparing lists of strings."
- (apply 'union (car args) (cadr args) :test 'equal
+ "Easy front-end to `cl-union', for comparing lists of strings."
+ (apply #'cl-union (car args) (cadr args) :test #'equal
(cddr args)))
(defun eshell/intersection (&rest args)
- "Easy front-end to `intersection', for comparing lists of strings."
- (apply 'intersection (car args) (cadr args) :test 'equal
+ "Easy front-end to `cl-intersection', for comparing lists of strings."
+ (apply #'cl-intersection (car args) (cadr args) :test #'equal
(cddr args)))
(defun eshell/set-difference (&rest args)
- "Easy front-end to `intersection', for comparing lists of strings."
- (apply 'set-difference (car args) (cadr args) :test 'equal
+ "Easy front-end to `cl-set-difference', for comparing lists of strings."
+ (apply #'cl-set-difference (car args) (cadr args) :test #'equal
(cddr args)))
(defun eshell/set-exclusive-or (&rest args)
- "Easy front-end to `intersection', for comparing lists of strings."
- (apply 'set-exclusive-or (car args) (cadr args) :test 'equal
+ "Easy front-end to `cl-set-exclusive-or', for comparing lists of strings."
+ (apply #'cl-set-exclusive-or (car args) (cadr args) :test #'equal
(cddr args)))
-(defalias 'eshell/ff 'find-name-dired)
-(defalias 'eshell/gf 'find-grep-dired)
+(defalias 'eshell/ff #'find-name-dired)
+(defalias 'eshell/gf #'find-grep-dired)
(provide 'em-xtra)
diff --git a/lisp/expand.el b/lisp/expand.el
index d11ae7c5263..1b722014f89 100644
--- a/lisp/expand.el
+++ b/lisp/expand.el
@@ -484,7 +484,6 @@ This is used only in conjunction with `expand-add-abbrevs'."
(provide 'expand)
-;; run load hooks
(run-hooks 'expand-load-hook)
;;; expand.el ends here
diff --git a/lisp/filecache.el b/lisp/filecache.el
index 67d2939dd3c..62184e1a0ae 100644
--- a/lisp/filecache.el
+++ b/lisp/filecache.el
@@ -674,10 +674,6 @@ match REGEXP."
(insert (nth 1 item) (nth 0 item) "\n"))
(pop-to-buffer buf))))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Keybindings
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
(provide 'filecache)
;;; filecache.el ends here
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 07871bb0b64..4fc7f0a8ec0 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -505,7 +505,6 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'."
;; due to the way events are propagated during idle time. Note: This
;; may be perfectly acceptable.
-;; The end:
(provide 'filenotify)
;;; filenotify.el ends here
diff --git a/lisp/files.el b/lisp/files.el
index ac508665c35..0d4018d25b9 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -7676,7 +7676,7 @@ as in \"og+rX-w\"."
num-rights))
(defun file-modes-number-to-symbolic (mode &optional filetype)
- "Return a string describing a a file's MODE.
+ "Return a string describing a file's MODE.
For instance, if MODE is #o700, then it produces `-rwx------'.
FILETYPE if provided should be a character denoting the type of file,
such as `?d' for a directory, or `?l' for a symbolic link and will override
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el
index 0852f8e1264..e7af94ff509 100644
--- a/lisp/gnus/gnus-cus.el
+++ b/lisp/gnus/gnus-cus.el
@@ -1102,8 +1102,6 @@ articles in the thread.
(widget-setup)
(buffer-enable-undo))))
-;;; The End:
-
(provide 'gnus-cus)
;;; gnus-cus.el ends here
diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el
index 64eb639f61c..e2cbca9007d 100644
--- a/lisp/gnus/gnus-diary.el
+++ b/lisp/gnus/gnus-diary.el
@@ -32,11 +32,6 @@
;; gnus-diary is a utility toolkit used on top of the nndiary back end. It is
;; now fully documented in the Gnus manual.
-
-;; Bugs / Todo:
-;; ===========
-
-
;;; Code:
(require 'nndiary)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 423b180408a..8c62c9424de 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -2462,7 +2462,8 @@ the ephemeral group."
(with-temp-file tmpfile
(mm-disable-multibyte)
(dolist (id ids)
- (let ((file (concat "~/.emacs.d/debbugs-cache/" id)))
+ (let ((file (expand-file-name id (locate-user-emacs-file
+ "debbugs-cache"))))
(if (and (not gnus-plugged)
(file-exists-p file))
(insert-file-contents file)
diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el
index a4d198b46e4..8646904637c 100644
--- a/lisp/gnus/gnus-notifications.el
+++ b/lisp/gnus/gnus-notifications.el
@@ -1,4 +1,4 @@
-;; gnus-notifications.el -- Send notification on new message in Gnus -*- lexical-binding: t; -*-
+;;; gnus-notifications.el --- Send notification on new message in Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index 6ac646fbeac..11b6f7ddf07 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -1298,8 +1298,6 @@ from your existing entries."
(gnus-registry-insert db k newv)))
(registry-reindex db))))
-;; TODO: a few things
-
(provide 'gnus-registry)
;;; gnus-registry.el ends here
diff --git a/lisp/gnus/legacy-gnus-agent.el b/lisp/gnus/legacy-gnus-agent.el
index 091e3899c26..4f800891b2b 100644
--- a/lisp/gnus/legacy-gnus-agent.el
+++ b/lisp/gnus/legacy-gnus-agent.el
@@ -1,4 +1,4 @@
-;;; gnus-agent.el --- Legacy unplugged support for Gnus -*- lexical-binding: t; -*-
+;;; legacy-gnus-agent.el --- Legacy unplugged support for Gnus -*- lexical-binding: t; -*-
;; Copyright (C) 2004-2021 Free Software Foundation, Inc.
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index f3b830cf849..02db38725a9 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -187,22 +187,26 @@ Otherwise, most addresses look like `angles', but they look like
(defcustom message-syntax-checks
(if message-insert-canlock '((sender . disabled)) nil)
- ;; Guess this one shouldn't be easy to customize...
"Controls what syntax checks should not be performed on outgoing posts.
To disable checking of long signatures, for instance, add
`(signature . disabled)' to this list.
Don't touch this variable unless you really know what you're doing.
-Checks include `approved', `bogus-recipient', `continuation-headers',
-`control-chars', `empty', `existing-newsgroups', `from', `illegible-text',
-`invisible-text', `long-header-lines', `long-lines', `message-id',
-`multiple-headers', `new-text', `newsgroups', `quoting-style',
-`repeated-newsgroups', `reply-to', `sender', `sendsys', `shoot',
-`shorten-followup-to', `signature', `size', `subject', `subject-cmsg'
-and `valid-newsgroups'."
- :group 'message-news
- :type '(repeat sexp)) ; Fixme: improve this
+See the Message manual for the meanings of the valid syntax check
+types."
+ :group 'message-headers
+ :link '(custom-manual "(message)Message Headers")
+ :type '(alist
+ :key-type symbol
+ :value-type (const disabled)
+ :options (approved bogus-recipient continuation-headers
+ control-chars empty existing-newsgroups from illegible-text
+ invisible-text long-header-lines long-lines message-id
+ multiple-headers new-text newgroups quoting-style
+ repeated-newsgroups reply-to sender sendsys shoot
+ shorten-followup-to signature size subject subject-cmsg
+ valid-newsgroups)))
(defcustom message-required-headers '((optional . References)
From)
diff --git a/lisp/gnus/mm-archive.el b/lisp/gnus/mm-archive.el
index 1ecceeedeb7..fdc83e1de6e 100644
--- a/lisp/gnus/mm-archive.el
+++ b/lisp/gnus/mm-archive.el
@@ -108,4 +108,4 @@
(provide 'mm-archive)
-;; mm-archive.el ends here
+;;; mm-archive.el ends here
diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el
index e314e1d8d10..5ac4c3a64e1 100644
--- a/lisp/gnus/nnselect.el
+++ b/lisp/gnus/nnselect.el
@@ -968,7 +968,6 @@ Pass NO-PARSE on to the search engine."
(gnus-group-make-search-group no-parse spec)))
-;; The end.
(provide 'nnselect)
;;; nnselect.el ends here
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index 7d93f8a5550..a4234f84001 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -378,4 +378,4 @@ Process queued spam reports."
(provide 'spam-report)
-;;; spam-report.el ends here.
+;;; spam-report.el ends here
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index d5b6f76d7b2..91bbb600136 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -837,7 +837,6 @@ matches exist."
;;;###autoload (make-obsolete 'iswitchb-mode
;;;###autoload "use `icomplete-mode' or `ido-mode' instead." "24.4"))
-;;;_* Provide
(provide 'icomplete)
;;_* Local emacs vars.
diff --git a/lisp/info.el b/lisp/info.el
index dd7e16f8704..5efac6f25f1 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1,4 +1,4 @@
-;; info.el --- Info package for Emacs -*- lexical-binding:t -*-
+;;; info.el --- Info package for Emacs -*- lexical-binding:t -*-
;; Copyright (C) 1985-1986, 1992-2021 Free Software Foundation, Inc.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 5efac4c78f4..69fdc9df6d9 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2561,7 +2561,9 @@ Otherwise invoke whatever the calling mouse-2 command sequence
is bound to outside of Isearch."
(interactive "e")
(let ((w (posn-window (event-start click)))
- (binding (let ((overriding-terminal-local-map nil))
+ (binding (let ((overriding-terminal-local-map nil)
+ ;; Key search depends on mode (bug#47755)
+ (isearch-mode nil))
(key-binding (this-command-keys-vector) t))))
(if (and (window-minibuffer-p w)
(not (minibuffer-window-active-p w))) ; in echo area
diff --git a/lisp/language/burmese.el b/lisp/language/burmese.el
index 373f25ac5ca..ade3566717b 100644
--- a/lisp/language/burmese.el
+++ b/lisp/language/burmese.el
@@ -55,3 +55,5 @@
(vector "." 0 #'font-shape-gstring))))
(set-char-table-range composition-function-table '(#x1000 . #x107F) elt)
(set-char-table-range composition-function-table '(#xAA60 . #xAA7B) elt))
+
+;;; burmese.el ends here
diff --git a/lisp/language/cham.el b/lisp/language/cham.el
index 3aac986b437..cbb35565af2 100644
--- a/lisp/language/cham.el
+++ b/lisp/language/cham.el
@@ -43,3 +43,5 @@ an Austronesian language spoken by some 245,000 Chams
in Vietnam and Cambodia.")))
(provide 'cham)
+
+;;; cham.el ends here
diff --git a/lisp/language/khmer.el b/lisp/language/khmer.el
index 6f08e60d601..471af401656 100644
--- a/lisp/language/khmer.el
+++ b/lisp/language/khmer.el
@@ -35,4 +35,4 @@
(set-char-table-range composition-function-table '(#x1780 . #x17FF) val)
(set-char-table-range composition-function-table '(#x19E0 . #x19FF) val))
-;; khmer.el ends here
+;;; khmer.el ends here
diff --git a/lisp/language/sinhala.el b/lisp/language/sinhala.el
index 99a104ec339..89392ad6c50 100644
--- a/lisp/language/sinhala.el
+++ b/lisp/language/sinhala.el
@@ -45,4 +45,4 @@
"[\u0D80-\u0DFF]")
0 #'font-shape-gstring)))
-;; sinhala.el ends here
+;;; sinhala.el ends here
diff --git a/lisp/language/tai-viet.el b/lisp/language/tai-viet.el
index 4549b111a3d..366c39202d3 100644
--- a/lisp/language/tai-viet.el
+++ b/lisp/language/tai-viet.el
@@ -56,3 +56,5 @@ The language name is spelled as \"ꪁꪫꪱꪣ ꪼꪕ\", and the script name is
spelled as \"ꪎꪳ ꪼꪕ\".")))
(provide 'tai-viet)
+
+;;; tai-viet.el ends here
diff --git a/lisp/language/thai-word.el b/lisp/language/thai-word.el
index ff1e80298ba..5d0389c28df 100644
--- a/lisp/language/thai-word.el
+++ b/lisp/language/thai-word.el
@@ -1,4 +1,4 @@
-;;; thai-word.el -- find Thai word boundaries -*- lexical-binding: t; -*-
+;;; thai-word.el --- find Thai word boundaries -*- lexical-binding: t; -*-
;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
@@ -11074,4 +11074,4 @@ With argument, do this that many times."
;; coding: utf-8
;; End:
-;; end of thai-word.el
+;;; thai-word.el ends here
diff --git a/lisp/language/tv-util.el b/lisp/language/tv-util.el
index 1a530d350f2..207d76f47c1 100644
--- a/lisp/language/tv-util.el
+++ b/lisp/language/tv-util.el
@@ -136,5 +136,6 @@
(if (looking-at tai-viet-re)
(tai-viet-compose-region from (match-end 0)))))
-;;
(provide 'tai-viet-util)
+
+;;; tv-util.el ends here
diff --git a/lisp/leim/quail/croatian.el b/lisp/leim/quail/croatian.el
index 08f1e47b6f3..7402b81a8cc 100644
--- a/lisp/leim/quail/croatian.el
+++ b/lisp/leim/quail/croatian.el
@@ -1,4 +1,4 @@
-;;; croatian.el -- Quail package for inputting Croatian -*-coding: utf-8; lexical-binding:t -*-
+;;; croatian.el --- Quail package for inputting Croatian -*-coding: utf-8; lexical-binding:t -*-
;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
diff --git a/lisp/leim/quail/hebrew.el b/lisp/leim/quail/hebrew.el
index fc6bb80596b..28b2eb34367 100644
--- a/lisp/leim/quail/hebrew.el
+++ b/lisp/leim/quail/hebrew.el
@@ -1,4 +1,4 @@
-;; hebrew.el --- Quail package for inputting Hebrew characters -*- coding: utf-8; lexical-binding: t -*-
+;;; hebrew.el --- Quail package for inputting Hebrew characters -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
;; 2008, 2009, 2010, 2011
diff --git a/lisp/leim/quail/persian.el b/lisp/leim/quail/persian.el
index 4157f886704..cb1f6e3c78b 100644
--- a/lisp/leim/quail/persian.el
+++ b/lisp/leim/quail/persian.el
@@ -1,4 +1,4 @@
-;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8; lexical-binding: t -*-
+;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 3721e86475c..24d49ea6d80 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -28,7 +28,7 @@
;; OVERVIEW ==========================================================
;; This file advises the function `insert-directory' to implement it
-;; directly from Emacs lisp, without running ls in a subprocess.
+;; directly from Emacs Lisp, without running ls in a subprocess.
;; This is useful if you don't have ls installed (ie, on MS Windows).
;; This function can use regexps instead of shell wildcards. If you
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el
index d833685a8d4..fbac9e0cc0c 100644
--- a/lisp/mail/rmail-spam-filter.el
+++ b/lisp/mail/rmail-spam-filter.el
@@ -555,4 +555,4 @@ checks to see if the old format is used, and updates it if necessary."
(provide 'rmail-spam-filter)
-;;; rmail-spam-filter ends here
+;;; rmail-spam-filter.el ends here
diff --git a/lisp/mail/uudecode.el b/lisp/mail/uudecode.el
index fdd402e0fa0..026356efe97 100644
--- a/lisp/mail/uudecode.el
+++ b/lisp/mail/uudecode.el
@@ -1,4 +1,4 @@
-;;; uudecode.el -- elisp native uudecode -*- lexical-binding:t -*-
+;;; uudecode.el --- elisp native uudecode -*- lexical-binding:t -*-
;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index dd953ee9df7..8fdcf3c62b4 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -36,8 +36,6 @@
;; because it's pointless to compile a file full of macros. But we
;; kept the name.
-;;; Change Log:
-
;;; Code:
(require 'cl-lib)
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el
index 67c019aa179..415e9848258 100644
--- a/lisp/mh-e/mh-alias.el
+++ b/lisp/mh-e/mh-alias.el
@@ -24,8 +24,6 @@
;;; Commentary:
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-buffers.el b/lisp/mh-e/mh-buffers.el
index a32f61c82eb..ef21fdb2f95 100644
--- a/lisp/mh-e/mh-buffers.el
+++ b/lisp/mh-e/mh-buffers.el
@@ -24,8 +24,6 @@
;;; Commentary:
-;;; Change Log:
-
;;; Code:
;; The names of ephemeral buffers have a " *mh-" prefix (so that they
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index c1cd6c1a9e2..b64bbfb6f3b 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -29,8 +29,6 @@
;; that are used to send the mail. Other that those, functions that
;; are needed in mh-letter.el should be found there.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index 0363c5aadac..ade80e8b95e 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -23,8 +23,6 @@
;;; Commentary:
-;;; Change Log:
-
;;; Code:
;; This is a good place to gather code that is used for compatibility
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 2e288064f16..ce77f9c0971 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -25,8 +25,6 @@
;; Mode for browsing folders
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el
index 38ba43188da..0e5ffc9a42c 100644
--- a/lisp/mh-e/mh-funcs.el
+++ b/lisp/mh-e/mh-funcs.el
@@ -30,8 +30,6 @@
;; small support routines are needed, place them with the function;
;; otherwise, create a separate section for them.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index ac46cc63fcc..cc60f7b6640 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -24,8 +24,6 @@
;;; Commentary:
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el
index aeab0497562..ceede0d07cb 100644
--- a/lisp/mh-e/mh-identity.el
+++ b/lisp/mh-e/mh-identity.el
@@ -33,8 +33,6 @@
;; in MH-Letter mode. The command `mh-insert-identity' can be used
;; to manually insert an identity.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-inc.el b/lisp/mh-e/mh-inc.el
index 6a29195afbb..83cfe4f99f1 100644
--- a/lisp/mh-e/mh-inc.el
+++ b/lisp/mh-e/mh-inc.el
@@ -28,8 +28,6 @@
;; inc can also be used to incorporate mail from multiple spool files
;; into separate folders. See "C-h v mh-inc-spool-list".
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el
index 5a407947a0b..e50bf8df50c 100644
--- a/lisp/mh-e/mh-junk.el
+++ b/lisp/mh-e/mh-junk.el
@@ -26,8 +26,6 @@
;; Spam handling in MH-E.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 59790181c4d..ae5b80d5807 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -31,8 +31,6 @@
;; mh-utils.el. That will help prevent the loading of this file until
;; a message is actually composed.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-limit.el b/lisp/mh-e/mh-limit.el
index 08f1b4093f1..39cf7c5d271 100644
--- a/lisp/mh-e/mh-limit.el
+++ b/lisp/mh-e/mh-limit.el
@@ -25,8 +25,6 @@
;; "Poor man's threading" by psg.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index fec2293ff1f..ef702525b7b 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -36,8 +36,6 @@
;; MIME option to mh-forward command to move to content-description
;; insertion point.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-print.el b/lisp/mh-e/mh-print.el
index d084cf63e97..2074ff6f8f3 100644
--- a/lisp/mh-e/mh-print.el
+++ b/lisp/mh-e/mh-print.el
@@ -24,8 +24,6 @@
;;; Commentary:
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-scan.el b/lisp/mh-e/mh-scan.el
index f00ab22958a..15049793adf 100644
--- a/lisp/mh-e/mh-scan.el
+++ b/lisp/mh-e/mh-scan.el
@@ -27,8 +27,6 @@
;; This file contains constants and a few functions for interpreting
;; scan lines.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index cb8f8e34558..b3a250bf13a 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -1,4 +1,4 @@
-;;; mh-search --- MH-Search mode -*- lexical-binding: t; -*-
+;;; mh-search.el --- MH-Search mode -*- lexical-binding: t; -*-
;; Copyright (C) 1993, 1995, 2001-2021 Free Software Foundation, Inc.
@@ -39,8 +39,6 @@
;; documentation will direct you to the specific instructions for
;; your particular searcher.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
@@ -1945,4 +1943,4 @@ folder buffer."
;; sentence-end-double-space: nil
;; End:
-;;; mh-search ends here
+;;; mh-search.el ends here
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index 9b9675c78e1..9cdf39f7f1e 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -26,8 +26,6 @@
;; Sequences are stored in the alist `mh-seq-list' in the form:
;; ((seq-name msgs ...) (seq-name msgs ...) ...)
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index cb9819f17c7..aa97f5cb383 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -26,8 +26,6 @@
;; Mode for showing messages.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
@@ -187,7 +185,7 @@ Sets the current buffer to the show buffer."
(set-buffer folder)
;; When Gnus uses external displayers it has to keep handles longer. So
;; we will delete these handles when mh-quit is called on the folder. It
- ;; would be nicer if there are weak pointers in emacs lisp, then we could
+ ;; would be nicer if there are weak pointers in Emacs Lisp, then we could
;; get the garbage collector to do this for us.
(unless (mh-buffer-data)
(setf (mh-buffer-data) (mh-make-buffer-data)))
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el
index b2deacf6a74..3af840c3a31 100644
--- a/lisp/mh-e/mh-speed.el
+++ b/lisp/mh-e/mh-speed.el
@@ -26,8 +26,6 @@
;; Future versions should only use flists.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el
index 01b6863038b..89b0dbd9798 100644
--- a/lisp/mh-e/mh-thread.el
+++ b/lisp/mh-e/mh-thread.el
@@ -69,8 +69,6 @@
;; (5) Better canonicalizing for message identifier and subject
;; strings.
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-tool-bar.el b/lisp/mh-e/mh-tool-bar.el
index 40a430b9641..94aa8dd4a92 100644
--- a/lisp/mh-e/mh-tool-bar.el
+++ b/lisp/mh-e/mh-tool-bar.el
@@ -24,8 +24,6 @@
;;; Commentary:
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index e73c1db9e45..8e900dc0113 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -24,8 +24,6 @@
;;; Commentary:
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el
index 0b53829b056..d4d5c5c3784 100644
--- a/lisp/mh-e/mh-xface.el
+++ b/lisp/mh-e/mh-xface.el
@@ -23,8 +23,6 @@
;;; Commentary:
-;;; Change Log:
-
;;; Code:
(require 'mh-e)
diff --git a/lisp/misearch.el b/lisp/misearch.el
index 1f0dd315508..335efb95161 100644
--- a/lisp/misearch.el
+++ b/lisp/misearch.el
@@ -206,7 +206,7 @@ search status stack."
(multi-isearch-pop-state cmd ,(current-buffer))))
(defun multi-isearch-pop-state (_cmd buffer)
- "Restore the multiple buffers search state.
+ "Restore the multiple buffers search state in BUFFER.
Switch to the buffer restored from the search status stack."
(unless (equal buffer (current-buffer))
(switch-to-buffer (setq multi-isearch-current-buffer buffer))))
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 86b5d449872..04ea8091277 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -6258,10 +6258,6 @@ be recognized automatically (they are all valid BS2000 hosts too)."
;; ange-ftp-bs2000-file-name-as-directory
;; ange-ftp-bs2000-make-compressed-filename
;; ange-ftp-bs2000-file-name-sans-versions
-
-;;;; ------------------------------------------------------------
-;;;; Finally provide package.
-;;;; ------------------------------------------------------------
(provide 'ange-ftp)
diff --git a/lisp/net/newst-ticker.el b/lisp/net/newst-ticker.el
index 2f764708701..8cfafb5bfe4 100644
--- a/lisp/net/newst-ticker.el
+++ b/lisp/net/newst-ticker.el
@@ -1,4 +1,4 @@
-;; newst-ticker.el --- mode line ticker for newsticker. -*- lexical-binding: t; -*-
+;;; newst-ticker.el --- mode line ticker for newsticker. -*- lexical-binding: t; -*-
;; Copyright (C) 2003-2021 Free Software Foundation, Inc.
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 7bb8ca671cf..7251640bf27 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -1166,9 +1166,10 @@ If ALL is non-nil, update prompts in all IRC buffers."
(or (eq (aref target 0) ?#)
(eq (aref target 0) ?&))))
-(defcustom rcirc-log-directory "~/.emacs.d/rcirc-log"
+(defcustom rcirc-log-directory (locate-user-emacs-file "rcirc-log")
"Directory to keep IRC logfiles."
- :type 'directory)
+ :type 'directory
+ :version "28.1")
(defcustom rcirc-log-flag nil
"Non-nil means log IRC activity to disk.
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index 94db318c1b0..4102b9d322a 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -957,3 +957,5 @@ to their attributes."
;; * Check, whether the dh-ietf1024-aes128-cbc-pkcs7 algorithm can be
;; used for the transfer of the secrets. Currently, we use the
;; plain algorithm.
+
+;;; secrets.el ends here
diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el
index c4d6ec4b6cc..5dad5f446ac 100644
--- a/lisp/net/sieve-manage.el
+++ b/lisp/net/sieve-manage.el
@@ -580,4 +580,4 @@ to local variable `sieve-manage-capability'."
(provide 'sieve-manage)
-;; sieve-manage.el ends here
+;;; sieve-manage.el ends here
diff --git a/lisp/net/sieve-mode.el b/lisp/net/sieve-mode.el
index 966f0f056bd..0e8fdc0a905 100644
--- a/lisp/net/sieve-mode.el
+++ b/lisp/net/sieve-mode.el
@@ -206,4 +206,4 @@ Turning on Sieve mode runs `sieve-mode-hook'."
(provide 'sieve-mode)
-;; sieve-mode.el ends here
+;;; sieve-mode.el ends here
diff --git a/lisp/net/sieve.el b/lisp/net/sieve.el
index 595d63331a4..6d571a0a30f 100644
--- a/lisp/net/sieve.el
+++ b/lisp/net/sieve.el
@@ -379,4 +379,4 @@ Used to bracket operations which move point in the sieve-buffer."
(provide 'sieve)
-;; sieve.el ends here
+;;; sieve.el ends here
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index d208f0e044a..6342cf52873 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -472,6 +472,48 @@ For details, see `tramp-rename-files'."
(function-put
#'tramp-rename-these-files 'completion-predicate #'tramp-command-completion-p)
+;; This function takes action since Emacs 28.1, when
+;; `read-extended-command-predicate' is set to
+;; `command-completion-default-include-p'.
+;;;###tramp-autoload
+(defun tramp-recompile-elpa-command-completion-p (_symbol _buffer)
+ "A predicate for `tramp-recompile-elpa'.
+It is completed by \"M-x TAB\" only if package.el is loaded, and
+Tramp is an installed ELPA package."
+ ;; We cannot apply `package-installed-p', this would also return the
+ ;; builtin package.
+ (tramp-compat-funcall 'package--user-installed-p 'tramp))
+
+;;;###tramp-autoload
+(defun tramp-recompile-elpa ()
+ "Recompile the installed Tramp ELPA package.
+This is needed if there are compatibility problems."
+ ;; (declare (completion tramp-recompile-elpa-command-completion-p))
+ (interactive)
+ ;; We expect just one Tramp package is installed.
+ (when-let
+ ((dir (tramp-compat-funcall
+ 'package-desc-dir
+ (car (alist-get 'tramp (bound-and-true-p package-alist))))))
+ (dolist (elc (directory-files dir 'full "\\.elc$"))
+ (delete-file elc))
+ (with-current-buffer (get-buffer-create byte-compile-log-buffer)
+ (let ((inhibit-read-only t))
+ (compilation-mode)
+ (goto-char (point-max))
+ (insert "\f\n")
+ (call-process
+ (expand-file-name invocation-name invocation-directory) nil t t
+ "-Q" "-batch" "-L" dir
+ "--eval" (format "(byte-recompile-directory %S 0 t)" dir))
+ (message "Package `tramp' recompiled.")))))
+
+;; Starting with Emacs 28.1, this can be replaced by the "(declare ...)" form.
+;;;###tramp-autoload
+(function-put
+ #'tramp-recompile-elpa 'completion-predicate
+ #'tramp-recompile-elpa-command-completion-p)
+
;; Tramp version is useful in a number of situations.
;;;###tramp-autoload
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 0e6a2bb04af..df64d13c41f 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2218,7 +2218,7 @@ The method used must be an out-of-band method."
(t2 (tramp-tramp-file-p newname))
(orig-vec (tramp-dissect-file-name (if t1 filename newname)))
copy-program copy-args copy-env copy-keep-date listener spec
- options source target remote-copy-program remote-copy-args)
+ options source target remote-copy-program remote-copy-args p)
(with-parsed-tramp-file-name (if t1 filename newname) nil
(if (and t1 t2)
@@ -2253,10 +2253,10 @@ The method used must be an out-of-band method."
#'identity)
(if t1
(tramp-make-copy-program-file-name v)
- (tramp-unquote-shell-quote-argument filename)))
+ (tramp-compat-file-name-unquote filename)))
target (if t2
(tramp-make-copy-program-file-name v)
- (tramp-unquote-shell-quote-argument newname)))
+ (tramp-compat-file-name-unquote newname)))
;; Check for user. There might be an interactive setting.
(setq user (or (tramp-file-name-user v)
@@ -2288,6 +2288,13 @@ The method used must be an out-of-band method."
;; keep-date argument is non-nil), or a replacement for
;; the whole keep-date sublist.
(delete " " (apply #'tramp-expand-args v 'tramp-copy-args spec))
+ ;; `tramp-ssh-controlmaster-options' is a string instead
+ ;; of a list. Unflatten it.
+ copy-args
+ (tramp-compat-flatten-tree
+ (mapcar
+ (lambda (x) (if (string-match-p " " x) (split-string x) x))
+ copy-args))
copy-env (apply #'tramp-expand-args v 'tramp-copy-env spec)
remote-copy-program
(tramp-get-method-parameter v 'tramp-remote-copy-program)
@@ -2349,31 +2356,26 @@ The method used must be an out-of-band method."
copy-args
(if remote-copy-program
(list (if t1 (concat ">" target) (concat "<" source)))
- (list source target))))
-
- ;; Use an asynchronous process. By this, password can
- ;; be handled. We don't set a timeout, because the
- ;; copying of large files can last longer than 60 secs.
- (let* ((command
- (mapconcat
- #'identity (append (list copy-program) copy-args)
- " "))
- (p (let ((default-directory
- (tramp-compat-temporary-file-directory)))
- (start-process-shell-command
- (tramp-get-connection-name v)
- (tramp-get-connection-buffer v)
- command))))
- (tramp-message orig-vec 6 "%s" command)
- (process-put p 'vector orig-vec)
- (process-put p 'adjust-window-size-function #'ignore)
- (set-process-query-on-exit-flag p nil)
-
- ;; We must adapt `tramp-local-end-of-line' for
- ;; sending the password.
- (let ((tramp-local-end-of-line tramp-rsh-end-of-line))
- (tramp-process-actions
- p v nil tramp-actions-copy-out-of-band))))
+ (list source target)))
+ ;; Use an asynchronous process. By this, password
+ ;; can be handled. We don't set a timeout, because
+ ;; the copying of large files can last longer than 60
+ ;; secs.
+ p (apply
+ #'start-process
+ (tramp-get-connection-name v)
+ (tramp-get-connection-buffer v)
+ copy-program copy-args))
+ (tramp-message orig-vec 6 "%s" (string-join (process-command p) " "))
+ (process-put p 'vector orig-vec)
+ (process-put p 'adjust-window-size-function #'ignore)
+ (set-process-query-on-exit-flag p nil)
+
+ ;; We must adapt `tramp-local-end-of-line' for
+ ;; sending the password.
+ (let ((tramp-local-end-of-line tramp-rsh-end-of-line))
+ (tramp-process-actions
+ p v nil tramp-actions-copy-out-of-band)))
;; Reset the transfer process properties.
(tramp-flush-connection-property v "process-name")
@@ -2921,15 +2923,19 @@ alternative implementation will be used."
;; until the process is deleted.
(when (bufferp stderr)
(with-current-buffer stderr
- (insert-file-contents-literally remote-tmpstderr))
+ ;; There's a mysterious error, see
+ ;; <https://github.com/joaotavora/eglot/issues/662>.
+ (ignore-errors
+ (insert-file-contents-literally remote-tmpstderr)))
;; Delete tmpstderr file.
(add-function
:after (process-sentinel p)
(lambda (_proc _msg)
(when (file-exists-p remote-tmpstderr)
(with-current-buffer stderr
- (insert-file-contents-literally
- remote-tmpstderr nil nil nil 'replace))
+ (ignore-errors
+ (insert-file-contents-literally
+ remote-tmpstderr nil nil nil 'replace)))
(delete-file remote-tmpstderr)))))
;; Return process.
p)))
@@ -5221,15 +5227,17 @@ Return ATTR."
(directory-file-name (tramp-file-name-unquote-localname vec))))
(when (string-match-p tramp-ipv6-regexp host)
(setq host (format "[%s]" host)))
+ ;; This does not work yet for MS Windows scp, if there are
+ ;; characters to be quoted. Win32 OpenSSH 7.9 is said to support
+ ;; this, see
+ ;; <https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v7.9.0.0p1-Beta>
(unless (string-match-p "ftp$" method)
(setq localname (tramp-shell-quote-argument localname)))
(cond
((tramp-get-method-parameter vec 'tramp-remote-copy-program)
localname)
- ((not (zerop (length user)))
- (format
- "%s@%s:%s" user host (tramp-unquote-shell-quote-argument localname)))
- (t (format "%s:%s" host (tramp-unquote-shell-quote-argument localname))))))
+ ((zerop (length user)) (format "%s:%s" host localname))
+ (t (format "%s@%s:%s" user host localname)))))
(defun tramp-method-out-of-band-p (vec size)
"Return t if this is an out-of-band method, nil otherwise."
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 8da94ec9d9e..a411aafa875 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3888,8 +3888,7 @@ substitution. SPEC-LIST is a list of char/value pairs used for
(or (not (stringp stderr)) (not (tramp-tramp-file-p stderr))))))
(defun tramp-handle-make-process (&rest args)
- "An alternative `make-process' implementation for Tramp files.
-It does not support `:stderr'."
+ "An alternative `make-process' implementation for Tramp files."
(when args
(with-parsed-tramp-file-name (expand-file-name default-directory) nil
(let ((default-directory (tramp-compat-temporary-file-directory))
diff --git a/lisp/notifications.el b/lisp/notifications.el
index b439d822317..ebd74dd3ef2 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -420,3 +420,5 @@ version this library is compliant with."
notifications-get-server-information-method)))
(provide 'notifications)
+
+;;; notifications.el ends here
diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el
index 3d4b9f87414..1314ade9e31 100644
--- a/lisp/nxml/rng-cmpct.el
+++ b/lisp/nxml/rng-cmpct.el
@@ -922,4 +922,4 @@ Current token after parse is token following ]."
(provide 'rng-cmpct)
-;;; rng-cmpct.el
+;;; rng-cmpct.el ends here
diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el
index 8f89598a5ad..9824eebbd8b 100644
--- a/lisp/nxml/xmltok.el
+++ b/lisp/nxml/xmltok.el
@@ -324,8 +324,8 @@ and VALUE-END, otherwise a STRING giving the value."
(setq strs (cons (car arg) strs))
(setq names (cons (cdr arg) names)))
(setq args (cdr args))))
- (cons (apply 'concat (nreverse strs))
- (apply 'append (nreverse names))))))
+ (cons (apply #'concat (nreverse strs))
+ (apply #'append (nreverse names))))))
(eval-when-compile
;; Make a symbolic group named NAME from the regexp R.
@@ -338,7 +338,7 @@ and VALUE-END, otherwise a STRING giving the value."
(cons (concat "\\(" (car ,sym) "\\)") (cons ',name (cdr ,sym)))))))
(defun xmltok-p (&rest r) (xmltok+ "\\(?:"
- (apply 'xmltok+ r)
+ (apply #'xmltok+ r)
"\\)"))
;; Get the group index of ELEM in a LIST of symbols.
@@ -372,22 +372,23 @@ and VALUE-END, otherwise a STRING giving the value."
(defmacro xmltok-defregexp (sym r)
`(defalias ',sym
(let ((r ,r))
- `(macro lambda (action &optional group-name)
- (cond ((eq action 'regexp)
- ,(car r))
- ((or (eq action 'start) (eq action 'beginning))
- (list 'match-beginning (xmltok-get-index group-name
- ',(cdr r))))
- ((eq action 'end)
- (list 'match-end (xmltok-get-index group-name
- ',(cdr r))))
- ((eq action 'string)
- (list 'match-string
- (xmltok-get-index group-name ',(cdr r))))
- ((eq action 'string-no-properties)
- (list 'match-string-no-properties
- (xmltok-get-index group-name ',(cdr r))))
- (t (error "Invalid action: %s" action))))))))
+ `(macro
+ . ,(lambda (action &optional group-name)
+ (cond ((eq action 'regexp)
+ (car r))
+ ((or (eq action 'start) (eq action 'beginning))
+ (list 'match-beginning (xmltok-get-index group-name
+ (cdr r))))
+ ((eq action 'end)
+ (list 'match-end (xmltok-get-index group-name
+ (cdr r))))
+ ((eq action 'string)
+ (list 'match-string
+ (xmltok-get-index group-name (cdr r))))
+ ((eq action 'string-no-properties)
+ (list 'match-string-no-properties
+ (xmltok-get-index group-name (cdr r))))
+ (t (error "Invalid action: %s" action)))))))))
(eval-when-compile
@@ -878,7 +879,7 @@ and VALUE-END, otherwise a STRING giving the value."
(cons " " value-parts)))))
(< (point) end))))
(when well-formed
- (aset att 5 (apply 'concat (nreverse value-parts))))
+ (aset att 5 (apply #'concat (nreverse value-parts))))
(aset att 6 (nreverse refs))))
(defun xmltok-scan-after-amp (entity-handler)
@@ -1333,7 +1334,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
t))))
(if (not well-formed)
nil
- (apply 'concat
+ (apply #'concat
(nreverse (cons (buffer-substring-no-properties start lim)
value-parts))))))
@@ -1358,7 +1359,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT."
(defun xmltok-require-next-token (&rest types)
(xmltok-next-prolog-token)
- (apply 'xmltok-require-token types))
+ (apply #'xmltok-require-token types))
(defun xmltok-require-token (&rest types)
;; XXX Generate a more helpful error message
diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el
index baed8be7663..960233d5627 100644
--- a/lisp/obsolete/fast-lock.el
+++ b/lisp/obsolete/fast-lock.el
@@ -752,8 +752,6 @@ See `fast-lock-get-face-properties'."
(unless (assq 'fast-lock-mode minor-mode-alist)
(setq minor-mode-alist (append minor-mode-alist '((fast-lock-mode nil)))))
-;; Provide ourselves:
-
(provide 'fast-lock)
;;; fast-lock.el ends here
diff --git a/lisp/obsolete/info-edit.el b/lisp/obsolete/info-edit.el
index c53616d80e7..19958979a85 100644
--- a/lisp/obsolete/info-edit.el
+++ b/lisp/obsolete/info-edit.el
@@ -1,4 +1,4 @@
-;; info-edit.el --- Editing info files -*- lexical-binding:t -*-
+;;; info-edit.el --- Editing info files -*- lexical-binding:t -*-
;; Copyright (C) 1985-1986, 1992-2021 Free Software Foundation, Inc.
diff --git a/lisp/obsolete/lazy-lock.el b/lisp/obsolete/lazy-lock.el
index 34bf85f864c..13f14aad6d1 100644
--- a/lisp/obsolete/lazy-lock.el
+++ b/lisp/obsolete/lazy-lock.el
@@ -1016,8 +1016,6 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
(unless (assq 'lazy-lock-mode minor-mode-alist)
(setq minor-mode-alist (append minor-mode-alist '((lazy-lock-mode nil)))))
-;; Provide ourselves:
-
(provide 'lazy-lock)
;; Local Variables:
diff --git a/lisp/obsolete/nnir.el b/lisp/obsolete/nnir.el
index f2ea5c67ceb..40a8ec57b98 100644
--- a/lisp/obsolete/nnir.el
+++ b/lisp/obsolete/nnir.el
@@ -1339,7 +1339,6 @@ Query for the specs, or use SPECS."
(define-obsolete-function-alias 'nnir-get-active #'gnus-server-get-active "28.1")
-;; The end.
(provide 'nnir)
;;; nnir.el ends here
diff --git a/lisp/obsolete/old-emacs-lock.el b/lisp/obsolete/old-emacs-lock.el
index 90ff93e03b1..ce4c60e6a17 100644
--- a/lisp/obsolete/old-emacs-lock.el
+++ b/lisp/obsolete/old-emacs-lock.el
@@ -1,4 +1,4 @@
-;;; emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked -*- lexical-binding: t; -*-
+;;; old-emacs-lock.el --- prevents you from exiting Emacs if a buffer is locked -*- lexical-binding: t; -*-
;; Copyright (C) 1994, 1997, 2001-2021 Free Software Foundation, Inc.
@@ -99,4 +99,4 @@ If the buffer is locked, signal error and display its name."
(provide 'emacs-lock)
-;;; emacs-lock.el ends here
+;;; old-emacs-lock.el ends here
diff --git a/lisp/obsolete/otodo-mode.el b/lisp/obsolete/otodo-mode.el
index add17b265b4..47f5089452f 100644
--- a/lisp/obsolete/otodo-mode.el
+++ b/lisp/obsolete/otodo-mode.el
@@ -1,4 +1,4 @@
-;;; todo-mode.el --- major mode for editing TODO list files -*- lexical-binding: t; -*-
+;;; otodo-mode.el --- major mode for editing TODO list files -*- lexical-binding: t; -*-
;; Copyright (C) 1997, 1999, 2001-2021 Free Software Foundation, Inc.
@@ -963,4 +963,4 @@ If INCLUDE-SEP is non-nil, return point after the separator."
(provide 'todo-mode)
-;;; todo-mode.el ends here
+;;; otodo-mode.el ends here
diff --git a/lisp/obsolete/sb-image.el b/lisp/obsolete/sb-image.el
index e9a507f0086..fc9e03eae6e 100644
--- a/lisp/obsolete/sb-image.el
+++ b/lisp/obsolete/sb-image.el
@@ -1,4 +1,4 @@
-;;; sb-image --- Image management for speedbar -*- lexical-binding: t; -*-
+;;; sb-image.el --- Image management for speedbar -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2003, 2005-2019, 2021 Free Software Foundation,
;; Inc.
diff --git a/lisp/obsolete/sregex.el b/lisp/obsolete/sregex.el
index 96d6b7aebf0..371dcbf8498 100644
--- a/lisp/obsolete/sregex.el
+++ b/lisp/obsolete/sregex.el
@@ -208,7 +208,7 @@
;; This is a "trapdoor" for including ordinary regular expression
;; strings in the result. Some regular expressions are clearer when
;; written the old way: "[a-z]" vs. (sregexq (char (?a . ?z))), for
-;; instance. However, see the note under "Bugs," below.
+;; instance.
;; Each CHAR-CLAUSE that is passed to (char ...) and (not-char ...)
;; has one of the following forms:
@@ -236,8 +236,6 @@
;; - add support for non-greedy operators *? and +?
;; - bug: (sregexq (opt (opt ?a))) returns "a??" which is a non-greedy "a?"
-;;; Bugs:
-
;;; Code:
(eval-when-compile (require 'cl-lib))
diff --git a/lisp/obsolete/tpu-mapper.el b/lisp/obsolete/tpu-mapper.el
index d23068ac469..5ae0a6558d5 100644
--- a/lisp/obsolete/tpu-mapper.el
+++ b/lisp/obsolete/tpu-mapper.el
@@ -69,7 +69,7 @@
;;;###autoload
(defun tpu-mapper ()
- "Create an Emacs lisp file defining the TPU-edt keypad for X-windows.
+ "Create an Emacs Lisp file defining the TPU-edt keypad for X-windows.
This command displays an instruction screen showing the TPU-edt keypad
and asks you to press the TPU-edt editing keys. It uses the keys you
diff --git a/lisp/org/ob-hledger.el b/lisp/org/ob-hledger.el
index 3d2f46cdce2..48dcb8cea1a 100644
--- a/lisp/org/ob-hledger.el
+++ b/lisp/org/ob-hledger.el
@@ -1,4 +1,4 @@
-;; ob-hledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*-
+;;; ob-hledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
diff --git a/lisp/org/ob-mscgen.el b/lisp/org/ob-mscgen.el
index 999d4f4140b..79c9f8702eb 100644
--- a/lisp/org/ob-mscgen.el
+++ b/lisp/org/ob-mscgen.el
@@ -1,4 +1,4 @@
-;;; ob-msc.el --- Babel Functions for Mscgen -*- lexical-binding: t; -*-
+;;; ob-mscgen.el --- Babel Functions for Mscgen -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
@@ -78,4 +78,4 @@ mscgen supported formats."
(provide 'ob-mscgen)
-;;; ob-msc.el ends here
+;;; ob-mscgen.el ends here
diff --git a/lisp/org/ol-eshell.el b/lisp/org/ol-eshell.el
index 769e7ee5225..8920e0afb0d 100644
--- a/lisp/org/ol-eshell.el
+++ b/lisp/org/ol-eshell.el
@@ -1,4 +1,4 @@
-;;; ol-eshell.el - Links to Working Directories in Eshell -*- lexical-binding: t; -*-
+;;; ol-eshell.el --- Links to Working Directories in Eshell -*- lexical-binding: t; -*-
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el
index 1fca873c159..dc2b3be6326 100644
--- a/lisp/org/org-ctags.el
+++ b/lisp/org/org-ctags.el
@@ -1,5 +1,5 @@
-;;; org-ctags.el - Integrate Emacs "tags" Facility with Org -*- lexical-binding: t; -*-
-;;
+;;; org-ctags.el --- Integrate Emacs "tags" Facility with Org -*- lexical-binding: t; -*-
+
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
;; Author: Paul Sexton <eeeickythump@gmail.com>
diff --git a/lisp/org/ox-man.el b/lisp/org/ox-man.el
index 6cace7e6989..27d2dedb8ed 100644
--- a/lisp/org/ox-man.el
+++ b/lisp/org/ox-man.el
@@ -1,4 +1,4 @@
-;; ox-man.el --- Man Back-End for Org Export Engine -*- lexical-binding: t; -*-
+;;; ox-man.el --- Man Back-End for Org Export Engine -*- lexical-binding: t; -*-
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index e467d98303e..0c5837cae7e 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -1,4 +1,4 @@
-;; bug-reference.el --- buttonize bug references -*- lexical-binding: t; -*-
+;;; bug-reference.el --- buttonize bug references -*- lexical-binding: t; -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index 84cc5b115e7..334e82114fc 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -1227,4 +1227,4 @@ comment at the start of cc-engine.el for more info."
;; indent-tabs-mode: t
;; tab-width: 8
;; End:
-;;; awk-mode.el ends here
+;;; cc-awk.el ends here
diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el
index 29634384dda..edbac64eadb 100644
--- a/lisp/progmodes/cc-bytecomp.el
+++ b/lisp/progmodes/cc-bytecomp.el
@@ -86,6 +86,7 @@
(defvar cc-bytecomp-environment-set nil)
(defmacro cc-bytecomp-debug-msg (&rest _args) ; Change to ARGS when needed.
+ ;; (declare (debug t))
;;`(message ,@args)
)
@@ -301,6 +302,7 @@ during compilation, but compile in a `require'. Don't use within
Having cyclic cc-require's will result in infinite recursion. That's
somewhat intentional."
+ (declare (debug t))
`(progn
(eval-when-compile
(cc-bytecomp-load (symbol-name ,cc-part)))
@@ -313,6 +315,7 @@ time, (ii) generate code to load the file at load time.
CC-PART will normally be a quoted name such as \\='cc-fix.
CONDITION should not be quoted."
+ (declare (debug t))
(if (eval condition)
(progn
(cc-bytecomp-load (symbol-name (eval cc-part)))
@@ -327,6 +330,7 @@ after the loading of FILE.
CC-PART will normally be a quoted name such as \\='cc-fix. FILE
should be a string. CONDITION should not be quoted."
+ (declare (debug t))
(if (eval condition)
(progn
(cc-bytecomp-load (symbol-name (eval cc-part)))
@@ -337,6 +341,7 @@ should be a string. CONDITION should not be quoted."
(defmacro cc-provide (feature)
"A replacement for the `provide' form that restores the environment
after the compilation. Don't use within `eval-when-compile'."
+ (declare (debug t))
`(progn
(eval-when-compile (cc-bytecomp-restore-environment))
(provide ,feature)))
@@ -348,6 +353,7 @@ during compilation. Don't use outside `eval-when-compile' or
Having cyclic cc-load's will result in infinite recursion. That's
somewhat intentional."
+ (declare (debug t))
`(or (and (featurep 'cc-bytecomp)
(cc-bytecomp-load ,cc-part))
(load ,cc-part nil t nil)))
@@ -356,6 +362,7 @@ somewhat intentional."
"Force loading of the corresponding .el file in the current directory
during compilation, but do a compile time `require' otherwise. Don't
use within `eval-when-compile'."
+ (declare (debug t))
`(eval-when-compile
(if (and (fboundp 'cc-bytecomp-is-compiling)
(cc-bytecomp-is-compiling))
@@ -367,6 +374,7 @@ use within `eval-when-compile'."
"Do a `require' of an external package.
This restores and sets up the compilation environment before and
afterwards. Don't use within `eval-when-compile'."
+ (declare (debug t))
`(progn
(eval-when-compile (cc-bytecomp-restore-environment))
(require ,feature)
@@ -375,6 +383,7 @@ afterwards. Don't use within `eval-when-compile'."
(defmacro cc-bytecomp-defvar (var)
"Binds the symbol as a variable during compilation of the file,
to silence the byte compiler. Don't use within `eval-when-compile'."
+ (declare (debug nil))
`(eval-when-compile
(if (boundp ',var)
(cc-bytecomp-debug-msg
@@ -402,6 +411,7 @@ definition. That means that this macro will not shut up warnings
about incorrect number of arguments. It's dangerous to try to replace
existing functions since the byte compiler might need the definition
at compile time, e.g. for macros and inline functions."
+ (declare (debug nil))
`(eval-when-compile
(if (fboundp ',fun)
(cc-bytecomp-debug-msg
@@ -423,6 +433,7 @@ at compile time, e.g. for macros and inline functions."
(defmacro cc-bytecomp-put (symbol propname value)
"Set a property on a symbol during compilation (and evaluation) of
the file. Don't use outside `eval-when-compile'."
+ (declare (debug t))
`(eval-when-compile
(if (not (assoc (cons ,symbol ,propname) cc-bytecomp-original-properties))
(progn
@@ -443,6 +454,7 @@ the file. Don't use outside `eval-when-compile'."
the compilation. This is the same as using `boundp' but additionally
exclude any variables that have been bound during compilation with
`cc-bytecomp-defvar'."
+ (declare (debug t))
(if (and (cc-bytecomp-is-compiling)
(memq (car (cdr symbol)) cc-bytecomp-unbound-variables))
nil
@@ -453,6 +465,7 @@ exclude any variables that have been bound during compilation with
the compilation. This is the same as using `fboundp' but additionally
exclude any functions that have been bound during compilation with
`cc-bytecomp-defun'."
+ (declare (debug t))
(let (fun-elem)
(if (and (cc-bytecomp-is-compiling)
(setq fun-elem (assq (car (cdr symbol))
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index bee87b68499..bdfdf178d43 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1835,6 +1835,7 @@ No indentation or other \"electric\" behavior is performed."
;; This is a very special purpose macro, which assumes the existence of
;; several variables. It is for use only in c-beginning-of-defun and
;; c-end-of-defun.
+ (declare (debug t))
`(while
(and ,condition
(eq c-defun-tactic 'go-outward)
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 20dc97db5d7..4f79fa9b330 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -125,7 +125,7 @@ The result of the body appears to the compiler as a quoted constant.
This variant works around bugs in `eval-when-compile' in various
\(X)Emacs versions. See cc-defs.el for details."
-
+ (declare (indent 0) (debug t))
(if c-inside-eval-when-compile
;; XEmacs 21.4.6 has a bug in `eval-when-compile' in that it
;; evaluates its body at macro expansion time if it's nested
@@ -170,9 +170,7 @@ This variant works around bugs in `eval-when-compile' in various
;; constant that we eval. That otoh introduce a problem in
;; that a returned lambda expression doesn't get byte
;; compiled (even if `function' is used).
- (eval '(let ((c-inside-eval-when-compile t)) ,@body)))))
-
- (put 'cc-eval-when-compile 'lisp-indent-hook 0))
+ (eval '(let ((c-inside-eval-when-compile t)) ,@body))))))
;;; Macros.
@@ -181,6 +179,7 @@ This variant works around bugs in `eval-when-compile' in various
;; between the host [X]Emacsen."
;; The motivation for this macro is to avoid the irritating message
;; "function `mapcan' from cl package called at runtime" produced by Emacs.
+ (declare (debug t))
(cond
((and (fboundp 'mapcan)
(subrp (symbol-function 'mapcan)))
@@ -196,18 +195,21 @@ This variant works around bugs in `eval-when-compile' in various
(defmacro c--set-difference (liszt1 liszt2 &rest other-args)
;; Macro to smooth out the renaming of `set-difference' in Emacs 24.3.
+ (declare (debug (form form &rest [symbolp form])))
(if (eq c--cl-library 'cl-lib)
`(cl-set-difference ,liszt1 ,liszt2 ,@other-args)
`(set-difference ,liszt1 ,liszt2 ,@other-args)))
(defmacro c--intersection (liszt1 liszt2 &rest other-args)
;; Macro to smooth out the renaming of `intersection' in Emacs 24.3.
+ (declare (debug (form form &rest [symbolp form])))
(if (eq c--cl-library 'cl-lib)
`(cl-intersection ,liszt1 ,liszt2 ,@other-args)
`(intersection ,liszt1 ,liszt2 ,@other-args)))
(eval-and-compile
(defmacro c--macroexpand-all (form &optional environment)
+ (declare (debug t))
;; Macro to smooth out the renaming of `cl-macroexpand-all' in Emacs 24.3.
(if (fboundp 'macroexpand-all)
`(macroexpand-all ,form ,environment)
@@ -215,6 +217,7 @@ This variant works around bugs in `eval-when-compile' in various
(defmacro c--delete-duplicates (cl-seq &rest cl-keys)
;; Macro to smooth out the renaming of `delete-duplicates' in Emacs 24.3.
+ (declare (debug (form &rest [symbolp form])))
(if (eq c--cl-library 'cl-lib)
`(cl-delete-duplicates ,cl-seq ,@cl-keys)
`(delete-duplicates ,cl-seq ,@cl-keys))))
@@ -222,6 +225,7 @@ This variant works around bugs in `eval-when-compile' in various
(defmacro c-font-lock-flush (beg end)
"Declare the region BEG...END's fontification as out-of-date.
On XEmacs and older Emacsen, this refontifies that region immediately."
+ (declare (debug t))
(if (fboundp 'font-lock-flush)
`(font-lock-flush ,beg ,end)
`(font-lock-fontify-region ,beg ,end)))
@@ -249,6 +253,7 @@ one of the following symbols:
If the referenced position doesn't exist, the closest accessible point
to it is returned. This function does not modify the point or the mark."
+ (declare (debug t))
(if (eq (car-safe position) 'quote)
(let ((position (eval position)))
(cond
@@ -417,6 +422,7 @@ to it is returned. This function does not modify the point or the mark."
(defmacro c-is-escaped (pos)
;; Are there an odd number of backslashes before POS?
+ (declare (debug t))
`(save-excursion
(goto-char ,pos)
(not (zerop (logand (skip-chars-backward "\\\\") 1)))))
@@ -424,6 +430,7 @@ to it is returned. This function does not modify the point or the mark."
(defmacro c-will-be-escaped (pos beg end)
;; Will the character after POS be escaped after the removal of (BEG END)?
;; It is assumed that (>= POS END).
+ (declare (debug t))
`(save-excursion
(let ((-end- ,end)
count)
@@ -436,6 +443,7 @@ to it is returned. This function does not modify the point or the mark."
(defmacro c-will-be-unescaped (beg)
;; Would the character after BEG be unescaped?
+ (declare (debug t))
`(save-excursion
(let (count)
(goto-char ,beg)
@@ -446,6 +454,7 @@ to it is returned. This function does not modify the point or the mark."
(defmacro c-next-single-property-change (position prop &optional object limit)
;; See the doc string for either of the defuns expanded to.
+ (declare (debug t))
(if (and c-use-extents
(fboundp 'next-single-char-property-change))
;; XEmacs >= 2005-01-25
@@ -455,6 +464,7 @@ to it is returned. This function does not modify the point or the mark."
(defmacro c-previous-single-property-change (position prop &optional object limit)
;; See the doc string for either of the defuns expanded to.
+ (declare (debug t))
(if (and c-use-extents
(fboundp 'previous-single-char-property-change))
;; XEmacs >= 2005-01-25
@@ -474,6 +484,7 @@ to it is returned. This function does not modify the point or the mark."
(defmacro c-set-region-active (activate)
;; Activate the region if ACTIVE is non-nil, deactivate it
;; otherwise. Covers the differences between Emacs and XEmacs.
+ (declare (debug t))
(if (fboundp 'zmacs-activate-region)
;; XEmacs.
`(if ,activate
@@ -483,6 +494,7 @@ to it is returned. This function does not modify the point or the mark."
`(setq mark-active ,activate)))
(defmacro c-set-keymap-parent (map parent)
+ (declare (debug t))
(cond
;; XEmacs
((cc-bytecomp-fboundp 'set-keymap-parents)
@@ -495,6 +507,7 @@ to it is returned. This function does not modify the point or the mark."
(defmacro c-delete-and-extract-region (start end)
"Delete the text between START and END and return it."
+ (declare (debug t))
(if (cc-bytecomp-fboundp 'delete-and-extract-region)
;; Emacs 21.1 and later
`(delete-and-extract-region ,start ,end)
@@ -505,15 +518,16 @@ to it is returned. This function does not modify the point or the mark."
(defmacro c-safe (&rest body)
;; safely execute BODY, return nil if an error occurred
+ (declare (indent 0) (debug t))
`(condition-case nil
(progn ,@body)
(error nil)))
-(put 'c-safe 'lisp-indent-function 0)
(defmacro c-int-to-char (integer)
;; In Emacs, a character is an integer. In XEmacs, a character is a
;; type distinct from an integer. Sometimes we need to convert integers to
;; characters. `c-int-to-char' makes this conversion, if necessary.
+ (declare (debug t))
(if (fboundp 'int-to-char)
`(int-to-char ,integer)
integer))
@@ -521,6 +535,7 @@ to it is returned. This function does not modify the point or the mark."
(defmacro c-characterp (arg)
;; Return t when ARG is a character (XEmacs) or integer (Emacs), otherwise
;; return nil.
+ (declare (debug t))
(if (integerp ?c)
`(integerp ,arg)
`(characterp ,arg)))
@@ -567,6 +582,7 @@ to it is returned. This function does not modify the point or the mark."
;; string opener, or after the introductory R of one. The match data is
;; overwritten. On success the opener's identifier will be (match-string
;; 1). Text properties on any characters are ignored.
+ (declare (debug t))
(if pos
`(save-excursion
(goto-char ,pos)
@@ -628,6 +644,7 @@ If BODY makes a change that unconditionally is undone then wrap this
macro inside `c-save-buffer-state'. That way the change can be done
even when the buffer is read-only, and without interference from
various buffer change hooks."
+ (declare (indent 0) (debug t))
`(let (-tnt-chng-keep
-tnt-chng-state)
(unwind-protect
@@ -638,7 +655,6 @@ various buffer change hooks."
-tnt-chng-state (c-tnt-chng-record-state)
-tnt-chng-keep (progn ,@body))
(c-tnt-chng-cleanup -tnt-chng-keep -tnt-chng-state))))
-(put 'c-tentative-buffer-changes 'lisp-indent-function 0)
(defun c-tnt-chng-record-state ()
;; Used internally in `c-tentative-buffer-changes'.
@@ -696,6 +712,7 @@ on the wrong side of LIMIT, it stays unchanged.
Note that this function might do hidden buffer changes. See the
comment at the start of cc-engine.el for more info."
+ (declare (debug t))
(if limit
`(when (< (point) (or ,limit (point-max)))
(save-restriction
@@ -717,6 +734,7 @@ starts on the wrong side of LIMIT, it stays unchanged.
Note that this function might do hidden buffer changes. See the
comment at the start of cc-engine.el for more info."
+ (declare (debug t))
(if limit
`(when (> (point) (or ,limit (point-min)))
(save-restriction
@@ -733,11 +751,13 @@ This is like `forward-sexp' except that it isn't interactive and does
not do any user friendly adjustments of the point and that it isn't
susceptible to user configurations such as disabling of signals in
certain situations."
+ (declare (debug t))
(or count (setq count 1))
`(goto-char (scan-sexps (point) ,count)))
(defmacro c-backward-sexp (&optional count)
"See `c-forward-sexp' and reverse directions."
+ (declare (debug t))
(or count (setq count 1))
`(c-forward-sexp ,(if (numberp count) (- count) `(- ,count))))
@@ -747,6 +767,7 @@ for unbalanced parens.
A limit for the search may be given. FROM is assumed to be on the
right side of it."
+ (declare (debug t))
(let ((res (if (featurep 'xemacs)
`(scan-lists ,from ,count ,depth nil t)
`(c-safe (scan-lists ,from ,count ,depth)))))
@@ -774,6 +795,7 @@ leave point unmoved.
A LIMIT for the search may be given. The start position is assumed to be
before it."
+ (declare (debug t))
`(let ((dest (c-safe-scan-lists ,(or pos '(point)) 1 0 ,limit)))
(when dest (goto-char dest) dest)))
@@ -784,6 +806,7 @@ leave point unmoved.
A LIMIT for the search may be given. The start position is assumed to be
after it."
+ (declare (debug t))
`(let ((dest (c-safe-scan-lists ,(or pos '(point)) -1 0 ,limit)))
(when dest (goto-char dest) dest)))
@@ -793,6 +816,7 @@ or nil if no such position exists. The point is used if POS is left out.
A limit for the search may be given. The start position is assumed to
be before it."
+ (declare (debug t))
`(c-safe-scan-lists ,(or pos '(point)) 1 1 ,limit))
(defmacro c-up-list-backward (&optional pos limit)
@@ -801,6 +825,7 @@ or nil if no such position exists. The point is used if POS is left out.
A limit for the search may be given. The start position is assumed to
be after it."
+ (declare (debug t))
`(c-safe-scan-lists ,(or pos '(point)) -1 1 ,limit))
(defmacro c-down-list-forward (&optional pos limit)
@@ -809,6 +834,7 @@ or nil if no such position exists. The point is used if POS is left out.
A limit for the search may be given. The start position is assumed to
be before it."
+ (declare (debug t))
`(c-safe-scan-lists ,(or pos '(point)) 1 -1 ,limit))
(defmacro c-down-list-backward (&optional pos limit)
@@ -817,6 +843,7 @@ or nil if no such position exists. The point is used if POS is left out.
A limit for the search may be given. The start position is assumed to
be after it."
+ (declare (debug t))
`(c-safe-scan-lists ,(or pos '(point)) -1 -1 ,limit))
(defmacro c-go-up-list-forward (&optional pos limit)
@@ -826,6 +853,7 @@ position exists, otherwise nil is returned and the point isn't moved.
A limit for the search may be given. The start position is assumed to
be before it."
+ (declare (debug t))
`(let ((dest (c-up-list-forward ,pos ,limit)))
(when dest (goto-char dest) t)))
@@ -836,6 +864,7 @@ position exists, otherwise nil is returned and the point isn't moved.
A limit for the search may be given. The start position is assumed to
be after it."
+ (declare (debug t))
`(let ((dest (c-up-list-backward ,pos ,limit)))
(when dest (goto-char dest) t)))
@@ -846,6 +875,7 @@ exists, otherwise nil is returned and the point isn't moved.
A limit for the search may be given. The start position is assumed to
be before it."
+ (declare (debug t))
`(let ((dest (c-down-list-forward ,pos ,limit)))
(when dest (goto-char dest) t)))
@@ -856,6 +886,7 @@ exists, otherwise nil is returned and the point isn't moved.
A limit for the search may be given. The start position is assumed to
be after it."
+ (declare (debug t))
`(let ((dest (c-down-list-backward ,pos ,limit)))
(when dest (goto-char dest) t)))
@@ -967,6 +998,7 @@ be after it."
;; point)? Always returns nil for languages which don't have Virtual
;; semicolons.
;; This macro might do hidden buffer changes.
+ (declare (debug t))
`(if c-at-vsemi-p-fn
(funcall c-at-vsemi-p-fn ,@(if pos `(,pos)))))
@@ -984,6 +1016,7 @@ be after it."
(defmacro c-benign-error (format &rest args)
;; Formats an error message for the echo area and dings, i.e. like
;; `error' but doesn't abort.
+ (declare (debug t))
`(progn
(message ,format ,@args)
(ding)))
@@ -993,18 +1026,19 @@ be after it."
;; way to execute code.
;; Maintainers' note: If TABLE is `c++-template-syntax-table', DON'T call
;; any forms inside this that call `c-parse-state'. !!!!
+ (declare (indent 1) (debug t))
`(let ((c-with-syntax-table-orig-table (syntax-table)))
(unwind-protect
(progn
(set-syntax-table ,table)
,@code)
(set-syntax-table c-with-syntax-table-orig-table))))
-(put 'c-with-syntax-table 'lisp-indent-function 1)
(defmacro c-skip-ws-forward (&optional limit)
"Skip over any whitespace following point.
This function skips over horizontal and vertical whitespace and line
continuations."
+ (declare (debug t))
(if limit
`(let ((limit (or ,limit (point-max))))
(while (progn
@@ -1026,6 +1060,7 @@ continuations."
"Skip over any whitespace preceding point.
This function skips over horizontal and vertical whitespace and line
continuations."
+ (declare (debug t))
(if limit
`(let ((limit (or ,limit (point-min))))
(while (progn
@@ -1048,6 +1083,7 @@ continuations."
"Return non-nil if the current CC Mode major mode is MODE.
MODE is either a mode symbol or a list of mode symbols."
+ (declare (debug t))
(if c-langs-are-parametric
;; Inside a `c-lang-defconst'.
`(c-lang-major-mode-is ,mode)
@@ -1130,6 +1166,7 @@ MODE is either a mode symbol or a list of mode symbols."
;; 21) then it's assumed that the property is present on it.
;;
;; This macro does a hidden buffer change.
+ (declare (debug t))
(setq property (eval property))
(if (or c-use-extents
(not (cc-bytecomp-boundp 'text-property-default-nonsticky)))
@@ -1147,6 +1184,7 @@ MODE is either a mode symbol or a list of mode symbols."
;; Get the value of the given property on the character at POS if
;; it's been put there by `c-put-char-property'. PROPERTY is
;; assumed to be constant.
+ (declare (debug t))
(setq property (eval property))
(if c-use-extents
;; XEmacs.
@@ -1177,6 +1215,7 @@ MODE is either a mode symbol or a list of mode symbols."
;; constant.
;;
;; This macro does a hidden buffer change.
+ (declare (debug t))
(setq property (eval property))
(cond (c-use-extents
;; XEmacs.
@@ -1199,6 +1238,7 @@ MODE is either a mode symbol or a list of mode symbols."
;; Return the first position in the range [FROM to) where the text property
;; PROPERTY is set, or `most-positive-fixnum' if there is no such position.
;; PROPERTY should be a quoted constant.
+ (declare (debug t))
`(let ((-from- ,from) (-to- ,to) pos)
(cond
((and (< -from- -to-)
@@ -1220,6 +1260,7 @@ MODE is either a mode symbol or a list of mode symbols."
;; `syntax-table'.
;;
;; This macro does hidden buffer changes.
+ (declare (debug t))
(setq property (eval property))
(if c-use-extents
;; XEmacs.
@@ -1239,6 +1280,7 @@ MODE is either a mode symbol or a list of mode symbols."
(defmacro c-clear-syn-tab-properties (from to)
;; Remove all occurrences of the `syntax-table' and `c-fl-syn-tab' text
;; properties between FROM and TO.
+ (declare (debug t))
`(let ((-from- ,from) (-to- ,to))
(when (and
c-min-syn-tab-mkr c-max-syn-tab-mkr
@@ -1260,6 +1302,7 @@ LIMIT bounds the search. The comparison is done with `equal'.
Leave point just after the character, and set the match data on
this character, and return point. If VALUE isn't found, Return
nil; point is then left undefined."
+ (declare (debug t))
`(let ((place (point)))
(while
(and
@@ -1279,6 +1322,7 @@ LIMIT bounds the search. The comparison is done with `equal'.
Leave point just before the character, set the match data on this
character, and return point. If VALUE isn't found, Return nil;
point is then left undefined."
+ (declare (debug t))
`(let ((place (point)))
(while
(and
@@ -1322,6 +1366,7 @@ been put there by c-put-char-property. POINT remains unchanged."
which have the value VALUE, as tested by `equal'. These
properties are assumed to be over individual characters, having
been put there by c-put-char-property. POINT remains unchanged."
+ (declare (debug t))
(if c-use-extents
;; XEmacs
`(let ((-property- ,property))
@@ -1342,6 +1387,7 @@ PROPERTY must be a constant.
Leave point just after the character, and set the match data on
this character, and return point. If the search fails, return
nil; point is then left undefined."
+ (declare (debug t))
`(let ((char-skip (concat "^" (char-to-string ,char)))
(-limit- (or ,limit (point-max)))
(-value- ,value))
@@ -1365,6 +1411,7 @@ PROPERTY must be a constant.
Leave point just before the character, and set the match data on
this character, and return point. If the search fails, return
nil; point is then left undefined."
+ (declare (debug t))
`(let ((char-skip (concat "^" (char-to-string ,char)))
(-limit- (or ,limit (point-min)))
(-value- ,value))
@@ -1388,6 +1435,7 @@ PROPERTY must be a constant.
Leave point just after the character, and set the match data on
this character, and return point. If the search fails, return
nil; point is then left undefined."
+ (declare (debug t))
`(let ((char-skip (concat "^" (char-to-string ,char)))
(-limit- (or ,limit (point-max)))
(-value- ,value))
@@ -1436,6 +1484,7 @@ by `equal'. These properties are assumed to be over individual
characters, having been put there by c-put-char-property. POINT
remains unchanged. Return the position of the first removed
property, or nil."
+ (declare (debug t))
(if c-use-extents
;; XEmacs
`(let ((-property- ,property)
@@ -1459,6 +1508,7 @@ property, or nil."
;; `c-put-char-property' must be a constant.
"Put the text property PROPERTY with value VALUE on characters
with value CHAR in the region [FROM to)."
+ (declare (debug t))
`(let ((skip-string (concat "^" (list ,char)))
(-to- ,to))
(save-excursion
@@ -1481,6 +1531,7 @@ with value CHAR in the region [FROM to)."
;; Put an overlay/extent covering the given range in the current
;; buffer. It's currently undefined whether it's front/end sticky
;; or not. The overlay/extent object is returned.
+ (declare (debug t))
(if (cc-bytecomp-fboundp 'make-overlay)
;; Emacs.
`(let ((ol (make-overlay ,from ,to)))
@@ -1494,6 +1545,7 @@ with value CHAR in the region [FROM to)."
(defmacro c-delete-overlay (overlay)
;; Deletes an overlay/extent object previously retrieved using
;; `c-put-overlay'.
+ (declare (debug t))
(if (cc-bytecomp-fboundp 'make-overlay)
;; Emacs.
`(delete-overlay ,overlay)
@@ -1501,80 +1553,6 @@ with value CHAR in the region [FROM to)."
`(delete-extent ,overlay)))
-;; Make edebug understand the macros.
-;(eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el.
-; '(progn
-(def-edebug-spec cc-eval-when-compile (&rest def-form))
-(def-edebug-spec c-font-lock-flush t)
-(def-edebug-spec c--mapcan t)
-(def-edebug-spec c--set-difference (form form &rest [symbolp form]))
-(def-edebug-spec c--intersection (form form &rest [symbolp form]))
-(def-edebug-spec c--delete-duplicates (form &rest [symbolp form]))
-(def-edebug-spec c-point t)
-(def-edebug-spec c-is-escaped t)
-(def-edebug-spec c-will-be-escaped t)
-(def-edebug-spec c-next-single-property-change t)
-(def-edebug-spec c-delete-and-extract-region t)
-(def-edebug-spec c-set-region-active t)
-(def-edebug-spec c-set-keymap-parent t)
-(def-edebug-spec c-safe t)
-(def-edebug-spec c-int-to-char t)
-(def-edebug-spec c-characterp t)
-(def-edebug-spec c-save-buffer-state let*)
-(def-edebug-spec c-tentative-buffer-changes t)
-(def-edebug-spec c-forward-syntactic-ws t)
-(def-edebug-spec c-backward-syntactic-ws t)
-(def-edebug-spec c-forward-sexp t)
-(def-edebug-spec c-backward-sexp t)
-(def-edebug-spec c-safe-scan-lists t)
-(def-edebug-spec c-go-list-forward t)
-(def-edebug-spec c-go-list-backward t)
-(def-edebug-spec c-up-list-forward t)
-(def-edebug-spec c-up-list-backward t)
-(def-edebug-spec c-down-list-forward t)
-(def-edebug-spec c-down-list-backward t)
-(def-edebug-spec c-go-up-list-forward t)
-(def-edebug-spec c-go-up-list-backward t)
-(def-edebug-spec c-go-down-list-forward t)
-(def-edebug-spec c-go-down-list-backward t)
-(def-edebug-spec c-at-vsemi-p t)
-(def-edebug-spec c-add-syntax t)
-(def-edebug-spec c-add-class-syntax t)
-(def-edebug-spec c-benign-error t)
-(def-edebug-spec c-with-syntax-table t)
-(def-edebug-spec c-skip-ws-forward t)
-(def-edebug-spec c-skip-ws-backward t)
-(def-edebug-spec c-major-mode-is t)
-(def-edebug-spec c-search-forward-char-property t)
-(def-edebug-spec c-search-backward-char-property t)
-(def-edebug-spec c-put-char-property t)
-(def-edebug-spec c-put-syn-tab t)
-(def-edebug-spec c-get-char-property t)
-(def-edebug-spec c-clear-char-property t)
-(def-edebug-spec c-clear-syn-tab t)
-;;(def-edebug-spec c-min-property-position nil) ; invoked only by macros
-(def-edebug-spec c-min-property-position t) ; Now invoked from functions (2019-07)
-(def-edebug-spec c-clear-char-property-with-value t)
-(def-edebug-spec c-clear-char-property-with-value-on-char t)
-(def-edebug-spec c-put-char-properties-on-char t)
-(def-edebug-spec c-clear-char-properties t)
-(def-edebug-spec c-clear-syn-tab-properties t)
-(def-edebug-spec c-with-extended-string-fences (form form body))
-(def-edebug-spec c-put-overlay t)
-(def-edebug-spec c-delete-overlay t)
-(def-edebug-spec c-mark-<-as-paren t)
-(def-edebug-spec c-mark->-as-paren t)
-(def-edebug-spec c-unmark-<->-as-paren t)
-(def-edebug-spec c-with-<->-as-parens-suppressed (body))
-(def-edebug-spec c-self-bind-state-cache (body))
-(def-edebug-spec c-sc-scan-lists-no-category+1+1 t)
-(def-edebug-spec c-sc-scan-lists-no-category+1-1 t)
-(def-edebug-spec c-sc-scan-lists-no-category-1+1 t)
-(def-edebug-spec c-sc-scan-lists-no-category-1-1 t)
-(def-edebug-spec c-sc-scan-lists t)
-(def-edebug-spec c-sc-parse-partial-sexp t);))
-
-
;;; Functions.
;; Note: All these after the macros, to be on safe side in avoiding
@@ -1604,6 +1582,7 @@ with value CHAR in the region [FROM to)."
;; indirection through the `category' text property. This allows us to
;; toggle the property in all template brackets simultaneously and
;; cheaply. We use this, for instance, in `c-parse-state'.
+ (declare (debug t))
(if c-use-category
`(c-put-char-property ,pos 'category 'c-<-as-paren-syntax)
`(c-put-char-property ,pos 'syntax-table c-<-as-paren-syntax)))
@@ -1618,6 +1597,7 @@ with value CHAR in the region [FROM to)."
;; indirection through the `category' text property. This allows us to
;; toggle the property in all template brackets simultaneously and
;; cheaply. We use this, for instance, in `c-parse-state'.
+ (declare (debug t))
(if c-use-category
`(c-put-char-property ,pos 'category 'c->-as-paren-syntax)
`(c-put-char-property ,pos 'syntax-table c->-as-paren-syntax)))
@@ -1631,6 +1611,7 @@ with value CHAR in the region [FROM to)."
;; indirection through the `category' text property. This allows us to
;; toggle the property in all template brackets simultaneously and
;; cheaply. We use this, for instance, in `c-parse-state'.
+ (declare (debug t))
`(c-clear-char-property ,pos ,(if c-use-category ''category ''syntax-table)))
(defsubst c-suppress-<->-as-parens ()
@@ -1651,50 +1632,13 @@ with value CHAR in the region [FROM to)."
;; Like progn, except that the paren property is suppressed on all
;; template brackets whilst they are running. This macro does a hidden
;; buffer change.
+ (declare (debug (body)))
`(unwind-protect
(progn
(c-suppress-<->-as-parens)
,@forms)
(c-restore-<->-as-parens)))
-;;;;;;;;;;;;;;;
-
-(defmacro c-self-bind-state-cache (&rest forms)
- ;; Bind the state cache to itself and execute the FORMS. Return the result
- ;; of the last FORM executed. It is assumed that no buffer changes will
- ;; happen in FORMS, and no hidden buffer changes which could affect the
- ;; parsing will be made by FORMS.
- `(let* ((c-state-cache (copy-tree c-state-cache))
- (c-state-cache-good-pos c-state-cache-good-pos)
- ;(c-state-nonlit-pos-cache (copy-tree c-state-nonlit-pos-cache))
- ;(c-state-nonlit-pos-cache-limit c-state-nonlit-pos-cache-limit)
- ;(c-state-semi-nonlit-pos-cache (copy-tree c-state-semi-nonlit-pos-cache))
- ;(c-state-semi-nonlit-pos-cache-limit c-state-semi-nonlit-pos-cache)
- (c-state-brace-pair-desert (copy-tree c-state-brace-pair-desert))
- (c-state-point-min c-state-point-min)
- (c-state-point-min-lit-type c-state-point-min-lit-type)
- (c-state-point-min-lit-start c-state-point-min-lit-start)
- (c-state-min-scan-pos c-state-min-scan-pos)
- (c-state-old-cpp-beg-marker (if (markerp c-state-old-cpp-beg-marker)
- (copy-marker c-state-old-cpp-beg-marker)
- c-state-old-cpp-beg-marker))
- (c-state-old-cpp-beg (if (markerp c-state-old-cpp-beg)
- c-state-old-cpp-beg-marker
- c-state-old-cpp-beg))
- (c-state-old-cpp-end-marker (if (markerp c-state-old-cpp-end-marker)
- (copy-marker c-state-old-cpp-end-marker)
- c-state-old-cpp-end-marker))
- (c-state-old-cpp-end (if (markerp c-state-old-cpp-end)
- c-state-old-cpp-end-marker
- c-state-old-cpp-end))
- (c-parse-state-state c-parse-state-state))
- (prog1
- (progn ,@forms)
- (if (markerp c-state-old-cpp-beg-marker)
- (move-marker c-state-old-cpp-beg-marker nil))
- (if (markerp c-state-old-cpp-end-marker)
- (move-marker c-state-old-cpp-end-marker nil)))))
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The following macros are to be used only in `c-parse-state' and its
;; subroutines. Their main purpose is to simplify the handling of C++/Java
@@ -1708,6 +1652,7 @@ with value CHAR in the region [FROM to)."
;; Do a (scan-lists FROM 1 1). Any finishing position which either (i) is
;; determined by and angle bracket; or (ii) is inside a macro whose start
;; isn't POINT-MACRO-START doesn't count as a finishing position.
+ (declare (debug t))
`(let ((here (point))
(pos (scan-lists ,from 1 1)))
(while (eq (char-before pos) ?>)
@@ -1718,6 +1663,7 @@ with value CHAR in the region [FROM to)."
;; Do a (scan-lists FROM 1 -1). Any finishing position which either (i) is
;; determined by an angle bracket; or (ii) is inside a macro whose start
;; isn't POINT-MACRO-START doesn't count as a finishing position.
+ (declare (debug t))
`(let ((here (point))
(pos (scan-lists ,from 1 -1)))
(while (eq (char-before pos) ?<)
@@ -1729,6 +1675,7 @@ with value CHAR in the region [FROM to)."
;; Do a (scan-lists FROM -1 1). Any finishing position which either (i) is
;; determined by and angle bracket; or (ii) is inside a macro whose start
;; isn't POINT-MACRO-START doesn't count as a finishing position.
+ (declare (debug t))
`(let ((here (point))
(pos (scan-lists ,from -1 1)))
(while (eq (char-after pos) ?<)
@@ -1739,6 +1686,7 @@ with value CHAR in the region [FROM to)."
;; Do a (scan-lists FROM -1 -1). Any finishing position which either (i) is
;; determined by and angle bracket; or (ii) is inside a macro whose start
;; isn't POINT-MACRO-START doesn't count as a finishing position.
+ (declare (debug t))
`(let ((here (point))
(pos (scan-lists ,from -1 -1)))
(while (eq (char-after pos) ?>)
@@ -1747,6 +1695,7 @@ with value CHAR in the region [FROM to)."
pos))
(defmacro c-sc-scan-lists (from count depth)
+ (declare (debug t))
(if c-use-category
`(scan-lists ,from ,count ,depth)
(cond
@@ -1794,6 +1743,7 @@ with value CHAR in the region [FROM to)."
(defmacro c-sc-parse-partial-sexp (from to &optional targetdepth stopbefore
oldstate)
+ (declare (debug t))
(if c-use-category
`(parse-partial-sexp ,from ,to ,targetdepth ,stopbefore ,oldstate)
`(c-sc-parse-partial-sexp-no-category ,from ,to ,targetdepth ,stopbefore
@@ -2354,6 +2304,7 @@ system."
"Can be used inside a VAL in `c-lang-defconst' to evaluate FORM
immediately, i.e. at the same time as the `c-lang-defconst' form
itself is evaluated."
+ (declare (debug t))
;; Evaluate at macro expansion time, i.e. in the
;; `c--macroexpand-all' inside `c-lang-defconst'.
(eval form))
@@ -2396,7 +2347,8 @@ one `c-lang-defconst' for each NAME is permitted per file. If there
already is one it will be completely replaced; the value in the
earlier definition will not affect `c-lang-const' on the same
constant. A file is identified by its base name."
-
+ (declare (indent 1)
+ (debug (&define name [&optional stringp] [&rest sexp def-form])))
(let* ((sym (intern (symbol-name name) c-lang-constants))
;; Make `c-lang-const' expand to a straightforward call to
;; `c-get-lang-constant' in `c--macroexpand-all' below.
@@ -2487,12 +2439,6 @@ constant. A file is identified by its base name."
(c-define-lang-constant ',name ,bindings
,@(and pre-files `(',pre-files))))))
-(put 'c-lang-defconst 'lisp-indent-function 1)
-;(eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el.
-; '
-(def-edebug-spec c-lang-defconst
- (&define name [&optional stringp] [&rest sexp def-form]))
-
(defun c-define-lang-constant (name bindings &optional pre-files)
;; Used by `c-lang-defconst'.
@@ -2548,6 +2494,7 @@ LANG is the name of the language, i.e. the mode name without the
language. NAME and LANG are not evaluated so they should not be
quoted."
+ (declare (debug (name &optional symbolp)))
(or (symbolp name)
(error "Not a symbol: %S" name))
(or (symbolp lang)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 747a6fd4eda..622d9516e16 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -737,6 +737,7 @@ comment at the start of cc-engine.el for more info."
'(setq stack (cons (cons state saved-pos)
stack)))
(defmacro c-bos-pop-state (&optional do-if-done)
+ (declare (debug t))
`(if (setq state (car (car stack))
saved-pos (cdr (car stack))
stack (cdr stack))
@@ -761,6 +762,7 @@ comment at the start of cc-engine.el for more info."
(goto-char pos)
(setq sym nil)))
(defmacro c-bos-save-error-info (missing got)
+ (declare (debug t))
`(setq saved-pos (vector pos ,missing ,got)))
(defmacro c-bos-report-error ()
'(unless noerror
@@ -1871,51 +1873,51 @@ comment at the start of cc-engine.el for more info."
; (setq in-face (point)))
; (not (eobp)))))))
-(defmacro c-debug-sws-msg (&rest args)
- (ignore args)
+(defmacro c-debug-sws-msg (&rest _args)
+ ;; (declare (debug t))
;;`(message ,@args)
)
(defmacro c-put-is-sws (beg end)
;; This macro does a hidden buffer change.
+ (declare (debug t))
`(let ((beg ,beg) (end ,end))
(put-text-property beg end 'c-is-sws t)
,@(when (facep 'c-debug-is-sws-face)
'((c-debug-add-face beg end 'c-debug-is-sws-face)))))
-(def-edebug-spec c-put-is-sws t)
(defmacro c-put-in-sws (beg end)
;; This macro does a hidden buffer change.
+ (declare (debug t))
`(let ((beg ,beg) (end ,end))
(put-text-property beg end 'c-in-sws t)
,@(when (facep 'c-debug-is-sws-face)
'((c-debug-add-face beg end 'c-debug-in-sws-face)))))
-(def-edebug-spec c-put-in-sws t)
(defmacro c-remove-is-sws (beg end)
;; This macro does a hidden buffer change.
+ (declare (debug t))
`(let ((beg ,beg) (end ,end))
(remove-text-properties beg end '(c-is-sws nil))
,@(when (facep 'c-debug-is-sws-face)
'((c-debug-remove-face beg end 'c-debug-is-sws-face)))))
-(def-edebug-spec c-remove-is-sws t)
(defmacro c-remove-in-sws (beg end)
;; This macro does a hidden buffer change.
+ (declare (debug t))
`(let ((beg ,beg) (end ,end))
(remove-text-properties beg end '(c-in-sws nil))
,@(when (facep 'c-debug-is-sws-face)
'((c-debug-remove-face beg end 'c-debug-in-sws-face)))))
-(def-edebug-spec c-remove-in-sws t)
(defmacro c-remove-is-and-in-sws (beg end)
;; This macro does a hidden buffer change.
+ (declare (debug t))
`(let ((beg ,beg) (end ,end))
(remove-text-properties beg end '(c-is-sws nil c-in-sws nil))
,@(when (facep 'c-debug-is-sws-face)
'((c-debug-remove-face beg end 'c-debug-is-sws-face)
(c-debug-remove-face beg end 'c-debug-in-sws-face)))))
-(def-edebug-spec c-remove-is-and-in-sws t)
;; The type of literal position `end' is in a `before-change-functions'
;; function - one of `c', `c++', `pound', `noise', `attribute' or nil (but NOT
@@ -3517,6 +3519,7 @@ mhtml-mode."
(defmacro c-state-cache-top-lparen (&optional cache)
;; Return the address of the top left brace/bracket/paren recorded in CACHE
;; (default `c-state-cache') (or nil).
+ (declare (debug t))
(let ((cash (or cache 'c-state-cache)))
`(if (consp (car ,cash))
(caar ,cash)
@@ -3525,6 +3528,7 @@ mhtml-mode."
(defmacro c-state-cache-top-paren (&optional cache)
;; Return the address of the latest brace/bracket/paren (whether left or
;; right) recorded in CACHE (default `c-state-cache') or nil.
+ (declare (debug t))
(let ((cash (or cache 'c-state-cache)))
`(if (consp (car ,cash))
(cdar ,cash)
@@ -3533,6 +3537,7 @@ mhtml-mode."
(defmacro c-state-cache-after-top-paren (&optional cache)
;; Return the position just after the latest brace/bracket/paren (whether
;; left or right) recorded in CACHE (default `c-state-cache') or nil.
+ (declare (debug t))
(let ((cash (or cache 'c-state-cache)))
`(if (consp (car ,cash))
(cdar ,cash)
@@ -4487,6 +4492,7 @@ mhtml-mode."
(defmacro c-state-maybe-marker (place marker)
;; If PLACE is non-nil, return a marker marking it, otherwise nil.
;; We (re)use MARKER.
+ (declare (debug (form symbolp)))
`(let ((-place- ,place))
(and -place-
(or ,marker (setq ,marker (make-marker)))
@@ -5973,6 +5979,7 @@ comment at the start of cc-engine.el for more info."
; spots and the preceding token end.")
(defmacro c-debug-put-decl-spot-faces (match-pos decl-pos)
+ (declare (debug t))
(when (facep 'c-debug-decl-spot-face)
`(c-save-buffer-state ((match-pos ,match-pos) (decl-pos ,decl-pos))
(c-debug-add-face (max match-pos (point-min)) decl-pos
@@ -5980,6 +5987,7 @@ comment at the start of cc-engine.el for more info."
(c-debug-add-face decl-pos (min (1+ decl-pos) (point-max))
'c-debug-decl-spot-face))))
(defmacro c-debug-remove-decl-spot-faces (beg end)
+ (declare (debug t))
(when (facep 'c-debug-decl-spot-face)
`(c-save-buffer-state ()
(c-debug-remove-face ,beg ,end 'c-debug-decl-spot-face)
@@ -7774,6 +7782,7 @@ comment at the start of cc-engine.el for more info."
(defvar c-last-identifier-range nil)
(defmacro c-record-type-id (range)
+ (declare (debug t))
(if (eq (car-safe range) 'cons)
;; Always true.
`(setq c-record-type-identifiers
@@ -7784,6 +7793,7 @@ comment at the start of cc-engine.el for more info."
(cons range c-record-type-identifiers))))))
(defmacro c-record-ref-id (range)
+ (declare (debug t))
(if (eq (car-safe range) 'cons)
;; Always true.
`(setq c-record-ref-identifiers
@@ -7809,6 +7819,7 @@ comment at the start of cc-engine.el for more info."
;; if TYPE is 'type or as a reference if TYPE is 'ref.
;;
;; This macro might do hidden buffer changes.
+ (declare (debug t))
`(let (res)
(setq c-last-identifier-range nil)
(while (if (setq res ,(if (eq type 'type)
@@ -7833,6 +7844,7 @@ comment at the start of cc-engine.el for more info."
;; `c-forward-keyword-prefixed-id'.
;;
;; This macro might do hidden buffer changes.
+ (declare (debug t))
`(while (and (progn
,(when update-safe-pos
'(setq safe-pos (point)))
@@ -8776,6 +8788,7 @@ comment at the start of cc-engine.el for more info."
(defmacro c-pull-open-brace (ps)
;; Pull the next open brace from PS (which has the form of paren-state),
;; skipping over any brace pairs. Returns NIL when PS is exhausted.
+ (declare (debug (symbolp)))
`(progn
(while (consp (car ,ps))
(setq ,ps (cdr ,ps)))
@@ -8891,6 +8904,7 @@ comment at the start of cc-engine.el for more info."
;; a comma. If either of <symbol> or bracketed <expression> is missing,
;; throw nil to 'level. If the terminating } or ) is unmatched, throw nil
;; to 'done. This is not a general purpose macro!
+ (declare (debug t))
`(while (eq (char-before) ?,)
(backward-char)
(c-backward-syntactic-ws ,limit)
@@ -9284,6 +9298,7 @@ This function might do hidden buffer changes."
;; sometimes consumes the identifier in the declaration as a type.
;; This is used to "backtrack" and make the last type be treated as
;; an identifier instead.
+ (declare (debug nil))
`(progn
,(unless short
;; These identifiers are bound only in the inner let.
@@ -14687,18 +14702,6 @@ Cannot combine absolute offsets %S and %S in `add' method"
indent)))
-(def-edebug-spec c-bos-pop-state t)
-(def-edebug-spec c-bos-save-error-info t)
-(def-edebug-spec c-state-cache-top-lparen t)
-(def-edebug-spec c-state-cache-top-paren t)
-(def-edebug-spec c-state-cache-after-top-paren t)
-(def-edebug-spec c-state-maybe-marker (form symbolp))
-(def-edebug-spec c-record-type-id t)
-(def-edebug-spec c-record-ref-id t)
-(def-edebug-spec c-forward-keyword-prefixed-id t)
-(def-edebug-spec c-forward-id-comma-list t)
-(def-edebug-spec c-pull-open-brace (symbolp))
-
(cc-provide 'cc-engine)
;; Local Variables:
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 433b4dcf4a8..fdef0840cda 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -218,6 +218,7 @@
;; incorrectly.
;;
;; This function does a hidden buffer change.
+ (declare (debug t))
(if (fboundp 'font-lock-set-face)
;; Note: This function has no docstring in XEmacs so it might be
;; considered internal.
@@ -228,6 +229,7 @@
;; This is the inverse of `c-put-font-lock-face'.
;;
;; This function does a hidden buffer change.
+ (declare (debug t))
(if (fboundp 'font-lock-remove-face)
`(font-lock-remove-face ,from ,to)
`(remove-text-properties ,from ,to '(face nil))))
@@ -238,11 +240,13 @@
;; region should include them.
;;
;; This function does a hidden buffer change.
+ (declare (debug t))
(if (featurep 'xemacs)
`(c-put-font-lock-face (1+ ,from) (1- ,to) 'font-lock-string-face)
`(c-put-font-lock-face ,from ,to 'font-lock-string-face)))
(defmacro c-fontify-types-and-refs (varlist &rest body)
+ (declare (indent 1) (debug let*))
;; Like `let', but additionally activates `c-record-type-identifiers'
;; and `c-record-ref-identifiers', and fontifies the recorded ranges
;; accordingly on exit.
@@ -253,7 +257,6 @@
,@varlist)
(prog1 (progn ,@body)
(c-fontify-recorded-types-and-refs))))
- (put 'c-fontify-types-and-refs 'lisp-indent-function 1)
(defun c-skip-comments-and-strings (limit)
;; If the point is within a region fontified as a comment or
@@ -482,20 +485,7 @@
;; In the next form, check that point hasn't been moved beyond
;; `limit' in any of the above stanzas.
,(c-make-font-lock-search-form (car normal) (cdr normal) t)
- nil))))
-
-; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el.
-; '(progn
-(def-edebug-spec c-put-font-lock-face t)
-(def-edebug-spec c-remove-font-lock-face t)
-(def-edebug-spec c-put-font-lock-string-face t)
- (def-edebug-spec c-fontify-types-and-refs let*)
- (def-edebug-spec c-make-syntactic-matcher t)
- ;; If there are literal quoted or backquoted highlight specs in
- ;; the call to `c-make-font-lock-search-function' then let's
- ;; instrument the forms in them.
- (def-edebug-spec c-make-font-lock-search-function
- (form &rest &or ("quote" (&rest form)) ("`" (&rest form)) form)));))
+ nil)))))
(defun c-fontify-recorded-types-and-refs ()
;; Convert the ranges recorded on `c-record-type-identifiers' and
@@ -2712,6 +2702,7 @@ need for `pike-font-lock-extra-types'.")
(defmacro c-set-doc-comment-re-element (suffix)
;; Set the variable `c-doc-line-join-re' to a buffer local value suitable
;; for the current doc comment style, or kill the local value.
+ (declare (debug t))
(let ((var (intern (concat "c-doc" suffix))))
`(let* ((styles (c-get-doc-comment-style))
elts)
@@ -2738,6 +2729,7 @@ need for `pike-font-lock-extra-types'.")
(defmacro c-set-doc-comment-char-list (suffix)
;; Set the variable 'c-doc-<suffix>' to the list of *-<suffix>, which must
;; be characters, and * represents the doc comment style.
+ (declare (debug t))
(let ((var (intern (concat "c-doc" suffix))))
`(let* ((styles (c-get-doc-comment-style))
elts)
@@ -2783,7 +2775,7 @@ need for `pike-font-lock-extra-types'.")
;; is used as a flag in other code to skip comments.
;;
;; This function might do hidden buffer changes.
-
+ (declare (indent 2))
(let (comment-beg region-beg)
(if (memq (get-text-property (point) 'face)
'(font-lock-comment-face font-lock-comment-delimiter-face))
@@ -2866,7 +2858,6 @@ need for `pike-font-lock-extra-types'.")
(goto-char region-end)))))
nil)
-(put 'c-font-lock-doc-comments 'lisp-indent-function 2)
(defun c-find-invalid-doc-markup (regexp limit)
;; Used to fontify invalid markup in doc comments after the correct
diff --git a/lisp/progmodes/cc-guess.el b/lisp/progmodes/cc-guess.el
index 0824af66b43..9c88c14a6c1 100644
--- a/lisp/progmodes/cc-guess.el
+++ b/lisp/progmodes/cc-guess.el
@@ -58,7 +58,7 @@
;;
;; If you want to reuse the guessed style in future emacs sessions,
;; you may want to put it to your .emacs. `c-guess-view' is for
-;; you. It emits emacs lisp code which defines the last guessed
+;; you. It emits Emacs Lisp code which defines the last guessed
;; style, in a temporary buffer. You can put the emitted code into
;; your .emacs. This command was suggested by Alan Mackenzie.
@@ -527,7 +527,7 @@ is called with one argument, the guessed style."
(cdr needs-markers)))))
(defun c-guess-view (&optional with-name)
- "Emit emacs lisp code which defines the last guessed style.
+ "Emit Emacs Lisp code which defines the last guessed style.
So you can put the code into .emacs if you prefer the
guessed code.
\"STYLE NAME HERE\" is used as the name for the style in the
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 4266600f8cf..f6648491a97 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -159,7 +159,9 @@ evaluated and bound to VAR when the result from the macro
`c-lang-const' is typically used in VAL to get the right value for the
language being initialized, and such calls will be macro expanded to
the evaluated constant value at compile time."
-
+ (declare (indent defun)
+ (debug (&define name def-form
+ &optional &or ("quote" symbolp) stringp)))
(when (and (not doc)
(eq (car-safe val) 'c-lang-const)
(eq (nth 1 val) var)
@@ -191,6 +193,7 @@ Emacs variable like `comment-start'.
`c-lang-const' is typically used in VAL to get the right value for the
language being initialized, and such calls will be macro expanded to
the evaluated constant value at compile time."
+ (declare (debug (&define name def-form)))
(let ((elem (assq var (cdr c-emacs-variable-inits))))
(if elem
(setcdr elem (list val)) ; Maybe remove "list", sometime. 2006-07-19
@@ -200,13 +203,6 @@ the evaluated constant value at compile time."
;; Return the symbol, like the other def* forms.
`',var)
-(put 'c-lang-defvar 'lisp-indent-function 'defun)
-; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el.
-; '
-(def-edebug-spec c-lang-defvar
- (&define name def-form &optional &or ("quote" symbolp) stringp))
-(def-edebug-spec c-lang-setvar (&define name def-form))
-
;; Suppress "might not be defined at runtime" warning.
;; This file is only used when compiling other cc files.
(declare-function cl-delete-duplicates "cl-seq" (cl-seq &rest cl-keys))
@@ -379,12 +375,14 @@ The syntax tables aren't stored directly since they're quite large."
(let ((table (make-syntax-table)))
(c-populate-syntax-table table)
;; Mode specific syntaxes.
- ,(cond ((or (c-major-mode-is 'objc-mode) (c-major-mode-is 'java-mode))
+ ,(cond ((c-major-mode-is 'objc-mode)
;; Let '@' be part of symbols in ObjC to cope with
;; its compiler directives as single keyword tokens.
;; This is then necessary since it's assumed that
;; every keyword is a single symbol.
'(modify-syntax-entry ?@ "_" table))
+ ((c-major-mode-is 'java-mode)
+ '(modify-syntax-entry ?@ "'" table))
((c-major-mode-is 'pike-mode)
'(modify-syntax-entry ?@ "." table)))
table)))
@@ -4092,6 +4090,7 @@ accomplish that conveniently."
This macro is expanded at compile time to a form tailored for the mode
in question, so MODE must be a constant. Therefore MODE is not
evaluated and should not be quoted."
+ (declare (debug nil))
`(funcall ,(c-make-init-lang-vars-fun mode)))
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index dae0062efb5..a8f16627722 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -969,6 +969,7 @@ Note that the style variables are always made local to the buffer."
(defmacro c-run-mode-hooks (&rest hooks)
;; Emacs 21.1 has introduced a system with delayed mode hooks that
;; requires the use of the new function `run-mode-hooks'.
+ (declare (debug t))
(if (cc-bytecomp-fboundp 'run-mode-hooks)
`(run-mode-hooks ,@hooks)
`(progn ,@(mapcar (lambda (hook) `(run-hooks ,hook)) hooks))))
@@ -2503,6 +2504,7 @@ This function is called from `c-common-init', once per mode initialization."
;; Emacs < 22 and XEmacs
(defmacro c-advise-fl-for-region (function)
+ (declare (debug t))
`(defadvice ,function (before get-awk-region activate)
;; Make sure that any string/regexp is completely font-locked.
(when c-buffer-is-cc-mode
diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el
index a0f5d36bb65..cd92175bd61 100644
--- a/lisp/progmodes/glasses.el
+++ b/lisp/progmodes/glasses.el
@@ -321,10 +321,6 @@ separators (like underscores) at places they belong to."
(remove-hook 'write-file-functions
'glasses-convert-to-unreadable t)))))
-
-;;; Announce
-
(provide 'glasses)
-
;;; glasses.el ends here
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index b105cbaa0ef..a37477dfa1e 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -293,6 +293,10 @@ Used to gray out relevant toolbar icons.")
(tool-bar-local-item-from-menu
(car x) (cdr x) map gud-minor-mode-map))))
+(defvar gud-repeat-map (make-sparse-keymap)
+ "Keymap to repeat gud stepping instructions `C-x C-a C-n n n'.
+Used in `repeat-mode'.")
+
(defun gud-file-name (f)
"Transform a relative file name to an absolute file name.
Uses `gud-<MINOR-MODE>-directories' to find the source files."
@@ -784,6 +788,17 @@ the buffer in which this command was invoked."
(gud-def gud-until "until %l" "\C-u" "Continue to current line.")
(gud-def gud-run "run" nil "Run the program.")
+ (dolist (cmd '(("n" . gud-next)
+ ("s" . gud-step)
+ ("i" . gud-stepi)
+ ("c" . gud-cont)
+ ("l" . gud-refresh)
+ ("f" . gud-finish)
+ ("<" . gud-up)
+ (">" . gud-down)))
+ (define-key gud-repeat-map (car cmd) (cdr cmd))
+ (put (cdr cmd) 'repeat-map 'gud-repeat-map))
+
(add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point
nil 'local)
(setq-local gud-gdb-completion-function 'gud-gdb-completions)
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index 134a6c6e497..ad8feb988f5 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -1,4 +1,4 @@
-;; idlw-shell.el --- run IDL as an inferior process of Emacs. -*- lexical-binding:t -*-
+;;; idlw-shell.el --- run IDL as an inferior process of Emacs. -*- lexical-binding:t -*-
;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 75f2016fc24..b55a98af0b3 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -1,4 +1,4 @@
-;; idlwave.el --- IDL editing mode for GNU Emacs -*- lexical-binding: t; -*-
+;;; idlwave.el --- IDL editing mode for GNU Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index eb690a72f6e..a942235f474 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -494,10 +494,11 @@ for preventing Firefox from stealing the keyboard focus."
:type 'boolean)
(defcustom js-js-tmpdir
- "~/.emacs.d/js/js"
+ (locate-user-emacs-file "js/js")
"Temporary directory used by `js-mode' to communicate with Mozilla.
This directory must be readable and writable by both Mozilla and Emacs."
- :type 'directory)
+ :type 'directory
+ :version "28.1")
(defcustom js-js-timeout 5
"Reply timeout for executing commands in Mozilla via `js-mode'.
@@ -4654,4 +4655,4 @@ one of the aforementioned options instead of using this mode."
(provide 'js)
-;; js.el ends here
+;;; js.el ends here
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index a59014827e8..50268446025 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -942,9 +942,6 @@ The environment marked is the one that contains point or follows point."
(list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list)
(list "" 'ispell-complete-word))))
-
-;;; Just in case ...
-
(provide 'meta-mode)
(run-hooks 'meta-mode-load-hook)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index a819e7243ca..1d0d1bc58a4 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -296,7 +296,7 @@ to find the list of ignores for each directory."
;; Make sure ~/ etc. in local directory name is
;; expanded and not left for the shell command
;; to interpret.
- (localdir (file-local-name (expand-file-name dir)))
+ (localdir (file-name-unquote (file-local-name (expand-file-name dir))))
(command (format "%s %s %s -type f %s -print0"
find-program
;; In case DIR is a symlink.
@@ -311,16 +311,25 @@ to find the list of ignores for each directory."
(concat " -o " find-name-arg " "))
" "
(shell-quote-argument ")"))
- ""))))
+ "")))
+ (output (with-output-to-string
+ (with-current-buffer standard-output
+ (let ((status
+ (process-file-shell-command command nil t)))
+ (unless (zerop status)
+ (error "File listing failed: %s" (buffer-string))))))))
(project--remote-file-names
- (sort (split-string (shell-command-to-string command) "\0" t)
+ (sort (split-string output "\0" t)
#'string<))))
(defun project--remote-file-names (local-files)
- "Return LOCAL-FILES as if they were on the system of `default-directory'."
+ "Return LOCAL-FILES as if they were on the system of `default-directory'.
+Also quote LOCAL-FILES if `default-directory' is quoted."
(let ((remote-id (file-remote-p default-directory)))
(if (not remote-id)
- local-files
+ (if (file-name-quoted-p default-directory)
+ (mapcar #'file-name-quote local-files)
+ local-files)
(mapcar (lambda (file)
(concat remote-id file))
local-files))))
@@ -778,7 +787,11 @@ pattern to search for."
(defun project--find-regexp-in-files (regexp files)
(unless files
(user-error "Empty file list"))
- (let ((xrefs (xref-matches-in-files regexp files)))
+ (let ((xrefs (xref-matches-in-files
+ regexp
+ ;; FIXME: `xref-matches-in-files' should work with
+ ;; quoted filenames.
+ (mapcar #'file-name-unquote files))))
(unless xrefs
(user-error "No matches for: %s" regexp))
xrefs))
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 30721c7a577..20ec339fffb 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -247,8 +247,6 @@
;; I'd recommend the first one since you'll get the same behavior for
;; all modes out-of-the-box.
-;;; TODO:
-
;;; Code:
(require 'ansi-color)
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 6e53a04f72d..65a4094d70d 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -5606,7 +5606,7 @@ The default value disables the internal pager."
(provide 'sql)
-;;; sql.el ends here
-
; LocalWords: sql SQL SQLite sqlite Sybase Informix MySQL
; LocalWords: Postgres SQLServer SQLi
+
+;;; sql.el ends here
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index cada1f11092..3d2f21ab52f 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1416,7 +1416,8 @@ IGNORES is a list of glob patterns for files to ignore."
(command (xref--rgrep-command (xref--regexp-to-extended regexp)
files
(file-name-as-directory
- (file-local-name (expand-file-name dir)))
+ (file-name-unquote
+ (file-local-name (expand-file-name dir))))
ignores))
(def default-directory)
(buf (get-buffer-create " *xref-grep*"))
diff --git a/lisp/repeat.el b/lisp/repeat.el
index f1b20d369bf..b7118cc7f95 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -348,17 +348,22 @@ For example, you can set it to <return> like `isearch-exit'."
:group 'convenience
:version "28.1")
-(defcustom repeat-mode-echo #'repeat-mode-message
+(defcustom repeat-echo-function #'repeat-echo-message
"Function to display a hint about available keys.
Function is called after every repeatable command with one argument:
-a string with a list of keys."
+a repeating map, or nil after deactivating the repeat mode."
:type '(choice (const :tag "Show hints in the echo area"
- repeat-mode-message)
- (const :tag "Don't show hints" ignore)
+ repeat-echo-message)
+ (const :tag "Show indicator in the mode line"
+ repeat-echo-mode-line)
+ (const :tag "No visual feedback" ignore)
(function :tag "Function"))
:group 'convenience
:version "28.1")
+(defvar repeat-in-progress nil
+ "Non-nil when the repeating map is active.")
+
;;;###autoload
(defvar repeat-map nil
"The value of the repeating map for the next command.
@@ -386,51 +391,73 @@ When Repeat mode is enabled, and the command symbol has the property named
(defun repeat-post-hook ()
"Function run after commands to set transient keymap for repeatable keys."
- (when repeat-mode
- (let ((rep-map (or repeat-map
- (and (symbolp real-this-command)
- (get real-this-command 'repeat-map)))))
- (when rep-map
- (when (boundp rep-map)
- (setq rep-map (symbol-value rep-map)))
- (let ((map (copy-keymap rep-map))
- keys)
-
- ;; Exit when the last char is not among repeatable keys,
- ;; so e.g. `C-x u u' repeats undo, whereas `C-/ u' doesn't.
- (when (and (zerop (minibuffer-depth)) ; avoid remapping in prompts
- (or (lookup-key map (this-command-keys-vector))
- prefix-arg))
-
- ;; Messaging
- (unless prefix-arg
- (map-keymap (lambda (key _) (push key keys)) map)
- (let ((mess (format-message
- "Repeat with %s%s"
- (mapconcat (lambda (key)
- (key-description (vector key)))
- keys ", ")
- (if repeat-exit-key
- (format ", or exit with %s"
- (key-description repeat-exit-key))
- ""))))
- (funcall repeat-mode-echo mess)))
-
- ;; Adding an exit key
- (when repeat-exit-key
- (define-key map repeat-exit-key 'ignore))
-
- (when (and repeat-keep-prefix (not prefix-arg))
- (setq prefix-arg current-prefix-arg))
-
- (set-transient-map map))))))
- (setq repeat-map nil))
-
-(defun repeat-mode-message (mess)
- "Function that displays available repeating keys in the echo area."
- (if (current-message)
- (message "%s [%s]" (current-message) mess)
- (message mess)))
+ (let ((was-in-progress repeat-in-progress))
+ (setq repeat-in-progress nil)
+ (when repeat-mode
+ (let ((rep-map (or repeat-map
+ (and (symbolp real-this-command)
+ (get real-this-command 'repeat-map)))))
+ (when rep-map
+ (when (boundp rep-map)
+ (setq rep-map (symbol-value rep-map)))
+ (let ((map (copy-keymap rep-map)))
+
+ ;; Exit when the last char is not among repeatable keys,
+ ;; so e.g. `C-x u u' repeats undo, whereas `C-/ u' doesn't.
+ (when (and (zerop (minibuffer-depth)) ; avoid remapping in prompts
+ (or (lookup-key map (this-command-keys-vector))
+ prefix-arg))
+
+ ;; Messaging
+ (unless prefix-arg
+ (funcall repeat-echo-function map))
+
+ ;; Adding an exit key
+ (when repeat-exit-key
+ (define-key map repeat-exit-key 'ignore))
+
+ (when (and repeat-keep-prefix (not prefix-arg))
+ (setq prefix-arg current-prefix-arg))
+
+ (setq repeat-in-progress t)
+ (set-transient-map map))))))
+
+ (setq repeat-map nil)
+ (when (and was-in-progress (not repeat-in-progress))
+ (funcall repeat-echo-function nil))))
+
+(defun repeat-echo-message-string (map)
+ "Return a string with a list of repeating keys."
+ (let (keys)
+ (map-keymap (lambda (key _) (push key keys)) map)
+ (format-message "Repeat with %s%s"
+ (mapconcat (lambda (key)
+ (key-description (vector key)))
+ keys ", ")
+ (if repeat-exit-key
+ (format ", or exit with %s"
+ (key-description repeat-exit-key))
+ ""))))
+
+(defun repeat-echo-message (map)
+ "Display available repeating keys in the echo area."
+ (when map
+ (let ((mess (repeat-echo-message-string map)))
+ (if (current-message)
+ (message "%s [%s]" (current-message) mess)
+ (message mess)))))
+
+(defvar repeat-echo-mode-line-string
+ (propertize "[Repeating...] " 'face 'mode-line-emphasis)
+ "String displayed in the mode line in repeating mode.")
+
+(defun repeat-echo-mode-line (map)
+ "Display the repeat indicator in the mode line."
+ (if map
+ (unless (assq 'repeat-in-progress mode-line-modes)
+ (add-to-list 'mode-line-modes (list 'repeat-in-progress
+ repeat-echo-mode-line-string)))
+ (force-mode-line-update t)))
(provide 'repeat)
diff --git a/lisp/ses.el b/lisp/ses.el
index 6058d48ed19..98785b6b938 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -1,4 +1,4 @@
-;;; ses.el -- Simple Emacs Spreadsheet -*- lexical-binding:t -*-
+;;; ses.el --- Simple Emacs Spreadsheet -*- lexical-binding:t -*-
;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 12e57b11082..4666026f357 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -1,4 +1,4 @@
-;;; speedbar --- quick access to files and tags in a frame -*- lexical-binding: t; -*-
+;;; speedbar.el --- quick access to files and tags in a frame -*- lexical-binding: t; -*-
;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
@@ -4055,7 +4055,6 @@ this version is not backward compatible to 0.14 or earlier.")
(provide 'speedbar)
-;; run load-time hooks
(run-hooks 'speedbar-load-hook)
-;;; speedbar ends here
+;;; speedbar.el ends here
diff --git a/lisp/term/konsole.el b/lisp/term/konsole.el
index e38a5d34e75..1f65a46011c 100644
--- a/lisp/term/konsole.el
+++ b/lisp/term/konsole.el
@@ -9,4 +9,4 @@
(provide 'term/konsole)
-;; konsole.el ends here
+;;; konsole.el ends here
diff --git a/lisp/term/linux.el b/lisp/term/linux.el
index 35bd3ac0acb..c6d84ab96c3 100644
--- a/lisp/term/linux.el
+++ b/lisp/term/linux.el
@@ -1,4 +1,6 @@
-;; The Linux console handles Latin-1 by default. -*- lexical-binding:t -*-
+;;; linux.el -*- lexical-binding:t -*-
+
+;; The Linux console handles Latin-1 by default.
(declare-function gpm-mouse-enable "t-mouse" ())
diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el
index 3bcaa2ecd18..c2802477670 100644
--- a/lisp/term/lk201.el
+++ b/lisp/term/lk201.el
@@ -1,4 +1,4 @@
-;; Define function key sequences for DEC terminals. -*- lexical-binding: t -*-
+;;; lk201.el --- Define function key sequences for DEC terminals. -*- lexical-binding: t -*-
(defvar lk201-function-map
(let ((map (make-sparse-keymap)))
diff --git a/lisp/term/screen.el b/lisp/term/screen.el
index 04481e8358b..9655f41b6c1 100644
--- a/lisp/term/screen.el
+++ b/lisp/term/screen.el
@@ -22,4 +22,4 @@ it runs, which can change when the screen session is moved to another tty."
(provide 'term/screen)
-;; screen.el ends here
+;;; screen.el ends here
diff --git a/lisp/term/st.el b/lisp/term/st.el
index 08432c414af..9a1c0646f89 100644
--- a/lisp/term/st.el
+++ b/lisp/term/st.el
@@ -17,4 +17,4 @@
(provide 'term/st)
-;; st.el ends here
+;;; st.el ends here
diff --git a/lisp/term/tmux.el b/lisp/term/tmux.el
index aa0c98364f3..4ea6f416c8c 100644
--- a/lisp/term/tmux.el
+++ b/lisp/term/tmux.el
@@ -22,4 +22,4 @@ it runs, which can change when the tmux session is moved to another tty."
(provide 'term/tmux)
-;; tmux.el ends here
+;;; tmux.el ends here
diff --git a/lisp/term/w32console.el b/lisp/term/w32console.el
index 4a925cd84c3..1a5dc05783e 100644
--- a/lisp/term/w32console.el
+++ b/lisp/term/w32console.el
@@ -1,4 +1,4 @@
-;;; w32console.el -- Setup w32 console keys and colors. -*- lexical-binding: t; -*-
+;;; w32console.el --- Setup w32 console keys and colors. -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
index fbb9d2174fd..d9a83c566b4 100644
--- a/lisp/textmodes/artist.el
+++ b/lisp/textmodes/artist.el
@@ -33,7 +33,7 @@
;; What is artist?
;; ---------------
;;
-;; Artist is an Emacs lisp package that allows you to draw lines,
+;; Artist is an Emacs Lisp package that allows you to draw lines,
;; rectangles and ellipses by using your mouse and/or keyboard. The
;; shapes are made up with the ascii characters |, -, / and \.
;;
diff --git a/lisp/textmodes/bibtex-style.el b/lisp/textmodes/bibtex-style.el
index 6d01871bc52..27b2e0e3331 100644
--- a/lisp/textmodes/bibtex-style.el
+++ b/lisp/textmodes/bibtex-style.el
@@ -24,7 +24,6 @@
;; Done: font-lock, imenu, outline, commenting, indentation.
;; Todo: tab-completion.
-;; Bugs:
;;; Code:
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index f01c66b1584..31186fb4fac 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -5608,8 +5608,5 @@ If APPEND is non-nil, append ENTRIES to those already displayed."
(setq buffer-read-only t)
(goto-char (point-min)))
-
-;; Make BibTeX a Feature
-
(provide 'bibtex)
;;; bibtex.el ends here
diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el
index 8152f4b89c8..653540ad415 100644
--- a/lisp/textmodes/makeinfo.el
+++ b/lisp/textmodes/makeinfo.el
@@ -284,7 +284,6 @@ line LINE of the window, or centered if LINE is nil."
(pop-to-buffer old-buffer)
)))
-;;; Place `provide' at end of file.
(provide 'makeinfo)
;;; makeinfo.el ends here
diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el
index e1d7fb7431c..b86a2f149de 100644
--- a/lisp/textmodes/page.el
+++ b/lisp/textmodes/page.el
@@ -170,8 +170,6 @@ point, respectively."
(interactive)
(apply #'message (cons "Page %d, line %d" (page--what-page))))
-
-;;; Place `provide' at end of file.
(provide 'page)
;;; page.el ends here
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index 31e91c73031..59b15e82a81 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -202,8 +202,6 @@ This is desirable in modes where blank lines are the paragraph delimiters."
(put 'paragraph-ignore-fill-prefix 'safe-local-variable #'booleanp)
;; Silence the compiler.
-(defvar multiple-lines)
-
(defun forward-paragraph (&optional arg)
"Move forward to end of paragraph.
With argument ARG, do it ARG times;
@@ -262,13 +260,13 @@ Returns the count of paragraphs left to move."
;; Search back for line that starts or separates paragraphs.
(if (if fill-prefix-regexp
;; There is a fill prefix; it overrides parstart.
- (let (multiple-lines)
+ (let () ;; multiple-lines
(while (and (progn (beginning-of-line) (not (bobp)))
(progn (move-to-left-margin)
(not (looking-at parsep)))
(looking-at fill-prefix-regexp))
- (unless (= (point) start)
- (setq multiple-lines t))
+ ;; (unless (= (point) start)
+ ;; (setq multiple-lines t))
(forward-line -1))
(move-to-left-margin)
;; This deleted code caused a long hanging-indent line
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 8a0436afc64..4acdc9f4d87 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -1,4 +1,4 @@
-;;; remember --- a mode for quickly jotting down things to remember -*- lexical-binding: t; -*-
+;;; remember.el --- a mode for quickly jotting down things to remember -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2001, 2003-2021 Free Software Foundation, Inc.
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index 13b4a6d05b0..2dd52b87b79 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -383,7 +383,7 @@
;; There is no artificial-intelligence magic in this package. The
;; definition of a table and the cells inside the table is reasonably
;; limited in order to achieve acceptable performance in the
-;; interactive operation under Emacs lisp implementation. A valid
+;; interactive operation under Emacs Lisp implementation. A valid
;; table is a rectangular text area completely filled with valid
;; cells. A valid cell is a rectangle text area, which four borders
;; consist of valid border characters. Cells can not be nested one to
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index fb57b9b0f23..8d7f459190b 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -28,7 +28,6 @@
;;; Code:
-;; Pacify the byte-compiler
(eval-when-compile
(require 'compare-w)
(require 'cl-lib)
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index a797df9193f..977f3bab6ce 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -23,9 +23,9 @@
;;; Commentary:
-;;; Code:
+;;; Emacs Lisp functions to convert Texinfo files to Info files.
-;;; Emacs lisp functions to convert Texinfo files to Info files.
+;;; Code:
(defvar texinfmt-version "2.42 of 7 Jul 2006")
(make-obsolete-variable 'texinfmt-version 'emacs-version "28.1")
@@ -4310,8 +4310,6 @@ For example, invoke
(setq error 1))))
(kill-emacs error))))
-
-;;; Place `provide' at end of file.
(provide 'texinfmt)
;;; texinfmt.el ends here
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el
index 27807a95e60..03004548302 100644
--- a/lisp/textmodes/texnfo-upd.el
+++ b/lisp/textmodes/texnfo-upd.el
@@ -2112,8 +2112,6 @@ chapter."
(message "Multiple files updated."))
-
-;; Place `provide' at end of file.
(provide 'texnfo-upd)
;;; texnfo-upd.el ends here
diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el
index 163978b4315..01e2ad72d88 100644
--- a/lisp/textmodes/tildify.el
+++ b/lisp/textmodes/tildify.el
@@ -503,8 +503,6 @@ variable will be set to the representation."
(remove-hook 'post-self-insert-hook #'tildify-space t)))
-;;; *** Announce ***
-
(provide 'tildify)
;;; tildify.el ends here
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el
index 6c3bacc647f..5a3a64ad79f 100644
--- a/lisp/textmodes/two-column.el
+++ b/lisp/textmodes/two-column.el
@@ -319,16 +319,17 @@ first and the associated buffer to its right."
;;;###autoload
-(defun 2C-associate-buffer ()
- "Associate another buffer with this one in two-column minor mode.
+(defun 2C-associate-buffer (buffer)
+ "Associate another BUFFER with this one in two-column minor mode.
Can also be used to associate a just previously visited file, by
accepting the proposed default buffer.
\(See \\[describe-mode] .)"
- (interactive)
+ (interactive
+ (list (or (2C-other)
+ (read-buffer "Associate buffer: " (other-buffer)))))
(let ((b1 (current-buffer))
- (b2 (or (2C-other)
- (read-buffer "Associate buffer: " (other-buffer)))))
+ (b2 buffer))
(setq 2C-mode nil)
(with-current-buffer b2
(and (2C-other)
diff --git a/lisp/uniquify.el b/lisp/uniquify.el
index 1d513d60376..7cc01687f49 100644
--- a/lisp/uniquify.el
+++ b/lisp/uniquify.el
@@ -498,8 +498,6 @@ For use on `kill-buffer-hook'."
(file-name-directory filename) retval)))
retval))
-;;; The End
-
(defun uniquify-unload-function ()
"Unload the uniquify library."
(save-current-buffer
diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el
index c6901d99200..29c2780121a 100644
--- a/lisp/url/url-mailto.el
+++ b/lisp/url/url-mailto.el
@@ -1,4 +1,4 @@
-;;; url-mail.el --- Mail Uniform Resource Locator retrieval code -*- lexical-binding: t; -*-
+;;; url-mailto.el --- Mail Uniform Resource Locator retrieval code -*- lexical-binding: t; -*-
;; Copyright (C) 1996-1999, 2004-2021 Free Software Foundation, Inc.
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 2b477dff0a3..87ca542f1c2 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -1,4 +1,4 @@
-;;; vc-dispatcher.el -- generic command-dispatcher facility. -*- lexical-binding: t -*-
+;;; vc-dispatcher.el --- generic command-dispatcher facility. -*- lexical-binding: t -*-
;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
diff --git a/lisp/vc/vc-filewise.el b/lisp/vc/vc-filewise.el
index e1b042a7424..254e47933d6 100644
--- a/lisp/vc/vc-filewise.el
+++ b/lisp/vc/vc-filewise.el
@@ -82,3 +82,5 @@ If the file is not registered, or the master name is not known, return nil."
nil)))) ; Not registered
(provide 'vc-filewise)
+
+;;; vc-filewise.el ends here
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index a054a7c3176..c9c1e91d483 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -26,10 +26,6 @@
;; This is a mercurial version control backend
-;;; Thanks:
-
-;;; Bugs:
-
;;; Todo:
;; 1) Implement the rest of the vc interface. See the comment at the
diff --git a/lisp/widget.el b/lisp/widget.el
index 401b4cf298f..d258e6fae2b 100644
--- a/lisp/widget.el
+++ b/lisp/widget.el
@@ -94,8 +94,6 @@ The third argument DOC is a documentation string for the widget."
;; This is used by external widget code (in W3, at least).
(define-obsolete-function-alias 'widget-plist-member #'plist-member "26.1")
-;;; The End.
-
(provide 'widget)
;;; widget.el ends here