summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-02-11 19:04:25 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-02-11 19:04:25 -0700
commitba0aa8c124473ccc8b21b3a441aeaf5afa98c2e9 (patch)
treeff491c98b0e270002b9631d52731f5ac44ed31cb
parent54eaebf2671cbe89ccf208dd038fd020d1a1f331 (diff)
parentc9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff)
downloademacs-ba0aa8c124473ccc8b21b3a441aeaf5afa98c2e9.tar.gz
Merge branch 'athena/unstable' into athena/buster-backports
-rw-r--r--CONTRIBUTE2
-rw-r--r--ChangeLog.31969
-rw-r--r--debian/README.source23
-rw-r--r--debian/changelog6
-rw-r--r--doc/emacs/buffers.texi32
-rw-r--r--doc/emacs/display.texi18
-rw-r--r--doc/emacs/files.texi6
-rw-r--r--doc/emacs/indent.texi4
-rw-r--r--doc/emacs/killing.texi14
-rw-r--r--doc/emacs/windows.texi8
-rw-r--r--doc/lispref/frames.texi2
-rw-r--r--doc/lispref/hash.texi9
-rw-r--r--doc/lispref/lists.texi15
-rw-r--r--doc/lispref/modes.texi5
-rw-r--r--doc/lispref/processes.texi6
-rw-r--r--doc/lispref/syntax.texi9
-rw-r--r--doc/misc/dbus.texi5
-rw-r--r--doc/misc/tramp.texi7
-rw-r--r--etc/NEWS118
-rw-r--r--leim/SKK-DIC/SKK-JISYO.L4
-rw-r--r--lisp/align.el10
-rw-r--r--lisp/allout-widgets.el11
-rw-r--r--lisp/auth-source.el77
-rw-r--r--lisp/bindings.el12
-rw-r--r--lisp/bookmark.el10
-rw-r--r--lisp/calc/calc-embed.el36
-rw-r--r--lisp/calc/calcalg2.el4
-rw-r--r--lisp/cedet/semantic/idle.el3
-rw-r--r--lisp/cedet/semantic/util-modes.el4
-rw-r--r--lisp/color.el5
-rw-r--r--lisp/comint.el32
-rw-r--r--lisp/completion.el3
-rw-r--r--lisp/cus-edit.el5
-rw-r--r--lisp/cus-start.el2
-rw-r--r--lisp/custom.el6
-rw-r--r--lisp/dframe.el66
-rw-r--r--lisp/dired-aux.el2
-rw-r--r--lisp/dired.el16
-rw-r--r--lisp/double.el3
-rw-r--r--lisp/ehelp.el3
-rw-r--r--lisp/emacs-lisp/byte-opt.el319
-rw-r--r--lisp/emacs-lisp/checkdoc.el7
-rw-r--r--lisp/emacs-lisp/easy-mmode.el4
-rw-r--r--lisp/emacs-lisp/edebug.el25
-rw-r--r--lisp/emacs-lisp/elp.el3
-rw-r--r--lisp/emacs-lisp/generator.el21
-rw-r--r--lisp/emacs-lisp/lisp-mode.el21
-rw-r--r--lisp/emacs-lisp/package-x.el3
-rw-r--r--lisp/emacs-lisp/pcase.el19
-rw-r--r--lisp/emacs-lisp/testcover.el52
-rw-r--r--lisp/epa.el6
-rw-r--r--lisp/epg.el46
-rw-r--r--lisp/erc/erc.el51
-rw-r--r--lisp/eshell/em-hist.el30
-rw-r--r--lisp/eshell/esh-cmd.el18
-rw-r--r--lisp/eshell/esh-util.el10
-rw-r--r--lisp/expand.el9
-rw-r--r--lisp/face-remap.el27
-rw-r--r--lisp/ffap.el3
-rw-r--r--lisp/files-x.el3
-rw-r--r--lisp/foldout.el6
-rw-r--r--lisp/follow.el3
-rw-r--r--lisp/forms.el3
-rw-r--r--lisp/frame.el1
-rw-r--r--lisp/gnus/gnus-art.el10
-rw-r--r--lisp/gnus/gnus-group.el31
-rw-r--r--lisp/gnus/gnus-search.el3
-rw-r--r--lisp/gnus/gnus.el7
-rw-r--r--lisp/gnus/message.el10
-rw-r--r--lisp/gnus/mml-sec.el15
-rw-r--r--lisp/help-fns.el4
-rw-r--r--lisp/help-mode.el12
-rw-r--r--lisp/hexl.el6
-rw-r--r--lisp/hi-lock.el8
-rw-r--r--lisp/hilit-chg.el4
-rw-r--r--lisp/ibuffer.el19
-rw-r--r--lisp/ido.el3
-rw-r--r--lisp/imenu.el35
-rw-r--r--lisp/indent.el14
-rw-r--r--lisp/info.el4
-rw-r--r--lisp/isearch.el3
-rw-r--r--lisp/jka-compr.el3
-rw-r--r--lisp/language/ethio-util.el3
-rw-r--r--lisp/ldefs-boot.el191
-rw-r--r--lisp/leim/quail/hangul.el3
-rw-r--r--lisp/leim/quail/japanese.el3
-rw-r--r--lisp/linum.el6
-rw-r--r--lisp/mail/rmailsum.el9
-rw-r--r--lisp/man.el26
-rw-r--r--lisp/mh-e/mh-e.el1
-rw-r--r--lisp/mouse-copy.el3
-rw-r--r--lisp/mouse-drag.el3
-rw-r--r--lisp/net/dbus.el17
-rw-r--r--lisp/net/dictionary-connection.el23
-rw-r--r--lisp/net/dictionary.el140
-rw-r--r--lisp/net/mailcap.el10
-rw-r--r--lisp/net/tramp-adb.el26
-rw-r--r--lisp/net/tramp-compat.el7
-rw-r--r--lisp/net/tramp-crypt.el12
-rw-r--r--lisp/net/tramp-gvfs.el179
-rw-r--r--lisp/net/tramp-rclone.el12
-rw-r--r--lisp/net/tramp-sh.el35
-rw-r--r--lisp/net/tramp-smb.el43
-rw-r--r--lisp/net/tramp-sudoedit.el8
-rw-r--r--lisp/net/tramp.el33
-rw-r--r--lisp/org/org-table.el2
-rw-r--r--lisp/org/org.el2
-rw-r--r--lisp/pcomplete.el19
-rw-r--r--lisp/play/bubbles.el11
-rw-r--r--lisp/play/cookie1.el1
-rw-r--r--lisp/play/decipher.el12
-rw-r--r--lisp/play/dunnet.el3
-rw-r--r--lisp/play/gametree.el30
-rw-r--r--lisp/play/gomoku.el9
-rw-r--r--lisp/play/hanoi.el14
-rw-r--r--lisp/progmodes/antlr-mode.el2
-rw-r--r--lisp/progmodes/cc-engine.el21
-rw-r--r--lisp/progmodes/cc-langs.el49
-rw-r--r--lisp/progmodes/cmacexp.el9
-rw-r--r--lisp/progmodes/compile.el4
-rw-r--r--lisp/progmodes/cperl-mode.el90
-rw-r--r--lisp/progmodes/dcl-mode.el32
-rw-r--r--lisp/progmodes/elisp-mode.el4
-rw-r--r--lisp/progmodes/f90.el16
-rw-r--r--lisp/progmodes/grep.el2
-rw-r--r--lisp/progmodes/idlwave.el1
-rw-r--r--lisp/progmodes/make-mode.el3
-rw-r--r--lisp/progmodes/octave.el5
-rw-r--r--lisp/progmodes/project.el2
-rw-r--r--lisp/progmodes/python.el3
-rw-r--r--lisp/progmodes/ruby-mode.el4
-rw-r--r--lisp/progmodes/simula.el2
-rw-r--r--lisp/progmodes/sql.el4
-rw-r--r--lisp/progmodes/tcl.el29
-rw-r--r--lisp/progmodes/verilog-mode.el616
-rw-r--r--lisp/repeat.el4
-rw-r--r--lisp/replace.el9
-rw-r--r--lisp/reveal.el6
-rw-r--r--lisp/ruler-mode.el3
-rw-r--r--lisp/scroll-lock.el3
-rw-r--r--lisp/server.el6
-rw-r--r--lisp/shell.el7
-rw-r--r--lisp/simple.el39
-rw-r--r--lisp/speedbar.el22
-rw-r--r--lisp/startup.el2
-rw-r--r--lisp/subr.el7
-rw-r--r--lisp/tab-line.el4
-rw-r--r--lisp/tar-mode.el7
-rw-r--r--lisp/term.el654
-rw-r--r--lisp/textmodes/enriched.el1
-rw-r--r--lisp/textmodes/nroff-mode.el2
-rw-r--r--lisp/textmodes/rst.el5
-rw-r--r--lisp/textmodes/sgml-mode.el10
-rw-r--r--lisp/thumbs.el18
-rw-r--r--lisp/tutorial.el9
-rw-r--r--lisp/url/url-http.el6
-rw-r--r--lisp/url/url-vars.el13
-rw-r--r--lisp/vc/cvs-status.el5
-rw-r--r--lisp/vc/ediff-init.el28
-rw-r--r--lisp/vc/ediff-util.el4
-rw-r--r--lisp/vc/smerge-mode.el2
-rw-r--r--lisp/vc/vc-dir.el58
-rw-r--r--lisp/vc/vc-git.el37
-rw-r--r--lisp/vcursor.el8
-rw-r--r--lisp/view.el30
-rw-r--r--lisp/wid-edit.el19
-rw-r--r--lisp/window.el30
-rw-r--r--lisp/woman.el5
-rw-r--r--src/data.c4
-rw-r--r--src/editfns.c10
-rw-r--r--src/eval.c2
-rw-r--r--src/fns.c33
-rw-r--r--src/frame.c16
-rw-r--r--src/frame.h10
-rw-r--r--src/keymap.c9
-rw-r--r--src/lisp.h1
-rw-r--r--src/lread.c114
-rw-r--r--src/nsfns.m27
-rw-r--r--src/w32fns.c30
-rw-r--r--src/xdisp.c43
-rw-r--r--src/xfns.c36
-rw-r--r--test/lisp/emacs-lisp/bytecomp-tests.el61
-rw-r--r--test/lisp/net/dbus-tests.el8
-rw-r--r--test/lisp/net/tramp-tests.el14
-rw-r--r--test/lisp/progmodes/ruby-mode-resources/ruby.rb2
-rw-r--r--test/lisp/progmodes/tcl-tests.el1
-rw-r--r--test/lisp/simple-tests.el20
-rw-r--r--test/src/editfns-tests.el22
-rw-r--r--test/src/fns-tests.el8
-rw-r--r--test/src/minibuf-tests.el8
-rw-r--r--test/src/process-tests.el28
191 files changed, 4699 insertions, 2118 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE
index cb09391c324..9b2af9ccf13 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -67,7 +67,7 @@ error-prone. It also allows sending patches whose author is someone
other than the email sender.
Once the cumulative amount of your submissions exceeds about 15 lines
-of non-trivial changes, we will need you to assign to the FSF the
+of non-trivial code, we will need you to assign to the FSF the
copyright for your contributions. Ask on emacs-devel@gnu.org, and we
will send you the necessary form together with the instructions to
fill and email it, in order to start this legal paperwork.
diff --git a/ChangeLog.3 b/ChangeLog.3
index 22b45cb5a30..460a1d2ffa6 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -1,3 +1,1971 @@
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Bump Emacs version to 27.1.91
+
+ * README:
+ * configure.ac:
+ * nt/README.W32:
+ * msdos/sed2v2.inp: Bump Emacs version to 27.1.91.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of 'read-regexp' and friends
+
+ * doc/emacs/glossary.texi (Glossary): Add "Tag" to the Glossary.
+ * doc/emacs/maintaining.texi (Xref): Mention that identifiers are
+ also known as "tags".
+
+ * lisp/replace.el (read-regexp, read-regexp-suggestions): Improve
+ wording of doc strings. (Bug#46088) (Bug#46089)
+
+ (cherry picked from commit 49eb03d6c8a181fd46adbbcf1f0a976d0a9efa87)
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ read-regexp-suggestions doc string improvement
+
+ * lisp/replace.el (read-regexp-suggestions): Add a link to the
+ manual to explain what a tag is (bug#46089).
+
+ (cherry picked from commit f9cc2d48246fe8370e9286866e6115ba8e2acf44)
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Try to improve the read-regexp doc string
+
+ * lisp/replace.el (read-regexp): Attempt to clarify the semantics
+ (bug#46088).
+
+ (cherry picked from commit eded2a7ad7d456a417354a2797c18e9a578414d7)
+
+2021-02-03 Dmitry Gutov <dgutov@yandex.ru>
+
+ Erase the buffer only after fetching the new contents
+
+ * lisp/progmodes/xref.el (xref-revert-buffer):
+ Erase the buffer only after fetching the new contents (bug#46042).
+
+ (cherry picked from commit 5821dee0949b2913c07970d6e4b8bb8e8a35f036)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix last change
+
+ * doc/lispref/text.texi (Undo): Add a cross-reference to the
+ description of 'undo-amalgamate-change-group'.
+ (Atomic Changes): Expand and improve the description of
+ 'undo-amalgamate-change-group'. (Bug#42303)
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Mention undo-amalgamate-change-group in the lispref manual
+
+ * doc/lispref/text.texi (Atomic Changes): Mention
+ undo-amalgamate-change-group (bug#42303).
+
+ (cherry picked from commit ba25a82855a2c03c25fec83f3056c166b692e94f)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Avoid sending systemd shutdown notifications if non-daemon
+
+ * src/emacs.c (Fkill_emacs): Send the shutdown notification only
+ in daemon mode. (Bug#46022)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ * src/cmds.c (Fforward_line): Doc fix. (Bug#46027)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of sendmail.el defcustom's
+
+ * lisp/mail/sendmail.el (mail-archive-file-name)
+ (mail-default-reply-to, mail-self-blind, mail-default-headers):
+ Say in the doc string that 'message-default-mail-headers' shall be
+ customized when using 'message-mode' for email composition.
+ (Bug#46029)
+
+2021-02-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Don't let `maybe_quit` prevent resetting `consing_until_gc` (bug#43389)
+
+ * src/alloc.c (garbage_collect): Postpone `unblock_input` a bit.
+ * src/window.c (window_parameter): Avoid `maybe_quit`.
+
+ cherry picked from commit 420661af07448857f0a17e15dc27bceeb6aff541
+
+2021-02-03 Juri Linkov <juri@linkov.net>
+
+ Remove one of recently added warnings abound binding keys in Isearch maps
+
+ * lisp/isearch.el (minibuffer-local-isearch-map): Remove comments
+ which warn against wantonly rebinding unbound keys from
+ irrelevant keymap.
+ https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00259.html
+
+2021-02-03 Martin Rudalics <rudalics@gmx.at>
+
+ Fix assertion failure in window_box_height (Bug#45737)
+
+ * lisp/window.el (window-sizable): Don't try to grow a mini window
+ when the root window's minimum height is already larger than its
+ actual height (Bug#45737).
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix cl-concatenate inlining
+
+ * lisp/emacs-lisp/seq.el (seq-concatenate): Auto-load it. Do not
+ merge to master. (Bug#45610)
+
+2021-02-03 Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
+
+ Fix infloop in 'pixel-scroll-mode'
+
+ * lisp/pixel-scroll.el (pixel-scroll-up, pixel-scroll-down): Avoid
+ inflooping when 'vertical-motion' doesn't move. (Bug#45628)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix inhibiting the default.el loading in user init file
+
+ * lisp/startup.el (startup--load-user-init-file): Test the value
+ of 'inhibit-default-init', not just the LOAD-DEFAULTS argument,
+ because loading the user's init file could have set the value of
+ the former.
+ (command-line): Call 'startup--load-user-init-file' with last arg
+ t: there's no longer any need to test the value of
+ 'inhibit-default-init' here, as it will be tested by the called
+ function. (Bug#45708)
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Fix problem with 8bit content-transfer-encoding in nndoc mbox files
+
+ * lisp/gnus/nndoc.el (nndoc-possibly-change-buffer): If we're
+ reading an mbox file, it may contain messages that use
+ content-transfer-encoding 8bit, which means that we have to treat
+ the file as a sequence of byte (bug#42951). This avoids
+ double-decoding -- once by Emacs when inserting the mbox into the
+ buffer, and once by Gnus when displaying the articles.
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ * doc/misc/tramp.texi (Quick Start Guide): Fix thinko.
+
+2021-02-03 Robert Pluim <rpluim@gmail.com>
+
+ Tell people how to remove fontconfig customizations
+
+2021-02-03 Simen Heggestøyl <simenheg@gmail.com>
+
+ Remove extraneous closing paren
+
+ * doc/lispref/modes.texi (SMIE Indentation Example): Remove extraneous
+ closing paren.
+
+2021-02-03 Mauro Aranda <maurooaranda@gmail.com>
+
+ Update two user option names in the Widget manual
+
+ * doc/misc/widget.texi (Basic Types): The user options
+ widget-glyph-directory and widget-glyph-enable were renamed long ago
+ to widget-image-directory and widget-image-enable, but the manual
+ kept calling them by their old names. Update the names.
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Mention -lcurses problem on AIX
+
+ * etc/PROBLEMS: Describe problem with Emacs 27 and -lcurses.
+ Do not merge to master.
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Revert previous patch which was installed into wrong branch.
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix broken build on AIX 7.2
+
+ Without this fix, the build on AIX 7.2 with xlc fails in the ‘CCLD
+ temacs’ step with the diagnostic ‘ld: 0711-317 ERROR: Undefined
+ symbol: BC’. This is because -lcurses does not define BC etc.
+ * configure.ac: When building terminfo.o, define
+ TERMINFO_DEFINES_BC if the library defines BC etc.
+ * src/terminfo.c (UP, BC, PC): Define depending on
+ TERMINFO_DEFINES_BC, not on TERMINFO.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix last change
+
+ * doc/lispref/strings.texi (Creating Strings): Improve wording of
+ last change. (Bug#45516)
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Add a reference between the Strings node and Search/Replace
+
+ * doc/lispref/strings.texi (Creating Strings): Mention
+ string-replace/replace-regexp-in-string (bug#45516).
+
+ (cherry picked from commit b9359d4183a1a6923122d3aa12b922ab89693354)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Add warning comments abound binding keys in Isearch maps
+
+ * lisp/isearch.el (isearch-mode-map)
+ (minibuffer-local-isearch-map): Add comments which warn against
+ wantonly rebinding unbound keys.
+
+2021-02-03 Alan Third <alan@idiocy.org>
+
+ Fix crash in ns_mouse_position (bug#45541)
+
+ * src/nsterm.m (ns_mouse_position): Explicitly initialize f to NULL.
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix copyright years by hand
+
+ These are dates that admin/update-copyright did not update.
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Update copyright year to 2021
+
+ Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of 'network-lookup-address-info'
+
+ * src/process.c (Fnetwork_lookup_address_info):
+ * doc/lispref/processes.texi (Misc Network): Document the error
+ message emitted by 'network-lookup-address-info' when it fails.
+
+2021-02-03 Amin Bandali <bandali@gnu.org>
+
+ Display messages sent using ERC's /say
+
+ * lisp/erc/erc.el (erc-cmd-SAY): Call `erc-display-msg' to display the
+ user's message in the buffer, just like other [non-command] messages.
+
+ https://lists.gnu.org/r/help-gnu-emacs/2020-12/msg00066.html
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix Rmail summary display when From: header is malformed
+
+ * lisp/mail/rmailsum.el (rmail-header-summary): Remove newlines
+ from the "From:" value, to avoid producing corrupted summary
+ display.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Add more details to the "word processor" section
+
+ * etc/TODO (Emacs as word processor): Add more details based on
+ recent discussions.
+
+2021-02-03 Philipp Stephani <phst@google.com>
+
+ * src/Makefile.in (DO_CODESIGN): Fix expected architecture name.
+
+2021-02-03 Itai Seggev <is+apple@cs.hmc.edu> (tiny change)
+
+ Codesign the executable on recene MacOS systems
+
+ * src/Makefile.in (temacs$(EXEEXT)): Codesign the executable on
+ recent (ARM) MacOS systems (bug#43878). Without this, building
+ Emacs fails.
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Support build of Emacs on ARM Macos machines
+
+ * configure.ac: Add support for aarch64-* on Macos (i.e., 64-bit
+ ARM) (bug#43369).
+
+2021-02-03 Bastien Guerry <bzg@gnu.org>
+
+ Update to Org 9.4.4
+
+2021-02-03 Stefan Kangas <stefan@marxist.se>
+
+ * lisp/so-long.el: Decrease use of passive voice.
+
+ Suggested by Richard Stallman <rms@gnu.org>.
+
+2021-02-03 Stefan Kangas <stefan@marxist.se>
+
+ * doc/misc/efaq.texi (New in Emacs 27): Add section.
+
+ * doc/misc/efaq.texi (Latest version of Emacs): Bump version.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ * lisp/face-remap.el (face-remap-set-base): Doc fix. (Bug#45264)
+
+2021-02-03 Vasilij Schneidermann <mail@vasilij.de>
+
+ Correct argument order in comment
+
+ * etc/ETAGS.EBNF (position): Correct comment.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Update files for the 27.1.90 pretest
+
+ * README:
+ * configure.ac:
+ * nt/README.W32:
+ * msdos/sed2v2.inp: Bump Emacs version to 27.1.90.
+ * lisp/ldefs-boot.el: Update from loaddefs.el
+
+2021-02-03 Eli Zaretskii <eliz@fencepost.gnu.org>
+
+ * README:
+ * configure.ac:
+ * nt/README.W32:
+ * msdos/sed2v2.inp: Bump Emacs version to 27.1.90.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Minor fixes in authors.el and in tarball-making instructions
+
+ * admin/authors.el (authors): Make the error message more helpful.
+ (authors-ignored-files, authors-renamed-files-alist): Update.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of 'query-replace'
+
+ * doc/emacs/search.texi (Query Replace): Add 'E' to the list of
+ characters one can type at 'query-replace' prompt. (Bug#45273)
+
+2021-02-03 Bastien Guerry <bzg@gnu.org>
+
+ Update to Org 9.4.3
+
+ Fix #45259
+
+2021-02-03 Alan Third <alan@idiocy.org>
+
+ Fix error with fn key in NS port (bug#44533)
+
+ * src/nsterm.m ([EmacsView keyDown:]): Move the correction for fn key
+ handling to before the modifiers are calculated.
+
+ (cherry picked from commit 7970610d48701a949ce443c94c71eac47d044197)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix point location when completing in gdb-mi.el
+
+ * lisp/progmodes/gdb-mi.el (def-gdb-auto-update-handler): Don't
+ force window-start position, so that redisplay doesn't move point
+ when popping completion window below the GUD one. (Bug#45052)
+
+2021-02-03 Bastien Guerry <bzg@gnu.org>
+
+ Update to Org 9.4.2
+
+ Mostly fixing compiler warnings.
+
+2021-02-03 Bastien Guerry <bzg@gnu.org>
+
+ Update to Org 9.4.1
+
+2021-02-03 Alan Third <alan@idiocy.org>
+
+ Fix crash in ns_mouse_position (bug#44313)
+
+ * src/nsterm.m (ns_destroy_window): Close the window before freeing
+ the frame resources so we don't end up accessing the frame struct
+ after it's been freed.
+
+ (cherry picked from commit 18a7267c32a909bb26bd93d24543155aeb10e042)
+
+2021-02-03 Alan Third <alan@idiocy.org>
+
+ Fix crash when using XRender and restoring image from X (bug#44930)
+
+ * src/dispextern.h (struct image): Add original dimension elements.
+ * src/image.c (image_set_transform): Store the original dimensions.
+ (image_get_x_image): If we're using transforms use the original
+ dimensions with XGetImage.
+
+2021-02-03 Tassilo Horn <tsdh@gnu.org>
+
+ Bind k to image-kill-buffer in doc-view-mode-map.
+
+ * lisp/doc-view.el (doc-view-mode-map): Bind k to image-kill-buffer.
+ The binding k -> doc-view-kill-proc-and-buffer has been removed in
+ 2015 and the function been made an obsolete function alias to
+ image-kill-buffer (bug#45157).
+
+2021-02-03 Serge Tupchii <serge.tupchii@protonmail.com> (tiny change)
+
+ Fix crash (segfault) in etags on generating tags for Erlang files
+
+ * lib-src/etags.c: Set allocated and lastlen to zero, after
+ freeing last ptr in Erlang_functions to prevent dereferencing NULL
+ pointer (bug#45122).
+
+
+ (cherry picked from commit 2d8f0364fcd1d5dad2b82dd3a9af870b03854547)
+
+2021-02-03 Stefan Kangas <stefan@marxist.se>
+
+ Update publicsuffix.txt from upstream
+
+ * etc/publicsuffix.txt: Update from
+ https://publicsuffix.org/list/public_suffix_list.dat
+ dated 2020-11-30 21:57:25 UTC.
+
+2021-02-03 Juri Linkov <juri@linkov.net>
+
+ * lisp/vc/vc.el: Update args of backend API calls in the header comments
+
+ https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg00283.html
+
+2021-02-03 Juri Linkov <juri@linkov.net>
+
+ Backport Handle read-char-from-minibuffer and y-or-n-p from pre-command-hook
+
+ * lisp/subr.el (read-char-from-minibuffer-insert-char)
+ (read-char-from-minibuffer-insert-other, y-or-n-p-insert-y)
+ (y-or-n-p-insert-n, y-or-n-p-insert-other):
+ Check for 'minibufferp' before executing the body.
+ (read-char-from-minibuffer, y-or-n-p): Let-bind this-command
+ before calling read-from-minibuffer. (Bug#45029)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of streams in batch mode
+
+ * doc/lispref/os.texi (Batch Mode):
+ * doc/lispref/streams.texi (Input Streams, Output Streams): Better
+ documentation of I/O streams in batch mode, with more
+ cross-references.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Support ks_c_5601-1987 encoding
+
+ * lisp/language/korean.el (ks_c_5601-1987): Define as an alias for
+ 'korean-iso-8bit. (It is sometimes used in email messages.)
+
+2021-02-03 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ Fix Xaw widget text disappearing when built with cairo (bug#43418)
+
+ * lwlib/lwlib-utils.c (crxft_font_open_name): Use FcFontMatch to
+ get a pattern to pass to cairo_ft_font_face_create_for_pattern.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of 'ps-print-color-p'
+
+ * doc/emacs/misc.texi (PostScript Variables): Improve and clarify
+ the description of 'ps-print-color-p'. (Bug#44962)
+
+2021-02-03 Dmitry Gutov <dgutov@yandex.ru>
+
+ Reset xref-show-xrefs-function temporarily
+
+ * lisp/dired-aux.el (dired-do-find-regexp-and-replace):
+ Make sure xref-show-xrefs-function has the necessary value (bug#44905).
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Don't show in 'view-lossage' responses to xterm feature queries
+
+ * lisp/term/xterm.el (xterm--read-event-for-query): Prevent
+ recording the characters read as the xterm response to a query,
+ so as not to show them in 'view-lossage'. (Bug#44908)
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Adapt Tramp versions. Do not merge
+
+ * doc/misc/tramp.texi (Obtaining @value{tramp})
+ (Remote shell setup, Remote processes, Archive file names):
+ * doc/misc/trampver.texi:
+ * lisp/net/tramp.el:
+ * lisp/net/trampver.el (tramp-version)
+ (customize-package-emacs-version-alist): Adapt Tramp versions.
+
+2021-02-03 Akira Kyle <akira@akirakyle.com>
+
+ Return the correct suffix in eww-make-unique-file-name
+
+ * lisp/net/eww.el (eww-make-unique-file-name): Return the correct
+ suffix (bug#44936).
+
+2021-02-03 Karl Fogel <kfogel@red-bean.com>
+
+ Save bookmarks by using `write-file' (bug#12507)
+
+ Go back to using `write-file' to save bookmarks, instead of using
+ `write-region'. This means numbered backups of the bookmark file may
+ get made again, depending on the value of `bookmark-version-control'.
+
+ Thanks especially to Drew Adams and Eli Zaretskii for their
+ persistence in tracking down information relevant to this change.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix filing messages when 'rmail-output-reset-deleted-flag' is non-nil
+
+ * lisp/mail/rmailout.el (rmail-output): Fix off-by-one error in
+ deciding when to advance to the next message under non-nil
+ 'rmail-output-reset-deleted-flag'. (Bug#44839)
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Make file copying in tramp-gvfs more robust
+
+ * test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
+ (tramp-test12-rename-file): Do not skip for tramp-gvfs.el.
+
+ * lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
+ Add sanity checks.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Revert "Fix incorrect handling of module runtime and environment pointers."
+
+ This reverts commit cdc632fbe6e149318147a98cccf1b7af191f2ce8.
+ Those changes are too significant and non-trivial to be
+ suitable for a release branch at this time.
+
+2021-02-03 Philipp Stephani <phst@google.com>
+
+ Fix incorrect handling of module runtime and environment pointers.
+
+ We used to store module runtime and environment pointers in the static
+ lists Vmodule_runtimes and Vmodule_environments. However, this is
+ incorrect because these objects have to be kept per-thread. With this
+ naive approach, interleaving module function calls in separate threads
+ leads to environments being removed in the wrong order, which in turn
+ can cause local module values to be incorrectly garbage-collected.
+
+ Instead, turn Vmodule_runtimes and Vmodule_environments into
+ hashtables keyed by the thread objects. The fix is relatively
+ localized and should therefore be safe enough for the release branch.
+
+ Module assertions now have to walk the pointer list for the current
+ thread, which is more correct since they now only find environments
+ for the current thread.
+
+ Also add a unit test that exemplifies the problem. It interleaves two
+ module calls in two threads so that the first call ends while the
+ second one is still active. Without this change, this test triggers
+ an assertion failure.
+
+ * src/emacs-module.c (Fmodule_load, initialize_environment)
+ (finalize_environment, finalize_runtime_unwind): Store runtime and
+ environment pointers in per-thread lists.
+ (syms_of_module): Initialize runtimes and environments hashtables.
+ (module_assert_runtime, module_assert_env, value_to_lisp): Consider
+ only objects for the current thread.
+ (module_gc_hash_table_size, module_hash_push, module_hash_pop): New
+ generic hashtable helper functions.
+ (module_objects, module_push_pointer, module_pop_pointer): New helper
+ functions to main thread-specific lists of runtime and environment
+ pointers.
+ (mark_modules): Mark all environments in all threads.
+
+ * test/data/emacs-module/mod-test.c (Fmod_test_funcall): New test
+ function.
+ (emacs_module_init): Bind it.
+
+ * test/src/emacs-module-tests.el (emacs-module-tests--variable): New
+ helper type to guard access to state in a thread-safe way.
+ (emacs-module-tests--wait-for-variable)
+ (emacs-module-tests--change-variable): New helper functions.
+ (emacs-module-tests/interleaved-threads): New unit test.
+
+2021-02-03 Alan Mackenzie <acm@muc.de>
+
+ CC Mode: Fix error in cache handling. This fixes bug #43481
+
+ * lisp/progmodes/cc-engine.el (c-full-pp-to-literal): Handle correctly END
+ being before HERE by using parse-partial-sexp to get the end of the literal
+ containing HERE.
+
+2021-02-03 Martin Rudalics <rudalics@gmx.at>
+
+ Revert extra focus redirection in do_switch_frame (Bug#24803)
+
+ * src/frame.c (do_switch_frame): Do not also redirect frame
+ focus when FRAME has its minibuffer window on the selected
+ frame which was intended to fix Bug#24500. It may cause
+ Bug#24803 and lead to a nasty state where no active cursor is
+ shown on any frame, see
+ https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg01137.html.
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Minor cleanup of tramp-tests.el on MS Windows
+
+ * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process):
+ Do not test remote pty on MS Windows.
+
+2021-02-03 Basil L. Contovounesios <contovob@tcd.ie>
+
+ Fix handling of defcustom :local tag
+
+ For discussion, see the following emacs-devel thread:
+ https://lists.gnu.org/r/emacs-devel/2020-11/msg00734.html
+
+ * lisp/custom.el (custom-declare-variable): Delay call to
+ make-variable-buffer-local until after user option has been
+ initialized with a value. Otherwise the user option may be
+ initialized to nil.
+ * test/lisp/custom-tests.el (custom--test-local-option)
+ (custom--test-permanent-option): New :local user options.
+ (custom-test-local-option): New test for defcustom :local keyword.
+
+2021-02-03 Alan Mackenzie <acm@muc.de>
+
+ CC Mode. Fix an off by one error. Fixes bug #41809
+
+ * lisp/progmodes/cc-engine.el (c-full-pp-to-literal): Change > to >= (twice).
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix display artifacts when 'display' properties cover newlines
+
+ * src/xdisp.c (pos_visible_p): Set glyph_row of scratch iterators
+ to NULL, to avoid producing glyphs while we figure out the layout.
+ (Bug#44826)
+
+2021-02-03 Stefan Kangas <stefankangas@gmail.com>
+
+ Sync latest SKK-JISYO.L
+
+ * leim/SKK-DIC/SKK-JISYO.L: Sync to current upstream version.
+
+ (cherry picked from commit 6a5f9700846551a7f3795e257356dbab865116f4)
+
+2021-02-03 Stefan Kangas <stefan@marxist.se>
+
+ Update publicsuffix.txt from upstream
+
+ * etc/publicsuffix.txt: Update from
+ https://publicsuffix.org/list/public_suffix_list.dat
+ dated 2020-10-09 08:23:34 UTC.
+
+ (cherry picked from commit 5b13afab0a903ead8363482529019d4fb80ec4b4)
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Fix Bug#44481
+
+ * lisp/net/tramp.el (tramp-system-name): New defconst.
+ (tramp-default-host, tramp-restricted-shell-hosts-alist)
+ (tramp-local-host-regexp):
+ * lisp/net/tramp-sh.el (tramp-maybe-open-connection): Use it. (Bug#44481)
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Minor Edebug manual keystroke clarifications
+
+ * doc/lispref/edebug.texi (Edebug Misc): Also mention the `a'
+ binding to abort (bug#44697). Also fix `d' function reference, and
+ add `P' reference.
+
+ (cherry picked from commit b613f25f97abf756101eaa2af90689a19c0b3350)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Make ignoring modifiers on IME input optional
+
+ By default, ignore modifier keys on IME input, but add
+ a variable to get back old behavior.
+ * src/w32fns.c (syms_of_w32fns): New variable
+ w32-ignore-modifiers-on-IME-input.
+ (w32_wnd_proc): Use it to ignore modifier keys when IME input is
+ used. (Bug#44641)
+
+ * etc/NEWS: Announce the change and the new variable.
+
+2021-02-03 Masahiro Nakamura <tsuucat@icloud.com>
+
+ Ignore modifiers when processing WM_IME_CHAR messages
+
+ * src/w32fns.c (w32_wnd_proc): Ignore modifiers when processing
+ WM_IME_CHAR messages.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of 'font-spec'
+
+ * doc/lispref/display.texi (Low-Level Font):
+ * src/font.c (Ffont_spec): Document 'font-spec' keys that are
+ supported, but were undocumented.
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Further doc fixes for dotimes about RESULT
+
+ * lisp/subr.el (dotimes): Be even more explicit about RESULT
+ (bug#16206).
+
+ (cherry picked from commit 5b0d8d0f288fd505ca90bd30df709a5e7ab540d6)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Reformat argument commentary in etags.c
+
+ * lib-src/etags.c (pfnote, consider_token, C_entries): Resurrect
+ original format of comments to function arguments.
+
+2021-02-03 Alan Mackenzie <acm@muc.de>
+
+ Make the invocation of combine-change-calls in comment-region valid
+
+ This fixes bug #44581. The problem was that whitespace outside of the (BEG
+ END) region was being deleted, and this made the invocation of
+ combine-change-calls with (BEG END) invalid.
+
+ * lisp/newcomment.el (comment-region-default): Amend the second argument to
+ combine-change-calls.
+
+2021-02-03 Alan Mackenzie <acm@muc.de>
+
+ * lisp/progmodes/cc-langs.el (c-<>-notable-chars-re): Fix wrong '-' in regexp
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Update the various INSTALL files
+
+ * nt/INSTALL.W64:
+ * nt/INSTALL:
+ * INSTALL: Update the installation information, in particular the
+ fact that HarfBuzz is now preferred as the shaping library.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Don't leave lock files after 'replace-buffer-contents'
+
+ * src/editfns.c (Freplace_buffer_contents): Unlock the buffer's
+ file if no changes have been made. (Bug#44303)
+
+ (cherry picked from commit a5867ddfbd721568005175bf6c725f7834b21ea4)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix input method translation near read-only text
+
+ * lisp/international/quail.el (quail-input-method): Don't disable
+ input method when the character after point has the read-only
+ property. Suggested by Evgeny Zajcev <lg.zevlg@gmail.com>
+ (Bug#44466)
+
+ * doc/emacs/mule.texi (Input Methods): Document that input methods
+ are inhibited in read-only text.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix display of truncated R2L lines on TTY frames
+
+ * src/xdisp.c (extend_face_to_end_of_line): Use a while-loop, not
+ a do-while loop, to avoid appending an extra glyph at the end of a
+ line that is one character shorter than the window-width. This is
+ needed to fix display of reversed glyph rows that are almost as
+ wide as the window, because append_space_for_newline already added
+ one space glyph.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Avoid crashes when a reversed glyph row starts with a composition
+
+ * src/dispnew.c (build_frame_matrix_from_leaf_window): Add an
+ assertion to prevent us from overwriting non-char glyphs with the
+ vertical border glyph.
+ * src/xdisp.c (extend_face_to_end_of_line): Account for one glyph
+ possibly inserted by append_space_for_newline. (Bug#44506)
+ Remove a kludgey correction for an off-by-one error in column
+ counting, which is no longer needed.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Update information about refcards
+
+ * admin/release-process (refcards):
+ * admin/make-tarball.txt (refcards): Update information about
+ generating refcards and required TeX/LaTeX packages.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Avoid crashes in the daemon due to user interaction
+
+ * src/minibuf.c (read_minibuf): Avoid crashes in the daemon if the
+ init file invokes some kind of minibuffer interaction, by not
+ updating the selected frame if it's the initial frame.
+ (Bug#44583)
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Some minor changes to Tramp, do not merge with master
+
+ * lisp/net/tramp.el (tramp-handle-directory-files)
+ (tramp-handle-directory-files-and-attributes):
+ * lisp/net/tramp-adb.el
+ (tramp-adb-handle-directory-files-and-attributes):
+ * lisp/net/tramp-rclone.el (tramp-rclone-handle-directory-files):
+ * lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes):
+ * lisp/net/tramp-smb.el (tramp-smb-handle-directory-files): Add _COUNT.
+ Make the functions forward compatible.
+
+ * lisp/net/tramp-gvfs.el (tramp-gvfs-enabled):
+ Increase `max-specpdl-size' temporarily.
+
+ * test/lisp/net/tramp-tests.el (tramp--test-share-p): New defun.
+ (tramp-test05-expand-file-name-relative): Use it.
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Add more doc-view requirements
+
+ * lisp/doc-view.el: Add more requirements.
+
+2021-02-03 Philipp Stephani <phst@google.com>
+
+ Fix undefined behavior when fetching glyphs from the display vector.
+
+ You can trigger this rather obscure bug by enabling selective display
+ if the second glyph in its display vector has an invalid face. For
+ example, evaluate
+
+ (set-display-table-slot standard-display-table
+ 'selective-display [?A (?B . invalid)])
+
+ and then enable selective display.
+
+ * src/xdisp.c (next_element_from_display_vector): Check whether next
+ glyph code is valid before accessing it.
+
+2021-02-03 Mattias Engdegård <mattiase@acm.org>
+
+ Fix pcase rx form snag with '?' and '??' (bug#44532)
+
+ This is a regression from Emacs 26.
+ Reported by Phillip Stephani.
+
+ * lisp/emacs-lisp/rx.el (rx--pcase-transform): Process ? and ?? correctly.
+ * test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add test case.
+
+ (cherry picked from commit 575b0681d926463960fc00d1e33decaa71d5c956)
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Update the doc-view header line
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Avoid breaking Arabic shaping in 'window-text-pixel-size'
+
+ * src/xdisp.c (CHAR_COMPOSED_P): If the bidi_p flag is not set,
+ pass -1 to composition_reseat_it, so that the shaping engine will
+ figure out the directionality of the text. This is important,
+ e.g., when using move_it_* functions in some context that is not
+ redisplay, such as 'window-text-pixel-size'. (Bug#44521)
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ doc-view.el comment clarification
+
+ * lisp/doc-view.el: Make the commentary mention that it's not
+ limited to a narrow range of file formats (bug#44504).
+
+2021-02-03 Daniel Martín <mardani29@yahoo.es>
+
+ Update erc documentation about C-c C-b
+
+ * doc/misc/erc.texi (Keystroke Summary): C-c C-b runs
+ erc-switch-to-buffer, which is implemented in terms of
+ read-buffer (bug#44498).
+
+2021-02-03 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
+
+ Fix 'uudecode-decode-region-internal' in multibyte buffers
+
+ * lisp/mail/uudecode.el (uudecode-decode-region-internal): Fix
+ inserting the decoded string into a multibyte buffer. Optimize by
+ working with characters, not strings. (Bug#44411)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix 'send-string-to-terminal' writing very long strings
+
+ * src/dispnew.c (Fsend_string_to_terminal): Prevent partial writes
+ by blocking SIGIO while 'fwrite' runs. (Bug#44320)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ * lisp/subr.el (read-char-from-minibuffer): Doc fix. (Bug#44451)
+
+2021-02-03 Earl Hyatt <ej32u@protonmail.com>
+
+ Fix documentation of 'windmove-swap-states-default-keybindings'
+
+ * doc/emacs/windows.texi (Window Convenience): Fix description of
+ 'windmove-swap-states-default-keybindings' and related index
+ entry. (Bug#44441)
+
+2021-02-03 Martin Rudalics <rudalics@gmx.at>
+
+ Split windows evenly when 'min-margins' parameter was set (Bug#44483)
+
+ * lisp/window.el (split-window): Make new window inherit any
+ 'min-margins' parameter from WINDOW so that horizontal splits
+ reliably produce windows of same width (Bug#44483).
+
+2021-02-03 Pip Cet <pipcet@gmail.com>
+
+ Handle Cairo errors in ftcrfont_open
+
+ * src/ftcrfont.c (ftcrfont_open): Handle Cairo errors (bug#41627).
+
+ (cherry picked from commit 954a4decfcc8e41084789516773b22d0adc11d91)
+
+2021-02-03 Stefan Kangas <stefan@marxist.se>
+
+ Backport: Fix exiting the finder-commentary buffer
+
+ Do not merge to master.
+
+ * lisp/finder.el (finder-exit): Fix exiting the finder-commentary
+ buffer. (Bug#44384)
+ (finder-buffer): New defconst.
+ (finder-list-keywords): Use above new defconst.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ * src/w32fns.c (Fw32_register_hot_key): Doc fix. (Bug#44456)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Prevent redisplay from moving point behind user's back
+
+ * src/bidi.c (bidi_at_paragraph_end, bidi_find_paragraph_start):
+ Bind inhibit-quit to a non-nil value around calls to
+ fast_looking_at, to prevent breaking out of redisplay_window,
+ which temporarily moves point in buffers shown in non-selected
+ windows. (Bug#44448)
+
+2021-02-03 Mauro Aranda <maurooaranda@gmail.com>
+
+ Document that the :match function for a widget takes an external value
+
+ * doc/misc/widget.texi (Basic Types): Document what an external value
+ is. Document that a :match function expects the value to be in the
+ external format. (Bug#8717)
+
+2021-02-03 Stephen Berman <Stephen.Berman@gmx.net>
+
+ Don't render XML declaration of an HTML document (bug#44348)
+
+ * lisp/net/eww.el (eww--preprocess-html): Prevent converting the
+ left angle bracket in the sequence "<?" to an HTML entity.
+
+2021-02-03 Yasuhiro KIMURA <yasu@utahime.org> (tiny change)
+
+ Recover the contents of the schemas.xml file
+
+ * etc/schema/schemas.xml: Recover the file, which was apparently
+ (mostly) removed by mistake by commit 165f738382 (bug#42851).
+
+2021-02-03 Stefan Kangas <stefan@marxist.se>
+
+ Improve indexing of check-declare
+
+ * doc/lispref/functions.texi (Declaring Functions): Improve indexing.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ * doc/lispref/commands.texi (Key Sequence Input): Fix indexing.
+
+ (cherry picked from commit 41c4f337c8f798d4700dcd13b73ad4ccdb3257eb)
+
+2021-02-03 Jared Finder <jared@finder.org>
+
+ Updating docs with all special window prefix keys.
+
+ * doc/lispref/commands.texi (Key Sequence Input): Add documentation for
+ missing special window areas. Explicitly call out window or frame.
+
+ (cherry picked from commit a105db13e11fd15cc72804bf33672122d1c3f2e1)
+
+2021-02-03 Glenn Morris <rgm@gnu.org>
+
+ Improve reproducibility of generated -pkg.el files
+
+ * lisp/emacs-lisp/package.el (package-generate-description-file):
+ Don't include the full name of the source file in the header,
+ since that varies non-reproducibly according to the build directory.
+ https://bugs.debian.org/972861
+ Note that elpa.gnu.org's admin/archive-contents.el does this by hand
+ and already only includes the nondirectory part.
+
+2021-02-03 Noah Friedman <friedman@splode.com>
+
+ Make sure pixel sizes are zero when setting window size for ptys.
+
+ * sysdep.c (set_window_size): Initialize data to zero to avoid
+ passing any garbage from the stack to ioctl.
+
+2021-02-03 Ken Brown <kbrown@cornell.edu>
+
+ Fix failure of 'emacs --daemon' on Cygwin
+
+ * src/emacs.c (DAEMON_MUST_EXEC): Define unconditionally on
+ Cygwin, not just if HAVE_NTGUI is defined. This fixes the failure
+ of 'emacs --daemon' to start on the non-w32 Cygwin builds.
+ (Bug#44285)
+
+2021-02-03 Alan Mackenzie <acm@muc.de>
+
+ CC Mode: Only recognize foo (*bar) as a function pointer when followed by (
+
+ * lisp/progmodes/cc-engine.el (c-forward-over-decl-or-cast-1): (after CASE 2)
+ test variables got-suffix-after-parens and at-decl-end before invoking
+ c-fdoc-shift-type-backward.
+
+2021-02-03 Clemens Radermacher <clemens.radermacher@posteo.de>
+
+ Fix NEWS entry for fix of Bug#44080
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ * src/buffer.c (syms_of_buffer) <fill-column>: Improve doc string.
+
+2021-02-03 Clemens Radermacher <clemens.radermacher@posteo.de>
+
+ Don't skip empty lines when fitting mini frame to buffer (Bug#44080)
+
+ * lisp/window.el (fit-mini-frame-to-buffer,
+ window--resize-mini-frame, fit-frame-to-buffer,
+ fit-frame-to-buffer-1): By default, fit a mini frame without skipping its
+ buffer's leading or trailing empty lines.
+ * src/frame.c (resize-mini-frames): Update doc-string.
+ * lisp/cus-start.el (resize-mini-frames): Update for customize.
+ * doc/lispref/minibuf.texi (resize-mini-frames): Update description.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of display-fill-column-indicator
+
+ * lisp/display-fill-column-indicator.el
+ (display-fill-column-indicator-mode): Mention the globalized
+ version in the doc string.
+
+ * doc/emacs/display.texi (Displaying Boundaries): Improve and
+ clarify the documentation of display-fill-column-indicator.
+ Suggest using the minor mode as the primary means for turning the
+ feature on.
+
+ * src/xdisp.c (syms_of_xdisp) <display-fill-column-indicator>
+ <display-fill-column-indicator-character>: Doc fix. (Bug#44226)
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ * INSTALL: Mention efaq.texi for installation of intlfonts.
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
+ Qiantan Hong <qhong@mit.edu>
+
+ Use WebKit sandboxing
+
+ * src/xwidget.c (Fmake_xwidget): Enable sandboxing if WebKit 2.26
+ or later. Do this early, as required for sandboxing (Bug#43071).
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Fix tramp-sh-handle-make-process; don't merge with master
+
+ * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Accept nil
+ COMMAND. (Bug#44151)
+
+ * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process):
+ Extend test.
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Fix an error in tramp-sh-handle-make-process. Dont' merge with master
+
+ * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't use heredoc
+ script whent the argument contains a string.
+
+2021-02-03 Stefan Kangas <stefan@marxist.se>
+
+ Recommend lexical-binding in Coding Conventions
+
+ * doc/lispref/tips.texi (Coding Conventions, Library Headers):
+ Recommend using lexical-binding.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Avoid rare crashes while producing line numbers
+
+ * src/xdisp.c (maybe_produce_line_number): Prevent freeing of
+ realized faces for as long as we are using lnum_face_id and
+ current_lnum_face_id for producing glyphs. (Bug#44111)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of 'Info-hide-note-references' in info.texi
+
+ * doc/misc/info.texi (Help-Xref): Improve the wording.
+ (Emacs Info Variables): Update the documentation of
+ 'Info-hide-note-references'. (Bug#44043)
+
+2021-02-03 Stefan Kangas <stefan@marxist.se>
+
+ * admin/release-process: Add note to update files from upstream.
+
+ (cherry picked from commit 86dd9d12aa5a273da2efd4ce8c6e35ae343f1494)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ * lisp/info.el (Info-hide-note-references): Doc fix. (Bug#44043)
+
+2021-02-03 Alan Mackenzie <acm@muc.de>
+
+ Make lisp/progmodes/js.el dependent on CC Mode in the Makefile.
+
+ This will prevent version mismatches between compile time and runtime
+ versions. This fixes bug #43037.
+
+ * lisp/Makefile.in: Make js.el dependent on cc-{defs,engine,mode}.elc.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Yet another fix for 'set-minibuffer-message'
+
+ * lisp/minibuffer.el (set-minibuffer-message): Handle the case of
+ separate minibuffer-only frame. Suggested by Gregory Heytings
+ <ghe@sdf.org>.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix posn-at-x-y in builds --without-x
+
+ * src/keyboard.c (make_lispy_position): Don't exclude the
+ window_or_frame = frame case from TTY-only builds. Reported by
+ Jared Finder <jared@finder.org>.
+
+ * doc/lispref/commands.texi (Click Events): Document the format of
+ POSITION in click events on the frame's internal border.
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Clarify the seq-reduce documentation
+
+ * doc/lispref/sequences.texi (Sequence Functions): Ditto.
+
+ * lisp/emacs-lisp/seq.el (seq-reduce): Clarify the order of the
+ arguments (bug#43995).
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Make tramp-completion-reread-directory-timeout obsolete (Bug#43932)
+
+ * doc/misc/tramp.texi (File name completion, Frequently Asked Questions):
+ Remove `tramp-completion-reread-directory-timeout'. (Bug#43932)
+
+ * etc/NEWS: Mention tramp-completion-reread-directory-timeout as obsolete.
+
+ * lisp/net/tramp.el (tramp-completion-reread-directory-timeout):
+ Make it obsolete.
+
+2021-02-03 Gregory Heytings <ghe@sdf.org> (tiny change)
+
+ Fix 'message' when there's active minibuffer on another frame
+
+ * lisp/minibuffer.el (set-minibuffer-message): Don't reuse the
+ active minibuffer for displaying messages unless the active
+ minibuffer is on the same frame as the selected window.
+
+2021-02-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc tweak
+
+ Try and clarify the meaning of `init-value`.
+
+ (cherry picked from commit 46c0f28c0e4e212687e90ec0ecb239d994105a19)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ A better fix for bug#43886
+
+ * src/xfaces.c (load_color2, Fcolor_distance): Revert last change.
+ * src/term.c (clear_tty_hooks): Don't clear defined_color_hook.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Avoid crashes when a theme is loaded with one frame suspended
+
+ * src/xfaces.c (load_color2, Fcolor_distance): Don't try to call
+ the frame's defined_color_hook if the frame is suspended.
+ (Bug#43886)
+
+2021-02-03 Pankaj Jangid <pankaj.jangid@gmail.com> (tiny change)
+
+ Removed an incorrectly placed extra word in the semantic docs
+
+ * doc/misc/semantic.texi (Parser code): Copy edit (bug#43861).
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix current-line hscrolling when overlays change
+
+ * src/xdisp.c (redisplay_internal): Disable "optimization 1" when
+ auto-hscrolling current line and we're redisplaying the selected
+ window. (Bug#43835)
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Extend tests for shell-command-dont-erase-buffer
+
+ * test/lisp/simple-tests.el
+ (simple-tests-shell-command-dont-erase-buffer): Extend test.
+
+ * test/lisp/net/tramp-tests.el
+ (tramp-test32-shell-command-dont-erase-buffer): Adapt test. Tag
+ it :unstable.
+
+2021-02-03 Hong Xu <hong@hong.me>
+
+ Clarify what ``chrooted environment means'' for TRAMP
+
+ * doc/misc/tramp.texi (Frequently Asked Questions): Clarify what
+ ``chrooted environment means'' for TRAMP (bug#43839).
+
+2021-02-03 Daniel Martín <mardani29@yahoo.es>
+
+ Add missing full stop in MS-DOS processes documentation
+
+ * doc/emacs/msdos-xtra.texi (MS-DOS Processes): Minor copy edig
+ (bug#43820).
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix merging of region face for non-ASCII characters
+
+ * src/xdisp.c (extend_face_to_end_of_line): Restore the correct
+ original face used by the iterator on this line, not the ASCII
+ face. (Bug#43363)
+
+2021-02-03 Alan Third <alan@idiocy.org>
+ Daniel Martín <mardani29@yahoo.es>
+
+ Make drag and drop on NS open all URLs (bug#43470)
+
+ * lisp/term/ns-win.el (ns-drag-n-drop): Merge generic and copy
+ actions.
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Fix electric-buffer-list buffer selection
+
+ * lisp/ebuff-menu.el (electric-buffer-list): Ensure that point is
+ restored, which isn't always the case if
+ global-display-line-numbers-mode (bug#43755). This enables
+ selecting buffers again.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ * doc/misc/flymake.texi (Using Flymake): Fix a typo. (Bug#43758)
+
+2021-02-03 Robert Pluim <rpluim@gmail.com>
+
+ Don't error if no GPG signing key configured
+
+ * lisp/gnus/mml-sec.el (mml-secure-epg-sign): Partially revert
+ "Make mml-secure-epg-sign bug out if we can't find an identity".
+ It causes signing to fail for people who have not set up
+ mml-secure-{smime,openpgp}-sign-with-sender, which is a regression
+ from Emacs-26 (Bug#40118). In such a situation gpg will use its
+ default key.
+
+ Do not merge to master. On master Emacs will query the user.
+
+2021-02-03 Michael R. Mauger <michael@mauger.com>
+
+ 2020-03-29 Michael R. Mauger <michael@mauger.com>
+
+ * lisp/progmodes/sql.el (sql-add-product): Re-correct argument
+ spec. Previous change was due to my mistake; I have
+ resolved back to the prior behavior (Bug#39960).
+ * test/lisp/progmodes/sql-tests.el (sql-test-add-product): Added
+ test to insure I don't make the same mistake again.
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Make aliases introduced in previous patch obsolete
+
+ * lisp/emacs-lisp/debug.el (debugger-toggle-locals):
+ (debug-help-follow): Make reinstated aliases obsolete.
+
+2021-02-03 Gemini Lasswell <gazally@runbox.com>
+
+ Restore some public debugging functions removed in Emacs 27
+
+ * lisp/emacs-lisp/backtrace.el (backtrace--to-string): New function.
+ (backtrace-to-string): Use it. Fix whitespace (bug#40728).
+ * lisp/emacs-lisp/debug.el (debugger-insert-backtrace): New function.
+ Mark it as obsolete.
+ (debugger-toggle-locals, debug-help-follow): New aliases.
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Clarification in Tramp manual
+
+ * doc/misc/tramp.texi: Harmonize "Git" spelling.
+ (Frequently Asked Questions): Describe Emacs version mismatch.
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Check Emacs version used for Tramp compilation
+
+ * lisp/net/tramp-compat.el (tramp-compat-emacs-compiled-version):
+ New defconst. Raise a warning, when it is not equal to the Emacs
+ version.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Don't signal an error when saving files on WdebDAV volumes
+
+ * src/w32.c (acl_get_file): If get_file_security raises the
+ ERROR_ACCESS_DENIED error, treat that like unsupported ACLs.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ * lisp/hi-lock.el (hi-lock-find-patterns): Autoload it. (Bug#43670)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Minor copyedits in the Emacs user manual
+
+ * doc/emacs/emacs.texi (Top): Remove "real-time" from the Emacs
+ description; add "advanced", to be consistent with what we say in
+ the Introduction section. (Bug#43633)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Followup to a recent change in menu-bar.el
+
+ * lisp/fileloop.el (fileloop--operate-function): Mention in a
+ comment that menu-bar.el relies on the default value.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Enable "Continue Tags Search" menu item only when it can be used
+
+ * lisp/menu-bar.el (menu-bar-search-menu) <tags-continue>: Enable
+ only when there was a previous tags search. (Bug#43569)
+ (menu-bar-replace-menu) <tags-repl-continue>: Enable only when
+ there was a previous tags-replace.
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix soap-client URL
+
+ * lisp/net/soap-client.el (soap-create-envelope):
+ Fix URL that I broke in 2019-09-23T06:53:30Z!eggert@cs.ucla.edu.
+ Problem reported by Thomas Fitzsimmons.
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix out-of-source ‘make check’ emacs-module-tests
+
+ Problem reported by Koki Fukuda in:
+ https://lists.gnu.org/r/emacs-devel/2020-07/msg00169.html
+ * test/Makefile.in (MODULE_CFLAGS):
+ Include from the same directories included from in ../src.
+ * test/src/emacs-module-tests.el (module/describe-function-1):
+ Strip path to source directory.
+
+ (cherry picked from commit c86f3fe0d023cdd25edbbce91c5b32654f2b734e)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix support for Zip64 zip files
+
+ * lisp/arc-mode.el (archive-zip-summarize): Fix detection of Zip64
+ central directory. Support 64-bit file size field used by Zip64.
+ (Bug#43597)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ * lisp/hi-lock.el (hi-lock-auto-select-face): Doc fix. (Bug#43600)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Avoid infinite recursion with 'relative' line numbers display
+
+ * src/xdisp.c (display_count_lines_visually): Bind
+ 'display-line-numbers' to 'relative' around 'start_display' as
+ well, since that can invoke 'move_it_to' internally, thus
+ causing infinite recursion. (Bug#43589)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Minor improvement in the ELisp manual's Introduction
+
+ * doc/lispref/intro.texi (Printing Notation): Clarify what
+ "execute code" means in this context. (Bug#43463)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Mention in PROBLEMS the problems with fonts and Uniscribe
+
+ * etc/PROBLEMS: Mention font-related problems with Uniscribe on
+ MS-Windows. (Bug#39340)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Minor copyedits in 'line-height' documentation
+
+ * doc/lispref/display.texi (Line Height): Describe the possible
+ values of the 'line-height' property in a more consistent format.
+
+2021-02-03 Gregor Zattler <telegraph@gmx.net>
+
+ * doc/misc/eww.texi: Document the `w' key's double function
+
+ * doc/misc/eww.texi (Basics): Describe what the `w' command does
+ in eww (bug#43517).
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix a rare segfault in syntax.c
+
+ * src/syntax.c (Fforward_comment): Prevent the loop for COUNT < 0
+ from going outside the valid range of character/byte positions.
+ (Bug#43499)
+
+ * doc/lispref/syntax.texi (Syntax Class Table): Mention the
+ "comment-fence" and "string-fence" as alternative names of 2
+ syntax classes.
+
+2021-02-03 Alan Mackenzie <acm@muc.de>
+
+ Add doc to syntax-propertize-function saying it must do a 100% job
+
+ and cannot be combined with other ways of applying syntax-table text
+ properties.
+
+ * lisp/emacs-lisp/syntax.el (syntax-propertize-function): Amend doc string.
+
+ * doc/lispref/syntax.texi (Syntax Properties): Amend the description of the
+ variable.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Minor copyedits of doc of 'with-silent-modifications'
+
+ * doc/lispref/text.texi (Changing Properties):
+ * doc/lispref/buffers.texi (Buffer Modification): Improve
+ documentation and indexing of 'with-silent-modifications'.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of 'max-mini-window-height'
+
+ * src/xdisp.c (syms_of_xdisp):
+ * doc/lispref/minibuf.texi (Minibuffer Windows): More accurate
+ wording in the documentation of 'max-mini-window-height', to
+ clarify the meaning of an integer value.
+
+2021-02-03 Daniel Martín <mardani29@yahoo.es>
+
+ Use modern constant names for the NS pasteboard
+
+ Use the same pasteboard constant names defined in
+ ns_drag_types. (Bug#43470).
+
+ * src/nsterm.m: Rename NSURLPboardType to NSPasteboardTypeURL,
+ NSStringPboardType to NSPasteboardTypeString, and
+ NSTabularTextPboardType to NSPasteboardTypeTabularText
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix doc string of 'toggle-menu-bar-mode-from-frame'
+
+ * lisp/menu-bar.el (toggle-menu-bar-mode-from-frame): Improve the
+ wording of the doc string. (Bug#43383)
+
+2021-02-03 Glenn Morris <rgm@gnu.org>
+
+ Make vc-bzr tests work with brz 3.1 (bug#43314)
+
+ * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726)
+ (vc-bzr-test-bug9781, vc-bzr-test-faulty-bzr-autoloads):
+ Make them work with brz 3.1.
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ diff-no-select doc string clarification
+
+ * lisp/vc/diff.el (diff-no-select): Update doc string from the trunk,
+ don't merge.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix compilation on TERMINFO platforms with GCC 10
+
+ * src/terminfo.c [TERMINFO]: Don't redefine UP, BC, and CP, as
+ that could cause linking errors due to multiple definitions.
+ (Bug#43195)
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Fix the font-lock-debug-fontify NEWS entry
+
+ * etc/NEWS: Fix the name of `font-lock-debug-fontify' (bug#43319).
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Avoid crashes when trying to load bad GIF files
+
+ * src/image.c (gif_load): Handle the case when GifErrorString
+ returns NULL. (Bug#43281)
+
+2021-02-03 Alan Mackenzie <acm@muc.de>
+
+ C++ Mode: handle comma separated brace initializers.
+
+ This includes both indentation and fontification.
+
+ * lisp/progmodes/cc-engine.el (c-do-declarators): Handle brace initializers
+ without = correctly.
+ (c-looking-at-or-maybe-in-bracelist): Use c-do-declarators with a simple
+ inline function to check that after-type-id-pos points to the start of a
+ declarator.
+
+ * lisp/progmodes/cc-langs.el (c-recognize-bare-brace-inits): New lang
+ const/variable.
+
+2021-02-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp/display-fill-column-indicator.el: Fix bug#41145
+
+ (global-display-fill-column-indicator-mode): Specify the implicit
+ defustom's group explicitly.
+
+ * lisp/cus-dep.el (custom-make-dependencies): Also look at
+ define(-globalized)-minor-mode since it can also define custom vars.
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Backport recent change in tramp-tests.el from master, don't merge
+
+ * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name):
+ No need to expect different results in Emacs 28 and later.
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Fix bug in dbus.el; do not merge with master
+
+ * lisp/net/dbus.el (dbus-register-property)
+ (dbus-property-handler): Handle properties of the same interface
+ at different object paths properly. (Bug#43146)
+
+2021-02-03 Stefan Kangas <stefankangas@gmail.com>
+
+ Fix help message with help-window-select
+
+ * lisp/help.el (help-print-return-message):
+ (help-window-display-message): Recommend 'scroll-up-command' instead
+ of 'scroll-up' when 'help-window-select' is non-nil. (Bug#43122)
+
+2021-02-03 Eric Abrahamsen <eric@ericabrahamsen.net>
+
+ Remove obsolete "Wide Characters" section of Gnus manual
+
+ * doc/misc/gnus.texi: This hasn't been valid since 2016.
+
+2021-02-03 Stefan Kangas <stefankangas@gmail.com>
+
+ Fix typo in Introduction to Emacs Lisp
+
+ * doc/lispintro/emacs-lisp-intro.texi (type-of-animal in detail):
+ Remove extraneous parenthesis.
+
+2021-02-03 Stefan Kangas <stefankangas@gmail.com>
+
+ Update Elisp Manual reference to which-function-mode
+
+ * doc/lispref/modes.texi (Mode Line Top, Mode Line Variables)
+ Don't refer to obsolete alias for 'which-function-mode'.
+ (Bug#13716)
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Some precisions to bug handling
+
+ * admin/admin.el (reminder-for-release-blocking-bugs): Add date to subject.
+
+ * admin/notes/bug-triage:
+ * admin/notes/bugtracker: Minor precisions.
+
+2021-02-03 Alan Mackenzie <acm@muc.de>
+
+ CC Mode: Fix processing for when c-multiline-string-start-char is a character
+
+ * lisp/progmodes/cc-mode.el (c-pps-to-string-delim)
+ (c-multiline-string-check-final-quote): Replace c-clear-char-property by
+ c-clear-syn-tab.
+ (c-multiline-string-check-final-quote): Replace c-put-char-property by
+ c-put-syn-tab.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix description of %-constructs in 'mode-line-format'
+
+ * doc/lispref/modes.texi (%-Constructs): Document %@ and remove
+ %M, which is no longer supported. (Bug#43092)
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Adapt tramp-tests.el, don't merge with master
+
+ * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name)
+ (tramp-test05-expand-file-name-relative): Adapt tests.
+ (tramp--test-emacs28-p): New defun.
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Adapt reminder-for-release-blocking-bugs
+
+ * admin/admin.el (reminder-for-release-blocking-bugs):
+ Require `debbugs-gnu' also in `interactive' form.
+
+ * admin/release-process: Rename RELEASE-CRITICAL to RELEASE-BLOCKING.
+ Adapt Emacs version. Describe `reminder-for-release-blocking-bugs'.
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix replace-region-contents performance bug
+
+ Backport from master.
+ * src/editfns.c (rbc_quitcounter): Remove; the quitcounter
+ is now part of the context.
+ (EXTRA_CONTEXT_FIELDS): Remove unused member early_abort_tests.
+ Add jmp, quitcounter.
+ (Freplace_buffer_contents): Use setjmp/longjmp to recover from
+ a compareseq that runs too long. Omit unnecessary rarely_quit
+ call.
+ (buffer_chars_equal): Occasionally check for early abort and
+ longjmp out if so (Bug#43016).
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ * admin/admin.el (reminder-for-release-blocking-bugs): New command.
+
+2021-02-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Sync with Tramp 2.4.5-pre
+
+ * doc/misc/tramp.texi: Adapt Tramp and Emacs version numbers.
+ (Remote processes): Describe `process-file-return-signal-string'
+ and $INSIDE_EMACS.
+ (Frequently Asked Questions): Mention Emacs 28.
+ Describe `tramp-smb-options'.
+
+ * doc/misc/trampver.texi: Change version to "2.4.5-pre".
+
+ * lisp/net/tramp-adb.el (process-file-return-signal-string): Declare.
+ (tramp-adb-handle-write-region): Flush the cache after the file
+ has been written.
+ (tramp-adb-handle-set-file-modes, tramp-adb-handle-set-file-times):
+ Add optional _FLAG.
+ (tramp-adb-handle-copy-file, tramp-adb-handle-rename-file)
+ (tramp-adb-handle-process-file): Use `tramp-file-local-name'.
+ (tramp-adb-get-signal-strings): New defun.
+ (tramp-adb-handle-process-file): Use it.
+ (tramp-adb-handle-make-process): Implement `stderr'. Use
+ `insert-file-contents-literally'.
+ (tramp-adb-send-command-and-check): Add optional argument
+ EXIT-STATUS.
+ (tramp-adb-handle-process-file): Use it.
+
+ * lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
+ Increase `max-specpdl-size' temporarily.
+
+ * lisp/net/tramp-cache.el (top):
+ Use `insert-file-contents-literally'.
+
+ * lisp/net/tramp-cmds.el (tramp-rename-files):
+ Use `tramp-file-local-name'.
+
+ * lisp/net/tramp-gvfs.el (tramp-gvfs-enabled): Prevent crash for
+ older Emacsen.
+ (top): Adapt `tramp-gvfs-unload-hook'.
+ (tramp-gvfs-handle-file-system-info): Fix error.
+ (tramp-gvfs-handle-set-file-modes, tramp-gvfs-handle-set-file-times):
+ Add optional _FLAG.
+
+ * lisp/net/tramp-rclone.el (tramp-rclone-flush-directory-cache):
+ Fix a problem with older Emacsen.
+
+ * lisp/net/tramp-sh.el (process-file-return-signal-string): Declare.
+ (tramp-sh-extra-args): Add "-noediting" as bash arg.
+ (tramp-hexdump-encode, tramp-hexdump-awk-encode)
+ (tramp-od-encode, tramp-od-awk-encode): New defconst.
+ (tramp-awk-encode, tramp-awk-decode): Adapt.
+ (tramp-awk-coding-test): Remove.
+ (tramp-remote-coding-commands): Add hexdump/awk encoding. (Bug#35639)
+ (tramp-find-inline-encoding): Adapt handling of awk, hexdump and od.
+ (tramp-get-remote-busybox, tramp-get-remote-awk)
+ (tramp-get-remote-hexdump, tramp-get-remote-od): New defuns.
+ (tramp-sh-handle-make-symbolic-link):
+ (tramp-do-copy-or-rename-file-directly)
+ (tramp-sh-handle-process-file, tramp-set-remote-path)
+ (tramp-find-inline-encoding, tramp-get-remote-touch):
+ Use `tramp-file-local-name'.
+ (tramp-do-file-attributes-with-stat): Simplify shell command.
+ Suppress errors (interpret as nil).
+ (tramp-sh-handle-set-file-modes, tramp-sh-handle-set-file-times):
+ Add optional _FLAG.
+ (tramp-sh-handle-make-process): Do not visit with
+ `insert-file-contents'. Delete tmp file only if exists. Support
+ `stderr' as file name. Delete temporary stderr file. Flush
+ connection properties in time.
+ (tramp-sh-get-signal-strings): New defun.
+ (tramp-sh-handle-process-file): Use it.
+ (tramp-sh-handle-write-region): Copy to temp file only if FILENAME
+ exists. (Bug#40156)
+ (tramp-set-remote-path): Send the command in several chunks if it
+ is too large. (Bug#42538)
+ (tramp-open-connection-setup-interactive-shell): Move up "set +o
+ vi +o emacs" command. (Bug#39399)
+ (tramp-send-command-and-read): Suppress `signal-hook-function'
+ when reading expression.
+ (tramp-send-command-and-check): Add optional argument EXIT-STATUS.
+ (tramp-sh-handle-process-file): Use it. (Bug#41099)
+
+ * lisp/net/tramp-smb.el (tramp-smb-conf): Fix docstring.
+ (tramp-smb-options): New defcustom.
+ (tramp-smb-handle-copy-directory, tramp-smb-handle-file-acl)
+ (tramp-smb-handle-set-file-acl, tramp-smb-maybe-open-connection):
+ Use it.
+ (tramp-smb-errors): Add "NT_STATUS_INVALID_PARAMETER".
+ (tramp-smb-handle-make-symbolic-link)
+ (tramp-smb-handle-process-file): Use `tramp-file-local-name'.
+
+ * lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
+ (tramp-sudoedit-handle-set-file-uid-gid):
+ Use `tramp-unquote-file-local-name'.
+ (tramp-sudoedit-handle-make-symbolic-link):
+ Use `tramp-file-local-name'.
+ (tramp-sudoedit-handle-file-system-info): Fix a scoping error.
+ (tramp-sudoedit-handle-set-file-modes):
+ (tramp-sudoedit-handle-set-file-times): Add optional _FLAG.
+
+ * lisp/net/tramp.el: Bump version to 2.4.5-pre.
+ (tramp-file-local-name, tramp-unquote-file-local-name): New defuns.
+ (tramp-set-connection-local-variables-for-buffer)
+ (tramp-equal-remote, tramp-handle-make-auto-save-file-name):
+ Use `tramp-tramp-file-p'.
+ (tramp-parse-file): Use `insert-file-contents-literally'.
+ (tramp-handle-file-modes, tramp-handle-file-times):
+ Add optional _FLAG.
+ (tramp-handle-shell-command): Fix `window-start' in output buffer.
+ (Bug#39171)
+ Handle `shell-command-dont-erase-buffer'. (Bug#39067)
+ Reorganize error-buffer handling. Set `default-directory'.
+ (Bug#39253)
+ (tramp-handle-shell-command, tramp-handle-start-file-process):
+ Implement asynchronous `error-buffer'.
+ (tramp-action-process-alive): Read pending output.
+ (tramp-read-passwd): Use `tramp-compat-temporary-file-directory'.
+ (Bug#39389, Bug#39489)
+ (tramp-interrupt-process): Improve command.
+
+ * lisp/net/trampver.el: Change version to "2.4.5-pre".
+ (tramp-repository-branch, tramp-repository-version):
+ Bind `debug-on-error' to nil.
+
+ * test/lisp/net/tramp-tests.el (tramp-get-remote-gid)
+ (process-file-return-signal-string)
+ (shell-command-dont-erase-buffer): Declare.
+ (tramp-test10-write-region, tramp-test28-process-file)
+ (tramp-test29-start-file-process, tramp-test30-make-process)
+ (tramp-test31-interrupt-process, tramp-test32-shell-command):
+ Extend test.
+ (tramp-test10-write-region, tramp-test21-file-links): Use function
+ symbols.
+ (tramp-test18-file-attributes): Check `file-ownership-preserved-p'
+ only if possible.
+ (tramp--test-async-shell-command): New defun.
+ (tramp--test-shell-command-to-string-asynchronously): Use it.
+ (tramp-test32-shell-command-dont-erase-buffer): New test.
+
+2021-02-03 Phillip Lord <phillip.lord@russet.org.uk>
+
+ Fix error in GMP test
+
+ * etc/w32-feature.el: Update to use system-configuration-features for
+ GMP test.
+
+2021-02-03 Phillip Lord <phillip.lord@russet.org.uk>
+
+ Add Feature testing for Windows binaries
+
+ * etc/w32-feature.el: New file
+
+2021-02-03 Stefan Kangas <stefankangas@gmail.com>
+
+ Revert "; * etc/NEWS: Remove temporary note on documentation. (Bug#42917)"
+
+ This reverts commit 121be3e1181e609734fc4cc9d2d54cf7eec18ab2.
+
+2021-02-03 Glenn Morris <rgm@gnu.org>
+
+ * admin/admin.el (set-version): Trap yet another NEWS error.
+
+2021-02-03 Mattias Engdegård <mattiase@acm.org>
+
+ Fix cond jump table compilation (bug#42919)
+
+ This bug affected compilation of
+
+ (cond ((member '(some list) variable) ...) ...)
+
+ While equal is symmetric, member is not; in the latter case the
+ arguments must be a variable and a constant list, in that order.
+
+ Reported by Ikumi Keita.
+
+ * lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix):
+ Don't treat equality and member predicates in the same way; only
+ the former are symmetric in their arguments.
+ * test/lisp/emacs-lisp/bytecomp-tests.el
+ (byte-opt-testsuite-arith-data): Add test cases.
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Let Emacs start even if curdir is inaccessible
+
+ * lisp/startup.el (normal-top-level): Also delete PWD if
+ file-attributes fails for either $PWD or default-directory,
+ instead of failing out of the top level.
+ This fixes a regression from Emacs 26 (Bug#42903).
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * etc/NEWS: Mention GnuPG 2.0 through 2.1.5 issue (Bug#42845).
+
+2021-02-03 Robert Pluim <rpluim@gmail.com>
+
+ Fix bug with ~/Emacs file not being read at init
+
+ * src/xrdb.c (get_user_app): Put "/" between homedir
+ and %L or %N (Bug#42827).
+
+2021-02-03 Tino Calancha <tino.calancha@gmail.com>
+
+ Prevent from frozen frame after `C-z' in Lucid builds
+
+ Some WMs (e.g. mutter in Gnome Shell) don't unmap iconized windows,
+ thus we won't get a MapNotify when deconifying them.
+ Check if we are deconifying a window elsewhere (Bug#42655).
+
+ - src/xterm.c (handle_one_xevent):
+ Check for window deconify when receiving a FocusIn signal.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Document the 'flex' completion style
+
+ * doc/emacs/mini.texi (Completion Styles): Document the 'flex'
+ completion style. (Bug#42763)
+
+2021-02-03 Lars Ingebrigtsen <larsi@gnus.org>
+
+ Note that Emacs needs systemd support if systemd is used to stop/start
+
+ * etc/NEWS: Note that Emacs needs to be built with systemd support
+ systemd is used to stop/start Emacs (bug#42242). Change suggested by
+ Bhavin Gandhi <bhavin7392@gmail.com>
+
+2021-02-03 Mattias Engdegård <mattiase@acm.org>
+
+ Regexps cannot infloop; fix manual
+
+ * doc/lispref/searching.texi (Regexp Special): Edit erroneous
+ statements about infinite looping in regexps.
+
+ (cherry picked from commit 63268253d21c57d991cba3f3b083d74f154a26fe)
+
+2021-02-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix startup working dir bug on NeXTSTEP
+
+ * src/emacs.c (main) [NS_IMPL_COCOA]: Update emacs_wd
+ after a NS GUI chdirs successfully (Bug#42836).
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of function argument lists
+
+ * doc/lispref/functions.texi (Lambda Components)
+ (Defining Functions): Add a cross-reference to "Argument List".
+ (Argument List): Improve the section name. (Bug#42750)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of special events
+
+ * doc/lispref/commands.texi (Misc Events): Explain how to bind
+ special events to commands.
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix face merging at EOL when inherited face specifies :extend
+
+ * src/xfaces.c (merge_face_ref): Handle correctly faces that
+ inherit from another, and in addition specify :extend.
+ (Bug#42552)
+
+ (cherry picked from commit 39c90f8dfabe158ad7ac9243aa9b9dedb9409e19)
+
+2021-02-03 Eli Zaretskii <eliz@gnu.org>
+
+ Fix face extension past EOL in overlay strings
+
+ * src/xdisp.c (face_at_pos): Pass ATTR_FILTER to
+ face_for_overlay_string.
+ * src/xfaces.c (face_for_overlay_string): Accept an additional
+ argument ATTR_INDEX and pass it to merge_face_ref for merging the
+ face at POS. This ensures a face from buffer text will not be
+ merged unless it specifies the :extend attribute. (Bug#42552)
+ * src/dispextern.h (face_for_overlay_string): Adjust prototype.
+
+ (cherry picked from commit 35564bea4d73bc266743216599d01d644aed6fd8)
+
+2021-02-03 Phil Sainty <psainty@orcon.net.nz>
+
+ Fix comint-redirect-results-list regexp usage (Bug#42662)
+
+ * lisp/comint.el (comint-redirect-results-list-from-process):
+ Don't treat the literal string argument COMMAND as a regexp.
+
+2021-02-03 Nicolas Petton <nicolas@petton.fr>
+
+ * etc/HISTORY: Update the Emacs 27.1 release date.
+
2020-08-03 Phil Sainty <psainty@orcon.net.nz>
lisp/so-long.el: Improve support for major mode hooks
@@ -142478,6 +144446,7 @@
This file records repository revisions from
commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to
+2021-02-03d9244f7cbef9f91e697ad5fc0ce49ec97 (inclusive).
commit 1ca4da054be7eb340c511d817f3ec89c8b819db7 (inclusive).
See ChangeLog.2 for earlier changes.
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 00000000000..1100be87578
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,23 @@
+athena/unstable branch merges only from upstream emacs.git#master, and then is
+only tagged and uploaded to athena after running locally for a day or so to
+confirm that nothing obvious is broken. Build with 'dgit sbuild -d CODENAME
+to get something to test, and then use rebuild-for-athena to build, tag and
+upload.
+
+athena/CODENAME-bpo: backported from athena/unstable, automatically updated by
+rebuild-for-athena when preparing the version of athena/unstable to upload to
+athena as described above.
+
+tmp/HOSTNAME: short-lived branch to test out patches/series not in upstream
+master by running Emacs with those patches on my main laptop during regular
+Emacs usage. Not pushed anywhere. When want to do this, create branch
+starting from athena/unstable, merge/apply the series, dch, build and install
+the .deb, restart Emacs.
+
+To test running Emacs with patches/series not in upstream master without
+affecting my regular environment -- typically because I want to do some
+particular testing of them which takes just a few minutes -- make a temporary
+branch based on upstream master (not athena/unstable), build, and run the copy
+of the just-built in-tree copy of Emacs.
+
+ -- Sean Whitton <spwhitton@spwhitton.name>, Tue, 2 Feb 2021 16:00:14 -0700
diff --git a/debian/changelog b/debian/changelog
index 46666efb742..db6270699fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+emacs-snapshot (28~git20210208.1) unstable; urgency=medium
+
+ * Package git snapshot.
+
+ -- Sean Whitton <spwhitton@spwhitton.name> Thu, 11 Feb 2021 18:51:35 -0700
+
emacs-snapshot (28~git20210131.1~bpo10+1~athena1) buster-backports; urgency=medium
* Rebuild for athena's apt repository.
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index 9cdfa493ed4..3a166e404a8 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -232,9 +232,9 @@ unless they visit files: such buffers are used internally by Emacs.
@table @kbd
@item C-x C-q
Toggle read-only status of buffer (@code{read-only-mode}).
-@item M-x rename-buffer @key{RET} @var{buffer} @key{RET}
+@item C-x x r @key{RET} @var{buffer} @key{RET}
Change the name of the current buffer.
-@item M-x rename-uniquely
+@item C-x x u
Rename the current buffer by adding @samp{<@var{number}>} to the end.
@item M-x view-buffer @key{RET} @var{buffer} @key{RET}
Scroll through buffer @var{buffer}. @xref{View Mode}.
@@ -263,28 +263,28 @@ non-@code{nil} value, making the buffer read-only with @kbd{C-x C-q}
also enables View mode in the buffer (@pxref{View Mode}).
@findex rename-buffer
- @kbd{M-x rename-buffer} changes the name of the current buffer. You
-specify the new name as a minibuffer argument; there is no default.
-If you specify a name that is in use for some other buffer, an error
-happens and no renaming is done.
+ @kbd{C-x x r} (@code{rename-buffer} changes the name of the current
+buffer. You specify the new name as a minibuffer argument; there is
+no default. If you specify a name that is in use for some other
+buffer, an error happens and no renaming is done.
@findex rename-uniquely
- @kbd{M-x rename-uniquely} renames the current buffer to a similar
-name with a numeric suffix added to make it both different and unique.
-This command does not need an argument. It is useful for creating
-multiple shell buffers: if you rename the @file{*shell*} buffer, then
-do @kbd{M-x shell} again, it makes a new shell buffer named
-@file{*shell*}; meanwhile, the old shell buffer continues to exist
-under its new name. This method is also good for mail buffers,
+ @kbd{C-x x u} (@code{rename-uniquely}) renames the current buffer to
+a similar name with a numeric suffix added to make it both different
+and unique. This command does not need an argument. It is useful for
+creating multiple shell buffers: if you rename the @file{*shell*}
+buffer, then do @kbd{M-x shell} again, it makes a new shell buffer
+named @file{*shell*}; meanwhile, the old shell buffer continues to
+exist under its new name. This method is also good for mail buffers,
compilation buffers, and most Emacs features that create special
buffers with particular names. (With some of these features, such as
@kbd{M-x compile}, @kbd{M-x grep}, you need to switch to some other
buffer before using the command again, otherwise it will reuse the
current buffer despite the name change.)
- The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer}
-can also be used to copy text from one buffer to another.
-@xref{Accumulating Text}.
+ The commands @kbd{M-x append-to-buffer} and @kbd{C-x x i}
+(@code{insert-buffer}) can also be used to copy text from one buffer
+to another. @xref{Accumulating Text}.
@node Kill Buffer
@section Killing Buffers
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index f4b18541429..58d08b43c0e 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -173,6 +173,10 @@ line; on subsequent consecutive invocations, make the current line the
top line, the bottom line, and so on in cyclic order. Possibly
redisplay the screen too (@code{recenter-top-bottom}).
+@item C-M-S-l
+Scroll the other window; this is equivalent to @kbd{C-l} acting on the
+other window.
+
@item M-x recenter
Scroll the selected window so the current line is the center-most text
line. Possibly redisplay the screen too.
@@ -1755,13 +1759,13 @@ and/or leftmost columns.
@findex toggle-truncate-lines
Horizontal scrolling automatically causes line truncation
(@pxref{Horizontal Scrolling}). You can explicitly enable line
-truncation for a particular buffer with the command @kbd{M-x
-toggle-truncate-lines}. This works by locally changing the variable
-@code{truncate-lines}. If that variable is non-@code{nil}, long lines
-are truncated; if it is @code{nil}, they are continued onto multiple
-screen lines. Setting the variable @code{truncate-lines} in any way
-makes it local to the current buffer; until that time, the default
-value, which is normally @code{nil}, is in effect.
+truncation for a particular buffer with the command @kbd{C-x x t}
+(@code{toggle-truncate-lines}). This works by locally changing the
+variable @code{truncate-lines}. If that variable is non-@code{nil},
+long lines are truncated; if it is @code{nil}, they are continued onto
+multiple screen lines. Setting the variable @code{truncate-lines} in
+any way makes it local to the current buffer; until that time, the
+default value, which is normally @code{nil}, is in effect.
If a split window becomes too narrow, Emacs may automatically enable
line truncation. @xref{Split Window}, for the variable
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index ede382c146c..6b3bc430d97 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -927,9 +927,9 @@ Manual}). For customizations, see the Custom group @code{time-stamp}.
If you have made extensive changes to a file-visiting buffer and
then change your mind, you can @dfn{revert} the changes and go back to
-the saved version of the file. To do this, type @kbd{M-x
-revert-buffer}. Since reverting unintentionally could lose a lot of
-work, Emacs asks for confirmation first.
+the saved version of the file. To do this, type @kbd{C-x x g}. Since
+reverting unintentionally could lose a lot of work, Emacs asks for
+confirmation first.
The @code{revert-buffer} command tries to position point in such a
way that, if the file was edited only slightly, you will be at
diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi
index df9e67fee68..d989f345566 100644
--- a/doc/emacs/indent.texi
+++ b/doc/emacs/indent.texi
@@ -136,8 +136,8 @@ this transient mode is active, typing @kbd{@key{LEFT}} or
@kbd{@key{RIGHT}} indents leftward and rightward, respectively, by one
space. You can also type @kbd{S-@key{LEFT}} or @kbd{S-@key{RIGHT}} to
indent leftward or rightward to the next tab stop (@pxref{Tab Stops}).
-Typing any other key disables the transient mode, and resumes normal
-editing.
+Typing any other key disables the transient mode, and this key is then
+acted upon as normally.
If called with a prefix argument @var{n}, this command indents the
lines forward by @var{n} spaces (without enabling the transient mode).
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index 9bc786dc47b..8434040bcea 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -703,13 +703,13 @@ copy-to-buffer} is similar, except that any existing text in the other
buffer is deleted, so the buffer is left containing just the text newly
copied into it.
- The command @kbd{M-x insert-buffer} can be used to retrieve the
-accumulated text from another buffer. This prompts for the name of a
-buffer, and inserts a copy of all the text in that buffer into the
-current buffer at point, leaving point at the beginning of the
-inserted text. It also adds the position of the end of the inserted
-text to the mark ring, without activating the mark. @xref{Buffers},
-for background information on buffers.
+ The command @kbd{C-x x i} (@code{insert-buffer}) can be used to
+retrieve the accumulated text from another buffer. This prompts for
+the name of a buffer, and inserts a copy of all the text in that
+buffer into the current buffer at point, leaving point at the
+beginning of the inserted text. It also adds the position of the end
+of the inserted text to the mark ring, without activating the mark.
+@xref{Buffers}, for background information on buffers.
Instead of accumulating text in a buffer, you can append text
directly into a file with @kbd{M-x append-to-file}. This prompts for
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index e851f1b1b58..c66deb77487 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -161,6 +161,8 @@ Select another window (@code{other-window}).
Scroll the next window upward (@code{scroll-other-window}).
@item C-M-S-v
Scroll the next window downward (@code{scroll-other-window-down}).
+@item C-M-S-l
+Recenter the next window (@code{recenter-other-window}).
@item mouse-1
@kbd{mouse-1}, in the text area of a window, selects the window and
moves point to the position clicked. Clicking in the mode line
@@ -194,6 +196,8 @@ rebind a command.)
@findex scroll-other-window
@kindex C-M-S-v
@findex scroll-other-window-down
+@kindex C-M-S-l
+@findex recenter-other-window
The usual scrolling commands (@pxref{Display}) apply to the selected
window only, but there are also commands to scroll the next window.
@kbd{C-M-v} (@code{scroll-other-window}) scrolls the window that
@@ -203,7 +207,9 @@ take positive and negative arguments. (In the minibuffer, @kbd{C-M-v}
scrolls the help window associated with the minibuffer, if any, rather
than the next window in the standard cyclic order; @pxref{Minibuffer
Edit}.) @kbd{C-M-S-v} (@code{scroll-other-window-down}) scrolls the
-next window downward in a similar way.
+next window downward in a similar way. Likewise, @kbd{C-M-S-l}
+(@code{recenter-other-window}) behaves like @kbd{C-l}
+(@code{recenter-top-bottom}) in the next window.
@vindex mouse-autoselect-window
If you set @code{mouse-autoselect-window} to a non-@code{nil} value,
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index a15511dc9f5..f4316b753d8 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -1802,6 +1802,8 @@ Geometry}).
@item child-frame-border-width
The width in pixels of the frame's internal border (@pxref{Frame
Geometry}) if the given frame is a child frame (@pxref{Child Frames}).
+If this is @code{nil}, the value specified by the
+@code{internal-border-width} parameter is used instead.
@vindex vertical-scroll-bars@r{, a frame parameter}
@item vertical-scroll-bars
diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi
index 8781fad30cd..12c6a659079 100644
--- a/doc/lispref/hash.texi
+++ b/doc/lispref/hash.texi
@@ -150,11 +150,11 @@ multiplied by an approximation to this value. The default for
@end table
@end defun
-You can also create a new hash table using the printed representation
+You can also create a hash table using the printed representation
for hash tables. The Lisp reader can read this printed
representation, provided each element in the specified hash table has
a valid read syntax (@pxref{Printed Representation}). For instance,
-the following specifies a new hash table containing the keys
+the following specifies a hash table containing the keys
@code{key1} and @code{key2} (both symbols) associated with @code{val1}
(a symbol) and @code{300} (a number) respectively.
@@ -162,6 +162,11 @@ the following specifies a new hash table containing the keys
#s(hash-table size 30 data (key1 val1 key2 300))
@end example
+Note, however, that when using this in Emacs Lisp code, it's
+undefined whether this creates a new hash table or not. If you want
+to create a new hash table, you should always use
+@code{make-hash-table} (@pxref{Self-Evaluating Forms}).
+
@noindent
The printed representation for a hash table consists of @samp{#s}
followed by a list beginning with @samp{hash-table}. The rest of the
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index c54496f6168..2805b1f5fdc 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1168,13 +1168,14 @@ x
@end group
@end example
-However, the other arguments (all but the last) should be mutable lists.
-
-A common pitfall is to use a constant list as a non-last
-argument to @code{nconc}. If you do this, the resulting behavior
-is undefined. It is possible that your program will change
-each time you run it! Here is what might happen (though this
-is not guaranteed to happen):
+However, the other arguments (all but the last) should be mutable
+lists.
+
+A common pitfall is to use a constant list as a non-last argument to
+@code{nconc}. If you do this, the resulting behavior is undefined
+(@pxref{Self-Evaluating Forms}). It is possible that your program
+will change each time you run it! Here is what might happen (though
+this is not guaranteed to happen):
@smallexample
@group
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index abc12546410..ce7727b87eb 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1826,6 +1826,11 @@ starts, for example by providing a @code{:require} keyword.
Use @code{:group @var{group}} in @var{keyword-args} to specify the
custom group for the mode variable of the global minor mode.
+By default, the buffer-local minor mode variable that says whether the
+mode is switched on or off is the same as the name of the mode itself.
+Use @code{:variable @var{variable}} if that's not the case--some minor
+modes use a different variable to store this state information.
+
Generally speaking, when you define a globalized minor mode, you should
also define a non-globalized version, so that people can use (or
disable) it in individual buffers. This also allows them to disable a
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 6dedaa31f2e..83461656063 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -2017,7 +2017,8 @@ describing the type of event.
default sentinel function, which inserts a message in the process's
buffer with the process name and the string describing the event.
- The string describing the event looks like one of the following:
+ The string describing the event looks like one of the following (but
+this is not an exhaustive list of event strings):
@itemize @bullet
@item
@@ -2048,6 +2049,9 @@ core.
@code{"open\n"}.
@item
+@code{"run\n"}.
+
+@item
@code{"connection broken by remote peer\n"}.
@end itemize
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index d27053a1799..2df6c15c4ca 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -573,10 +573,11 @@ and by Font Lock mode during syntactic fontification (@pxref{Syntactic
Font Lock}). It is called with two arguments, @var{start} and
@var{end}, which are the starting and ending positions of the text on
which it should act. It is allowed to call @code{syntax-ppss} on any
-position before @var{end}. However, it should not call
-@code{syntax-ppss-flush-cache}; so, it is not allowed to call
-@code{syntax-ppss} on some position and later modify the buffer at an
-earlier position.
+position before @var{end}, but if a Lisp program calls
+@code{syntax-ppss} on some position and later modifies the buffer at
+some earlier position, then it is that program's responsibility to
+call @code{syntax-ppss-flush-cache} to flush the now obsolete info
+from the cache.
@strong{Caution:} When this variable is non-@code{nil}, Emacs removes
@code{syntax-table} text properties arbitrarily and relies on
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index e8e99db76ba..64636877938 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -2151,6 +2151,11 @@ And this form restricts the monitoring on D-Bus errors:
@end lisp
@end defun
+@deffn Command dbus-monitor &optional bus
+This command invokes @code{dbus-register-monitor} interactively, and
+switches to the monitor buffer.
+@end deffn
+
@node Index
@unnumbered Index
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index efe839574d2..c2e9fe66dfd 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -2792,9 +2792,10 @@ visiting a file will show its encrypted contents. However, it is
highly discouraged to mix encrypted and not encrypted files in the
same directory.
-@deffn Command tramp-crypt-add-directory name
-If a remote directory shall not include encrypted files anymore, it
-must be indicated by this command.
+@deffn Command tramp-crypt-remove-directory name
+This command should be used to indicate that files in @code{name}
+should no longer be encrypted. Existing encrypted files and
+subdirectories will remain encrypted.
@end deffn
diff --git a/etc/NEWS b/etc/NEWS
index 29499639e70..40fe2156006 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -85,7 +85,11 @@ useful on systems such as FreeBSD which ships only with "etc/termcap".
* Changes in Emacs 28.1
-** The new NonGNU ELPA archive is enabled by default alongside GNU ELPA
+** The new NonGNU ELPA archive is enabled by default alongside GNU ELPA.
+
++++
+** New command 'recenter-other-window', bound to 'S-M-C-l'.
+Like 'recenter-top-bottom' acting in the other window.
** Minibuffer scrolling is now conservative by default.
This is controlled by the new variable 'scroll-minibuffer-conservatively'.
@@ -221,10 +225,10 @@ It is not enabled by default.
+++
** Modifiers now go outside angle brackets in pretty-printed key bindings.
-For example, <return> with Control and Meta modifiers is now shown as
-C-M-<return> instead of <C-M-return>. Either variant can be used as
-input; functions such as 'kbd' and 'read-kbd-macro' accept both styles
-as equivalent (they have done so for a long time).
+For example, 'RET' with Control and Meta modifiers is now shown as
+'C-M-<return>' instead of '<C-M-return>'. Either variant can be used
+as input; functions such as 'kbd' and 'read-kbd-macro' accept both
+styles as equivalent (they have done so for a long time).
+++
** New user option 'lazy-highlight-no-delay-length'.
@@ -233,6 +237,14 @@ search string is at least this long. 'lazy-highlight-initial-delay'
still applies for shorter search strings, which avoids flicker in the
search buffer due to too many matches being highlighted.
++++
+** A new keymap for buffer actions has been added.
+The 'C-x x' keymap now holds keystrokes for various buffer-oriented
+commands. The new keystrokes are 'C-x x g' ('revert-buffer'),
+'C-x x r' ('rename-buffer'), 'C-x x u' ('rename-uniquely'), 'C-x x n'
+('clone-buffer'), 'C-x x i' ('insert-buffer') and 'C-x x t'
+('toggle-truncate-lines').
+
* Editing Changes in Emacs 28.1
@@ -254,7 +266,7 @@ forms, but this command has now been changed to work more like
When 'M-y' is typed not after a yank command, it activates the minibuffer
where you can browse previous kills using the minibuffer history or
completion. In Isearch, you can bind 'C-s M-y' to the command
-`isearch-yank-pop' that uses the minibuffer with completion on
+'isearch-yank-pop' that uses the minibuffer with completion on
previous kills to read a string and append it to the search string.
---
@@ -338,9 +350,10 @@ It used to be enabled when Emacs is started in GUI mode but not when started
in text mode. The cursor still only actually blinks in GUI frames.
** pcase
+
+++
-*** The `pred` pattern can now take the form (pred (not FUN)).
-This is like (pred (lambda (x) (not (FUN x)))) but results
+*** The 'pred' pattern can now take the form '(pred (not FUN))'.
+This is like '(pred (lambda (x) (not (FUN x))))' but results
in better code.
+++
@@ -400,7 +413,7 @@ disabled entirely.
** Windows
+++
-*** New 'display-buffer' function 'display-buffer-use-least-recent-window'
+*** New 'display-buffer' function 'display-buffer-use-least-recent-window'.
This is like 'display-buffer-use-some-window', but won't reuse the
current window, and when called repeatedly will try not to reuse a
previously selected window.
@@ -461,9 +474,14 @@ applied when the option 'tab-line-tab-face-functions' is
so-configured. That option may also be used to customize tab-line
faces in other ways.
-** New bindings in occur-mode, 'next-error-no-select' bound to 'n' and
+** Occur mode
+
+*** New bindings in occur-mode, 'next-error-no-select' bound to 'n' and
'previous-error-no-select' bound to 'p'.
+*** The new command 'recenter-current-error', bound to 'l' in Occur or
+compilation buffers, recenters the current displayed occurrence/error.
+
** EIEIO
+++
@@ -584,6 +602,12 @@ This is used when expanding commit messages from 'vc-print-root-log'
and similar commands.
---
+*** New faces for 'vc-dir' buffers and their Git VC backend.
+Those are: 'vc-dir-header', 'vc-dir-header-value', 'vc-dir-directory',
+'vc-dir-file', 'vc-dir-mark-indicator', 'vc-dir-status-warning',
+'vc-dir-status-edited', 'vc-dir-status-up-to-date', 'vc-dir-ignored'.
+
+---
*** The responsible VC backend is now the most specific one.
'vc-responsible-backend' loops over the backends in
'vc-handled-backends' to determine which backend is responsible for a
@@ -733,7 +757,7 @@ not.
---
*** Respect 'message-forward-ignored-headers' more.
-Previously, this variable would not be consulted if
+Previously, this user option would not be consulted if
'message-forward-show-mml' was nil and forwarding as MIME.
+++
@@ -854,7 +878,7 @@ deprecated. Errors in the Inscript method were corrected.
---
*** New input method 'cham'.
-There's also a Cham greeting in 'etc/HELLO'.
+There's also a Cham greeting in "etc/HELLO".
** Ispell
@@ -956,6 +980,9 @@ command line under point (and any following output).
** Eshell
---
+*** 'eshell-hist-ignoredups' can now also be used to mimic "erasedups" in bash.
+
+---
*** Environment variable 'INSIDE_EMACS' is now copied to subprocesses.
Its value equals the result of evaluating '(format "%s,eshell" emacs-version)'.
@@ -1389,13 +1416,13 @@ have been renamed to have "proper" public names and documented
'xref-show-definitions-buffer-at-bottom').
*** New command 'xref-quit-and-pop-marker-stack' and a binding for it
-in Xref buffers ('M-,'). This combination is easy to press
+in "*xref*" buffers ('M-,'). This combination is easy to press
semi-accidentally if the user wants to go back in the middle of
choosing the exact definition to go to, and this should do TRT.
---
-*** New value 'project-relative' for 'xref-file-name-display'
-If chosen, file names in *xref* buffers will be displayed relative
+*** New value 'project-relative' for 'xref-file-name-display'.
+If chosen, file names in "*xref*" buffers will be displayed relative
to the 'project-root' of the current project, when available.
** json.el
@@ -1418,9 +1445,9 @@ https://www.w3.org/TR/xml/#charsets). Now it rejects such strings.
---
*** erc-services.el now supports NickServ passwords from auth-source.
-The 'erc-use-auth-source-for-nickserv-password' variable enables querying
-auth-source for NickServ passwords. To enable this, add the following
-to your init file:
+The 'erc-use-auth-source-for-nickserv-password' user option enables
+querying auth-source for NickServ passwords. To enable this, add the
+following to your init file:
(setq erc-prompt-for-nickserv-password nil
erc-use-auth-source-for-nickserv-password t)
@@ -1585,18 +1612,18 @@ that makes it a valid button.
'string-clean-whitespace', 'string-fill', 'string-limit',
'string-lines', 'string-pad' and 'string-chop-newline'.
-*** New macro `named-let` that provides Scheme's "named let" looping construct
+*** New macro 'named-let' that provides Scheme's "named let" looping construct.
** thingatpt
+++
*** New variable 'thing-at-point-provider-alist'.
-This allows mode-specific alterations to how `thing-at-point' works.
+This allows mode-specific alterations to how 'thing-at-point' works.
** Miscellaneous
+++
-*** New command `C-x C-k Q' to force redisplay in keyboard macros.
+*** New command 'C-x C-k Q' to force redisplay in keyboard macros.
---
*** New user option 'remember-diary-regexp'.
@@ -1610,8 +1637,8 @@ This function returns some statistics about the line lengths in a buffer.
+++
*** New variable 'inhibit-interaction' to make user prompts signal an error.
If this is bound to something non-nil, functions like
-`read-from-minibuffer', `read-char' (and related) will signal an
-`inhibited-interaction' error.
+'read-from-minibuffer', 'read-char' (and related) will signal an
+'inhibited-interaction' error.
---
*** 'process-attributes' now works under OpenBSD, too.
@@ -1882,14 +1909,12 @@ Otherwise, it will use 'xwidget-webkit-last-session'.
+++
*** New user options to customize Flymake's mode-line.
-
-The new customization variable 'flymake-mode-line-format' is a mix of
-strings and symbols like 'flymake-mode-line-title' ,
-'flymake-mode-line-exception' and 'flymake-mode-line-counters'. The
-new customization variable 'flymake-mode-line-counter-format' is a mix
-of strings and symbols like 'flymake-mode-line-error-counter',
-'flymake-mode-line-warning-counter' and
-'flymake-mode-line-note-counter'.
+The new user option 'flymake-mode-line-format' is a mix of strings and
+symbols like 'flymake-mode-line-title', 'flymake-mode-line-exception'
+and 'flymake-mode-line-counters'. The new user option
+'flymake-mode-line-counter-format' is a mix of strings and symbols
+like 'flymake-mode-line-error-counter',
+'flymake-mode-line-warning-counter' and 'flymake-mode-line-note-counter'.
** Flyspell mode
@@ -1948,7 +1973,7 @@ type symbols. Both functions propagate D-Bus errors.
messages, contain the error name of that message now.
+++
-*** D-Bus messages can be monitored with new function 'dbus-register-monitor'.
+*** D-Bus messages can be monitored with the new command 'dbus-monitor'.
+++
*** D-Bus events have changed their internal structure.
@@ -2007,6 +2032,13 @@ first).
* Incompatible Editing Changes in Emacs 28.1
+** In 'f90-mode', the backslash character ('\') no longer escapes.
+For about a decade, the backslash character has no longer had a
+special escape syntax in Fortran F90. To get the old behaviour back,
+say something like:
+
+ (modify-syntax-entry ?\\ "\\" f90-mode-syntax-table)
+
** In 'nroff-mode', 'center-line' is now bound to 'M-o M-s'.
The original key binding was 'M-s', which interfered with I-search,
since the latter uses 'M-s' as a prefix key of the search prefix map.
@@ -2108,8 +2140,9 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el.
'completion-base-size', 'completion-common-substring',
'crm-minibuffer-complete', 'crm-minibuffer-complete-and-exit',
'crm-minibuffer-completion-help', 'custom-mode', 'custom-mode-hook',
-'define-mode-overload-implementation', 'detect-coding-with-priority',
-'dirtrack-debug', 'dirtrack-debug-toggle', 'dynamic-completion-table',
+'define-key-rebound-commands', 'define-mode-overload-implementation',
+'detect-coding-with-priority', 'dirtrack-debug',
+'dirtrack-debug-toggle', 'dynamic-completion-table',
'easy-menu-precalculate-equivalent-keybindings',
'epa-display-verify-result', 'epg-passphrase-callback-function',
'eshell-report-bug', 'eval-next-after-load', 'exchange-dot-and-mark',
@@ -2164,17 +2197,22 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el.
'vcursor-toggle-vcursor-map', 'w32-focus-frame', 'w32-select-font',
'wisent-lex-make-token-table'.
-** The 'when' argument of `make-obsolete` and related functions is mandatory.
-The use of those functions without a 'when' argument was marked
-obsolete back in Emacs-23.1. The affected functions are:
-make-obsolete, define-obsolete-function-alias, make-obsolete-variable,
-define-obsolete-variable-alias.
+** The WHEN argument of 'make-obsolete' and related functions is mandatory.
+The use of those functions without a WHEN argument was marked obsolete
+back in Emacs 23.1. The affected functions are: 'make-obsolete',
+'define-obsolete-function-alias', 'make-obsolete-variable',
+'define-obsolete-variable-alias'.
-** The variable 'keyboard-type' is obsolete and not dynamically scoped any more
+** The variable 'keyboard-type' is obsolete and not dynamically scoped any more.
* Lisp Changes in Emacs 28.1
+---
+** New variable 'indent-line-ignored-functions'.
+This allows modes to cycle through a set of indentation functions
+appropriate for those modes.
+
** New function 'garbage-collect-maybe' to trigger GC early.
---
diff --git a/leim/SKK-DIC/SKK-JISYO.L b/leim/SKK-DIC/SKK-JISYO.L
index 9098868caea..78d6e08027e 100644
--- a/leim/SKK-DIC/SKK-JISYO.L
+++ b/leim/SKK-DIC/SKK-JISYO.L
@@ -38109,8 +38109,8 @@ sari /¥µ¥ê¡¼/¥µ¥ê/
sarin /¥µ¥ê¥ó/
sarod /¥µ¥í¡¼¥É/¥µ¥í¥Ã¥É/
sars /severe acute respiratory syndrome/½Å¾ÉµÞÀ­¸ÆµÛ´ï¾É¸õ·²/
-sars-cov /severe acute respiratory syndrome coronavirus/SARS¥³¥í¥Ê¥¦¥¤¥ë¥¹
-sars-cov-2 /severe acute respiratory syndrome coronavirus 2/2019¿··¿¥³¥í¥Ê¥¦¥¤¥ë¥¹
+sars-cov /severe acute respiratory syndrome coronavirus/SARS¥³¥í¥Ê¥¦¥¤¥ë¥¹/
+sars-cov-2 /severe acute respiratory syndrome coronavirus 2/2019¿··¿¥³¥í¥Ê¥¦¥¤¥ë¥¹/
sartre /¥µ¥ë¥È¥ë/
saruman /¥µ¥ë¥Þ¥ó/
sasa /¥µ¥µ/
diff --git a/lisp/align.el b/lisp/align.el
index 1318b735c05..1a1d3dd7ec1 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -424,7 +424,7 @@ The possible settings for `align-region-separate' are:
(backward-word 1)
(looking-at
"\\(goto\\|return\\|new\\|delete\\|throw\\)"))
- (if (and (boundp 'font-lock-mode) font-lock-mode)
+ (if font-lock-mode
(eq (get-text-property (point) 'face)
'font-lock-comment-face)
(eq (caar (c-guess-basic-syntax)) 'c)))))))
@@ -775,18 +775,14 @@ See the documentation for `align-rules-list' for more info."
;;; Internal Variables:
-(defvar align-mode-rules-list nil
+(defvar-local align-mode-rules-list nil
"Alignment rules specific to the current major mode.
See the variable `align-rules-list' for more details.")
-(make-variable-buffer-local 'align-mode-rules-list)
-
-(defvar align-mode-exclude-rules-list nil
+(defvar-local align-mode-exclude-rules-list nil
"Alignment exclusion rules specific to the current major mode.
See the variable `align-exclude-rules-list' for more details.")
-(make-variable-buffer-local 'align-mode-exclude-rules-list)
-
(defvar align-highlight-overlays nil
"The current overlays highlighting the text matched by a rule.")
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index 7dcf36851f2..f251be8dfb9 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -2231,7 +2231,7 @@ interactive command."
We use a caching strategy, so the caller doesn't need to do so."
(let* ((types allout-widgets-icon-types)
- (use-dir (if (equal (allout-frame-property nil 'background-mode)
+ (use-dir (if (equal (frame-parameter nil 'background-mode)
'light)
allout-widgets-icons-light-subdir
allout-widgets-icons-dark-subdir))
@@ -2262,13 +2262,6 @@ We use a caching strategy, so the caller doesn't need to do so."
"Return seconds between START/END time values."
(let ((elapsed (time-subtract end start)))
(float-time elapsed)))
-;;;_ > allout-frame-property (frame property)
-(defalias 'allout-frame-property
- (cond ((fboundp 'frame-parameter)
- 'frame-parameter)
- ((fboundp 'frame-property)
- 'frame-property)
- (t nil)))
;;;_ > allout-find-image (specs)
(define-obsolete-function-alias 'allout-find-image #'find-image "28.1")
;;;_ > allout-widgets-copy-list (list)
@@ -2295,6 +2288,8 @@ The elements of LIST are not copied, just the list structure itself."
(overlays-in start end)))))
(length button-overlays)))
+(define-obsolete-function-alias 'allout-frame-property #'frame-parameter "28.1")
+
;;;_ : provide
(provide 'allout-widgets)
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 2494040457b..14cae8a52c7 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -581,14 +581,15 @@ default value. If the user, host, or port are missing, the alist
`auth-source-creation-prompts' will be used to look up the
prompts IN THAT ORDER (so the `user' prompt will be queried first,
then `host', then `port', and finally `secret'). Each prompt string
-can use %u, %h, and %p to show the user, host, and port.
+can use %u, %h, and %p to show the user, host, and port. The prompt
+is formatted with `format-prompt', a trailing \": \" is removed.
Here's an example:
\(let ((auth-source-creation-defaults \\='((user . \"defaultUser\")
(A . \"default A\")))
(auth-source-creation-prompts
- \\='((secret . \"Enter IMAP password for %h:%p: \"))))
+ \\='((secret . \"Enter IMAP password for %h:%p\"))))
(auth-source-search :host \\='(\"nonesuch\" \"twosuch\") :type \\='netrc :max 1
:P \"pppp\" :Q \"qqqq\"
:create \\='(A B Q)))
@@ -860,7 +861,9 @@ while \(:host t) would find all host entries."
secret)))
(defun auth-source-format-prompt (prompt alist)
- "Format PROMPT using %x (for any character x) specifiers in ALIST."
+ "Format PROMPT using %x (for any character x) specifiers in ALIST.
+Remove trailing \": \"."
+ (setq prompt (replace-regexp-in-string ":\\s-*$" "" prompt))
(dolist (cell alist)
(let ((c (nth 0 cell))
(v (nth 1 cell)))
@@ -1344,11 +1347,11 @@ See `auth-source-search' for details on SPEC."
"[any port]"))))
(prompt (or (auth-source--aget auth-source-creation-prompts r)
(cl-case r
- (secret "%p password for %u@%h: ")
- (user "%p user name for %h: ")
- (host "%p host name for user %u: ")
- (port "%p port for %u@%h: "))
- (format "Enter %s (%%u@%%h:%%p): " r)))
+ (secret "%p password for %u@%h")
+ (user "%p user name for %h")
+ (host "%p host name for user %u")
+ (port "%p port for %u@%h"))
+ (format "Enter %s (%%u@%%h:%%p)" r)))
(prompt (auth-source-format-prompt
prompt
`((?u ,(auth-source--aget printable-defaults 'user))
@@ -1378,7 +1381,9 @@ See `auth-source-search' for details on SPEC."
(setq check nil)))
ret))
(t 'never)))
- (plain (or (eval default) (read-passwd prompt))))
+ (plain
+ (or (eval default)
+ (read-passwd (format-prompt prompt nil)))))
;; ask if we don't know what to do (in which case
;; auth-source-netrc-use-gpg-tokens must be a list)
(unless gpg-encrypt
@@ -1390,12 +1395,9 @@ See `auth-source-search' for details on SPEC."
(if (eq gpg-encrypt 'gpg)
(auth-source-epa-make-gpg-token plain file)
plain))
- (if (stringp default)
- (read-string (if (string-match ": *\\'" prompt)
- (concat (substring prompt 0 (match-beginning 0))
- " (default " default "): ")
- (concat prompt "(default " default ") "))
- nil nil default)
+ (if (and (stringp default) auth-source-save-behavior)
+ (read-string
+ (format-prompt prompt default) nil nil default)
(eval default)))))
(when data
@@ -1745,12 +1747,12 @@ authentication tokens:
"[any label]"))))
(prompt (or (auth-source--aget auth-source-creation-prompts r)
(cl-case r
- (secret "%p password for %u@%h: ")
- (user "%p user name for %h: ")
- (host "%p host name for user %u: ")
- (port "%p port for %u@%h: ")
- (label "Enter label for %u@%h: "))
- (format "Enter %s (%%u@%%h:%%p): " r)))
+ (secret "%p password for %u@%h")
+ (user "%p user name for %h")
+ (host "%p host name for user %u")
+ (port "%p port for %u@%h")
+ (label "Enter label for %u@%h"))
+ (format "Enter %s (%%u@%%h:%%p)" r)))
(prompt (auth-source-format-prompt
prompt
`((?u ,(auth-source--aget printable-defaults 'user))
@@ -1760,13 +1762,11 @@ authentication tokens:
;; Store the data, prompting for the password if needed.
(setq data (or data
(if (eq r 'secret)
- (or (eval default) (read-passwd prompt))
- (if (stringp default)
- (read-string (if (string-match ": *\\'" prompt)
- (concat (substring prompt 0 (match-beginning 0))
- " (default " default "): ")
- (concat prompt "(default " default ") "))
- nil nil default)
+ (or (eval default)
+ (read-passwd (format-prompt prompt nil)))
+ (if (and (stringp default) auth-source-save-behavior)
+ (read-string
+ (format-prompt prompt default) nil nil default)
(eval default)))))
(when data
@@ -2190,11 +2190,11 @@ entries for git.gnus.org:
"[any port]"))))
(prompt (or (auth-source--aget auth-source-creation-prompts r)
(cl-case r
- (secret "%p password for %u@%h: ")
- (user "%p user name for %h: ")
- (host "%p host name for user %u: ")
- (port "%p port for %u@%h: "))
- (format "Enter %s (%%u@%%h:%%p): " r)))
+ (secret "%p password for %u@%h")
+ (user "%p user name for %h")
+ (host "%p host name for user %u")
+ (port "%p port for %u@%h"))
+ (format "Enter %s (%%u@%%h:%%p)" r)))
(prompt (auth-source-format-prompt
prompt
`((?u ,(auth-source--aget printable-defaults 'user))
@@ -2204,14 +2204,11 @@ entries for git.gnus.org:
;; Store the data, prompting for the password if needed.
(setq data (or data
(if (eq r 'secret)
- (or (eval default) (read-passwd prompt))
- (if (stringp default)
+ (or (eval default)
+ (read-passwd (format-prompt prompt nil)))
+ (if (and (stringp default) auth-source-save-behavior)
(read-string
- (if (string-match ": *\\'" prompt)
- (concat (substring prompt 0 (match-beginning 0))
- " (default " default "): ")
- (concat prompt "(default " default ") "))
- nil nil default)
+ (format-prompt prompt default) nil nil default)
(eval default)))))
(when data
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 43b62f9bbfc..2f4bab11cf5 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1413,6 +1413,18 @@ if `inhibit-field-text-motion' is non-nil."
(define-key ctl-x-map "z" 'repeat)
+(defvar ctl-x-x-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map "g" #'revert-buffer)
+ (define-key map "r" #'rename-buffer)
+ (define-key map "u" #'rename-uniquely)
+ (define-key map "n" #'clone-buffer)
+ (define-key map "i" #'insert-buffer)
+ (define-key map "t" #'toggle-truncate-lines)
+ map)
+ "Keymap for subcommands of C-x x.")
+(define-key ctl-x-map "x" ctl-x-x-map)
+
(define-key esc-map "\C-l" 'reposition-window)
(define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index c857c9ba7f0..dcf8ff0d0af 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -271,13 +271,11 @@ defaults to `bookmark-default-file' and MODTIME is its modification time.")
(defvar bookmark-file-coding-system nil
"The coding-system of the last loaded or saved bookmark file.")
-(defvar bookmark-current-bookmark nil
+(defvar-local bookmark-current-bookmark nil
"Name of bookmark most recently used in the current file.
It is buffer local, used to make moving a bookmark forward
through a file easier.")
-(make-variable-buffer-local 'bookmark-current-bookmark)
-
(defvar bookmark-alist-modification-count 0
"Number of modifications to bookmark list since it was last saved.")
@@ -903,13 +901,11 @@ Does not affect the kill ring."
(when (and newline-too (= (following-char) ?\n))
(delete-char 1))))
-(defvar bookmark-annotation-name nil
+(defvar-local bookmark-annotation-name nil
"Name of bookmark under edit in `bookmark-edit-annotation-mode'.")
-(make-variable-buffer-local 'bookmark-annotation-name)
-(defvar bookmark--annotation-from-bookmark-list nil
+(defvar-local bookmark--annotation-from-bookmark-list nil
"If non-nil, `bookmark-edit-annotation-mode' should return to bookmark list.")
-(make-variable-buffer-local 'bookmark--annotation-from-bookmark-list)
(defun bookmark-default-annotation-text (bookmark-name)
"Return default annotation text for BOOKMARK-NAME.
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index fda0b4bbedb..74551404776 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -46,10 +46,8 @@
(defvar calc-embedded-modes nil)
(defvar calc-embedded-globals nil)
(defvar calc-embedded-active nil)
-(defvar calc-embedded-all-active nil)
-(make-variable-buffer-local 'calc-embedded-all-active)
-(defvar calc-embedded-some-active nil)
-(make-variable-buffer-local 'calc-embedded-some-active)
+(defvar-local calc-embedded-all-active nil)
+(defvar-local calc-embedded-some-active nil)
;; The following variables are customizable and defined in calc.el.
(defvar calc-embedded-announce-formula)
@@ -856,31 +854,21 @@ The command \\[yank] can retrieve it from there."
(newmode (cl-assoc-if #'derived-mode-p
calc-embedded-open-close-mode-alist)))
(when newann
- (make-local-variable 'calc-embedded-announce-formula)
- (setq calc-embedded-announce-formula (cdr newann)))
+ (setq-local calc-embedded-announce-formula (cdr newann)))
(when newform
- (make-local-variable 'calc-embedded-open-formula)
- (make-local-variable 'calc-embedded-close-formula)
- (setq calc-embedded-open-formula (nth 0 (cdr newform)))
- (setq calc-embedded-close-formula (nth 1 (cdr newform))))
+ (setq-local calc-embedded-open-formula (nth 0 (cdr newform)))
+ (setq-local calc-embedded-close-formula (nth 1 (cdr newform))))
(when newword
- (make-local-variable 'calc-embedded-word-regexp)
- (setq calc-embedded-word-regexp (nth 1 newword)))
+ (setq-local calc-embedded-word-regexp (nth 1 newword)))
(when newplain
- (make-local-variable 'calc-embedded-open-plain)
- (make-local-variable 'calc-embedded-close-plain)
- (setq calc-embedded-open-plain (nth 0 (cdr newplain)))
- (setq calc-embedded-close-plain (nth 1 (cdr newplain))))
+ (setq-local calc-embedded-open-plain (nth 0 (cdr newplain)))
+ (setq-local calc-embedded-close-plain (nth 1 (cdr newplain))))
(when newnewform
- (make-local-variable 'calc-embedded-open-new-formula)
- (make-local-variable 'calc-embedded-close-new-formula)
- (setq calc-embedded-open-new-formula (nth 0 (cdr newnewform)))
- (setq calc-embedded-close-new-formula (nth 1 (cdr newnewform))))
+ (setq-local calc-embedded-open-new-formula (nth 0 (cdr newnewform)))
+ (setq-local calc-embedded-close-new-formula (nth 1 (cdr newnewform))))
(when newmode
- (make-local-variable 'calc-embedded-open-mode)
- (make-local-variable 'calc-embedded-close-mode)
- (setq calc-embedded-open-mode (nth 0 (cdr newmode)))
- (setq calc-embedded-close-mode (nth 1 (cdr newmode)))))))
+ (setq-local calc-embedded-open-mode (nth 0 (cdr newmode)))
+ (setq-local calc-embedded-close-mode (nth 1 (cdr newmode)))))))
(while (and (cdr found)
(> point (aref (car (cdr found)) 3)))
(setq found (cdr found)))
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el
index fc6eb74e9f1..94b99aa29d8 100644
--- a/lisp/calc/calcalg2.el
+++ b/lisp/calc/calcalg2.el
@@ -1545,9 +1545,7 @@
(set-buffer trace-buffer)
(goto-char (point-max))
(or (assq 'scroll-stop (buffer-local-variables))
- (progn
- (make-local-variable 'scroll-step)
- (setq scroll-step 3)))
+ (setq-local scroll-step 3))
(insert "\n\n\n")
(set-buffer calcbuf)
(math-try-integral sexpr))
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index 73954f0266b..9f1bcfa6916 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -716,8 +716,7 @@ specific to a major mode. For example, in jde mode:
(defun semantic-idle-summary-useful-context-p ()
"Non-nil if we should show a summary based on context."
- (if (and (boundp 'font-lock-mode)
- font-lock-mode
+ (if (and font-lock-mode
(memq (get-text-property (point) 'face)
semantic-idle-summary-out-of-context-faces))
;; The best I can think of at the moment is to disable
diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el
index f8d6bb759b0..0de66d29e3e 100644
--- a/lisp/cedet/semantic/util-modes.el
+++ b/lisp/cedet/semantic/util-modes.el
@@ -691,10 +691,6 @@ non-nil if the minor mode is enabled."
;; Disable minor mode if semantic stuff not available
(setq semantic-stickyfunc-mode nil)
(error "Buffer %s was not set up for parsing" (buffer-name)))
- (unless (boundp 'header-line-format)
- ;; Disable if there are no header lines to use.
- (setq semantic-stickyfunc-mode nil)
- (error "Sticky Function mode requires Emacs"))
;; Enable the mode
;; Save previous buffer local value of header line format.
(when (and (local-variable-p 'header-line-format (current-buffer))
diff --git a/lisp/color.el b/lisp/color.el
index 258acbe4053..fec36eecc33 100644
--- a/lisp/color.el
+++ b/lisp/color.el
@@ -33,11 +33,6 @@
;;; Code:
-;; Emacs < 23.3
-(eval-and-compile
- (unless (boundp 'float-pi)
- (defconst float-pi (* 4 (atan 1)) "The value of Pi (3.1415926...).")))
-
;;;###autoload
(defun color-name-to-rgb (color &optional frame)
"Convert COLOR string to a list of normalized RGB components.
diff --git a/lisp/comint.el b/lisp/comint.el
index e52d67d0e50..57df6bfb19f 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -700,8 +700,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
;; https://lists.gnu.org/r/emacs-devel/2007-08/msg00827.html
;;
;; This makes it really work to keep point at the bottom.
- ;; (make-local-variable 'scroll-conservatively)
- ;; (setq scroll-conservatively 10000)
+ ;; (setq-local scroll-conservatively 10000)
(add-hook 'pre-command-hook 'comint-preinput-scroll-to-bottom t t)
(make-local-variable 'comint-ptyp)
(make-local-variable 'comint-process-echoes)
@@ -2253,15 +2252,23 @@ This function could be on `comint-output-filter-functions' or bound to a key."
"Strip trailing `^M' characters from the current output group.
This function could be on `comint-output-filter-functions' or bound to a key."
(interactive)
- (let ((pmark (process-mark (get-buffer-process (current-buffer)))))
- (save-excursion
- (condition-case nil
- (goto-char
- (if (called-interactively-p 'interactive)
- comint-last-input-end comint-last-output-start))
- (error nil))
- (while (re-search-forward "\r+$" pmark t)
- (replace-match "" t t)))))
+ (let ((process (get-buffer-process (current-buffer))))
+ (if (not process)
+ ;; This function may be used in
+ ;; `comint-output-filter-functions', and in that case, if
+ ;; there's no process, then we should do nothing. If
+ ;; interactive, report an error.
+ (when (called-interactively-p 'interactive)
+ (error "No process in the current buffer"))
+ (let ((pmark (process-mark process)))
+ (save-excursion
+ (condition-case nil
+ (goto-char
+ (if (called-interactively-p 'interactive)
+ comint-last-input-end comint-last-output-start))
+ (error nil))
+ (while (re-search-forward "\r+$" pmark t)
+ (replace-match "" t t)))))))
(define-obsolete-function-alias 'shell-strip-ctrl-m #'comint-strip-ctrl-m "27.1")
(defun comint-show-maximum-output ()
@@ -2375,12 +2382,11 @@ a buffer local variable."
;; saved -- typically passwords to ftp, telnet, or somesuch.
;; Just enter m-x comint-send-invisible and type in your line.
-(defvar comint-password-function nil
+(defvar-local comint-password-function nil
"Abnormal hook run when prompted for a password.
This function gets one argument, a string containing the prompt.
It may return a string containing the password, or nil if normal
password prompting should occur.")
-(make-variable-buffer-local 'comint-password-function)
(defun comint-send-invisible (&optional prompt)
"Read a string without echoing.
diff --git a/lisp/completion.el b/lisp/completion.el
index 8810a22d262..da2fb38febc 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -505,9 +505,8 @@ Used to decide whether to save completions.")
;; Old name, non-namespace-clean.
(defvaralias 'cmpl-syntax-table 'completion-syntax-table)
-(defvar completion-syntax-table completion-standard-syntax-table
+(defvar-local completion-syntax-table completion-standard-syntax-table
"This variable holds the current completion syntax table.")
-(make-variable-buffer-local 'completion-syntax-table)
;;-----------------------------------------------
;; Symbol functions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index e52df4e6a2c..cd1ae964eb9 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1242,10 +1242,11 @@ the user might see the value in an error message, a good choice is
the official name of the package, such as MH-E or Gnus.")
;;;###autoload
-(defalias 'customize-changed 'customize-changed-options)
+(define-obsolete-function-alias 'customize-changed-options
+ #'customize-changed "28.1")
;;;###autoload
-(defun customize-changed-options (&optional since-version)
+(defun customize-changed (&optional since-version)
"Customize all settings whose meanings have changed in Emacs itself.
This includes new user options and faces, and new customization
groups, as well as older options and faces whose meanings or
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 27fdb723441..c0a4a6dda06 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -343,7 +343,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(const :tag "Never" nil)
(const :tag "Always" t)
(repeat (symbol :tag "Parameter")))
- "25.1")
+ "27.1")
(iconify-child-frame frames
(choice
(const :tag "Do nothing" nil)
diff --git a/lisp/custom.el b/lisp/custom.el
index 5e354c4c595..833810718b7 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -350,7 +350,7 @@ for more information."
;; if you need to recompile all the Lisp files using interpreted code.
`(custom-declare-variable
',symbol
- ,(if lexical-binding ;FIXME: This is not reliable, but is all we have.
+ ,(if lexical-binding
;; The STANDARD arg should be an expression that evaluates to
;; the standard value. The use of `eval' for it is spread
;; over many different places and hence difficult to
@@ -627,6 +627,10 @@ property, or (ii) an alias for another customizable variable."
(or (get variable 'standard-value)
(get variable 'custom-autoload))))
+(defun custom--standard-value (variable)
+ "Return the standard value of VARIABLE."
+ (eval (car (get variable 'standard-value)) t))
+
(define-obsolete-function-alias 'user-variable-p 'custom-variable-p "24.3")
(defun custom-note-var-changed (variable)
diff --git a/lisp/dframe.el b/lisp/dframe.el
index 09d2fe40794..e61d2ea0581 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -5,10 +5,6 @@
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: file, tags, tools
-(defvar dframe-version "1.3"
- "The current version of the dedicated frame library.")
-(make-obsolete-variable 'dframe-version nil "28.1")
-
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
@@ -150,42 +146,35 @@ selected frame and the focus will change to that frame."
:group 'dframe
:type 'hook)
-(defvar dframe-track-mouse-function nil
+(defvar-local dframe-track-mouse-function nil
"A function to call when the mouse is moved in the given frame.
Typically used to display info about the line under the mouse.")
-(make-variable-buffer-local 'dframe-track-mouse-function)
-(defvar dframe-help-echo-function nil
+(defvar-local dframe-help-echo-function nil
"A function to call when help-echo is used in newer versions of Emacs.
Typically used to display info about the line under the mouse.")
-(make-variable-buffer-local 'dframe-help-echo-function)
-(defvar dframe-mouse-click-function nil
+(defvar-local dframe-mouse-click-function nil
"A function to call when the mouse is clicked.
Valid clicks are mouse 2, our double mouse 1.")
-(make-variable-buffer-local 'dframe-mouse-click-function)
-(defvar dframe-mouse-position-function nil
+(defvar-local dframe-mouse-position-function nil
"A function to call to position the cursor for a mouse click.")
-(make-variable-buffer-local 'dframe-mouse-position-function)
(defvar dframe-power-click nil
"Never set this by hand. Value is t when S-mouse activity occurs.")
-(defvar dframe-timer nil
+(defvar-local dframe-timer nil
"The dframe timer used for updating the buffer.")
-(make-variable-buffer-local 'dframe-timer)
-(defvar dframe-attached-frame nil
+(defvar-local dframe-attached-frame nil
"The frame which started a frame mode.
This is the frame from which all interesting activities will go
for the mode using dframe.")
-(make-variable-buffer-local 'dframe-attached-frame)
-(defvar dframe-controlled nil
+(defvar-local dframe-controlled nil
"Is this buffer controlled by a dedicated frame.
Local to those buffers, as a function called that created it.")
-(make-variable-buffer-local 'dframe-controlled)
(defun dframe-update-keymap (map)
"Update the keymap MAP for dframe default bindings."
@@ -686,28 +675,26 @@ Evaluates all cached timer functions in sequence."
(funcall (car l)))
(setq l (cdr l)))))
-(defalias 'dframe-popup-kludge
- (lambda (e)
- "Pop up a menu related to the clicked on item.
+(defun dframe-popup-kludge (e)
+ "Pop up a menu related to the clicked on item.
Must be bound to event E."
- (interactive "e")
- (save-excursion
- (mouse-set-point e)
- ;; This gets the cursor where the user can see it.
- (if (not (bolp)) (forward-char -1))
- (sit-for 0)
- (popup-menu (mouse-menu-major-mode-map) e))))
+ (interactive "e")
+ (save-excursion
+ (mouse-set-point e)
+ ;; This gets the cursor where the user can see it.
+ (if (not (bolp)) (forward-char -1))
+ (sit-for 0)
+ (popup-menu (mouse-menu-major-mode-map) e)))
;;; Interactive user functions for the mouse
;;
-(defalias 'dframe-mouse-event-p
- (lambda (event)
- "Return t if the event is a mouse related event."
- (if (and (listp event)
- (member (event-basic-type event)
- '(mouse-1 mouse-2 mouse-3)))
- t
- nil)))
+(defun dframe-mouse-event-p (event)
+ "Return t if the event is a mouse related event."
+ (if (and (listp event)
+ (member (event-basic-type event)
+ '(mouse-1 mouse-2 mouse-3)))
+ t
+ nil))
(defun dframe-track-mouse (event)
"For motion EVENT, display info about the current line."
@@ -836,6 +823,13 @@ the mode-line."
(t (dframe-message
"Click on the edge of the mode line to scroll left/right")))))
+
+;;; Obsolete
+
+(defvar dframe-version "1.3"
+ "The current version of the dedicated frame library.")
+(make-obsolete-variable 'dframe-version nil "28.1")
+
(provide 'dframe)
;;; dframe.el ends here
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index ec864d54d69..a94bdf5b42e 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -3148,7 +3148,7 @@ REGEXP should use constructs supported by your local `grep' command."
(with-current-buffer
(let ((xref-show-xrefs-function
;; Some future-proofing (bug#44905).
- (eval (car (get 'xref-show-xrefs-function 'standard-value)))))
+ (custom--standard-value 'xref-show-xrefs-function)))
(dired-do-find-regexp from))
(xref-query-replace-in-results from to)))
diff --git a/lisp/dired.el b/lisp/dired.el
index fe6ac1e2591..553fb64da05 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2332,19 +2332,9 @@ to relist the file at point or the marked files or a
subdirectory, or type \\[dired-build-subdir-alist] to parse the buffer
again for the directory tree.
-Customization variables (rename this buffer and type \\[describe-variable] on each line
-for more info):
-
- `dired-listing-switches'
- `dired-trivial-filenames'
- `dired-marker-char'
- `dired-del-marker'
- `dired-keep-marker-rename'
- `dired-keep-marker-copy'
- `dired-keep-marker-hardlink'
- `dired-keep-marker-symlink'
-
-Hooks (use \\[describe-variable] to see their documentation):
+See the `dired' customization group for a list of user options.
+
+This mode runs the following hooks:
`dired-before-readin-hook'
`dired-after-readin-hook'
diff --git a/lisp/double.el b/lisp/double.el
index d099fd06422..7bc8d92e600 100644
--- a/lisp/double.el
+++ b/lisp/double.el
@@ -95,8 +95,7 @@ but not `C-u X' or `ESC X' since the X is not the prefix key."
(global-set-key [ignore] 'ignore)
-(or (boundp 'isearch-mode-map)
- (load-library "isearch"))
+(require 'isearch)
(define-key isearch-mode-map [ignore]
(lambda () (interactive) (isearch-update)))
diff --git a/lisp/ehelp.el b/lisp/ehelp.el
index 996b7db48f5..aa809d6f6f0 100644
--- a/lisp/ehelp.el
+++ b/lisp/ehelp.el
@@ -95,8 +95,7 @@
map)
"Keymap defining commands available in `electric-help-mode'.")
-(defvar electric-help-orig-major-mode nil)
-(make-variable-buffer-local 'electric-help-orig-major-mode)
+(defvar-local electric-help-orig-major-mode nil)
(defun electric-help-mode ()
"`with-electric-help' temporarily places its buffer in this mode.
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 66a117fccc8..abbe2a2e63f 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -368,6 +368,54 @@
;;; implementing source-level optimizers
+(defconst byte-optimize-enable-variable-constprop t
+ "If non-nil, enable constant propagation through local variables.")
+
+(defconst byte-optimize-warn-eliminated-variable nil
+ "Whether to warn when a variable is optimised away entirely.
+This does usually not indicate a problem and makes the compiler
+very chatty, but can be useful for debugging.")
+
+(defvar byte-optimize--lexvars nil
+ "Lexical variables in scope, in reverse order of declaration.
+Each element is on the form (NAME KEEP [VALUE]), where:
+ NAME is the variable name,
+ KEEP is a boolean indicating whether the binding must be retained,
+ VALUE, if present, is a substitutable expression.
+Earlier variables shadow later ones with the same name.")
+
+(defvar byte-optimize--vars-outside-condition nil
+ "Alist of variables lexically bound outside conditionally executed code.
+Variables here are sensitive to mutation inside the conditional code,
+since their contents in sequentially later code depends on the path taken
+and may no longer be statically known.
+Same format as `byte-optimize--lexvars', with shared structure and contents.")
+
+(defvar byte-optimize--vars-outside-loop nil
+ "Alist of variables lexically bound outside the innermost `while' loop.
+Variables here are sensitive to mutation inside the loop, since this can
+occur an indeterminate number of times and thus have effect on code
+sequentially preceding the mutation itself.
+Same format as `byte-optimize--lexvars', with shared structure and contents.")
+
+(defvar byte-optimize--dynamic-vars nil
+ "List of variables declared as dynamic during optimisation.")
+
+(defun byte-optimize--substitutable-p (expr)
+ "Whether EXPR is a constant that can be propagated."
+ ;; Only consider numbers, symbols and strings to be values for substitution
+ ;; purposes. Numbers and symbols are immutable, and mutating string
+ ;; literals (or results from constant-evaluated string-returning functions)
+ ;; can be considered undefined.
+ ;; (What about other quoted values, like conses?)
+ (or (booleanp expr)
+ (numberp expr)
+ (stringp expr)
+ (and (consp expr)
+ (eq (car expr) 'quote)
+ (symbolp (cadr expr)))
+ (keywordp expr)))
+
(defun byte-optimize-form-code-walker (form for-effect)
;;
;; For normal function calls, We can just mapcar the optimizer the cdr. But
@@ -382,11 +430,24 @@
(let ((fn (car-safe form)))
(pcase form
((pred (not consp))
- (if (not (and for-effect
- (or byte-compile-delete-errors
- (not (symbolp form))
- (eq form t))))
- form))
+ (cond
+ ((and for-effect
+ (or byte-compile-delete-errors
+ (not (symbolp form))
+ (eq form t)))
+ nil)
+ ((symbolp form)
+ (let ((lexvar (assq form byte-optimize--lexvars)))
+ (if (cddr lexvar) ; Value available?
+ (if (assq form byte-optimize--vars-outside-loop)
+ ;; Cannot substitute; mark for retention to avoid the
+ ;; variable being eliminated.
+ (progn
+ (setcar (cdr lexvar) t)
+ form)
+ (caddr lexvar)) ; variable value to use
+ form)))
+ (t form)))
(`(quote . ,v)
(if (cdr v)
(byte-compile-warn "malformed quote form: `%s'"
@@ -396,33 +457,22 @@
(and (car v)
(not for-effect)
form))
- (`(,(or 'let 'let*) . ,(or `(,bindings . ,exps) pcase--dontcare))
- ;; Recursively enter the optimizer for the bindings and body
- ;; of a let or let*. This for depth-firstness: forms that
- ;; are more deeply nested are optimized first.
- (cons fn
- (cons
- (mapcar (lambda (binding)
- (if (symbolp binding)
- binding
- (if (cdr (cdr binding))
- (byte-compile-warn "malformed let binding: `%s'"
- (prin1-to-string binding)))
- (list (car binding)
- (byte-optimize-form (nth 1 binding) nil))))
- bindings)
- (byte-optimize-body exps for-effect))))
+ (`(,(or 'let 'let*) . ,rest)
+ (cons fn (byte-optimize-let-form fn rest for-effect)))
(`(cond . ,clauses)
- (cons fn
- (mapcar (lambda (clause)
- (if (consp clause)
- (cons
- (byte-optimize-form (car clause) nil)
- (byte-optimize-body (cdr clause) for-effect))
- (byte-compile-warn "malformed cond form: `%s'"
- (prin1-to-string clause))
- clause))
- clauses)))
+ ;; The condition in the first clause is always executed, but
+ ;; right now we treat all of them as conditional for simplicity.
+ (let ((byte-optimize--vars-outside-condition byte-optimize--lexvars))
+ (cons fn
+ (mapcar (lambda (clause)
+ (if (consp clause)
+ (cons
+ (byte-optimize-form (car clause) nil)
+ (byte-optimize-body (cdr clause) for-effect))
+ (byte-compile-warn "malformed cond form: `%s'"
+ (prin1-to-string clause))
+ clause))
+ clauses))))
(`(progn . ,exps)
;; As an extra added bonus, this simplifies (progn <x>) --> <x>.
(if (cdr exps)
@@ -442,35 +492,56 @@
(cons fn (byte-optimize-body exps for-effect)))
(`(if ,test ,then . ,else)
- `(if ,(byte-optimize-form test nil)
- ,(byte-optimize-form then for-effect)
- . ,(byte-optimize-body else for-effect)))
+ ;; The test is always executed.
+ (let* ((test-opt (byte-optimize-form test nil))
+ ;; The THEN and ELSE branches are executed conditionally.
+ ;;
+ ;; FIXME: We are conservative here: any variable changed in the
+ ;; THEN branch will be barred from substitution in the ELSE
+ ;; branch, despite the branches being mutually exclusive.
+ (byte-optimize--vars-outside-condition byte-optimize--lexvars)
+ (then-opt (byte-optimize-form then for-effect))
+ (else-opt (byte-optimize-body else for-effect)))
+ `(if ,test-opt ,then-opt . ,else-opt)))
(`(if . ,_)
(byte-compile-warn "too few arguments for `if'"))
(`(,(or 'and 'or) . ,exps) ; Remember, and/or are control structures.
- ;; Take forms off the back until we can't any more.
- ;; In the future it could conceivably be a problem that the
- ;; subexpressions of these forms are optimized in the reverse
- ;; order, but it's ok for now.
- (if for-effect
- (let ((backwards (reverse exps)))
- (while (and backwards
- (null (setcar backwards
- (byte-optimize-form (car backwards)
- for-effect))))
- (setq backwards (cdr backwards)))
- (if (and exps (null backwards))
- (byte-compile-log
- " all subforms of %s called for effect; deleted" form))
- (and backwards
- (cons fn (nreverse (mapcar #'byte-optimize-form
- backwards)))))
- (cons fn (mapcar #'byte-optimize-form exps))))
+ ;; FIXME: We have to traverse the expressions in left-to-right
+ ;; order (because that is the order of evaluation and variable
+ ;; mutations must be found prior to their use), but doing so we miss
+ ;; some optimisation opportunities:
+ ;; consider (and A B) in a for-effect context, where B => nil.
+ ;; Then A could be optimised in a for-effect context too.
+ (let ((tail exps)
+ (args nil))
+ (when tail
+ ;; The first argument is always unconditional.
+ (push (byte-optimize-form
+ (car tail) (and for-effect (null (cdr tail))))
+ args)
+ (setq tail (cdr tail))
+ ;; Remaining arguments are conditional.
+ (let ((byte-optimize--vars-outside-condition byte-optimize--lexvars))
+ (while tail
+ (push (byte-optimize-form
+ (car tail) (and for-effect (null (cdr tail))))
+ args)
+ (setq tail (cdr tail)))))
+ (cons fn (nreverse args))))
(`(while ,exp . ,exps)
- `(while ,(byte-optimize-form exp nil)
- . ,(byte-optimize-body exps t)))
+ ;; FIXME: We conservatively prevent the substitution of any variable
+ ;; bound outside the loop in case it is mutated later in the loop,
+ ;; but this misses many opportunities: variables not mutated in the
+ ;; loop at all, and variables affecting the initial condition (which
+ ;; is always executed unconditionally).
+ (let* ((byte-optimize--vars-outside-condition byte-optimize--lexvars)
+ (byte-optimize--vars-outside-loop byte-optimize--lexvars)
+ (condition (byte-optimize-form exp nil))
+ (body (byte-optimize-body exps t)))
+ `(while ,condition . ,body)))
+
(`(while . ,_)
(byte-compile-warn "too few arguments for `while'"))
@@ -485,24 +556,35 @@
form)
(`(condition-case . ,(or `(,var ,exp . ,clauses) pcase--dontcare))
- `(condition-case ,var ;Not evaluated.
- ,(byte-optimize-form exp for-effect)
- ,@(mapcar (lambda (clause)
- `(,(car clause)
- ,@(byte-optimize-body (cdr clause) for-effect)))
- clauses)))
-
- (`(unwind-protect . ,(or `(,exp . ,exps) pcase--dontcare))
- ;; The "protected" part of an unwind-protect is compiled (and thus
- ;; optimized) as a top-level form, so don't do it here. But the
- ;; non-protected part has the same for-effect status as the
- ;; unwind-protect itself. (The protected part is always for effect,
+ (let ((byte-optimize--vars-outside-condition byte-optimize--lexvars))
+ `(condition-case ,var ;Not evaluated.
+ ,(byte-optimize-form exp for-effect)
+ ,@(mapcar (lambda (clause)
+ `(,(car clause)
+ ,@(byte-optimize-body (cdr clause) for-effect)))
+ clauses))))
+
+ (`(unwind-protect ,exp . ,exps)
+ ;; The unwinding part of an unwind-protect is compiled (and thus
+ ;; optimized) as a top-level form, but run the optimizer for it here
+ ;; anyway for lexical variable usage and substitution. But the
+ ;; protected part has the same for-effect status as the
+ ;; unwind-protect itself. (The unwinding part is always for effect,
;; but that isn't handled properly yet.)
- `(unwind-protect ,(byte-optimize-form exp for-effect) . ,exps))
+ (let* ((byte-optimize--vars-outside-condition byte-optimize--lexvars)
+ (bodyform (byte-optimize-form exp for-effect)))
+ (pcase exps
+ (`(:fun-body ,f)
+ `(unwind-protect ,bodyform
+ :fun-body ,(byte-optimize-form f nil)))
+ (_
+ `(unwind-protect ,bodyform
+ . ,(byte-optimize-body exps t))))))
(`(catch . ,(or `(,tag . ,exps) pcase--dontcare))
- `(catch ,(byte-optimize-form tag nil)
- . ,(byte-optimize-body exps for-effect)))
+ (let ((byte-optimize--vars-outside-condition byte-optimize--lexvars))
+ `(catch ,(byte-optimize-form tag nil)
+ . ,(byte-optimize-body exps for-effect))))
(`(ignore . ,exps)
;; Don't treat the args to `ignore' as being
@@ -512,7 +594,14 @@
`(prog1 nil . ,(mapcar #'byte-optimize-form exps)))
;; Needed as long as we run byte-optimize-form after cconv.
- (`(internal-make-closure . ,_) form)
+ (`(internal-make-closure . ,_)
+ ;; Look up free vars and mark them to be kept, so that they
+ ;; won't be optimised away.
+ (dolist (var (caddr form))
+ (let ((lexvar (assq var byte-optimize--lexvars)))
+ (when lexvar
+ (setcar (cdr lexvar) t))))
+ form)
(`((lambda . ,_) . ,_)
(let ((newform (byte-compile-unfold-lambda form)))
@@ -525,6 +614,36 @@
;; is a *value* and shouldn't appear in the car.
(`((closure . ,_) . ,_) form)
+ (`(setq . ,args)
+ (let ((var-expr-list nil))
+ (while args
+ (unless (and (consp args)
+ (symbolp (car args)) (consp (cdr args)))
+ (byte-compile-warn "malformed setq form: %S" form))
+ (let* ((var (car args))
+ (expr (cadr args))
+ (lexvar (assq var byte-optimize--lexvars))
+ (value (byte-optimize-form expr nil)))
+ (when lexvar
+ ;; If it's bound outside conditional, invalidate.
+ (if (assq var byte-optimize--vars-outside-condition)
+ ;; We are in conditional code and the variable was
+ ;; bound outside: cancel substitutions.
+ (setcdr (cdr lexvar) nil)
+ ;; Set a new value (if substitutable).
+ (setcdr (cdr lexvar)
+ (and (byte-optimize--substitutable-p value)
+ (list value))))
+ (setcar (cdr lexvar) t)) ; Mark variable to be kept.
+ (push var var-expr-list)
+ (push value var-expr-list))
+ (setq args (cddr args)))
+ (cons fn (nreverse var-expr-list))))
+
+ (`(defvar ,(and (pred symbolp) name) . ,_)
+ (push name byte-optimize--dynamic-vars)
+ form)
+
(`(,(pred byte-code-function-p) . ,exps)
(cons fn (mapcar #'byte-optimize-form exps)))
@@ -582,6 +701,65 @@
new)
form)))
+(defun byte-optimize-let-form (head form for-effect)
+ ;; Recursively enter the optimizer for the bindings and body
+ ;; of a let or let*. This for depth-firstness: forms that
+ ;; are more deeply nested are optimized first.
+ (if (and lexical-binding byte-optimize-enable-variable-constprop)
+ (let* ((byte-optimize--lexvars byte-optimize--lexvars)
+ (new-lexvars nil)
+ (let-vars nil))
+ (dolist (binding (car form))
+ (let (name expr)
+ (cond ((consp binding)
+ (setq name (car binding))
+ (unless (symbolp name)
+ (byte-compile-warn "let-bind nonvariable: `%S'" name))
+ (setq expr (byte-optimize-form (cadr binding) nil)))
+ ((symbolp binding)
+ (setq name binding))
+ (t (byte-compile-warn "malformed let binding: `%S'" binding)))
+ (let* (
+ (value (and (byte-optimize--substitutable-p expr)
+ (list expr)))
+ (lexical (not (or (and (symbolp name)
+ (special-variable-p name))
+ (memq name byte-compile-bound-variables)
+ (memq name byte-optimize--dynamic-vars))))
+ (lexinfo (and lexical (cons name (cons nil value)))))
+ (push (cons name (cons expr (cdr lexinfo))) let-vars)
+ (when lexinfo
+ (push lexinfo (if (eq head 'let*)
+ byte-optimize--lexvars
+ new-lexvars))))))
+ (setq byte-optimize--lexvars
+ (append new-lexvars byte-optimize--lexvars))
+ ;; Walk the body expressions, which may mutate some of the records,
+ ;; and generate new bindings that exclude unused variables.
+ (let* ((opt-body (byte-optimize-body (cdr form) for-effect))
+ (bindings nil))
+ (dolist (var let-vars)
+ ;; VAR is (NAME EXPR [KEEP [VALUE]])
+ (if (and (nthcdr 3 var) (not (nth 2 var)))
+ ;; Value present and not marked to be kept: eliminate.
+ (when byte-optimize-warn-eliminated-variable
+ (byte-compile-warn "eliminating local variable %S" (car var)))
+ (push (list (nth 0 var) (nth 1 var)) bindings)))
+ (cons bindings opt-body)))
+
+ ;; With dynamic binding, no substitutions are in effect.
+ (let ((byte-optimize--lexvars nil))
+ (cons
+ (mapcar (lambda (binding)
+ (if (symbolp binding)
+ binding
+ (when (or (atom binding) (cddr binding))
+ (byte-compile-warn "malformed let binding: `%S'" binding))
+ (list (car binding)
+ (byte-optimize-form (nth 1 binding) nil))))
+ (car form))
+ (byte-optimize-body (cdr form) for-effect)))))
+
(defun byte-optimize-body (forms all-for-effect)
;; Optimize the cdr of a progn or implicit progn; all forms is a list of
@@ -590,6 +768,7 @@
;; all-for-effect is true. returns a new list of forms.
(let ((rest forms)
(result nil)
+ (byte-optimize--dynamic-vars byte-optimize--dynamic-vars)
fe new)
(while rest
(setq fe (or all-for-effect (cdr rest)))
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 9722792a5a5..75aefdc7ba0 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -147,13 +147,6 @@
;;
;; See the above section "Checking Parameters" for details about
;; parameter checking.
-;;
-;; Dependencies:
-;;
-;; This file requires lisp-mnt (Lisp maintenance routines) for the
-;; comment checkers.
-;;
-;; Requires custom for Emacs v20.
;;; TO DO:
;; Hook into the byte compiler on a defun/defvar level to generate
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 54c0cf08b78..2916ae4adea 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -418,6 +418,7 @@ on if the hook has explicitly disabled it.
(pretty-global-name (easy-mmode-pretty-mode-name global-mode))
(group nil)
(extra-keywords nil)
+ (MODE-variable mode)
(MODE-buffers (intern (concat global-mode-name "-buffers")))
(MODE-enable-in-buffers
(intern (concat global-mode-name "-enable-in-buffers")))
@@ -439,6 +440,7 @@ on if the hook has explicitly disabled it.
(pcase keyw
(:group (setq group (nconc group (list :group (pop body)))))
(:global (pop body))
+ (:variable (setq MODE-variable (pop body)))
(:predicate
(setq predicate (list (pop body)))
(setq turn-on-function
@@ -541,7 +543,7 @@ list."
(with-current-buffer buf
(unless ,MODE-set-explicitly
(unless (eq ,MODE-major-mode major-mode)
- (if ,mode
+ (if ,MODE-variable
(progn
(,mode -1)
(funcall ,turn-on-function))
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 84191af88cc..5d595851b9f 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -341,7 +341,7 @@ Return the result of the last expression in BODY."
;; FIXME: We should probably just be using `pop-to-buffer'.
(setq window
(cond
- ((and (edebug-window-live-p window)
+ ((and (window-live-p window)
(eq (window-buffer window) buffer))
window)
((eq (window-buffer) buffer)
@@ -392,7 +392,7 @@ Return the result of the last expression in BODY."
;; Get either a full window configuration or some window information.
(if (listp which-windows)
(mapcar (lambda (window)
- (if (edebug-window-live-p window)
+ (if (window-live-p window)
(list window
(window-buffer window)
(window-point window)
@@ -407,7 +407,7 @@ Return the result of the last expression in BODY."
(mapcar (lambda (one-window-info)
(if one-window-info
(apply (lambda (window buffer point start hscroll)
- (if (edebug-window-live-p window)
+ (if (window-live-p window)
(progn
(set-window-buffer window buffer)
(set-window-point window point)
@@ -2688,7 +2688,7 @@ See `edebug-behavior-alist' for implementations.")
(edebug-outside-window (selected-window))
(edebug-outside-buffer (current-buffer))
(edebug-outside-point (point))
- (edebug-outside-mark (edebug-mark))
+ (edebug-outside-mark (mark t))
edebug-outside-windows ; Window or screen configuration.
edebug-buffer-points
@@ -2857,7 +2857,7 @@ See `edebug-behavior-alist' for implementations.")
;; Unrestore edebug-buffer's window-start, if displayed.
(let ((window (car edebug-window-data)))
- (if (and (edebug-window-live-p window)
+ (if (and (window-live-p window)
(eq (window-buffer) edebug-buffer))
(progn
(set-window-start window (cdr edebug-window-data)
@@ -2876,7 +2876,7 @@ See `edebug-behavior-alist' for implementations.")
;; Since we may be in a save-excursion, in case of quit,
;; reselect the outside window only.
;; Only needed if we are not recovering windows??
- (if (edebug-window-live-p edebug-outside-window)
+ (if (window-live-p edebug-outside-window)
(select-window edebug-outside-window))
) ; if edebug-save-windows
@@ -4540,11 +4540,6 @@ It is removed when you hit any char."
;;; Emacs version specific code
-(defalias 'edebug-window-live-p 'window-live-p)
-
-(defun edebug-mark ()
- (mark t))
-
(defun edebug-set-conditional-breakpoint (arg condition)
"Set a conditional breakpoint at nearest sexp.
The condition is evaluated in the outside context.
@@ -4660,7 +4655,15 @@ instrumentation for, defaulting to all functions."
(message "Removed edebug instrumentation from %s"
(mapconcat #'symbol-name functions ", ")))
+
+;;; Obsolete.
+
+(defun edebug-mark ()
+ (declare (obsolete mark "28.1"))
+ (mark t))
+
(define-obsolete-function-alias 'edebug-mark-marker #'mark-marker "28.1")
+(define-obsolete-function-alias 'edebug-window-live-p #'window-live-p "28.1")
(provide 'edebug)
;;; edebug.el ends here
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el
index f551c0c36c3..cc2927caf40 100644
--- a/lisp/emacs-lisp/elp.el
+++ b/lisp/emacs-lisp/elp.el
@@ -110,8 +110,7 @@
;; Boy Jim's profiler.el. Both were written for Emacs 18 and both were
;; pretty good first shots at profiling, but I found that they didn't
;; provide the functionality or interface that I wanted, so I wrote
-;; this. I've tested elp in XEmacs 19 and Emacs 19. There's no point
-;; in even trying to make this work with Emacs 18.
+;; this.
;; Unlike previous profilers, elp uses Emacs 19's built-in function
;; current-time to return interval times. This obviates the need for
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index 9eb6d959645..e45260c32ac 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -725,17 +725,20 @@ Return the value with which ITERATOR finished iteration."
(condition-symbol (cps--gensym "iter-do-condition"))
(it-symbol (cps--gensym "iter-do-iterator"))
(result-symbol (cps--gensym "iter-do-result")))
- `(let (,var
- ,result-symbol
+ `(let (,result-symbol
(,done-symbol nil)
(,it-symbol ,iterator))
- (while (not ,done-symbol)
- (condition-case ,condition-symbol
- (setf ,var (iter-next ,it-symbol))
- (iter-end-of-sequence
- (setf ,result-symbol (cdr ,condition-symbol))
- (setf ,done-symbol t)))
- (unless ,done-symbol ,@body))
+ (while
+ (let ((,var
+ (condition-case ,condition-symbol
+ (iter-next ,it-symbol)
+ (iter-end-of-sequence
+ (setf ,result-symbol (cdr ,condition-symbol))
+ (setf ,done-symbol t)))))
+ (unless ,done-symbol
+ ,@body
+ ;; Loop until done-symbol is set.
+ t)))
,result-symbol)))
(defvar cl--loop-args)
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index c96d849d442..f5ce107185a 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -775,6 +775,8 @@ or to switch back to an existing one."
(setq-local find-tag-default-function 'lisp-find-tag-default)
(setq-local comment-start-skip
"\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
+ (setq-local comment-end-skip "[ \t]*\\(\\s>\\||#\\)")
+ (setq-local font-lock-comment-end-skip "|#")
(setq imenu-case-fold-search t))
(defun lisp-find-tag-default ()
@@ -1371,7 +1373,24 @@ and initial semicolons."
(derived-mode-p 'emacs-lisp-mode))
emacs-lisp-docstring-fill-column
fill-column)))
- (fill-paragraph justify))
+ (save-restriction
+ (save-excursion
+ (let ((ppss (syntax-ppss)))
+ ;; If we're in a string, then narrow (roughly) to that
+ ;; string before filling. This avoids filling Lisp
+ ;; statements that follow the string.
+ (when (ppss-string-terminator ppss)
+ (goto-char (ppss-comment-or-string-start ppss))
+ (beginning-of-line)
+ ;; The string may be unterminated -- in that case, don't
+ ;; narrow.
+ (when (ignore-errors
+ (progn
+ (forward-sexp 1)
+ t))
+ (narrow-to-region (ppss-comment-or-string-start ppss)
+ (point))))
+ (fill-paragraph justify)))))
;; Never return nil.
t))
diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el
index b723643ffb9..2e327d16de4 100644
--- a/lisp/emacs-lisp/package-x.el
+++ b/lisp/emacs-lisp/package-x.el
@@ -182,8 +182,7 @@ if it exists."
;; Check if `package-archive-upload-base' is valid.
(when (or (not (stringp package-archive-upload-base))
(equal package-archive-upload-base
- (car-safe
- (get 'package-archive-upload-base 'standard-value))))
+ (custom--standard-value 'package-archive-upload-base)))
(setq package-archive-upload-base
(read-directory-name
"Base directory for package archive: ")))
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index cf129c453ec..ec746fa4747 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -135,7 +135,6 @@ PATTERN matches. PATTERN can take one of the forms:
(pred (not FUN)) matches if FUN called on EXPVAL returns nil.
(app FUN PAT) matches if FUN called on EXPVAL matches PAT.
(guard BOOLEXP) matches if BOOLEXP evaluates to non-nil.
- (let PAT EXPR) matches if EXPR matches PAT.
(and PAT...) matches if all the patterns match.
(or PAT...) matches if any of the patterns matches.
@@ -145,7 +144,7 @@ FUN in `pred' and `app' can take one of the forms:
(F ARG1 .. ARGn)
call F with ARG1..ARGn and EXPVAL as n+1'th argument
-FUN, BOOLEXP, EXPR, and subsequent PAT can refer to variables
+FUN, BOOLEXP, and subsequent PAT can refer to variables
bound earlier in the pattern by a SYMBOL pattern.
Additional patterns can be defined using `pcase-defmacro'.
@@ -426,7 +425,6 @@ of the elements of LIST is performed as if by `pcase-let'.
(if (pcase--self-quoting-p pat) `',pat pat))
((memq head '(pred guard quote)) pat)
((memq head '(or and)) `(,head ,@(mapcar #'pcase--macroexpand (cdr pat))))
- ((eq head 'let) `(let ,(pcase--macroexpand (cadr pat)) ,@(cddr pat)))
((eq head 'app) `(app ,(nth 1 pat) ,(pcase--macroexpand (nth 2 pat))))
(t
(let* ((expander (pcase--get-macroexpander head))
@@ -888,18 +886,9 @@ Otherwise, it defers to REST which is a list of branches of the form
(if (not (assq upat vars))
(pcase--u1 matches code (cons (cons upat sym) vars) rest)
;; Non-linear pattern. Turn it into an `eq' test.
- (pcase--u1 (cons `(match ,sym . (pred (eq ,(cdr (assq upat vars)))))
+ (pcase--u1 (cons `(match ,sym . (pred (eql ,(cdr (assq upat vars)))))
matches)
code vars rest)))
- ((eq (car-safe upat) 'let)
- ;; A upat of the form (let VAR EXP).
- ;; (pcase--u1 matches code
- ;; (cons (cons (nth 1 upat) (nth 2 upat)) vars) rest)
- (macroexp-let2
- macroexp-copyable-p sym
- (pcase--eval (nth 2 upat) vars)
- (pcase--u1 (cons (pcase--match sym (nth 1 upat)) matches)
- code vars rest)))
((eq (car-safe upat) 'app)
;; A upat of the form (app FUN PAT)
(pcase--mark-used sym)
@@ -1011,5 +1000,9 @@ The predicate is the logical-AND of:
;; compounded values that are not `consp'
(t (error "Unknown QPAT: %S" qpat))))
+(pcase-defmacro let (pat expr)
+ "Matches if EXPR matches PAT."
+ `(app (lambda (_) ,expr) ,pat))
+
(provide 'pcase)
;;; pcase.el ends here
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index 312e38769c5..75b27d08e56 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -258,10 +258,10 @@ vector. Return VALUE."
(aset testcover-vector after-index (testcover--copy-object value)))
((eq 'maybe old-result)
(aset testcover-vector after-index 'edebug-ok-coverage))
- ((eq '1value old-result)
+ ((eq 'testcover-1value old-result)
(aset testcover-vector after-index
(cons old-result (testcover--copy-object value))))
- ((and (eq (car-safe old-result) '1value)
+ ((and (eq (car-safe old-result) 'testcover-1value)
(not (condition-case ()
(equal (cdr old-result) value)
(circular-list t))))
@@ -358,11 +358,11 @@ eliminated by adding more test cases."
data (aref coverage len))
(when (and (not (eq data 'edebug-ok-coverage))
(not (memq (car-safe data)
- '(1value maybe noreturn)))
+ '(testcover-1value maybe noreturn)))
(setq j (+ def-mark (aref points len))))
(setq ov (make-overlay (1- j) j))
(overlay-put ov 'face
- (if (memq data '(edebug-unknown maybe 1value))
+ (if (memq data '(edebug-unknown maybe testcover-1value))
'testcover-nohits
'testcover-1value))))
(set-buffer-modified-p changed))))
@@ -450,12 +450,12 @@ or return multiple values."
(`(defconst ,sym . ,args)
(push sym testcover-module-constants)
(testcover-analyze-coverage-progn args)
- '1value)
+ 'testcover-1value)
(`(defun ,name ,_ . ,doc-and-body)
(let ((val (testcover-analyze-coverage-progn doc-and-body)))
(cl-case val
- ((1value) (push name testcover-module-1value-functions))
+ ((testcover-1value) (push name testcover-module-1value-functions))
((maybe) (push name testcover-module-potentially-1value-functions)))
nil))
@@ -466,13 +466,13 @@ or return multiple values."
;; To avoid infinite recursion, don't examine quoted objects.
;; This will cause the coverage marks on an instrumented quoted
;; form to look odd. See bug#25316.
- '1value)
+ 'testcover-1value)
(`(\` ,bq-form)
(testcover-analyze-coverage-backquote-form bq-form))
((or 't 'nil (pred keywordp))
- '1value)
+ 'testcover-1value)
((pred vectorp)
(testcover-analyze-coverage-compose (append form nil)
@@ -482,7 +482,7 @@ or return multiple values."
nil)
((pred atom)
- '1value)
+ 'testcover-1value)
(_
;; Whatever we have here, it's not wrapped, so treat it as a list of forms.
@@ -494,7 +494,7 @@ Analyze all the forms in FORMS and return 1value, maybe or nil
depending on the analysis of the last one. Find the coverage
vectors referenced by `edebug-enter' forms nested within FORMS and
update them with the results of the analysis."
- (let ((result '1value))
+ (let ((result 'testcover-1value))
(while (consp forms)
(setq result (testcover-analyze-coverage (pop forms))))
result))
@@ -518,7 +518,7 @@ form to be treated accordingly."
(setq val (testcover-analyze-coverage-wrapped-form wrapped-form))
(when (or (eq wrapper '1value) val)
;; The form is 1-valued or potentially 1-valued.
- (aset testcover-vector after-id (or val '1value)))
+ (aset testcover-vector after-id (or val 'testcover-1value)))
(cond
((or (eq wrapper 'noreturn)
@@ -526,13 +526,13 @@ form to be treated accordingly."
;; This function won't return, so indicate to testcover-before that
;; it should record coverage.
(aset testcover-vector before-id (cons 'noreturn after-id))
- (aset testcover-vector after-id '1value)
- (setq val '1value))
+ (aset testcover-vector after-id 'testcover-1value)
+ (setq val 'testcover-1value))
((eq (car-safe wrapped-form) '1value)
;; This function is always supposed to return the same value.
- (setq val '1value)
- (aset testcover-vector after-id '1value)))
+ (setq val 'testcover-1value)
+ (aset testcover-vector after-id 'testcover-1value)))
val))
(defun testcover-analyze-coverage-wrapped-form (form)
@@ -540,26 +540,26 @@ form to be treated accordingly."
FORM is treated as if it will be evaluated."
(pcase form
((pred keywordp)
- '1value)
+ 'testcover-1value)
((pred symbolp)
(when (or (memq form testcover-constants)
(memq form testcover-module-constants))
- '1value))
+ 'testcover-1value))
((pred atom)
- '1value)
+ 'testcover-1value)
(`(\` ,bq-form)
(testcover-analyze-coverage-backquote-form bq-form))
(`(defconst ,sym ,val . ,_)
(push sym testcover-module-constants)
(testcover-analyze-coverage val)
- '1value)
+ 'testcover-1value)
(`(,(or 'dotimes 'dolist) (,_ ,expr . ,result) . ,body)
;; These always return RESULT if provided.
(testcover-analyze-coverage expr)
(testcover-analyze-coverage-progn body)
(let ((val (testcover-analyze-coverage-progn result)))
;; If the third value is not present, the loop always returns nil.
- (if result val '1value)))
+ (if result val 'testcover-1value)))
(`(,(or 'let 'let*) ,bindings . ,body)
(testcover-analyze-coverage-progn bindings)
(testcover-analyze-coverage-progn body))
@@ -604,12 +604,12 @@ FORM is treated as if it will be evaluated."
(defun testcover-analyze-coverage-wrapped-application (func args)
"Analyze the application of FUNC to ARGS for code coverage."
(cond
- ((eq func 'quote) '1value)
+ ((eq func 'quote) 'testcover-1value)
((or (memq func testcover-1value-functions)
(memq func testcover-module-1value-functions))
;; The function should always return the same value.
(testcover-analyze-coverage-progn args)
- '1value)
+ 'testcover-1value)
((or (memq func testcover-potentially-1value-functions)
(memq func testcover-module-potentially-1value-functions))
;; The function might always return the same value.
@@ -635,14 +635,14 @@ If either argument is nil, return nil, otherwise if either
argument is maybe, return maybe. Return 1value only if both arguments
are 1value."
(cl-case val
- (1value result)
+ (testcover-1value result)
(maybe (and result 'maybe))
(nil nil)))
(defun testcover-analyze-coverage-compose (forms func)
"Analyze a list of FORMS for code coverage using FUNC.
The list is 1valued if all of its constituent elements are also 1valued."
- (let ((result '1value))
+ (let ((result 'testcover-1value))
(while (consp forms)
(setq result (testcover-coverage-combine result (funcall func (car forms))))
(setq forms (cdr forms)))
@@ -652,7 +652,7 @@ The list is 1valued if all of its constituent elements are also 1valued."
(defun testcover-analyze-coverage-backquote (bq-list)
"Analyze BQ-LIST, the body of a backquoted list, for code coverage."
- (let ((result '1value))
+ (let ((result 'testcover-1value))
(while (consp bq-list)
(let ((form (car bq-list))
val)
@@ -670,7 +670,7 @@ The list is 1valued if all of its constituent elements are also 1valued."
"Analyze a single FORM from a backquoted list for code coverage."
(cond
((vectorp form) (testcover-analyze-coverage-backquote (append form nil)))
- ((atom form) '1value)
+ ((atom form) 'testcover-1value)
((memq (car form) (list '\, '\,@))
(testcover-analyze-coverage (cadr form)))
(t (testcover-analyze-coverage-backquote form))))
diff --git a/lisp/epa.el b/lisp/epa.el
index 197cd92f977..572c947e4b2 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -379,8 +379,7 @@ DOC is documentation text to insert at the start."
(goto-char point))
(epa--insert-keys (epg-list-keys context name secret)))
- (make-local-variable 'epa-list-keys-arguments)
- (setq epa-list-keys-arguments (list name secret))
+ (setq-local epa-list-keys-arguments (list name secret))
(goto-char (point-min))
(pop-to-buffer (current-buffer)))
@@ -500,8 +499,7 @@ If SECRET is non-nil, list secret keys instead of public keys."
(format "*Key*%s" (epg-sub-key-id primary-sub-key)))))
(set-buffer (cdr entry))
(epa-key-mode)
- (make-local-variable 'epa-key)
- (setq epa-key key)
+ (setq-local epa-key key)
(erase-buffer)
(setq pointer (epg-key-user-id-list key))
(while pointer
diff --git a/lisp/epg.el b/lisp/epg.el
index b1f37cbbdcf..36515ef4e5f 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -332,7 +332,6 @@ callback data (if any)."
(cl-defstruct (epg-key
(:constructor nil)
(:constructor epg-make-key (owner-trust))
- (:copier nil)
(:predicate nil))
(owner-trust nil :read-only t)
sub-key-list user-id-list)
@@ -642,22 +641,14 @@ callback data (if any)."
(with-current-buffer buffer
(if (fboundp 'set-buffer-multibyte)
(set-buffer-multibyte nil))
- (make-local-variable 'epg-last-status)
- (setq epg-last-status nil)
- (make-local-variable 'epg-read-point)
- (setq epg-read-point (point-min))
- (make-local-variable 'epg-process-filter-running)
- (setq epg-process-filter-running nil)
- (make-local-variable 'epg-pending-status-list)
- (setq epg-pending-status-list nil)
- (make-local-variable 'epg-key-id)
- (setq epg-key-id nil)
- (make-local-variable 'epg-context)
- (setq epg-context context)
- (make-local-variable 'epg-agent-file)
- (setq epg-agent-file agent-file)
- (make-local-variable 'epg-agent-mtime)
- (setq epg-agent-mtime agent-mtime))
+ (setq-local epg-last-status nil)
+ (setq-local epg-read-point (point-min))
+ (setq-local epg-process-filter-running nil)
+ (setq-local epg-pending-status-list nil)
+ (setq-local epg-key-id nil)
+ (setq-local epg-context context)
+ (setq-local epg-agent-file agent-file)
+ (setq-local epg-agent-mtime agent-mtime))
(setq error-process
(make-pipe-process :name "epg-error"
:buffer (generate-new-buffer " *epg-error*")
@@ -1383,11 +1374,22 @@ NAME is either a string or a list of strings."
keys))
(defun epg--filter-revoked-keys (keys)
- (seq-remove (lambda (key)
- (seq-find (lambda (user)
- (eq (epg-user-id-validity user) 'revoked))
- (epg-key-user-id-list key)))
- keys))
+ (mapcar
+ (lambda (key)
+ ;; We have something revoked, so copy the key and remove the
+ ;; revoked bits.
+ (if (seq-find (lambda (user)
+ (eq (epg-user-id-validity user) 'revoked))
+ (epg-key-user-id-list key))
+ (let ((copy (copy-epg-key key)))
+ (setf (epg-key-user-id-list copy)
+ (seq-remove (lambda (user)
+ (eq (epg-user-id-validity user) 'revoked))
+ (epg-key-user-id-list copy)))
+ copy)
+ ;; Nothing to delete; return the key.
+ key))
+ keys))
(defun epg--args-from-sig-notations (notations)
(apply #'nconc
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 37e4cc39d53..dd7f50fb381 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -6464,32 +6464,31 @@ if `erc-away' is non-nil."
(setq mode-line-buffer-identification
(list (format-spec erc-mode-line-format spec)))
(setq mode-line-process (list process-status))
- (when (boundp 'header-line-format)
- (let ((header (if erc-header-line-format
- (format-spec erc-header-line-format spec)
- nil)))
- (cond (erc-header-line-uses-tabbar-p
- (setq-local tabbar--local-hlf header-line-format)
- (kill-local-variable 'header-line-format))
- ((null header)
- (setq header-line-format nil))
- (erc-header-line-uses-help-echo-p
- (let ((help-echo (with-temp-buffer
- (insert header)
- (fill-region (point-min) (point-max))
- (buffer-string))))
- (setq header-line-format
- (replace-regexp-in-string
- "%"
- "%%"
- (if face
- (propertize header 'help-echo help-echo
- 'face face)
- (propertize header 'help-echo help-echo))))))
- (t (setq header-line-format
- (if face
- (propertize header 'face face)
- header)))))))
+ (let ((header (if erc-header-line-format
+ (format-spec erc-header-line-format spec)
+ nil)))
+ (cond (erc-header-line-uses-tabbar-p
+ (setq-local tabbar--local-hlf header-line-format)
+ (kill-local-variable 'header-line-format))
+ ((null header)
+ (setq header-line-format nil))
+ (erc-header-line-uses-help-echo-p
+ (let ((help-echo (with-temp-buffer
+ (insert header)
+ (fill-region (point-min) (point-max))
+ (buffer-string))))
+ (setq header-line-format
+ (replace-regexp-in-string
+ "%"
+ "%%"
+ (if face
+ (propertize header 'help-echo help-echo
+ 'face face)
+ (propertize header 'help-echo help-echo))))))
+ (t (setq header-line-format
+ (if face
+ (propertize header 'face face)
+ header))))))
(force-mode-line-update)))
(defun erc-update-mode-line (&optional buffer)
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index 0d09ef4a12e..b7b1778ebb1 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -99,8 +99,12 @@ If it is nil, Eshell will use the value of HISTFILE."
(defcustom eshell-hist-ignoredups nil
"If non-nil, don't add input matching the last on the input ring.
-This mirrors the optional behavior of bash."
- :type 'boolean)
+The value `erase' mirrors the \"erasedups\" value of HISTCONTROL
+in bash, and any other non-nil value mirrors the \"ignoredups\"
+value."
+ :type '(choice (const :tag "Don't ignore anything" nil)
+ (const :tag "Ignore consecutive duplicates" t)
+ (const :tag "Only keep last duplicate" 'erase)))
(defcustom eshell-save-history-on-exit t
"Determine if history should be automatically saved.
@@ -371,12 +375,22 @@ unless a different file is specified on the command line.")
Input is entered into the input history ring, if the value of
variable `eshell-input-filter' returns non-nil when called on the
input."
- (if (and (funcall eshell-input-filter input)
- (or (null eshell-hist-ignoredups)
- (not (ring-p eshell-history-ring))
- (ring-empty-p eshell-history-ring)
- (not (string-equal (eshell-get-history 0) input))))
- (eshell-put-history input))
+ (when (and (funcall eshell-input-filter input)
+ (if (eq eshell-hist-ignoredups 'erase)
+ ;; Remove any old occurrences of the input, and put
+ ;; the new one at the end.
+ (progn
+ (ring-remove eshell-history-ring
+ (ring-member eshell-history-ring input))
+ t)
+ ;; Always add...
+ (or (null eshell-hist-ignoredups)
+ ;; ... or add if it's not already present at the
+ ;; end.
+ (not (ring-p eshell-history-ring))
+ (ring-empty-p eshell-history-ring)
+ (not (string-equal (eshell-get-history 0) input)))))
+ (eshell-put-history input))
(setq eshell-save-history-index eshell-history-index)
(setq eshell-history-index nil))
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 4d63467899b..daca035ea49 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -1001,7 +1001,7 @@ be finished later after the completion of an asynchronous subprocess."
;; expand any macros directly into the form. This is done so that
;; we can modify any `let' forms to evaluate only once.
(if (macrop (car form))
- (let ((exp (eshell-copy-tree (macroexpand form))))
+ (let ((exp (copy-tree (macroexpand form))))
(eshell-manipulate (format-message "expanding macro `%s'"
(symbol-name (car form)))
(setcar form (car exp))
@@ -1009,7 +1009,7 @@ be finished later after the completion of an asynchronous subprocess."
(let ((args (cdr form)))
(cond
((eq (car form) 'while)
- ;; `eshell-copy-tree' is needed here so that the test argument
+ ;; `copy-tree' is needed here so that the test argument
;; doesn't get modified and thus always yield the same result.
(when (car eshell-command-body)
(cl-assert (not synchronous-p))
@@ -1017,27 +1017,27 @@ be finished later after the completion of an asynchronous subprocess."
(setcar eshell-command-body nil)
(setcar eshell-test-body nil))
(unless (car eshell-test-body)
- (setcar eshell-test-body (eshell-copy-tree (car args))))
+ (setcar eshell-test-body (copy-tree (car args))))
(while (cadr (eshell-do-eval (car eshell-test-body)))
(setcar eshell-command-body
(if (cddr args)
- `(progn ,@(eshell-copy-tree (cdr args)))
- (eshell-copy-tree (cadr args))))
+ `(progn ,@(copy-tree (cdr args)))
+ (copy-tree (cadr args))))
(eshell-do-eval (car eshell-command-body) synchronous-p)
(setcar eshell-command-body nil)
- (setcar eshell-test-body (eshell-copy-tree (car args))))
+ (setcar eshell-test-body (copy-tree (car args))))
(setcar eshell-command-body nil))
((eq (car form) 'if)
- ;; `eshell-copy-tree' is needed here so that the test argument
+ ;; `copy-tree' is needed here so that the test argument
;; doesn't get modified and thus always yield the same result.
(if (car eshell-command-body)
(progn
(cl-assert (not synchronous-p))
(eshell-do-eval (car eshell-command-body)))
(unless (car eshell-test-body)
- (setcar eshell-test-body (eshell-copy-tree (car args))))
+ (setcar eshell-test-body (copy-tree (car args))))
(setcar eshell-command-body
- (eshell-copy-tree
+ (copy-tree
(if (cadr (eshell-do-eval (car eshell-test-body)))
(cadr args)
(car (cddr args)))))
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 872e3b52046..8ef1ac9c345 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -235,11 +235,10 @@ If N or M is nil, it means the end of the list."
a (last a)))
a))
-(defvar eshell-path-env (getenv "PATH")
+(defvar-local eshell-path-env (getenv "PATH")
"Content of $PATH.
It might be different from \(getenv \"PATH\"), when
`default-directory' points to a remote host.")
-(make-variable-buffer-local 'eshell-path-env)
(defun eshell-get-path ()
"Return $PATH as a list.
@@ -486,8 +485,6 @@ list."
"Return the user id for user NAME."
(car (rassoc name (eshell-read-user-names))))
-(defalias 'eshell-user-name 'user-login-name)
-
(autoload 'pcomplete-read-hosts-file "pcomplete")
(autoload 'pcomplete-read-hosts "pcomplete")
(autoload 'pcomplete-read-host-names "pcomplete")
@@ -644,8 +641,6 @@ gid format. Valid values are `string' and `integer', defaulting to
entry)
(file-attributes file id-format))))
-(defalias 'eshell-copy-tree 'copy-tree)
-
(defsubst eshell-processp (proc)
"If the `processp' function does not exist, PROC is not a process."
(and (fboundp 'processp) (processp proc)))
@@ -715,6 +710,9 @@ gid format. Valid values are `string' and `integer', defaulting to
; (or result
; (file-attributes filename))))
+(define-obsolete-function-alias 'eshell-copy-tree #'copy-tree "28.1")
+(define-obsolete-function-alias 'eshell-user-name #'user-login-name "28.1")
+
(provide 'esh-util)
;;; esh-util.el ends here
diff --git a/lisp/expand.el b/lisp/expand.el
index 5c0b5f42817..9df8d9f15ac 100644
--- a/lisp/expand.el
+++ b/lisp/expand.el
@@ -289,17 +289,14 @@ If ARG is omitted, point is placed at the end of the expanded text."
(defvar expand-list nil "Temporary variable used by the Expand package.")
-(defvar expand-pos nil
+(defvar-local expand-pos nil
"If non-nil, store a vector with position markers defined by the last expansion.")
-(make-variable-buffer-local 'expand-pos)
-(defvar expand-index 0
+(defvar-local expand-index 0
"Index of the last marker used in `expand-pos'.")
-(make-variable-buffer-local 'expand-index)
-(defvar expand-point nil
+(defvar-local expand-point nil
"End of the expanded region.")
-(make-variable-buffer-local 'expand-point)
(defun expand-add-abbrev (table abbrev expansion arg)
"Add one abbreviation and provide the hook to move to the specified positions."
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index c53b20f3338..5914ee4a202 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -217,21 +217,17 @@ Each positive or negative step scales the default face height by this amount."
:type 'number
:version "23.1")
-;; current remapping cookie for text-scale-mode
-(defvar text-scale-mode-remapping nil)
-(make-variable-buffer-local 'text-scale-mode-remapping)
+(defvar-local text-scale-mode-remapping nil
+ "Current remapping cookie for text-scale-mode.")
-;; Lighter displayed for text-scale-mode in mode-line minor-mode list
-(defvar text-scale-mode-lighter "+0")
-(make-variable-buffer-local 'text-scale-mode-lighter)
+(defvar-local text-scale-mode-lighter "+0"
+ "Lighter displayed for text-scale-mode in mode-line minor-mode list.")
-;; Number of steps that text-scale-mode will increase/decrease text height
-(defvar text-scale-mode-amount 0)
-(make-variable-buffer-local 'text-scale-mode-amount)
+(defvar-local text-scale-mode-amount 0
+ "Number of steps that text-scale-mode will increase/decrease text height.")
-(defvar text-scale-remap-header-line nil
+(defvar-local text-scale-remap-header-line nil
"If non-nil, text scaling may change font size of header lines too.")
-(make-variable-buffer-local 'text-scale-header-line)
(defun face-remap--clear-remappings ()
(dolist (remapping
@@ -358,9 +354,9 @@ INC may be passed as a numeric prefix argument.
The actual adjustment made depends on the final component of the
key-binding used to invoke the command, with all modifiers removed:
- +, = Increase the default face height by one step
- - Decrease the default face height by one step
- 0 Reset the default face height to the global default
+ +, = Increase the height of the default face by one step
+ - Decrease the height of the default face by one step
+ 0 Reset the height of the default face to the global default
After adjusting, continue to read input events and further adjust
the face height as long as the input event read
@@ -413,8 +409,7 @@ plist, etc."
:version "23.1")
;; current remapping cookie for buffer-face-mode
-(defvar buffer-face-mode-remapping nil)
-(make-variable-buffer-local 'buffer-face-mode-remapping)
+(defvar-local buffer-face-mode-remapping nil)
;;;###autoload
(define-minor-mode buffer-face-mode
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 1f43bafdb93..6faf8d50b26 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1675,9 +1675,8 @@ For example, try \":/\" for URL (and some FTP) references."
:type '(choice (const nil) regexp)
:group 'ffap)
-(defvar ffap-menu-alist nil
+(defvar-local ffap-menu-alist nil
"Buffer local cache of menu presented by `ffap-menu'.")
-(make-variable-buffer-local 'ffap-menu-alist)
(defvar ffap-menu-text-plist
(cond
diff --git a/lisp/files-x.el b/lisp/files-x.el
index 628bf180929..526a128623c 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -570,13 +570,12 @@ from the MODE alist ignoring the input argument VALUE."
(defvar enable-connection-local-variables t
"Non-nil means enable use of connection-local variables.")
-(defvar connection-local-variables-alist nil
+(defvar-local connection-local-variables-alist nil
"Alist of connection-local variable settings in the current buffer.
Each element in this list has the form (VAR . VALUE), where VAR
is a connection-local variable (a symbol) and VALUE is its value.
The actual value in the buffer may differ from VALUE, if it is
changed by the user.")
-(make-variable-buffer-local 'connection-local-variables-alist)
(setq ignored-local-variables
(cons 'connection-local-variables-alist ignored-local-variables))
diff --git a/lisp/foldout.el b/lisp/foldout.el
index 4c479d68e9a..2de49d2839c 100644
--- a/lisp/foldout.el
+++ b/lisp/foldout.el
@@ -209,14 +209,12 @@
(require 'outline)
-(defvar foldout-fold-list nil
+(defvar-local foldout-fold-list nil
"List of start and end markers for the folds currently entered.
An end marker of nil means the fold ends after (point-max).")
-(make-variable-buffer-local 'foldout-fold-list)
-(defvar foldout-mode-line-string nil
+(defvar-local foldout-mode-line-string nil
"Mode line string announcing that we are in an outline fold.")
-(make-variable-buffer-local 'foldout-mode-line-string)
;; put our minor mode string immediately following outline-minor-mode's
(or (assq 'foldout-mode-line-string minor-mode-alist)
diff --git a/lisp/follow.el b/lisp/follow.el
index 292dc4a0225..069758747c1 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -1140,9 +1140,8 @@ Otherwise, return nil."
;; is nil. Start every window directly after the end of the previous
;; window, to make sure long lines are displayed correctly.
-(defvar follow-start-end-invalid t
+(defvar-local follow-start-end-invalid t
"When non-nil, indicates `follow-windows-start-end-cache' is invalid.")
-(make-variable-buffer-local 'follow-start-end-invalid)
(defun follow-redisplay (&optional windows win preserve-win)
"Reposition the WINDOWS around WIN.
diff --git a/lisp/forms.el b/lisp/forms.el
index 5d7e6dde96c..62c4288869a 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -418,9 +418,8 @@ Also, initial position is at last record."
(defvar forms--parser nil
"Forms parser routine.")
-(defvar forms--mode-setup nil
+(defvar-local forms--mode-setup nil
"To keep track of forms-mode being set-up.")
-(make-variable-buffer-local 'forms--mode-setup)
(defvar forms--dynamic-text nil
"Array that holds dynamic texts to insert between fields.")
diff --git a/lisp/frame.el b/lisp/frame.el
index 06aab269ddd..ce4de83b8c5 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1370,6 +1370,7 @@ FRAME defaults to the selected frame."
FRAME defaults to the selected frame."
(setq frame (window-normalize-frame frame))
(- (frame-native-height frame)
+ (tab-bar-height frame t)
(* 2 (frame-internal-border-width frame))))
(defun frame-outer-width (&optional frame)
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 39b182f2cda..7ded9e40e99 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -3010,8 +3010,7 @@ message header will be added to the bodies of the \"text/html\" parts."
(when header
(article-decode-encoded-words)
(let ((gnus-visible-headers
- (or (get 'gnus-visible-headers 'standard-value)
- gnus-visible-headers)))
+ (custom--standard-value 'gnus-visible-headers)))
(article-hide-headers))
(goto-char (point-min))
(search-forward "\n\n" nil 'move)
@@ -3045,8 +3044,8 @@ images if any to the browser, and deletes them when exiting the group
(interactive "P")
(if arg
(gnus-summary-show-article)
- (let ((gnus-visible-headers (or (get 'gnus-visible-headers 'standard-value)
- gnus-visible-headers))
+ (let ((gnus-visible-headers
+ (custom--standard-value 'gnus-visible-headers))
(gnus-mime-display-attachment-buttons-in-header nil)
;; As we insert a <hr>, there's no need for the body boundary.
(gnus-treat-body-boundary nil))
@@ -7895,7 +7894,8 @@ If the text at point has a `gnus-callback' property,
call it with the value of the `gnus-data' text property."
(interactive (list last-nonmenu-event))
(save-excursion
- (mouse-set-point event)
+ (when event
+ (mouse-set-point event))
(let ((fun (get-text-property (point) 'gnus-callback)))
(when fun
(funcall fun (get-text-property (point) 'gnus-data))))))
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 3661b6376df..e8b62a4133e 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -367,13 +367,16 @@ requires an understanding of Lisp expressions. Hopefully this will
change in a future release. For now, you can use the following
variables in the Lisp expression:
-group: The name of the group.
-unread: The number of unread articles in the group.
-method: The select method used.
-mailp: Whether it's a mail group or not.
-level: The level of the group.
-score: The score of the group.
-ticked: The number of ticked articles."
+`group': The name of the group.
+`unread': The number of unread articles in the group.
+`method': The select method used.
+`total': The total number of articles in the group.
+`mailp': Whether it's a mail group or not.
+`level': The level of the group.
+`score': The score of the group.
+`ticked': The number of ticked articles.
+`group-age': Time in seconds since the group was last read
+ (see info node `(gnus)Group Timestamp')."
:group 'gnus-group-visual
:type '(repeat (cons (sexp :tag "Form") face)))
(put 'gnus-group-highlight 'risky-local-variable t)
@@ -401,16 +404,8 @@ file.
It is also possible to change and add form fields, but currently that
requires an understanding of Lisp expressions. Hopefully this will
-change in a future release. For now, you can use the following
-variables in the Lisp expression:
-
-group: The name of the group.
-unread: The number of unread articles in the group.
-method: The select method used.
-mailp: Whether it's a mail group or not.
-level: The level of the group.
-score: The score of the group.
-ticked: The number of ticked articles."
+change in a future release. For now, you can use the same
+variables in the Lisp expression as in `gnus-group-highlight'."
:group 'gnus-group-icons
:type '(repeat (cons (sexp :tag "Form") file)))
(put 'gnus-group-icon-list 'risky-local-variable t)
@@ -1624,7 +1619,9 @@ Some value are bound so the form can use them."
(marked (gnus-info-marks info))
(env
(list
+ (cons 'group group)
(cons 'unread (if (numberp (car entry)) (car entry) 0))
+ (cons 'method method)
(cons 'total (if active (1+ (- (cdr active) (car active))) 0))
(cons 'mailp (apply
#'append
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index f3e08519c3e..21602f825c1 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1040,7 +1040,7 @@ Responsible for handling and, or, and parenthetical expressions.")
;; A bit of backward-compatibility slash convenience: if the
;; query string doesn't start with any known IMAP search
;; keyword, assume it is a "TEXT" search.
- (unless (or (looking-at "(")
+ (unless (or (eql ?\( (aref q-string 0))
(and (string-match "\\`[^[:blank:]]+" q-string)
(memql (intern-soft (downcase
(match-string 0 q-string)))
@@ -1514,6 +1514,7 @@ Namazu provides a little more information, for instance a score."
(when (re-search-forward
"^\\([0-9,]+\\.\\).*\\((score: \\([0-9]+\\)\\))\n\\([^ ]+\\)"
nil t)
+ (forward-line 1)
(list (match-string 4)
(match-string 3))))
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 84e53da297b..98664ac2b44 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -3212,8 +3212,8 @@ that that variable is buffer-local to the summary buffers."
(format "%s" (car method))
(format "%s:%s" (car method) (cadr method))))
(name-method (cons name method)))
- (when (and (not (member name-method gnus-server-method-cache))
- (not no-enter-cache)
+ (when (and (not no-enter-cache)
+ (not (member name-method gnus-server-method-cache))
(not (assoc (car name-method) gnus-server-method-cache)))
(push name-method gnus-server-method-cache))
name)))
@@ -3273,8 +3273,7 @@ that that variable is buffer-local to the summary buffers."
(gnus-server-to-method method))
((equal method gnus-select-method)
gnus-select-method)
- ((and (stringp (car method))
- group)
+ ((and group (stringp (car method)))
(gnus-server-extend-method group method))
((and method
(not group)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index d2a0092fde9..5a5dbcebc1e 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -394,9 +394,8 @@ If nil, don't insert any text in the body."
;; inspired by JoH-followup-to by Jochem Huhman <joh at gmx.de>
;; new suggestions by R. Weikusat <rw at another.de>
-(defvar message-cross-post-old-target nil
+(defvar-local message-cross-post-old-target nil
"Old target for cross-posts or follow-ups.")
-(make-variable-buffer-local 'message-cross-post-old-target)
(defcustom message-cross-post-default t
"When non-nil `message-cross-post-followup-to' will perform a crosspost.
@@ -2004,9 +2003,8 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'."
(User-Agent))
"Alist used for formatting headers.")
-(defvar message-options nil
+(defvar-local message-options nil
"Some saved answers when sending message.")
-(make-variable-buffer-local 'message-options)
(defvar message-send-mail-real-function nil
"Internal send mail function.")
@@ -4317,6 +4315,10 @@ It should typically alter the sending method in some way or other."
(when message-confirm-send
(or (y-or-n-p "Send message? ")
(keyboard-quit)))
+ (when (and (not (mml-secure-is-encrypted-p))
+ (mml-secure-is-encrypted-p 'anywhere)
+ (not (yes-or-no-p "This message has a <#secure tag, but is not going to be encrypted. Send anyway?")))
+ (error "Aborting sending"))
(message message-sending-message)
(let ((alist message-send-method-alist)
(success t)
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index 8d01d15ca01..d41c9dd0d9a 100644
--- a/lisp/gnus/mml-sec.el
+++ b/lisp/gnus/mml-sec.el
@@ -298,14 +298,17 @@ Use METHOD if given. Else use `mml-secure-method' or
(interactive)
(mml-secure-part "smime"))
-(defun mml-secure-is-encrypted-p ()
- "Check whether secure encrypt tag is present."
+(defun mml-secure-is-encrypted-p (&optional tag-present)
+ "Whether the current buffer contains a mail message that should be encrypted.
+If TAG-PRESENT, say whether the <#secure tag is present anywhere
+in the buffer."
(save-excursion
(goto-char (point-min))
- (re-search-forward
- (concat "^" (regexp-quote mail-header-separator) "\n"
- "<#secure[^>]+encrypt")
- nil t)))
+ (message-goto-body)
+ (if tag-present
+ (re-search-forward "<#secure[^>]+encrypt" nil t)
+ (skip-chars-forward "[ \t\n")
+ (looking-at "<#secure[^>]+encrypt"))))
(defun mml-secure-bcc-is-safe ()
"Check whether usage of Bcc is safe (or absent).
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index da905192467..b03a4404129 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -533,7 +533,7 @@ suitable file is found, return nil."
(format "\nMacro: %s"
(help--docstring-quote
(format-kbd-macro real-def))))
- (t "[Missing arglist. Please make a bug report.]")))
+ (t "[Missing arglist.]")))
;; Insert "`X", not "(\` X)", when documenting `X.
(use1 (replace-regexp-in-string
"\\`(\\\\=\\\\\\\\=` \\([^\n ]*\\))\\'"
@@ -839,7 +839,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
(t "")))
(if (and aliased (not (fboundp real-def)))
- (princ ",\nwhich is not defined. Please make a bug report.")
+ (princ ",\nwhich is not defined.")
(with-current-buffer standard-output
(save-excursion
(save-match-data
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 7043f12c9a3..79710a18073 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -62,33 +62,29 @@
["Move to Next Button" forward-button
:help "Move to the Next Button in the help buffer"]))
-(defvar help-xref-stack nil
+(defvar-local help-xref-stack nil
"A stack of ways by which to return to help buffers after following xrefs.
Used by `help-follow' and `help-xref-go-back'.
An element looks like (POSITION FUNCTION ARGS...).
To use the element, do (apply FUNCTION ARGS) then goto the point.")
(put 'help-xref-stack 'permanent-local t)
-(make-variable-buffer-local 'help-xref-stack)
-(defvar help-xref-forward-stack nil
+(defvar-local help-xref-forward-stack nil
"A stack used to navigate help forwards after using the back button.
Used by `help-follow' and `help-xref-go-forward'.
An element looks like (POSITION FUNCTION ARGS...).
To use the element, do (apply FUNCTION ARGS) then goto the point.")
(put 'help-xref-forward-stack 'permanent-local t)
-(make-variable-buffer-local 'help-xref-forward-stack)
-(defvar help-xref-stack-item nil
+(defvar-local help-xref-stack-item nil
"An item for `help-follow' in this buffer to push onto `help-xref-stack'.
The format is (FUNCTION ARGS...).")
(put 'help-xref-stack-item 'permanent-local t)
-(make-variable-buffer-local 'help-xref-stack-item)
-(defvar help-xref-stack-forward-item nil
+(defvar-local help-xref-stack-forward-item nil
"An item for `help-go-back' to push onto `help-xref-forward-stack'.
The format is (FUNCTION ARGS...).")
(put 'help-xref-stack-forward-item 'permanent-local t)
-(make-variable-buffer-local 'help-xref-stack-forward-item)
(setq-default help-xref-stack nil help-xref-stack-item nil)
(setq-default help-xref-forward-stack nil help-xref-forward-stack-item nil)
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 8d3cfe6de4f..85c3a53413d 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -209,12 +209,10 @@ as that will override any bit grouping options set here."
(defvar hl-line-face)
;; Variables where the original values are stored to.
-(defvar hexl-mode--old-var-vals ())
-(make-variable-buffer-local 'hexl-mode--old-var-vals)
+(defvar-local hexl-mode--old-var-vals ())
-(defvar hexl-ascii-overlay nil
+(defvar-local hexl-ascii-overlay nil
"Overlay used to highlight ASCII element corresponding to current point.")
-(make-variable-buffer-local 'hexl-ascii-overlay)
(defvar hexl-font-lock-keywords
'(("^\\([0-9a-f]+:\\)\\( \\).\\{39\\}\\( \\)\\(.+$\\)"
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index e214ab640de..0ad499b4dbf 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -381,13 +381,7 @@ Hi-lock: end is found. A mode is excluded if it's in the list
(warn "%s"
"Possible archaic use of (hi-lock-mode).
Use (global-hi-lock-mode 1) in .emacs to enable hi-lock for all buffers,
-use (hi-lock-mode 1) for individual buffers. For compatibility with Emacs
-versions before 22 use the following in your init file:
-
- (if (functionp 'global-hi-lock-mode)
- (global-hi-lock-mode 1)
- (hi-lock-mode 1))
-")))
+use (hi-lock-mode 1) for individual buffers.")))
(if hi-lock-mode
;; Turned on.
(progn
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index fb33cd92e35..89a1a9108c4 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -296,9 +296,7 @@ remove it from existing buffers."
;; These are for internal use.
(defvar hilit-chg-list nil)
-(defvar hilit-chg-string " ??")
-
-(make-variable-buffer-local 'hilit-chg-string)
+(defvar-local hilit-chg-string " ??")
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 84c53b16acf..6dc1c7ebc2b 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -303,7 +303,7 @@ This variable takes precedence over filtering, and even
in completion lists of the `ibuffer-jump-to-buffer' command."
:type 'boolean)
-(defcustom ibuffer-use-header-line (boundp 'header-line-format)
+(defcustom ibuffer-use-header-line t
"If non-nil, display a header line containing current filters."
:type 'boolean)
@@ -2129,16 +2129,13 @@ the value of point at the beginning of the line for that buffer."
(and ibuffer-buf
(not (eq ibuffer-buf buf))))))
-;; This function is a special case; it's not defined by
-;; `define-ibuffer-sorter'.
-(defun ibuffer-do-sort-by-recency ()
- "Sort the buffers by last view time."
- (interactive)
- (setq ibuffer-sorting-mode 'recency)
- (when (eq ibuffer-last-sorting-mode 'recency)
- (setq ibuffer-sorting-reversep (not ibuffer-sorting-reversep)))
- (ibuffer-update nil t)
- (setq ibuffer-last-sorting-mode 'recency))
+(define-ibuffer-sorter recency
+ "Sort the buffers by how recently they've been used."
+ (:description "recency")
+ (time-less-p (with-current-buffer (car b)
+ (or buffer-display-time 0))
+ (with-current-buffer (car a)
+ (or buffer-display-time 0))))
(defun ibuffer-update-format ()
(when (null ibuffer-current-format)
diff --git a/lisp/ido.el b/lisp/ido.el
index 89b6a62f5a8..3ed0d952f36 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1037,10 +1037,9 @@ Should never be set permanently.")
(defvar ido-completion-map nil
"Currently active keymap for Ido commands.")
-(defvar ido-eoinput 1
+(defvar-local ido-eoinput 1
"Point where minibuffer input ends and completion info begins.
Copied from `icomplete-eoinput'.")
-(make-variable-buffer-local 'ido-eoinput)
(defvar ido-common-match-string nil
"Stores the string that is common to all matching files.")
diff --git a/lisp/imenu.el b/lisp/imenu.el
index b5cd18a689d..2a557e04536 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -187,7 +187,7 @@ uses `imenu--generic-function')."
:version "24.4")
;;;###autoload
-(defvar imenu-generic-expression nil
+(defvar-local imenu-generic-expression nil
"List of definition matchers for creating an Imenu index.
Each element of this list should have the form
@@ -223,13 +223,10 @@ characters which normally have \"symbol\" syntax are considered to have
\"word\" syntax during matching.")
;;;###autoload(put 'imenu-generic-expression 'risky-local-variable t)
-;;;###autoload
-(make-variable-buffer-local 'imenu-generic-expression)
-
;;;; Hooks
;;;###autoload
-(defvar imenu-create-index-function 'imenu-default-create-index-function
+(defvar-local imenu-create-index-function 'imenu-default-create-index-function
"The function to use for creating an index alist of the current buffer.
It should be a function that takes no arguments and returns
@@ -237,11 +234,9 @@ an index alist of the current buffer. The function is
called within a `save-excursion'.
See `imenu--index-alist' for the format of the buffer index alist.")
-;;;###autoload
-(make-variable-buffer-local 'imenu-create-index-function)
;;;###autoload
-(defvar imenu-prev-index-position-function 'beginning-of-defun
+(defvar-local imenu-prev-index-position-function 'beginning-of-defun
"Function for finding the next index position.
If `imenu-create-index-function' is set to
@@ -251,21 +246,17 @@ file.
The function should leave point at the place to be connected to the
index and it should return nil when it doesn't find another index.")
-;;;###autoload
-(make-variable-buffer-local 'imenu-prev-index-position-function)
;;;###autoload
-(defvar imenu-extract-index-name-function nil
+(defvar-local imenu-extract-index-name-function nil
"Function for extracting the index item name, given a position.
This function is called after `imenu-prev-index-position-function'
finds a position for an index item, with point at that position.
It should return the name for that index item.")
-;;;###autoload
-(make-variable-buffer-local 'imenu-extract-index-name-function)
;;;###autoload
-(defvar imenu-name-lookup-function nil
+(defvar-local imenu-name-lookup-function nil
"Function to compare string with index item.
This function will be called with two strings, and should return
@@ -275,15 +266,11 @@ If nil, comparison is done with `string='.
Set this to some other function for more advanced comparisons,
such as \"begins with\" or \"name matches and number of
arguments match\".")
-;;;###autoload
-(make-variable-buffer-local 'imenu-name-lookup-function)
;;;###autoload
-(defvar imenu-default-goto-function 'imenu-default-goto-function
+(defvar-local imenu-default-goto-function 'imenu-default-goto-function
"The default function called when selecting an Imenu item.
The function in this variable is called when selecting a normal index-item.")
-;;;###autoload
-(make-variable-buffer-local 'imenu-default-goto-function)
(defun imenu--subalist-p (item)
@@ -554,7 +541,8 @@ Non-nil arguments are in recursive calls."
(setq alist nil res elt))))
res))
-(defvar imenu-syntax-alist nil
+;;;###autoload
+(defvar-local imenu-syntax-alist nil
"Alist of syntax table modifiers to use while in `imenu--generic-function'.
The car of the assocs may be either a character or a string and the
@@ -564,8 +552,6 @@ a string, all the characters in the string get the specified syntax.
This is typically used to give word syntax to characters which
normally have symbol syntax to simplify `imenu-expression'
and speed-up matching.")
-;;;###autoload
-(make-variable-buffer-local 'imenu-syntax-alist)
(defun imenu-default-create-index-function ()
"Default function to create an index alist of the current buffer.
@@ -607,14 +593,13 @@ The alternate method, which is the one most often used, is to call
;;; Generic index gathering function.
;;;
-(defvar imenu-case-fold-search t
+;;;###autoload
+(defvar-local imenu-case-fold-search t
"Defines whether `imenu--generic-function' should fold case when matching.
This variable should be set (only) by initialization code
for modes which use `imenu--generic-function'. If it is not set, but
`font-lock-defaults' is set, then font-lock's setting is used.")
-;;;###autoload
-(make-variable-buffer-local 'imenu-case-fold-search)
;; This function can be called with quitting disabled,
;; so it needs to be careful never to loop!
diff --git a/lisp/indent.el b/lisp/indent.el
index 5c5270b07c4..5cbf0acaa25 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -83,22 +83,23 @@ This variable has no effect unless `tab-always-indent' is `complete'."
(const :tag "Unless at a word, parenthesis, or punctuation." 'word-or-paren-or-punct))
:version "27.1")
+(defvar indent-line-ignored-functions '(indent-relative
+ indent-relative-maybe
+ indent-relative-first-indent-point)
+ "Values that are ignored by `indent-according-to-mode'.")
(defun indent-according-to-mode ()
"Indent line in proper way for current major mode.
Normally, this is done by calling the function specified by the
variable `indent-line-function'. However, if the value of that
-variable is `indent-relative' or `indent-relative-first-indent-point',
+variable is present in the `indent-line-ignored-functions' variable,
handle it specially (since those functions are used for tabbing);
in that case, indent by aligning to the previous non-blank line."
(interactive)
(save-restriction
(widen)
(syntax-propertize (line-end-position))
- (if (memq indent-line-function
- '(indent-relative
- indent-relative-maybe
- indent-relative-first-indent-point))
+ (if (memq indent-line-function indent-line-ignored-functions)
;; These functions are used for tabbing, but can't be used for
;; indenting. Replace with something ad-hoc.
(let ((column (save-excursion
@@ -249,7 +250,8 @@ It is activated by calling `indent-rigidly' interactively.")
If called interactively with no prefix argument, activate a
transient mode in which the indentation can be adjusted interactively
by typing \\<indent-rigidly-map>\\[indent-rigidly-left], \\[indent-rigidly-right], \\[indent-rigidly-left-to-tab-stop], or \\[indent-rigidly-right-to-tab-stop].
-Typing any other key exits this mode. If `transient-mark-mode' is enabled,
+Typing any other key exits this mode, and this key is then
+acted upon as normally. If `transient-mark-mode' is enabled,
exiting also deactivates the mark.
If called from a program, or interactively with prefix ARG,
diff --git a/lisp/info.el b/lisp/info.el
index dec93928b38..7f169f4b556 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1260,9 +1260,9 @@ is non-nil)."
(if Info-history
(let ((hist (car Info-history)))
(setq Info-history (cdr Info-history))
- (Info-find-node (nth 0 hist) (nth 1 hist) t)
+ (Info-find-node (nth 0 hist) (nth 1 hist) t t)
(goto-char (nth 2 hist)))
- (Info-find-node Info-current-file "Top" t)))))
+ (Info-find-node Info-current-file "Top" t t)))))
;; Cache the contents of the (virtual) dir file, once we have merged
;; it for the first time, so we can save time subsequently.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 82d64c5766b..b58ca8a6f70 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -320,7 +320,8 @@ matching the current search string is highlighted lazily
When multiple windows display the current buffer, the
highlighting is displayed only on the selected window, unless
this variable is set to the symbol `all-windows'."
- :type '(choice boolean
+ :type '(choice (const :tag "Off" nil)
+ (const :tag "On, and applied to current window" t)
(const :tag "On, and applied to all windows" all-windows))
:group 'lazy-highlight
:group 'isearch)
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index 877f2eb825a..8aebcd0ec4d 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -101,11 +101,10 @@ NOTE: Not used in MS-DOS and Windows systems."
(defvar jka-compr-use-shell
(not (memq system-type '(ms-dos windows-nt))))
-(defvar jka-compr-really-do-compress nil
+(defvar-local jka-compr-really-do-compress nil
"Non-nil in a buffer whose visited file was uncompressed on visiting it.
This means compress the data on writing the file, even if the
data appears to be compressed already.")
-(make-variable-buffer-local 'jka-compr-really-do-compress)
(put 'jka-compr-really-do-compress 'permanent-local t)
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index 9b5fdf24d2b..fa31cd5f9f8 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -972,8 +972,7 @@ Otherwise, [0-9A-F]."
;; Ethiopic word separator vs. ASCII space
;;
-(defvar ethio-prefer-ascii-space t)
-(make-variable-buffer-local 'ethio-prefer-ascii-space)
+(defvar-local ethio-prefer-ascii-space t)
(defun ethio-toggle-space nil
"Toggle ASCII space and Ethiopic separator for keyboard input."
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index c6fa497c213..9924d62774e 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -8415,9 +8415,6 @@ strings when pressed twice. See `double-map' for details.
(autoload 'dunnet "dunnet" "\
Switch to *dungeon* buffer and start game." t nil)
-(autoload 'dun-batch "dunnet" "\
-Start `dunnet' in batch mode." nil nil)
-
(register-definition-prefixes "dunnet" '("dun" "obj-special"))
;;;***
@@ -12945,7 +12942,7 @@ lines.
;;;### (autoloads nil "flymake" "progmodes/flymake.el" (0 0 0 0))
;;; Generated autoloads from progmodes/flymake.el
-(push (purecopy '(flymake 1 0 9)) package--builtin-versions)
+(push (purecopy '(flymake 1 1 1)) package--builtin-versions)
(autoload 'flymake-log "flymake" "\
Log, at level LEVEL, the message MSG formatted with ARGS.
@@ -15889,7 +15886,7 @@ Produce a texinfo buffer with sorted doc-strings from the DOC file.
\(fn FILE)" t nil)
-(register-definition-prefixes "help-fns" '("describe-" "help-"))
+(register-definition-prefixes "help-fns" '("describe-" "help-" "keymap-name-history"))
;;;***
@@ -16672,9 +16669,7 @@ non-selected window. Hl-Line mode uses the function
`hl-line-highlight' on `post-command-hook' in this case.
When `hl-line-sticky-flag' is nil, Hl-Line mode highlights the
-line about point in the selected window only. In this case, it
-uses the function `hl-line-maybe-unhighlight' in
-addition to `hl-line-highlight' on `post-command-hook'.
+line about point in the selected window only.
\(fn &optional ARG)" t nil)
@@ -16706,8 +16701,8 @@ If `global-hl-line-sticky-flag' is non-nil, Global Hl-Line mode
highlights the line about the current buffer's point in all live
windows.
-Global-Hl-Line mode uses the functions `global-hl-line-highlight'
-and `global-hl-line-maybe-unhighlight' on `post-command-hook'.
+Global-Hl-Line mode uses the function `global-hl-line-highlight'
+on `post-command-hook'.
\(fn &optional ARG)" t nil)
@@ -18387,7 +18382,9 @@ the environment variable INFOPATH is set.
Although this is a customizable variable, that is mainly for technical
reasons. Normally, you should either set INFOPATH or customize
-`Info-additional-directory-list', rather than changing this variable." :initialize 'custom-initialize-delay :type '(repeat directory))
+`Info-additional-directory-list', rather than changing this variable." :initialize #'custom-initialize-delay :type '(repeat directory))
+
+(custom-autoload 'Info-default-directory-list "info" t)
(autoload 'info-other-window "info" "\
Like `info' but show the Info buffer in another window.
@@ -19539,7 +19536,7 @@ Create lambda form for macro bound to symbol or key.
\(fn MAC &optional COUNTER FORMAT)" nil nil)
-(register-definition-prefixes "kmacro" '("kmacro-"))
+(register-definition-prefixes "kmacro" '("kdb-macro-redisplay" "kmacro-"))
;;;***
@@ -19548,8 +19545,8 @@ Create lambda form for macro bound to symbol or key.
;;; Generated autoloads from language/korea-util.el
(defvar default-korean-keyboard (purecopy (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" "")) "\
-The kind of Korean keyboard for Korean input method.
-\"\" for 2, \"3\" for 3.")
+The kind of Korean keyboard for Korean (Hangul) input method.
+\"\" for 2, \"3\" for 3, and \"3f\" for 3f.")
(autoload 'setup-korean-environment-internal "korea-util" nil nil nil)
@@ -21586,8 +21583,10 @@ Major mode for the mixal asm language.
;;;### (autoloads nil "mm-encode" "gnus/mm-encode.el" (0 0 0 0))
;;; Generated autoloads from gnus/mm-encode.el
-(autoload 'mm-default-file-encoding "mm-encode" "\
-Return a default encoding for FILE.
+(define-obsolete-function-alias 'mm-default-file-encoding #'mm-default-file-type "future")
+
+(autoload 'mm-default-file-type "mm-encode" "\
+Return a default content type for FILE.
\(fn FILE)" nil nil)
@@ -22746,7 +22745,7 @@ Generate NOV databases in all nnml directories.
;;;### (autoloads nil "nnoo" "gnus/nnoo.el" (0 0 0 0))
;;; Generated autoloads from gnus/nnoo.el
-(register-definition-prefixes "nnoo" '("deffoo" "defvoo" "nnoo-"))
+(register-definition-prefixes "nnoo" '("deffoo" "defvoo" "nnoo-" "noo--defalias"))
;;;***
@@ -24246,10 +24245,27 @@ with \"-q\").
Even if the value is nil, you can type \\[package-initialize] to
make installed packages available at any time, or you can
-call (package-initialize) in your init-file.")
+call (package-activate-all) in your init-file.")
(custom-autoload 'package-enable-at-startup "package" t)
+(defcustom package-user-dir (locate-user-emacs-file "elpa") "\
+Directory containing the user's Emacs Lisp packages.
+The directory name should be absolute.
+Apart from this directory, Emacs also looks for system-wide
+packages in `package-directory-list'." :type 'directory :initialize #'custom-initialize-delay :risky t :version "24.1")
+
+(custom-autoload 'package-user-dir "package" t)
+
+(defcustom package-directory-list (let (result) (dolist (f load-path) (and (stringp f) (equal (file-name-nondirectory f) "site-lisp") (push (expand-file-name "elpa" f) result))) (nreverse result)) "\
+List of additional directories containing Emacs Lisp packages.
+Each directory name should be absolute.
+
+These directories contain packages intended for system-wide; in
+contrast, `package-user-dir' contains packages for personal use." :type '(repeat directory) :initialize #'custom-initialize-delay :risky t :version "24.1")
+
+(custom-autoload 'package-directory-list "package" t)
+
(defvar package--activated nil "\
Non-nil if `package-activate-all' has been run.")
@@ -24271,9 +24287,9 @@ that code in the early init-file.
\(fn &optional NO-ACTIVATE)" t nil)
-(autoload 'package-activate-all "package" "\
+(defun package-activate-all nil "\
Activate all installed packages.
-The variable `package-load-list' controls which packages to load." nil nil)
+The variable `package-load-list' controls which packages to load." (setq package--activated t) (let* ((elc (concat package-quickstart-file "c")) (qs (if (file-readable-p elc) elc (if (file-readable-p package-quickstart-file) package-quickstart-file)))) (if qs (let ((load-source-file-function nil)) (unless (boundp 'package-activated-list) (setq package-activated-list nil)) (load qs nil 'nomessage)) (require 'package) (package--activate-all))))
(autoload 'package-import-keyring "package" "\
Import keys from FILE.
@@ -24370,6 +24386,11 @@ The return value is a string (or nil in case we can't find it)." nil nil)
(function-put 'package-get-version 'pure 't)
+(defcustom package-quickstart-file (locate-user-emacs-file "package-quickstart.el") "\
+Location of the file used to speed up activation of packages at startup." :type 'file :initialize #'custom-initialize-delay :version "27.1")
+
+(custom-autoload 'package-quickstart-file "package" t)
+
(register-definition-prefixes "package" '("bad-signature" "define-package" "describe-package-1" "package-"))
;;;***
@@ -24561,6 +24582,7 @@ PATTERN matches. PATTERN can take one of the forms:
If a SYMBOL is used twice in the same pattern
the second occurrence becomes an `eq'uality test.
(pred FUN) matches if FUN called on EXPVAL returns non-nil.
+ (pred (not FUN)) matches if FUN called on EXPVAL returns nil.
(app FUN PAT) matches if FUN called on EXPVAL matches PAT.
(guard BOOLEXP) matches if BOOLEXP evaluates to non-nil.
(let PAT EXPR) matches if EXPR matches PAT.
@@ -25851,7 +25873,7 @@ Open profile FILENAME.
;;;### (autoloads nil "project" "progmodes/project.el" (0 0 0 0))
;;; Generated autoloads from progmodes/project.el
-(push (purecopy '(project 0 5 3)) package--builtin-versions)
+(push (purecopy '(project 0 5 4)) package--builtin-versions)
(autoload 'project-current "project" "\
Return the project instance in DIRECTORY, defaulting to `default-directory'.
@@ -25956,9 +25978,13 @@ if one already exists." t nil)
(autoload 'project-async-shell-command "project" "\
Run `async-shell-command' in the current project's root directory." t nil)
+(function-put 'project-async-shell-command 'interactive-only 'async-shell-command)
+
(autoload 'project-shell-command "project" "\
Run `shell-command' in the current project's root directory." t nil)
+(function-put 'project-shell-command 'interactive-only 'shell-command)
+
(autoload 'project-search "project" "\
Search for REGEXP in all the files of the project.
Stops when a match is found.
@@ -25976,10 +26002,9 @@ loop using the command \\[fileloop-continue].
\(fn FROM TO)" t nil)
(autoload 'project-compile "project" "\
-Run `compile' in the project root.
-Arguments the same as in `compile'.
+Run `compile' in the project root." t nil)
-\(fn COMMAND &optional COMINT)" t nil)
+(function-put 'project-compile 'interactive-only 'compile)
(autoload 'project-switch-to-buffer "project" "\
Display buffer BUFFER-OR-NAME in the selected window.
@@ -26967,6 +26992,13 @@ When Recentf mode is enabled, a \"Open Recent\" submenu is
displayed in the \"File\" menu, containing a list of files that
were operated on recently, in the most-recently-used order.
+By default, only operations like opening a file, writing a buffer
+to a file, and killing a buffer is counted as \"operating\" on
+the file. If instead you want to prioritize files that appear in
+buffers you switch to a lot, you can say something like the following:
+
+ (add-hook 'buffer-list-update-hook 'recentf-track-opened-file)
+
\(fn &optional ARG)" t nil)
(register-definition-prefixes "recentf" '("recentf-"))
@@ -27347,7 +27379,7 @@ Remember the contents of the current clipboard.
Most useful for remembering things from other applications." t nil)
(autoload 'remember-diary-extract-entries "remember" "\
-Extract diary entries from the region." nil nil)
+Extract diary entries from the region based on `remember-diary-regexp'." nil nil)
(autoload 'remember-notes "remember" "\
Return the notes buffer, creating it if needed, and maybe switch to it.
@@ -27637,14 +27669,11 @@ Name of user's primary mail file.")
(custom-autoload 'rmail-file-name "rmail" t)
-(put 'rmail-spool-directory 'standard-value '((cond ((file-exists-p "/var/mail") "/var/mail/") ((file-exists-p "/var/spool/mail") "/var/spool/mail/") ((memq system-type '(hpux usg-unix-v)) "/usr/mail/") (t "/usr/spool/mail/"))))
-
-(defvar rmail-spool-directory (purecopy (cond ((file-exists-p "/var/mail") "/var/mail/") ((file-exists-p "/var/spool/mail") "/var/spool/mail/") ((memq system-type '(hpux usg-unix-v)) "/usr/mail/") (t "/usr/spool/mail/"))) "\
+(defcustom rmail-spool-directory (purecopy (cond ((file-exists-p "/var/mail") "/var/mail/") ((file-exists-p "/var/spool/mail") "/var/spool/mail/") ((memq system-type '(hpux usg-unix-v)) "/usr/mail/") (t "/usr/spool/mail/"))) "\
Name of directory used by system mailer for delivering new mail.
-Its name should end with a slash.")
+Its name should end with a slash." :initialize #'custom-initialize-delay :type 'directory :group 'rmail)
(custom-autoload 'rmail-spool-directory "rmail" t)
-(custom-initialize-delay 'rmail-spool-directory nil)
(autoload 'rmail-movemail-variant-p "rmail" "\
Return t if the current movemail variant is any of VARIANTS.
@@ -29076,7 +29105,9 @@ variable `feedmail-deduce-envelope-from'.")
(defvar mail-self-blind nil "\
Non-nil means insert Bcc to self in messages to be sent.
This is done when the message is initialized,
-so you can remove or alter the Bcc field to override the default.")
+so you can remove or alter the Bcc field to override the default.
+If you are using `message-mode' to compose messages, customize the
+variable `message-default-mail-headers' instead.")
(custom-autoload 'mail-self-blind "sendmail" t)
@@ -29104,14 +29135,18 @@ Line used to separate headers from text in messages being composed.")
(defvar mail-archive-file-name nil "\
Name of file to write all outgoing messages in, or nil for none.
This is normally an mbox file, but for backwards compatibility may also
-be a Babyl file.")
+be a Babyl file.
+If you are using `message-mode' to compose messages, customize the
+variable `message-default-mail-headers' instead.")
(custom-autoload 'mail-archive-file-name "sendmail" t)
(defvar mail-default-reply-to nil "\
Address to insert as default Reply-To field of outgoing messages.
If nil, it will be initialized from the REPLYTO environment variable
-when you first send mail.")
+when you first send mail.
+If you are using `message-mode' to compose messages, customize the
+variable `message-default-mail-headers' instead.")
(custom-autoload 'mail-default-reply-to "sendmail" t)
@@ -29198,7 +29233,9 @@ in `message-auto-save-directory'.")
(defvar mail-default-headers nil "\
A string containing header lines, to be inserted in outgoing messages.
It can contain newlines, and should end in one. It is inserted
-before you edit the message, so you can edit or delete the lines.")
+before you edit the message, so you can edit or delete the lines.
+If you are using `message-mode' to compose messages, customize the
+variable `message-default-mail-headers' instead.")
(custom-autoload 'mail-default-headers "sendmail" t)
@@ -29887,10 +29924,6 @@ DOM should be a parse tree as generated by
(autoload 'sieve-mode "sieve-mode" "\
Major mode for editing Sieve code.
-This is much like C mode except for the syntax of comments. Its keymap
-inherits from C mode's and it has the same variables for customizing
-indentation. It has its own abbrev table and its own syntax table.
-
Turning on Sieve mode runs `sieve-mode-hook'.
\(fn)" t nil)
@@ -31532,7 +31565,7 @@ Truncate STRING to LENGTH, replacing initial surplus with \"...\".
\(fn STRING LENGTH)" nil nil)
-(register-definition-prefixes "subr-x" '("and-let*" "hash-table-" "if-let*" "internal--" "replace-region-contents" "string-" "thread-" "when-let*"))
+(register-definition-prefixes "subr-x" '("and-let*" "hash-table-" "if-let*" "internal--" "named-let" "replace-region-contents" "string-" "thread-" "when-let*"))
;;;***
@@ -34174,7 +34207,7 @@ Add archive file name handler to `file-name-handler-alist'." (when tramp-archive
;;;### (autoloads nil "trampver" "net/trampver.el" (0 0 0 0))
;;; Generated autoloads from net/trampver.el
-(push (purecopy '(tramp 2 5 0)) package--builtin-versions)
+(push (purecopy '(tramp 2 5 1 -1)) package--builtin-versions)
(register-definition-prefixes "trampver" '("tramp-"))
@@ -34542,9 +34575,9 @@ The variable `unrmail-mbox-format' controls which mbox format to use.
(autoload 'unsafep "unsafep" "\
Return nil if evaluating FORM couldn't possibly do any harm.
Otherwise result is a reason why FORM is unsafe.
-UNSAFEP-VARS is a list of symbols with local bindings.
+VARS is a list of symbols with local bindings like `unsafep-vars'.
-\(fn FORM &optional UNSAFEP-VARS)" nil nil)
+\(fn FORM &optional VARS)" nil nil)
(register-definition-prefixes "unsafep" '("safe-functions" "unsafep-"))
@@ -38493,43 +38526,43 @@ Zone out, completely." t nil)
;;;;;; "leim/quail/Punct-b5.el" "leim/quail/Punct.el" "leim/quail/QJ-b5.el"
;;;;;; "leim/quail/QJ.el" "leim/quail/SW.el" "leim/quail/TONEPY.el"
;;;;;; "leim/quail/ZIRANMA.el" "leim/quail/ZOZY.el" "leim/quail/arabic.el"
-;;;;;; "leim/quail/compose.el" "leim/quail/croatian.el" "leim/quail/cyril-jis.el"
-;;;;;; "leim/quail/cyrillic.el" "leim/quail/czech.el" "leim/quail/georgian.el"
-;;;;;; "leim/quail/greek.el" "leim/quail/hanja-jis.el" "leim/quail/hanja.el"
-;;;;;; "leim/quail/hanja3.el" "leim/quail/hebrew.el" "leim/quail/ipa-praat.el"
-;;;;;; "leim/quail/latin-alt.el" "leim/quail/latin-ltx.el" "leim/quail/latin-post.el"
-;;;;;; "leim/quail/latin-pre.el" "leim/quail/persian.el" "leim/quail/programmer-dvorak.el"
-;;;;;; "leim/quail/py-punct.el" "leim/quail/pypunct-b5.el" "leim/quail/quick-b5.el"
-;;;;;; "leim/quail/quick-cns.el" "leim/quail/rfc1345.el" "leim/quail/sami.el"
-;;;;;; "leim/quail/sgml-input.el" "leim/quail/slovak.el" "leim/quail/symbol-ksc.el"
-;;;;;; "leim/quail/tamil-dvorak.el" "leim/quail/tsang-b5.el" "leim/quail/tsang-cns.el"
-;;;;;; "leim/quail/vntelex.el" "leim/quail/vnvni.el" "leim/quail/welsh.el"
-;;;;;; "loadup.el" "mail/blessmail.el" "mail/rmailedit.el" "mail/rmailkwd.el"
-;;;;;; "mail/rmailmm.el" "mail/rmailmsc.el" "mail/rmailsort.el"
-;;;;;; "mail/rmailsum.el" "mail/undigest.el" "menu-bar.el" "mh-e/mh-gnus.el"
-;;;;;; "mh-e/mh-loaddefs.el" "minibuffer.el" "mouse.el" "net/tramp-loaddefs.el"
-;;;;;; "newcomment.el" "obarray.el" "org/ob-core.el" "org/ob-lob.el"
-;;;;;; "org/ob-matlab.el" "org/ob-tangle.el" "org/ob.el" "org/ol-bbdb.el"
-;;;;;; "org/ol-irc.el" "org/ol.el" "org/org-archive.el" "org/org-attach.el"
-;;;;;; "org/org-clock.el" "org/org-colview.el" "org/org-compat.el"
-;;;;;; "org/org-datetree.el" "org/org-duration.el" "org/org-element.el"
-;;;;;; "org/org-feed.el" "org/org-footnote.el" "org/org-goto.el"
-;;;;;; "org/org-id.el" "org/org-indent.el" "org/org-install.el"
-;;;;;; "org/org-keys.el" "org/org-lint.el" "org/org-list.el" "org/org-macs.el"
-;;;;;; "org/org-mobile.el" "org/org-num.el" "org/org-plot.el" "org/org-refile.el"
-;;;;;; "org/org-table.el" "org/org-timer.el" "org/ox-ascii.el" "org/ox-beamer.el"
-;;;;;; "org/ox-html.el" "org/ox-icalendar.el" "org/ox-latex.el"
-;;;;;; "org/ox-md.el" "org/ox-odt.el" "org/ox-org.el" "org/ox-publish.el"
-;;;;;; "org/ox-texinfo.el" "org/ox.el" "progmodes/elisp-mode.el"
-;;;;;; "progmodes/prog-mode.el" "ps-mule.el" "register.el" "replace.el"
-;;;;;; "rfn-eshadow.el" "select.el" "simple.el" "startup.el" "subdirs.el"
-;;;;;; "subr.el" "tab-bar.el" "textmodes/fill.el" "textmodes/page.el"
-;;;;;; "textmodes/paragraphs.el" "textmodes/reftex-auc.el" "textmodes/reftex-cite.el"
-;;;;;; "textmodes/reftex-dcr.el" "textmodes/reftex-global.el" "textmodes/reftex-index.el"
-;;;;;; "textmodes/reftex-parse.el" "textmodes/reftex-ref.el" "textmodes/reftex-sel.el"
-;;;;;; "textmodes/reftex-toc.el" "textmodes/text-mode.el" "uniquify.el"
-;;;;;; "vc/ediff-hook.el" "vc/vc-hooks.el" "version.el" "widget.el"
-;;;;;; "window.el") (0 0 0 0))
+;;;;;; "leim/quail/cham.el" "leim/quail/compose.el" "leim/quail/croatian.el"
+;;;;;; "leim/quail/cyril-jis.el" "leim/quail/cyrillic.el" "leim/quail/czech.el"
+;;;;;; "leim/quail/georgian.el" "leim/quail/greek.el" "leim/quail/hanja-jis.el"
+;;;;;; "leim/quail/hanja.el" "leim/quail/hanja3.el" "leim/quail/hebrew.el"
+;;;;;; "leim/quail/ipa-praat.el" "leim/quail/latin-alt.el" "leim/quail/latin-ltx.el"
+;;;;;; "leim/quail/latin-post.el" "leim/quail/latin-pre.el" "leim/quail/persian.el"
+;;;;;; "leim/quail/programmer-dvorak.el" "leim/quail/py-punct.el"
+;;;;;; "leim/quail/pypunct-b5.el" "leim/quail/quick-b5.el" "leim/quail/quick-cns.el"
+;;;;;; "leim/quail/rfc1345.el" "leim/quail/sami.el" "leim/quail/sgml-input.el"
+;;;;;; "leim/quail/slovak.el" "leim/quail/symbol-ksc.el" "leim/quail/tamil-dvorak.el"
+;;;;;; "leim/quail/tsang-b5.el" "leim/quail/tsang-cns.el" "leim/quail/vntelex.el"
+;;;;;; "leim/quail/vnvni.el" "leim/quail/welsh.el" "loadup.el" "mail/blessmail.el"
+;;;;;; "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el"
+;;;;;; "mail/rmailmsc.el" "mail/rmailsort.el" "mail/rmailsum.el"
+;;;;;; "mail/undigest.el" "menu-bar.el" "mh-e/mh-gnus.el" "mh-e/mh-loaddefs.el"
+;;;;;; "minibuffer.el" "mouse.el" "net/tramp-loaddefs.el" "newcomment.el"
+;;;;;; "obarray.el" "org/ob-core.el" "org/ob-lob.el" "org/ob-matlab.el"
+;;;;;; "org/ob-tangle.el" "org/ob.el" "org/ol-bbdb.el" "org/ol-irc.el"
+;;;;;; "org/ol.el" "org/org-archive.el" "org/org-attach.el" "org/org-clock.el"
+;;;;;; "org/org-colview.el" "org/org-compat.el" "org/org-datetree.el"
+;;;;;; "org/org-duration.el" "org/org-element.el" "org/org-feed.el"
+;;;;;; "org/org-footnote.el" "org/org-goto.el" "org/org-id.el" "org/org-indent.el"
+;;;;;; "org/org-install.el" "org/org-keys.el" "org/org-lint.el"
+;;;;;; "org/org-list.el" "org/org-macs.el" "org/org-mobile.el" "org/org-num.el"
+;;;;;; "org/org-plot.el" "org/org-refile.el" "org/org-table.el"
+;;;;;; "org/org-timer.el" "org/ox-ascii.el" "org/ox-beamer.el" "org/ox-html.el"
+;;;;;; "org/ox-icalendar.el" "org/ox-latex.el" "org/ox-md.el" "org/ox-odt.el"
+;;;;;; "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el" "org/ox.el"
+;;;;;; "progmodes/elisp-mode.el" "progmodes/prog-mode.el" "ps-mule.el"
+;;;;;; "register.el" "replace.el" "rfn-eshadow.el" "select.el" "simple.el"
+;;;;;; "startup.el" "subdirs.el" "subr.el" "tab-bar.el" "textmodes/fill.el"
+;;;;;; "textmodes/page.el" "textmodes/paragraphs.el" "textmodes/reftex-auc.el"
+;;;;;; "textmodes/reftex-cite.el" "textmodes/reftex-dcr.el" "textmodes/reftex-global.el"
+;;;;;; "textmodes/reftex-index.el" "textmodes/reftex-parse.el" "textmodes/reftex-ref.el"
+;;;;;; "textmodes/reftex-sel.el" "textmodes/reftex-toc.el" "textmodes/text-mode.el"
+;;;;;; "uniquify.el" "vc/ediff-hook.el" "vc/vc-hooks.el" "version.el"
+;;;;;; "widget.el" "window.el") (0 0 0 0))
;;;***
diff --git a/lisp/leim/quail/hangul.el b/lisp/leim/quail/hangul.el
index 20762d36f07..ca1aae77be3 100644
--- a/lisp/leim/quail/hangul.el
+++ b/lisp/leim/quail/hangul.el
@@ -511,8 +511,7 @@ When a Korean input method is off, convert the following hangul character."
;; Text shown by describe-input-method. Set to a proper text by
;; hangul-input-method-activate.
-(defvar hangul-input-method-help-text nil)
-(make-variable-buffer-local 'hangul-input-method-help-text)
+(defvar-local hangul-input-method-help-text nil)
;;;###autoload
(defun hangul-input-method-activate (input-method func help-text &rest args)
diff --git a/lisp/leim/quail/japanese.el b/lisp/leim/quail/japanese.el
index d7249d286fb..a4ea550c265 100644
--- a/lisp/leim/quail/japanese.el
+++ b/lisp/leim/quail/japanese.el
@@ -113,8 +113,7 @@
(?h . "japanese")
(?q . ("japanese-ascii"))))
-(defvar quail-japanese-package-saved nil)
-(make-variable-buffer-local 'quail-japanese-package-saved)
+(defvar-local quail-japanese-package-saved nil)
(put 'quail-japanese-package-saved 'permanent-local t)
(defun quail-japanese-switch-package (key idx)
diff --git a/lisp/linum.el b/lisp/linum.el
index 824f016271d..f9761d22c6e 100644
--- a/lisp/linum.el
+++ b/lisp/linum.el
@@ -34,13 +34,11 @@
(defconst linum-version "0.9x")
(make-obsolete-variable 'linum-version nil "28.1")
-(defvar linum-overlays nil "Overlays used in this buffer.")
-(defvar linum-available nil "Overlays available for reuse.")
+(defvar-local linum-overlays nil "Overlays used in this buffer.")
+(defvar-local linum-available nil "Overlays available for reuse.")
(defvar linum-before-numbering-hook nil
"Functions run in each buffer before line numbering starts.")
-(mapc #'make-variable-buffer-local '(linum-overlays linum-available))
-
(defgroup linum nil
"Show line numbers in the left margin."
:group 'convenience)
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 7f99ecdcf2c..f53e6e768f8 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -930,10 +930,11 @@ a negative argument means to delete and move backward."
(unless (numberp count) (setq count 1))
(let (del-msg
(backward (< count 0)))
- (while (and (/= count 0)
- ;; Don't waste time if we are at the beginning
- ;; and trying to go backward.
- (not (and backward (bobp))))
+ (while (/= count 0)
+ ;; Don't waste time counting down without doing anything if we
+ ;; are at the beginning and trying to go backward.
+ (if (and backward (bobp))
+ (setq count -1))
(rmail-summary-goto-msg)
(with-current-buffer rmail-buffer
(setq del-msg rmail-current-message)
diff --git a/lisp/man.el b/lisp/man.el
index ca50b3a2fa3..1fded38e72d 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -97,8 +97,6 @@
:group 'external
:group 'help)
-(defvar Man-notify)
-
(defcustom Man-filter-list nil
"Manpage cleaning filter command phrases.
This variable contains a list of the following form:
@@ -149,8 +147,7 @@ the manpage buffer."
(ansi-color-make-color-map))
"The value used here for `ansi-color-map'.")
-;; Use the value of the obsolete user option Man-notify, if set.
-(defcustom Man-notify-method (if (boundp 'Man-notify) Man-notify 'friendly)
+(defcustom Man-notify-method 'friendly
"Selects the behavior when manpage is ready.
This variable may have one of the following values, where (sf) means
that the frames are switched, so the manpage is displayed in the frame
@@ -399,22 +396,15 @@ Otherwise, the value is whatever the function
;; other variables and keymap initializations
-(defvar Man-original-frame)
-(make-variable-buffer-local 'Man-original-frame)
-(defvar Man-arguments)
-(make-variable-buffer-local 'Man-arguments)
+(defvar-local Man-original-frame nil)
+(defvar-local Man-arguments nil)
(put 'Man-arguments 'permanent-local t)
-(defvar Man--sections nil)
-(make-variable-buffer-local 'Man--sections)
-(defvar Man--refpages nil)
-(make-variable-buffer-local 'Man--refpages)
-(defvar Man-page-list nil)
-(make-variable-buffer-local 'Man-page-list)
-(defvar Man-current-page 0)
-(make-variable-buffer-local 'Man-current-page)
-(defvar Man-page-mode-string "1 of 1")
-(make-variable-buffer-local 'Man-page-mode-string)
+(defvar-local Man--sections nil)
+(defvar-local Man--refpages nil)
+(defvar-local Man-page-list nil)
+(defvar-local Man-current-page 0)
+(defvar-local Man-page-mode-string "1 of 1")
(defconst Man-sysv-sed-script "\
/\b/ { s/_\b//g
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 9185c2a0645..2eb7fbaa20c 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -3412,6 +3412,7 @@ sequence."
;;; Faces (:group 'mh-faces + group where faces described)
(if (boundp 'facemenu-unlisted-faces)
+ ;; This variable was removed in Emacs 22.1.
(add-to-list 'facemenu-unlisted-faces "^mh-"))
;; To add a new face:
diff --git a/lisp/mouse-copy.el b/lisp/mouse-copy.el
index e48722ef944..8155c9dff30 100644
--- a/lisp/mouse-copy.el
+++ b/lisp/mouse-copy.el
@@ -55,9 +55,6 @@
;; <twurgler@goodyear.com> is similar to mouse-drag-throw, but
;; doesn't pass clicks through.
;;
-;; These functions have been tested in emacs version 19.30,
-;; and this package has run in the past on 19.25-19.29.
-;;
;; Originally mouse-copy was part of a larger package.
;; As of 11 July 96 the scrolling functions were split out
;; in preparation for incorporation into (the future) emacs-19.32.
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el
index 907ef061594..b2960a4ccd3 100644
--- a/lisp/mouse-drag.el
+++ b/lisp/mouse-drag.el
@@ -70,9 +70,6 @@
;; <twurgler@goodyear.com> is similar to mouse-drag-throw, but
;; doesn't pass clicks through.
;;
-;; These functions have been tested in emacs version 19.30,
-;; and this package has run in the past on 19.25-19.29.
-;;
;; Originally mouse-drag was part of a larger package.
;; As of 11 July 96 the scrolling functions were split out
;; in preparation for incorporation into (the future) emacs-19.32.
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 195ddc6bbac..a9de35c814f 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -2171,6 +2171,23 @@ has been handled by this function."
(when eobp
(goto-char (point-max))))))
+;;;###autoload
+(defun dbus-monitor (&optional bus)
+ "Invoke `dbus-register-monitor' interactively, and switch to the buffer.
+BUS is either a Lisp keyword, `:system' or `:session', or a
+string denoting the bus address. The value nil defaults to `:session'."
+ (interactive
+ (list
+ (let ((input
+ (completing-read
+ (format-prompt "Enter bus symbol or name" :session)
+ '(:system :session) nil nil nil nil :session)))
+ (if (and (stringp input)
+ (string-match-p "^\\(:session\\|:system\\)$" input))
+ (intern input) input))))
+ (dbus-register-monitor (or bus :session))
+ (switch-to-buffer (get-buffer-create "*D-Bus Monitor*")))
+
(defun dbus-handle-bus-disconnect ()
"React to a bus disconnection.
BUS is the bus that disconnected. This routine unregisters all
diff --git a/lisp/net/dictionary-connection.el b/lisp/net/dictionary-connection.el
index d88c0b48f93..8ad4fe4e637 100644
--- a/lisp/net/dictionary-connection.el
+++ b/lisp/net/dictionary-connection.el
@@ -1,34 +1,36 @@
;;; dictionary-connection.el --- TCP-based client connection for dictionary -*- lexical-binding:t -*-
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
;; Author: Torsten Hilbrich <torsten.hilbrich@gmx.net>
;; Keywords: network
-;; This file is free software; you can redistribute it and/or modify
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
-;; This file is distributed in the hope that it will be useful,
+;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; dictionary-connection allows to handle TCP-based connections in
-;; client mode where text-based information are exchanged. There is
+;; client mode where text-based information are exchanged. There is
;; special support for handling CR LF (and the usual CR LF . CR LF
;; terminater).
;;; Code:
(defsubst dictionary-connection-p (connection)
- "Returns non-nil if CONNECTION is a connection object."
+ "Return non-nil if CONNECTION is a connection object."
(get connection 'connection))
(defsubst dictionary-connection-read-point (connection)
@@ -147,8 +149,7 @@ nil: argument is no connection object
(defun dictionary-connection-read-to-point (connection)
"Read from CONNECTION until an end of entry is encountered.
-End of entry is a decimal point found on a line by itself.
-"
+End of entry is a decimal point found on a line by itself."
(dictionary-connection-read connection "\015?\012[.]\015?\012"))
(provide 'dictionary-connection)
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index f8733429e94..ccc24cbf303 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -1,22 +1,24 @@
;;; dictionary.el --- Client for rfc2229 dictionary servers -*- lexical-binding:t -*-
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
;; Author: Torsten Hilbrich <torsten.hilbrich@gmx.net>
;; Keywords: interface, dictionary
-;; This file is free software; you can redistribute it and/or modify
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
-;; This file is distributed in the hope that it will be useful,
+;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@@ -46,7 +48,7 @@
(defun dictionary-set-server-var (name value)
"Customize helper for setting variable NAME to VALUE.
The helper is used by customize to check for an active connection
-when setting a variable. The user has then the choice to close
+when setting a variable. The user has then the choice to close
the existing connection."
(if (and (boundp 'dictionary-connection)
dictionary-connection
@@ -73,8 +75,7 @@ You can specify here:
- Automatic: First try localhost, then dict.org after confirmation
- localhost: Only use localhost
- dict.org: Only use dict.org
-- User-defined: You can specify your own server here
-"
+- User-defined: You can specify your own server here"
:group 'dictionary
:set 'dictionary-set-server-var
:type '(choice (const :tag "Automatic" nil)
@@ -86,7 +87,7 @@ You can specify here:
(defcustom dictionary-port
2628
"The port of the dictionary server.
- This port is propably always 2628 so there should be no need to modify it."
+This port is propably always 2628 so there should be no need to modify it."
:group 'dictionary
:set 'dictionary-set-server-var
:type 'number
@@ -102,8 +103,8 @@ You can specify here:
(defcustom dictionary-default-dictionary
"*"
"The dictionary which is used for searching definitions and matching.
- * and ! have a special meaning, * search all dictionaries, ! search until
- one dictionary yields matches."
+* and ! have a special meaning, * search all dictionaries, ! search until
+one dictionary yields matches."
:group 'dictionary
:type 'string
:version "28.1")
@@ -144,8 +145,7 @@ by the choice value:
- User choice
Here you can enter any matching algorithm supported by your
- dictionary server.
-"
+ dictionary server."
:group 'dictionary
:type '(choice (const :tag "Exact match" "exact")
(const :tag "Similiar sounding" "soundex")
@@ -177,7 +177,7 @@ by the choice value:
(defcustom dictionary-proxy-server
"proxy"
- "The name of the HTTP proxy to use when dictionary-use-http-proxy is set."
+ "The name of the HTTP proxy to use when `dictionary-use-http-proxy' is set."
:group 'dictionary-proxy
:set 'dictionary-set-server-var
:type 'string
@@ -185,7 +185,7 @@ by the choice value:
(defcustom dictionary-proxy-port
3128
- "The port of the proxy server, used only when dictionary-use-http-proxy is set."
+ "The port of the proxy server, used only when `dictionary-use-http-proxy' is set."
:group 'dictionary-proxy
:set 'dictionary-set-server-var
:type 'number
@@ -200,14 +200,14 @@ by the choice value:
(defcustom dictionary-description-open-delimiter
""
- "The delimiter to display in front of the dictionaries description"
+ "The delimiter to display in front of the dictionaries description."
:group 'dictionary
:type 'string
:version "28.1")
(defcustom dictionary-description-close-delimiter
""
- "The delimiter to display after of the dictionaries description"
+ "The delimiter to display after of the dictionaries description."
:group 'dictionary
:type 'string
:version "28.1")
@@ -283,27 +283,27 @@ is utf-8"
(defvar dictionary-window-configuration
nil
- "The window configuration to be restored upon closing the buffer")
+ "The window configuration to be restored upon closing the buffer.")
(defvar dictionary-selected-window
nil
- "The currently selected window")
+ "The currently selected window.")
(defvar dictionary-position-stack
nil
- "The history buffer for point and window position")
+ "The history buffer for point and window position.")
(defvar dictionary-data-stack
nil
- "The history buffer for functions and arguments")
+ "The history buffer for functions and arguments.")
(defvar dictionary-positions
nil
- "The current positions")
+ "The current positions.")
(defvar dictionary-current-data
nil
- "The item that will be placed on stack next time")
+ "The item that will be placed on stack next time.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Global variables
@@ -330,11 +330,11 @@ is utf-8"
(defvar dictionary-connection
nil
- "The current network connection")
+ "The current network connection.")
(defvar dictionary-instances
0
- "The number of open dictionary buffers")
+ "The number of open dictionary buffers.")
(defvar dictionary-marker
nil
@@ -344,11 +344,11 @@ is utf-8"
(condition-case nil
(x-display-color-p)
(error nil))
- "Determines if the Emacs has support to display color")
+ "Determines if the Emacs has support to display color.")
(defvar dictionary-word-history
'()
- "History list of searched word")
+ "History list of searched word.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Basic function providing startup actions
@@ -356,25 +356,25 @@ is utf-8"
;;;###autoload
(defun dictionary-mode ()
+ ;; FIXME: Use define-derived-mode.
"Mode for searching a dictionary.
This is a mode for searching a dictionary server implementing the
protocol defined in RFC 2229.
This is a quick reference to this mode describing the default key bindings:
+\\<dictionary-mode-map>
+* \\[dictionary-close] close the dictionary buffer
+* \\[dictionary-help] display this help information
+* \\[dictionary-search] ask for a new word to search
+* \\[dictionary-lookup-definition] search the word at point
+* \\[forward-button] or TAB place point to the next link
+* \\[backward-button] or S-TAB place point to the prev link
-* q close the dictionary buffer
-* h display this help information
-* s ask for a new word to search
-* d search the word at point
-* n or Tab place point to the next link
-* p or S-Tab place point to the prev link
+* \\[dictionary-match-words] ask for a pattern and list all matching words.
+* \\[dictionary-select-dictionary] select the default dictionary
+* \\[dictionary-select-strategy] select the default search strategy
-* m ask for a pattern and list all matching words.
-* D select the default dictionary
-* M select the default search strategy
-
-* Return or Button2 visit that link
-"
+* RET or <mouse-2> visit that link"
(unless (eq major-mode 'dictionary-mode)
(cl-incf dictionary-instances))
@@ -399,7 +399,7 @@ This is a quick reference to this mode describing the default key bindings:
;;;###autoload
(defun dictionary ()
- "Create a new dictonary buffer and install dictionary-mode."
+ "Create a new dictonary buffer and install `dictionary-mode'."
(interactive)
(let ((buffer (or (and dictionary-use-single-buffer
(get-buffer "*Dictionary*"))
@@ -498,13 +498,13 @@ The connection takes the proxy setting in customization group
(dictionary-open-server server)
(error
(if (y-or-n-p
- (format "Failed to open server %s, continue with dict.org?"
+ (format "Failed to open server %s, continue with dict.org? "
server))
(dictionary-open-server "dict.org")
(error "Failed automatic server selection, please customize dictionary-server"))))))))
(defun dictionary-mode-p ()
- "Return non-nil if current buffer has dictionary-mode."
+ "Return non-nil if current buffer has `dictionary-mode'."
(eq major-mode 'dictionary-mode))
(defun dictionary-ensure-buffer ()
@@ -535,7 +535,7 @@ The connection takes the proxy setting in customization group
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun dictionary-send-command (string)
- "Send the command `string' to the network connection."
+ "Send the command STRING to the network connection."
(dictionary-check-connection)
;;;; #####
(dictionary-connection-send-crlf dictionary-connection string))
@@ -566,7 +566,7 @@ This function knows about the special meaning of quotes (\")"
(nreverse list)))
(defun dictionary-read-reply-and-split ()
- "Reads the reply, splits it into words and returns it."
+ "Read the reply, split it into words and return it."
(let ((answer (make-symbol "reply-data"))
(reply (dictionary-read-reply)))
(let ((reply-list (dictionary-split-string reply)))
@@ -589,7 +589,7 @@ The answer is delimited by a decimal point (.) on a line by itself."
answer))
(defun dictionary-check-reply (reply code)
- "Extract the reply code from REPLY and checks against CODE."
+ "Extract the reply code from REPLY and check against CODE."
(let ((number (dictionary-reply-code reply)))
(and (numberp number)
(= number code))))
@@ -623,7 +623,7 @@ The answer is delimited by a decimal point (.) on a line by itself."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun dictionary-check-initial-reply ()
- "Reads the first reply from server and checks it."
+ "Read the first reply from server and check it."
(let ((reply (dictionary-read-reply-and-split)))
(unless (dictionary-check-reply reply 220)
(dictionary-connection-close dictionary-connection)
@@ -631,9 +631,9 @@ The answer is delimited by a decimal point (.) on a line by itself."
;; Store the current state
(defun dictionary-store-state (function data)
- "Stores the current state of operation for later restore.
-The current state consist of a tuple of FUNCTION and DATA. This
-is basically an implementation of a history to return to a
+ "Store the current state of operation for later restore.
+The current state consist of a tuple of FUNCTION and DATA.
+This is basically an implementation of a history to return to a
previous state."
(if dictionary-current-data
(progn
@@ -645,7 +645,7 @@ previous state."
(cons function data)))
(defun dictionary-store-positions ()
- "Stores the current positions for later restore."
+ "Store the current positions for later restore."
(setq dictionary-positions (cons (point) (window-start))))
@@ -664,7 +664,7 @@ previous state."
;; The normal search
(defun dictionary-new-search (args &optional all)
- "Saves the current state and starts a new search based on ARGS.
+ "Save the current state and start a new search based on ARGS.
The parameter ARGS is a cons cell where car is the word to search
and cdr is the dictionary where to search the word in."
(interactive)
@@ -680,15 +680,14 @@ and cdr is the dictionary where to search the word in."
(list word dictionary 'dictionary-display-search-result))))
(defun dictionary-new-search-internal (word dictionary function)
- "Starts a new search for WORD in DICTIONARY after preparing the buffer.
-FUNCTION is the callback which is called for each search result.
-"
+ "Start a new search for WORD in DICTIONARY after preparing the buffer.
+FUNCTION is the callback which is called for each search result."
(dictionary-pre-buffer)
(dictionary-do-search word dictionary function))
(defun dictionary-do-search (word dictionary function &optional nomatching)
- "Searches WORD in DICTIONARY and calls FUNCTION for each result.
-The parameter NOMATCHING controls whether to suppress the display
+ "Search for WORD in DICTIONARY and call FUNCTION for each result.
+Optional argument NOMATCHING controls whether to suppress the display
of matching words."
(message "Searching for %s in %s" word dictionary)
@@ -712,7 +711,7 @@ of matching words."
'dictionary-display-only-match-result)
(dictionary-post-buffer)))
(if (dictionary-check-reply reply 550)
- (error "Dictionary \"%s\" is unknown, please select an existing one."
+ (error "Dictionary \"%s\" is unknown, please select an existing one"
dictionary)
(unless (dictionary-check-reply reply 150)
(error "Unknown server answer: %s" (dictionary-reply reply)))
@@ -776,7 +775,7 @@ of matching words."
(setq buffer-read-only t))
(defun dictionary-display-search-result (reply)
- "This function starts displaying the result in REPLY."
+ "Start displaying the result in REPLY."
(let ((number (nth 1 (dictionary-reply-list reply))))
(insert number (if (equal number "1")
@@ -810,8 +809,7 @@ The DICTIONARY is only used for decoding the bytes to display the DESCRIPTION."
(defun dictionary-display-word-definition (reply word dictionary)
"Insert the definition in REPLY for the current WORD from DICTIONARY.
It will replace links which are found in the REPLY and replace
-them with buttons to perform a a new search.
-"
+them with buttons to perform a a new search."
(let ((start (point)))
(insert (dictionary-decode-charset reply dictionary))
(insert "\n\n")
@@ -931,7 +929,7 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
(message "Dictionary %s has been selected" dictionary))))
(defun dictionary-special-dictionary (name)
- "Checks whether the special * or ! dictionary are seen in NAME."
+ "Check whether the special * or ! dictionary are seen in NAME."
(or (equal name "*")
(equal name "!")))
@@ -1011,7 +1009,7 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
(insert "\n")))))
(defun dictionary-set-strategy (strategy &rest ignored)
- "Select this STRATEGY as new default"
+ "Select this STRATEGY as new default."
(setq dictionary-default-strategy strategy)
(dictionary-restore-state)
(message "Strategy %s has been selected" strategy))
@@ -1234,7 +1232,7 @@ allows editing it."
(defcustom dictionary-tooltip-dictionary
nil
- "This dictionary to lookup words for tooltips"
+ "This dictionary to lookup words for tooltips."
:group 'dictionary
:type '(choice (const :tag "None" nil) string)
:version "28.1")
@@ -1296,8 +1294,7 @@ It is normally internally called with 1 to enable support for the
tooltip mode. The hook function will check the value of the
variable dictionary-tooltip-mode to decide if some action must be
taken. When disabling the tooltip mode the value of this variable
-will be set to nil.
-"
+will be set to nil."
(interactive)
(tooltip-mode on)
(if on
@@ -1309,10 +1306,8 @@ will be set to nil.
"Display tooltips for the current word.
This function can be used to enable or disable the tooltip mode
-for the current buffer (based on ARG). If global-tooltip-mode is
-active it will overwrite that mode for the current buffer.
-"
-
+for the current buffer (based on ARG). If global-tooltip-mode is
+active it will overwrite that mode for the current buffer."
(interactive "P")
(require 'tooltip)
(let ((on (if arg
@@ -1335,8 +1330,7 @@ Internally it provides a default for the dictionary-tooltip-mode.
It can be overwritten for each buffer using dictionary-tooltip-mode.
Note: (global-dictionary-tooltip-mode 0) will not disable the mode
-any buffer where (dictionary-tooltip-mode 1) has been called.
-"
+any buffer where (dictionary-tooltip-mode 1) has been called."
(interactive "P")
(require 'tooltip)
(let ((on (if arg (> (prefix-numeric-value arg) 0)
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
index 455673b5e9f..b95cd0febcd 100644
--- a/lisp/net/mailcap.el
+++ b/lisp/net/mailcap.el
@@ -842,11 +842,11 @@ If NO-DECODE is non-nil, don't decode STRING."
;; ~/.mailcap file, then we filter out the system entries
;; and see whether we have anything left.
(when mailcap-prefer-mailcap-viewers
- (when-let ((user-entry
- (seq-find (lambda (elem)
- (eq (cdr (assq 'source elem)) 'user))
- passed)))
- (setq passed (list user-entry))))
+ (when-let ((user-entries
+ (seq-filter (lambda (elem)
+ (eq (cdr (assq 'source elem)) 'user))
+ passed)))
+ (setq passed user-entries)))
(setq viewer (car passed))))
(when (and (stringp (cdr (assq 'viewer viewer)))
passed)
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 73dffe1d64f..6ec4d1fed38 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -197,13 +197,13 @@ It is used for TCP/IP devices."
tramp-adb-method)))
;;;###tramp-autoload
-(defun tramp-adb-file-name-handler (operation &rest arguments)
+(defun tramp-adb-file-name-handler (operation &rest args)
"Invoke the ADB handler for OPERATION.
First arg specifies the OPERATION, second arg is a list of
-ARGUMENTS to pass to the OPERATION."
+arguments to pass to the OPERATION."
(if-let ((fn (assoc operation tramp-adb-file-name-handler-alist)))
- (save-match-data (apply (cdr fn) arguments))
- (tramp-run-real-handler operation arguments)))
+ (save-match-data (apply (cdr fn) args))
+ (tramp-run-real-handler operation args)))
;;;###tramp-autoload
(tramp--with-startup
@@ -305,9 +305,7 @@ ARGUMENTS to pass to the OPERATION."
(directory &optional full match nosort id-format count)
"Like `directory-files-and-attributes' for Tramp files."
(unless (file-exists-p directory)
- (tramp-error
- (tramp-dissect-file-name directory) tramp-file-missing
- "No such file or directory" directory))
+ (tramp-compat-file-missing (tramp-dissect-file-name directory) directory))
(when (file-directory-p directory)
(with-parsed-tramp-file-name (expand-file-name directory) nil
(copy-tree
@@ -435,7 +433,7 @@ Emacs dired can't find files."
(setq dir (expand-file-name dir))
(with-parsed-tramp-file-name dir nil
(when (and (null parents) (file-exists-p dir))
- (tramp-error v 'file-already-exists "Directory already exists %s" dir))
+ (tramp-error v 'file-already-exists dir))
(when parents
(let ((par (expand-file-name ".." dir)))
(unless (file-directory-p par)
@@ -498,9 +496,7 @@ Emacs dired can't find files."
"Like `file-local-copy' for Tramp files."
(with-parsed-tramp-file-name filename nil
(unless (file-exists-p (file-truename filename))
- (tramp-error
- v tramp-file-missing
- "Cannot make local copy of non-existing file `%s'" filename))
+ (tramp-compat-file-missing v filename))
(let ((tmpfile (tramp-compat-make-temp-file filename)))
(with-tramp-progress-reporter
v 3 (format "Fetching %s to tmp file %s" filename tmpfile)
@@ -642,9 +638,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(jka-compr-inhibit t))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(unless (file-exists-p filename)
- (tramp-error
- v tramp-file-missing
- "Copying file" "No such file or directory" filename))
+ (tramp-compat-file-missing v filename))
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error v 'file-already-exists newname))
(when (and (file-directory-p newname)
@@ -726,9 +720,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(jka-compr-inhibit t))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(unless (file-exists-p filename)
- (tramp-error
- v tramp-file-missing
- "Renaming file" "No such file or directory" filename))
+ (tramp-compat-file-missing v filename))
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error v 'file-already-exists newname))
(when (and (file-directory-p newname)
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 87e5378e807..27461e6917c 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -41,6 +41,7 @@
(require 'shell)
(require 'subr-x)
+(declare-function tramp-error "tramp")
;; `temporary-file-directory' as function is introduced with Emacs 26.1.
(declare-function tramp-handle-temporary-file-directory "tramp")
(declare-function tramp-tramp-file-p "tramp")
@@ -178,6 +179,12 @@ This is a string of ten letters or dashes as in ls -l."
(if (get 'file-missing 'error-conditions) 'file-missing 'file-error)
"The error symbol for the `file-missing' error.")
+(defsubst tramp-compat-file-missing (vec file)
+ "Emit the `file-missing' error."
+ (if (get 'file-missing 'error-conditions)
+ (tramp-error vec tramp-file-missing file)
+ (tramp-error vec tramp-file-missing "No such file or directory: %s" file)))
+
;; `file-local-name', `file-name-quoted-p', `file-name-quote' and
;; `file-name-unquote' are introduced in Emacs 26.1.
(defalias 'tramp-compat-file-local-name
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el
index dfe54623dbc..f8de7085e25 100644
--- a/lisp/net/tramp-crypt.el
+++ b/lisp/net/tramp-crypt.el
@@ -249,7 +249,7 @@ arguments to pass to the OPERATION."
;;;###tramp-autoload
(defun tramp-crypt-file-name-handler (operation &rest args)
"Invoke the crypted remote file related OPERATION.
-First arg specifies the OPERATION, second arg ARGS is a list of
+First arg specifies the OPERATION, second arg is a list of
arguments to pass to the OPERATION."
(if-let ((filename
(apply #'tramp-crypt-file-name-for-operation operation args))
@@ -568,9 +568,7 @@ absolute file names."
(with-parsed-tramp-file-name (if t1 filename newname) nil
(unless (file-exists-p filename)
- (tramp-error
- v tramp-file-missing
- "%s file" msg-operation "No such file or directory" filename))
+ (tramp-compat-file-missing v filename))
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error v 'file-already-exists newname))
(when (and (file-directory-p newname)
@@ -672,9 +670,7 @@ absolute file names."
(directory &optional full match nosort count)
"Like `directory-files' for Tramp files."
(unless (file-exists-p directory)
- (tramp-error
- (tramp-dissect-file-name directory) tramp-file-missing
- "No such file or directory" directory))
+ (tramp-compat-file-missing (tramp-dissect-file-name directory) directory))
(when (file-directory-p directory)
(setq directory (file-name-as-directory (expand-file-name directory)))
(let* (tramp-crypt-enabled
@@ -781,7 +777,7 @@ WILDCARD is not supported."
"Like `make-directory' for Tramp files."
(with-parsed-tramp-file-name (expand-file-name dir) nil
(when (and (null parents) (file-exists-p dir))
- (tramp-error v 'file-already-exists "Directory already exists %s" dir))
+ (tramp-error v 'file-already-exists dir))
(let (tramp-crypt-enabled)
(make-directory (tramp-crypt-encrypt-file-name dir) parents))
;; When PARENTS is non-nil, DIR could be a chain of non-existent
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index f882636a8fc..e946d73e66c 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -841,8 +841,8 @@ Operations not mentioned here will be handled by the default Emacs primitives.")
;;;###tramp-autoload
(defun tramp-gvfs-file-name-handler (operation &rest args)
"Invoke the GVFS related OPERATION and ARGS.
-First arg specifies the OPERATION, second arg is a list of arguments to
-pass to the OPERATION."
+First arg specifies the OPERATION, second arg is a list of
+arguments to pass to the OPERATION."
(unless tramp-gvfs-enabled
(tramp-user-error nil "Package `tramp-gvfs' not supported"))
(if-let ((fn (assoc operation tramp-gvfs-file-name-handler-alist)))
@@ -945,7 +945,7 @@ is no information where to trace the message.")
"Called when a D-Bus error message arrives, see `dbus-event-error-functions'."
(when tramp-gvfs-dbus-event-vector
(tramp-message tramp-gvfs-dbus-event-vector 6 "%S" event)
- (tramp-error tramp-gvfs-dbus-event-vector 'file-error "%s" (cadr err))))
+ (tramp-error tramp-gvfs-dbus-event-vector 'file-error (cadr err))))
(add-hook 'dbus-event-error-functions #'tramp-gvfs-dbus-event-error)
(add-hook 'tramp-gvfs-unload-hook
@@ -985,83 +985,97 @@ file names."
(let ((t1 (tramp-tramp-file-p filename))
(t2 (tramp-tramp-file-p newname))
(equal-remote (tramp-equal-remote filename newname))
+ (volatile
+ (and (eq op 'rename) (tramp-gvfs-file-name-p filename)
+ (equal
+ (cdr
+ (assoc
+ "standard::is-volatile"
+ (tramp-gvfs-get-file-attributes filename)))
+ "TRUE")))
;; "gvfs-rename" is not trustworthy.
(gvfs-operation (if (eq op 'copy) "gvfs-copy" "gvfs-move"))
(msg-operation (if (eq op 'copy) "Copying" "Renaming")))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(unless (file-exists-p filename)
- (tramp-error
- v tramp-file-missing
- "%s file" msg-operation "No such file or directory" filename))
+ (tramp-compat-file-missing v filename))
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error v 'file-already-exists newname))
(when (and (file-directory-p newname)
(not (directory-name-p newname)))
(tramp-error v 'file-error "File is a directory %s" newname))
- (if (or (and equal-remote
- (tramp-get-connection-property v "direct-copy-failed" nil))
- (and t1 (not (tramp-gvfs-file-name-p filename)))
- (and t2 (not (tramp-gvfs-file-name-p newname))))
-
- ;; We cannot copy or rename directly.
- (let ((tmpfile (tramp-compat-make-temp-file filename)))
- (if (eq op 'copy)
- (copy-file
- filename tmpfile t keep-date preserve-uid-gid
- preserve-extended-attributes)
- (rename-file filename tmpfile t))
- (rename-file tmpfile newname ok-if-already-exists))
-
- ;; Direct action.
- (with-tramp-progress-reporter
- v 0 (format "%s %s to %s" msg-operation filename newname)
- (unless
- (and (apply
- #'tramp-gvfs-send-command v gvfs-operation
- (append
- (and (eq op 'copy) (or keep-date preserve-uid-gid)
- '("--preserve"))
- (list
- (tramp-gvfs-url-file-name filename)
- (tramp-gvfs-url-file-name newname))))
- ;; Some backends do not return a proper error
- ;; code in case of direct copy/move. Apply sanity checks.
- (or (not equal-remote)
- (tramp-gvfs-send-command
- v "gvfs-info" (tramp-gvfs-url-file-name newname))
- (eq op 'copy)
- (not (tramp-gvfs-send-command
- v "gvfs-info"
- (tramp-gvfs-url-file-name filename)))))
-
- (if (or (not equal-remote)
- (and equal-remote
- (tramp-get-connection-property
- v "direct-copy-failed" nil)))
- ;; Propagate the error.
- (with-current-buffer (tramp-get-connection-buffer v)
- (goto-char (point-min))
- (tramp-error-with-buffer
- nil v 'file-error
- "%s failed, see buffer `%s' for details."
- msg-operation (buffer-name)))
-
- ;; Some WebDAV server, like the one from QNAP, do not
- ;; support direct copy/move. Try a fallback.
- (tramp-set-connection-property v "direct-copy-failed" t)
- (tramp-gvfs-do-copy-or-rename-file
- op filename newname ok-if-already-exists keep-date
- preserve-uid-gid preserve-extended-attributes))))
-
- (when (and t1 (eq op 'rename))
- (with-parsed-tramp-file-name filename nil
- (tramp-flush-file-properties v localname)))
-
- (when t2
- (with-parsed-tramp-file-name newname nil
- (tramp-flush-file-properties v localname))))))))
+ (cond
+ ;; We cannot rename volatile files, as used by Google-drive.
+ ((and (not equal-remote) volatile)
+ (prog1 (copy-file
+ filename newname ok-if-already-exists keep-date
+ preserve-uid-gid preserve-extended-attributes)
+ (delete-file filename)))
+
+ ;; We cannot copy or rename directly.
+ ((or (and equal-remote
+ (tramp-get-connection-property v "direct-copy-failed" nil))
+ (and t1 (not (tramp-gvfs-file-name-p filename)))
+ (and t2 (not (tramp-gvfs-file-name-p newname))))
+ (let ((tmpfile (tramp-compat-make-temp-file filename)))
+ (if (eq op 'copy)
+ (copy-file
+ filename tmpfile t keep-date preserve-uid-gid
+ preserve-extended-attributes)
+ (rename-file filename tmpfile t))
+ (rename-file tmpfile newname ok-if-already-exists)))
+
+ ;; Direct action.
+ (t (with-tramp-progress-reporter
+ v 0 (format "%s %s to %s" msg-operation filename newname)
+ (unless
+ (and (apply
+ #'tramp-gvfs-send-command v gvfs-operation
+ (append
+ (and (eq op 'copy) (or keep-date preserve-uid-gid)
+ '("--preserve"))
+ (list
+ (tramp-gvfs-url-file-name filename)
+ (tramp-gvfs-url-file-name newname))))
+ ;; Some backends do not return a proper error
+ ;; code in case of direct copy/move. Apply
+ ;; sanity checks.
+ (or (not equal-remote)
+ (tramp-gvfs-send-command
+ v "gvfs-info" (tramp-gvfs-url-file-name newname))
+ (eq op 'copy)
+ (not (tramp-gvfs-send-command
+ v "gvfs-info"
+ (tramp-gvfs-url-file-name filename)))))
+
+ (if (or (not equal-remote)
+ (and equal-remote
+ (tramp-get-connection-property
+ v "direct-copy-failed" nil)))
+ ;; Propagate the error.
+ (with-current-buffer (tramp-get-connection-buffer v)
+ (goto-char (point-min))
+ (tramp-error-with-buffer
+ nil v 'file-error
+ "%s failed, see buffer `%s' for details."
+ msg-operation (buffer-name)))
+
+ ;; Some WebDAV server, like the one from QNAP, do
+ ;; not support direct copy/move. Try a fallback.
+ (tramp-set-connection-property v "direct-copy-failed" t)
+ (tramp-gvfs-do-copy-or-rename-file
+ op filename newname ok-if-already-exists keep-date
+ preserve-uid-gid preserve-extended-attributes))))
+
+ (when (and t1 (eq op 'rename))
+ (with-parsed-tramp-file-name filename nil
+ (tramp-flush-file-properties v localname)))
+
+ (when t2
+ (with-parsed-tramp-file-name newname nil
+ (tramp-flush-file-properties v localname)))))))))
(defun tramp-gvfs-handle-copy-file
(filename newname &optional ok-if-already-exists keep-date
@@ -1545,7 +1559,7 @@ If FILE-SYSTEM is non-nil, return file system attributes."
(setq dir (directory-file-name (expand-file-name dir)))
(with-parsed-tramp-file-name dir nil
(when (and (null parents) (file-exists-p dir))
- (tramp-error v 'file-already-exists "Directory already exists %s" dir))
+ (tramp-error v 'file-already-exists dir))
(tramp-flush-directory-properties v localname)
(save-match-data
(let ((ldir (file-name-directory dir)))
@@ -1575,20 +1589,31 @@ If FILE-SYSTEM is non-nil, return file system attributes."
(tramp-run-real-handler
#'rename-file (list filename newname ok-if-already-exists))))
+(defun tramp-gvfs-set-attribute (vec &rest args)
+ "Call \"gio set ...\" if possible."
+ (let ((key (concat "gvfs-set-attribute-" (nth 3 args))))
+ (when (tramp-get-connection-property vec key t)
+ (or (apply #'tramp-gvfs-send-command vec "gvfs-set-attribute" args)
+ (with-current-buffer (tramp-get-connection-buffer vec)
+ (goto-char (point-min))
+ (when (looking-at-p "gio: Operation not supported")
+ (tramp-set-connection-property vec key nil)))
+ nil))))
+
(defun tramp-gvfs-handle-set-file-modes (filename mode &optional flag)
"Like `set-file-modes' for Tramp files."
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-properties v localname)
- (tramp-gvfs-send-command
- v "gvfs-set-attribute" (if (eq flag 'nofollow) "-nt" "-t") "uint32"
+ (tramp-gvfs-set-attribute
+ v (if (eq flag 'nofollow) "-nt" "-t") "uint32"
(tramp-gvfs-url-file-name filename) "unix::mode" (number-to-string mode))))
(defun tramp-gvfs-handle-set-file-times (filename &optional time flag)
"Like `set-file-times' for Tramp files."
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-properties v localname)
- (tramp-gvfs-send-command
- v "gvfs-set-attribute" (if (eq flag 'nofollow) "-nt" "-t") "uint64"
+ (tramp-gvfs-set-attribute
+ v (if (eq flag 'nofollow) "-nt" "-t") "uint64"
(tramp-gvfs-url-file-name filename) "time::modified"
(format-time-string
"%s" (if (or (null time)
@@ -1622,12 +1647,12 @@ ID-FORMAT valid values are `string' and `integer'."
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-properties v localname)
(when (natnump uid)
- (tramp-gvfs-send-command
- v "gvfs-set-attribute" "-t" "uint32"
+ (tramp-gvfs-set-attribute
+ v "-t" "uint32"
(tramp-gvfs-url-file-name filename) "unix::uid" (number-to-string uid)))
(when (natnump gid)
- (tramp-gvfs-send-command
- v "gvfs-set-attribute" "-t" "uint32"
+ (tramp-gvfs-set-attribute
+ v "-t" "uint32"
(tramp-gvfs-url-file-name filename)
"unix::gid" (number-to-string gid)))))
diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el
index 8638bb477f8..96f7d9a89b9 100644
--- a/lisp/net/tramp-rclone.el
+++ b/lisp/net/tramp-rclone.el
@@ -157,8 +157,8 @@ Operations not mentioned here will be handled by the default Emacs primitives.")
;;;###tramp-autoload
(defun tramp-rclone-file-name-handler (operation &rest args)
"Invoke the rclone handler for OPERATION and ARGS.
-First arg specifies the OPERATION, second arg is a list of arguments to
-pass to the OPERATION."
+First arg specifies the OPERATION, second arg is a list of
+arguments to pass to the OPERATION."
(if-let ((fn (assoc operation tramp-rclone-file-name-handler-alist)))
(save-match-data (apply (cdr fn) args))
(tramp-run-real-handler operation args)))
@@ -215,9 +215,7 @@ file names."
(with-parsed-tramp-file-name (if t1 filename newname) nil
(unless (file-exists-p filename)
- (tramp-error
- v tramp-file-missing
- "%s file" msg-operation "No such file or directory" filename))
+ (tramp-compat-file-missing v filename))
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error v 'file-already-exists newname))
(when (and (file-directory-p newname)
@@ -304,9 +302,7 @@ file names."
(directory &optional full match nosort count)
"Like `directory-files' for Tramp files."
(unless (file-exists-p directory)
- (tramp-error
- (tramp-dissect-file-name directory) tramp-file-missing
- "No such file or directory" directory))
+ (tramp-compat-file-missing (tramp-dissect-file-name directory) directory))
(when (file-directory-p directory)
(setq directory (file-name-as-directory (expand-file-name directory)))
(with-parsed-tramp-file-name directory nil
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 2274efdf8b5..bcdc014daba 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1094,7 +1094,8 @@ component is used as the target of the symlink."
(unless ln
(tramp-error
v 'file-error
- "Making a symbolic link. ln(1) does not exist on the remote host."))
+ (concat "Making a symbolic link. "
+ "ln(1) does not exist on the remote host.")))
;; Do the 'confirm if exists' thing.
(when (file-exists-p linkname)
@@ -1724,9 +1725,8 @@ ID-FORMAT valid values are `string' and `integer'."
"Like `directory-files-and-attributes' for Tramp files."
(unless id-format (setq id-format 'integer))
(unless (file-exists-p directory)
- (tramp-error
- (tramp-dissect-file-name directory) tramp-file-missing
- "No such file or directory" directory))
+ (tramp-compat-file-missing
+ (tramp-dissect-file-name directory) directory))
(when (file-directory-p directory)
(setq directory (expand-file-name directory))
(let* ((temp
@@ -1877,8 +1877,9 @@ ID-FORMAT valid values are `string' and `integer'."
;; side.
(unless (looking-at-p "^ok$")
(tramp-error
- v 'file-error "\
-tramp-sh-handle-file-name-all-completions: internal error accessing `%s': `%s'"
+ v 'file-error
+ (concat "tramp-sh-handle-file-name-all-completions: "
+ "internal error accessing `%s': `%s'")
(tramp-shell-quote-argument localname) (buffer-string))))
(while (zerop (forward-line -1))
@@ -1944,9 +1945,7 @@ tramp-sh-handle-file-name-all-completions: internal error accessing `%s': `%s'"
(t2 (tramp-tramp-file-p newname)))
(with-parsed-tramp-file-name (if t1 dirname newname) nil
(unless (file-exists-p dirname)
- (tramp-error
- v tramp-file-missing
- "Copying directory" "No such file or directory" dirname))
+ (tramp-compat-file-missing v dirname))
(if (and (not copy-contents)
(tramp-get-method-parameter v 'tramp-copy-recursive)
;; When DIRNAME and NEWNAME are remote, they must have
@@ -2032,12 +2031,12 @@ file names."
(length (tramp-compat-file-attribute-size
(file-attributes (file-truename filename))))
(attributes (and preserve-extended-attributes
- (apply #'file-extended-attributes (list filename)))))
+ (apply #'file-extended-attributes (list filename))))
+ (msg-operation (if (eq op 'copy) "Copying" "Renaming")))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(unless (file-exists-p filename)
- (tramp-error
- v tramp-file-missing "No such file or directory" filename))
+ (tramp-compat-file-missing v filename))
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error v 'file-already-exists newname))
(when (and (file-directory-p newname)
@@ -2045,9 +2044,7 @@ file names."
(tramp-error v 'file-error "File is a directory %s" newname))
(with-tramp-progress-reporter
- v 0 (format "%s %s to %s"
- (if (eq op 'copy) "Copying" "Renaming")
- filename newname)
+ v 0 (format "%s %s to %s" msg-operation filename newname)
(cond
;; Both are Tramp files.
@@ -2536,7 +2533,7 @@ The method used must be an out-of-band method."
(setq dir (expand-file-name dir))
(with-parsed-tramp-file-name dir nil
(when (and (null parents) (file-exists-p dir))
- (tramp-error v 'file-already-exists "Directory already exists %s" dir))
+ (tramp-error v 'file-already-exists dir))
;; When PARENTS is non-nil, DIR could be a chain of non-existent
;; directories a/b/c/... Instead of checking, we simply flush the
;; whole cache.
@@ -3278,9 +3275,7 @@ alternative implementation will be used."
"Like `file-local-copy' for Tramp files."
(with-parsed-tramp-file-name filename nil
(unless (file-exists-p (file-truename filename))
- (tramp-error
- v tramp-file-missing
- "Cannot make local copy of non-existing file `%s'" filename))
+ (tramp-compat-file-missing v filename))
(let* ((size (tramp-compat-file-attribute-size
(file-attributes (file-truename filename))))
@@ -3969,7 +3964,7 @@ Fall back to normal file name handler if no Tramp handler exists."
"[[:blank:]]+\\([^[:blank:]]+\\)"
"\\([[:blank:]]+\\([^\n\r]+\\)\\)?")
line)
- (tramp-error proc 'file-notify-error "%s" line))
+ (tramp-error proc 'file-notify-error line))
(let ((object
(list
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index c5a74a5c653..26ec910ecc8 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -342,8 +342,8 @@ This can be used to disable echo etc."
;;;###tramp-autoload
(defun tramp-smb-file-name-handler (operation &rest args)
"Invoke the SMB related OPERATION and ARGS.
-First arg specifies the OPERATION, second arg is a list of arguments to
-pass to the OPERATION."
+First arg specifies the OPERATION, second arg is a list of
+arguments to pass to the OPERATION."
(if-let ((fn (assoc operation tramp-smb-file-name-handler-alist)))
(save-match-data (apply (cdr fn) args))
(tramp-run-real-handler operation args)))
@@ -430,9 +430,7 @@ pass to the OPERATION."
(with-tramp-progress-reporter
v 0 (format "Copying %s to %s" dirname newname)
(unless (file-exists-p dirname)
- (tramp-error
- v tramp-file-missing
- "Copying directory" "No such file or directory" dirname))
+ (tramp-compat-file-missing v dirname))
(when (and (file-directory-p newname)
(not (directory-name-p newname)))
(tramp-error v 'file-already-exists newname))
@@ -588,11 +586,10 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(copy-directory filename newname keep-date 'parents 'copy-contents)
(unless (file-exists-p filename)
- (tramp-error
+ (tramp-compat-file-missing
(tramp-dissect-file-name
(if (tramp-tramp-file-p filename) filename newname))
- tramp-file-missing
- "Copying file" "No such file or directory" filename))
+ filename))
(if-let ((tmpfile (file-local-copy filename)))
;; Remote filename.
@@ -693,9 +690,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(directory &optional full match nosort count)
"Like `directory-files' for Tramp files."
(unless (file-exists-p directory)
- (tramp-error
- (tramp-dissect-file-name directory) tramp-file-missing
- "No such file or directory" directory))
+ (tramp-compat-file-missing (tramp-dissect-file-name directory) directory))
(let ((result (mapcar #'directory-file-name
(file-name-all-completions "" directory))))
;; Discriminate with regexp.
@@ -962,9 +957,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
"Like `file-local-copy' for Tramp files."
(with-parsed-tramp-file-name (file-truename filename) nil
(unless (file-exists-p (file-truename filename))
- (tramp-error
- v tramp-file-missing
- "Cannot make local copy of non-existing file `%s'" filename))
+ (tramp-compat-file-missing v filename))
(let ((tmpfile (tramp-compat-make-temp-file filename)))
(with-tramp-progress-reporter
v 3 (format "Fetching %s to tmp file %s" filename tmpfile)
@@ -1153,12 +1146,10 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
;; of `default-directory'.
(let ((start (point)))
(insert
- (format
- "%s"
- (file-relative-name
- (expand-file-name
- (nth 0 x) (file-name-directory filename))
- (when full-directory-p (file-name-directory filename)))))
+ (file-relative-name
+ (expand-file-name
+ (nth 0 x) (file-name-directory filename))
+ (when full-directory-p (file-name-directory filename))))
(put-text-property start (point) 'dired-filename t))
;; Insert symlink.
@@ -1177,7 +1168,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
(setq dir (expand-file-name dir default-directory)))
(with-parsed-tramp-file-name dir nil
(when (and (null parents) (file-exists-p dir))
- (tramp-error v 'file-already-exists "Directory already exists %s" dir))
+ (tramp-error v 'file-already-exists dir))
(let* ((ldir (file-name-directory dir)))
;; Make missing directory parts.
(when (and parents
@@ -1386,9 +1377,7 @@ component is used as the target of the symlink."
(with-parsed-tramp-file-name
(if (tramp-tramp-file-p filename) filename newname) nil
(unless (file-exists-p filename)
- (tramp-error
- v tramp-file-missing
- "Renaming file" "No such file or directory" filename))
+ (tramp-compat-file-missing v filename))
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error v 'file-already-exists newname))
(when (and (file-directory-p newname)
@@ -2010,10 +1999,8 @@ If ARGUMENT is non-nil, use it as argument for
(when port (setq args (append args (list "-p" port))))
(when tramp-smb-conf
(setq args (append args (list "-s" tramp-smb-conf))))
- (while options
- (setq args
- (append args `("--option" ,(format "%s" (car options))))
- options (cdr options)))
+ (dolist (option options)
+ (setq args (append args (list "--option" option))))
(when argument
(setq args (append args (list argument))))
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index 5bb1546d08b..0a60b791822 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -153,8 +153,8 @@ See `tramp-actions-before-shell' for more info.")
;;;###tramp-autoload
(defun tramp-sudoedit-file-name-handler (operation &rest args)
"Invoke the SUDOEDIT handler for OPERATION and ARGS.
-First arg specifies the OPERATION, second arg is a list of arguments to
-pass to the OPERATION."
+First arg specifies the OPERATION, second arg is a list of
+arguments to pass to the OPERATION."
(if-let ((fn (assoc operation tramp-sudoedit-file-name-handler-alist)))
(save-match-data (apply (cdr fn) args))
(tramp-run-real-handler operation args)))
@@ -243,9 +243,7 @@ absolute file names."
(with-parsed-tramp-file-name (if t1 filename newname) nil
(unless (file-exists-p filename)
- (tramp-error
- v tramp-file-missing
- "%s file" msg-operation "No such file or directory" filename))
+ (tramp-compat-file-missing v filename))
(when (and (not ok-if-already-exists) (file-exists-p newname))
(tramp-error v 'file-already-exists newname))
(when (and (file-directory-p newname)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 7b34a748822..690dd99ae55 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2001,7 +2001,7 @@ the resulting error message."
(unless (eq error-symbol 'void-variable)
(tramp-error
(car tramp-current-connection) error-symbol
- "%s" (mapconcat (lambda (x) (format "%s" x)) data " "))))
+ (mapconcat (lambda (x) (format "%s" x)) data " "))))
(put #'tramp-signal-hook-function 'tramp-suppress-trace t)
@@ -3058,9 +3058,9 @@ User is always nil."
(defun tramp-handle-access-file (filename string)
"Like `access-file' for Tramp files."
(unless (file-readable-p (file-truename filename))
- (tramp-error
- (tramp-dissect-file-name filename) tramp-file-missing
- "%s: No such file or directory %s" string filename)))
+ (tramp-compat-file-missing
+ (tramp-dissect-file-name filename)
+ (format "%s: %s" string filename))))
(defun tramp-handle-add-name-to-file
(filename newname &optional ok-if-already-exists)
@@ -3094,9 +3094,7 @@ User is always nil."
;; `copy-directory' creates NEWNAME before running this check. So
;; we do it ourselves.
(unless (file-exists-p directory)
- (tramp-error
- (tramp-dissect-file-name directory) tramp-file-missing
- "No such file or directory" directory))
+ (tramp-compat-file-missing (tramp-dissect-file-name directory) directory))
;; We must do it file-wise.
(tramp-run-real-handler
'copy-directory
@@ -3117,9 +3115,7 @@ User is always nil."
(defun tramp-handle-directory-files (directory &optional full match nosort count)
"Like `directory-files' for Tramp files."
(unless (file-exists-p directory)
- (tramp-error
- (tramp-dissect-file-name directory) tramp-file-missing
- "No such file or directory" directory))
+ (tramp-compat-file-missing (tramp-dissect-file-name directory) directory))
(when (file-directory-p directory)
(setq directory (file-name-as-directory (expand-file-name directory)))
(let ((temp (nreverse (file-name-all-completions "" directory)))
@@ -3216,9 +3212,7 @@ User is always nil."
"Like `file-local-copy' for Tramp files."
(with-parsed-tramp-file-name filename nil
(unless (file-exists-p filename)
- (tramp-error
- v tramp-file-missing
- "Cannot make local copy of non-existing file `%s'" filename))
+ (tramp-compat-file-missing v filename))
(let ((tmpfile (tramp-compat-make-temp-file filename)))
(copy-file filename tmpfile 'ok-if-already-exists 'keep-time)
tmpfile)))
@@ -3428,8 +3422,10 @@ User is always nil."
(if (stringp symlink-target)
(if (file-remote-p symlink-target)
(tramp-compat-file-name-quote symlink-target 'top)
- (expand-file-name
- symlink-target (file-name-directory v2-localname)))
+ (tramp-drop-volume-letter
+ (expand-file-name
+ symlink-target
+ (file-name-directory v2-localname))))
v2-localname)
'nohop)))
(when (>= numchase numchase-limit)
@@ -3511,9 +3507,7 @@ User is always nil."
(with-parsed-tramp-file-name filename nil
(unwind-protect
(if (not (file-exists-p filename))
- (tramp-error
- v tramp-file-missing
- "File `%s' not found on remote host" filename)
+ (tramp-compat-file-missing v filename)
(with-tramp-progress-reporter
v 3 (format-message "Inserting `%s'" filename)
@@ -3636,8 +3630,7 @@ User is always nil."
v 'file-error
"File `%s' does not include a `.el' or `.elc' suffix" file)))
(unless (or noerror (file-exists-p file))
- (tramp-error
- v tramp-file-missing "Cannot load nonexistent file `%s'" file))
+ (tramp-compat-file-missing v file))
(if (not (file-exists-p file))
nil
(let ((signal-hook-function (unless noerror signal-hook-function))
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index ef4672e1b96..1248efabc15 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -2008,7 +2008,7 @@ toggle `org-table-follow-field-mode'."
(let ((b (save-excursion (skip-chars-backward "^|") (point)))
(e (save-excursion (skip-chars-forward "^|\r\n") (point))))
(remove-text-properties b e '(invisible t intangible t))
- (if (and (boundp 'font-lock-mode) font-lock-mode)
+ (if font-lock-mode
(font-lock-fontify-block))))
(t
(let ((pos (point-marker))
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 2d21a44fb48..e6a5cca9391 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -5520,7 +5520,7 @@ highlighting was done, nil otherwise."
(defun org-restart-font-lock ()
"Restart `font-lock-mode', to force refontification."
- (when (and (boundp 'font-lock-mode) font-lock-mode)
+ (when font-lock-mode
(font-lock-mode -1)
(font-lock-mode 1)))
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 0dd99cec66d..7effb27af7f 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -330,19 +330,12 @@ modified to be an empty string, or the desired separation string."
;;; Internal Variables:
;; for cycling completion support
-(defvar pcomplete-current-completions nil)
-(defvar pcomplete-last-completion-length)
-(defvar pcomplete-last-completion-stub)
-(defvar pcomplete-last-completion-raw)
-(defvar pcomplete-last-window-config nil)
-(defvar pcomplete-window-restore-timer nil)
-
-(make-variable-buffer-local 'pcomplete-current-completions)
-(make-variable-buffer-local 'pcomplete-last-completion-length)
-(make-variable-buffer-local 'pcomplete-last-completion-stub)
-(make-variable-buffer-local 'pcomplete-last-completion-raw)
-(make-variable-buffer-local 'pcomplete-last-window-config)
-(make-variable-buffer-local 'pcomplete-window-restore-timer)
+(defvar-local pcomplete-current-completions nil)
+(defvar-local pcomplete-last-completion-length nil)
+(defvar-local pcomplete-last-completion-stub nil)
+(defvar-local pcomplete-last-completion-raw nil)
+(defvar-local pcomplete-last-window-config nil)
+(defvar-local pcomplete-window-restore-timer nil)
;; used for altering pcomplete's behavior. These global variables
;; should always be nil.
diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el
index f317ad51cfc..dc93ef90310 100644
--- a/lisp/play/bubbles.el
+++ b/lisp/play/bubbles.el
@@ -82,6 +82,10 @@
;; Careful with that axe, Eugene! Order does matter in the custom
;; section below.
+(defgroup bubbles nil
+ "Bubbles, a puzzle game."
+ :group 'games)
+
(defcustom bubbles-game-theme
'easy
"Overall game theme.
@@ -91,8 +95,7 @@ and a shift mode."
(const :tag "Medium" medium)
(const :tag "Difficult" difficult)
(const :tag "Hard" hard)
- (const :tag "User defined" user-defined))
- :group 'bubbles)
+ (const :tag "User defined" user-defined)))
(defun bubbles-set-game-easy ()
"Set game theme to `easy'."
@@ -124,10 +127,6 @@ and a shift mode."
(setq bubbles-game-theme 'user-defined)
(bubbles))
-(defgroup bubbles nil
- "Bubbles, a puzzle game."
- :group 'games)
-
(defcustom bubbles-graphics-theme
'circles
"Graphics theme.
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el
index 9cecb706f98..5255d81e5b1 100644
--- a/lisp/play/cookie1.el
+++ b/lisp/play/cookie1.el
@@ -60,7 +60,6 @@
(defcustom cookie-file nil
"Default phrase file for cookie functions."
:type '(choice (const nil) file)
- :group 'cookie
:version "24.4")
(defconst cookie-delimiter "\n%%\n\\|\n%\n\\|\0"
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el
index b870bfb4a19..524ca81f30a 100644
--- a/lisp/play/decipher.el
+++ b/lisp/play/decipher.el
@@ -99,8 +99,7 @@
"Non-nil means to convert ciphertext to uppercase.
nil means the case of the ciphertext is preserved.
This variable must be set before typing `\\[decipher]'."
- :type 'boolean
- :group 'decipher)
+ :type 'boolean)
(defcustom decipher-ignore-spaces nil
@@ -108,21 +107,18 @@ This variable must be set before typing `\\[decipher]'."
You should set this to nil if the cipher message is divided into words,
or t if it is not.
This variable is buffer-local."
- :type 'boolean
- :group 'decipher)
+ :type 'boolean)
(make-variable-buffer-local 'decipher-ignore-spaces)
(defcustom decipher-undo-limit 5000
"The maximum number of entries in the undo list.
When the undo list exceeds this number, 100 entries are deleted from
the tail of the list."
- :type 'integer
- :group 'decipher)
+ :type 'integer)
(defcustom decipher-mode-hook nil
"Hook to run upon entry to decipher."
- :type 'hook
- :group 'decipher)
+ :type 'hook)
;; End of user modifiable variables
;;--------------------------------------------------------------------
diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el
index 3916e35f769..c3be029a658 100644
--- a/lisp/play/dunnet.el
+++ b/lisp/play/dunnet.el
@@ -42,8 +42,7 @@
(locate-user-emacs-file "games/")))
"Name of file to store score information for dunnet."
:version "26.1"
- :type 'file
- :group 'dunnet)
+ :type 'file)
;;;;
;;;; This section defines the globals that are used in dunnet.
diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el
index be39e1ebfb0..1c2c24ad75a 100644
--- a/lisp/play/gametree.el
+++ b/lisp/play/gametree.el
@@ -97,35 +97,30 @@ numbers of moves by Black (if considered in isolation) by the ellipsis
conflicts with the use of ellipsis by Outline mode to denote collapsed
subtrees. The author uses \":\" because it agrees nicely with a set of
LaTeX macros he uses for typesetting annotated games."
- :type 'regexp
- :group 'gametree)
+ :type 'regexp)
(defcustom gametree-full-ply-regexp (regexp-quote ".")
"Matches ends of numbers of moves by the \"first\" player.
For instance, it is an almost universal convention in chess to postfix
numbers of moves by White (if considered in isolation) by the dot \".\"."
- :type 'regexp
- :group 'gametree)
+ :type 'regexp)
(defcustom gametree-half-ply-format "%d:"
"Output format for move numbers of moves by the \"second\" player.
Has to contain \"%d\" to output the actual number."
- :type 'string
- :group 'gametree)
+ :type 'string)
(defcustom gametree-full-ply-format "%d."
"Output format for move numbers of moves by the \"first\" player.
Has to contain \"%d\" to output the actual number."
- :type 'string
- :group 'gametree)
+ :type 'string)
(defcustom gametree-make-heading-function
(lambda (level)
(insert (make-string level ?*)))
"A function of one numeric argument, LEVEL, to insert a heading at point.
You should change this if you change `outline-regexp'."
- :type 'function
- :group 'gametree)
+ :type 'function)
(defvar gametree-local-layout nil
"A list encoding the layout (i.e. the show or hide state) of the file.
@@ -137,18 +132,15 @@ the file is visited (subject to the usual restriction via
(defcustom gametree-score-opener "{score="
"The string which opens a score tag, and precedes the actual score."
- :type 'string
- :group 'gametree)
+ :type 'string)
(defcustom gametree-score-manual-flag "!"
"String marking the line as manually (as opposed to automatically) scored."
- :type 'string
- :group 'gametree)
+ :type 'string)
(defcustom gametree-score-closer "}"
"The string which closes a score tag, and follows the actual score."
- :type 'string
- :group 'gametree)
+ :type 'string)
(defcustom gametree-score-regexp
(concat "[^\n\^M]*\\("
@@ -166,13 +158,11 @@ line as *manually* (as opposed to automatically) scored, which
prevents the program from recursively applying the scoring algorithm
on the subtree headed by the marked line, and makes it use the manual
score instead."
- :type 'regexp
- :group 'gametree)
+ :type 'regexp)
(defcustom gametree-default-score 0
"Score to assume for branches lacking score tags."
- :type 'integer
- :group 'gametree)
+ :type 'integer)
;;;; Helper functions
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index 1856db8b8bf..8db40d7f94f 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -76,8 +76,7 @@
(defcustom gomoku-mode-hook nil
"If non-nil, its value is called on entry to Gomoku mode.
One useful value to include is `turn-on-font-lock' to highlight the pieces."
- :type 'hook
- :group 'gomoku)
+ :type 'hook)
;;;
;;; CONSTANTS FOR BOARD
@@ -168,13 +167,11 @@ One useful value to include is `turn-on-font-lock' to highlight the pieces."
(defface gomoku-O
'((((class color)) (:foreground "red" :weight bold)))
- "Face to use for Emacs's O."
- :group 'gomoku)
+ "Face to use for Emacs's O.")
(defface gomoku-X
'((((class color)) (:foreground "green" :weight bold)))
- "Face to use for your X."
- :group 'gomoku)
+ "Face to use for your X.")
(defvar gomoku-font-lock-keywords
'(("O" . 'gomoku-O)
diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el
index d762290f0da..f6e5fcd3675 100644
--- a/lisp/play/hanoi.el
+++ b/lisp/play/hanoi.el
@@ -71,33 +71,33 @@
(defcustom hanoi-horizontal-flag nil
"If non-nil, hanoi poles are oriented horizontally."
- :group 'hanoi :type 'boolean)
+ :type 'boolean)
(defcustom hanoi-move-period 1.0
"Time, in seconds, for each pole-to-pole move of a ring.
If nil, move rings as fast as possible while displaying all
intermediate positions."
- :group 'hanoi :type '(restricted-sexp :match-alternatives (numberp 'nil)))
+ :type '(restricted-sexp :match-alternatives (numberp 'nil)))
(defcustom hanoi-use-faces nil
"If nil, all hanoi-*-face variables are ignored."
- :group 'hanoi :type 'boolean)
+ :type 'boolean)
(defcustom hanoi-pole-face 'highlight
"Face for poles. Ignored if hanoi-use-faces is nil."
- :group 'hanoi :type 'face)
+ :type 'face)
(defcustom hanoi-base-face 'highlight
"Face for base. Ignored if hanoi-use-faces is nil."
- :group 'hanoi :type 'face)
+ :type 'face)
(defcustom hanoi-even-ring-face 'region
"Face for even-numbered rings. Ignored if hanoi-use-faces is nil."
- :group 'hanoi :type 'face)
+ :type 'face)
(defcustom hanoi-odd-ring-face 'secondary-selection
"Face for odd-numbered rings. Ignored if hanoi-use-faces is nil."
- :group 'hanoi :type 'face)
+ :type 'face)
;;;
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index 527cb03cfbe..e5b9ac0a537 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -2047,7 +2047,7 @@ Called in PHASE `after-insertion', see `antlr-options-alists'."
(let ((new-language (antlr-language-option t)))
(or (null new-language)
(eq new-language antlr-language)
- (let ((font-lock (and (boundp 'font-lock-mode) font-lock-mode)))
+ (let ((font-lock font-lock-mode))
(if font-lock (font-lock-mode 0))
(antlr-mode)
(and font-lock (null font-lock-mode) (font-lock-mode 1)))))))
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 3fce7dbafae..484624b8664 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -9021,14 +9021,15 @@ point unchanged and return nil."
(c-forward-noise-clause))
((and (looking-at c-type-decl-prefix-key)
(if (and (c-major-mode-is 'c++-mode)
- (match-beginning 3))
+ (match-beginning 4)) ; Was 3 - 2021-01-01
;; If the third submatch matches in C++ then
;; we're looking at an identifier that's a
;; prefix only if it specifies a member pointer.
(progn
(setq id-start (point))
(c-forward-name)
- (if (looking-at "\\(::\\)")
+ (if (save-match-data
+ (looking-at "\\(::\\)"))
;; We only check for a trailing "::" and
;; let the "*" that should follow be
;; matched in the next round.
@@ -9038,13 +9039,15 @@ point unchanged and return nil."
(setq got-identifier t)
nil))
t))
- (if (looking-at c-type-decl-operator-prefix-key)
+ (if (save-match-data
+ (looking-at c-type-decl-operator-prefix-key))
(setq decorated t))
(if (eq (char-after) ?\()
(progn
(setq paren-depth (1+ paren-depth))
(forward-char))
- (goto-char (match-end 1)))
+ (goto-char (or (match-end 1)
+ (match-end 2))))
(c-forward-syntactic-ws)
t)))
@@ -9721,14 +9724,15 @@ This function might do hidden buffer changes."
(setq after-paren-pos (point))))
(while (and (looking-at c-type-decl-prefix-key)
(if (and (c-major-mode-is 'c++-mode)
- (match-beginning 3))
- ;; If the third submatch matches in C++ then
+ (match-beginning 4))
+ ;; If the fourth submatch matches in C++ then
;; we're looking at an identifier that's a
;; prefix only if it specifies a member pointer.
(when (progn (setq pos (point))
(setq got-identifier (c-forward-name)))
(setq name-start pos)
- (if (looking-at "\\(::\\)")
+ (if (save-match-data
+ (looking-at "\\(::\\)"))
;; We only check for a trailing "::" and
;; let the "*" that should follow be
;; matched in the next round.
@@ -9749,7 +9753,8 @@ This function might do hidden buffer changes."
(when (save-match-data
(looking-at c-type-decl-operator-prefix-key))
(setq got-function-name-prefix t))
- (goto-char (match-end 1)))
+ (goto-char (or (match-end 1)
+ (match-end 2))))
(c-forward-syntactic-ws)))
(setq got-parens (> paren-depth 0))
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index f4dcbcda962..07479389c62 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -3433,41 +3433,47 @@ possible for good performance."
t (c-make-bare-char-alt (c-lang-const c-block-prefix-disallowed-chars) t))
(c-lang-defvar c-block-prefix-charset (c-lang-const c-block-prefix-charset))
-(c-lang-defconst c-type-decl-prefix-key
- "Regexp matching any declarator operator that might precede the
-identifier in a declaration, e.g. the \"*\" in \"char *argv\". This
-regexp should match \"(\" if parentheses are valid in declarators.
-The end of the first submatch is taken as the end of the operator.
-Identifier syntax is in effect when this is matched (see
-`c-identifier-syntax-table')."
+(c-lang-defconst c-type-decl-prefix-keywords-key
+ ;; Regexp matching any keyword operator that might precede the identifier in
+ ;; a declaration, e.g. "const" or nil. It doesn't test there is no "_"
+ ;; following the keyword.
t (if (or (c-lang-const c-type-modifier-kwds) (c-lang-const c-modifier-kwds))
- (concat
+ (concat
(regexp-opt (c--delete-duplicates
(append (c-lang-const c-type-modifier-kwds)
(c-lang-const c-modifier-kwds))
:test 'string-equal)
t)
- "\\>")
- ;; Default to a regexp that never matches.
- regexp-unmatchable)
+ "\\>")))
+
+(c-lang-defconst c-type-decl-prefix-key
+ "Regexp matching any declarator operator that might precede the
+identifier in a declaration, e.g. the \"*\" in \"char *argv\". This
+regexp should match \"(\" if parentheses are valid in declarators.
+The operator found is either the first submatch (if it is not a
+keyword) or the second submatch (if it is)."
+ t (if (c-lang-const c-type-decl-prefix-keywords-key)
+ (concat "\\(\\`a\\`\\)\\|" ; 1 - will never match.
+ (c-lang-const c-type-decl-prefix-keywords-key) ; 2
+ "\\([^_]\\|$\\)") ; 3
+ "\\`a\\`") ;; Default to a regexp that never matches.
;; Check that there's no "=" afterwards to avoid matching tokens
;; like "*=".
- (c objc) (concat "\\("
+ (c objc) (concat "\\(" ; 1
"[*(]"
- "\\|"
- (c-lang-const c-type-decl-prefix-key)
- "\\)"
- "\\([^=]\\|$\\)")
- c++ (concat "\\("
+ "\\)\\|"
+ (c-lang-const c-type-decl-prefix-keywords-key) ; 2
+ "\\([^=_]\\|$\\)") ; 3
+ c++ (concat "\\(" ; 1
"&&"
"\\|"
"\\.\\.\\."
"\\|"
"[*(&~]"
+ "\\)\\|\\(" ; 2
+ (c-lang-const c-type-decl-prefix-keywords-key) ; 3
"\\|"
- (c-lang-const c-type-decl-prefix-key)
- "\\|"
- (concat "\\(" ; 3
+ (concat "\\(" ; 4
;; If this matches there's special treatment in
;; `c-font-lock-declarators' and
;; `c-font-lock-declarations' that check for a
@@ -3475,8 +3481,9 @@ Identifier syntax is in effect when this is matched (see
(c-lang-const c-identifier-start)
"\\)")
"\\)"
- "\\([^=]\\|$\\)")
+ "\\([^=_]\\|$\\)") ; 5
pike "\\(\\*\\)\\([^=]\\|$\\)")
+
(c-lang-defvar c-type-decl-prefix-key (c-lang-const c-type-decl-prefix-key)
'dont-doc)
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el
index d3a33bdf870..1a45b1cb838 100644
--- a/lisp/progmodes/cmacexp.el
+++ b/lisp/progmodes/cmacexp.el
@@ -72,15 +72,6 @@
;; Please report bugs, suggestions, complaints and so on to
;; bug-gnu-emacs@gnu.org and pot@gnu.org (Francesco Potortì).
-;; IMPROVEMENTS OVER emacs 18.xx cmacexp.el ==========================
-
-;; - A lot of user and programmer visible changes. See above.
-;; - #line directives are inserted, so __LINE__ and __FILE__ are
-;; correctly expanded. Works even with START inside a string, a
-;; comment or a region #ifdef'd away by cpp. cpp is invoked with -C,
-;; making comments visible in the expansion.
-;; - All work is done in core memory, no need for temporary files.
-
;; ACKNOWLEDGMENTS ===================================================
;; A lot of thanks to Don Maszle who did a great work of testing, bug
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 614ed7d835d..48b5ee99736 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2069,6 +2069,10 @@ Returns the compilation buffer created."
(define-key map "\M-p" 'compilation-previous-error)
(define-key map "\M-{" 'compilation-previous-file)
(define-key map "\M-}" 'compilation-next-file)
+ (define-key map "n" 'next-error-no-select)
+ (define-key map "p" 'previous-error-no-select)
+ (define-key map "l" 'recenter-current-error)
+
(define-key map "g" 'recompile) ; revert
;; Set up the menu-bar
(define-key map [menu-bar compilation]
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index d401513646f..a70e8e36c0b 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -1157,25 +1157,25 @@ versions of Emacs."
(get-text-property (point-min) 'in-pod)
(< (progn
(and cperl-syntaxify-for-menu
- (cperl-update-syntaxification (point-max) (point-max)))
+ (cperl-update-syntaxification (point-max)))
(next-single-property-change (point-min) 'in-pod nil (point-max)))
(point-max)))]
["Ispell HERE-DOCs" cperl-here-doc-spell
(< (progn
(and cperl-syntaxify-for-menu
- (cperl-update-syntaxification (point-max) (point-max)))
+ (cperl-update-syntaxification (point-max)))
(next-single-property-change (point-min) 'here-doc-group nil (point-max)))
(point-max))]
["Narrow to this HERE-DOC" cperl-narrow-to-here-doc
(eq 'here-doc (progn
(and cperl-syntaxify-for-menu
- (cperl-update-syntaxification (point) (point)))
+ (cperl-update-syntaxification (point)))
(get-text-property (point) 'syntax-type)))]
["Select this HERE-DOC or POD section"
cperl-select-this-pod-or-here-doc
(memq (progn
(and cperl-syntaxify-for-menu
- (cperl-update-syntaxification (point) (point)))
+ (cperl-update-syntaxification (point)))
(get-text-property (point) 'syntax-type))
'(here-doc pod))]
"----"
@@ -1659,36 +1659,18 @@ or as help on variables `cperl-tips', `cperl-problems',
nil nil ((?_ . "w"))))
;; Reset syntaxification cache.
(setq-local cperl-syntax-state nil)
- (if cperl-use-syntax-table-text-property
- (if (eval-when-compile (fboundp 'syntax-propertize-rules))
- (progn
- ;; Reset syntaxification cache.
- (setq-local cperl-syntax-done-to nil)
- (setq-local syntax-propertize-function
- (lambda (start end)
- (goto-char start)
- ;; Even if cperl-fontify-syntaxically has already gone
- ;; beyond `start', syntax-propertize has just removed
- ;; syntax-table properties between start and end, so we have
- ;; to re-apply them.
- (setq cperl-syntax-done-to start)
- (cperl-fontify-syntaxically end))))
- ;; Do not introduce variable if not needed, we check it!
- (setq-local parse-sexp-lookup-properties t)
- ;; Our: just a plug for wrong font-lock
- (setq-local font-lock-unfontify-region-function
- ;; not present with old Emacs
- #'cperl-font-lock-unfontify-region-function)
- ;; Reset syntaxification cache.
- (setq-local cperl-syntax-done-to nil)
- (setq-local font-lock-syntactic-keywords
- (if cperl-syntaxify-by-font-lock
- '((cperl-fontify-syntaxically))
- ;; unless font-lock-syntactic-keywords, font-lock (pre-22.1)
- ;; used to ignore syntax-table text-properties. (t) is a hack
- ;; to make font-lock think that font-lock-syntactic-keywords
- ;; are defined.
- '(t)))))
+ (when cperl-use-syntax-table-text-property
+ ;; Reset syntaxification cache.
+ (setq-local cperl-syntax-done-to nil)
+ (setq-local syntax-propertize-function
+ (lambda (start end)
+ (goto-char start)
+ ;; Even if cperl-fontify-syntaxically has already gone
+ ;; beyond `start', syntax-propertize has just removed
+ ;; syntax-table properties between start and end, so we have
+ ;; to re-apply them.
+ (setq cperl-syntax-done-to start)
+ (cperl-fontify-syntaxically end))))
(setq cperl-font-lock-multiline t) ; Not localized...
(setq-local font-lock-multiline t)
(setq-local font-lock-fontify-region-function
@@ -2405,7 +2387,7 @@ means indent rigidly all the lines of the expression starting after point
so that this line becomes properly indented.
The relative indentation among the lines of the expression are preserved."
(interactive "P")
- (cperl-update-syntaxification (point) (point))
+ (cperl-update-syntaxification (point))
(if whole-exp
;; If arg, always indent this line as Perl
;; and shift remaining lines of expression the same amount.
@@ -2533,7 +2515,7 @@ Will not look before LIM."
(defun cperl-sniff-for-indent (&optional parse-data) ; was parse-start
;; the sniffer logic to understand what the current line MEANS.
- (cperl-update-syntaxification (point) (point))
+ (cperl-update-syntaxification (point))
(let ((res (get-text-property (point) 'syntax-type)))
(save-excursion
(cond
@@ -3025,7 +3007,7 @@ Returns true if comment is found. In POD will not move the point."
;; then looks for literal # or end-of-line.
(let (state stop-in cpoint (lim (point-at-eol)) pr e)
(or cperl-font-locking
- (cperl-update-syntaxification lim lim))
+ (cperl-update-syntaxification lim))
(beginning-of-line)
(if (setq pr (get-text-property (point) 'syntax-type))
(setq e (next-single-property-change (point) 'syntax-type nil (point-max))))
@@ -4640,7 +4622,7 @@ CHARS is a string that contains good characters to have before us (however,
`}' is treated \"smartly\" if it is not in the list)."
(let ((lim (or lim (point-min)))
stop p)
- (cperl-update-syntaxification (point) (point))
+ (cperl-update-syntaxification (point))
(save-excursion
(while (and (not stop) (> (point) lim))
(skip-chars-backward " \t\n\f" lim)
@@ -5027,7 +5009,7 @@ inclusive.
If `cperl-indent-region-fix-constructs', will improve spacing on
conditional/loop constructs."
(interactive "r")
- (cperl-update-syntaxification end end)
+ (cperl-update-syntaxification end)
(save-excursion
(let (cperl-update-start cperl-update-end (h-a-c after-change-functions))
(let ((indent-info (list nil nil nil) ; Cannot use '(), since will modify
@@ -5233,7 +5215,7 @@ indentation and initial hashes. Behaves usually outside of comment."
packages ends-ranges p marker is-proto
is-pack index index1 name (end-range 0) package)
(goto-char (point-min))
- (cperl-update-syntaxification (point-max) (point-max))
+ (cperl-update-syntaxification (point-max))
;; Search for the function
(progn ;;save-match-data
(while (re-search-forward
@@ -8209,7 +8191,7 @@ function returns nil."
(or prop (setq prop 'in-pod))
(or s (setq s (point-min)))
(or end (setq end (point-max)))
- (cperl-update-syntaxification end end)
+ (cperl-update-syntaxification end)
(save-excursion
(goto-char (setq pos s))
(while (and cont (< pos end))
@@ -8225,7 +8207,7 @@ function returns nil."
Return nil if the point is not in a HERE document region. If POD is non-nil,
will return a POD section if point is in a POD section."
(or pos (setq pos (point)))
- (cperl-update-syntaxification pos pos)
+ (cperl-update-syntaxification pos)
(if (or (eq 'here-doc (get-text-property pos 'syntax-type))
(and pod
(eq 'pod (get-text-property pos 'syntax-type))))
@@ -8295,7 +8277,7 @@ start with default arguments, then refine the slowdown regions."
(forward-line step)
(setq l (+ l step))
(setq c (1+ c))
- (cperl-update-syntaxification (point) (point))
+ (cperl-update-syntaxification (point))
(setq delta (- (- tt (setq tt (funcall timems)))) tot (+ tot delta))
(message "to %s:%6s,%7s" l delta tot))
tot))
@@ -8405,19 +8387,12 @@ do extra unwind via `cperl-unwind-to-safe'."
(setq end (point)))
(font-lock-default-fontify-region beg end loudly))
-(defvar cperl-d-l nil)
-(defvar edebug-backtrace-buffer) ;FIXME: Why?
(defun cperl-fontify-syntaxically (end)
;; Some vars for debugging only
;; (message "Syntaxifying...")
(let ((dbg (point)) (iend end) (idone cperl-syntax-done-to)
(istate (car cperl-syntax-state))
- start from-start edebug-backtrace-buffer)
- (if (eq cperl-syntaxify-by-font-lock 'backtrace)
- (progn
- (require 'edebug)
- (let ((f 'edebug-backtrace))
- (funcall f)))) ; Avoid compile-time warning
+ start from-start)
(or cperl-syntax-done-to
(setq cperl-syntax-done-to (point-min)
from-start t))
@@ -8473,16 +8448,9 @@ do extra unwind via `cperl-unwind-to-safe'."
(if cperl-syntax-done-to
(setq cperl-syntax-done-to (min cperl-syntax-done-to beg))))
-(defun cperl-update-syntaxification (from to)
- (cond
- ((not cperl-use-syntax-table-text-property) nil)
- ((fboundp 'syntax-propertize) (syntax-propertize to))
- ((and cperl-syntaxify-by-font-lock
- (or (null cperl-syntax-done-to)
- (< cperl-syntax-done-to to)))
- (save-excursion
- (goto-char from)
- (cperl-fontify-syntaxically to)))))
+(defun cperl-update-syntaxification (to)
+ (when cperl-use-syntax-table-text-property
+ (syntax-propertize to)))
(defvar cperl-version
(let ((v "Revision: 6.2"))
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index 3815b176503..8943d8b6d01 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -30,21 +30,14 @@
;; Type `C-h m' when you are editing a .COM file to get more
;; information about this mode.
;;
-;; To use templates you will need a version of tempo.el that is at
-;; least later than the buggy 1.1.1, which was included with my versions of
-;; Emacs. I used version 1.2.4.
-;; The latest tempo.el distribution can be fetched from
-;; ftp.lysator.liu.se in the directory /pub/emacs.
+;; Support for templates is based on the built-in tempo.el.
;; I recommend setting (setq tempo-interactive t). This will make
;; tempo prompt you for values to put in the blank spots in the templates.
;;
-;; There is limited support for imenu. The limitation is that you need
-;; a version of imenu.el that uses imenu-generic-expression. I found
-;; the version I use in Emacs 19.30. (It was *so* much easier to hook
-;; into that version than the one in 19.27...)
+;; There is limited support for imenu.
;;
;; Any feedback will be welcomed. If you write functions for
-;; dcl-calc-command-indent-function or dcl-calc-cont-indent-function,
+;; `dcl-calc-command-indent-function' or `dcl-calc-cont-indent-function',
;; please send them to the maintainer.
;;
;;
@@ -349,13 +342,10 @@ See `imenu-generic-expression' for details."
'("End of statement" . dcl-forward-command))
(define-key map [menu-bar dcl dcl-backward-command]
'("Beginning of statement" . dcl-backward-command))
- ;; imenu is only supported for versions with imenu-generic-expression
- (if (boundp 'imenu-generic-expression)
- (progn
- (define-key map [menu-bar dcl dcl-separator-movement]
- '("--"))
- (define-key map [menu-bar dcl imenu]
- '("Buffer index menu" . imenu))))
+ (define-key map [menu-bar dcl dcl-separator-movement]
+ '("--"))
+ (define-key map [menu-bar dcl imenu]
+ '("Buffer index menu" . imenu))
map)
"Keymap used in DCL-mode buffers.")
@@ -463,8 +453,7 @@ Preloaded with all known option names from dcl-option-alist")
;The default includes SUBROUTINE labels in the main listing and
;sub-listings for other labels, CALL, GOTO and GOSUB statements.
-;See `imenu-generic-expression' in a recent (e.g. Emacs 19.30) imenu.el
-;for details.")
+;See `imenu-generic-expression' for details.")
;;; *** Mode initialization *************************************************
@@ -600,9 +589,8 @@ There is some minimal font-lock support (see vars
;; and something inappropriate might be interpreted as a comment.
(setq-local comment-start-skip "\\$[ \t]*![ \t]*")
- (if (boundp 'imenu-generic-expression)
- (progn (setq imenu-generic-expression dcl-imenu-generic-expression)
- (setq imenu-case-fold-search t)))
+ (setq imenu-generic-expression dcl-imenu-generic-expression)
+ (setq imenu-case-fold-search t)
(setq imenu-create-index-function 'dcl-imenu-create-index-function)
(make-local-variable 'dcl-comment-line-regexp)
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 9348a7f0d2f..a0968663163 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -1268,7 +1268,9 @@ If `eval-expression-debug-on-error' is non-nil, which is the default,
this command arranges for all errors to enter the debugger."
(interactive "P")
(if (null eval-expression-debug-on-error)
- (elisp--eval-last-sexp eval-last-sexp-arg-internal)
+ (let ((value (elisp--eval-last-sexp eval-last-sexp-arg-internal)))
+ (push value values)
+ value)
(let ((value
(let ((debug-on-error elisp--eval-last-sexp-fake-value))
(cons (elisp--eval-last-sexp eval-last-sexp-arg-internal)
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 92b165bc641..5c0b7880e8b 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -117,11 +117,10 @@
;; correctly, but I imagine them to be rare.
;; 3) Regexps for hilit19 are no longer supported.
;; 4) For FIXED FORMAT code, use fortran mode.
-;; 5) This mode does not work under emacs-18.x.
-;; 6) Preprocessor directives, i.e., lines starting with # are left-justified
+;; 5) Preprocessor directives, i.e., lines starting with # are left-justified
;; and are untouched by all case-changing commands. There is, at present, no
;; mechanism for treating multi-line directives (continued by \ ).
-;; 7) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented.
+;; 6) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented.
;; You are urged to use f90-do loops (with labels if you wish).
;; List of user commands
@@ -718,10 +717,7 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
(modify-syntax-entry ?* "." table)
(modify-syntax-entry ?/ "." table)
(modify-syntax-entry ?% "." table) ; bug#8820
- ;; I think that the f95 standard leaves the behavior of \
- ;; unspecified, but that f2k will require it to be non-special.
- ;; Use `f90-backslash-not-special' to change.
- (modify-syntax-entry ?\\ "\\" table) ; escape chars
+ (modify-syntax-entry ?\\ "." table)
table)
"Syntax table used in F90 mode.")
@@ -2395,9 +2391,11 @@ CHANGE-WORD should be one of `upcase-word', `downcase-word', `capitalize-word'."
(defun f90-backslash-not-special (&optional all)
"Make the backslash character (\\) be non-special in the current buffer.
+This is the default in `f90-mode'.
+
With optional argument ALL, change the default for all present
-and future F90 buffers. F90 mode normally treats backslash as an
-escape character."
+and future F90 buffers."
+ (declare (obsolete nil "28.1"))
(or (derived-mode-p 'f90-mode)
(user-error "This function should only be used in F90 buffers"))
(when (equal (char-syntax ?\\ ) ?\\ )
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 1a8435fde33..d6ee8bb4236 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -275,8 +275,6 @@ See `compilation-error-screen-columns'."
(define-key map "\C-c\C-f" 'next-error-follow-minor-mode)
(define-key map "\r" 'compile-goto-error) ;; ?
- (define-key map "n" 'next-error-no-select)
- (define-key map "p" 'previous-error-no-select)
(define-key map "{" 'compilation-previous-file)
(define-key map "}" 'compilation-next-file)
(define-key map "\t" 'compilation-next-error)
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index c11892492de..e8e55ae96d1 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -6876,7 +6876,6 @@ sort the list before displaying."
(let ((completion-ignore-case t)) ; install correct value
(apply function args))
(if (and (derived-mode-p 'idlwave-shell-mode)
- (boundp 'font-lock-mode)
(not font-lock-mode))
;; For the shell, remove the fontification of the word before point
(let ((beg (save-excursion
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index a0e09f51ce3..e382d6edcd2 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -435,6 +435,9 @@ not be enclosed in { } or ( )."
'("[^$]\\(\\$[({][@%*][DF][})]\\)"
1 'makefile-targets append)
+ ;; Automatic variables.
+ '("[^$]\\(\\$[@%*?+^|]\\)" 1 'makefile-targets append)
+
;; $(function ...) ${function ...}
'("[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\s \\)"
1 font-lock-function-name-face prepend)
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index c37bb1c7112..ddcc6f5450e 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -165,7 +165,7 @@ parenthetical grouping.")
(modify-syntax-entry ?| "." table)
(modify-syntax-entry ?! "." table)
(modify-syntax-entry ?\\ "." table)
- (modify-syntax-entry ?\' "\"" table)
+ (modify-syntax-entry ?\' "." table)
(modify-syntax-entry ?\` "." table)
(modify-syntax-entry ?. "." table)
(modify-syntax-entry ?\" "\"" table)
@@ -1516,7 +1516,8 @@ current buffer file unless called with a prefix arg \\[universal-argument]."
;; https://lists.gnu.org/r/emacs-devel/2013-10/msg00095.html
(compilation-forget-errors)
(insert-before-markers string "\n")
- (comint-send-string proc (concat string "\n"))))
+ (comint-send-string proc (concat string "\n")))
+ (deactivate-mark))
(if octave-send-show-buffer
(display-buffer inferior-octave-buffer)))
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index fc5e30111e5..abe563bec04 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -725,6 +725,7 @@ requires quoting, e.g. `\\[quoted-insert]<space>'."
(require 'xref)
(require 'grep)
(let* ((pr (project-current t))
+ (default-directory (project-root pr))
(files
(if (not current-prefix-arg)
(project-files pr)
@@ -756,6 +757,7 @@ pattern to search for."
(interactive (list (project--read-regexp)))
(require 'xref)
(let* ((pr (project-current t))
+ (default-directory (project-root pr))
(files
(project-files pr (cons
(project-root pr)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index d6c0a4d1dbf..afb96974b17 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3273,7 +3273,8 @@ process running; defaults to t when called interactively."
;; lines have been removed/added.
(with-current-buffer (process-buffer process)
(compilation-forget-errors))
- (python-shell-send-string string process)))
+ (python-shell-send-string string process)
+ (deactivate-mark)))
(defun python-shell-send-statement (&optional send-main msg)
"Send the statement at point to inferior Python process.
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index a8667acb9d5..e7f407b6367 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1869,8 +1869,8 @@ It will be properly highlighted even when the call omits parens.")
;; Symbols with special characters.
(":\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\)"
(1 (unless (or
- (eq (char-before (match-beginning 0)) ?:)
- (nth 8 (syntax-ppss (match-beginning 1))))
+ (nth 8 (syntax-ppss (match-beginning 1)))
+ (eq (char-before (match-beginning 0)) ?:))
(goto-char (match-end 0))
(string-to-syntax "_"))))
;; Symbols ending with '=' (bug#42846).
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el
index 7806a6b46c8..a863e7eb4b4 100644
--- a/lisp/progmodes/simula.el
+++ b/lisp/progmodes/simula.el
@@ -281,7 +281,7 @@ for SIMULA mode to function correctly."
(define-key map ":" 'simula-electric-label)
(define-key map "\e\C-q" 'simula-indent-exp)
(define-key map "\t" 'simula-indent-command)
- ;; Emacs 19 defines menus in the mode map
+
(define-key map [menu-bar simula]
(cons "SIMULA" (make-sparse-keymap "SIMULA")))
(define-key map [menu-bar simula indent-exp]
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 4d027f3df53..f1f4d61324b 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -2829,9 +2829,7 @@ configured."
;; Force font lock to reinitialize if it is already on
;; Otherwise, we can wait until it can be started.
- (when (and (fboundp 'font-lock-mode)
- (boundp 'font-lock-mode)
- font-lock-mode)
+ (when font-lock-mode
(font-lock-mode-internal nil)
(font-lock-mode-internal t))
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 0a0118a5eba..82e1343e057 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -651,7 +651,6 @@ already exist."
(setq-local add-log-current-defun-function
#'tcl-add-log-defun)
- (setq-local beginning-of-defun-function #'tcl-beginning-of-defun-function)
(setq-local end-of-defun-function #'tcl-end-of-defun-function))
@@ -849,14 +848,12 @@ Returns nil if line starts inside a string, t if in a comment."
state
containing-sexp
found-next-line)
- (cond
- (parse-start
+
+ (if parse-start
(goto-char parse-start))
- ((not (beginning-of-defun))
- ;; If we're not in a function, don't use
- ;; `tcl-beginning-of-defun-function'.
- (let ((beginning-of-defun-function nil))
- (beginning-of-defun))))
+
+ (beginning-of-defun)
+
(while (< (point) indent-point)
(setq parse-start (point))
(setq state (parse-partial-sexp (point) indent-point 0))
@@ -1035,22 +1032,6 @@ Returns nil if line starts inside a string, t if in a comment."
;; Interfaces to other packages.
;;
-(defun tcl-beginning-of-defun-function (&optional arg)
- "`beginning-of-defun-function' for Tcl mode."
- (when (or (not arg) (= arg 0))
- (setq arg 1))
- (let* ((search-fn (if (> arg 0)
- ;; Positive arg means to search backward.
- #'re-search-backward
- #'re-search-forward))
- (arg (abs arg))
- (result t))
- (while (and (> arg 0) result)
- (unless (funcall search-fn tcl-proc-regexp nil t)
- (setq result nil))
- (setq arg (1- arg)))
- result))
-
(defun tcl-end-of-defun-function ()
"`end-of-defun-function' for Tcl mode."
;; Because we let users redefine tcl-proc-list, we don't really know
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 8dddcf0eef0..f934ef7a80e 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -9,7 +9,7 @@
;; Keywords: languages
;; The "Version" is the date followed by the decimal rendition of the Git
;; commit hex.
-;; Version: 2020.06.27.014326051
+;; Version: 2021.02.02.263931197
;; Yoni Rabkin <yoni@rabkins.net> contacted the maintainer of this
;; file on 19/3/2008, and the maintainer agreed that when a bug is
@@ -124,7 +124,7 @@
;;
;; This variable will always hold the version number of the mode
-(defconst verilog-mode-version "2020-06-27-0da9923-vpo-GNU"
+(defconst verilog-mode-version "2021-02-02-fbb453d-vpo-GNU"
"Version of this Verilog mode.")
(defconst verilog-mode-release-emacs t
"If non-nil, this version of Verilog mode was released with Emacs itself.")
@@ -134,6 +134,16 @@
(interactive)
(message "Using verilog-mode version %s" verilog-mode-version))
+(defmacro verilog--supressed-warnings (warnings &rest body)
+ (declare (indent 1) (debug t))
+ (cond
+ ((fboundp 'with-suppressed-warnings)
+ `(with-suppressed-warnings ,warnings ,@body))
+ ((fboundp 'with-no-warnings)
+ `(with-no-warnings ,@body))
+ (t
+ `(progn ,@body))))
+
;; Insure we have certain packages, and deal with it if we don't
;; Be sure to note which Emacs flavor and version added each feature.
(eval-when-compile
@@ -220,7 +230,7 @@ STRING should be given if the last search was by `string-match' on STRING."
)
(if (fboundp 'defface)
nil ; great!
- (defmacro defface (var values doc &rest _args)
+ (defmacro defface (var _values _doc &rest _args)
`(make-face ,var))
)
@@ -339,7 +349,7 @@ wherever possible, since it is slow."
((fboundp 'quit-window)
(defalias 'verilog-quit-window 'quit-window))
(t
- (defun verilog-quit-window (kill-ignored window)
+ (defun verilog-quit-window (_kill-ignored window)
"Quit WINDOW and bury its buffer. KILL-IGNORED is ignored."
(delete-window window)))))
@@ -407,7 +417,7 @@ wherever possible, since it is slow."
"Filter `define-abbrev-table' TABLENAME DEFINITIONS
Provides DOCSTRING PROPS in newer Emacs (23.1)."
(condition-case nil
- (apply 'define-abbrev-table tablename definitions docstring props)
+ (apply #'define-abbrev-table tablename definitions docstring props)
(error
(define-abbrev-table tablename definitions))))
@@ -572,7 +582,7 @@ entry \"Fontify Buffer\"). XEmacs: turn off and on font locking."
:type 'boolean
:group 'verilog-mode-indent)
;; Note we don't use :safe, as that would break on Emacsen before 22.0.
-(put 'verilog-highlight-translate-off 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-highlight-translate-off 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-lineup 'declarations
"Type of statements to lineup across multiple lines.
@@ -611,7 +621,7 @@ are lineup only when \\[verilog-pretty-declarations] is typed."
"Indentation of Verilog statements with respect to containing block."
:group 'verilog-mode-indent
:type 'integer)
-(put 'verilog-indent-level 'safe-local-variable 'integerp)
+(put 'verilog-indent-level 'safe-local-variable #'integerp)
(defcustom verilog-indent-level-module 3
"Indentation of Module level Verilog statements (eg always, initial).
@@ -619,14 +629,14 @@ Set to 0 to get initial and always statements lined up on the left side of
your screen."
:group 'verilog-mode-indent
:type 'integer)
-(put 'verilog-indent-level-module 'safe-local-variable 'integerp)
+(put 'verilog-indent-level-module 'safe-local-variable #'integerp)
(defcustom verilog-indent-level-declaration 3
"Indentation of declarations with respect to containing block.
Set to 0 to get them list right under containing block."
:group 'verilog-mode-indent
:type 'integer)
-(put 'verilog-indent-level-declaration 'safe-local-variable 'integerp)
+(put 'verilog-indent-level-declaration 'safe-local-variable #'integerp)
(defcustom verilog-indent-declaration-macros nil
"How to treat macro expansions in a declaration.
@@ -640,7 +650,7 @@ If non-nil, treat as:
output c;"
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-indent-declaration-macros 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-indent-declaration-macros 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-indent-lists t
"How to treat indenting items in a list.
@@ -653,72 +663,72 @@ If nil, treat as:
reset ) begin"
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-indent-lists 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-indent-lists 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-indent-level-behavioral 3
"Absolute indentation of first begin in a task or function block.
Set to 0 to get such code to start at the left side of the screen."
:group 'verilog-mode-indent
:type 'integer)
-(put 'verilog-indent-level-behavioral 'safe-local-variable 'integerp)
+(put 'verilog-indent-level-behavioral 'safe-local-variable #'integerp)
(defcustom verilog-indent-level-directive 1
"Indentation to add to each level of \\=`ifdef declarations.
Set to 0 to have all directives start at the left side of the screen."
:group 'verilog-mode-indent
:type 'integer)
-(put 'verilog-indent-level-directive 'safe-local-variable 'integerp)
+(put 'verilog-indent-level-directive 'safe-local-variable #'integerp)
(defcustom verilog-cexp-indent 2
"Indentation of Verilog statements split across lines."
:group 'verilog-mode-indent
:type 'integer)
-(put 'verilog-cexp-indent 'safe-local-variable 'integerp)
+(put 'verilog-cexp-indent 'safe-local-variable #'integerp)
(defcustom verilog-case-indent 2
"Indentation for case statements."
:group 'verilog-mode-indent
:type 'integer)
-(put 'verilog-case-indent 'safe-local-variable 'integerp)
+(put 'verilog-case-indent 'safe-local-variable #'integerp)
(defcustom verilog-auto-newline t
"Non-nil means automatically newline after semicolons."
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-auto-newline 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-newline 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-indent-on-newline t
"Non-nil means automatically indent line after newline."
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-auto-indent-on-newline 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-indent-on-newline 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-tab-always-indent t
"Non-nil means TAB should always re-indent the current line.
A nil value means TAB will only reindent when at the beginning of the line."
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-tab-always-indent 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-tab-always-indent 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-tab-to-comment nil
"Non-nil means TAB moves to the right hand column in preparation for a comment."
:group 'verilog-mode-actions
:type 'boolean)
-(put 'verilog-tab-to-comment 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-tab-to-comment 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-indent-begin-after-if t
"Non-nil means indent begin statements following if, else, while, etc.
Otherwise, line them up."
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-indent-begin-after-if 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-indent-begin-after-if 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-align-ifelse nil
"Non-nil means align `else' under matching `if'.
Otherwise else is lined up with first character on line holding matching if."
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-align-ifelse 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-align-ifelse 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-minimum-comment-distance 10
"Minimum distance (in lines) between begin and end required before a comment.
@@ -726,7 +736,7 @@ Setting this variable to zero results in every end acquiring a comment; the
default avoids too many redundant comments in tight quarters."
:group 'verilog-mode-indent
:type 'integer)
-(put 'verilog-minimum-comment-distance 'safe-local-variable 'integerp)
+(put 'verilog-minimum-comment-distance 'safe-local-variable #'integerp)
(defcustom verilog-highlight-p1800-keywords nil
"Obsolete.
@@ -734,7 +744,7 @@ Was non-nil means highlight SystemVerilog IEEE-1800 differently.
All code is now highlighted as if SystemVerilog IEEE-1800."
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-highlight-p1800-keywords 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-highlight-p1800-keywords 'safe-local-variable #'verilog-booleanp)
(make-obsolete-variable 'verilog-highlight-p1800-keywords nil "27.1")
(defcustom verilog-highlight-grouping-keywords nil
@@ -745,7 +755,7 @@ Some find that special highlighting on these grouping constructs
allow the structure of the code to be understood at a glance."
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-highlight-grouping-keywords 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-highlight-grouping-keywords 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-highlight-modules nil
"Non-nil means highlight module statements for `verilog-load-file-at-point'.
@@ -754,7 +764,7 @@ module definition. If false, this is not supported. Setting
this is experimental, and may lead to bad performance."
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-highlight-modules 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-highlight-modules 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-highlight-includes t
"Non-nil means highlight module statements for `verilog-load-file-at-point'.
@@ -762,7 +772,17 @@ When true, mousing over include file names will allow jumping to the
file referenced. If false, this is not supported."
:group 'verilog-mode-indent
:type 'boolean)
-(put 'verilog-highlight-includes 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-highlight-includes 'safe-local-variable #'verilog-booleanp)
+
+(defcustom verilog-highlight-max-lookahead 10000
+ "Maximum size of declaration statement that undergoes highlighting.
+Highlighting is performed only on the first `verilog-highlight-max-lookahead'
+characters in a declaration statement.
+Setting this variable to zero would remove this limit. Note that removing
+the limit can greatly slow down highlighting for very large files."
+ :group 'verilog-mode-indent
+ :type 'integer)
+(put 'verilog-highlight-max-lookahead 'safe-local-variable #'integerp)
(defcustom verilog-auto-declare-nettype nil
"Non-nil specifies the data type to use with `verilog-auto-input' etc.
@@ -772,14 +792,14 @@ mode is experimental."
:version "24.1" ; rev670
:group 'verilog-mode-actions
:type 'boolean)
-(put 'verilog-auto-declare-nettype 'safe-local-variable 'stringp)
+(put 'verilog-auto-declare-nettype 'safe-local-variable #'stringp)
(defcustom verilog-auto-wire-comment t
"Non-nil indicates to insert to/from comments with `verilog-auto-wire' etc."
:version "25.1"
:group 'verilog-mode-actions
:type 'boolean)
-(put 'verilog-auto-wire-comment 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-wire-comment 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-wire-type nil
"Non-nil specifies the data type to use with `verilog-auto-wire' etc.
@@ -790,21 +810,21 @@ containing SystemVerilog cells."
:version "24.1" ; rev673
:group 'verilog-mode-actions
:type '(choice (const nil) string))
-(put 'verilog-auto-wire-type 'safe-local-variable 'stringp)
+(put 'verilog-auto-wire-type 'safe-local-variable #'stringp)
(defcustom verilog-auto-endcomments t
"Non-nil means insert a comment /* ... */ after `end's.
The name of the function or case will be set between the braces."
:group 'verilog-mode-actions
:type 'boolean)
-(put 'verilog-auto-endcomments 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-endcomments 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-delete-trailing-whitespace nil
"Non-nil means to `delete-trailing-whitespace' in `verilog-auto'."
:version "24.1" ; rev703
:group 'verilog-mode-actions
:type 'boolean)
-(put 'verilog-auto-delete-trailing-whitespace 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-delete-trailing-whitespace 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-ignore-concat nil
"Non-nil means ignore signals in {...} concatenations for AUTOWIRE etc.
@@ -812,7 +832,7 @@ This will exclude signals referenced as pin connections in {...}
or (...) from AUTOWIRE, AUTOOUTPUT and friends."
:group 'verilog-mode-actions
:type 'boolean)
-(put 'verilog-auto-ignore-concat 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-ignore-concat 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-read-includes nil
"Non-nil means to automatically read includes before AUTOs.
@@ -822,7 +842,7 @@ but can result in very slow reading times if there are many or large
include files."
:group 'verilog-mode-actions
:type 'boolean)
-(put 'verilog-auto-read-includes 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-read-includes 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-save-policy nil
"Non-nil indicates action to take when saving a Verilog buffer with AUTOs.
@@ -843,7 +863,7 @@ They will be expanded in the same way as if there was an AUTOINST in the
instantiation. See also `verilog-auto-star' and `verilog-auto-star-save'."
:group 'verilog-mode-actions
:type 'boolean)
-(put 'verilog-auto-star-expand 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-star-expand 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-star-save nil
"Non-nil means save to disk SystemVerilog .* instance expansions.
@@ -854,7 +874,7 @@ Instead of setting this, you may want to use /*AUTOINST*/, which will
always be saved."
:group 'verilog-mode-actions
:type 'boolean)
-(put 'verilog-auto-star-save 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-star-save 'safe-local-variable #'verilog-booleanp)
(defvar verilog-auto-update-tick nil
"Modification tick at which autos were last performed.")
@@ -862,7 +882,7 @@ always be saved."
(defvar verilog-auto-last-file-locals nil
"Text from file-local-variables during last evaluation.")
-(defvar verilog-diff-function 'verilog-diff-report
+(defvar verilog-diff-function #'verilog-diff-report
"Function to run when `verilog-diff-auto' detects differences.
Function takes three arguments, the original buffer, the
difference buffer, and the point in original buffer with the
@@ -917,7 +937,7 @@ See `compilation-error-regexp-alist' for the formatting. For Emacs 22+.")
;; Emacs form is '((v-tool "re" 1 2) ...)
;; XEmacs form is '(verilog ("re" 1 2) ...)
;; So we can just map from Emacs to XEmacs
- (cons 'verilog (mapcar 'cdr verilog-error-regexp-emacs-alist))
+ (cons 'verilog (mapcar #'cdr verilog-error-regexp-emacs-alist))
"List of regexps for Verilog compilers.
See `compilation-error-regexp-alist-alist' for the formatting. For XEmacs.")
@@ -997,7 +1017,7 @@ have problems, use \\[find-alternate-file] RET to have these take effect.
See also the variables mentioned above."
:group 'verilog-mode-auto
:type '(repeat string))
-(put 'verilog-library-flags 'safe-local-variable 'listp)
+(put 'verilog-library-flags 'safe-local-variable #'listp)
(defcustom verilog-library-directories '(".")
"List of directories when looking for files for /*AUTOINST*/.
@@ -1020,7 +1040,7 @@ See also `verilog-library-flags', `verilog-library-files'
and `verilog-library-extensions'."
:group 'verilog-mode-auto
:type '(repeat file))
-(put 'verilog-library-directories 'safe-local-variable 'listp)
+(put 'verilog-library-directories 'safe-local-variable #'listp)
(defcustom verilog-library-files '()
"List of files to search for modules.
@@ -1042,14 +1062,14 @@ have problems, use \\[find-alternate-file] RET to have these take effect.
See also `verilog-library-flags', `verilog-library-directories'."
:group 'verilog-mode-auto
:type '(repeat directory))
-(put 'verilog-library-files 'safe-local-variable 'listp)
+(put 'verilog-library-files 'safe-local-variable #'listp)
(defcustom verilog-library-extensions '(".v" ".va" ".sv")
"List of extensions to use when looking for files for /*AUTOINST*/.
See also `verilog-library-flags', `verilog-library-directories'."
:type '(repeat string)
:group 'verilog-mode-auto)
-(put 'verilog-library-extensions 'safe-local-variable 'listp)
+(put 'verilog-library-extensions 'safe-local-variable #'listp)
(defcustom verilog-active-low-regexp nil
"If true, treat signals matching this regexp as active low.
@@ -1057,7 +1077,7 @@ This is used for AUTORESET and AUTOTIEOFF. For proper behavior,
you will probably also need `verilog-auto-reset-widths' set."
:group 'verilog-mode-auto
:type '(choice (const nil) regexp))
-(put 'verilog-active-low-regexp 'safe-local-variable 'stringp)
+(put 'verilog-active-low-regexp 'safe-local-variable #'stringp)
(defcustom verilog-auto-sense-include-inputs nil
"Non-nil means AUTOSENSE should include all inputs.
@@ -1065,7 +1085,7 @@ If nil, only inputs that are NOT output signals in the same block are
included."
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-sense-include-inputs 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-sense-include-inputs 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-sense-defines-constant nil
"Non-nil means AUTOSENSE should assume all defines represent constants.
@@ -1074,7 +1094,7 @@ maintain compatibility with other sites, this should be set at the bottom
of each Verilog file that requires it, rather than being set globally."
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-sense-defines-constant 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-sense-defines-constant 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-simplify-expressions t
"Non-nil means AUTOs will simplify expressions when calculating bit ranges.
@@ -1086,7 +1106,7 @@ file that requires it, rather than being set globally."
:version "27.1"
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-simplify-expressions 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-simplify-expressions 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-reset-blocking-in-non t
"Non-nil means AUTORESET will reset blocking statements.
@@ -1101,7 +1121,7 @@ those temporaries reset. See example in `verilog-auto-reset'."
:version "24.1" ; rev718
:type 'boolean
:group 'verilog-mode-auto)
-(put 'verilog-auto-reset-blocking-in-non 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-reset-blocking-in-non 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-reset-widths t
"True means AUTORESET should determine the width of signals.
@@ -1124,7 +1144,7 @@ SystemVerilog designs."
"Text used for delays in delayed assignments. Add a trailing space if set."
:group 'verilog-mode-auto
:type 'string)
-(put 'verilog-assignment-delay 'safe-local-variable 'stringp)
+(put 'verilog-assignment-delay 'safe-local-variable #'stringp)
(defcustom verilog-auto-arg-format 'packed
"Formatting to use for AUTOARG signal names.
@@ -1150,7 +1170,7 @@ it's bad practice to rely on order based instantiations anyhow.
See also `verilog-auto-inst-sort'."
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-arg-sort 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-arg-sort 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-inst-dot-name nil
"Non-nil means when creating ports with AUTOINST, use .name syntax.
@@ -1160,7 +1180,7 @@ simulators. Setting `verilog-auto-inst-vector' to nil may also
be desirable to increase how often .name will be used."
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-inst-dot-name 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-inst-dot-name 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-inst-param-value nil
"Non-nil means AUTOINST will replace parameters with the parameter value.
@@ -1227,7 +1247,7 @@ This second expansion of parameter types can be overridden with
`verilog-auto-inst-param-value-type'."
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-inst-param-value 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-inst-param-value 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-inst-param-value-type t
"Non-nil means expand parameter type in instantiations.
@@ -1237,7 +1257,7 @@ See `verilog-auto-inst-param-value'."
:version "25.1"
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-inst-param-value-type 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-inst-param-value-type 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-inst-sort nil
"Non-nil means AUTOINST signals will be sorted, not in declaration order.
@@ -1250,7 +1270,7 @@ See also `verilog-auto-arg-sort'."
:version "24.1" ; rev688
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-inst-sort 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-inst-sort 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-inst-vector t
"True means when creating default ports with AUTOINST, use bus subscripts.
@@ -1292,48 +1312,48 @@ to a net with the same name as the port."
:version "28.0"
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-inst-template-required 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-inst-template-required 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-inst-column 40
"Indent-to column number for net name part of AUTOINST created pin."
:group 'verilog-mode-indent
:type 'integer)
-(put 'verilog-auto-inst-column 'safe-local-variable 'integerp)
+(put 'verilog-auto-inst-column 'safe-local-variable #'integerp)
(defcustom verilog-auto-inst-interfaced-ports nil
"Non-nil means include interfaced ports in AUTOINST expansions."
:version "24.3" ; rev773, default change rev815
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-inst-interfaced-ports 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-inst-interfaced-ports 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-input-ignore-regexp nil
"If non-nil, when creating AUTOINPUT, ignore signals matching this regexp.
See the \\[verilog-faq] for examples on using this."
:group 'verilog-mode-auto
:type '(choice (const nil) regexp))
-(put 'verilog-auto-input-ignore-regexp 'safe-local-variable 'stringp)
+(put 'verilog-auto-input-ignore-regexp 'safe-local-variable #'stringp)
(defcustom verilog-auto-reg-input-assigned-ignore-regexp nil
"If non-nil, when creating AUTOINPUTREG, ignore signals matching this regexp."
:version "27.1"
:group 'verilog-mode-auto
:type '(choice (const nil) regexp))
-(put 'verilog-auto-reg-input-assigned-ignore-regexp 'safe-local-variable 'stringp)
+(put 'verilog-auto-reg-input-assigned-ignore-regexp 'safe-local-variable #'stringp)
(defcustom verilog-auto-inout-ignore-regexp nil
"If non-nil, when creating AUTOINOUT, ignore signals matching this regexp.
See the \\[verilog-faq] for examples on using this."
:group 'verilog-mode-auto
:type '(choice (const nil) regexp))
-(put 'verilog-auto-inout-ignore-regexp 'safe-local-variable 'stringp)
+(put 'verilog-auto-inout-ignore-regexp 'safe-local-variable #'stringp)
(defcustom verilog-auto-output-ignore-regexp nil
"If non-nil, when creating AUTOOUTPUT, ignore signals matching this regexp.
See the \\[verilog-faq] for examples on using this."
:group 'verilog-mode-auto
:type '(choice (const nil) regexp))
-(put 'verilog-auto-output-ignore-regexp 'safe-local-variable 'stringp)
+(put 'verilog-auto-output-ignore-regexp 'safe-local-variable #'stringp)
(defcustom verilog-auto-template-warn-unused nil
"Non-nil means report warning if an AUTO_TEMPLATE line is not used.
@@ -1341,7 +1361,7 @@ This feature is not supported before Emacs 21.1 or XEmacs 21.4."
:version "24.3" ; rev787
:group 'verilog-mode-auto
:type 'boolean)
-(put 'verilog-auto-template-warn-unused 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-template-warn-unused 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-auto-tieoff-declaration "wire"
"Data type used for the declaration for AUTOTIEOFF.
@@ -1350,21 +1370,21 @@ assignment, else the data type for variable creation."
:version "24.1" ; rev713
:group 'verilog-mode-auto
:type 'string)
-(put 'verilog-auto-tieoff-declaration 'safe-local-variable 'stringp)
+(put 'verilog-auto-tieoff-declaration 'safe-local-variable #'stringp)
(defcustom verilog-auto-tieoff-ignore-regexp nil
"If non-nil, when creating AUTOTIEOFF, ignore signals matching this regexp.
See the \\[verilog-faq] for examples on using this."
:group 'verilog-mode-auto
:type '(choice (const nil) regexp))
-(put 'verilog-auto-tieoff-ignore-regexp 'safe-local-variable 'stringp)
+(put 'verilog-auto-tieoff-ignore-regexp 'safe-local-variable #'stringp)
(defcustom verilog-auto-unused-ignore-regexp nil
"If non-nil, when creating AUTOUNUSED, ignore signals matching this regexp.
See the \\[verilog-faq] for examples on using this."
:group 'verilog-mode-auto
:type '(choice (const nil) regexp))
-(put 'verilog-auto-unused-ignore-regexp 'safe-local-variable 'stringp)
+(put 'verilog-auto-unused-ignore-regexp 'safe-local-variable #'stringp)
(defcustom verilog-case-fold t
"Non-nil means `verilog-mode' regexps should ignore case.
@@ -1372,7 +1392,7 @@ This variable is t for backward compatibility; nil is suggested."
:version "24.4"
:group 'verilog-mode
:type 'boolean)
-(put 'verilog-case-fold 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-case-fold 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-typedef-regexp nil
"If non-nil, regular expression that matches Verilog-2001 typedef names.
@@ -1380,9 +1400,9 @@ For example, \"_t$\" matches typedefs named with _t, as in the C language.
See also `verilog-case-fold'."
:group 'verilog-mode-auto
:type '(choice (const nil) regexp))
-(put 'verilog-typedef-regexp 'safe-local-variable 'stringp)
+(put 'verilog-typedef-regexp 'safe-local-variable #'stringp)
-(defcustom verilog-mode-hook 'verilog-set-compile-command
+(defcustom verilog-mode-hook (list #'verilog-set-compile-command)
"Hook run after Verilog mode is loaded."
:type 'hook
:group 'verilog-mode)
@@ -2035,17 +2055,25 @@ be substituted."
(set (make-local-variable 'verilog-compile-command-post-mod)
compile-command))))
-(if (featurep 'xemacs)
+(when (featurep 'xemacs)
+ (defvar compilation-error-regexp-systems-alist)
+ (if (not (and (= emacs-major-version 21) (<= emacs-minor-version 4)))
+ ;; XEmacs 21.5 and newer match GNU, see bug1700
+ (defun verilog-error-regexp-add-xemacs ()
+ (interactive)
+ (verilog-error-regexp-add-xemacs))
+ ;; XEmacs 21.4 and older
;; Following code only gets called from compilation-mode-hook on XEmacs to add error handling.
(defun verilog-error-regexp-add-xemacs ()
- "Teach XEmacs about verilog errors.
+ "Teach XEmacs about Verilog errors.
Called by `compilation-mode-hook'. This allows \\[next-error] to
find the errors."
(interactive)
(if (boundp 'compilation-error-regexp-systems-alist)
(if (and
(not (equal compilation-error-regexp-systems-list 'all))
- (not (member compilation-error-regexp-systems-list 'verilog)))
+ ;; eval required due to bug1700, XEmacs otherwise errors on compile
+ (not (eval "(member compilation-error-regexp-systems-list 'verilog)")))
(push 'verilog compilation-error-regexp-systems-list)))
(if (boundp 'compilation-error-regexp-alist-alist)
(if (not (assoc 'verilog compilation-error-regexp-alist-alist))
@@ -2060,7 +2088,7 @@ find the errors."
;; Need to re-run compilation-error-regexp builder
(if (fboundp 'compilation-build-compilation-error-regexp-alist)
(compilation-build-compilation-error-regexp-alist))
- ))
+ )))
;; Following code only gets called from compilation-mode-hook on Emacs to add error handling.
(defun verilog-error-regexp-add-emacs ()
@@ -2076,8 +2104,10 @@ find the errors."
(push item compilation-error-regexp-alist-alist))
verilog-error-regexp-emacs-alist))))
-(if (featurep 'xemacs) (add-hook 'compilation-mode-hook 'verilog-error-regexp-add-xemacs))
-(if (featurep 'emacs) (add-hook 'compilation-mode-hook 'verilog-error-regexp-add-emacs))
+(add-hook 'compilation-mode-hook
+ (if (featurep 'xemacs)
+ #'verilog-error-regexp-add-xemacs
+ #'verilog-error-regexp-add-emacs))
(defconst verilog-compiler-directives
(eval-when-compile
@@ -2285,7 +2315,8 @@ find the errors."
"`ovm_update_sequence_lib_and_item"
"`ovm_warning"
"`static_dut_error"
- "`static_message") nil )))
+ "`static_message")
+ nil )))
(defconst verilog-uvm-statement-re
(eval-when-compile
@@ -2424,7 +2455,8 @@ find the errors."
"`uvm_update_sequence_lib" ; Deprecated in 1.1
"`uvm_update_sequence_lib_and_item" ; Deprecated in 1.1
"`uvm_warning"
- "`uvm_warning_context") nil )))
+ "`uvm_warning_context")
+ nil )))
;;
@@ -2566,10 +2598,10 @@ find the errors."
"\\(property\\)\\|" ; 16
"\\(connectmodule\\)\\|" ; 17
"\\)\\>\\)"))
+
(defconst verilog-end-block-re
(eval-when-compile
(verilog-regexp-words
-
'("end" ; closes begin
"endcase" ; closes any of case, casex casez or randcase
"join" "join_any" "join_none" ; closes fork
@@ -2606,7 +2638,6 @@ find the errors."
"`vmm_xactor_member_end"
))))
-
(defconst verilog-endcomment-reason-re
;; Parenthesis indicate type of keyword found
(concat
@@ -2775,6 +2806,8 @@ find the errors."
"shortreal" "real" "realtime"
;; net_type
"supply0" "supply1" "tri" "triand" "trior" "trireg" "tri0" "tri1" "uwire" "wire" "wand" "wor"
+ ;; parameters
+ "localparam" "parameter" "var"
;; misc
"string" "event" "chandle" "virtual" "enum" "genvar"
"struct" "union"
@@ -3310,13 +3343,20 @@ See also `verilog-font-lock-extra-types'.")
'("\\<function\\>\\s-+\\(\\sw+\\)"
1 'font-lock-constant-face append)
;; Fontify variable names in declarations
- (list ;; Implemented as an anchored-matcher
- (concat verilog-declaration-re
- " *\\(" verilog-range-re "\\)?")
- (list ;; anchored-highlighter
- (concat "\\_<\\(" verilog-symbol-re "\\)"
- " *\\(" verilog-range-re "\\)?*")
- nil nil '(1 font-lock-variable-name-face))))))
+ (list
+ verilog-declaration-re
+ (list
+ ;; Anchored matcher (lookup Search-Based Fontification)
+ 'verilog-declaration-varname-matcher
+ ;; Pre-form for this anchored matcher:
+ ;; First, avoid declaration keywords written in comments,
+ ;; which can also trigger this anchor.
+ '(if (not (verilog-in-comment-p))
+ (verilog-single-declaration-end verilog-highlight-max-lookahead)
+ (point)) ;; => current declaration statement is of 0 length
+ nil ;; Post-form: nothing to be done
+ '(0 font-lock-variable-name-face t t)))
+ )))
(setq verilog-font-lock-keywords-2
@@ -3402,7 +3442,7 @@ For insignificant changes, see instead `verilog-save-buffer-state'."
(verilog-run-hooks 'verilog-before-save-font-hook)
(let* ((verilog-save-font-mod-hooked (- (point-max) (point-min)))
;; Significant speed savings with no font-lock properties
- (fontlocked (when (and (boundp 'font-lock-mode) font-lock-mode)
+ (fontlocked (when font-lock-mode
(font-lock-mode 0)
t)))
(run-hook-with-args 'before-change-functions (point-min) (point-max))
@@ -3564,6 +3604,87 @@ inserted using a single call to `verilog-insert'."
(defun verilog-declaration-end ()
(search-forward ";"))
+(defun verilog-single-declaration-end (limit)
+ "Returns pos where current (single) declaration statement ends.
+Also, this function moves POINT forward to the start of a variable name
+(skipping the range-part and whitespace).
+Function expected to be called with POINT just after a declaration keyword.
+LIMIT sets the max POINT for searching and moving to. No such limit if LIMIT
+is 0.
+
+Meaning of *single* declaration:
+ Eg. In a module's port-list -
+ module test(input clk, rst, x, output [1:0] y);
+ Here 'input clk, rst, x' is 1 *single* declaration statement,
+and 'output [1:0] y' is the other single declaration. In the 1st single
+declaration, POINT is moved to start of 'clk'. And in the 2nd declaration,
+POINT is moved to 'y'."
+
+
+ (let (maxpoint old-point)
+ ;; maxpoint = min(curr-point + limit, buffer-size)
+ (setq maxpoint (if (eq limit 0)
+ (point-max) ;; no bounds if search-bound is zero
+ (+ (point) limit)))
+ (if (> maxpoint (buffer-size)) (setq maxpoint (buffer-size)))
+
+ ;; Skip comment - range - comment
+ (verilog-forward-ws&directives maxpoint)
+ (when (eq (char-after) ?\[)
+ (re-search-forward verilog-range-re maxpoint t))
+ (verilog-forward-ws&directives maxpoint)
+
+ ;; Move forward until a delimiter is reached which marks end of current
+ ;; single declaration. Return point at found delimiter
+ (save-excursion
+ (while (and (< (point) maxpoint)
+ (not (eq old-point (point)))
+ (not (eq (char-after) ?\; ))
+ (not (eq (char-after) ?\) ))
+ (not (looking-at verilog-declaration-re)))
+ (setq old-point (point))
+ (ignore-errors
+ (forward-sexp)
+ (verilog-forward-ws&directives maxpoint)
+ (when (eq (char-after) ?,)
+ (forward-char)
+ (verilog-forward-ws&directives maxpoint))))
+ (point))))
+
+(defun verilog-declaration-varname-matcher (limit)
+ "Match first variable name b/w POINT & LIMIT, move POINT to next variable.
+Expected to be called within a declaration statement, with POINT already beyond
+the declaration keyword and range ([a:b])
+This function moves POINT to the next variable within the same declaration (if
+it exists).
+LIMIT is expected to be the pos at which current single-declaration ends,
+obtained using `verilog-single-declaration-end'."
+
+ (let (found-var old-point)
+
+ ;; Remove starting whitespace
+ (verilog-forward-ws&directives limit)
+
+ (when (< (point) limit) ;; no matching if this is violated
+
+ ;; Find the variable name (match-data is set here)
+ (setq found-var (re-search-forward verilog-symbol-re limit t))
+
+ ;; Walk to this variable's delimiter
+ (save-match-data
+ (verilog-forward-ws&directives limit)
+ (setq old-point nil)
+ (while (and (< (point) limit)
+ (not (member (char-after) '(?, ?\) ?\;)))
+ (not (eq old-point (point))))
+ (setq old-point (point))
+ (verilog-forward-ws&directives limit)
+ (forward-sexp)
+ (verilog-forward-ws&directives limit))
+ ;; Only a comma or semicolon expected at this point
+ (skip-syntax-forward "."))
+ found-var)))
+
(defun verilog-point-text (&optional pointnum)
"Return text describing where POINTNUM or current point is (for errors).
Use filename, if current buffer being edited shorten to just buffer name."
@@ -3934,13 +4055,13 @@ Key bindings specific to `verilog-mode-map' are:
\\{verilog-mode-map}"
:abbrev-table verilog-mode-abbrev-table
(set (make-local-variable 'beginning-of-defun-function)
- 'verilog-beg-of-defun)
+ #'verilog-beg-of-defun)
(set (make-local-variable 'end-of-defun-function)
- 'verilog-end-of-defun)
+ #'verilog-end-of-defun)
(set-syntax-table verilog-mode-syntax-table)
(set (make-local-variable 'indent-line-function)
#'verilog-indent-line-relative)
- (set (make-local-variable 'comment-indent-function) 'verilog-comment-indent)
+ (set (make-local-variable 'comment-indent-function) #'verilog-comment-indent)
(set (make-local-variable 'parse-sexp-ignore-comments) nil)
(set (make-local-variable 'comment-start) "// ")
(set (make-local-variable 'comment-end) "")
@@ -3951,7 +4072,7 @@ Key bindings specific to `verilog-mode-map' are:
(setq verilog-tool 'verilog-linter)
(verilog-set-compile-command)
(when (boundp 'hack-local-variables-hook) ; Also modify any file-local-variables
- (add-hook 'hack-local-variables-hook 'verilog-modify-compile-command t))
+ (add-hook 'hack-local-variables-hook #'verilog-modify-compile-command t))
;; Setting up menus
(when (featurep 'xemacs)
@@ -3973,6 +4094,10 @@ Key bindings specific to `verilog-mode-map' are:
;; verilog-beg-of-defun.
nil
'verilog-beg-of-defun)))
+
+ ;; Stuff for multiline font-lock
+ (set (make-local-variable 'font-lock-multiline) t)
+
;;------------------------------------------------------------
;; now hook in 'verilog-highlight-include-files (eldo-mode.el&spice-mode.el)
;; all buffer local:
@@ -3981,9 +4106,9 @@ Key bindings specific to `verilog-mode-map' are:
(make-local-hook 'font-lock-mode-hook)
(make-local-hook 'font-lock-after-fontify-buffer-hook); doesn't exist in Emacs
(make-local-hook 'after-change-functions))
- (add-hook 'font-lock-mode-hook 'verilog-highlight-buffer t t)
- (add-hook 'font-lock-after-fontify-buffer-hook 'verilog-highlight-buffer t t) ; not in Emacs
- (add-hook 'after-change-functions 'verilog-highlight-region t t))
+ (add-hook 'font-lock-mode-hook #'verilog-highlight-buffer t t)
+ (add-hook 'font-lock-after-fontify-buffer-hook #'verilog-highlight-buffer t t) ; not in Emacs
+ (add-hook 'after-change-functions #'verilog-highlight-region t t))
;; Tell imenu how to handle Verilog.
(set (make-local-variable 'imenu-generic-expression)
@@ -4005,7 +4130,7 @@ Key bindings specific to `verilog-mode-map' are:
;; Stuff for autos
(add-hook (if (boundp 'write-contents-hooks) 'write-contents-hooks
'write-contents-functions) ; Emacs >= 22.1
- 'verilog-auto-save-check nil 'local)
+ #'verilog-auto-save-check nil 'local)
;; verilog-mode-hook call added by define-derived-mode
)
@@ -5410,7 +5535,7 @@ FILENAME to find directory to run in, or defaults to `buffer-file-name'."
default nil nil
'verilog-preprocess-history default)))))
(unless command (setq command (verilog-expand-command verilog-preprocessor)))
- (let* ((fontlocked (and (boundp 'font-lock-mode) font-lock-mode))
+ (let* ((fontlocked font-lock-mode)
(dir (file-name-directory (or filename buffer-file-name)))
(cmd (concat "cd " dir "; " command)))
(with-output-to-temp-buffer "*Verilog-Preprocessed*"
@@ -5424,22 +5549,23 @@ FILENAME to find directory to run in, or defaults to `buffer-file-name'."
;; We should use font-lock-ensure in preference to
;; font-lock-fontify-buffer, but IIUC the problem this is supposed to
;; solve only appears in Emacsen older than font-lock-ensure anyway.
- ;; So avoid bytecomp's interactive-only by going through intern.
- (when fontlocked (funcall (intern "font-lock-fontify-buffer"))))))))
+ (when fontlocked
+ (verilog--supressed-warnings
+ ((interactive-only font-lock-fontify-buffer))
+ (font-lock-fontify-buffer))))))))
;;; Batch:
;;
(defun verilog-warn (string &rest args)
"Print a warning with `format' using STRING and optional ARGS."
- (apply 'message (concat "%%Warning: " string) args))
+ (apply #'message (concat "%%Warning: " string) args))
(defun verilog-warn-error (string &rest args)
"Call `error' using STRING and optional ARGS.
If `verilog-warn-fatal' is non-nil, call `verilog-warn' instead."
- (if verilog-warn-fatal
- (apply 'error string args)
- (apply 'verilog-warn string args)))
+ (apply (if verilog-warn-fatal #'error #'verilog-warn)
+ string args))
(defmacro verilog-batch-error-wrapper (&rest body)
"Execute BODY and add error prefix to any errors found.
@@ -6452,6 +6578,7 @@ Return >0 for nested struct."
(let ((p (point)))
(and
(equal (char-after) ?\{)
+ (not (verilog-at-streaming-op-p))
(ignore-errors (forward-list))
(progn (backward-char 1)
(verilog-backward-ws&directives)
@@ -6489,6 +6616,18 @@ Return >0 for nested struct."
;; not
nil))
+(defconst verilog-streaming-op-re
+ ;; Regexp to detect Streaming Operator expressions
+ (concat
+ "{" "\\s-*"
+ "\\(<<\\|>>\\)" ".*"
+ "{" ".*" "}" "\\s-*" "}"
+ ))
+
+(defun verilog-at-streaming-op-p ()
+ "If at the { of a streaming operator, return t."
+ (looking-at verilog-streaming-op-re))
+
(defun verilog-at-struct-p ()
"If at the { of a struct, return true, not moving point."
(save-excursion
@@ -7961,6 +8100,8 @@ See also `verilog-sk-header' for an alternative format."
;; Unfortunately we use 'assoc' on this, so can't be a vector
(defsubst verilog-sig-new (name bits comment mem enum signed type multidim modport)
(list name bits comment mem enum signed type multidim modport))
+(defsubst verilog-sig-new-renamed (name old-sig)
+ (cons name (cdr old-sig)))
(defsubst verilog-sig-name (sig)
(car sig))
(defsubst verilog-sig-bits (sig) ; First element of packed array (pre signal-name)
@@ -8315,7 +8456,7 @@ Tieoff value uses `verilog-active-low-regexp' and
(t
(let* ((width (verilog-sig-width sig)))
(cond ((not width)
- "`0/*NOWIDTH*/")
+ "'0/*NOWIDTH*/")
((string-match "^[0-9]+$" width)
(concat width (if (verilog-sig-signed sig) "'sh0" "'h0")))
(t
@@ -8497,9 +8638,25 @@ Optional NUM-PARAM and MAX-PARAM check for a specific number of parameters."
(error "%s: Expected <= %d parameters" (verilog-point-text) max-param))
(nreverse olist)))
+;; Prevent compile warnings; these are let's, not globals.
+(defvar sigs-in)
+(defvar sigs-inout)
+(defvar sigs-intf)
+(defvar sigs-intfd)
+(defvar sigs-out)
+(defvar sigs-out-d)
+(defvar sigs-out-i)
+(defvar sigs-out-unk)
+(defvar sigs-temp)
+;; These are known to be from other packages and may not be defined
+(defvar diff-command)
+;; There are known to be from newer versions of Emacs
+(defvar create-lockfiles)
+(defvar which-func-modes)
+
(defun verilog-read-decls ()
"Compute signal declaration information for the current module at point.
-Return an array of [outputs inouts inputs wire reg assign const]."
+Return an array of [outputs inouts inputs wire reg assign const gparam intf]."
(let ((end-mod-point (or (verilog-get-end-of-defun) (point-max)))
(functask 0) (paren 0) (sig-paren 0) (v2kargs-ok t)
in-modport in-clocking in-ign-to-semi ptype ign-prop
@@ -8777,25 +8934,6 @@ Return an array of [outputs inouts inputs wire reg assign const]."
(defvar verilog-read-sub-decls-gate-ios nil
"For `verilog-read-sub-decls', gate IO pins remaining, nil if non-primitive.")
-(eval-when-compile
- ;; Prevent compile warnings; these are let's, not globals
- ;; Do not remove the eval-when-compile
- ;; - we want an error when we are debugging this code if they are refed.
- (defvar sigs-in)
- (defvar sigs-inout)
- (defvar sigs-intf)
- (defvar sigs-intfd)
- (defvar sigs-out)
- (defvar sigs-out-d)
- (defvar sigs-out-i)
- (defvar sigs-out-unk)
- (defvar sigs-temp)
- ;; These are known to be from other packages and may not be defined
- (defvar diff-command)
- ;; There are known to be from newer versions of Emacs
- (defvar create-lockfiles)
- (defvar which-func-modes))
-
(defun verilog-read-sub-decls-type (par-values portdata)
"For `verilog-read-sub-decls-line', decode a signal type."
(let* ((type (verilog-sig-type portdata))
@@ -8894,7 +9032,8 @@ Return an array of [outputs inouts inputs wire reg assign const]."
"For `verilog-read-sub-decls-line', parse a subexpression and add signals."
;;(message "vrsde: `%s'" expr)
;; Replace special /*[....]*/ comments inserted by verilog-auto-inst-port
- (setq expr (verilog-string-replace-matches "/\\*\\(\\.?\\[[^*]+\\]\\)\\*/" "\\1" nil nil expr))
+ (setq expr (verilog-string-replace-matches
+ "/\\*\\(\\.?\\[\\([^*]+\\|[*][^/]\\)+\\]\\)\\*/" "\\1" nil nil expr))
;; Remove front operators
(setq expr (verilog-string-replace-matches "^\\s-*[---+~!|&]+\\s-*" "" nil nil expr))
;;
@@ -9809,10 +9948,10 @@ Use DEFAULT-DIR to anchor paths if non-nil."
"Convert `verilog-library-flags' into standard library variables."
;; If the flags are local, then all the outputs should be local also
(when (local-variable-p 'verilog-library-flags (current-buffer))
- (mapc 'make-local-variable '(verilog-library-extensions
- verilog-library-directories
- verilog-library-files
- verilog-library-flags)))
+ (mapc #'make-local-variable '(verilog-library-extensions
+ verilog-library-directories
+ verilog-library-files
+ verilog-library-flags)))
;; Allow user to customize
(verilog-run-hooks 'verilog-before-getopt-flags-hook)
;; Process arguments
@@ -10017,7 +10156,7 @@ Or, just the existing dirnames themselves if there are no wildcards."
(setq dirnames (reverse dirnames)) ; not nreverse
(let ((dirlist nil)
pattern dirfile dirfiles dirname root filename rest basefile)
- (setq dirnames (mapcar 'substitute-in-file-name dirnames))
+ (setq dirnames (mapcar #'substitute-in-file-name dirnames))
(while dirnames
(setq dirname (car dirnames)
dirnames (cdr dirnames))
@@ -10210,7 +10349,7 @@ Return modi if successful, else print message unless IGNORE-ERROR is true."
(if (not (equal module realname))
(concat " (Expanded macro to " realname ")")
"")
- (mapconcat 'concat orig-filenames "\n\t")))
+ (mapconcat #'concat orig-filenames "\n\t")))
(when (eval-when-compile (fboundp 'make-hash-table))
(unless verilog-modi-lookup-cache
(setq verilog-modi-lookup-cache
@@ -10348,42 +10487,47 @@ those clocking block's signals."
(defun verilog-signals-matching-enum (in-list enum)
"Return all signals in IN-LIST matching the given ENUM."
(let (out-list)
- (while in-list
- (if (equal (verilog-sig-enum (car in-list)) enum)
- (setq out-list (cons (car in-list) out-list)))
- (setq in-list (cdr in-list)))
+ (dolist (sig in-list)
+ (if (equal (verilog-sig-enum sig) enum)
+ (push sig out-list)))
;; New scheme
;; Namespace intentionally short for AUTOs and compatibility
- (let* ((enumvar (intern (concat "venum-" enum)))
- (enumlist (and (boundp enumvar) (eval enumvar))))
- (while enumlist
- (add-to-list 'out-list (list (car enumlist)))
- (setq enumlist (cdr enumlist))))
+ (let* ((enumvar (intern (concat "venum-" enum))))
+ (dolist (en (and (boundp enumvar) (eval enumvar)))
+ (let ((sig (list en)))
+ (unless (member sig out-list)
+ (push sig out-list)))))
(nreverse out-list)))
(defun verilog-signals-matching-regexp (in-list regexp)
- "Return all signals in IN-LIST matching the given REGEXP, if non-nil."
+ "Return all signals in IN-LIST matching the given REGEXP, if non-nil.
+Allow regexp inversion if REGEXP begins with ?!."
(if (or (not regexp) (equal regexp ""))
in-list
- (let ((case-fold-search verilog-case-fold)
- out-list)
- (while in-list
- (if (string-match regexp (verilog-sig-name (car in-list)))
- (setq out-list (cons (car in-list) out-list)))
- (setq in-list (cdr in-list)))
- (nreverse out-list))))
+ (if (string-match "^\\?!" regexp)
+ (verilog-signals-not-matching-regexp in-list (substring regexp 2))
+ (let ((case-fold-search verilog-case-fold)
+ out-list)
+ (while in-list
+ (if (string-match regexp (verilog-sig-name (car in-list)))
+ (setq out-list (cons (car in-list) out-list)))
+ (setq in-list (cdr in-list)))
+ (nreverse out-list)))))
(defun verilog-signals-not-matching-regexp (in-list regexp)
- "Return all signals in IN-LIST not matching the given REGEXP, if non-nil."
+ "Return all signals in IN-LIST not matching the given REGEXP, if non-nil.
+Allow regexp inversion if REGEXP begins with ?!."
(if (or (not regexp) (equal regexp ""))
in-list
- (let ((case-fold-search verilog-case-fold)
- out-list)
- (while in-list
- (if (not (string-match regexp (verilog-sig-name (car in-list))))
- (setq out-list (cons (car in-list) out-list)))
- (setq in-list (cdr in-list)))
- (nreverse out-list))))
+ (if (string-match "^\\?!" regexp)
+ (verilog-signals-matching-regexp in-list (substring regexp 2))
+ (let ((case-fold-search verilog-case-fold)
+ out-list)
+ (while in-list
+ (if (not (string-match regexp (verilog-sig-name (car in-list))))
+ (setq out-list (cons (car in-list) out-list)))
+ (setq in-list (cdr in-list)))
+ (nreverse out-list)))))
(defun verilog-signals-matching-dir-re (in-list decl-type regexp)
"Return all signals in IN-LIST matching the given DECL-TYPE and REGEXP,
@@ -10396,7 +10540,7 @@ if non-nil."
(setq to-match (concat
decl-type
" " (verilog-sig-signed (car in-list))
- " " (verilog-sig-multidim (car in-list))
+ " " (verilog-sig-multidim-string (car in-list))
(verilog-sig-bits (car in-list))))
(if (string-match regexp to-match)
(setq out-list (cons (car in-list) out-list)))
@@ -10410,6 +10554,20 @@ if non-nil."
(verilog-sig-type-set sig nil))
sig) in-list))
+(defun verilog-signals-add-prefix (in-list prefix)
+ "Return all signals in IN-LIST with PREFIX added."
+ (if (or (not prefix) (equal prefix ""))
+ in-list
+ (let (out-list)
+ (while in-list
+ (setq out-list (cons (verilog-sig-new-renamed
+ (concat prefix (verilog-sig-name (car in-list)))
+ (car in-list))
+ out-list))
+ (setq in-list (cdr in-list)))
+ (nreverse out-list))))
+;(verilog-signals-add-prefix (list (list "foo" "...") (list "bar" "...")) "p_")
+
;; Combined
(defun verilog-decls-get-signals (decls)
"Return all declared signals in DECLS, excluding `assign' statements."
@@ -10450,7 +10608,7 @@ if non-nil."
;;
(defun verilog-auto-re-search-do (search-for func)
- "Search for given auto text regexp SEARCH-FOR, and perform FUNC where it occurs."
+ "Given start brace BRA, and end brace KET, expand one line into many lines."
(goto-char (point-min))
(while (verilog-re-search-forward-quick search-for nil t)
(funcall func)))
@@ -10540,9 +10698,7 @@ When MODI is non-null, also add to modi-cache, for tracking."
(verilog-insert "// " (verilog-sig-comment sig) "\n"))
(setq sigs (cdr sigs)))))
-(eval-when-compile
- (if (not (boundp 'indent-pt))
- (defvar indent-pt nil "Local used by `verilog-insert-indent'.")))
+(defvar indent-pt) ;; Local used by `verilog-insert-indent'.
(defun verilog-insert-indent (&rest stuff)
"Indent to position stored in local `indent-pt' variable, then insert STUFF.
@@ -10649,11 +10805,15 @@ This repairs those mis-inserted by an AUTOARG."
(match-string 3 out))
nil nil out)))
;; For precedence do *,/ before +,-,>>,<<
- (while (string-match
- (concat "\\([[({:*/<>+-]\\)"
- "\\([0-9]+\\)\\s *\\([*/]\\)\\s *\\([0-9]+\\)"
- "\\([])}:*/<>+-]\\)")
- out)
+ (while (and
+ (string-match
+ (concat "\\([[({:*/<>+-]\\)"
+ "\\([0-9]+\\)\\s *\\([*/]\\)\\s *\\([0-9]+\\)"
+ "\\([])}:*/<>+-]\\)")
+ out)
+ (not (and (equal (match-string 3 out) "/")
+ (not (equal 0 (% (string-to-number (match-string 2 out))
+ (string-to-number (match-string 4 out))))))))
(setq out (replace-match
(concat (match-string 1 out)
(if (equal (match-string 3 out) "/")
@@ -10725,6 +10885,7 @@ This repairs those mis-inserted by an AUTOARG."
;;(verilog-simplify-range-expression "[(TEST[1])-1:0]")
;;(verilog-simplify-range-expression "[1<<2:8>>2]") ; [4:2]
;;(verilog-simplify-range-expression "[2*4/(4-2) +2+4 <<4 >>2]")
+;;(verilog-simplify-range-expression "[WIDTH*2/8-1:0]")
(defun verilog-clog2 (value)
"Compute $clog2 - ceiling log2 of VALUE."
@@ -11336,6 +11497,8 @@ making verification modules that connect to UVM interfaces.
The optional fourth parameter is a regular expression, and only
signals matching the regular expression will be included.
+ The optional fifth parameter is a prefix to add to the signals.
+
Limitations:
Interface names must be resolvable to filenames. See `verilog-auto-inst'.
@@ -11349,11 +11512,12 @@ Limitations:
See the example in `verilog-auto-inout-modport'."
(save-excursion
- (let* ((params (verilog-read-auto-params 3 4))
+ (let* ((params (verilog-read-auto-params 3 5))
(submod (nth 0 params))
(modport-re (nth 1 params))
(inst-name (nth 2 params))
(regexp (nth 3 params))
+ (prefix (nth 4 params))
direction-re submodi) ; direction argument not supported until requested
;; Lookup position, etc of co-module
;; Note this may raise an error
@@ -11387,15 +11551,18 @@ See the example in `verilog-auto-inout-modport'."
;; Don't sort them so an upper AUTOINST will match the main module
(let ((sigs sig-list-o))
(while sigs
- (verilog-insert-indent "assign " (verilog-sig-name (car sigs))
- " = " inst-name
- "." (verilog-sig-name (car sigs)) ";\n")
+ (verilog-insert-indent "assign "
+ (concat prefix (verilog-sig-name (car sigs)))
+ " = " inst-name
+ "." (verilog-sig-name (car sigs)) ";\n")
(setq sigs (cdr sigs))))
(let ((sigs sig-list-i))
(while sigs
- (verilog-insert-indent "assign " inst-name
- "." (verilog-sig-name (car sigs))
- " = " (verilog-sig-name (car sigs)) ";\n")
+ (verilog-insert-indent "assign " inst-name
+ "." (verilog-sig-name (car sigs))
+ " = "
+ (concat prefix (verilog-sig-name (car sigs)))
+ ";\n")
(setq sigs (cdr sigs))))
(verilog-insert-indent "// End of automatics\n")))))))
@@ -11611,7 +11778,9 @@ declaration with ones automatically derived from the module or
interface header of the instantiated item.
You may also provide an optional regular expression, in which
-case only I/O matching the regular expression will be included.
+case only I/O matching the regular expression will be included,
+or excluded if the regexp begins with ?! (question-mark
+exclamation-mark).
If `verilog-auto-star-expand' is set, also expand SystemVerilog .* ports,
and delete them before saving unless `verilog-auto-star-save' is set.
@@ -12047,7 +12216,8 @@ automatically derived from the module header of the instantiated netlist.
You may also provide an optional regular expression, in which
case only parameters matching the regular expression will be
-included.
+included, or excluded if the regexp begins with ?! (question-mark
+exclamation-mark).
See \\[verilog-auto-inst] for limitations, and templates to customize the
output.
@@ -12466,9 +12636,11 @@ Typing \\[verilog-auto] will make this into:
wire o = tempb;
endmodule
-You may also provide an optional regular expression, in which case only
-signals matching the regular expression will be included. For example the
-same expansion will result from only extracting outputs starting with ov:
+You may also provide an optional regular expression, in which
+case only signals matching the regular expression will be
+included,or excluded if the regexp begins with ?! (question-mark
+exclamation-mark). For example the same expansion will result
+from only extracting outputs starting with ov:
/*AUTOOUTPUTEVERY(\"^ov\")*/"
(save-excursion
@@ -12544,9 +12716,12 @@ Typing \\[verilog-auto] will make this into:
.i (i));
endmodule
-You may also provide an optional regular expression, in which case only
-signals matching the regular expression will be included. For example the
-same expansion will result from only extracting inputs starting with i:
+You may also provide an optional regular expression, in which
+case only signals matching the regular expression will be
+included. or excluded if the regexp begins with
+?! (question-mark exclamation-mark). For example the same
+expansion will result from only extracting inputs starting with
+i:
/*AUTOINPUT(\"^i\")*/"
(save-excursion
@@ -12628,9 +12803,11 @@ Typing \\[verilog-auto] will make this into:
.io (io));
endmodule
-You may also provide an optional regular expression, in which case only
-signals matching the regular expression will be included. For example the
-same expansion will result from only extracting inouts starting with i:
+You may also provide an optional regular expression, in which
+case only signals matching the regular expression will be
+included, or excluded if the regexp begins with ?! (question-mark
+exclamation-mark). For example the same expansion will result
+from only extracting inouts starting with i:
/*AUTOINOUT(\"^i\")*/"
(save-excursion
@@ -12711,9 +12888,11 @@ Typing \\[verilog-auto] will make this into:
// End of automatics
endmodule
-You may also provide an optional regular expression, in which case only
-signals matching the regular expression will be included. For example the
-same expansion will result from only extracting signals starting with i:
+You may also provide an optional regular expression, in which
+case only signals matching the regular expression will be
+included, or excluded if the regexp begins with ?! (question-mark
+exclamation-mark). For example the same expansion will result
+from only extracting signals starting with i:
/*AUTOINOUTMODULE(\"ExampMain\",\"^i\")*/
@@ -12919,9 +13098,11 @@ Typing \\[verilog-auto] will make this into:
// End of automatics
endmodule
-You may also provide an optional regular expression, in which case only
-signals matching the regular expression will be included. For example the
-same expansion will result from only extracting signals starting with i:
+You may also provide an optional regular expression, in which
+case only signals matching the regular expression will be
+included, or excluded if the regexp begins with ?! (question-mark
+exclamation-mark). For example the same expansion will result
+from only extracting signals starting with i:
/*AUTOINOUTIN(\"ExampMain\",\"^i\")*/"
(verilog-auto-inout-module nil t))
@@ -13009,6 +13190,8 @@ for making verification modules that connect to UVM interfaces.
The optional third parameter is a regular expression, and only
signals matching the regular expression will be included.
+ The optional fourth parameter is a prefix to add to the signals.
+
Limitations:
If placed inside the parenthesis of a module declaration, it creates
Verilog 2001 style, else uses Verilog 1995 style.
@@ -13032,10 +13215,16 @@ An example:
modport mp(clocking mon_clkblk);
endinterface
+
module ExampMain
( input clk,
/*AUTOINOUTMODPORT(\"ExampIf\", \"mp\")*/
);
+
+ ExampleIf i;
+
+ /*AUTOASSIGNMODPORT(\"ExampIf\", \"mp\", \"i\")*/
+
endmodule
Typing \\[verilog-auto] will make this into:
@@ -13048,16 +13237,26 @@ Typing \\[verilog-auto] will make this into:
input [7:0] req_dat
// End of automatics
);
+
+ ExampleIf i;
+
+ /*AUTOASSIGNMODPORT(\"ExampIf\", \"mp\", \"i\")*/
+ // Beginning of automatic assignments from modport
+ assign i.req_dat = req_dat;
+ assign i.req_val = req_val;
+ // End of automatics
+
endmodule
If the modport is part of a UVM monitor/driver class, this
creates a wrapper module that may be used to instantiate the
driver/monitor using AUTOINST in the testbench."
(save-excursion
- (let* ((params (verilog-read-auto-params 2 3))
+ (let* ((params (verilog-read-auto-params 2 4))
(submod (nth 0 params))
(modport-re (nth 1 params))
(regexp (nth 2 params))
+ (prefix (nth 3 params))
direction-re submodi) ; direction argument not supported until requested
;; Lookup position, etc of co-module
;; Note this may raise an error
@@ -13072,33 +13271,42 @@ driver/monitor using AUTOINST in the testbench."
(verilog-decls-get-vars submoddecls)
(verilog-signals-not-in
(verilog-decls-get-inputs submodportdecls)
- (append (verilog-decls-get-ports submoddecls)
- (verilog-decls-get-ports moddecls)))))
+ (verilog-decls-get-ports submoddecls))))
(sig-list-o (verilog-signals-in ; Decls doesn't have data types, must resolve
(verilog-decls-get-vars submoddecls)
(verilog-signals-not-in
(verilog-decls-get-outputs submodportdecls)
- (append (verilog-decls-get-ports submoddecls)
- (verilog-decls-get-ports moddecls)))))
+ (verilog-decls-get-ports submoddecls))))
(sig-list-io (verilog-signals-in ; Decls doesn't have data types, must resolve
(verilog-decls-get-vars submoddecls)
(verilog-signals-not-in
(verilog-decls-get-inouts submodportdecls)
- (append (verilog-decls-get-ports submoddecls)
- (verilog-decls-get-ports moddecls))))))
+ (verilog-decls-get-ports submoddecls)))))
(forward-line 1)
(setq sig-list-i (verilog-signals-edit-wire-reg
- (verilog-signals-matching-dir-re
- (verilog-signals-matching-regexp sig-list-i regexp)
- "input" direction-re))
+ (verilog-signals-not-in
+ (verilog-signals-add-prefix
+ (verilog-signals-matching-dir-re
+ (verilog-signals-matching-regexp sig-list-i regexp)
+ "input" direction-re)
+ prefix)
+ (verilog-decls-get-ports moddecls)))
sig-list-o (verilog-signals-edit-wire-reg
- (verilog-signals-matching-dir-re
- (verilog-signals-matching-regexp sig-list-o regexp)
- "output" direction-re))
+ (verilog-signals-not-in
+ (verilog-signals-add-prefix
+ (verilog-signals-matching-dir-re
+ (verilog-signals-matching-regexp sig-list-o regexp)
+ "output" direction-re)
+ prefix)
+ (verilog-decls-get-ports moddecls)))
sig-list-io (verilog-signals-edit-wire-reg
- (verilog-signals-matching-dir-re
- (verilog-signals-matching-regexp sig-list-io regexp)
- "inout" direction-re)))
+ (verilog-signals-not-in
+ (verilog-signals-add-prefix
+ (verilog-signals-matching-dir-re
+ (verilog-signals-matching-regexp sig-list-io regexp)
+ "inout" direction-re)
+ prefix)
+ (verilog-decls-get-ports moddecls))))
(when v2k (verilog-repair-open-comma))
(when (or sig-list-i sig-list-o sig-list-io)
(verilog-insert-indent "// Beginning of automatic in/out/inouts (from modport)\n")
@@ -13335,7 +13543,7 @@ them to a one.
AUTORESET may try to reset arrays or structures that cannot be
reset by a simple assignment, resulting in compile errors. This
is a feature to be taken as a hint that you need to reset these
-signals manually (or put them into a \"\\=`ifdef NEVER signal<=\\=`0;
+signals manually (or put them into a \"\\=`ifdef NEVER signal<=\\='0;
\\=`endif\" so Verilog-Mode ignores them.)
An example:
@@ -13559,7 +13767,7 @@ defines the regular expression will be undefed."
(t
(setq defs (delete (match-string-no-properties 2) defs))))))
;; Insert
- (setq defs (sort defs 'string<))
+ (setq defs (sort defs #'string<))
(when defs
(verilog-forward-or-insert-line)
(verilog-insert-indent "// Beginning of automatic undefs\n")
diff --git a/lisp/repeat.el b/lisp/repeat.el
index d4888893484..795577c93fc 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -239,9 +239,7 @@ recently executed command not bound to an input event\"."
(car (memq last-command-event
(listify-key-sequence
repeat-on-final-keystroke))))))
- (if (memq last-repeatable-command '(exit-minibuffer
- minibuffer-complete-and-exit
- self-insert-and-exit))
+ (if (eq last-repeatable-command (caar command-history))
(let ((repeat-command (car command-history)))
(repeat-message "Repeating %S" repeat-command)
(eval repeat-command))
diff --git a/lisp/replace.el b/lisp/replace.el
index f13d27aff89..eb7a439b54a 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1161,6 +1161,7 @@ a previously found match."
(define-key map "\C-o" 'occur-mode-display-occurrence)
(define-key map "n" 'next-error-no-select)
(define-key map "p" 'previous-error-no-select)
+ (define-key map "l" 'recenter-current-error)
(define-key map "\M-n" 'occur-next)
(define-key map "\M-p" 'occur-prev)
(define-key map "r" 'occur-rename-buffer)
@@ -1545,7 +1546,10 @@ You can add this to `occur-hook' if you always want a separate
(with-current-buffer
(if (eq major-mode 'occur-mode) (current-buffer) (get-buffer "*Occur*"))
(rename-buffer (concat "*Occur: "
- (mapconcat #'buffer-name
+ (mapconcat (lambda (boo)
+ (buffer-name (if (overlayp boo)
+ (overlay-buffer boo)
+ boo)))
(car (cddr occur-revert-arguments)) "/")
"*")
(or unique-p (not interactive-p)))))
@@ -1779,7 +1783,8 @@ See also `multi-occur'."
42)
(window-width))
"" (occur-regexp-descr regexp))))
- (occur--garbage-collect-revert-args)
+ (unless (eq bufs (nth 2 occur-revert-arguments))
+ (occur--garbage-collect-revert-args))
(setq occur-revert-arguments (list regexp nlines bufs))
(if (= count 0)
(kill-buffer occur-buf)
diff --git a/lisp/reveal.el b/lisp/reveal.el
index c01afd9739a..697df45c5c3 100644
--- a/lisp/reveal.el
+++ b/lisp/reveal.el
@@ -67,13 +67,11 @@ revealed text manually."
:type 'boolean
:version "28.1")
-(defvar reveal-open-spots nil
+(defvar-local reveal-open-spots nil
"List of spots in the buffer which are open.
Each element has the form (WINDOW . OVERLAY).")
-(make-variable-buffer-local 'reveal-open-spots)
-(defvar reveal-last-tick nil)
-(make-variable-buffer-local 'reveal-last-tick)
+(defvar-local reveal-last-tick nil)
;; Actual code
diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el
index 1e819044194..38283a5c568 100644
--- a/lisp/ruler-mode.el
+++ b/lisp/ruler-mode.el
@@ -572,10 +572,9 @@ This variable is expected to be made buffer-local by modes.")
Call `ruler-mode-ruler-function' to compute the ruler value.")
;;;###autoload
-(defvar ruler-mode nil
+(defvar-local ruler-mode nil
"Non-nil if Ruler mode is enabled.
Use the command `ruler-mode' to change this variable.")
-(make-variable-buffer-local 'ruler-mode)
(defun ruler--save-header-line-format ()
"Install the header line format for Ruler mode.
diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el
index e8f69b29565..d283b8089ce 100644
--- a/lisp/scroll-lock.el
+++ b/lisp/scroll-lock.el
@@ -40,9 +40,8 @@
map)
"Keymap for Scroll Lock mode.")
-(defvar scroll-lock-preserve-screen-pos-save scroll-preserve-screen-position
+(defvar-local scroll-lock-preserve-screen-pos-save scroll-preserve-screen-position
"Used for saving the state of `scroll-preserve-screen-position'.")
-(make-variable-buffer-local 'scroll-lock-preserve-screen-pos-save)
(defvar scroll-lock-temporary-goal-column 0
"Like `temporary-goal-column' but for scroll-lock-* commands.")
diff --git a/lisp/server.el b/lisp/server.el
index b82e301d0aa..220694f6cbf 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -197,9 +197,8 @@ The created frame is selected when the hook is called."
"List of current server clients.
Each element is a process.")
-(defvar server-buffer-clients nil
+(defvar-local server-buffer-clients nil
"List of client processes requesting editing of current buffer.")
-(make-variable-buffer-local 'server-buffer-clients)
;; Changing major modes should not erase this local.
(put 'server-buffer-clients 'permanent-local t)
@@ -239,11 +238,10 @@ in this way."
:type 'boolean
:version "21.1")
-(defvar server-existing-buffer nil
+(defvar-local server-existing-buffer nil
"Non-nil means the buffer existed before the server was asked to visit it.
This means that the server should not kill the buffer when you say you
are done with it in the server.")
-(make-variable-buffer-local 'server-existing-buffer)
(defvar server--external-socket-initialized nil
"When an external socket is passed into Emacs, we need to call
diff --git a/lisp/shell.el b/lisp/shell.el
index 0f866158fe3..32128241655 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -26,9 +26,7 @@
;;; Commentary:
;; This file defines a shell-in-a-buffer package (shell mode) built on
-;; top of comint mode. This is actually cmushell with things renamed
-;; to replace its counterpart in Emacs 18. cmushell is more
-;; featureful, robust, and uniform than the Emacs 18 version.
+;; top of comint mode.
;; Since this mode is built on top of the general command-interpreter-in-
;; a-buffer mode (comint mode), it shares a common base functionality,
@@ -785,8 +783,7 @@ Make the shell buffer the current buffer, and return it.
;; that tracks cd, pushd, and popd commands issued to the shell, and
;; changes the current directory of the shell buffer accordingly.
;;
-;; This is basically a fragile hack, although it's more accurate than
-;; the version in Emacs 18's shell.el. It has the following failings:
+;; This is basically a fragile hack. It has the following failings:
;; 1. It doesn't know about the cdpath shell variable.
;; 2. It cannot infallibly deal with command sequences, though it does well
;; with these and with ignoring commands forked in another shell with ()s.
diff --git a/lisp/simple.el b/lisp/simple.el
index e4a363a9a59..568debaa612 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -492,6 +492,16 @@ buffer causes automatic display of the corresponding source code location."
(overlay-put ol 'window (get-buffer-window))
(setf next-error--message-highlight-overlay ol)))))
+(defun recenter-current-error (&optional arg)
+ "Recenter the current displayed error in the `next-error' buffer."
+ (interactive "P")
+ (save-selected-window
+ (let ((next-error-highlight next-error-highlight-no-select)
+ (display-buffer-overriding-action
+ '(nil (inhibit-same-window . t))))
+ (next-error 0)
+ (set-buffer (window-buffer))
+ (recenter-top-bottom arg))))
;;;
@@ -1443,9 +1453,9 @@ included in the count."
(save-excursion
(save-restriction
(narrow-to-region start end)
- (goto-char (point-min))
(cond ((and (not ignore-invisible-lines)
(eq selective-display t))
+ (goto-char (point-min))
(save-match-data
(let ((done 0))
(while (re-search-forward "\n\\|\r[^\n]" nil t 40)
@@ -1458,6 +1468,7 @@ included in the count."
(1+ done)
done))))
(ignore-invisible-lines
+ (goto-char (point-min))
(save-match-data
(- (buffer-size)
(forward-line (buffer-size))
@@ -1472,27 +1483,11 @@ included in the count."
(assq prop buffer-invisibility-spec)))
(setq invisible-count (1+ invisible-count))))
invisible-count))))
- (t (- (buffer-size) (forward-line (buffer-size))))))))
-
-(defun line-number-at-pos (&optional pos absolute)
- "Return buffer line number at position POS.
-If POS is nil, use current buffer location.
-
-If ABSOLUTE is nil, the default, counting starts
-at (point-min), so the value refers to the contents of the
-accessible portion of the (potentially narrowed) buffer. If
-ABSOLUTE is non-nil, ignore any narrowing and return the
-absolute line number."
- (save-restriction
- (when absolute
- (widen))
- (let ((opoint (or pos (point))) start)
- (save-excursion
- (goto-char (point-min))
- (setq start (point))
- (goto-char opoint)
- (forward-line 0)
- (1+ (count-lines start (point)))))))
+ (t
+ (goto-char (point-max))
+ (if (bolp)
+ (1- (line-number-at-pos))
+ (line-number-at-pos)))))))
(defcustom what-cursor-show-names nil
"Whether to show character names in `what-cursor-position'."
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 7f751ec3476..e43978f4137 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -5,15 +5,6 @@
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: file, tags, tools
-(defvar speedbar-version "1.0"
- "The current version of speedbar.")
-(make-obsolete-variable 'speedbar-version nil "28.1")
-(defvar speedbar-incompatible-version "0.14beta4"
- "This version of speedbar is incompatible with this version.
-Due to massive API changes (removing the use of the word PATH)
-this version is not backward compatible to 0.14 or earlier.")
-(make-obsolete-variable 'speedbar-incompatible-version nil "28.1")
-
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
@@ -4087,6 +4078,19 @@ See `speedbar-expand-image-button-alist' for details."
(setq ia (cdr ia)))))))
+;; Obsolete
+
+(defvar speedbar-version "1.0"
+ "The current version of speedbar.")
+(make-obsolete-variable 'speedbar-version 'emacs-version "28.1")
+
+(defvar speedbar-incompatible-version "0.14beta4"
+ "This version of speedbar is incompatible with this version.
+Due to massive API changes (removing the use of the word PATH)
+this version is not backward compatible to 0.14 or earlier.")
+(make-obsolete-variable 'speedbar-incompatible-version nil "28.1")
+
+
(provide 'speedbar)
;; run load-time hooks
diff --git a/lisp/startup.el b/lisp/startup.el
index 402d8a87b00..2269973bd11 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1387,7 +1387,7 @@ please check its value")
(equal user-mail-address
(let (mail-host-address)
(ignore-errors
- (eval (car (get 'user-mail-address 'standard-value))))))
+ (custom--standard-value 'user-mail-address))))
(custom-reevaluate-setting 'user-mail-address))
;; If parameter have been changed in the init file which influence
diff --git a/lisp/subr.el b/lisp/subr.el
index a85f41d7d77..f0de6d5ac92 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1694,7 +1694,6 @@ be a list of the form returned by `event-start' and `event-end'."
;;;; Obsolescence declarations for variables, and aliases.
-(make-obsolete-variable 'define-key-rebound-commands nil "23.2")
(make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1")
(make-obsolete-variable 'deferred-action-list 'post-command-hook "24.1")
(make-obsolete-variable 'deferred-action-function 'post-command-hook "24.1")
@@ -2229,9 +2228,13 @@ Affects only hooks run in the current buffer."
;; PUBLIC: find if the current mode derives from another.
(defun provided-mode-derived-p (mode &rest modes)
- "Non-nil if MODE is derived from one of MODES or their aliases.
+ "Non-nil if MODE is derived from one of MODES.
Uses the `derived-mode-parent' property of the symbol to trace backwards.
If you just want to check `major-mode', use `derived-mode-p'."
+ ;; If MODE is an alias, then look up the real mode function first.
+ (when-let ((alias (symbol-function mode)))
+ (when (symbolp alias)
+ (setq mode alias)))
(while
(and
(not (memq mode modes))
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 9209f2d46ec..1bdddc2c83e 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -810,9 +810,7 @@ from the tab line."
:version "27.1")
;;;###autoload
-(defvar tab-line-exclude nil)
-;;;###autoload
-(make-variable-buffer-local 'tab-line-exclude)
+(defvar-local tab-line-exclude nil)
(defun tab-line-mode--turn-on ()
"Turn on `tab-line-mode'."
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index cd53d7b6ff4..89a71ac2b87 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -149,12 +149,11 @@ This information is useful, but it takes screen space away from file names."
;; So instead, we now keep the two pieces of data in separate buffers, and
;; use the new buffer-swap-text primitive when we need to change which data
;; is associated with "the" buffer.
-(defvar tar-data-buffer nil "Buffer that holds the actual raw tar bytes.")
-(make-variable-buffer-local 'tar-data-buffer)
+(defvar-local tar-data-buffer nil
+ "Buffer that holds the actual raw tar bytes.")
-(defvar tar-data-swapped nil
+(defvar-local tar-data-swapped nil
"If non-nil, `tar-data-buffer' indeed holds raw tar bytes.")
-(make-variable-buffer-local 'tar-data-swapped)
(defun tar-data-swapped-p ()
"Return non-nil if the tar-data is in `tar-data-buffer'."
diff --git a/lisp/term.el b/lisp/term.el
index 8a560e85d58..6beb17fb66f 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -683,8 +683,7 @@ Buffer local variable.")
"Index of last matched history element.")
(defvar term-matching-input-from-input-string ""
"Input previously used to match input history.")
-; This argument to set-process-filter disables reading from the process,
-; assuming this is Emacs 19.20 or newer.
+; This argument to set-process-filter disables reading from the process.
(defvar term-pager-filter t)
(put 'term-input-ring 'permanent-local t)
@@ -2813,333 +2812,334 @@ See `term-prompt-regexp'."
"[\032\e]")
(defun term-emulate-terminal (proc str)
- (with-current-buffer (process-buffer proc)
- (let* ((i 0) funny
- decoded-substring
- save-point save-marker win
- (inhibit-read-only t)
- (buffer-undo-list t)
- (selected (selected-window))
- last-win
- (str-length (length str)))
- (save-selected-window
-
- (when (marker-buffer term-pending-delete-marker)
- ;; Delete text following term-pending-delete-marker.
- (delete-region term-pending-delete-marker (process-mark proc))
- (set-marker term-pending-delete-marker nil))
-
- (when (/= (point) (process-mark proc))
- (setq save-point (point-marker)))
-
- (setf term-vertical-motion
- (if (eq (window-buffer) (current-buffer))
- 'vertical-motion
- 'term-buffer-vertical-motion))
- (setq save-marker (copy-marker (process-mark proc)))
- (goto-char (process-mark proc))
-
- (save-restriction
- ;; If the buffer is in line mode, and there is a partial
- ;; input line, save the line (by narrowing to leave it
- ;; outside the restriction ) until we're done with output.
- (when (and (> (point-max) (process-mark proc))
- (term-in-line-mode))
- (narrow-to-region (point-min) (process-mark proc)))
-
- (when term-log-buffer
- (princ str term-log-buffer))
- (when term-terminal-undecoded-bytes
- (setq str (concat term-terminal-undecoded-bytes str))
- (setq str-length (length str))
- (setq term-terminal-undecoded-bytes nil))
-
- (while (< i str-length)
- (setq funny (string-match term-control-seq-regexp str i))
- (let ((ctl-params (and funny (match-string 1 str)))
- (ctl-params-end (and funny (match-end 1)))
- (ctl-end (if funny (match-end 0)
- (setq funny (string-match term-control-seq-prefix-regexp str i))
- (if funny
- (setq term-terminal-undecoded-bytes
- (substring str funny))
- (setq funny str-length))
- ;; The control sequence ends somewhere
- ;; past the end of this string.
- (1+ str-length))))
- (when (> funny i)
- (when term-do-line-wrapping
- (term-down 1 t)
- (term-move-to-column 0)
- (setq term-do-line-wrapping nil))
- ;; Handle non-control data. Decode the string before
- ;; counting characters, to avoid garbling of certain
- ;; multibyte characters (bug#1006).
- (setq decoded-substring
- (decode-coding-string
- (substring str i funny)
- locale-coding-system t))
- ;; Check for multibyte characters that ends
- ;; before end of string, and save it for
- ;; next time.
- (when (= funny str-length)
- (let ((partial 0)
- (count (length decoded-substring)))
- (while (and (< partial count)
- (eq (char-charset (aref decoded-substring
- (- count 1 partial)))
- 'eight-bit))
- (cl-incf partial))
- (when (> count partial 0)
- (setq term-terminal-undecoded-bytes
- (substring decoded-substring (- partial)))
- (setq decoded-substring
- (substring decoded-substring 0 (- partial)))
- (cl-decf str-length partial)
- (cl-decf funny partial))))
-
- ;; Insert a string, check how many columns
- ;; we moved, then delete that many columns
- ;; following point if not eob nor insert-mode.
- (let ((old-column (term-horizontal-column))
- (old-point (point))
- columns)
- (unless term-suppress-hard-newline
- (while (> (+ (length decoded-substring) old-column)
- term-width)
- (insert (substring decoded-substring 0
- (- term-width old-column)))
- ;; Since we've enough text to fill the whole line,
- ;; delete previous text regardless of
- ;; `term-insert-mode's value.
- (delete-region (point) (line-end-position))
- (term-down 1 t)
- (term-move-columns (- (term-current-column)))
- (add-text-properties (1- (point)) (point)
- '(term-line-wrap t rear-nonsticky t))
- (setq decoded-substring
- (substring decoded-substring (- term-width old-column)))
- (setq old-column 0)))
- (insert decoded-substring)
- (setq term-current-column (current-column)
- columns (- term-current-column old-column))
- (when (not (or (eobp) term-insert-mode))
- (let ((pos (point)))
- (term-move-columns columns)
- (delete-region pos (point))
- (setq term-current-column nil)))
- ;; In insert mode if the current line
- ;; has become too long it needs to be
- ;; chopped off.
- (when term-insert-mode
- (let ((pos (point)))
- (end-of-line)
- (when (> (current-column) term-width)
- (delete-region (- (point) (- (current-column) term-width))
- (point)))
- (goto-char pos)))
-
- (put-text-property old-point (point)
- 'font-lock-face term-current-face))
- ;; If the last char was written in last column,
- ;; back up one column, but remember we did so.
- ;; Thus we emulate xterm/vt100-style line-wrapping.
- (when (eq (term-current-column) term-width)
- (term-move-columns -1)
- ;; We check after ctrl sequence handling if point
- ;; was moved (and leave line-wrapping state if so).
- (setq term-do-line-wrapping (point)))
- (setq term-current-column nil)
- (setq i funny))
- (pcase-exhaustive (and (<= ctl-end str-length) (aref str i))
- (?\t ;; TAB (terminfo: ht)
- ;; The line cannot exceed term-width. TAB at
- ;; the end of a line should not cause wrapping.
- (let ((col (term-current-column)))
- (term-move-to-column
- (min (1- term-width)
- (+ col 8 (- (mod col 8)))))))
- (?\r ;; (terminfo: cr)
- (term-vertical-motion 0)
- (setq term-current-column term-start-line-column))
- (?\n ;; (terminfo: cud1, ind)
- (unless (and term-kill-echo-list
- (term-check-kill-echo-list))
- (term-down 1 t)))
- (?\b ;; (terminfo: cub1)
- (term-move-columns -1))
- (?\C-g ;; (terminfo: bel)
- (beep t))
- (?\032 ; Emacs specific control sequence.
- (funcall term-command-function
- (decode-coding-string
- (substring str (1+ i)
- (- ctl-end
- (if (eq (aref str (- ctl-end 2)) ?\r)
- 2 1)))
- locale-coding-system t)))
- (?\e
- (pcase (aref str (1+ i))
- (?\[
- ;; We only handle control sequences with a single
- ;; "Final" byte (see [ECMA-48] section 5.4).
- (when (eq ctl-params-end (1- ctl-end))
- (term-handle-ansi-escape
- proc
- (mapcar ;; We don't distinguish empty params
- ;; from 0 (according to [ECMA-48] we
- ;; should, but all commands we support
- ;; default to 0 values anyway).
- #'string-to-number
- (split-string ctl-params ";"))
- (aref str (1- ctl-end)))))
- (?D ;; Scroll forward (apparently not documented in
- ;; [ECMA-48], [ctlseqs] mentions it as C1
- ;; character "Index" though).
- (term-handle-deferred-scroll)
- (term-down 1 t))
- (?M ;; Scroll reversed (terminfo: ri, ECMA-48
- ;; "Reverse Linefeed").
- (if (or (< (term-current-row) term-scroll-start)
- (>= (1- (term-current-row))
- term-scroll-start))
- ;; Scrolling up will not move outside
- ;; the scroll region.
- (term-down -1)
- ;; Scrolling the scroll region is needed.
- (term-down -1 t)))
- (?7 ;; Save cursor (terminfo: sc, not in [ECMA-48],
- ;; [ctlseqs] has it as "DECSC").
- (term-handle-deferred-scroll)
- (setq term-saved-cursor
- (list (term-current-row)
- (term-horizontal-column)
- term-ansi-current-bg-color
- term-ansi-current-bold
- term-ansi-current-color
- term-ansi-current-invisible
- term-ansi-current-reverse
- term-ansi-current-underline
- term-current-face)))
- (?8 ;; Restore cursor (terminfo: rc, [ctlseqs]
- ;; "DECRC").
- (when term-saved-cursor
- (term-goto (nth 0 term-saved-cursor)
- (nth 1 term-saved-cursor))
- (setq term-ansi-current-bg-color
- (nth 2 term-saved-cursor)
- term-ansi-current-bold
- (nth 3 term-saved-cursor)
- term-ansi-current-color
- (nth 4 term-saved-cursor)
- term-ansi-current-invisible
- (nth 5 term-saved-cursor)
- term-ansi-current-reverse
- (nth 6 term-saved-cursor)
- term-ansi-current-underline
- (nth 7 term-saved-cursor)
- term-current-face
- (nth 8 term-saved-cursor))))
- (?c ;; \Ec - Reset (terminfo: rs1, [ctlseqs] "RIS").
- ;; This is used by the "clear" program.
- (term-reset-terminal))
- (?A ;; An \eAnSiT sequence (Emacs specific).
- (term-handle-ansi-terminal-messages
- (substring str i ctl-end)))))
- ;; Ignore NUL, Shift Out, Shift In.
- ((or ?\0 #xE #xF 'nil) nil))
- ;; Leave line-wrapping state if point was moved.
- (unless (eq term-do-line-wrapping (point))
- (setq term-do-line-wrapping nil))
- (if (term-handling-pager)
- (progn
- ;; Finish stuff to get ready to handle PAGER.
- (if (> (% (current-column) term-width) 0)
+ (when (buffer-live-p (process-buffer proc))
+ (with-current-buffer (process-buffer proc)
+ (let* ((i 0) funny
+ decoded-substring
+ save-point save-marker win
+ (inhibit-read-only t)
+ (buffer-undo-list t)
+ (selected (selected-window))
+ last-win
+ (str-length (length str)))
+ (save-selected-window
+
+ (when (marker-buffer term-pending-delete-marker)
+ ;; Delete text following term-pending-delete-marker.
+ (delete-region term-pending-delete-marker (process-mark proc))
+ (set-marker term-pending-delete-marker nil))
+
+ (when (/= (point) (process-mark proc))
+ (setq save-point (point-marker)))
+
+ (setf term-vertical-motion
+ (if (eq (window-buffer) (current-buffer))
+ 'vertical-motion
+ 'term-buffer-vertical-motion))
+ (setq save-marker (copy-marker (process-mark proc)))
+ (goto-char (process-mark proc))
+
+ (save-restriction
+ ;; If the buffer is in line mode, and there is a partial
+ ;; input line, save the line (by narrowing to leave it
+ ;; outside the restriction ) until we're done with output.
+ (when (and (> (point-max) (process-mark proc))
+ (term-in-line-mode))
+ (narrow-to-region (point-min) (process-mark proc)))
+
+ (when term-log-buffer
+ (princ str term-log-buffer))
+ (when term-terminal-undecoded-bytes
+ (setq str (concat term-terminal-undecoded-bytes str))
+ (setq str-length (length str))
+ (setq term-terminal-undecoded-bytes nil))
+
+ (while (< i str-length)
+ (setq funny (string-match term-control-seq-regexp str i))
+ (let ((ctl-params (and funny (match-string 1 str)))
+ (ctl-params-end (and funny (match-end 1)))
+ (ctl-end (if funny (match-end 0)
+ (setq funny (string-match term-control-seq-prefix-regexp str i))
+ (if funny
+ (setq term-terminal-undecoded-bytes
+ (substring str funny))
+ (setq funny str-length))
+ ;; The control sequence ends somewhere
+ ;; past the end of this string.
+ (1+ str-length))))
+ (when (> funny i)
+ (when term-do-line-wrapping
+ (term-down 1 t)
+ (term-move-to-column 0)
+ (setq term-do-line-wrapping nil))
+ ;; Handle non-control data. Decode the string before
+ ;; counting characters, to avoid garbling of certain
+ ;; multibyte characters (bug#1006).
+ (setq decoded-substring
+ (decode-coding-string
+ (substring str i funny)
+ locale-coding-system t))
+ ;; Check for multibyte characters that ends
+ ;; before end of string, and save it for
+ ;; next time.
+ (when (= funny str-length)
+ (let ((partial 0)
+ (count (length decoded-substring)))
+ (while (and (< partial count)
+ (eq (char-charset (aref decoded-substring
+ (- count 1 partial)))
+ 'eight-bit))
+ (cl-incf partial))
+ (when (> count partial 0)
(setq term-terminal-undecoded-bytes
- (substring str i))
- ;; We're at column 0. Goto end of buffer; to compensate,
- ;; prepend a ?\r for later. This looks more consistent.
- (if (zerop i)
+ (substring decoded-substring (- partial)))
+ (setq decoded-substring
+ (substring decoded-substring 0 (- partial)))
+ (cl-decf str-length partial)
+ (cl-decf funny partial))))
+
+ ;; Insert a string, check how many columns
+ ;; we moved, then delete that many columns
+ ;; following point if not eob nor insert-mode.
+ (let ((old-column (term-horizontal-column))
+ (old-point (point))
+ columns)
+ (unless term-suppress-hard-newline
+ (while (> (+ (length decoded-substring) old-column)
+ term-width)
+ (insert (substring decoded-substring 0
+ (- term-width old-column)))
+ ;; Since we've enough text to fill the whole line,
+ ;; delete previous text regardless of
+ ;; `term-insert-mode's value.
+ (delete-region (point) (line-end-position))
+ (term-down 1 t)
+ (term-move-columns (- (term-current-column)))
+ (add-text-properties (1- (point)) (point)
+ '(term-line-wrap t rear-nonsticky t))
+ (setq decoded-substring
+ (substring decoded-substring (- term-width old-column)))
+ (setq old-column 0)))
+ (insert decoded-substring)
+ (setq term-current-column (current-column)
+ columns (- term-current-column old-column))
+ (when (not (or (eobp) term-insert-mode))
+ (let ((pos (point)))
+ (term-move-columns columns)
+ (delete-region pos (point))
+ (setq term-current-column nil)))
+ ;; In insert mode if the current line
+ ;; has become too long it needs to be
+ ;; chopped off.
+ (when term-insert-mode
+ (let ((pos (point)))
+ (end-of-line)
+ (when (> (current-column) term-width)
+ (delete-region (- (point) (- (current-column) term-width))
+ (point)))
+ (goto-char pos)))
+
+ (put-text-property old-point (point)
+ 'font-lock-face term-current-face))
+ ;; If the last char was written in last column,
+ ;; back up one column, but remember we did so.
+ ;; Thus we emulate xterm/vt100-style line-wrapping.
+ (when (eq (term-current-column) term-width)
+ (term-move-columns -1)
+ ;; We check after ctrl sequence handling if point
+ ;; was moved (and leave line-wrapping state if so).
+ (setq term-do-line-wrapping (point)))
+ (setq term-current-column nil)
+ (setq i funny))
+ (pcase-exhaustive (and (<= ctl-end str-length) (aref str i))
+ (?\t ;; TAB (terminfo: ht)
+ ;; The line cannot exceed term-width. TAB at
+ ;; the end of a line should not cause wrapping.
+ (let ((col (term-current-column)))
+ (term-move-to-column
+ (min (1- term-width)
+ (+ col 8 (- (mod col 8)))))))
+ (?\r ;; (terminfo: cr)
+ (term-vertical-motion 0)
+ (setq term-current-column term-start-line-column))
+ (?\n ;; (terminfo: cud1, ind)
+ (unless (and term-kill-echo-list
+ (term-check-kill-echo-list))
+ (term-down 1 t)))
+ (?\b ;; (terminfo: cub1)
+ (term-move-columns -1))
+ (?\C-g ;; (terminfo: bel)
+ (beep t))
+ (?\032 ; Emacs specific control sequence.
+ (funcall term-command-function
+ (decode-coding-string
+ (substring str (1+ i)
+ (- ctl-end
+ (if (eq (aref str (- ctl-end 2)) ?\r)
+ 2 1)))
+ locale-coding-system t)))
+ (?\e
+ (pcase (aref str (1+ i))
+ (?\[
+ ;; We only handle control sequences with a single
+ ;; "Final" byte (see [ECMA-48] section 5.4).
+ (when (eq ctl-params-end (1- ctl-end))
+ (term-handle-ansi-escape
+ proc
+ (mapcar ;; We don't distinguish empty params
+ ;; from 0 (according to [ECMA-48] we
+ ;; should, but all commands we support
+ ;; default to 0 values anyway).
+ #'string-to-number
+ (split-string ctl-params ";"))
+ (aref str (1- ctl-end)))))
+ (?D ;; Scroll forward (apparently not documented in
+ ;; [ECMA-48], [ctlseqs] mentions it as C1
+ ;; character "Index" though).
+ (term-handle-deferred-scroll)
+ (term-down 1 t))
+ (?M ;; Scroll reversed (terminfo: ri, ECMA-48
+ ;; "Reverse Linefeed").
+ (if (or (< (term-current-row) term-scroll-start)
+ (>= (1- (term-current-row))
+ term-scroll-start))
+ ;; Scrolling up will not move outside
+ ;; the scroll region.
+ (term-down -1)
+ ;; Scrolling the scroll region is needed.
+ (term-down -1 t)))
+ (?7 ;; Save cursor (terminfo: sc, not in [ECMA-48],
+ ;; [ctlseqs] has it as "DECSC").
+ (term-handle-deferred-scroll)
+ (setq term-saved-cursor
+ (list (term-current-row)
+ (term-horizontal-column)
+ term-ansi-current-bg-color
+ term-ansi-current-bold
+ term-ansi-current-color
+ term-ansi-current-invisible
+ term-ansi-current-reverse
+ term-ansi-current-underline
+ term-current-face)))
+ (?8 ;; Restore cursor (terminfo: rc, [ctlseqs]
+ ;; "DECRC").
+ (when term-saved-cursor
+ (term-goto (nth 0 term-saved-cursor)
+ (nth 1 term-saved-cursor))
+ (setq term-ansi-current-bg-color
+ (nth 2 term-saved-cursor)
+ term-ansi-current-bold
+ (nth 3 term-saved-cursor)
+ term-ansi-current-color
+ (nth 4 term-saved-cursor)
+ term-ansi-current-invisible
+ (nth 5 term-saved-cursor)
+ term-ansi-current-reverse
+ (nth 6 term-saved-cursor)
+ term-ansi-current-underline
+ (nth 7 term-saved-cursor)
+ term-current-face
+ (nth 8 term-saved-cursor))))
+ (?c ;; \Ec - Reset (terminfo: rs1, [ctlseqs] "RIS").
+ ;; This is used by the "clear" program.
+ (term-reset-terminal))
+ (?A ;; An \eAnSiT sequence (Emacs specific).
+ (term-handle-ansi-terminal-messages
+ (substring str i ctl-end)))))
+ ;; Ignore NUL, Shift Out, Shift In.
+ ((or ?\0 #xE #xF 'nil) nil))
+ ;; Leave line-wrapping state if point was moved.
+ (unless (eq term-do-line-wrapping (point))
+ (setq term-do-line-wrapping nil))
+ (if (term-handling-pager)
+ (progn
+ ;; Finish stuff to get ready to handle PAGER.
+ (if (> (% (current-column) term-width) 0)
(setq term-terminal-undecoded-bytes
- (concat "\r" (substring str i)))
- (setq term-terminal-undecoded-bytes (substring str (1- i)))
- (aset term-terminal-undecoded-bytes 0 ?\r))
- (goto-char (point-max)))
- ;; FIXME: Use (add-function :override (process-filter proc)
- (setq-local term-pager-old-filter (process-filter proc))
- ;; FIXME: Where is `term-pager-filter' set to a function?!
- (set-process-filter proc term-pager-filter)
- (setq i str-length))
- (setq i ctl-end)))))
-
- (when (>= (term-current-row) term-height)
- (term-handle-deferred-scroll))
-
- (set-marker (process-mark proc) (point))
- (when (stringp decoded-substring)
- (term-watch-for-password-prompt decoded-substring))
- (when save-point
- (goto-char save-point)
- (set-marker save-point nil))
-
- ;; Check for a pending filename-and-line number to display.
- ;; We do this before scrolling, because we might create a new window.
- (when (and term-pending-frame
- (eq (window-buffer selected) (current-buffer)))
- (term-display-line (car term-pending-frame)
- (cdr term-pending-frame))
- (setq term-pending-frame nil))
-
- ;; Scroll each window displaying the buffer but (by default)
- ;; only if the point matches the process-mark we started with.
- (setq win selected)
- ;; Avoid infinite loop in strange case where minibuffer window
- ;; is selected but not active.
- (while (window-minibuffer-p win)
- (setq win (next-window win nil t)))
- (setq last-win win)
- (while (progn
- (setq win (next-window win nil t))
- (when (eq (window-buffer win) (process-buffer proc))
- (let ((scroll term-scroll-to-bottom-on-output))
- (select-window win)
- (when (or (= (point) save-marker)
- (eq scroll t) (eq scroll 'all)
- ;; Maybe user wants point to jump to the end.
- (and (eq selected win)
- (or (eq scroll 'this) (not save-point)))
- (and (eq scroll 'others)
- (not (eq selected win))))
- (when term-scroll-snap-to-bottom
- (goto-char term-home-marker)
- (recenter 0))
- (goto-char (process-mark proc))
- (if (not (pos-visible-in-window-p (point) win))
- (recenter -1)))
- ;; Optionally scroll so that the text
- ;; ends at the bottom of the window.
- (when (and term-scroll-show-maximum-output
- (>= (point) (process-mark proc))
- (or term-scroll-snap-to-bottom
- (not (pos-visible-in-window-p
- (point-max) win))))
- (save-excursion
- (goto-char (point-max))
- (recenter -1)))))
- (not (eq win last-win))))
-
- ;; Stolen from comint.el and adapted -mm
- (when (> term-buffer-maximum-size 0)
- (save-excursion
- (goto-char (process-mark (get-buffer-process (current-buffer))))
- (forward-line (- term-buffer-maximum-size))
- (beginning-of-line)
- (delete-region (point-min) (point))))
- (set-marker save-marker nil)))
- ;; This might be expensive, but we need it to handle something
- ;; like `sleep 5 | less -c' in more-or-less real time.
- (when (get-buffer-window (current-buffer))
- (redisplay))))
+ (substring str i))
+ ;; We're at column 0. Goto end of buffer; to compensate,
+ ;; prepend a ?\r for later. This looks more consistent.
+ (if (zerop i)
+ (setq term-terminal-undecoded-bytes
+ (concat "\r" (substring str i)))
+ (setq term-terminal-undecoded-bytes (substring str (1- i)))
+ (aset term-terminal-undecoded-bytes 0 ?\r))
+ (goto-char (point-max)))
+ ;; FIXME: Use (add-function :override (process-filter proc)
+ (setq-local term-pager-old-filter (process-filter proc))
+ ;; FIXME: Where is `term-pager-filter' set to a function?!
+ (set-process-filter proc term-pager-filter)
+ (setq i str-length))
+ (setq i ctl-end)))))
+
+ (when (>= (term-current-row) term-height)
+ (term-handle-deferred-scroll))
+
+ (set-marker (process-mark proc) (point))
+ (when (stringp decoded-substring)
+ (term-watch-for-password-prompt decoded-substring))
+ (when save-point
+ (goto-char save-point)
+ (set-marker save-point nil))
+
+ ;; Check for a pending filename-and-line number to display.
+ ;; We do this before scrolling, because we might create a new window.
+ (when (and term-pending-frame
+ (eq (window-buffer selected) (current-buffer)))
+ (term-display-line (car term-pending-frame)
+ (cdr term-pending-frame))
+ (setq term-pending-frame nil))
+
+ ;; Scroll each window displaying the buffer but (by default)
+ ;; only if the point matches the process-mark we started with.
+ (setq win selected)
+ ;; Avoid infinite loop in strange case where minibuffer window
+ ;; is selected but not active.
+ (while (window-minibuffer-p win)
+ (setq win (next-window win nil t)))
+ (setq last-win win)
+ (while (progn
+ (setq win (next-window win nil t))
+ (when (eq (window-buffer win) (process-buffer proc))
+ (let ((scroll term-scroll-to-bottom-on-output))
+ (select-window win)
+ (when (or (= (point) save-marker)
+ (eq scroll t) (eq scroll 'all)
+ ;; Maybe user wants point to jump to the end.
+ (and (eq selected win)
+ (or (eq scroll 'this) (not save-point)))
+ (and (eq scroll 'others)
+ (not (eq selected win))))
+ (when term-scroll-snap-to-bottom
+ (goto-char term-home-marker)
+ (recenter 0))
+ (goto-char (process-mark proc))
+ (if (not (pos-visible-in-window-p (point) win))
+ (recenter -1)))
+ ;; Optionally scroll so that the text
+ ;; ends at the bottom of the window.
+ (when (and term-scroll-show-maximum-output
+ (>= (point) (process-mark proc))
+ (or term-scroll-snap-to-bottom
+ (not (pos-visible-in-window-p
+ (point-max) win))))
+ (save-excursion
+ (goto-char (point-max))
+ (recenter -1)))))
+ (not (eq win last-win))))
+
+ ;; Stolen from comint.el and adapted -mm
+ (when (> term-buffer-maximum-size 0)
+ (save-excursion
+ (goto-char (process-mark (get-buffer-process (current-buffer))))
+ (forward-line (- term-buffer-maximum-size))
+ (beginning-of-line)
+ (delete-region (point-min) (point))))
+ (set-marker save-marker nil)))
+ ;; This might be expensive, but we need it to handle something
+ ;; like `sleep 5 | less -c' in more-or-less real time.
+ (when (get-buffer-window (current-buffer))
+ (redisplay)))))
(defvar-local term-goto-process-mark t
"Whether to reset point to the current process mark after this command.
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el
index bac209cdef6..fe92d603065 100644
--- a/lisp/textmodes/enriched.el
+++ b/lisp/textmodes/enriched.el
@@ -186,7 +186,6 @@ The value is a list of \(VAR VALUE VAR VALUE...).")
(defvar enriched-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map [remap move-beginning-of-line] 'beginning-of-line-text)
(define-key map "\C-m" 'reindent-then-newline-and-indent)
(define-key map
[remap newline-and-indent] 'reindent-then-newline-and-indent)
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index fe70e925b05..e7d852be3c8 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -316,7 +316,7 @@ otherwise off."
(save-buffer))
(if viewbuf
(kill-buffer viewbuf))
- (Man-getpage-in-background file)))
+ (Man-getpage-in-background (shell-quote-argument file))))
(provide 'nroff-mode)
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 18341716e3a..2b31e7ed612 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -3627,10 +3627,7 @@ Region is from BEG to END. With WITH-EMPTY prefix empty lines too."
"customize the face `rst-definition' instead."
"24.1")
-;; XEmacs compatibility (?).
-(defface rst-directive (if (boundp 'font-lock-builtin-face)
- '((t :inherit font-lock-builtin-face))
- '((t :inherit font-lock-preprocessor-face)))
+(defface rst-directive '((t :inherit font-lock-builtin-face))
"Face used for directives and roles."
:version "24.1"
:group 'rst-faces)
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 3e29f055ece..7051f520b90 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -510,10 +510,12 @@ an optional alist of possible values."
(with-no-warnings (defvar v2)) ; free for skeleton
(defun sgml-comment-indent-new-line (&optional soft)
- (let ((comment-start "-- ")
- (comment-start-skip "\\(<!\\)?--[ \t]*")
- (comment-end " --")
- (comment-style 'plain))
+ (if (ppss-comment-depth (syntax-ppss))
+ (let ((comment-start "-- ")
+ (comment-start-skip "\\(<!\\)?--[ \t]*")
+ (comment-end " --")
+ (comment-style 'plain))
+ (comment-indent-new-line soft))
(comment-indent-new-line soft)))
(defun sgml-mode-facemenu-add-face-function (face _end)
diff --git a/lisp/thumbs.el b/lisp/thumbs.el
index 7d6558d8f78..465d097b615 100644
--- a/lisp/thumbs.el
+++ b/lisp/thumbs.el
@@ -148,36 +148,30 @@ this value can let another user see some of your images."
:group 'thumbs)
;; Initialize some variable, for later use.
-(defvar thumbs-current-tmp-filename nil
+(defvar-local thumbs-current-tmp-filename nil
"Temporary filename of current image.")
-(make-variable-buffer-local 'thumbs-current-tmp-filename)
-(defvar thumbs-current-image-filename nil
+(defvar-local thumbs-current-image-filename nil
"Filename of current image.")
-(make-variable-buffer-local 'thumbs-current-image-filename)
-(defvar thumbs-extra-images 1
+(defvar-local thumbs-extra-images 1
"Counter for showing extra images in thumbs buffer.")
-(make-variable-buffer-local 'thumbs-extra-images)
(put 'thumbs-extra-images 'permanent-local t)
(defvar thumbs-current-image-size nil
"Size of current image.")
-(defvar thumbs-image-num nil
+(defvar-local thumbs-image-num nil
"Number of current image.")
-(make-variable-buffer-local 'thumbs-image-num)
-(defvar thumbs-buffer nil
+(defvar-local thumbs-buffer nil
"Name of buffer containing thumbnails associated with image.")
-(make-variable-buffer-local 'thumbs-buffer)
(defvar thumbs-current-dir nil
"Current directory.")
-(defvar thumbs-marked-list nil
+(defvar-local thumbs-marked-list nil
"List of marked files.")
-(make-variable-buffer-local 'thumbs-marked-list)
(put 'thumbs-marked-list 'permanent-local t)
(defsubst thumbs-temp-dir ()
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index 6bda1ab0d50..57e5570d537 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -38,17 +38,14 @@
"Face used to highlight warnings in the tutorial."
:group 'help)
-(defvar tutorial--point-before-chkeys 0
+(defvar-local tutorial--point-before-chkeys 0
"Point before display of key changes.")
-(make-variable-buffer-local 'tutorial--point-before-chkeys)
-(defvar tutorial--point-after-chkeys 0
+(defvar-local tutorial--point-after-chkeys 0
"Point after display of key changes.")
-(make-variable-buffer-local 'tutorial--point-after-chkeys)
-(defvar tutorial--lang nil
+(defvar-local tutorial--lang nil
"Tutorial language.")
-(make-variable-buffer-local 'tutorial--lang)
(defvar tutorial--buffer nil
"The selected tutorial buffer.")
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 61e07a0d9ca..8cebd4e79f6 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -461,8 +461,10 @@ Return the number of characters removed."
;; headers, then this means that we've already tried sending
;; credentials to the server, and they were wrong, so just give
;; up.
- (when (assoc "Authorization" url-http-extra-headers)
- (error "Wrong authorization used for %s" url))
+ (let ((authorization (assoc "Authorization" url-http-extra-headers)))
+ (when (and authorization
+ (not (string-match "^NTLM " (cdr authorization))))
+ (error "Wrong authorization used for %s" url)))
;; find strongest supported auth
(dolist (this-auth auths)
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 6493abfa056..8c836f8f64d 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -55,26 +55,19 @@
:group 'url)
-(defvar url-current-object nil
+(defvar-local url-current-object nil
"A parsed representation of the current URL.")
-(defvar url-current-mime-headers nil
+(defvar-local url-current-mime-headers nil
"A parsed representation of the MIME headers for the current URL.")
-(defvar url-current-lastloc nil
+(defvar-local url-current-lastloc nil
"A parsed representation of the URL to be considered as the last location.
Use of this value on outbound connections is subject to
`url-privacy-level' and `url-lastloc-privacy-level'. This is never set
by the url library, applications are expected to set this
variable in buffers representing a displayed location.")
-(mapc 'make-variable-buffer-local
- '(
- url-current-object
- url-current-mime-headers
- url-current-lastloc
- ))
-
(defcustom url-honor-refresh-requests t
"Whether to do automatic page reloads.
These are done at the request of the document author or the server via
diff --git a/lisp/vc/cvs-status.el b/lisp/vc/cvs-status.el
index ff3a2944a17..26fb6206c80 100644
--- a/lisp/vc/cvs-status.el
+++ b/lisp/vc/cvs-status.el
@@ -356,9 +356,8 @@ the list is a three-string list TAG, KIND, REV."
(defvar font-lock-mode)
;; (defun cvs-refontify (beg end)
-;; (when (and (boundp 'font-lock-mode)
-;; font-lock-mode
-;; (fboundp 'font-lock-fontify-region))
+;; (when (and font-lock-mode
+;; (fboundp 'font-lock-fontify-region))
;; (font-lock-fontify-region (1- beg) (1+ end))))
(defun cvs-status-trees ()
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index c20d03c83d6..6e658163b91 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -797,13 +797,6 @@ to temp files in buffer jobs and when Ediff needs to find fine differences."
(message "Pixmap not found for %S: %s" (face-name face) pixmap)
(sit-for 1)))))
-(defun ediff-hide-face (face)
- (if (and (ediff-has-face-support-p)
- (boundp 'add-to-list)
- (boundp 'facemenu-unlisted-faces))
- (add-to-list 'facemenu-unlisted-faces face)))
-
-
(defface ediff-current-diff-A
'((((class color) (min-colors 88) (background light))
@@ -824,7 +817,6 @@ to temp files in buffer jobs and when Ediff needs to find fine differences."
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-current-diff-A'
this variable represents.")
-(ediff-hide-face ediff-current-diff-face-A)
(defface ediff-current-diff-B
'((((class color) (min-colors 88) (background light))
@@ -846,7 +838,6 @@ this variable represents.")
this variable. Instead, use the customization
widget to customize the actual face `ediff-current-diff-B'
this variable represents.")
-(ediff-hide-face ediff-current-diff-face-B)
(defface ediff-current-diff-C
'((((class color) (min-colors 88) (background light))
@@ -867,7 +858,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-current-diff-C'
this variable represents.")
-(ediff-hide-face ediff-current-diff-face-C)
(defface ediff-current-diff-Ancestor
'((((class color) (min-colors 88) (background light))
@@ -890,7 +880,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-current-diff-Ancestor'
this variable represents.")
-(ediff-hide-face ediff-current-diff-face-Ancestor)
(defface ediff-fine-diff-A
'((((class color) (min-colors 88) (background light))
@@ -911,7 +900,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-fine-diff-A'
this variable represents.")
-(ediff-hide-face ediff-fine-diff-face-A)
(defface ediff-fine-diff-B
'((((class color) (min-colors 88) (background light))
@@ -932,7 +920,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-fine-diff-B'
this variable represents.")
-(ediff-hide-face ediff-fine-diff-face-B)
(defface ediff-fine-diff-C
'((((class color) (min-colors 88) (background light))
@@ -956,7 +943,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-fine-diff-C'
this variable represents.")
-(ediff-hide-face ediff-fine-diff-face-C)
(defface ediff-fine-diff-Ancestor
'((((class color) (min-colors 88) (background light))
@@ -981,7 +967,6 @@ ancestor buffer."
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-fine-diff-Ancestor'
this variable represents.")
-(ediff-hide-face ediff-fine-diff-face-Ancestor)
;; Some installs don't have stipple or Stipple. So, try them in turn.
(defvar stipple-pixmap
@@ -1012,7 +997,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-even-diff-A'
this variable represents.")
-(ediff-hide-face ediff-even-diff-face-A)
(defface ediff-even-diff-B
`((((class color) (min-colors 88))
@@ -1031,7 +1015,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-even-diff-B'
this variable represents.")
-(ediff-hide-face ediff-even-diff-face-B)
(defface ediff-even-diff-C
`((((type pc))
@@ -1053,7 +1036,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-even-diff-C'
this variable represents.")
-(ediff-hide-face ediff-even-diff-face-C)
(defface ediff-even-diff-Ancestor
`((((type pc))
@@ -1075,7 +1057,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-even-diff-Ancestor'
this variable represents.")
-(ediff-hide-face ediff-even-diff-face-Ancestor)
;; Association between buffer types and even-diff-face symbols
(defconst ediff-even-diff-face-alist
@@ -1103,8 +1084,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-odd-diff-A'
this variable represents.")
-(ediff-hide-face ediff-odd-diff-face-A)
-
(defface ediff-odd-diff-B
'((((type pc))
@@ -1125,7 +1104,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-odd-diff-B'
this variable represents.")
-(ediff-hide-face ediff-odd-diff-face-B)
(defface ediff-odd-diff-C
'((((type pc))
@@ -1146,7 +1124,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-odd-diff-C'
this variable represents.")
-(ediff-hide-face ediff-odd-diff-face-C)
(defface ediff-odd-diff-Ancestor
'((((class color) (min-colors 88))
@@ -1165,7 +1142,6 @@ this variable represents.")
DO NOT CHANGE this variable. Instead, use the customization
widget to customize the actual face object `ediff-odd-diff-Ancestor'
this variable represents.")
-(ediff-hide-face ediff-odd-diff-face-Ancestor)
;; Association between buffer types and odd-diff-face symbols
(defconst ediff-odd-diff-face-alist
@@ -1571,6 +1547,8 @@ This default should work without changes."
(ediff-file-attributes filename 5))
+;;; Obsolete
+
(defun ediff-convert-standard-filename (fname)
(declare (obsolete convert-standard-filename "28.1"))
(convert-standard-filename fname))
@@ -1578,5 +1556,7 @@ This default should work without changes."
(define-obsolete-function-alias 'ediff-with-syntax-table
#'with-syntax-table "27.1")
+(define-obsolete-function-alias 'ediff-hide-face #'ignore "28.1")
+
(provide 'ediff-init)
;;; ediff-init.el ends here
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index f955ba8283a..9909dcd5424 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -3998,8 +3998,8 @@ Mail anyway? (y or n) ")
(define-obsolete-function-alias 'ediff-deactivate-mark #'deactivate-mark "27.1")
(defun ediff-activate-mark ()
- (make-local-variable 'transient-mark-mode)
- (setq mark-active 'ediff-util transient-mark-mode t))
+ (setq mark-active 'ediff-util)
+ (setq-local transient-mark-mode t))
(define-obsolete-function-alias 'ediff-nuke-selective-display #'ignore "27.1")
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index f50b2540c55..c66a4fb2d6a 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -1410,7 +1410,7 @@ with a \\[universal-argument] prefix, makes up a 3-way conflict."
\\{smerge-mode-map}"
:group 'smerge :lighter " SMerge"
- (when (and (boundp 'font-lock-mode) font-lock-mode)
+ (when font-lock-mode
(save-excursion
(if smerge-mode
(font-lock-add-keywords nil smerge-font-lock-keywords 'append)
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 9d0808c0435..14c81578b79 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -54,6 +54,42 @@ See `run-hooks'."
:type 'hook
:group 'vc)
+(defface vc-dir-header '((t :inherit font-lock-type-face))
+ "Face for headers in VC-dir buffers."
+ :group 'vc)
+
+(defface vc-dir-header-value '((t :inherit font-lock-variable-name-face))
+ "Face for header values in VC-dir buffers."
+ :group 'vc)
+
+(defface vc-dir-directory '((t :inherit font-lock-comment-delimiter-face))
+ "Face for directories in VC-dir buffers."
+ :group 'vc)
+
+(defface vc-dir-file '((t :inherit font-lock-function-name-face))
+ "Face for files in VC-dir buffers."
+ :group 'vc)
+
+(defface vc-dir-mark-indicator '((t :inherit font-lock-type-face))
+ "Face for mark indicators in VC-dir buffers."
+ :group 'vc)
+
+(defface vc-dir-status-warning '((t :inherit font-lock-warning-face))
+ "Face for warning status in VC-dir buffers."
+ :group 'vc)
+
+(defface vc-dir-status-edited '((t :inherit font-lock-variable-name-face))
+ "Face for edited status in VC-dir buffers."
+ :group 'vc)
+
+(defface vc-dir-status-up-to-date '((t :inherit font-lock-builtin-face))
+ "Face for up-to-date status in VC-dir buffers."
+ :group 'vc)
+
+(defface vc-dir-ignored '((t :inherit shadow))
+ "Face for ignored or empty values in VC-dir buffers."
+ :group 'vc)
+
;; Used to store information for the files displayed in the directory buffer.
;; Each item displayed corresponds to one of these defstructs.
(cl-defstruct (vc-dir-fileinfo
@@ -1126,11 +1162,11 @@ It calls the `dir-extra-headers' backend method to display backend
specific headers."
(concat
;; First layout the common headers.
- (propertize "VC backend : " 'face 'font-lock-type-face)
- (propertize (format "%s\n" backend) 'face 'font-lock-variable-name-face)
- (propertize "Working dir: " 'face 'font-lock-type-face)
+ (propertize "VC backend : " 'face 'vc-dir-header)
+ (propertize (format "%s\n" backend) 'face 'vc-dir-header-value)
+ (propertize "Working dir: " 'face 'vc-dir-header)
(propertize (format "%s\n" (abbreviate-file-name dir))
- 'face 'font-lock-variable-name-face)
+ 'face 'vc-dir-header-value)
;; Then the backend specific ones.
(vc-call-backend backend 'dir-extra-headers dir)
"\n"))
@@ -1386,9 +1422,9 @@ These are the commands available for use in the file status buffer:
;; backend specific headers.
;; XXX: change this to return nil before the release.
(concat
- (propertize "Extra : " 'face 'font-lock-type-face)
+ (propertize "Extra : " 'face 'vc-dir-header)
(propertize "Please add backend specific headers here. It's easy!"
- 'face 'font-lock-warning-face)))
+ 'face 'vc-dir-status-warning)))
(defvar vc-dir-status-mouse-map
(let ((map (make-sparse-keymap)))
@@ -1414,21 +1450,21 @@ These are the commands available for use in the file status buffer:
(insert
(propertize
(format "%c" (if (vc-dir-fileinfo->marked fileentry) ?* ? ))
- 'face 'font-lock-type-face)
+ 'face 'vc-dir-mark-indicator)
" "
(propertize
(format "%-20s" state)
- 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face)
- ((memq state '(missing conflict)) 'font-lock-warning-face)
+ 'face (cond ((eq state 'up-to-date) 'vc-dir-status-up-to-date)
+ ((memq state '(missing conflict)) 'vc-dir-status-warning)
((eq state 'edited) 'font-lock-constant-face)
- (t 'font-lock-variable-name-face))
+ (t 'vc-dir-header-value))
'mouse-face 'highlight
'keymap vc-dir-status-mouse-map)
" "
(propertize
(format "%s" filename)
'face
- (if isdir 'font-lock-comment-delimiter-face 'font-lock-function-name-face)
+ (if isdir 'vc-dir-directory 'vc-dir-file)
'help-echo
(if isdir
"Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu"
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index d00c2c2133c..e7306386fea 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -462,7 +462,7 @@ or an empty string if none."
(eq 0 (logand ?\111 (logxor old-perm new-perm))))
" "
(if (eq 0 (logand ?\111 old-perm)) "+x" "-x"))
- 'face 'font-lock-type-face))
+ 'face 'vc-dir-header))
(defun vc-git-dir-printer (info)
"Pretty-printer for the vc-dir-fileinfo structure."
@@ -474,20 +474,20 @@ or an empty string if none."
(insert
" "
(propertize (format "%c" (if (vc-dir-fileinfo->marked info) ?* ? ))
- 'face 'font-lock-type-face)
+ 'face 'vc-dir-mark-indicator)
" "
(propertize
(format "%-12s" state)
- 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face)
- ((eq state '(missing conflict)) 'font-lock-warning-face)
- (t 'font-lock-variable-name-face))
+ 'face (cond ((eq state 'up-to-date) 'vc-dir-status-up-to-date)
+ ((eq state '(missing conflict)) 'vc-dir-status-warning)
+ (t 'vc-dir-status-edited))
'mouse-face 'highlight
'keymap vc-dir-status-mouse-map)
" " (vc-git-permissions-as-string old-perm new-perm)
" "
(propertize (vc-git-escape-file-name (vc-dir-fileinfo->name info))
- 'face (if isdir 'font-lock-comment-delimiter-face
- 'font-lock-function-name-face)
+ 'face (if isdir 'vc-dir-directory
+ 'vc-dir-file)
'help-echo
(if isdir
"Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu"
@@ -784,7 +784,7 @@ or an empty string if none."
(mapconcat
(lambda (x)
(propertize x
- 'face 'font-lock-variable-name-face
+ 'face 'vc-dir-header-value
'mouse-face 'highlight
'vc-git-hideable all-hideable
'help-echo vc-git-stash-list-help
@@ -800,7 +800,7 @@ or an empty string if none."
(mapconcat
(lambda (x)
(propertize x
- 'face 'font-lock-variable-name-face
+ 'face 'vc-dir-header-value
'mouse-face 'highlight
'invisible t
'vc-git-hideable t
@@ -810,33 +810,32 @@ or an empty string if none."
(propertize "\n"
'invisible t
'vc-git-hideable t))))))))
- ;; FIXME: maybe use a different face when nothing is stashed.
(concat
- (propertize "Branch : " 'face 'font-lock-type-face)
+ (propertize "Branch : " 'face 'vc-dir-header)
(propertize branch
- 'face 'font-lock-variable-name-face)
+ 'face 'vc-dir-header-value)
(when remote-url
(concat
"\n"
- (propertize "Remote : " 'face 'font-lock-type-face)
+ (propertize "Remote : " 'face 'vc-dir-header)
(propertize remote-url
- 'face 'font-lock-variable-name-face)))
+ 'face 'vc-dir-header-value)))
;; For now just a heading, key bindings can be added later for various bisect actions
(when (file-exists-p (expand-file-name ".git/BISECT_START" (vc-git-root dir)))
- (propertize "\nBisect : in progress" 'face 'font-lock-warning-face))
+ (propertize "\nBisect : in progress" 'face 'vc-dir-status-warning))
(when (file-exists-p (expand-file-name ".git/rebase-apply" (vc-git-root dir)))
- (propertize "\nRebase : in progress" 'face 'font-lock-warning-face))
+ (propertize "\nRebase : in progress" 'face 'vc-dir-status-warning))
(if stash-list
(concat
- (propertize "\nStash : " 'face 'font-lock-type-face)
+ (propertize "\nStash : " 'face 'vc-dir-header)
stash-button
stash-string)
(concat
- (propertize "\nStash : " 'face 'font-lock-type-face)
+ (propertize "\nStash : " 'face 'vc-dir-header)
(propertize "Nothing stashed"
'help-echo vc-git-stash-shared-help
'keymap vc-git-stash-shared-map
- 'face 'font-lock-variable-name-face))))))
+ 'face 'vc-dir-ignored))))))
(defun vc-git-branches ()
"Return the existing branches, as a list of strings.
diff --git a/lisp/vcursor.el b/lisp/vcursor.el
index e699df4842d..595a25381ab 100644
--- a/lisp/vcursor.el
+++ b/lisp/vcursor.el
@@ -38,7 +38,7 @@
;; or t), which means that copying from the vcursor will be turned
;; off after any operation not involving the vcursor, but the
;; vcursor itself will be left alone.
-;; - works on dumb terminals with Emacs 19.29 and later
+;; - works on dumb terminals
;; - new keymap vcursor-map for binding to a prefix key
;; - vcursor-compare-windows substantially improved
;; - vcursor-execute-{key,command} much better about using the
@@ -50,11 +50,7 @@
;; ============
;;
;; Virtual cursor commands. I got this idea from the old BBC micro.
-;; You need Emacs 19 or 20 and a window system for the best effects.
-;; For character terminals, at least Emacs 19.29 is required
-;; (special behavior for the overlay property
-;; "before-string" must be implemented). Search for "dumb terminals"
-;; for more information.
+;; You need a window system for the best effects.
;;
;; This is much easier to use than the instructions are to read.
;; First, you need to let vcursor define some keys: setting
diff --git a/lisp/view.el b/lisp/view.el
index 5a2f2fadfc3..026c1ece304 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -96,38 +96,31 @@ interactive command; otherwise the help message is not shown."
:version "22.1")
;;;###autoload
-(defvar view-mode nil
+(defvar-local view-mode nil
"Non-nil if View mode is enabled.
Don't change this variable directly, you must change it by one of the
functions that enable or disable view mode.")
-;;;###autoload
-(make-variable-buffer-local 'view-mode)
(defcustom view-mode-hook nil
"Normal hook run when starting to view a buffer or file."
:type 'hook
:group 'view)
-(defvar view-old-buffer-read-only nil)
-(make-variable-buffer-local 'view-old-buffer-read-only)
+(defvar-local view-old-buffer-read-only nil)
-(defvar view-old-Helper-return-blurb)
-(make-variable-buffer-local 'view-old-Helper-return-blurb)
+(defvar-local view-old-Helper-return-blurb nil)
-(defvar view-page-size nil
+(defvar-local view-page-size nil
"Default number of lines to scroll by View page commands.
If nil that means use the window size.")
-(make-variable-buffer-local 'view-page-size)
-(defvar view-half-page-size nil
+(defvar-local view-half-page-size nil
"Default number of lines to scroll by View half page commands.
If nil that means use half the window size.")
-(make-variable-buffer-local 'view-half-page-size)
-(defvar view-last-regexp nil)
-(make-variable-buffer-local 'view-last-regexp) ; Global is better???
+(defvar-local view-last-regexp nil) ; Global is better???
-(defvar view-return-to-alist nil
+(defvar-local view-return-to-alist nil
"What to do with used windows and where to go when finished viewing buffer.
This is local in each buffer being viewed.
It is added to by `view-mode-enter' when starting to view a buffer and
@@ -136,18 +129,16 @@ subtracted from by `view-mode-exit' when finished viewing the buffer.
See RETURN-TO-ALIST argument of function `view-mode-exit' for the format of
`view-return-to-alist'.")
(make-obsolete-variable
- 'view-return-to-alist "this variable is no more used." "24.1")
-(make-variable-buffer-local 'view-return-to-alist)
+ 'view-return-to-alist "this variable is no longer used." "24.1")
(put 'view-return-to-alist 'permanent-local t)
-(defvar view-exit-action nil
+(defvar-local view-exit-action nil
"If non-nil, a function called when finished viewing.
The function should take one argument (a buffer).
Commands like \\[view-file] and \\[view-file-other-window] may
set this to bury or kill the viewed buffer.
Observe that the buffer viewed might not appear in any window at
the time this function is called.")
-(make-variable-buffer-local 'view-exit-action)
(defvar view-no-disable-on-exit nil
"If non-nil, View mode \"exit\" commands don't actually disable View mode.
@@ -155,10 +146,9 @@ Instead, these commands just switch buffers or windows.
This is set in certain buffers by specialized features such as help commands
that use View mode automatically.")
-(defvar view-overlay nil
+(defvar-local view-overlay nil
"Overlay used to display where a search operation found its match.
This is local in each buffer, once it is used.")
-(make-variable-buffer-local 'view-overlay)
;; Define keymap inside defvar to make it easier to load changes.
;; Some redundant "less"-like key bindings below have been commented out.
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 68a0d3d2356..de2b5d4a7c8 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1019,9 +1019,8 @@ button end points."
Recommended as a parent keymap for modes using widgets.
Note that such modes will need to require wid-edit.")
-(defvar widget-global-map global-map
+(defvar-local widget-global-map global-map
"Keymap used for events a widget does not handle itself.")
-(make-variable-buffer-local 'widget-global-map)
(defvar widget-field-keymap
(let ((map (copy-keymap widget-keymap)))
@@ -1326,13 +1325,11 @@ When not inside a field, signal an error."
;;; Setting up the buffer.
-(defvar widget-field-new nil
+(defvar-local widget-field-new nil
"List of all newly created editable fields in the buffer.")
-(make-variable-buffer-local 'widget-field-new)
-(defvar widget-field-list nil
+(defvar-local widget-field-list nil
"List of all editable fields in the buffer.")
-(make-variable-buffer-local 'widget-field-list)
(defun widget-at (&optional pos)
"The button or field at POS (default, point)."
@@ -1359,13 +1356,11 @@ When not inside a field, signal an error."
(widget-clear-undo)
(widget-add-change))
-(defvar widget-field-last nil)
-;; Last field containing point.
-(make-variable-buffer-local 'widget-field-last)
+(defvar-local widget-field-last nil
+ "Last field containing point.")
-(defvar widget-field-was nil)
-;; The widget data before the change.
-(make-variable-buffer-local 'widget-field-was)
+(defvar-local widget-field-was nil
+ "The widget data before the change.")
(defun widget-field-at (pos)
"Return the widget field at POS, or nil if none."
diff --git a/lisp/window.el b/lisp/window.el
index 8905d4a826e..2d0a73b426d 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -9733,13 +9733,16 @@ cycling order is middle -> top -> bottom."
:group 'windows)
(defun recenter-top-bottom (&optional arg)
- "Move current buffer line to the specified window line.
-With no prefix argument, successive calls place point according
-to the cycling order defined by `recenter-positions'.
-
-A prefix argument is handled like `recenter':
- With numeric prefix ARG, move current line to window-line ARG.
- With plain `C-u', move current line to window center."
+ "Scroll the window so that current line is in the middle of the window.
+Successive invocations scroll the window in a cyclical order to put
+the current line at certain places within the window, as determined by
+`recenter-positions'. By default, the second invocation puts the
+current line at the top-most window line, the third invocation puts it
+on the bottom-most window line, and then the order is reused in a
+cyclical manner.
+
+With numeric prefix ARG, move current line ARG lines below the window top.
+With plain \\[universal-argument], move current line to window center."
(interactive "P")
(cond
(arg (recenter arg t)) ; Always respect ARG.
@@ -9765,6 +9768,19 @@ A prefix argument is handled like `recenter':
(define-key global-map [?\C-l] 'recenter-top-bottom)
+(defun recenter-other-window (&optional arg)
+ "Call `recenter-top-bottom' in the other window.
+
+A prefix argument is handled like `recenter':
+ With numeric prefix ARG, move current line to window-line ARG.
+ With plain `C-u', move current line to window center."
+ (interactive "P")
+ (with-selected-window (other-window-for-scrolling)
+ (recenter-top-bottom arg)
+ (pulse-momentary-highlight-one-line (point))))
+
+(define-key global-map [?\S-\M-\C-l] 'recenter-other-window)
+
(defun move-to-window-line-top-bottom (&optional arg)
"Position point relative to window.
diff --git a/lisp/woman.el b/lisp/woman.el
index 0e4c1c10fca..9a03d30bb7f 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1078,9 +1078,8 @@ Set by `.ns' request; reset by any output or `.rs' request")
;; Could end with "\\( +\\|$\\)" instead of " *"
"Regexp to match a ?roff request plus trailing white space.")
-(defvar woman-imenu-done nil
+(defvar-local woman-imenu-done nil
"Buffer-local: set to true if function `woman-imenu' has been called.")
-(make-variable-buffer-local 'woman-imenu-done)
;; From imenu.el -- needed when reformatting a file in its old buffer.
;; The latest buffer index used to update the menu bar menu.
@@ -2115,7 +2114,7 @@ No external programs are used."
(interactive) ; mainly for testing
(WoMan-log-begin)
(run-hooks 'woman-pre-format-hook)
- (and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1))
+ (and font-lock-mode (font-lock-mode -1))
;; (fundamental-mode)
(let ((start-time (current-time))
time)
diff --git a/src/data.c b/src/data.c
index 35a6890b9bd..38cde0ff8b2 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1819,7 +1819,9 @@ a variable local to the current buffer for one particular use, use
while setting up a new major mode, unless they have a `permanent-local'
property.
-The function `default-value' gets the default value and `set-default' sets it. */)
+The function `default-value' gets the default value and `set-default' sets it.
+
+See also `defvar-local'. */)
(register Lisp_Object variable)
{
struct Lisp_Symbol *sym;
diff --git a/src/editfns.c b/src/editfns.c
index e3285494c14..991f79abac7 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3134,6 +3134,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
char *format_start = SSDATA (args[0]);
bool multibyte_format = STRING_MULTIBYTE (args[0]);
ptrdiff_t formatlen = SBYTES (args[0]);
+ bool fmt_props = string_intervals (args[0]);
/* Upper bound on number of format specs. Each uses at least 2 chars. */
ptrdiff_t nspec_bound = SCHARS (args[0]) >> 1;
@@ -3406,13 +3407,20 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
convbytes += padding;
if (convbytes <= buf + bufsize - p)
{
+ /* If the format spec has properties, we should account
+ for the padding on the left in the info[] array. */
+ if (fmt_props)
+ spec->start = nchars;
if (! minus_flag)
{
memset (p, ' ', padding);
p += padding;
nchars += padding;
}
- spec->start = nchars;
+ /* If the properties will come from the argument, we
+ don't extend them to the left due to padding. */
+ if (!fmt_props)
+ spec->start = nchars;
if (p > buf
&& multibyte
diff --git a/src/eval.c b/src/eval.c
index 5bf3faebc85..3aff3b56d52 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -818,6 +818,8 @@ The optional argument DOCSTRING is a documentation string for the
variable.
To define a user option, use `defcustom' instead of `defvar'.
+
+To define a buffer-local variable, use `defvar-local'.
usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
(Lisp_Object args)
{
diff --git a/src/fns.c b/src/fns.c
index bd4afa0c4e9..02743c62a57 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -5758,6 +5758,38 @@ in OBJECT. */)
traverse_intervals (intervals, 0, collect_interval, collector);
return CDR (collector);
}
+
+DEFUN ("line-number-at-pos", Fline_number_at_pos,
+ Sline_number_at_pos, 0, 2, 0,
+ doc: /* Return the line number at POSITION.
+If POSITION is nil, use the current buffer location.
+
+If the buffer is narrowed, the position returned is the position in the
+visible part of the buffer. If ABSOLUTE is non-nil, count the lines
+from the absolute start of the buffer. */)
+ (register Lisp_Object position, Lisp_Object absolute)
+{
+ ptrdiff_t pos, start = BEGV;
+
+ if (MARKERP (position))
+ pos = marker_position (position);
+ else if (NILP (position))
+ pos = PT;
+ else
+ {
+ CHECK_FIXNUM (position);
+ pos = XFIXNUM (position);
+ }
+
+ if (!NILP (absolute))
+ start = BEG_BYTE;
+
+ /* Check that POSITION is n the visible range of the buffer. */
+ if (pos < BEGV || pos > ZV)
+ args_out_of_range (make_int (start), make_int (ZV));
+
+ return make_int (count_lines (start, CHAR_TO_BYTE (pos)) + 1);
+}
void
@@ -5800,6 +5832,7 @@ syms_of_fns (void)
defsubr (&Sdefine_hash_table_test);
defsubr (&Sstring_search);
defsubr (&Sobject_intervals);
+ defsubr (&Sline_number_at_pos);
/* Crypto and hashing stuff. */
DEFSYM (Qiv_auto, "iv-auto");
diff --git a/src/frame.c b/src/frame.c
index a2167ce1e49..635fc945604 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -898,6 +898,7 @@ make_frame (bool mini_p)
f->no_accept_focus = false;
f->z_group = z_group_none;
f->tooltip = false;
+ f->child_frame_border_width = -1;
f->last_tab_bar_item = -1;
#ifndef HAVE_EXT_TOOL_BAR
f->last_tool_bar_item = -1;
@@ -3544,10 +3545,17 @@ DEFUN ("frame-fringe-width", Ffringe_width, Sfringe_width, 0, 1, 0,
}
DEFUN ("frame-child-frame-border-width", Fframe_child_frame_border_width, Sframe_child_frame_border_width, 0, 1, 0,
- doc: /* Return width of FRAME's child-frame border in pixels. */)
+ doc: /* Return width of FRAME's child-frame border in pixels.
+ If FRAME's 'child-frame-border-width' parameter is nil, return FRAME's
+ internal border width instead. */)
(Lisp_Object frame)
{
- return make_fixnum (FRAME_CHILD_FRAME_BORDER_WIDTH (decode_any_frame (frame)));
+ int width = FRAME_CHILD_FRAME_BORDER_WIDTH (decode_any_frame (frame));
+
+ if (width < 0)
+ return make_fixnum (FRAME_INTERNAL_BORDER_WIDTH (decode_any_frame (frame)));
+ else
+ return make_fixnum (FRAME_CHILD_FRAME_BORDER_WIDTH (decode_any_frame (frame)));
}
DEFUN ("frame-internal-border-width", Fframe_internal_border_width, Sframe_internal_border_width, 0, 1, 0,
@@ -4311,7 +4319,9 @@ gui_report_frame_params (struct frame *f, Lisp_Object *alistptr)
store_in_alist (alistptr, Qborder_width,
make_fixnum (f->border_width));
store_in_alist (alistptr, Qchild_frame_border_width,
- make_fixnum (FRAME_CHILD_FRAME_BORDER_WIDTH (f)));
+ FRAME_CHILD_FRAME_BORDER_WIDTH (f) >= 0
+ ? make_fixnum (FRAME_CHILD_FRAME_BORDER_WIDTH (f))
+ : Qnil);
store_in_alist (alistptr, Qinternal_border_width,
make_fixnum (FRAME_INTERNAL_BORDER_WIDTH (f)));
store_in_alist (alistptr, Qright_divider_width,
diff --git a/src/frame.h b/src/frame.h
index 21148fe94c9..9ddcb4c6810 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1449,11 +1449,11 @@ INLINE int
FRAME_INTERNAL_BORDER_WIDTH (struct frame *f)
{
#ifdef HAVE_WINDOW_SYSTEM
- return FRAME_PARENT_FRAME(f)
- ? (f->child_frame_border_width
- ? FRAME_CHILD_FRAME_BORDER_WIDTH(f)
- : frame_dimension (f->internal_border_width))
- : frame_dimension (f->internal_border_width);
+ return (FRAME_PARENT_FRAME(f)
+ ? (FRAME_CHILD_FRAME_BORDER_WIDTH(f) >= 0
+ ? FRAME_CHILD_FRAME_BORDER_WIDTH(f)
+ : frame_dimension (f->internal_border_width))
+ : frame_dimension (f->internal_border_width));
#else
return frame_dimension (f->internal_border_width);
#endif
diff --git a/src/keymap.c b/src/keymap.c
index de9b2b58c5e..782931fadff 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1065,9 +1065,6 @@ binding KEY to DEF is added at the front of KEYMAP. */)
if (length == 0)
return Qnil;
- if (SYMBOLP (def) && !EQ (Vdefine_key_rebound_commands, Qt))
- Vdefine_key_rebound_commands = Fcons (def, Vdefine_key_rebound_commands);
-
int meta_bit = (VECTORP (key) || (STRINGP (key) && STRING_MULTIBYTE (key))
? meta_modifier : 0x80);
@@ -3132,12 +3129,6 @@ syms_of_keymap (void)
pure_cons (build_pure_c_string ("SPC"), build_pure_c_string (" ")));
staticpro (&exclude_keys);
- DEFVAR_LISP ("define-key-rebound-commands", Vdefine_key_rebound_commands,
- doc: /* List of commands given new key bindings recently.
-This is used for internal purposes during Emacs startup;
-don't alter it yourself. */);
- Vdefine_key_rebound_commands = Qt;
-
DEFVAR_LISP ("minibuffer-local-map", Vminibuffer_local_map,
doc: /* Default keymap to use when reading from the minibuffer. */);
Vminibuffer_local_map = Fmake_sparse_keymap (Qnil);
diff --git a/src/lisp.h b/src/lisp.h
index f6588685443..409a1e70608 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3734,6 +3734,7 @@ extern void message_log_maybe_newline (void);
extern void update_echo_area (void);
extern void truncate_echo_area (ptrdiff_t);
extern void redisplay (void);
+extern ptrdiff_t count_lines (ptrdiff_t start_byte, ptrdiff_t end_byte);
void set_frame_cursor_types (struct frame *, Lisp_Object);
extern void syms_of_xdisp (void);
diff --git a/src/lread.c b/src/lread.c
index 72b68df6631..010194c34ea 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -537,6 +537,33 @@ readbyte_from_string (int c, Lisp_Object readcharfun)
}
+/* Signal Qinvalid_read_syntax error.
+ S is error string of length N (if > 0) */
+
+static AVOID
+invalid_syntax_lisp (Lisp_Object s, Lisp_Object readcharfun)
+{
+ if (BUFFERP (readcharfun))
+ {
+ xsignal (Qinvalid_read_syntax,
+ list3 (s,
+ /* We should already be in the readcharfun
+ buffer when this error is called, so no need
+ to switch to it first. */
+ make_fixnum (count_lines (BEGV_BYTE, PT_BYTE) + 1),
+ make_fixnum (current_column ())));
+ }
+ else
+ xsignal1 (Qinvalid_read_syntax, s);
+}
+
+static AVOID
+invalid_syntax (const char *s, Lisp_Object readcharfun)
+{
+ invalid_syntax_lisp (build_string (s), readcharfun);
+}
+
+
/* Read one non-ASCII character from INFILE. The character is
encoded in `emacs-mule' and the first byte is already read in
C. */
@@ -594,8 +621,7 @@ read_emacs_mule_char (int c, int (*readbyte) (int, Lisp_Object), Lisp_Object rea
}
c = DECODE_CHAR (charset, code);
if (c < 0)
- Fsignal (Qinvalid_read_syntax,
- list1 (build_string ("invalid multibyte form")));
+ invalid_syntax ("invalid multibyte form", readcharfun);
return c;
}
@@ -778,7 +804,10 @@ If `inhibit-interaction' is non-nil, this function will signal an
barf_if_interaction_inhibited ();
if (! NILP (prompt))
- message_with_string ("%s", prompt, 0);
+ {
+ cancel_echoing ();
+ message_with_string ("%s", prompt, 0);
+ }
val = read_filtered_event (1, 1, 1, ! NILP (inherit_input_method), seconds);
return (NILP (val) ? Qnil
@@ -813,7 +842,10 @@ If `inhibit-interaction' is non-nil, this function will signal an
barf_if_interaction_inhibited ();
if (! NILP (prompt))
- message_with_string ("%s", prompt, 0);
+ {
+ cancel_echoing ();
+ message_with_string ("%s", prompt, 0);
+ }
return read_filtered_event (0, 0, 0, ! NILP (inherit_input_method), seconds);
}
@@ -849,7 +881,10 @@ If `inhibit-interaction' is non-nil, this function will signal an
barf_if_interaction_inhibited ();
if (! NILP (prompt))
- message_with_string ("%s", prompt, 0);
+ {
+ cancel_echoing ();
+ message_with_string ("%s", prompt, 0);
+ }
val = read_filtered_event (1, 1, 0, ! NILP (inherit_input_method), seconds);
@@ -2330,16 +2365,6 @@ read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end)
}
-/* Signal Qinvalid_read_syntax error.
- S is error string of length N (if > 0) */
-
-static AVOID
-invalid_syntax (const char *s)
-{
- xsignal1 (Qinvalid_read_syntax, build_string (s));
-}
-
-
/* Use this for recursive reads, in contexts where internal tokens
are not allowed. */
@@ -2353,8 +2378,8 @@ read0 (Lisp_Object readcharfun)
if (!c)
return val;
- xsignal1 (Qinvalid_read_syntax,
- Fmake_string (make_fixnum (1), make_fixnum (c), Qnil));
+ invalid_syntax_lisp (Fmake_string (make_fixnum (1), make_fixnum (c), Qnil),
+ readcharfun);
}
/* Grow a read buffer BUF that contains OFFSET useful bytes of data,
@@ -2384,7 +2409,8 @@ grow_read_buffer (char *buf, ptrdiff_t offset,
/* Return the scalar value that has the Unicode character name NAME.
Raise 'invalid-read-syntax' if there is no such character. */
static int
-character_name_to_code (char const *name, ptrdiff_t name_len)
+character_name_to_code (char const *name, ptrdiff_t name_len,
+ Lisp_Object readcharfun)
{
/* For "U+XXXX", pass the leading '+' to string_to_number to reject
monstrosities like "U+-0000". */
@@ -2400,7 +2426,7 @@ character_name_to_code (char const *name, ptrdiff_t name_len)
{
AUTO_STRING (format, "\\N{%s}");
AUTO_STRING_WITH_LEN (namestr, name, name_len);
- xsignal1 (Qinvalid_read_syntax, CALLN (Fformat, format, namestr));
+ invalid_syntax_lisp (CALLN (Fformat, format, namestr), readcharfun);
}
return XFIXNUM (code);
@@ -2619,7 +2645,7 @@ read_escape (Lisp_Object readcharfun, bool stringp)
{
c = READCHAR;
if (c != '{')
- invalid_syntax ("Expected opening brace after \\N");
+ invalid_syntax ("Expected opening brace after \\N", readcharfun);
char name[UNICODE_CHARACTER_NAME_LENGTH_BOUND + 1];
bool whitespace = false;
ptrdiff_t length = 0;
@@ -2634,8 +2660,9 @@ read_escape (Lisp_Object readcharfun, bool stringp)
{
AUTO_STRING (format,
"Invalid character U+%04X in character name");
- xsignal1 (Qinvalid_read_syntax,
- CALLN (Fformat, format, make_fixed_natnum (c)));
+ invalid_syntax_lisp (CALLN (Fformat, format,
+ make_fixed_natnum (c)),
+ readcharfun);
}
/* Treat multiple adjacent whitespace characters as a
single space character. This makes it easier to use
@@ -2651,15 +2678,15 @@ read_escape (Lisp_Object readcharfun, bool stringp)
whitespace = false;
name[length++] = c;
if (length >= sizeof name)
- invalid_syntax ("Character name too long");
+ invalid_syntax ("Character name too long", readcharfun);
}
if (length == 0)
- invalid_syntax ("Empty character name");
+ invalid_syntax ("Empty character name", readcharfun);
name[length] = '\0';
/* character_name_to_code can invoke read1, recursively.
This is why read1's buffer is not static. */
- return character_name_to_code (name, length);
+ return character_name_to_code (name, length, readcharfun);
}
default:
@@ -2697,10 +2724,11 @@ enum { stackbufsize = max (64,
+ INT_STRLEN_BOUND (EMACS_INT) + 1)) };
static void
-invalid_radix_integer (EMACS_INT radix, char stackbuf[VLA_ELEMS (stackbufsize)])
+invalid_radix_integer (EMACS_INT radix, char stackbuf[VLA_ELEMS (stackbufsize)],
+ Lisp_Object readcharfun)
{
sprintf (stackbuf, invalid_radix_integer_format, radix);
- invalid_syntax (stackbuf);
+ invalid_syntax (stackbuf, readcharfun);
}
/* Read an integer in radix RADIX using READCHARFUN to read
@@ -2760,7 +2788,7 @@ read_integer (Lisp_Object readcharfun, int radix,
UNREAD (c);
if (valid != 1)
- invalid_radix_integer (radix, stackbuf);
+ invalid_radix_integer (radix, stackbuf, readcharfun);
*p = '\0';
return unbind_to (count, string_to_number (read_buffer, radix, NULL));
@@ -2896,7 +2924,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
return ht;
}
UNREAD (c);
- invalid_syntax ("#");
+ invalid_syntax ("#", readcharfun);
}
if (c == '^')
{
@@ -2948,9 +2976,9 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
}
return tbl;
}
- invalid_syntax ("#^^");
+ invalid_syntax ("#^^", readcharfun);
}
- invalid_syntax ("#^");
+ invalid_syntax ("#^", readcharfun);
}
if (c == '&')
{
@@ -2973,7 +3001,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
version. */
&& ! (XFIXNAT (length)
== (SCHARS (tmp) - 1) * BOOL_VECTOR_BITS_PER_CHAR)))
- invalid_syntax ("#&...");
+ invalid_syntax ("#&...", readcharfun);
val = make_uninit_bool_vector (XFIXNAT (length));
data = bool_vector_uchar_data (val);
@@ -2984,7 +3012,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
&= (1 << (XFIXNUM (length) % BOOL_VECTOR_BITS_PER_CHAR)) - 1;
return val;
}
- invalid_syntax ("#&...");
+ invalid_syntax ("#&...", readcharfun);
}
if (c == '[')
{
@@ -3002,7 +3030,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
&& VECTORP (AREF (tmp, COMPILED_CONSTANTS)))
|| CONSP (AREF (tmp, COMPILED_BYTECODE)))
&& FIXNATP (AREF (tmp, COMPILED_STACK_DEPTH))))
- invalid_syntax ("Invalid byte-code object");
+ invalid_syntax ("Invalid byte-code object", readcharfun);
if (STRINGP (AREF (tmp, COMPILED_BYTECODE))
&& STRING_MULTIBYTE (AREF (tmp, COMPILED_BYTECODE)))
@@ -3044,7 +3072,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
/* Read the string itself. */
tmp = read1 (readcharfun, &ch, 0);
if (ch != 0 || !STRINGP (tmp))
- invalid_syntax ("#");
+ invalid_syntax ("#", readcharfun);
/* Read the intervals and their properties. */
while (1)
{
@@ -3059,7 +3087,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
if (ch == 0)
plist = read1 (readcharfun, &ch, 0);
if (ch)
- invalid_syntax ("Invalid string property list");
+ invalid_syntax ("Invalid string property list", readcharfun);
Fset_text_properties (beg, end, plist, tmp);
}
@@ -3207,7 +3235,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
if (c == 'r' || c == 'R')
{
if (! (2 <= n && n <= 36))
- invalid_radix_integer (n, stackbuf);
+ invalid_radix_integer (n, stackbuf, readcharfun);
return read_integer (readcharfun, n, stackbuf);
}
@@ -3301,7 +3329,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
return read_integer (readcharfun, 2, stackbuf);
UNREAD (c);
- invalid_syntax ("#");
+ invalid_syntax ("#", readcharfun);
case ';':
while ((c = READCHAR) >= 0 && c != '\n');
@@ -3373,7 +3401,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
if (ok)
return make_fixnum (c);
- invalid_syntax ("?");
+ invalid_syntax ("?", readcharfun);
}
case '"':
@@ -3459,7 +3487,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
/* Any modifiers remaining are invalid. */
if (modifiers)
- invalid_syntax ("Invalid modifier in string");
+ invalid_syntax ("Invalid modifier in string", readcharfun);
p += CHAR_STRING (ch, (unsigned char *) p);
}
else
@@ -3999,7 +4027,7 @@ read_list (bool flag, Lisp_Object readcharfun)
{
if (ch == ']')
return val;
- invalid_syntax (") or . in a vector");
+ invalid_syntax (") or . in a vector", readcharfun);
}
if (ch == ')')
return val;
@@ -4079,9 +4107,9 @@ read_list (bool flag, Lisp_Object readcharfun)
return val;
}
- invalid_syntax (". in wrong context");
+ invalid_syntax (". in wrong context", readcharfun);
}
- invalid_syntax ("] in a list");
+ invalid_syntax ("] in a list", readcharfun);
}
tem = list1 (elt);
if (!NILP (tail))
diff --git a/src/nsfns.m b/src/nsfns.m
index c383e2f7ecf..5c4cc915e7c 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -482,7 +482,7 @@ ns_set_represented_filename (struct frame *f)
#if defined (NS_IMPL_COCOA) && defined (MAC_OS_X_VERSION_10_7)
/* Work around for Mach port leaks on macOS 10.15 (bug#38618). */
NSURL *fileURL = [NSURL fileURLWithPath:fstr isDirectory:NO];
- NSNumber *isUbiquitousItem = @YES;
+ NSNumber *isUbiquitousItem = [NSNumber numberWithBool:YES];
[fileURL getResourceValue:(id *)&isUbiquitousItem
forKey:NSURLIsUbiquitousItemKey
error:nil];
@@ -690,17 +690,24 @@ ns_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
static void
ns_set_child_frame_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
- int old_width = FRAME_CHILD_FRAME_BORDER_WIDTH (f);
- int new_width = check_int_nonnegative (arg);
+ int border;
- if (new_width == old_width)
- return;
- f->child_frame_border_width = new_width;
+ if (NILP (arg))
+ border = -1;
+ else if (RANGED_FIXNUMP (0, arg, INT_MAX))
+ border = XFIXNAT (arg);
+ else
+ signal_error ("Invalid child frame border width", arg);
- if (FRAME_NATIVE_WINDOW (f) != 0)
- adjust_frame_size (f, -1, -1, 3, 0, Qchild_frame_border_width);
+ if (border != FRAME_CHILD_FRAME_BORDER_WIDTH (f))
+ {
+ f->child_frame_border_width = border;
- SET_FRAME_GARBAGED (f);
+ if (FRAME_NATIVE_WINDOW (f) != 0)
+ adjust_frame_size (f, -1, -1, 3, 0, Qchild_frame_border_width);
+
+ SET_FRAME_GARBAGED (f);
+ }
}
static void
@@ -1213,7 +1220,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
gui_default_parameter (f, parms, Qinternal_border_width, make_fixnum (2),
"internalBorderWidth", "InternalBorderWidth",
RES_TYPE_NUMBER);
- gui_default_parameter (f, parms, Qchild_frame_border_width, make_fixnum (2),
+ gui_default_parameter (f, parms, Qchild_frame_border_width, Qnil,
"childFrameBorderWidth", "childFrameBorderWidth",
RES_TYPE_NUMBER);
gui_default_parameter (f, parms, Qright_divider_width, make_fixnum (0),
diff --git a/src/w32fns.c b/src/w32fns.c
index 5704f1d3c33..86c3db64e7b 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1561,8 +1561,14 @@ w32_clear_under_internal_border (struct frame *f)
static void
w32_set_child_frame_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
- int argval = check_integer_range (arg, INT_MIN, INT_MAX);
- int border = max (argval, 0);
+ int border;
+
+ if (NILP (arg))
+ border = -1;
+ else if (RANGED_FIXNUMP (0, arg, INT_MAX))
+ border = XFIXNAT (arg);
+ else
+ signal_error ("Invalid child frame border width", arg);
if (border != FRAME_CHILD_FRAME_BORDER_WIDTH (f))
{
@@ -5896,37 +5902,33 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
Lisp_Object value;
value = gui_display_get_arg (dpyinfo, parameters, Qinternal_border_width,
- "internalBorder", "InternalBorder",
+ "internalBorder", "internalBorder",
RES_TYPE_NUMBER);
if (! EQ (value, Qunbound))
parameters = Fcons (Fcons (Qinternal_border_width, value),
parameters);
}
+ gui_default_parameter (f, parameters, Qinternal_border_width, make_fixnum (0),
+ "internalBorderWidth", "internalBorderWidth",
+ RES_TYPE_NUMBER);
+
/* Same for child frames. */
if (NILP (Fassq (Qchild_frame_border_width, parameters)))
{
Lisp_Object value;
value = gui_display_get_arg (dpyinfo, parameters, Qchild_frame_border_width,
- "childFrameBorderWidth", "childFrameBorderWidth",
+ "childFrameBorder", "childFrameBorder",
RES_TYPE_NUMBER);
- if (! EQ (value, Qunbound))
+ if (!EQ (value, Qunbound))
parameters = Fcons (Fcons (Qchild_frame_border_width, value),
parameters);
-
}
- gui_default_parameter (f, parameters, Qchild_frame_border_width,
-#ifdef USE_GTK /* We used to impose 0 in xg_create_frame_widgets. */
- make_fixnum (0),
-#else
- make_fixnum (1),
-#endif
+ gui_default_parameter (f, parameters, Qchild_frame_border_width, Qnil,
"childFrameBorderWidth", "childFrameBorderWidth",
RES_TYPE_NUMBER);
- gui_default_parameter (f, parameters, Qinternal_border_width, make_fixnum (0),
- "internalBorderWidth", "InternalBorder", RES_TYPE_NUMBER);
gui_default_parameter (f, parameters, Qright_divider_width, make_fixnum (0),
NULL, NULL, RES_TYPE_NUMBER);
gui_default_parameter (f, parameters, Qbottom_divider_width, make_fixnum (0),
diff --git a/src/xdisp.c b/src/xdisp.c
index 32b359098aa..1815f986781 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10706,6 +10706,7 @@ include the height of both, if present, in the return value. */)
itdata = bidi_shelve_cache ();
start_display (&it, w, startp);
+ int start_y = it.current_y;
/* It makes no sense to measure dimensions of region of text that
crosses the point where bidi reordering changes scan direction.
By using unidirectional movement here we at least support the use
@@ -10714,8 +10715,23 @@ include the height of both, if present, in the return value. */)
same directionality. */
it.bidi_p = false;
+ /* Start at the beginning of the line containing FROM. Otherwise
+ IT.current_x will be incorrectly set to zero at some arbitrary
+ non-zero X coordinate. */
+ reseat_at_previous_visible_line_start (&it);
+ it.current_x = it.hpos = 0;
+ if (IT_CHARPOS (it) != start)
+ move_it_to (&it, start, -1, -1, -1, MOVE_TO_POS);
+
+ /* Now move to TO. */
+ int start_x = it.current_x;
int move_op = MOVE_TO_POS | MOVE_TO_Y;
int to_x = -1;
+ it.current_y = start_y;
+ /* If FROM is on a newline, pretend that we start at the beginning
+ of the next line, because the newline takes no place on display. */
+ if (FETCH_BYTE (start) == '\n')
+ it.current_x = 0;
if (!NILP (x_limit))
{
it.last_visible_x = max_x;
@@ -10758,8 +10774,14 @@ include the height of both, if present, in the return value. */)
x = max_x;
}
- /* Subtract height of header-line which was counted automatically by
- start_display. */
+ /* If text spans more than one screen line, we don't need to adjust
+ the x-span for start_x, since the second and subsequent lines
+ will begin at zero X coordinate. */
+ if (it.current_y > start_y)
+ start_x = 0;
+
+ /* Subtract height of header-line and tab-line which was counted
+ automatically by start_display. */
y = it.current_y + it.max_ascent + it.max_descent
- WINDOW_TAB_LINE_HEIGHT (w) - WINDOW_HEADER_LINE_HEIGHT (w);
/* Don't return more than Y-LIMIT. */
@@ -10786,7 +10808,7 @@ include the height of both, if present, in the return value. */)
if (old_b)
set_buffer_internal (old_b);
- return Fcons (make_fixnum (x), make_fixnum (y));
+ return Fcons (make_fixnum (x - start_x), make_fixnum (y));
}
/***********************************************************************
@@ -26969,6 +26991,15 @@ decode_mode_spec (struct window *w, register int c, int field_width,
return "";
}
+/* Return the number of lines between start_byte and end_byte in the
+ current buffer. */
+
+ptrdiff_t
+count_lines (ptrdiff_t start_byte, ptrdiff_t end_byte)
+{
+ ptrdiff_t ignored;
+ return display_count_lines (start_byte, end_byte, ZV, &ignored);
+}
/* Count up to COUNT lines starting from START_BYTE. COUNT negative
means count lines back from START_BYTE. But don't go beyond
@@ -35101,7 +35132,8 @@ of your window manager. */);
This dynamically changes the tab-bar's height to the minimum height
that is needed to make all tab-bar items visible.
If value is `grow-only', the tab-bar's height is only increased
-automatically; to decrease the tab-bar height, use \\[recenter]. */);
+automatically; to decrease the tab-bar height, use \\[recenter],
+after setting `recenter-redisplay' to the value of t. */);
Vauto_resize_tab_bars = Qt;
DEFVAR_BOOL ("auto-raise-tab-bar-buttons", auto_raise_tab_bar_buttons_p,
@@ -35113,7 +35145,8 @@ automatically; to decrease the tab-bar height, use \\[recenter]. */);
This dynamically changes the tool-bar's height to the minimum height
that is needed to make all tool-bar items visible.
If value is `grow-only', the tool-bar's height is only increased
-automatically; to decrease the tool-bar height, use \\[recenter]. */);
+automatically; to decrease the tool-bar height, use \\[recenter],
+after setting `recenter-redisplay' to the value of t. */);
Vauto_resize_tool_bars = Qt;
DEFVAR_BOOL ("auto-raise-tool-bar-buttons", auto_raise_tool_bar_buttons_p,
diff --git a/src/xfns.c b/src/xfns.c
index cac41ee4856..481ee0e2255 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1803,7 +1803,14 @@ x_change_tool_bar_height (struct frame *f, int height)
static void
x_set_child_frame_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
- int border = check_int_nonnegative (arg);
+ int border;
+
+ if (NILP (arg))
+ border = -1;
+ else if (RANGED_FIXNUMP (0, arg, INT_MAX))
+ border = XFIXNAT (arg);
+ else
+ signal_error ("Invalid child frame border width", arg);
if (border != FRAME_CHILD_FRAME_BORDER_WIDTH (f))
{
@@ -3920,36 +3927,31 @@ This function is an internal primitive--use `make-frame' instead. */)
parms);
}
+ gui_default_parameter (f, parms, Qinternal_border_width,
+#ifdef USE_GTK /* We used to impose 0 in xg_create_frame_widgets. */
+ make_fixnum (0),
+#else
+ make_fixnum (1),
+#endif
+ "internalBorderWidth", "internalBorderWidth",
+ RES_TYPE_NUMBER);
+
/* Same for child frames. */
if (NILP (Fassq (Qchild_frame_border_width, parms)))
{
Lisp_Object value;
value = gui_display_get_arg (dpyinfo, parms, Qchild_frame_border_width,
- "childFrameBorderWidth", "childFrameBorderWidth",
+ "childFrameBorder", "childFrameBorder",
RES_TYPE_NUMBER);
if (! EQ (value, Qunbound))
parms = Fcons (Fcons (Qchild_frame_border_width, value),
parms);
-
}
- gui_default_parameter (f, parms, Qchild_frame_border_width,
-#ifdef USE_GTK /* We used to impose 0 in xg_create_frame_widgets. */
- make_fixnum (0),
-#else
- make_fixnum (1),
-#endif
+ gui_default_parameter (f, parms, Qchild_frame_border_width, Qnil,
"childFrameBorderWidth", "childFrameBorderWidth",
RES_TYPE_NUMBER);
- gui_default_parameter (f, parms, Qinternal_border_width,
-#ifdef USE_GTK /* We used to impose 0 in xg_create_frame_widgets. */
- make_fixnum (0),
-#else
- make_fixnum (1),
-#endif
- "internalBorderWidth", "internalBorderWidth",
- RES_TYPE_NUMBER);
gui_default_parameter (f, parms, Qright_divider_width, make_fixnum (0),
NULL, NULL, RES_TYPE_NUMBER);
gui_default_parameter (f, parms, Qbottom_divider_width, make_fixnum (0),
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el
index 980b402ca2d..bc623d3efca 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -32,6 +32,15 @@
(require 'bytecomp)
;;; Code:
+(defvar bytecomp-test-var nil)
+
+(defun bytecomp-test-get-var ()
+ bytecomp-test-var)
+
+(defun bytecomp-test-identity (x)
+ "Identity, but hidden from some optimisations."
+ x)
+
(defconst byte-opt-testsuite-arith-data
'(
;; some functional tests
@@ -371,7 +380,57 @@
(assoc 'b '((a 1) (b 2) (c 3)))
(assoc "b" '(("a" 1) ("b" 2) ("c" 3)))
(let ((x '((a 1) (b 2) (c 3)))) (assoc 'c x))
- (assoc 'a '((a 1) (b 2) (c 3)) (lambda (u v) (not (equal u v)))))
+ (assoc 'a '((a 1) (b 2) (c 3)) (lambda (u v) (not (equal u v))))
+
+ ;; Constprop test cases
+ (let ((a 'alpha) (b (concat "be" "ta")) (c nil) (d t) (e :gamma)
+ (f '(delta epsilon)))
+ (list a b c d e f))
+
+ (let ((x 1) (y (+ 3 4)))
+ (list
+ (let (q (y x) (z y))
+ (if q x (list x y z)))))
+
+ (let* ((x 3) (y (* x 2)) (x (1+ y)))
+ x)
+
+ (let ((x 1) (bytecomp-test-var 2) (y 3))
+ (list x bytecomp-test-var (bytecomp-get-test-var) y))
+
+ (progn
+ (defvar d)
+ (let ((x 'a) (y 'b)) (list x y)))
+
+ (let ((x 2))
+ (list x (setq x 13) (setq x (* x 2)) x))
+
+ (let ((x 'a) (y 'b))
+ (setq y x
+ x (cons 'c y)
+ y x)
+ (list x y))
+
+ (let ((x 3))
+ (let ((y x) z)
+ (setq x 5)
+ (setq y (+ y 8))
+ (setq z (if (bytecomp-test-identity t)
+ (progn
+ (setq x (+ x 1))
+ (list x y))
+ (setq x (+ x 2))
+ (list x y)))
+ (list x y z)))
+
+ (let ((i 1) (s 0) (x 13))
+ (while (< i 5)
+ (setq s (+ s i))
+ (setq i (1+ i)))
+ (list s x i))
+
+ (let ((x 2))
+ (list (or (bytecomp-identity 'a) (setq x 3)) x)))
"List of expression for test.
Each element will be executed by interpreter and with
bytecompiled code, and their results compared.")
diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el
index 34a2af188f0..53c786ada48 100644
--- a/test/lisp/net/dbus-tests.el
+++ b/test/lisp/net/dbus-tests.el
@@ -465,6 +465,14 @@
(should (eq (dbus-unregister-service bus dbus--test-service) :non-existent))
(should-not (member dbus--test-service (dbus-list-known-names bus)))
+ ;; A service name is a string, constructed of at least two words
+ ;; separated by ".".
+ (should
+ (equal
+ (butlast
+ (should-error (dbus-register-service bus "s")))
+ `(dbus-error ,dbus-error-invalid-args)))
+
;; `dbus-service-dbus' is reserved for the BUS itself.
(should
(equal
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 19a40fdf06c..f4883923f6a 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -5739,6 +5739,11 @@ This does not support globbing characters in file names (yet)."
(string-match-p
"ftp$" (file-remote-p tramp-test-temporary-file-directory 'method)))
+(defun tramp--test-gdrive-p ()
+ "Check, whether the gdrive method is used."
+ (string-equal
+ "gdrive" (file-remote-p tramp-test-temporary-file-directory 'method)))
+
(defun tramp--test-gvfs-p (&optional method)
"Check, whether the remote host runs a GVFS based method.
This requires restrictions of file name syntax.
@@ -5769,11 +5774,6 @@ This does not support external Emacs calls."
(string-equal
"mock" (file-remote-p tramp-test-temporary-file-directory 'method)))
-(defun tramp--test-nextcloud-p ()
- "Check, whether the nextcloud method is used."
- (string-equal
- "nextcloud" (file-remote-p tramp-test-temporary-file-directory 'method)))
-
(defun tramp--test-rclone-p ()
"Check, whether the remote host is offered by rclone.
This requires restrictions of file name syntax."
@@ -6144,7 +6144,6 @@ Use the `ls' command."
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
(skip-unless (not (tramp--test-rsync-p)))
- (skip-unless (not (tramp--test-windows-nt-and-batch-p)))
(skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
(skip-unless (or (tramp--test-emacs26-p) (not (tramp--test-rclone-p))))
@@ -6214,6 +6213,7 @@ Use the `ls' command."
(skip-unless (not (tramp--test-windows-nt-and-batch-p)))
(skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
(skip-unless (not (tramp--test-ksh-p)))
+ (skip-unless (not (tramp--test-gdrive-p)))
(skip-unless (not (tramp--test-crypt-p)))
(skip-unless (or (tramp--test-emacs26-p) (not (tramp--test-rclone-p))))
@@ -6747,8 +6747,6 @@ If INTERACTIVE is non-nil, the tests are run interactively."
;; * Work on skipped tests. Make a comment, when it is impossible.
;; * Revisit expensive tests, once problems in `tramp-error' are solved.
;; * Fix `tramp-test06-directory-file-name' for `ftp'.
-;; * Investigate, why `tramp-test11-copy-file' and `tramp-test12-rename-file'
-;; do not work properly for `nextcloud'.
;; * Implement `tramp-test31-interrupt-process' for `adb' and for
;; direct async processes.
;; * Fix `tramp-test44-threads'.
diff --git a/test/lisp/progmodes/ruby-mode-resources/ruby.rb b/test/lisp/progmodes/ruby-mode-resources/ruby.rb
index 434237cf638..8c698e4fac8 100644
--- a/test/lisp/progmodes/ruby-mode-resources/ruby.rb
+++ b/test/lisp/progmodes/ruby-mode-resources/ruby.rb
@@ -108,7 +108,7 @@ foo( # ruby-deep-indent-disabled
# Multiline regexp.
/bars
tees # toots
- nfoos/
+ nfoos::/
def test1(arg)
puts "hello"
diff --git a/test/lisp/progmodes/tcl-tests.el b/test/lisp/progmodes/tcl-tests.el
index cf1ed2896e4..e55eb6d901b 100644
--- a/test/lisp/progmodes/tcl-tests.el
+++ b/test/lisp/progmodes/tcl-tests.el
@@ -74,7 +74,6 @@
;; From bug#44834
(ert-deftest tcl-mode-namespace-indent-2 ()
- :expected-result :failed
(with-temp-buffer
(tcl-mode)
(let ((text "namespace eval Foo {\n proc foo {} {}\n\n proc bar {}{}}\n"))
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el
index 7b022811a5c..b4007a6c3f3 100644
--- a/test/lisp/simple-tests.el
+++ b/test/lisp/simple-tests.el
@@ -48,6 +48,26 @@
(should (= (count-words (point-min) (point-max)) 10))))
+;;; `count-lines'
+
+(ert-deftest simple-test-count-lines ()
+ (with-temp-buffer
+ (should (= (count-lines (point-min) (point-max)) 0))
+ (insert "foo")
+ (should (= (count-lines (point-min) (point-max)) 1))
+ (insert "\nbar\nbaz\n")
+ (should (= (count-lines (point-min) (point-max)) 3))
+ (insert "r\n")
+ (should (= (count-lines (point-min) (point-max)) 4))))
+
+(ert-deftest simple-test-count-lines/ignore-invisible-lines ()
+ (with-temp-buffer
+ (insert "foo\nbar")
+ (should (= (count-lines (point-min) (point-max) t) 2))
+ (insert (propertize "\nbar\nbaz\nzut" 'invisible t))
+ (should (= (count-lines (point-min) (point-max) t) 2))))
+
+
;;; `transpose-sexps'
(defmacro simple-test--transpositions (&rest body)
(declare (indent 0)
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el
index 64f9137865b..dcec971c12e 100644
--- a/test/src/editfns-tests.el
+++ b/test/src/editfns-tests.el
@@ -106,7 +106,27 @@
#("foobar" 3 6 (face error))))
(should (ert-equal-including-properties
(format (concat "%s " (propertize "%s" 'face 'error)) "foo" "bar")
- #("foo bar" 4 7 (face error)))))
+ #("foo bar" 4 7 (face error))))
+ ;; Bug #46317
+ (let ((s (propertize "X" 'prop "val")))
+ (should (ert-equal-including-properties
+ (format (concat "%3s/" s) 12)
+ #(" 12/X" 4 5 (prop "val"))))
+ (should (ert-equal-including-properties
+ (format (concat "%3S/" s) 12)
+ #(" 12/X" 4 5 (prop "val"))))
+ (should (ert-equal-including-properties
+ (format (concat "%3d/" s) 12)
+ #(" 12/X" 4 5 (prop "val"))))
+ (should (ert-equal-including-properties
+ (format (concat "%-3s/" s) 12)
+ #("12 /X" 4 5 (prop "val"))))
+ (should (ert-equal-including-properties
+ (format (concat "%-3S/" s) 12)
+ #("12 /X" 4 5 (prop "val"))))
+ (should (ert-equal-including-properties
+ (format (concat "%-3d/" s) 12)
+ #("12 /X" 4 5 (prop "val"))))))
;; Tests for bug#5131.
(defun transpose-test-reverse-word (start end)
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index e0aed2a71b6..928fb15f109 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -1098,3 +1098,11 @@
(goto-char (point-max))
(insert "fóo")
(should (approx-equal (buffer-line-statistics) '(1002 50 49.9)))))
+
+(ert-deftest test-line-number-at-position ()
+ (with-temp-buffer
+ (insert (make-string 10 ?\n))
+ (should (= (line-number-at-pos (point)) 11))
+ (should (= (line-number-at-pos nil) 11))
+ (should-error (line-number-at-pos -1))
+ (should-error (line-number-at-pos 100))))
diff --git a/test/src/minibuf-tests.el b/test/src/minibuf-tests.el
index 28119fc999e..c55611eb84b 100644
--- a/test/src/minibuf-tests.el
+++ b/test/src/minibuf-tests.el
@@ -412,11 +412,11 @@
(ert-deftest test-inhibit-interaction ()
(let ((inhibit-interaction t))
- (should-error (read-from-minibuffer "foo: "))
+ (should-error (read-from-minibuffer "foo: ") :type 'inhibited-interaction)
- (should-error (y-or-n-p "foo: "))
- (should-error (yes-or-no-p "foo: "))
- (should-error (read-blanks-no-input "foo: "))
+ (should-error (y-or-n-p "foo: ") :type 'inhibited-interaction)
+ (should-error (yes-or-no-p "foo: ") :type 'inhibited-interaction)
+ (should-error (read-no-blanks-input "foo: ") :type 'inhibited-interaction)
;; See that we get the expected error.
(should (eq (condition-case nil
diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index a3fba8d328b..e62bcb3f7c0 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -879,5 +879,33 @@ Return nil if FILENAME doesn't exist."
(file-regular-p filename)
filename)))
+;; Bug#46284
+(ert-deftest process-sentinel-interrupt-event ()
+ "Test that interrupting a process on Windows sends \"interrupt\" to sentinel."
+ (skip-unless (eq system-type 'windows-nt))
+ (with-temp-buffer
+ (let* ((proc-buf (current-buffer))
+ ;; Start a new emacs process to wait idly until interrupted.
+ (cmd "emacs -batch --eval=\"(sit-for 50000)\"")
+ (proc (start-file-process-shell-command
+ "test/process-sentinel-signal-event" proc-buf cmd))
+ (events '()))
+
+ ;; Capture any incoming events.
+ (set-process-sentinel proc
+ (lambda (_prc event)
+ (push event events)))
+ ;; Wait for the process to start.
+ (sleep-for 2)
+ (should (equal 'run (process-status proc)))
+ ;; Interrupt the sub-process and wait for it to die.
+ (interrupt-process proc)
+ (sleep-for 2)
+ ;; Should have received SIGINT...
+ (should (equal 'signal (process-status proc)))
+ (should (equal 2 (process-exit-status proc)))
+ ;; ...and the change description should be "interrupt".
+ (should (equal '("interrupt\n") events)))))
+
(provide 'process-tests)
;;; process-tests.el ends here