summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/notes/bugtracker2
-rw-r--r--admin/notes/multi-tty2
-rw-r--r--admin/release-branch.txt3
-rw-r--r--doc/emacs/mark.texi7
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi7
-rw-r--r--doc/lispref/files.texi21
-rw-r--r--doc/lispref/hooks.texi1
-rw-r--r--doc/lispref/symbols.texi18
-rw-r--r--doc/misc/efaq.texi3
-rw-r--r--doc/misc/gnus.texi4
-rw-r--r--doc/misc/reftex.texi26
-rw-r--r--doc/misc/speedbar.texi6
-rw-r--r--doc/misc/tramp.texi5
-rw-r--r--etc/NEWS.285
-rw-r--r--etc/TODO77
-rw-r--r--etc/org/csl/README10
-rw-r--r--etc/org/csl/chicago-author-date.csl658
-rw-r--r--etc/org/csl/locales-en-US.xml357
-rw-r--r--etc/themes/light-blue-theme.el1
-rw-r--r--lib-src/emacsclient.c13
-rw-r--r--lisp/Makefile.in15
-rw-r--r--lisp/emacs-lisp/cl-macs.el8
-rw-r--r--lisp/emacs-lisp/easy-mmode.el6
-rw-r--r--lisp/erc/erc.el6
-rw-r--r--lisp/files.el2
-rw-r--r--lisp/gnus/gnus-agent.el31
-rw-r--r--lisp/international/fontset.el4
-rw-r--r--lisp/international/mule.el55
-rw-r--r--lisp/loadup.el6
-rw-r--r--lisp/mouse.el13
-rw-r--r--lisp/net/dictionary.el8
-rw-r--r--lisp/net/tramp-cache.el28
-rw-r--r--lisp/net/tramp-fuse.el51
-rw-r--r--lisp/net/tramp-rclone.el1
-rw-r--r--lisp/net/tramp-sshfs.el14
-rw-r--r--lisp/net/tramp.el28
-rw-r--r--lisp/org/ob-gnuplot.el2
-rw-r--r--lisp/org/ob-julia.el50
-rw-r--r--lisp/org/oc-basic.el20
-rw-r--r--lisp/org/oc-biblatex.el10
-rw-r--r--lisp/org/oc-csl.el51
-rw-r--r--lisp/org/oc-natbib.el11
-rw-r--r--lisp/org/oc.el31
-rw-r--r--lisp/org/ol-doi.el10
-rw-r--r--lisp/org/ol.el18
-rw-r--r--lisp/org/org-keys.el5
-rw-r--r--lisp/org/org-macs.el9
-rw-r--r--lisp/org/org-num.el3
-rw-r--r--lisp/org/org-src.el19
-rw-r--r--lisp/org/org-version.el2
-rw-r--r--lisp/org/org.el3
-rw-r--r--lisp/org/ox-html.el4
-rw-r--r--lisp/org/ox-koma-letter.el8
-rw-r--r--lisp/org/ox-latex.el4
-rw-r--r--lisp/progmodes/elisp-mode.el12
-rw-r--r--lisp/progmodes/prog-mode.el22
-rw-r--r--lisp/progmodes/which-func.el3
-rw-r--r--lisp/shorthands.el80
-rw-r--r--lisp/subr.el4
-rw-r--r--lisp/tab-bar.el26
-rw-r--r--lisp/tab-line.el5
-rw-r--r--lisp/textmodes/etc-authors-mode.el8
-rw-r--r--lisp/textmodes/fill.el2
-rw-r--r--lisp/textmodes/reftex-cite.el4
-rw-r--r--lisp/textmodes/reftex-ref.el4
-rw-r--r--lisp/textmodes/text-mode.el25
-rw-r--r--lisp/textmodes/tildify.el4
-rw-r--r--lisp/time-stamp.el2
-rw-r--r--src/Makefile.in25
-rw-r--r--src/alloc.c5
-rw-r--r--src/conf_post.h1
-rw-r--r--src/gtkutil.c5
-rw-r--r--src/lread.c26
-rw-r--r--src/pdumper.c20
-rw-r--r--src/process.c2
-rw-r--r--src/systhread.h13
-rw-r--r--src/term.c7
-rw-r--r--src/unexcw.c6
-rw-r--r--src/xfns.c16
-rw-r--r--src/xmenu.c8
-rw-r--r--src/xterm.c5
-rw-r--r--test/lisp/net/tramp-tests.el6
-rw-r--r--test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el16
-rw-r--r--test/lisp/progmodes/elisp-mode-tests.el4
-rw-r--r--test/lisp/subr-tests.el15
85 files changed, 1670 insertions, 473 deletions
diff --git a/admin/notes/bugtracker b/admin/notes/bugtracker
index 9eb65e1f864..deb06f552cc 100644
--- a/admin/notes/bugtracker
+++ b/admin/notes/bugtracker
@@ -84,7 +84,7 @@ generate a new report. The only time to send mail to the bug list
address is to create a new report.
Gnus users can add the following to message-dont-reply-to-names;
-similarly with Rmail and rmail-dont-reply-to-names:
+similarly with Rmail and mail-dont-reply-to-names:
"\\(emacs-pretest-bug\\|bug-gnu-emacs\\|bug-\\(e\\|gnu\\)macs\\)@gnu\\.org\\|\
\\(submit\\|control\\|owner\\)@debbugs\\.gnu\\.org"
diff --git a/admin/notes/multi-tty b/admin/notes/multi-tty
index 1a337b9d799..fa4df820ae4 100644
--- a/admin/notes/multi-tty
+++ b/admin/notes/multi-tty
@@ -474,7 +474,7 @@ THINGS TO DO
definition.
Exceptions found so far: x-select-text and
- x-cut-buffer-or-selection-value.
+ x-selection-value (old name: x-cut-buffer-or-selection-value).
** Have a look at fatal_error_hook.
diff --git a/admin/release-branch.txt b/admin/release-branch.txt
index 3318d8de806..0c393a9eccb 100644
--- a/admin/release-branch.txt
+++ b/admin/release-branch.txt
@@ -3,7 +3,8 @@ Instructions for cutting the Emacs release branch
1. In the clone of the Emacs Git repository, switch to the 'master'
branch, "git pull", and build it (using 'make bootstrap') to make
sure it's not broken. Run 'make check-expensive' and ensure all
- tests pass.
+ tests pass. (Alternatively, verify that the automated build
+ servers are showing success for the latest revision.)
2. Create the release branch and switch to it. Assuming that it is
for releasing Emacs versions XY.1, XY.2, etc., the command is:
diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi
index 20cb8ee2c65..2461cb0f6af 100644
--- a/doc/emacs/mark.texi
+++ b/doc/emacs/mark.texi
@@ -409,9 +409,14 @@ region by dragging the mouse, you can continue to extend the region
using shifted cursor motion commands. In either case, any unshifted
cursor motion command deactivates the mark.
+@vindex shift-select-mode
To turn off shift-selection, set @code{shift-select-mode} to
@code{nil}. Doing so does not disable setting the mark via mouse
-commands.
+commands. If you set @code{shift-select-mode} to the value
+@code{permanent}, cursor motion keys that were not shift-translated
+will not deactivate the mark, so, for example, the region set by prior
+commands can be extended by shift-selection, and unshifted cursor
+motion keys will extend the region set by shift-selection.
@node Disabled Transient Mark
@section Disabling Transient Mark Mode
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index 7c7005b3483..9dbf854171c 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -4201,7 +4201,7 @@ times.
The part of the buffer between point and mark is called @dfn{the
region}. Numerous commands work on the region, including
-@code{center-region}, @code{count-lines-region}, @code{kill-region}, and
+@code{center-region}, @code{count-words-region}, @code{kill-region}, and
@code{print-region}.
The @code{save-excursion} special form saves the location of point and
@@ -4214,7 +4214,7 @@ evaluated.
In Emacs, a function frequently moves point as part of its internal
workings even though a user would not expect this. For example,
-@code{count-lines-region} moves point. To prevent the user from being
+@code{count-words-region} moves point. To prevent the user from being
bothered by jumps that are both unexpected and (from the user's point of
view) unnecessary, @code{save-excursion} is often used to keep point in
the location expected by the user. The use of
@@ -13473,8 +13473,7 @@ The template for an interactive function definition is, as always:
What we need to do is fill in the slots.
-The name of the function should be self-explanatory and similar to the
-existing @code{count-lines-region} name. This makes the name easier
+The name of the function should be self-explanatory and easy
to remember. @code{count-words-region} is the obvious choice. Since
that name is now used for the standard Emacs command to count words, we
will name our implementation @code{@value{COUNT-WORDS}}.
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 2dc808e6945..1e05153f3c0 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -563,7 +563,17 @@ In this case, @var{visit} must be @code{nil}. For example,
@end example
@noindent
-inserts the first 500 characters of a file.
+inserts the characters coded by the first 500 bytes of a file.
+
+If @var{beg} or @var{end} happens to be in the middle of a character's
+multibyte sequence, Emacs's character code conversion will insert one
+or more eight-bit characters (a.k.a.@: ``raw bytes'')
+(@pxref{Character Sets}) into the buffer. If you want to read part of
+a file this way, we recommend to bind @code{coding-system-for-read} to
+a suitable value around the call to this function (@pxref{Specifying
+Coding Systems}), and to write Lisp code which will check for raw
+bytes at the boundaries, read the entire sequence of these bytes, and
+convert them back to valid characters.
If the argument @var{replace} is non-@code{nil}, it means to replace the
contents of the buffer (actually, just the accessible portion) with the
@@ -577,10 +587,11 @@ with @code{insert-file-contents}, as long as @var{replace} and
@end defun
@defun insert-file-contents-literally filename &optional visit beg end replace
-This function works like @code{insert-file-contents} except that it
-does not run @code{after-insert-file-functions}, and does not do
-format decoding, character code conversion, automatic uncompression,
-and so on.
+This function works like @code{insert-file-contents} except that each
+byte in the file is handled separately, being converted into an
+eight-bit character if needed. It does not run
+@code{after-insert-file-functions}, and does not do format decoding,
+character code conversion, automatic uncompression, and so on.
@end defun
If you want to pass a file name to another process so that another
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index 394928454b0..feec8b24f46 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -262,7 +262,6 @@ after-set-visited-file-name-hook
auto-coding-functions
choose-completion-string-functions
completing-read-function
-completion-annotate-function
completion-at-point-functions
completion-list-insert-choice-function
deactivate-current-input-method-function
diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi
index 8ae2d1fc88b..9c33e2c8ec2 100644
--- a/doc/lispref/symbols.texi
+++ b/doc/lispref/symbols.texi
@@ -666,7 +666,7 @@ different things. However, this practice commonly originates very
long symbols names, which are inconvenient to type and read after a
while. Shorthands solve these issues in a clean way.
-@defvar elisp-shorthands
+@defvar read-symbol-shorthands
This variable's value is an alist whose elements have the form
@code{(@var{shorthand-prefix} . @var{longhand-prefix})}. Each element
instructs the Lisp reader to read every symbol form which starts with
@@ -704,7 +704,7 @@ alleviate that.
(snu-split "\\(\r\n\\|[\n\r]\\)" s))
;; Local Variables:
-;; elisp-shorthands: (("snu-" . "some-nice-string-utils-"))
+;; read-symbol-shorthands: (("snu-" . "some-nice-string-utils-"))
;; End:
@end lisp
@@ -719,19 +719,19 @@ waiting for ElDoc (@pxref{Lisp Doc, , Local Variables in Files, emacs,
The GNU Emacs Manual}) to hint at the true full name of the symbol
under point in the echo area.
-Since @code{elisp-shorthands} is a file-local variable, it is possible
-that multiple libraries depending on
+Since @code{read-symbol-shorthands} is a file-local variable, it is
+possible that multiple libraries depending on
@file{some-nice-string-utils-lines.el} refer to the same symbols under
@emph{different} shorthands, or not using shorthands at all. In the
-next example, the @file{my-tricks.el} library refers to the
-symbol @code{some-nice-string-utils-lines} using the
-@code{sns-} prefix instead of @code{snu-}.
+next example, the @file{my-tricks.el} library refers to the symbol
+@code{some-nice-string-utils-lines} using the @code{sns-} prefix
+instead of @code{snu-}.
@example
(defun t-reverse-lines (s) (string-join (reverse (sns-lines s)) "\n")
;; Local Variables:
-;; elisp-shorthands: (("t-" . "my-tricks-")
-;; ("sns-" . "some-nice-string-utils-"))
+;; read-symbol-shorthands: (("t-" . "my-tricks-")
+;; ("sns-" . "some-nice-string-utils-"))
;; End:
@end example
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index f80ccc080a0..18342e65b0a 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -4136,9 +4136,6 @@ You can get the old behavior by binding @kbd{SPC} to
@lisp
(define-key minibuffer-local-filename-completion-map (kbd "SPC")
'minibuffer-complete-word)
-
-(define-key minibuffer-local-filename-must-match-map (kbd "SPC")
- 'minibuffer-complete-word)
@end lisp
@c ------------------------------------------------------------
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 9e433e11c81..0c065584c45 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -13875,11 +13875,9 @@ present in this hook.
@item nntp-authinfo-function
@vindex nntp-authinfo-function
@findex nntp-send-authinfo
-@vindex nntp-authinfo-file
This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
server. The default function is @code{nntp-send-authinfo}, which looks
-through your @file{~/.authinfo} (or whatever you've set the
-@code{nntp-authinfo-file} variable to) for applicable entries. If none
+through your @file{~/.authinfo} for applicable entries. If none
are found, it will prompt you for a login name and a password. The
format of the @file{~/.authinfo} file is (almost) the same as the
@code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi
index 8ca5fcca5ba..8bde241e18f 100644
--- a/doc/misc/reftex.texi
+++ b/doc/misc/reftex.texi
@@ -658,9 +658,9 @@ variable @code{reftex-auto-recenter-toc}.
@end table
-@vindex reftex-toc-map
+@vindex reftex-toc-mode-map
In order to define additional commands for the @file{*toc*} buffer, the
-keymap @code{reftex-toc-map} may be used.
+keymap @code{reftex-toc-mode-map} may be used.
@findex reftex-toc-recenter
@vindex reftex-auto-recenter-toc
@@ -1021,9 +1021,9 @@ document and let you select a label from there (@pxref{LaTeX xr Package,,xr}).
@end table
-@vindex reftex-select-label-map
+@vindex reftex-select-label-mode-map
In order to define additional commands for the selection process, the
-keymap @code{reftex-select-label-map} may be used.
+keymap @code{reftex-select-label-mode-map} may be used.
@node Builtin Label Environments
@section Builtin Label Environments
@@ -1871,9 +1871,9 @@ entries.
@end table
-@vindex reftex-select-bib-map
+@vindex reftex-select-bib-mode-map
In order to define additional commands for this selection process, the
-keymap @code{reftex-select-bib-map} may be used.
+keymap @code{reftex-select-bib-mode-map} may be used.
Note that if you do not use Emacs to edit the @BibTeX{} database files,
@RefTeX{} will ask if the related buffers should be updated once it
@@ -3960,7 +3960,7 @@ Normal hook which is run when a @file{*toc*} buffer is
created.
@end deffn
-@deffn Keymap reftex-toc-map
+@deffn Keymap reftex-toc-mode-map
The keymap which is active in the @file{*toc*} buffer.
(@pxref{Table of Contents}).
@end deffn
@@ -4425,7 +4425,7 @@ Normal hook which is run when a selection buffer enters
@code{reftex-select-label-mode}.
@end deffn
-@deffn Keymap reftex-select-label-map
+@deffn Keymap reftex-select-label-mode-map
The keymap which is active in the labels selection process
(@pxref{Referencing Labels}).
@end deffn
@@ -4586,7 +4586,7 @@ Normal hook which is run when a selection buffer enters
@code{reftex-select-bib-mode}.
@end deffn
-@deffn Keymap reftex-select-bib-map
+@deffn Keymap reftex-select-bib-mode-map
The keymap which is active in the citation-key selection process
(@pxref{Creating Citations}).
@end deffn
@@ -4792,7 +4792,7 @@ into blocks. Sorting will then preserve blocks, so that lines are
re-arranged only within blocks.
@end defopt
-@defopt reftex-index-phrases-map
+@defopt reftex-index-phrases-mode-map
Keymap for the Index Phrases buffer.
@end defopt
@@ -4824,7 +4824,7 @@ the document. This flag can be toggled from within the @file{*Index*}
buffer with the @kbd{f} key.
@end defopt
-@deffn Keymap reftex-index-map
+@deffn Keymap reftex-index-mode-map
The keymap which is active in the @file{*Index*} buffer
(@pxref{Index Support}).
@end deffn
@@ -5813,8 +5813,8 @@ buffer).
@noindent @b{Version 3.12}
@itemize @bullet
@item
-There are 3 new keymaps for customization: @code{reftex-toc-map},
-@code{reftex-select-label-map}, @code{reftex-select-bib-map}.
+There are 3 new keymaps for customization: @code{reftex-toc-mode-map},
+@code{reftex-select-label-mode-map}, @code{reftex-select-bib-mode-map}.
@item
Refontification uses more standard font-lock stuff.
@item
diff --git a/doc/misc/speedbar.texi b/doc/misc/speedbar.texi
index 9991917b3fd..70d4b054166 100644
--- a/doc/misc/speedbar.texi
+++ b/doc/misc/speedbar.texi
@@ -896,7 +896,7 @@ augmented with speedbar.
@enumerate
@item
-Create the keymap variable @code{@var{name}-speedbar-key-map}.
+Create the keymap variable @code{@var{name}-speedbar-mode-map}.
@item
Create a function, named whatever you like, which assigns values into your
@@ -904,7 +904,7 @@ keymap. Use this command to create the keymap before assigning
bindings:
@smallexample
- (setq @var{name}-speedbar-key-map (speedbar-make-specialized-keymap))
+ (setq @var{name}-speedbar-mode-map (speedbar-make-specialized-keymap))
@end smallexample
This function creates a special keymap for use in speedbar.
@@ -977,7 +977,7 @@ Next, register your extension like this;
@example
(speedbar-add-expansion-list '("MyExtension"
MyExtension-speedbar-menu-items
- MyExtension-speedbar-key-map
+ MyExtension-speedbar-mode-map
MyExtension-speedbar-buttons))
@end example
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index e1bf2f2bae5..95c744eef6e 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -2629,6 +2629,11 @@ Example:
@end group
@end lisp
+@vindex tramp-fuse-unmount-on-cleanup
+The user option @code{tramp-fuse-unmount-on-cleanup}, when set to
+non-@code{nil}, controls, whether a mount point is unmounted on
+connection cleanup or on Emacs exiting.
+
@anchor{Setup of rclone method}
@subsection @option{rclone} setup
diff --git a/etc/NEWS.28 b/etc/NEWS.28
index f8c045f014f..cff306e2440 100644
--- a/etc/NEWS.28
+++ b/etc/NEWS.28
@@ -989,11 +989,12 @@ further tweak whether to complete or indent.
---
** 'indent-tabs-mode' is now a global minor mode instead of just a variable.
----
++++
** New choice 'permanent' for 'shift-select-mode'.
When the mark was activated by shifted motion keys, non-shifted motion
keys don't deactivate the mark after customizing 'shift-select-mode'
-to 'permanent'.
+to 'permanent'. Similarly, the active mark will not be deactivated by
+typing shifted motion keys.
+++
** The "Edit => Clear" menu item now obeys a rectangular region.
diff --git a/etc/TODO b/etc/TODO
index d9149a521fb..540d8a7ff54 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -29,6 +29,27 @@ are the ones we consider more important, but these also may be
difficult to fix. Bugs with severity "minor" may be simpler, but this
is not always true.
+* High Priority Items
+
+** Things related to elpa.gnu.org.
+We need to figure out how to best include GNU ELPA packages in the
+Emacs tarball before doing any of the items below.
+
+*** Move idlwave to elpa.gnu.org
+Need to sync up the Emacs and external versions.
+See <https://lists.gnu.org/r/emacs-devel/2014-07/msg00008.html>
+<https://debbugs.gnu.org/39992>
+
+*** Move Org mode to elpa.gnu.org
+See <https://lists.gnu.org/r/emacs-devel/2014-08/msg00300.html>
+<https://lists.gnu.org/r/emacs-devel/2014-11/msg00257.html>
+
+*** Move verilog-mode to elpa.gnu.org
+See <https://lists.gnu.org/r/emacs-devel/2015-02/msg01180.html>
+
+*** Move vhdl-mode to elpa.gnu.org
+See <https://lists.gnu.org/r/emacs-devel/2015-02/msg01180.html>
+
* Simple tasks
These don't require much Emacs knowledge and are suitable for anyone
from beginners to experts.
@@ -168,7 +189,7 @@ defsubst can often end up generating things like
(let ((arg actual)) (body)) but should additionally get optimized further
when 'actual' is a constant/copyable expression.
-*** Add an "indirect goto" byte-code
+** Add an "indirect goto" byte-code
Such a byte-code can be used for local lambda expressions.
E.g. when you have code like
@@ -339,6 +360,11 @@ should invoke the 'shape' method. 'hbfont_shape' should be extended
to pass to 'hb_shape_full' the required array of features, as
mentioned in the above HarfBuzz discussion.
+** Concurrency
+Stefan Monnier writes: "Including it as an 'experimental' compile-time
+option sounds good. Of course there might still be big questions
+around 'which form of concurrency' we'll want."
+
** Better support for displaying Emoji
Emacs is capable of displaying Emoji and some of the Emoji sequences,
provided that its fontsets are configured with a suitable font. To
@@ -446,15 +472,6 @@ consistency checks that make sure the new code computes the same results
as the old code. And once that works well, we can remove the old code
and old fields.
-** Better support for dynamic embedded graphics
-I like this idea (my mpc.el code could use it for the volume widget),
-though I wonder if the resulting efficiency will be sufficient.
-
-** Concurrency
-Including it as an "experimental" compile-time option sounds good. Of
-course there might still be big questions around "which form of
-concurrency" we'll want.
-
** FFI (foreign function interface)
See eg https://lists.gnu.org/r/emacs-devel/2013-10/msg00246.html
@@ -625,6 +642,13 @@ could also be a button that you could use to view the advice.
** Add a function to get the insertion-type of the markers in an overlay
+** Improve VC
+Yes, there's a lot of work to be done there :-(
+
+** Improve the "code snippets" support
+Consolidate skeleton.el, tempo.el, and expand.el (any other?) and then
+advertise/use/improve it.
+
** ange-ftp
*** Make ange-ftp understand sftp
@@ -862,17 +886,10 @@ The idea is to add an "X" of some kind, that when clicked deletes the
window associated with that modeline.
https://lists.gnu.org/r/emacs-devel/2007-09/msg02416.html
-** Improve the "code snippets" support
-Consolidate skeleton.el, tempo.el, and expand.el (any other?) and then
-advertise/use/improve it.
-
-** Improve VC
-Yes, there's a lot of work to be done there :-(
-
-** Spread Semantic
+** Random things that were planned for Emacs-24
-** Random things that crossed Stefan Monnier's mind for Emacs 24
-Stefan Monnier writes: "Some of them from my local hacks, but it's not
+Stefan Monnier writes: "Random things that cross my mind right now
+that I'd like to see. Some of them from my local hacks, but it's not
obvious at all whether they'll make it."
*** Prog-mode could/should provide a better fill-paragraph default
@@ -1741,26 +1758,6 @@ Add a standard button-class named "link", and make all other link-like
button classes inherit from it. Set the default face of the "link"
button class to the standard "link" face.
-* Things related to elpa.gnu.org.
-
-We need to figure out how to best include GNU ELPA packages in the
-Emacs tarball before doing any of the items below.
-
-** Move idlwave to elpa.gnu.org
-Need to sync up the Emacs and external versions.
-See <https://lists.gnu.org/r/emacs-devel/2014-07/msg00008.html>
-<https://debbugs.gnu.org/39992>
-
-** Move Org mode to elpa.gnu.org
-See <https://lists.gnu.org/r/emacs-devel/2014-08/msg00300.html>
-<https://lists.gnu.org/r/emacs-devel/2014-11/msg00257.html>
-
-** Move verilog-mode to elpa.gnu.org
-See <https://lists.gnu.org/r/emacs-devel/2015-02/msg01180.html>
-
-** Move vhdl-mode to elpa.gnu.org
-See <https://lists.gnu.org/r/emacs-devel/2015-02/msg01180.html>
-
* Wishlist items
** Maybe replace etags.c with a Lisp implementation.
diff --git a/etc/org/csl/README b/etc/org/csl/README
new file mode 100644
index 00000000000..a9212207ccf
--- /dev/null
+++ b/etc/org/csl/README
@@ -0,0 +1,10 @@
+These data files are used by Org's oc-csl.el library.
+
+LICENSE INFORMATION
+
+chicago-author-date.csl
+locales-en-US.xml
+
+ Both of these files are part of the Citation Style Language (CSL)
+ project (<https://citationstyles.org/>) and are released under the
+ Creative Commons Attribution-ShareAlike 3.0 Unported license.
diff --git a/etc/org/csl/chicago-author-date.csl b/etc/org/csl/chicago-author-date.csl
new file mode 100644
index 00000000000..8c133354b38
--- /dev/null
+++ b/etc/org/csl/chicago-author-date.csl
@@ -0,0 +1,658 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="display-and-sort" page-range-format="chicago">
+ <info>
+ <title>Chicago Manual of Style 17th edition (author-date)</title>
+ <id>http://www.zotero.org/styles/chicago-author-date</id>
+ <link href="http://www.zotero.org/styles/chicago-author-date" rel="self"/>
+ <link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
+ <author>
+ <name>Julian Onions</name>
+ <email>julian.onions@gmail.com</email>
+ </author>
+ <contributor>
+ <name>Sebastian Karcher</name>
+ </contributor>
+ <contributor>
+ <name>Richard Karnesky</name>
+ <email>karnesky+zotero@gmail.com</email>
+ <uri>http://arc.nucapt.northwestern.edu/Richard_Karnesky</uri>
+ </contributor>
+ <contributor>
+ <name>Andrew Dunning</name>
+ <email>andrew.dunning@utoronto.ca</email>
+ <uri>https://orcid.org/0000-0003-0464-5036</uri>
+ </contributor>
+ <contributor>
+ <name>Matthew Roth</name>
+ <email>matthew.g.roth@yale.edu</email>
+ <uri> https://orcid.org/0000-0001-7902-6331</uri>
+ </contributor>
+ <contributor>
+ <name>Brenton M. Wiernik</name>
+ </contributor>
+ <category citation-format="author-date"/>
+ <category field="generic-base"/>
+ <summary>The author-date variant of the Chicago style</summary>
+ <updated>2018-01-24T12:00:00+00:00</updated>
+ <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
+ </info>
+ <locale xml:lang="en">
+ <terms>
+ <term name="editor" form="verb-short">ed.</term>
+ <term name="container-author" form="verb">by</term>
+ <term name="translator" form="verb-short">trans.</term>
+ <term name="editortranslator" form="verb">edited and translated by</term>
+ <term name="translator" form="short">trans.</term>
+ </terms>
+ </locale>
+ <macro name="secondary-contributors">
+ <choose>
+ <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="none">
+ <group delimiter=". ">
+ <names variable="editor translator" delimiter=". ">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ <names variable="director" delimiter=". ">
+ <label form="verb" text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-contributors">
+ <choose>
+ <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <group prefix=", " delimiter=", ">
+ <names variable="container-author" delimiter=", ">
+ <label form="verb" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ <names variable="editor translator" delimiter=", ">
+ <label form="verb" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="editor">
+ <names variable="editor">
+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", "/>
+ </names>
+ </macro>
+ <macro name="translator">
+ <names variable="translator">
+ <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", "/>
+ </names>
+ </macro>
+ <macro name="recipient">
+ <choose>
+ <if type="personal_communication">
+ <choose>
+ <if variable="genre">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ <else>
+ <text term="letter" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ <names variable="recipient" delimiter=", ">
+ <label form="verb" prefix=" " text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="substitute-title">
+ <choose>
+ <if type="article-magazine article-newspaper review review-book" match="any">
+ <text macro="container-title"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="contributors">
+ <group delimiter=". ">
+ <names variable="author">
+ <name and="text" name-as-sort-order="first" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
+ <label form="short" prefix=", "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <names variable="director"/>
+ <text macro="substitute-title"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ <text macro="recipient"/>
+ </group>
+ </macro>
+ <macro name="contributors-short">
+ <names variable="author">
+ <name form="short" and="text" delimiter=", " initialize-with=". "/>
+ <substitute>
+ <names variable="editor"/>
+ <names variable="translator"/>
+ <names variable="director"/>
+ <text macro="substitute-title"/>
+ <text macro="title"/>
+ </substitute>
+ </names>
+ </macro>
+ <macro name="interviewer">
+ <names variable="interviewer" delimiter=", ">
+ <label form="verb" prefix=" " text-case="capitalize-first" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </macro>
+ <macro name="archive">
+ <group delimiter=". ">
+ <text variable="archive_location" text-case="capitalize-first"/>
+ <text variable="archive"/>
+ <text variable="archive-place"/>
+ </group>
+ </macro>
+ <macro name="access">
+ <group delimiter=". ">
+ <choose>
+ <if type="graphic report" match="any">
+ <text macro="archive"/>
+ </if>
+ <else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
+ <text macro="archive"/>
+ </else-if>
+ </choose>
+ <choose>
+ <if type="webpage post-weblog" match="any">
+ <date variable="issued" form="text"/>
+ </if>
+ </choose>
+ <choose>
+ <if variable="issued" match="none">
+ <group delimiter=" ">
+ <text term="accessed" text-case="capitalize-first"/>
+ <date variable="accessed" form="text"/>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if type="legal_case" match="none">
+ <choose>
+ <if variable="DOI">
+ <text variable="DOI" prefix="https://doi.org/"/>
+ </if>
+ <else>
+ <text variable="URL"/>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </group>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if variable="title" match="none">
+ <choose>
+ <if type="personal_communication" match="none">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ </if>
+ <else-if type="bill book graphic legislation motion_picture song" match="any">
+ <text variable="title" text-case="title" font-style="italic"/>
+ <group prefix=" (" suffix=")" delimiter=" ">
+ <text term="version"/>
+ <text variable="version"/>
+ </group>
+ </else-if>
+ <else-if variable="reviewed-author">
+ <choose>
+ <if variable="reviewed-title">
+ <group delimiter=". ">
+ <text variable="title" text-case="title" quotes="true"/>
+ <group delimiter=", ">
+ <text variable="reviewed-title" text-case="title" font-style="italic" prefix="Review of "/>
+ <names variable="reviewed-author">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </group>
+ </if>
+ <else>
+ <group delimiter=", ">
+ <text variable="title" text-case="title" font-style="italic" prefix="Review of "/>
+ <names variable="reviewed-author">
+ <label form="verb-short" text-case="lowercase" suffix=" "/>
+ <name and="text" delimiter=", "/>
+ </names>
+ </group>
+ </else>
+ </choose>
+ </else-if>
+ <else-if type="legal_case interview patent" match="any">
+ <text variable="title"/>
+ </else-if>
+ <else>
+ <text variable="title" text-case="title" quotes="true"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="edition">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" " prefix=". ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short" strip-periods="true"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" text-case="capitalize-first" prefix=". "/>
+ </else>
+ </choose>
+ </if>
+ <else-if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <choose>
+ <if is-numeric="edition">
+ <group delimiter=" " prefix=", ">
+ <number variable="edition" form="ordinal"/>
+ <text term="edition" form="short"/>
+ </group>
+ </if>
+ <else>
+ <text variable="edition" prefix=", "/>
+ </else>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators">
+ <choose>
+ <if type="article-journal">
+ <choose>
+ <if variable="volume">
+ <text variable="volume" prefix=" "/>
+ <group prefix=" (" suffix=")">
+ <choose>
+ <if variable="issue">
+ <text variable="issue"/>
+ </if>
+ <else>
+ <date variable="issued">
+ <date-part name="month"/>
+ </date>
+ </else>
+ </choose>
+ </group>
+ </if>
+ <else-if variable="issue">
+ <group delimiter=" " prefix=", ">
+ <text term="issue" form="short"/>
+ <text variable="issue"/>
+ <date variable="issued" prefix="(" suffix=")">
+ <date-part name="month"/>
+ </date>
+ </group>
+ </else-if>
+ <else>
+ <date variable="issued" prefix=", ">
+ <date-part name="month"/>
+ </date>
+ </else>
+ </choose>
+ </if>
+ <else-if type="legal_case">
+ <text variable="volume" prefix=", "/>
+ <text variable="container-title" prefix=" "/>
+ <text variable="page" prefix=" "/>
+ </else-if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <group prefix=". " delimiter=". ">
+ <group>
+ <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ <group>
+ <number variable="number-of-volumes" form="numeric"/>
+ <text term="volume" form="short" prefix=" " plural="true"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <choose>
+ <if variable="page" match="none">
+ <group prefix=". ">
+ <text term="volume" form="short" text-case="capitalize-first" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ </group>
+ </if>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="locators-chapter">
+ <choose>
+ <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <choose>
+ <if variable="page">
+ <group prefix=", ">
+ <text variable="volume" suffix=":"/>
+ <text variable="page"/>
+ </group>
+ </if>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="locators-article">
+ <choose>
+ <if type="article-newspaper">
+ <group prefix=", " delimiter=", ">
+ <group delimiter=" ">
+ <text variable="edition"/>
+ <text term="edition"/>
+ </group>
+ <group>
+ <text term="section" form="short" suffix=" "/>
+ <text variable="section"/>
+ </group>
+ </group>
+ </if>
+ <else-if type="article-journal">
+ <choose>
+ <if variable="volume issue" match="any">
+ <text variable="page" prefix=": "/>
+ </if>
+ <else>
+ <text variable="page" prefix=", "/>
+ </else>
+ </choose>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="point-locators">
+ <choose>
+ <if variable="locator">
+ <choose>
+ <if locator="page" match="none">
+ <choose>
+ <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <choose>
+ <if variable="volume">
+ <group>
+ <text term="volume" form="short" suffix=" "/>
+ <number variable="volume" form="numeric"/>
+ <label variable="locator" form="short" prefix=", " suffix=" "/>
+ </group>
+ </if>
+ <else>
+ <label variable="locator" form="short" suffix=" "/>
+ </else>
+ </choose>
+ </if>
+ <else>
+ <label variable="locator" form="short" suffix=" "/>
+ </else>
+ </choose>
+ </if>
+ <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+ <number variable="volume" form="numeric" suffix=":"/>
+ </else-if>
+ </choose>
+ <text variable="locator"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="container-prefix">
+ <text term="in" text-case="capitalize-first"/>
+ </macro>
+ <macro name="container-title">
+ <choose>
+ <if type="chapter entry-dictionary entry-encyclopedia paper-conference" match="any">
+ <text macro="container-prefix" suffix=" "/>
+ </if>
+ </choose>
+ <choose>
+ <if type="webpage">
+ <text variable="container-title" text-case="title"/>
+ </if>
+ <else-if type="legal_case" match="none">
+ <group delimiter=" ">
+ <text variable="container-title" text-case="title" font-style="italic"/>
+ <choose>
+ <if type="post-weblog">
+ <text value="(blog)"/>
+ </if>
+ </choose>
+ </group>
+ </else-if>
+ </choose>
+ </macro>
+ <macro name="publisher">
+ <group delimiter=": ">
+ <text variable="publisher-place"/>
+ <text variable="publisher"/>
+ </group>
+ </macro>
+ <macro name="date">
+ <choose>
+ <if variable="issued">
+ <group delimiter=" ">
+ <date variable="original-date" form="text" date-parts="year" prefix="(" suffix=")"/>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </group>
+ </if>
+ <else-if variable="status">
+ <text variable="status" text-case="capitalize-first"/>
+ </else-if>
+ <else>
+ <text term="no date" form="short"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="date-in-text">
+ <choose>
+ <if variable="issued">
+ <group delimiter=" ">
+ <date variable="original-date" form="text" date-parts="year" prefix="[" suffix="]"/>
+ <date variable="issued">
+ <date-part name="year"/>
+ </date>
+ </group>
+ </if>
+ <else-if variable="status">
+ <text variable="status"/>
+ </else-if>
+ <else>
+ <text term="no date" form="short"/>
+ </else>
+ </choose>
+ </macro>
+ <macro name="day-month">
+ <date variable="issued">
+ <date-part name="month"/>
+ <date-part name="day" prefix=" "/>
+ </date>
+ </macro>
+ <macro name="collection-title">
+ <choose>
+ <if match="none" type="article-journal">
+ <choose>
+ <if match="none" is-numeric="collection-number">
+ <group delimiter=", ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ <else>
+ <group delimiter=" ">
+ <text variable="collection-title" text-case="title"/>
+ <text variable="collection-number"/>
+ </group>
+ </else>
+ </choose>
+ </if>
+ </choose>
+ </macro>
+ <macro name="collection-title-journal">
+ <choose>
+ <if type="article-journal">
+ <group delimiter=" ">
+ <text variable="collection-title"/>
+ <text variable="collection-number"/>
+ </group>
+ </if>
+ </choose>
+ </macro>
+ <macro name="event">
+ <group delimiter=" ">
+ <choose>
+ <if variable="genre">
+ <text term="presented at"/>
+ </if>
+ <else>
+ <text term="presented at" text-case="capitalize-first"/>
+ </else>
+ </choose>
+ <text variable="event"/>
+ </group>
+ </macro>
+ <macro name="description">
+ <choose>
+ <if variable="interviewer" type="interview" match="any">
+ <group delimiter=". ">
+ <text macro="interviewer"/>
+ <text variable="medium" text-case="capitalize-first"/>
+ </group>
+ </if>
+ <else-if type="patent">
+ <group delimiter=" " prefix=". ">
+ <text variable="authority"/>
+ <text variable="number"/>
+ </group>
+ </else-if>
+ <else>
+ <text variable="medium" text-case="capitalize-first" prefix=". "/>
+ </else>
+ </choose>
+ <choose>
+ <if variable="title" match="none"/>
+ <else-if type="thesis personal_communication speech" match="any"/>
+ <else>
+ <group delimiter=" " prefix=". ">
+ <text variable="genre" text-case="capitalize-first"/>
+ <choose>
+ <if type="report">
+ <text variable="number"/>
+ </if>
+ </choose>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="issue">
+ <choose>
+ <if type="legal_case">
+ <text variable="authority" prefix=". "/>
+ </if>
+ <else-if type="speech">
+ <group prefix=". " delimiter=", ">
+ <group delimiter=" ">
+ <text variable="genre" text-case="capitalize-first"/>
+ <text macro="event"/>
+ </group>
+ <text variable="event-place"/>
+ <text macro="day-month"/>
+ </group>
+ </else-if>
+ <else-if type="article-newspaper article-magazine personal_communication" match="any">
+ <date variable="issued" form="text" prefix=", "/>
+ </else-if>
+ <else-if type="patent">
+ <group delimiter=", " prefix=", ">
+ <group delimiter=" ">
+ <!--Needs Localization-->
+ <text value="filed"/>
+ <date variable="submitted" form="text"/>
+ </group>
+ <group delimiter=" ">
+ <choose>
+ <if variable="issued submitted" match="all">
+ <text term="and"/>
+ </if>
+ </choose>
+ <!--Needs Localization-->
+ <text value="issued"/>
+ <date variable="issued" form="text"/>
+ </group>
+ </group>
+ </else-if>
+ <else-if type="article-journal" match="any"/>
+ <else>
+ <group prefix=". " delimiter=", ">
+ <choose>
+ <if type="thesis">
+ <text variable="genre" text-case="capitalize-first"/>
+ </if>
+ </choose>
+ <text macro="publisher"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <citation et-al-min="4" et-al-use-first="1" disambiguate-add-year-suffix="true" disambiguate-add-names="true" disambiguate-add-givenname="true" givenname-disambiguation-rule="primary-name" collapse="year" after-collapse-delimiter="; ">
+ <layout prefix="(" suffix=")" delimiter="; ">
+ <group delimiter=", ">
+ <choose>
+ <if variable="issued accessed" match="any">
+ <group delimiter=" ">
+ <text macro="contributors-short"/>
+ <text macro="date-in-text"/>
+ </group>
+ </if>
+ <!---comma before forthcoming and n.d.-->
+ <else>
+ <group delimiter=", ">
+ <text macro="contributors-short"/>
+ <text macro="date-in-text"/>
+ </group>
+ </else>
+ </choose>
+ <text macro="point-locators"/>
+ </group>
+ </layout>
+ </citation>
+ <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">
+ <sort>
+ <key macro="contributors"/>
+ <key variable="issued"/>
+ <key variable="title"/>
+ </sort>
+ <layout suffix=".">
+ <group delimiter=". ">
+ <text macro="contributors"/>
+ <text macro="date"/>
+ <text macro="title"/>
+ </group>
+ <text macro="description"/>
+ <text macro="secondary-contributors" prefix=". "/>
+ <text macro="container-title" prefix=". "/>
+ <text macro="container-contributors"/>
+ <text macro="edition"/>
+ <text macro="locators-chapter"/>
+ <text macro="collection-title-journal" prefix=", " suffix=", "/>
+ <text macro="locators"/>
+ <text macro="collection-title" prefix=". "/>
+ <text macro="issue"/>
+ <text macro="locators-article"/>
+ <text macro="access" prefix=". "/>
+ </layout>
+ </bibliography>
+</style>
diff --git a/etc/org/csl/locales-en-US.xml b/etc/org/csl/locales-en-US.xml
new file mode 100644
index 00000000000..be78c5e81fd
--- /dev/null
+++ b/etc/org/csl/locales-en-US.xml
@@ -0,0 +1,357 @@
+<?xml version="1.0" encoding="utf-8"?>
+<locale xmlns="http://purl.org/net/xbiblio/csl" version="1.0" xml:lang="en-US">
+ <info>
+ <translator>
+ <name>Andrew Dunning</name>
+ </translator>
+ <translator>
+ <name>Sebastian Karcher</name>
+ </translator>
+ <translator>
+ <name>Rintze M. Zelle</name>
+ </translator>
+ <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
+ <updated>2015-10-10T23:31:02+00:00</updated>
+ </info>
+ <style-options punctuation-in-quote="true"/>
+ <date form="text">
+ <date-part name="month" suffix=" "/>
+ <date-part name="day" suffix=", "/>
+ <date-part name="year"/>
+ </date>
+ <date form="numeric">
+ <date-part name="month" form="numeric-leading-zeros" suffix="/"/>
+ <date-part name="day" form="numeric-leading-zeros" suffix="/"/>
+ <date-part name="year"/>
+ </date>
+ <terms>
+ <term name="accessed">accessed</term>
+ <term name="and">and</term>
+ <term name="and others">and others</term>
+ <term name="anonymous">anonymous</term>
+ <term name="anonymous" form="short">anon.</term>
+ <term name="at">at</term>
+ <term name="available at">available at</term>
+ <term name="by">by</term>
+ <term name="circa">circa</term>
+ <term name="circa" form="short">c.</term>
+ <term name="cited">cited</term>
+ <term name="edition">
+ <single>edition</single>
+ <multiple>editions</multiple>
+ </term>
+ <term name="edition" form="short">ed.</term>
+ <term name="et-al">et al.</term>
+ <term name="forthcoming">forthcoming</term>
+ <term name="from">from</term>
+ <term name="ibid">ibid.</term>
+ <term name="in">in</term>
+ <term name="in press">in press</term>
+ <term name="internet">internet</term>
+ <term name="interview">interview</term>
+ <term name="letter">letter</term>
+ <term name="no date">no date</term>
+ <term name="no date" form="short">n.d.</term>
+ <term name="online">online</term>
+ <term name="presented at">presented at the</term>
+ <term name="reference">
+ <single>reference</single>
+ <multiple>references</multiple>
+ </term>
+ <term name="reference" form="short">
+ <single>ref.</single>
+ <multiple>refs.</multiple>
+ </term>
+ <term name="retrieved">retrieved</term>
+ <term name="scale">scale</term>
+ <term name="version">version</term>
+
+ <!-- ANNO DOMINI; BEFORE CHRIST -->
+ <term name="ad">AD</term>
+ <term name="bc">BC</term>
+
+ <!-- PUNCTUATION -->
+ <term name="open-quote">“</term>
+ <term name="close-quote">”</term>
+ <term name="open-inner-quote">‘</term>
+ <term name="close-inner-quote">’</term>
+ <term name="page-range-delimiter">–</term>
+
+ <!-- ORDINALS -->
+ <term name="ordinal">th</term>
+ <term name="ordinal-01">st</term>
+ <term name="ordinal-02">nd</term>
+ <term name="ordinal-03">rd</term>
+ <term name="ordinal-11">th</term>
+ <term name="ordinal-12">th</term>
+ <term name="ordinal-13">th</term>
+
+ <!-- LONG ORDINALS -->
+ <term name="long-ordinal-01">first</term>
+ <term name="long-ordinal-02">second</term>
+ <term name="long-ordinal-03">third</term>
+ <term name="long-ordinal-04">fourth</term>
+ <term name="long-ordinal-05">fifth</term>
+ <term name="long-ordinal-06">sixth</term>
+ <term name="long-ordinal-07">seventh</term>
+ <term name="long-ordinal-08">eighth</term>
+ <term name="long-ordinal-09">ninth</term>
+ <term name="long-ordinal-10">tenth</term>
+
+ <!-- LONG LOCATOR FORMS -->
+ <term name="book">
+ <single>book</single>
+ <multiple>books</multiple>
+ </term>
+ <term name="chapter">
+ <single>chapter</single>
+ <multiple>chapters</multiple>
+ </term>
+ <term name="column">
+ <single>column</single>
+ <multiple>columns</multiple>
+ </term>
+ <term name="figure">
+ <single>figure</single>
+ <multiple>figures</multiple>
+ </term>
+ <term name="folio">
+ <single>folio</single>
+ <multiple>folios</multiple>
+ </term>
+ <term name="issue">
+ <single>number</single>
+ <multiple>numbers</multiple>
+ </term>
+ <term name="line">
+ <single>line</single>
+ <multiple>lines</multiple>
+ </term>
+ <term name="note">
+ <single>note</single>
+ <multiple>notes</multiple>
+ </term>
+ <term name="opus">
+ <single>opus</single>
+ <multiple>opera</multiple>
+ </term>
+ <term name="page">
+ <single>page</single>
+ <multiple>pages</multiple>
+ </term>
+ <term name="number-of-pages">
+ <single>page</single>
+ <multiple>pages</multiple>
+ </term>
+ <term name="paragraph">
+ <single>paragraph</single>
+ <multiple>paragraphs</multiple>
+ </term>
+ <term name="part">
+ <single>part</single>
+ <multiple>parts</multiple>
+ </term>
+ <term name="section">
+ <single>section</single>
+ <multiple>sections</multiple>
+ </term>
+ <term name="sub verbo">
+ <single>sub verbo</single>
+ <multiple>sub verbis</multiple>
+ </term>
+ <term name="verse">
+ <single>verse</single>
+ <multiple>verses</multiple>
+ </term>
+ <term name="volume">
+ <single>volume</single>
+ <multiple>volumes</multiple>
+ </term>
+
+ <!-- SHORT LOCATOR FORMS -->
+ <term name="book" form="short">
+ <single>bk.</single>
+ <multiple>bks.</multiple>
+ </term>
+ <term name="chapter" form="short">
+ <single>chap.</single>
+ <multiple>chaps.</multiple>
+ </term>
+ <term name="column" form="short">
+ <single>col.</single>
+ <multiple>cols.</multiple>
+ </term>
+ <term name="figure" form="short">
+ <single>fig.</single>
+ <multiple>figs.</multiple>
+ </term>
+ <term name="folio" form="short">
+ <single>fol.</single>
+ <multiple>fols.</multiple>
+ </term>
+ <term name="issue" form="short">
+ <single>no.</single>
+ <multiple>nos.</multiple>
+ </term>
+ <term name="line" form="short">
+ <single>l.</single>
+ <multiple>ll.</multiple>
+ </term>
+ <term name="note" form="short">
+ <single>n.</single>
+ <multiple>nn.</multiple>
+ </term>
+ <term name="opus" form="short">
+ <single>op.</single>
+ <multiple>opp.</multiple>
+ </term>
+ <term name="page" form="short">
+ <single>p.</single>
+ <multiple>pp.</multiple>
+ </term>
+ <term name="number-of-pages" form="short">
+ <single>p.</single>
+ <multiple>pp.</multiple>
+ </term>
+ <term name="paragraph" form="short">
+ <single>para.</single>
+ <multiple>paras.</multiple>
+ </term>
+ <term name="part" form="short">
+ <single>pt.</single>
+ <multiple>pts.</multiple>
+ </term>
+ <term name="section" form="short">
+ <single>sec.</single>
+ <multiple>secs.</multiple>
+ </term>
+ <term name="sub verbo" form="short">
+ <single>s.v.</single>
+ <multiple>s.vv.</multiple>
+ </term>
+ <term name="verse" form="short">
+ <single>v.</single>
+ <multiple>vv.</multiple>
+ </term>
+ <term name="volume" form="short">
+ <single>vol.</single>
+ <multiple>vols.</multiple>
+ </term>
+
+ <!-- SYMBOL LOCATOR FORMS -->
+ <term name="paragraph" form="symbol">
+ <single>¶</single>
+ <multiple>¶¶</multiple>
+ </term>
+ <term name="section" form="symbol">
+ <single>§</single>
+ <multiple>§§</multiple>
+ </term>
+
+ <!-- LONG ROLE FORMS -->
+ <term name="director">
+ <single>director</single>
+ <multiple>directors</multiple>
+ </term>
+ <term name="editor">
+ <single>editor</single>
+ <multiple>editors</multiple>
+ </term>
+ <term name="editorial-director">
+ <single>editor</single>
+ <multiple>editors</multiple>
+ </term>
+ <term name="illustrator">
+ <single>illustrator</single>
+ <multiple>illustrators</multiple>
+ </term>
+ <term name="translator">
+ <single>translator</single>
+ <multiple>translators</multiple>
+ </term>
+ <term name="editortranslator">
+ <single>editor &amp; translator</single>
+ <multiple>editors &amp; translators</multiple>
+ </term>
+
+ <!-- SHORT ROLE FORMS -->
+ <term name="director" form="short">
+ <single>dir.</single>
+ <multiple>dirs.</multiple>
+ </term>
+ <term name="editor" form="short">
+ <single>ed.</single>
+ <multiple>eds.</multiple>
+ </term>
+ <term name="editorial-director" form="short">
+ <single>ed.</single>
+ <multiple>eds.</multiple>
+ </term>
+ <term name="illustrator" form="short">
+ <single>ill.</single>
+ <multiple>ills.</multiple>
+ </term>
+ <term name="translator" form="short">
+ <single>tran.</single>
+ <multiple>trans.</multiple>
+ </term>
+ <term name="editortranslator" form="short">
+ <single>ed. &amp; tran.</single>
+ <multiple>eds. &amp; trans.</multiple>
+ </term>
+
+ <!-- VERB ROLE FORMS -->
+ <term name="container-author" form="verb">by</term>
+ <term name="director" form="verb">directed by</term>
+ <term name="editor" form="verb">edited by</term>
+ <term name="editorial-director" form="verb">edited by</term>
+ <term name="illustrator" form="verb">illustrated by</term>
+ <term name="interviewer" form="verb">interview by</term>
+ <term name="recipient" form="verb">to</term>
+ <term name="reviewed-author" form="verb">by</term>
+ <term name="translator" form="verb">translated by</term>
+ <term name="editortranslator" form="verb">edited &amp; translated by</term>
+
+ <!-- SHORT VERB ROLE FORMS -->
+ <term name="director" form="verb-short">dir. by</term>
+ <term name="editor" form="verb-short">ed. by</term>
+ <term name="editorial-director" form="verb-short">ed. by</term>
+ <term name="illustrator" form="verb-short">illus. by</term>
+ <term name="translator" form="verb-short">trans. by</term>
+ <term name="editortranslator" form="verb-short">ed. &amp; trans. by</term>
+
+ <!-- LONG MONTH FORMS -->
+ <term name="month-01">January</term>
+ <term name="month-02">February</term>
+ <term name="month-03">March</term>
+ <term name="month-04">April</term>
+ <term name="month-05">May</term>
+ <term name="month-06">June</term>
+ <term name="month-07">July</term>
+ <term name="month-08">August</term>
+ <term name="month-09">September</term>
+ <term name="month-10">October</term>
+ <term name="month-11">November</term>
+ <term name="month-12">December</term>
+
+ <!-- SHORT MONTH FORMS -->
+ <term name="month-01" form="short">Jan.</term>
+ <term name="month-02" form="short">Feb.</term>
+ <term name="month-03" form="short">Mar.</term>
+ <term name="month-04" form="short">Apr.</term>
+ <term name="month-05" form="short">May</term>
+ <term name="month-06" form="short">Jun.</term>
+ <term name="month-07" form="short">Jul.</term>
+ <term name="month-08" form="short">Aug.</term>
+ <term name="month-09" form="short">Sep.</term>
+ <term name="month-10" form="short">Oct.</term>
+ <term name="month-11" form="short">Nov.</term>
+ <term name="month-12" form="short">Dec.</term>
+
+ <!-- SEASONS -->
+ <term name="season-01">Spring</term>
+ <term name="season-02">Summer</term>
+ <term name="season-03">Autumn</term>
+ <term name="season-04">Winter</term>
+ </terms>
+</locale>
diff --git a/etc/themes/light-blue-theme.el b/etc/themes/light-blue-theme.el
index 8f4502a0cb3..547d2df04c0 100644
--- a/etc/themes/light-blue-theme.el
+++ b/etc/themes/light-blue-theme.el
@@ -3,6 +3,7 @@
;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
;; Author: Drew Adams <drew.adams@oracle.com>
+;; Maintainer: emacs-devel@gnu.org
;; This file is part of GNU Emacs.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 018e81e4222..cff3cec2a79 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -80,9 +80,6 @@ char *w32_getenv (const char *);
#include <sys/stat.h>
#include <unistd.h>
-#ifndef WINDOWSNT
-# include <acl.h>
-#endif
#include <filename.h>
#include <intprops.h>
#include <min-max.h>
@@ -94,10 +91,6 @@ char *w32_getenv (const char *);
# pragma GCC diagnostic ignored "-Wformat-truncation=2"
#endif
-#if !defined O_PATH && !defined WINDOWSNT
-# define O_PATH O_SEARCH
-#endif
-
/* Name used to invoke this program. */
static char const *progname;
@@ -1135,6 +1128,12 @@ process_grouping (void)
#ifdef SOCKETS_IN_FILE_SYSTEM
+# include <acl.h>
+
+# ifndef O_PATH
+# define O_PATH O_SEARCH
+# endif
+
/* A local socket address. The union avoids the need to cast. */
union local_sockaddr
{
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 60d1d10e5b2..3e764c5a787 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -91,8 +91,19 @@ COMPILE_FIRST = \
$(lisp)/emacs-lisp/byte-opt.elc \
$(lisp)/emacs-lisp/bytecomp.elc
ifeq ($(HAVE_NATIVE_COMP),yes)
-COMPILE_FIRST += $(lisp)/emacs-lisp/comp.elc
-COMPILE_FIRST += $(lisp)/emacs-lisp/comp-cstr.elc
+COMPILE_FIRST += \
+ $(lisp)/emacs-lisp/comp.elc \
+ $(lisp)/emacs-lisp/comp-cstr.elc \
+ $(lisp)/emacs-lisp/cl-macs.elc \
+ $(lisp)/emacs-lisp/rx.elc \
+ $(lisp)/emacs-lisp/cl-seq.elc \
+ $(lisp)/help-mode.elc \
+ $(lisp)/emacs-lisp/cl-extra.elc \
+ $(lisp)/emacs-lisp/gv.elc \
+ $(lisp)/emacs-lisp/seq.elc \
+ $(lisp)/emacs-lisp/cl-lib.elc \
+ $(lisp)/emacs-lisp/warnings.elc \
+ $(lisp)/emacs-lisp/subr-x.elc
endif
COMPILE_FIRST += $(lisp)/emacs-lisp/autoload.elc
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 527720c6e8d..1852471bcbb 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -3087,6 +3087,14 @@ To see the documentation for a defined struct type, use
;; and pred-check, so changing it is not straightforward.
(push `(,defsym ,accessor (cl-x)
,(concat
+ ;; NB. This will produce incorrect results
+ ;; in some cases, as our coding conventions
+ ;; says that the first line must be a full
+ ;; sentence. However, if we don't word wrap
+ ;; we will have byte-compiler warnings about
+ ;; overly long docstrings. So we can't have
+ ;; a perfect result here, and choose to avoid
+ ;; the byte-compiler warnings.
(internal--format-docstring-line
"Access slot \"%s\" of `%s' struct CL-X." slot name)
(if doc (concat "\n" doc) ""))
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index d37bca24a0f..f752861d80a 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -93,7 +93,7 @@ Enable the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `%S'.
+evaluate `%s'.
The mode's hook is called both when the mode is enabled and when
it is disabled.")
@@ -109,7 +109,9 @@ it is disabled.")
(docs-fc (bound-and-true-p emacs-lisp-docstring-fill-column))
(fill-column (if (integerp docs-fc) docs-fc 65))
(argdoc (format easy-mmode--arg-docstring mode-pretty-name
- getter))
+ ;; Avoid having quotes turn into pretty quotes.
+ (string-replace "'" "\\\\='"
+ (format "%S" getter))))
(filled (if (fboundp 'fill-region)
(with-temp-buffer
(insert argdoc)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index c4077d48ab0..308812f0eb2 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -188,10 +188,12 @@ parameters and authentication."
It is not strictly necessary to provide this, since ERC will
prompt you for it.")
-(defcustom erc-user-mode nil
+(defcustom erc-user-mode "+i"
+ ;; +i "Invisible". Hides user from global /who and /names.
"Initial user modes to be set after a connection is established."
:group 'erc
- :type '(choice (const nil) string function))
+ :type '(choice (const nil) string function)
+ :version "28.1")
(defcustom erc-prompt-for-password t
diff --git a/lisp/files.el b/lisp/files.el
index 50ca49409f1..7213a6eae5f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3897,7 +3897,7 @@ inhibited."
(hack-local-variables-apply))))))
(defun hack-local-variables--find-variables (&optional handle-mode)
- "Return all local variables in the ucrrent buffer.
+ "Return all local variables in the current buffer.
If HANDLE-MODE is nil, we gather all the specified local
variables. If HANDLE-MODE is neither nil nor t, we do the same,
except that any settings of `mode' are ignored.
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 19d05120045..6426d825465 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -3553,32 +3553,13 @@ articles in every agentized group? "))
(when (and to-remove
(or gnus-expert-user
(gnus-y-or-n-p
- "gnus-agent-expire has identified local directories that are\
- not currently required by any agentized group. Do you wish to consider\
- deleting them?")))
- (while to-remove
- (let ((dir (pop to-remove)))
- (if (or gnus-expert-user
+ "gnus-agent-expire has identified local directories that are
+not currently required by any agentized group. Do you wish to consider
+deleting them?")))
+ (dolist (dir to-remove)
+ (when (or gnus-expert-user
(gnus-y-or-n-p (format "Delete %s? " dir)))
- (let* (delete-recursive
- files f
- (delete-recursive
- (lambda (f-or-d)
- (ignore-errors
- (if (file-directory-p f-or-d)
- (condition-case nil
- (delete-directory f-or-d)
- (file-error
- (setq files (directory-files f-or-d))
- (while files
- (setq f (pop files))
- (or (member f '("." ".."))
- (funcall delete-recursive
- (nnheader-concat
- f-or-d f))))
- (delete-directory f-or-d)))
- (delete-file f-or-d))))))
- (funcall delete-recursive dir)))))))))
+ (delete-directory dir t)))))))
;;;###autoload
(defun gnus-agent-batch ()
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 4ec641dca8f..f0ead8a2744 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -157,7 +157,9 @@
(armenian #x531)
(hebrew #x5D0)
(vai #xA500)
- (arabic #x628)
+ ;; U+06C1 prevents us from using bad fonts, like DejaVu Sans,
+ ;; for Arabic text.
+ (arabic #x628 #x6C1)
(syriac #x710)
(thaana #x78C)
(devanagari #x915)
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 2298af42b28..5022a17db5a 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -294,30 +294,8 @@ attribute."
(apply 'define-charset-internal name (mapcar 'cdr attrs))))
-(defun hack-elisp-shorthands (fullname)
- "Return value of the `elisp-shorthands' file-local variable in FULLNAME.
-FULLNAME is the absolute file name of an Elisp .el file which
-potentially specifies a file-local value for `elisp-shorthands'.
-The Elisp code in FULLNAME isn't read or evaluated in any way, except
-for extraction of the buffer-local value of `elisp-shorthands'."
- (let ((size (nth 7 (file-attributes fullname))))
- (with-temp-buffer
- (insert-file-contents fullname nil (max 0 (- size 3000)) size)
- (goto-char (point-max))
- (let* ((found (search-backward-regexp "elisp-shorthands:[ \t]*" 0 t))
- (val (and found
- (goto-char (match-end 0))
- (ignore-errors (read (current-buffer)))))
- (probe val)
- aux)
- (catch 'done
- (when (consp probe)
- (while (setq aux (pop probe))
- (unless (and (consp aux)
- (stringp (car aux))
- (stringp (cdr aux)))
- (throw 'done nil)))
- val))))))
+(defvar hack-read-symbol-shorthands-function nil
+ "Holds function to compute `read-symbol-shorthands'.")
(defun load-with-code-conversion (fullname file &optional noerror nomessage)
"Execute a file of Lisp code named FILE whose absolute name is FULLNAME.
@@ -344,7 +322,8 @@ Return t if file exists."
(let ((load-true-file-name fullname)
(load-file-name fullname)
(set-auto-coding-for-load t)
- (inhibit-file-name-operation nil))
+ (inhibit-file-name-operation nil)
+ shorthands)
(with-current-buffer buffer
;; So that we don't get completely screwed if the
;; file is encoded in some complicated character set,
@@ -353,6 +332,13 @@ Return t if file exists."
;; Don't let deactivate-mark remain set.
(let (deactivate-mark)
(insert-file-contents fullname))
+ (setq shorthands
+ ;; We need this indirection because hacking local
+ ;; variables in too early seems to have cause
+ ;; recursive load loops (bug#50946). Thus it
+ ;; remains nil until it is save to do so.
+ (and hack-read-symbol-shorthands-function
+ (funcall hack-read-symbol-shorthands-function)))
;; If the loaded file was inserted with no-conversion or
;; raw-text coding system, make the buffer unibyte.
;; Otherwise, eval-buffer might try to interpret random
@@ -363,11 +349,13 @@ Return t if file exists."
(set-buffer-multibyte nil))
;; Make `kill-buffer' quiet.
(set-buffer-modified-p nil))
- ;; Have the original buffer current while we eval.
- (eval-buffer buffer nil
- ;; This is compatible with what `load' does.
- (if dump-mode file fullname)
- nil t))
+ ;; Have the original buffer current while we eval,
+ ;; but consider shorthands of the eval'ed one.
+ (let ((read-symbol-shorthands shorthands))
+ (eval-buffer buffer nil
+ ;; This is compatible with what `load' does.
+ (if dump-mode file fullname)
+ nil t)))
(let (kill-buffer-hook kill-buffer-query-functions)
(kill-buffer buffer)))
(do-after-load-evaluation fullname)
@@ -378,13 +366,6 @@ Return t if file exists."
(message "Loading %s...done" file)))
t)))
-(defun load-with-shorthands-and-code-conversion (fullname file noerror nomessage)
- "Like `load-with-code-conversion', but also consider Elisp shorthands.
-This function uses shorthands defined in the file FULLNAME's local
-value of `elisp-shorthands', when it processes that file's Elisp code."
- (let ((elisp-shorthands (hack-elisp-shorthands fullname)))
- (load-with-code-conversion fullname file noerror nomessage)))
-
(defun charset-info (charset)
"Return a vector of information of CHARSET.
This function is provided for backward compatibility.
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 942057c838f..3a55d2c8057 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -151,7 +151,7 @@
;; variable its advertised default value (it starts as nil, see
;; xdisp.c).
(setq resize-mini-windows 'grow-only)
-(setq load-source-file-function #'load-with-shorthands-and-code-conversion)
+(setq load-source-file-function #'load-with-code-conversion)
(load "files")
;; Load-time macro-expansion can only take effect after setting
@@ -352,6 +352,10 @@
(load "vc/ediff-hook")
(load "uniquify")
(load "electric")
+(load "paren")
+
+(load "shorthands")
+
(load "emacs-lisp/eldoc")
(load "cus-start") ;Late to reduce customize-rogue (needs loaddefs.el anyway)
(if (not (eq system-type 'ms-dos))
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5d4e05fa25e..bb47d04a3a8 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -290,6 +290,7 @@ and should return the same menu with changes such as added new menu items."
:type '(repeat
(choice (function-item context-menu-undo)
(function-item context-menu-region)
+ (function-item context-menu-middle-separator)
(function-item context-menu-toolbar)
(function-item context-menu-global)
(function-item context-menu-local)
@@ -478,14 +479,6 @@ Some context functions add menu items below the separator."
`(menu-item "All"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'buffer))
:help "Mark the whole buffer for a subsequent cut/copy"))
- (define-key-after submenu [mark-defun]
- `(menu-item "Defun"
- ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'defun))
- :help "Mark the defun at click for a subsequent cut/copy"))
- (define-key-after submenu [mark-list]
- `(menu-item "List"
- ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'list))
- :help "Mark the list at click for a subsequent cut/copy"))
(when (let* ((pos (posn-point (event-end click)))
(char (when pos (char-after pos))))
(or (and char (eq (char-syntax char) ?\"))
@@ -498,10 +491,6 @@ Some context functions add menu items below the separator."
`(menu-item "Line"
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'line))
:help "Mark the line at click for a subsequent cut/copy"))
- (define-key-after submenu [mark-symbol]
- `(menu-item "Symbol"
- ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'symbol))
- :help "Mark the symbol at click for a subsequent cut/copy"))
(when (region-active-p)
(define-key-after submenu [mark-none]
`(menu-item "None"
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index 86447c2c351..1d07989ef57 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -1382,10 +1382,12 @@ When you add this function to `context-menu-functions',
the context menu will contain an item that searches
the word at mouse click."
(when (thing-at-mouse click 'word)
- (define-key menu [dictionary-separator] menu-bar-separator)
- (define-key menu [dictionary-search-word-at-mouse]
+ (define-key-after menu [dictionary-separator] menu-bar-separator
+ 'middle-separator)
+ (define-key-after menu [dictionary-search-word-at-mouse]
'(menu-item "Dictionary Search" dictionary-search-word-at-mouse
- :help "Search the word at mouse click in dictionary")))
+ :help "Search the word at mouse click in dictionary")
+ 'dictionary-separator))
menu)
(provide 'dictionary)
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 5a00915f4f0..f1c656ec209 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -319,12 +319,7 @@ KEY identifies the connection, it is either a process or a
used to cache connection properties of the local machine.
If KEY is `tramp-cache-undefined', or if the value is not set for
the connection, return DEFAULT."
- ;; Unify key by removing localname and hop from `tramp-file-name'
- ;; structure. Work with a copy in order to avoid side effects.
- (when (tramp-file-name-p key)
- (setq key (copy-tramp-file-name key))
- (setf (tramp-file-name-localname key) nil
- (tramp-file-name-hop key) nil))
+ (setq key (tramp-file-name-unify key))
(let* ((hash (tramp-get-hash-table key))
(cached (if (hash-table-p hash)
(gethash property hash tramp-cache-undefined)
@@ -350,12 +345,7 @@ used to cache connection properties of the local machine. If KEY
is `tramp-cache-undefined', nothing is set.
PROPERTY is set persistent when KEY is a `tramp-file-name' structure.
Return VALUE."
- ;; Unify key by removing localname and hop from `tramp-file-name'
- ;; structure. Work with a copy in order to avoid side effects.
- (when (tramp-file-name-p key)
- (setq key (copy-tramp-file-name key))
- (setf (tramp-file-name-localname key) nil
- (tramp-file-name-hop key) nil))
+ (setq key (tramp-file-name-unify key))
(when-let ((hash (tramp-get-hash-table key)))
(puthash property value hash))
(setq tramp-cache-data-changed
@@ -379,12 +369,7 @@ KEY identifies the connection, it is either a process or a
`tramp-file-name' structure. A special case is nil, which is
used to cache connection properties of the local machine.
PROPERTY is set persistent when KEY is a `tramp-file-name' structure."
- ;; Unify key by removing localname and hop from `tramp-file-name'
- ;; structure. Work with a copy in order to avoid side effects.
- (when (tramp-file-name-p key)
- (setq key (copy-tramp-file-name key))
- (setf (tramp-file-name-localname key) nil
- (tramp-file-name-hop key) nil))
+ (setq key (tramp-file-name-unify key))
(when-let ((hash (tramp-get-hash-table key)))
(remhash property hash))
(setq tramp-cache-data-changed
@@ -397,12 +382,7 @@ PROPERTY is set persistent when KEY is a `tramp-file-name' structure."
KEY identifies the connection, it is either a process or a
`tramp-file-name' structure. A special case is nil, which is
used to cache connection properties of the local machine."
- ;; Unify key by removing localname and hop from `tramp-file-name'
- ;; structure. Work with a copy in order to avoid side effects.
- (when (tramp-file-name-p key)
- (setq key (copy-tramp-file-name key))
- (setf (tramp-file-name-localname key) nil
- (tramp-file-name-hop key) nil))
+ (setq key (tramp-file-name-unify key))
(tramp-message
key 7 "%s %s" key
(when-let ((hash (gethash key tramp-cache-data)))
diff --git a/lisp/net/tramp-fuse.el b/lisp/net/tramp-fuse.el
index 8c5afa7cf93..d2bac2d0ee2 100644
--- a/lisp/net/tramp-fuse.el
+++ b/lisp/net/tramp-fuse.el
@@ -175,15 +175,30 @@
mount)
(match-string 1 mount)))))))
+(defun tramp-fuse-get-fusermount ()
+ "Determine the local `fusermount' command."
+ ;; We use key nil for local connection properties.
+ (with-tramp-connection-property nil "fusermount"
+ (or (executable-find "fusermount3")
+ (executable-find "fusermount"))))
+
+(defvar tramp-fuse-mount-points nil
+ "List of fuse volume determined by a VEC.")
+
(defun tramp-fuse-unmount (vec)
"Unmount fuse volume determined by VEC."
- (let ((default-directory tramp-compat-temporary-file-directory)
- (command (format "fusermount3 -u %s" (tramp-fuse-mount-point vec))))
+ (let* ((default-directory tramp-compat-temporary-file-directory)
+ (mount-point (tramp-fuse-mount-point vec))
+ (command (format "%s -u %s" (tramp-fuse-get-fusermount) mount-point)))
(tramp-message vec 6 "%s\n%s" command (shell-command-to-string command))
(tramp-flush-connection-property
(tramp-get-connection-process vec) "mounted")
+ (setq tramp-fuse-mount-points
+ (delete (tramp-file-name-unify vec) tramp-fuse-mount-points))
;; Give the caches a chance to expire.
- (sleep-for 1)))
+ (sleep-for 1)
+ (when (tramp-compat-directory-empty-p mount-point)
+ (delete-directory mount-point))))
(defun tramp-fuse-local-file-name (filename)
"Return local mount name of FILENAME."
@@ -205,6 +220,36 @@
(substring localname 1) localname)
(tramp-fuse-mount-point v)))))))
+(defcustom tramp-fuse-unmount-on-cleanup nil
+ "Whether fuse volumes shall be unmounted on cleanup."
+ :group 'tramp
+ :version "28.1"
+ :type 'boolean)
+
+(defun tramp-fuse-cleanup (vec)
+ "Cleanup fuse volume determined by VEC."
+ (and tramp-fuse-unmount-on-cleanup
+ (member (tramp-file-name-unify vec) tramp-fuse-mount-points)
+ (tramp-fuse-unmount vec)))
+
+(defun tramp-fuse-cleanup-all ()
+ "Unmount all fuse volumes used by Tramp."
+ (and tramp-fuse-unmount-on-cleanup
+ (mapc #'tramp-fuse-unmount tramp-fuse-mount-points)))
+
+;; Add cleanup hooks.
+(add-hook 'tramp-cleanup-connection-hook #'tramp-fuse-cleanup)
+(add-hook 'tramp-cleanup-all-connections-hook #'tramp-fuse-cleanup-all)
+(add-hook 'kill-emacs-hook #'tramp-fuse-cleanup-all)
+(add-hook 'tramp-fuse-unload-hook
+ (lambda ()
+ (remove-hook 'tramp-cleanup-connection-hook
+ #'tramp-fuse-cleanup)
+ (remove-hook 'tramp-cleanup-all-connections-hook
+ #'tramp-fuse-cleanup-all)
+ (remove-hook 'kill-emacs-hook
+ #'tramp-fuse-cleanup-all)))
+
(add-hook 'tramp-unload-hook
(lambda ()
(unload-feature 'tramp-fuse 'force)))
diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el
index 49e366c01c6..812e06f3f11 100644
--- a/lisp/net/tramp-rclone.el
+++ b/lisp/net/tramp-rclone.el
@@ -386,6 +386,7 @@ connection if a previous connection has died for some reason."
(tramp-cleanup-connection vec 'keep-debug 'keep-password))
;; Mark it as connected.
+ (add-to-list 'tramp-fuse-mount-points (tramp-file-name-unify vec))
(tramp-set-connection-property
(tramp-get-connection-process vec) "connected" t))))
diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el
index 0019ac014f8..2be0485fbf1 100644
--- a/lisp/net/tramp-sshfs.el
+++ b/lisp/net/tramp-sshfs.el
@@ -222,11 +222,14 @@ arguments to pass to the OPERATION."
(defun tramp-sshfs-handle-insert-file-contents
(filename &optional visit beg end replace)
"Like `insert-file-contents' for Tramp files."
- (let ((result
- (insert-file-contents
- (tramp-fuse-local-file-name filename) visit beg end replace)))
- (when visit (setq buffer-file-name filename))
- (cons (expand-file-name filename) (cdr result))))
+ (setq filename (expand-file-name filename))
+ (let (signal-hook-function result)
+ (unwind-protect
+ (setq result
+ (insert-file-contents
+ (tramp-fuse-local-file-name filename) visit beg end replace))
+ (when visit (setq buffer-file-name filename))
+ (cons filename (cdr result)))))
(defun tramp-sshfs-handle-process-file
(program &optional infile destination display &rest args)
@@ -368,6 +371,7 @@ connection if a previous connection has died for some reason."
vec 'file-error "Error mounting %s" (tramp-fuse-mount-spec vec))))
;; Mark it as connected.
+ (add-to-list 'tramp-fuse-mount-points (tramp-file-name-unify vec))
(tramp-set-connection-property
(tramp-get-connection-process vec) "connected" t)))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 62628363b77..c0f1cb161ec 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1450,16 +1450,24 @@ If nil, return `tramp-default-port'."
(put #'tramp-file-name-port-or-default 'tramp-suppress-trace t)
+(defun tramp-file-name-unify (vec)
+ "Unify VEC by removing localname and hop from `tramp-file-name' structure.
+Objects returned by this function compare `equal' if they refer to the
+same connection. Make a copy in order to avoid side effects."
+ (when (tramp-file-name-p vec)
+ (setq vec (copy-tramp-file-name vec))
+ (setf (tramp-file-name-localname vec) nil
+ (tramp-file-name-hop vec) nil))
+ vec)
+
+(put #'tramp-file-name-unify 'tramp-suppress-trace t)
+
;; Comparison of file names is performed by `tramp-equal-remote'.
(defun tramp-file-name-equal-p (vec1 vec2)
"Check, whether VEC1 and VEC2 denote the same `tramp-file-name'."
(and (tramp-file-name-p vec1) (tramp-file-name-p vec2)
- (string-equal (tramp-file-name-method vec1)
- (tramp-file-name-method vec2))
- (string-equal (tramp-file-name-user-domain vec1)
- (tramp-file-name-user-domain vec2))
- (string-equal (tramp-file-name-host-port vec1)
- (tramp-file-name-host-port vec2))))
+ (equal (tramp-file-name-unify vec1)
+ (tramp-file-name-unify vec2))))
(defun tramp-get-method-parameter (vec param)
"Return the method parameter PARAM.
@@ -3743,7 +3751,8 @@ User is always nil."
(with-parsed-tramp-file-name filename nil
(unwind-protect
(if (not (file-exists-p filename))
- (tramp-compat-file-missing v filename)
+ (let ((tramp-verbose (if visit 0 tramp-verbose)))
+ (tramp-compat-file-missing v filename))
(with-tramp-progress-reporter
v 3 (format-message "Inserting `%s'" filename)
@@ -3845,7 +3854,7 @@ User is always nil."
(delete-file (tramp-make-tramp-file-name v remote-copy 'nohop))))
;; Result.
- (cons (expand-file-name filename) (cdr result)))))
+ (cons filename (cdr result)))))
(defun tramp-get-lock-file (file)
"Read lockfile info of FILE.
@@ -3920,7 +3929,8 @@ Return nil when there is no lockfile."
(tramp-error v 'file-error "Unsafe lock file name")))
;; Do the lock.
- (let (create-lockfiles signal-hook-function)
+ (let ((tramp-verbose 0)
+ create-lockfiles signal-hook-function)
(condition-case nil
(make-symbolic-link info lockname 'ok-if-already-exists)
(error
diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el
index 3c84e4da14f..8c4a5957b99 100644
--- a/lisp/org/ob-gnuplot.el
+++ b/lisp/org/ob-gnuplot.el
@@ -290,7 +290,7 @@ Pass PARAMS through to `orgtbl-to-generic' when exporting TABLE."
(orgtbl-to-generic
table
(org-combine-plists
- '(:sep "\t" :fmt org-babel-gnuplot-quote-tsv-field)
+ '(:sep "\t" :fmt org-babel-gnuplot-quote-tsv-field :raw t :backend ascii)
params)))))
data-file)
diff --git a/lisp/org/ob-julia.el b/lisp/org/ob-julia.el
index 5ff6a7ca0a7..4fae0d142b2 100644
--- a/lisp/org/ob-julia.el
+++ b/lisp/org/ob-julia.el
@@ -6,20 +6,20 @@
;; Keywords: literate programming, reproducible research, scientific computing
;; Homepage: https://github.com/phrb/ob-julia
-;; This file is not part of GNU Emacs.
+;; This file is part of GNU Emacs.
-;; This program is free software; you can redistribute it and/or modify
+;; 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 of the License, or
;; (at your option) any later version.
-;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@@ -90,18 +90,13 @@ This function is called by `org-babel-execute-src-block'."
(graphics-file (and (member "graphics" (assq :result-params params))
(org-babel-graphical-output-file params)))
(colnames-p (unless graphics-file (cdr (assq :colnames params))))
- ;; (rownames-p (unless graphics-file (cdr (assq :rownames params))))
(full-body (org-babel-expand-body:julia body params graphics-file))
(result
(org-babel-julia-evaluate
session full-body result-type result-params
(or (equal "yes" colnames-p)
(org-babel-pick-name
- (cdr (assq :colname-names params)) colnames-p))
- ;; (or (equal "yes" rownames-p)
- ;; (org-babel-pick-name
- ;; (cdr (assq :rowname-names params)) rownames-p))
- )))
+ (cdr (assq :colname-names params)) colnames-p)))))
(if graphics-file nil result))))
(defun org-babel-normalize-newline (result)
@@ -135,12 +130,7 @@ This function is called by `org-babel-execute-src-block'."
"Return list of julia statements assigning the block's variables."
(let ((vars (org-babel--get-vars params)))
(mapcar
- (lambda (pair)
- (org-babel-julia-assign-elisp
- (car pair) (cdr pair)
- ;; (equal "yes" (cdr (assq :colnames params)))
- ;; (equal "yes" (cdr (assq :rownames params)))
- ))
+ (lambda (pair) (org-babel-julia-assign-elisp (car pair) (cdr pair)))
(mapcar
(lambda (i)
(cons (car (nth i vars))
@@ -156,7 +146,7 @@ This function is called by `org-babel-execute-src-block'."
(concat "\"" (mapconcat #'identity (split-string s "\"") "\"\"") "\"")
(format "%S" s)))
-(defun org-babel-julia-assign-elisp (name value) ;; colnames-p rownames-p
+(defun org-babel-julia-assign-elisp (name value)
"Construct julia code assigning the elisp VALUE to a variable named NAME."
(if (listp value)
(let* ((lengths (mapcar #'length (cl-remove-if-not #'sequencep value)))
@@ -164,11 +154,7 @@ This function is called by `org-babel-execute-src-block'."
(min (if lengths (apply #'min lengths) 0)))
;; Ensure VALUE has an orgtbl structure (depth of at least 2).
(unless (listp (car value)) (setq value (list value)))
- (let ((file (orgtbl-to-csv value '(:fmt org-babel-julia-quote-csv-field)))
- ;; (header (if (or (eq (nth 1 value) 'hline) colnames-p)
- ;; "TRUE" "FALSE"))
- ;; (row-names (if rownames-p "1" "NULL"))
- )
+ (let ((file (orgtbl-to-csv value '(:fmt org-babel-julia-quote-csv-field))))
(if (= max min)
(format "%s = begin
using CSV
@@ -188,7 +174,7 @@ end"
(let ((session (or session "*Julia*"))
(ess-ask-for-ess-directory
(and (bound-and-true-p ess-ask-for-ess-directory)
- (not (cdr (assq :dir params))))))
+ (not (cdr (assq :dir params))))))
(if (org-babel-comint-buffer-livep session)
session
;; FIXME: Depending on `display-buffer-alist', (julia) may end up
@@ -209,14 +195,6 @@ end"
(buffer-name))))
(current-buffer))))))
- ; (defun org-babel-julia-associate-session (session)
- ; "Associate julia code buffer with a julia session.
- ; Make SESSION be the inferior ESS process associated with the
- ; current code buffer."
- ; (setq ess-local-process-name
- ; (process-name (get-buffer-process session)))
- ; (ess-make-buffer-current))
-
(defun org-babel-julia-graphical-output-file (params)
"Name of file to which julia should send graphical output."
(and (member "graphics" (cdr (assq :result-params params)))
@@ -259,16 +237,16 @@ end"
end")
(defun org-babel-julia-evaluate
- (session body result-type result-params column-names-p) ;; row-names-p
+ (session body result-type result-params column-names-p)
"Evaluate julia code in BODY."
(if session
(org-babel-julia-evaluate-session
- session body result-type result-params column-names-p) ;; row-names-p
+ session body result-type result-params column-names-p)
(org-babel-julia-evaluate-external-process
- body result-type result-params column-names-p))) ;; row-names-p
+ body result-type result-params column-names-p)))
(defun org-babel-julia-evaluate-external-process
- (body result-type result-params column-names-p) ;; row-names-p
+ (body result-type result-params column-names-p)
"Evaluate BODY in external julia process.
If RESULT-TYPE equals 'output then return standard output as a
string. If RESULT-TYPE equals 'value then return the value of the
@@ -292,7 +270,7 @@ last statement in BODY, as elisp."
(output (org-babel-eval org-babel-julia-command body))))
(defun org-babel-julia-evaluate-session
- (session body result-type result-params column-names-p) ;; row-names-p
+ (session body result-type result-params column-names-p)
"Evaluate BODY in SESSION.
If RESULT-TYPE equals 'output then return standard output as a
string. If RESULT-TYPE equals 'value then return the value of the
diff --git a/lisp/org/oc-basic.el b/lisp/org/oc-basic.el
index 3b589908e04..98242f3b841 100644
--- a/lisp/org/oc-basic.el
+++ b/lisp/org/oc-basic.el
@@ -4,18 +4,20 @@
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;; This program 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 of the License, or
;; (at your option) any later version.
-;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@@ -87,42 +89,42 @@
:group 'org-cite
:package-version '(Org . "9.5")
:type 'symbol
- :safe t)
+ :safe #'symbolp)
(defcustom org-cite-basic-author-year-separator ", "
"String used to separate cites in an author-year configuration."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'string
- :safe t)
+ :safe #'stringp)
(defcustom org-cite-basic-max-key-distance 2
"Maximum (Levenshtein) distance between a wrong key and its suggestions."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'integer
- :safe t)
+ :safe #'integerp)
(defcustom org-cite-basic-author-column-end 25
"Column where author field ends in completion table, as an integer."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'integer
- :safe t)
+ :safe #'integerp)
(defcustom org-cite-basic-column-separator " "
"Column separator in completion table, as a string."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'string
- :safe t)
+ :safe #'stringp)
(defcustom org-cite-basic-mouse-over-key-face 'highlight
"Face used when mouse is over a citation key."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'face
- :safe t)
+ :safe #'facep)
;;; Internal variables
diff --git a/lisp/org/oc-biblatex.el b/lisp/org/oc-biblatex.el
index a27f9e9bf10..f517e391398 100644
--- a/lisp/org/oc-biblatex.el
+++ b/lisp/org/oc-biblatex.el
@@ -4,18 +4,20 @@
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;; This program 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 of the License, or
;; (at your option) any later version.
-;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@@ -78,7 +80,7 @@ If \"biblatex\" package is already required in the document, e.g., through
:type '(choice
(string :tag "Options (key=value,key2=value2...)")
(const :tag "No option" nil))
- :safe t)
+ :safe #'string-or-null-p)
;;; Internal functions
diff --git a/lisp/org/oc-csl.el b/lisp/org/oc-csl.el
index 5623efcc1b3..3d138807592 100644
--- a/lisp/org/oc-csl.el
+++ b/lisp/org/oc-csl.el
@@ -4,18 +4,20 @@
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;; This program 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 of the License, or
;; (at your option) any later version.
-;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@@ -125,7 +127,9 @@ If nil then only the fallback en-US locale will be available."
:type '(choice
(directory :tag "Locales directory")
(const :tag "Use en-US locale only" nil))
- :safe t)
+ ;; It's not obvious to me that arbitrary locations are safe.
+;;; :safe #'string-or-null-p
+ )
(defcustom org-cite-csl-styles-dir nil
"Directory of CSL style files.
@@ -136,7 +140,9 @@ directory. This variable is ignored when style file is absolute."
:type '(choice
(directory :tag "Styles directory")
(const :tag "Use absolute file names" nil))
- :safe t)
+ ;; It's not obvious to me that arbitrary locations are safe.
+;;; :safe #'string-or-null-p
+ )
;;;; Citelinks
(defcustom org-cite-csl-link-cites t
@@ -144,7 +150,7 @@ directory. This variable is ignored when style file is absolute."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'boolean
- :safe t)
+ :safe #'booleanp)
(defcustom org-cite-csl-no-citelinks-backends '(ascii)
"List of export back-ends for which cite linking is disabled.
@@ -152,8 +158,7 @@ Cite linking for export back-ends derived from any of the back-ends listed here,
is also disabled."
:group 'org-cite
:package-version '(Org . "9.5")
- :type '(repeat symbol)
- :safe t)
+ :type '(repeat symbol))
;;;; Output-specific variables
(defcustom org-cite-csl-html-hanging-indent "1.5em"
@@ -161,7 +166,7 @@ is also disabled."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'string
- :safe t)
+ :safe #'stringp)
(defcustom org-cite-csl-html-label-width-per-char "0.6em"
"Character width in CSS units for calculating entry label widths.
@@ -169,27 +174,33 @@ Used only when `second-field-align' is activated by the used CSL style."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'string
- :safe t)
+ :safe #'stringp)
(defcustom org-cite-csl-latex-hanging-indent "1.5em"
"Size of hanging-indent for LaTeX output in valid LaTeX units."
:group 'org-cite
:package-version '(Org . "9.5")
:type 'string
- :safe t)
+ :safe #'stringp)
;;; Internal variables
(defconst org-cite-csl--etc-dir
- (let* ((oc-root (file-name-directory (locate-library "oc")))
- (oc-etc-dir-1 (expand-file-name "../etc/csl/" oc-root)))
- ;; package.el and straight will put all of org-mode/lisp/ in org-mode/.
- ;; This will cause .. to resolve to the directory above Org.
- ;; To make life easier for people using package.el or straight, we can
- ;; check to see if ../etc/csl exists, and if it doesn't try ./etc/csl.
- (if (file-exists-p oc-etc-dir-1) oc-etc-dir-1
- (expand-file-name "etc/csl/" oc-root)))
- "Directory \"etc/\" from repository.")
+ (let ((oc-root (file-name-directory (locate-library "oc"))))
+ (cond
+ ;; First check whether it looks like we're running from the main
+ ;; Org repository.
+ ((let ((csl-org (expand-file-name "../etc/csl/" oc-root)))
+ (and (file-directory-p csl-org) csl-org)))
+ ;; Next look for the directory alongside oc.el because package.el
+ ;; and straight will put all of org-mode/lisp/ in org-mode/.
+ ((let ((csl-pkg (expand-file-name "etc/csl/" oc-root)))
+ (and (file-directory-p csl-pkg) csl-pkg)))
+ ;; Finally fall back the location used by shared system installs
+ ;; and when running directly from Emacs repository.
+ (t
+ (expand-file-name "org/csl/" data-directory))))
+ "Directory containing CSL-related data files.")
(defconst org-cite-csl--fallback-locales-dir org-cite-csl--etc-dir
"Fallback CSL locale files directory.")
diff --git a/lisp/org/oc-natbib.el b/lisp/org/oc-natbib.el
index 7e2127bd8d9..13cac9ed0b9 100644
--- a/lisp/org/oc-natbib.el
+++ b/lisp/org/oc-natbib.el
@@ -4,18 +4,20 @@
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;; This program 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 of the License, or
;; (at your option) any later version.
-;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@@ -69,8 +71,7 @@ If \"natbib\" package is already required in the document, e.g., through
(const :tag "order as above, but numerical citations are compressed if possible" sort&compress)
(const :tag "display full author list on first citation, abbreviate the others" longnamesfirst)
(const :tag "redefine \\thebibliography to issue \\section* instead of \\chapter*" sectionbib)
- (const :tag "keep all the authors' names in a citation on one line" nonamebreak))
- :safe t)
+ (const :tag "keep all the authors' names in a citation on one line" nonamebreak)))
;;; Internal functions
diff --git a/lisp/org/oc.el b/lisp/org/oc.el
index eb2b7a16953..bbf2195fbd8 100644
--- a/lisp/org/oc.el
+++ b/lisp/org/oc.el
@@ -4,18 +4,20 @@
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;; This program 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 of the License, or
;; (at your option) any later version.
-;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
@@ -125,16 +127,14 @@ File names must be absolute."
:package-version '(Org . "9.5")
:type '(choice (const :tag "No global bibliography" nil)
(repeat :tag "List of bibliography files"
- (file :tag "Bibliography")))
- :safe t)
+ (file :tag "Bibliography"))))
(defcustom org-cite-activate-processor 'basic
"Processor used for activating citations, as a symbol."
:group 'org-cite
:package-version '(Org . "9.5")
:type '(choice (const :tag "Default fontification" nil)
- (symbol :tag "Citation processor"))
- :safe nil)
+ (symbol :tag "Citation processor")))
(defcustom org-cite-export-processors '((t basic))
"Processor used for exporting citations, as a triplet, or nil.
@@ -198,24 +198,21 @@ back-end."
(string :tag "Use specific bibliography style"))
(choice
(const :tag "Default citation style" nil)
- (string :tag "Use specific citation style")))))
- :safe nil)
+ (string :tag "Use specific citation style"))))))
(defcustom org-cite-follow-processor 'basic
"Processor used for following citations, as a symbol."
:group 'org-cite
:package-version '(Org . "9.5")
:type '(choice (const :tag "No following" nil)
- (symbol :tag "Citation processor"))
- :safe nil)
+ (symbol :tag "Citation processor")))
(defcustom org-cite-insert-processor 'basic
"Processor used for inserting citations, as a symbol."
:group 'org-cite
:package-version '(Org . "9.5")
:type '(choice (const :tag "No insertion" nil)
- (symbol :tag "Citation processor"))
- :safe nil)
+ (symbol :tag "Citation processor")))
(defcustom org-cite-adjust-note-numbers t
"When non-nil, allow process to modify location of note numbers.
@@ -232,7 +229,7 @@ When nil, the note number is not moved."
:package-version '(Org . "9.5")
:type '(choice (const :tag "Automatic note number location" t)
(const :tag "Place note numbers manually" nil))
- :safe t)
+ :safe #'booleanp)
(defcustom org-cite-note-rules
'(("en-us" inside outside after)
@@ -297,8 +294,7 @@ This roughly follows the Oxford Guide to Style recommendations."
(const :tag "Citation next to punctuation" same))
(choice :tag "Order of citation and punctuation"
(const :tag "Citation first" before)
- (const :tag "Citation last" after))))
- :safe t)
+ (const :tag "Citation last" after)))))
(defcustom org-cite-punctuation-marks '("." "," ";" ":" "!" "?")
"List of strings that can be moved around when placing note numbers.
@@ -308,8 +304,7 @@ allowed to shuffle punctuation marks specified in this list in order to
place note numbers according to rules defined in `org-cite-note-rules'."
:group 'org-cite
:package-version '(Org . "9.5")
- :type '(repeat string)
- :safe t)
+ :type '(repeat string))
;;; Citation processors
diff --git a/lisp/org/ol-doi.el b/lisp/org/ol-doi.el
index dfde380209f..d2d16b27d51 100644
--- a/lisp/org/ol-doi.el
+++ b/lisp/org/ol-doi.el
@@ -1,21 +1,23 @@
;;; ol-doi.el --- DOI links support in Org -*- lexical-binding: t; -*-
-;; Copyright (C) 2021 Free Software Foundation, Inc.
+;; Copyright (C) 2021 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;; This program 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 of the License, or
;; (at your option) any later version.
-;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
diff --git a/lisp/org/ol.el b/lisp/org/ol.el
index e4a5a278dda..aa1849715c3 100644
--- a/lisp/org/ol.el
+++ b/lisp/org/ol.el
@@ -178,8 +178,7 @@ link.
:group 'org-link
:package-version '(Org . "9.1")
:type '(alist :tag "Link display parameters"
- :value-type plist)
- :safe nil)
+ :value-type plist))
(defcustom org-link-descriptive t
"Non-nil means Org displays descriptive links.
@@ -335,8 +334,7 @@ another window."
(cons (const wl)
(choice
(const wl)
- (const wl-other-frame))))
- :safe nil)
+ (const wl-other-frame)))))
(defcustom org-link-search-must-match-exact-headline 'query-to-create
"Non-nil means internal fuzzy links can only match headlines.
@@ -385,15 +383,13 @@ single keystroke rather than having to type \"yes\"."
:type '(choice
(const :tag "with yes-or-no (safer)" yes-or-no-p)
(const :tag "with y-or-n (faster)" y-or-n-p)
- (const :tag "no confirmation (dangerous)" nil))
- :safe nil)
+ (const :tag "no confirmation (dangerous)" nil)))
(defcustom org-link-shell-skip-confirm-regexp ""
"Regexp to skip confirmation for shell links."
:group 'org-link-follow
:version "24.1"
- :type 'regexp
- :safe nil)
+ :type 'regexp)
(defcustom org-link-elisp-confirm-function 'yes-or-no-p
"Non-nil means ask for confirmation before executing Emacs Lisp links.
@@ -410,15 +406,13 @@ single keystroke rather than having to type \"yes\"."
:type '(choice
(const :tag "with yes-or-no (safer)" yes-or-no-p)
(const :tag "with y-or-n (faster)" y-or-n-p)
- (const :tag "no confirmation (dangerous)" nil))
- :safe nil)
+ (const :tag "no confirmation (dangerous)" nil)))
(defcustom org-link-elisp-skip-confirm-regexp ""
"A regexp to skip confirmation for Elisp links."
:group 'org-link-follow
:version "24.1"
- :type 'regexp
- :safe nil)
+ :type 'regexp)
(defgroup org-link-store nil
"Options concerning storing links in Org mode."
diff --git a/lisp/org/org-keys.el b/lisp/org/org-keys.el
index 2984a4f5145..a10db7e6667 100644
--- a/lisp/org/org-keys.el
+++ b/lisp/org/org-keys.el
@@ -279,8 +279,7 @@ before org.el is loaded."
:type '(choice
(const :tag "A double click follows the link" double)
(const :tag "Unconditionally follow the link with mouse-1" t)
- (integer :tag "mouse-1 click does not follow the link if longer than N ms" 450))
- :safe t)
+ (integer :tag "mouse-1 click does not follow the link if longer than N ms" 450)))
(defcustom org-tab-follows-link nil
"Non-nil means on links TAB will follow the link.
@@ -300,7 +299,7 @@ implementation is bad."
In tables, the special behavior of RET has precedence."
:group 'org-link-follow
:type 'boolean
- :safe t)
+ :safe #'booleanp)
;;; Functions
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el
index a8fb79ea3cd..0779c3a82c8 100644
--- a/lisp/org/org-macs.el
+++ b/lisp/org/org-macs.el
@@ -326,17 +326,19 @@ it for output."
;;; Indentation
-(defun org-do-remove-indentation (&optional n)
+(defun org-do-remove-indentation (&optional n skip-fl)
"Remove the maximum common indentation from the buffer.
When optional argument N is a positive integer, remove exactly
-that much characters from indentation, if possible. Return nil
-if it fails."
+that much characters from indentation, if possible. When
+optional argument SKIP-FL is non-nil, skip the first
+line. Return nil if it fails."
(catch :exit
(goto-char (point-min))
;; Find maximum common indentation, if not specified.
(let ((n (or n
(let ((min-ind (point-max)))
(save-excursion
+ (when skip-fl (forward-line))
(while (re-search-forward "^[ \t]*\\S-" nil t)
(let ((ind (current-indentation)))
(if (zerop ind) (throw :exit nil)
@@ -344,6 +346,7 @@ if it fails."
min-ind))))
(if (zerop n) (throw :exit nil)
;; Remove exactly N indentation, but give up if not possible.
+ (when skip-fl (forward-line))
(while (not (eobp))
(let ((ind (progn (skip-chars-forward " \t") (current-column))))
(cond ((eolp) (delete-region (line-beginning-position) (point)))
diff --git a/lisp/org/org-num.el b/lisp/org/org-num.el
index 408b86ff411..f00e6c463b8 100644
--- a/lisp/org/org-num.el
+++ b/lisp/org/org-num.el
@@ -99,8 +99,7 @@ Any `face' text property on the returned string overrides
`org-num-face'."
:group 'org-appearance
:package-version '(Org . "9.3")
- :type 'function
- :safe nil)
+ :type 'function)
(defcustom org-num-max-level nil
"Level below which headlines are not numbered.
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el
index 91a3d415dfa..8d02cf43450 100644
--- a/lisp/org/org-src.el
+++ b/lisp/org/org-src.el
@@ -38,6 +38,7 @@
(require 'org-keys)
(declare-function org-mode "org" ())
+(declare-function org--get-expected-indentation "org" (element contentsp))
(declare-function org-element-at-point "org-element" ())
(declare-function org-element-class "org-element" (datum &optional parent))
(declare-function org-element-context "org-element" (&optional element))
@@ -327,7 +328,8 @@ a cons cell (LINE . COLUMN) or symbol `end'. See also
(if (>= pos end) 'end
(org-with-wide-buffer
(goto-char (max beg pos))
- (cons (count-lines beg (line-beginning-position))
+ (cons (count-lines (save-excursion (goto-char beg) (line-beginning-position))
+ (line-beginning-position))
;; Column is relative to the end of line to avoid problems of
;; comma escaping or colons appended in front of the line.
(- (point) (min end (line-end-position)))))))
@@ -445,6 +447,7 @@ Assume point is in the corresponding edit buffer."
org-src--content-indentation
0))))
(use-tabs? (and (> org-src--tab-width 0) t))
+ (preserve-fl (eq org-src--source-type 'latex-fragment))
(source-tab-width org-src--tab-width)
(contents (org-with-wide-buffer
(let ((eol (line-end-position)))
@@ -466,7 +469,8 @@ Assume point is in the corresponding edit buffer."
;; Add INDENTATION-OFFSET to every line in buffer,
;; unless indentation is meant to be preserved.
(when (> indentation-offset 0)
- (while (not (eobp))
+ (when preserve-fl (forward-line))
+ (while (not (eobp))
(skip-chars-forward " \t")
(when (or (not (eolp)) ; not a blank line
(and (eq (point) (marker-position marker)) ; current line
@@ -518,7 +522,13 @@ Leave point in edit buffer."
(source-tab-width (if indent-tabs-mode tab-width 0))
(type (org-element-type datum))
(block-ind (org-with-point-at (org-element-property :begin datum)
- (current-indentation)))
+ (cond
+ ((save-excursion (skip-chars-backward " \t") (bolp))
+ (current-indentation))
+ ((org-element-property :parent datum)
+ (org--get-expected-indentation
+ (org-element-property :parent datum) nil))
+ (t (current-indentation)))))
(content-ind org-edit-src-content-indentation)
(blank-line (save-excursion (beginning-of-line)
(looking-at-p "^[[:space:]]*$")))
@@ -548,7 +558,8 @@ Leave point in edit buffer."
(insert contents)
(remove-text-properties (point-min) (point-max)
'(display nil invisible nil intangible nil))
- (unless preserve-ind (org-do-remove-indentation))
+ (let ((lf (eq type 'latex-fragment)))
+ (unless preserve-ind (org-do-remove-indentation (and lf block-ind) lf)))
(set-buffer-modified-p nil)
(setq buffer-file-name nil)
;; Initialize buffer.
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index ef363dc3901..5bccbe497cc 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
(defun org-git-version ()
"The Git version of Org mode.
Inserted by installing Org or when a release is made."
- (let ((org-git-version "release_9.5"))
+ (let ((org-git-version "release_9.5-30-g10dc9d"))
org-git-version))
(provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 2ec6566c0b0..bc0ea24bee7 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -3630,7 +3630,7 @@ When this is non-nil, the headline after the keyword is set to the
:group 'org-appearance
:package-version '(Org . "9.4")
:type 'boolean
- :safe t)
+ :safe #'booleanp)
(defcustom org-fontify-done-headline t
"Non-nil means change the face of a headline if it is marked DONE.
@@ -5113,6 +5113,7 @@ stacked delimiters is N. Escaping delimiters is not possible."
'(invisible t))
(add-text-properties (match-beginning 3) (match-end 3)
'(invisible t)))
+ (goto-char (match-end 0))
(throw :exit t))))))))
(defun org-emphasize (&optional char)
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el
index 60bb77d8188..a150b1fdb87 100644
--- a/lisp/org/ox-html.el
+++ b/lisp/org/ox-html.el
@@ -795,7 +795,7 @@ Most common values are:
:group 'org-export-html
:package-version '(Org . "9.4")
:type 'string
- :safe t)
+ :safe #'stringp)
(defcustom org-html-with-latex org-export-with-latex
"Non-nil means process LaTeX math snippets.
@@ -903,7 +903,7 @@ numbers are enabled."
:group 'org-export-html
:package-version '(Org . "9.3")
:type 'boolean
- :safe t)
+ :safe #'booleanp)
;;;; Table
diff --git a/lisp/org/ox-koma-letter.el b/lisp/org/ox-koma-letter.el
index 96704dbb985..6a895a6a24d 100644
--- a/lisp/org/ox-koma-letter.el
+++ b/lisp/org/ox-koma-letter.el
@@ -11,12 +11,12 @@
;; This file is part of GNU Emacs.
-;; This program is free software: you can redistribute it and/or modify
+;; 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 of the License, or
;; (at your option) any later version.
-;; This program 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.
@@ -594,7 +594,7 @@ such as the one tagged with PS."
;;;; Export Block
-(defun org-koma-letter-export-block (export-block contents info)
+(defun org-koma-letter-export-block (export-block _contents _info)
"Transcode an EXPORT-BLOCK element into KOMA Scrlttr2 code.
CONTENTS is nil. INFO is a plist used as a communication
channel."
@@ -604,7 +604,7 @@ channel."
;;;; Export Snippet
-(defun org-koma-letter-export-snippet (export-snippet contents info)
+(defun org-koma-letter-export-snippet (export-snippet _contents _info)
"Transcode an EXPORT-SNIPPET object into KOMA Scrlttr2 code.
CONTENTS is nil. INFO is a plist used as a communication
channel."
diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el
index 993c2c6431d..3e3967033a5 100644
--- a/lisp/org/ox-latex.el
+++ b/lisp/org/ox-latex.el
@@ -413,7 +413,7 @@ to \"\\autoref{%s}\" or \"\\cref{%s}\" for example."
:group 'org-export-latex
:type 'string
:package-version '(Org . "9.5")
- :safe t)
+ :safe #'stringp)
;;;; Preamble
@@ -793,7 +793,7 @@ default we use here encompasses both."
:group 'org-export-latex
:package-version '(Org . "9.5")
:type 'string
- :safe t)
+ :safe #'stringp)
(defcustom org-latex-default-table-mode 'table
"Default mode for tables.
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index acf7123225f..c7474b25a78 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -548,7 +548,7 @@ in `completion-at-point-functions' (which see)."
(lambda (s)
(push s retval)
(cl-loop
- for (shorthand . longhand) in elisp-shorthands
+ for (shorthand . longhand) in read-symbol-shorthands
for full-name = (symbol-name s)
when (string-prefix-p longhand full-name)
do (let ((sym (make-symbol
@@ -559,17 +559,17 @@ in `completion-at-point-functions' (which see)."
(push sym retval)
retval))))
retval)))
- (cond ((null elisp-shorthands) obarray)
+ (cond ((null read-symbol-shorthands) obarray)
((and obarray-cache
- (gethash (cons (current-buffer) elisp-shorthands)
+ (gethash (cons (current-buffer) read-symbol-shorthands)
obarray-cache)))
(obarray-cache
- (puthash (cons (current-buffer) elisp-shorthands)
+ (puthash (cons (current-buffer) read-symbol-shorthands)
(obarray-plus-shorthands)
obarray-cache))
(t
(setq obarray-cache (make-hash-table :test #'equal))
- (puthash (cons (current-buffer) elisp-shorthands)
+ (puthash (cons (current-buffer) read-symbol-shorthands)
(obarray-plus-shorthands)
obarray-cache)))))
@@ -2126,7 +2126,7 @@ Runs in a batch-mode Emacs. Interactively use variable
(pp collected)))
-(put 'elisp-shorthands 'safe-local-variable #'consp)
+(put 'read-symbol-shorthands 'safe-local-variable #'consp)
(provide 'elisp-mode)
;;; elisp-mode.el ends here
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index 6c09dcf881d..4f15686dc87 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -68,6 +68,28 @@
`(menu-item "Find Definition" xref-find-definitions-at-mouse
:help ,(format "Find definition of `%s'" identifier))
'prog-separator)))
+
+ (when (thing-at-mouse click 'symbol)
+ (define-key-after menu [select-region mark-symbol]
+ `(menu-item "Symbol"
+ ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'symbol))
+ :help "Mark the symbol at click for a subsequent cut/copy")
+ 'mark-whole-buffer))
+ (define-key-after menu [select-region mark-list]
+ `(menu-item "List"
+ ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'list))
+ :help "Mark the list at click for a subsequent cut/copy")
+ 'mark-whole-buffer)
+ (define-key-after menu [select-region mark-defun]
+ `(menu-item "Defun"
+ ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'defun))
+ :help "Mark the defun at click for a subsequent cut/copy")
+ 'mark-whole-buffer)
+
+ ;; Include text-mode select menu only in strings and comments.
+ (when (nth 8 (save-excursion (syntax-ppss (posn-point (event-end click)))))
+ (text-mode-menu menu click))
+
menu)
(defvar prog-mode-map
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 8946e2c3f42..176f599649f 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -185,7 +185,8 @@ and you want to simplify them for the mode line
(defvar-local which-func-mode nil
"Non-nil means display current function name in mode line.
-This makes a difference only if `which-function-mode' is non-nil.")
+This makes a difference only if variable `which-function-mode' is
+non-nil.")
(add-hook 'after-change-major-mode-hook #'which-func-ff-hook t)
diff --git a/lisp/shorthands.el b/lisp/shorthands.el
new file mode 100644
index 00000000000..e9f5880ab29
--- /dev/null
+++ b/lisp/shorthands.el
@@ -0,0 +1,80 @@
+;;; shorthands.el --- Read code considering Elisp shorthands -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: João Távora <joaotavora@gmail.com>
+;; Keywords: lisp
+
+;; 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 of the License, or
+;; (at your option) any later version.
+
+;; 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. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Basic helpers for loading files with Shorthands.
+
+;;; Code:
+(require 'files)
+(require 'mule)
+(eval-when-compile (require 'cl-lib))
+
+(defun hack-read-symbol-shorthands ()
+ "Compute `read-symbol-shorthands' from Local Variables section."
+ ;; FIXME: relies on the `hack-local-variables--find-variables'
+ ;; detail of files.el. That function should be exported,
+ ;; possibly be refactored into two parts, since we're only
+ ;; interested in basic "Local Variables" parsing.
+ (alist-get 'read-symbol-shorthands (hack-local-variables--find-variables)))
+
+(setq hack-read-symbol-shorthands-function #'hack-read-symbol-shorthands)
+
+
+;; FIXME: move this all to progmodes/elisp-mode.el? OTOH it'd make
+;; more sense there, OTOH all the elisp font-lock stuff is actually in
+;; lisp/emacs-lisp/lisp-mode.el, which isn't right either. So
+;; shorthand font-locking logic is probably better here for now.
+
+(defface elisp-shorthand-font-lock-face
+ '((t :inherit font-lock-keyword-face :foreground "cyan"))
+ "Face for highlighting shorthands in Emacs Lisp."
+ :version "28.1"
+ :group 'font-lock-faces)
+
+(defun shorthands--mismatch-from-end (str1 str2)
+ (cl-loop with l1 = (length str1) with l2 = (length str2)
+ for i from 1
+ for i1 = (- l1 i) for i2 = (- l2 i)
+ while (and (>= i1 0) (>= i2 0) (eq (aref str1 i1) (aref str2 i2)))
+ finally (return (1- i))))
+
+(defun shorthands-font-lock-shorthands (limit)
+ (when read-symbol-shorthands
+ (while (re-search-forward
+ (eval-when-compile
+ (concat "\\_<\\(" lisp-mode-symbol-regexp "\\)\\_>"))
+ limit t)
+ (let* ((existing (get-text-property (match-beginning 1) 'face))
+ (probe (and (not (memq existing '(font-lock-comment-face
+ font-lock-string-face)))
+ (intern-soft (match-string 1))))
+ (sname (and probe (symbol-name probe)))
+ (mm (and sname (shorthands--mismatch-from-end
+ (match-string 1) sname))))
+ (unless (or (null mm) (= mm (length sname)))
+ (add-face-text-property (match-beginning 1) (1+ (- (match-end 1) mm))
+ 'elisp-shorthand-font-lock-face))))))
+
+(font-lock-add-keywords 'emacs-lisp-mode '((shorthands-font-lock-shorthands)) t)
+
+;;; shorthands.el ends here
diff --git a/lisp/subr.el b/lisp/subr.el
index 6473c5ac11b..c3dbe8df800 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -6437,7 +6437,9 @@ of fill.el (for example `fill-region')."
(defun internal--format-docstring-line (string &rest objects)
"Format a single line from a documentation string out of STRING and OBJECTS.
Signal an error if STRING contains a newline.
-This is intended for internal use only."
+This is intended for internal use only. Avoid using this for the
+first line of a docstring; the first line should be a complete
+sentence (see Info node `(elisp) Documentation Tips')."
(when (string-match "\n" string)
(error "Unable to fill string containing newline: %S" string))
(internal--fill-string-single-line (apply #'format string objects)))
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 634328e223b..68afb539fa3 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1211,13 +1211,26 @@ Interactively, ARG selects the ARGth different frame to move to."
"Detach tab number FROM-NUMBER to a new frame.
Interactively or without argument, detach current tab."
(interactive (list (1+ (tab-bar--current-tab-index))))
- (let* ((tab (nth (1- (or from-number 1)) (funcall tab-bar-tabs-function)))
- (tab-name (alist-get 'name tab))
+ (let* ((tabs (funcall tab-bar-tabs-function))
+ (tab-index (1- (or from-number (1+ (tab-bar--current-tab-index tabs)))))
+ (tab-name (alist-get 'name (nth tab-index tabs)))
+ ;; On some window managers, `make-frame' selects the new frame,
+ ;; so previously selected frame is saved to `from-frame'.
+ (from-frame (selected-frame))
(new-frame (make-frame `((name . ,tab-name)))))
- (tab-bar-move-tab-to-frame nil nil from-number new-frame nil)
+ (tab-bar-move-tab-to-frame nil from-frame from-number new-frame nil)
(with-selected-frame new-frame
(tab-bar-close-tab))))
+(defun tab-bar-move-window-to-tab ()
+ "Detach the selected window to a new tab."
+ (interactive)
+ (let ((tab-bar-new-tab-choice 'window))
+ (tab-bar-new-tab))
+ (tab-bar-switch-to-recent-tab)
+ (delete-window)
+ (tab-bar-switch-to-recent-tab))
+
(defcustom tab-bar-new-tab-to 'right
"Defines where to create a new tab.
@@ -1264,9 +1277,10 @@ After the tab is created, the hooks in
(select-window (minibuffer-selected-window)))
(let ((ignore-window-parameters t))
(delete-other-windows))
- ;; Create a new window to get rid of old window parameters
- ;; (e.g. prev/next buffers) of old window.
- (split-window) (delete-window)
+ (unless (eq tab-bar-new-tab-choice 'window)
+ ;; Create a new window to get rid of old window parameters
+ ;; (e.g. prev/next buffers) of old window.
+ (split-window) (delete-window))
(let ((buffer
(if (functionp tab-bar-new-tab-choice)
(funcall tab-bar-new-tab-choice)
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 4a751b384e5..890d1243e73 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -574,7 +574,10 @@ For use in `tab-line-tab-face-functions'."
;; handle tab-line scrolling
(window-parameter nil 'tab-line-hscroll)
;; for setting face 'tab-line-tab-current'
- (eq (selected-window) (old-selected-window))))
+ (eq (selected-window) (old-selected-window))
+ (and (memq 'tab-line-tab-face-modified
+ tab-line-tab-face-functions)
+ (buffer-file-name) (buffer-modified-p))))
(cache (window-parameter nil 'tab-line-cache)))
;; Enable auto-hscroll again after it was disabled on manual scrolling.
;; The moment to enable it is when the window-buffer was updated.
diff --git a/lisp/textmodes/etc-authors-mode.el b/lisp/textmodes/etc-authors-mode.el
index a591b2db978..8b5fefd3b7d 100644
--- a/lisp/textmodes/etc-authors-mode.el
+++ b/lisp/textmodes/etc-authors-mode.el
@@ -5,18 +5,20 @@
;; Author: Stefan Kangas <stefan@marxist.se>
;; Keywords: internal
-;; This program 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 of the License, or
;; (at your option) any later version.
-;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 81d908c95e7..decce88573b 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -768,7 +768,7 @@ space does not end a sentence, so don't break a line there."
(setq first nil
linebeg (+ (point) (length actual-fill-prefix))))
(move-to-column (current-fill-column))
- (if (when (< (point) to)
+ (if (when (and (< (point) to) (< linebeg to))
;; Find the position where we'll break the line.
;; Use an immediately following space, if any.
;; However, note that `move-to-column' may overshoot
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el
index 8a54b1a301f..e1475934ddb 100644
--- a/lisp/textmodes/reftex-cite.el
+++ b/lisp/textmodes/reftex-cite.el
@@ -814,7 +814,7 @@ in order to only add another reference in the same cite command."
(interactive)
(reftex-citation nil ?t))
-(defvar reftex-select-bib-map)
+(defvar reftex-select-bib-mode-map)
(defvar reftex--found-list)
(defun reftex-offer-bib-menu ()
"Offer bib menu and return list of selected items."
@@ -870,7 +870,7 @@ in order to only add another reference in the same cite command."
(reftex-select-item
reftex-citation-prompt
reftex-citation-help
- reftex-select-bib-map
+ reftex-select-bib-mode-map
nil
'reftex-bibtex-selection-callback nil))
(setq key (car rtn)
diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el
index 9d5bc5a8f0f..a5d83c34d67 100644
--- a/lisp/textmodes/reftex-ref.el
+++ b/lisp/textmodes/reftex-ref.el
@@ -533,7 +533,7 @@ When called with 2 \\[universal-argument] prefix args, disable magic word recogn
(cons (cdr cell) (- (match-end 0) (match-end 1)))
nil)))
-(defvar reftex-select-label-map)
+(defvar reftex-select-label-mode-map)
(defun reftex-offer-label-menu (typekey)
;; Offer a menu with the appropriate labels.
(let* ((buf (current-buffer))
@@ -605,7 +605,7 @@ When called with 2 \\[universal-argument] prefix args, disable magic word recogn
(reftex-select-item
reftex-select-label-prompt
reftex-select-label-help
- reftex-select-label-map
+ reftex-select-label-mode-map
offset
'reftex-show-label-location follow))
(setq key (car rtn)
diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el
index 74c6d412a65..3243bd31c4c 100644
--- a/lisp/textmodes/text-mode.el
+++ b/lisp/textmodes/text-mode.el
@@ -95,6 +95,28 @@ inherit all the commands defined in this map.")
:style toggle
:selected (memq 'turn-on-auto-fill text-mode-hook)]))
+(defun text-mode-menu (menu click)
+ "Populate MENU with text selection commands at CLICK."
+
+ (when (thing-at-mouse click 'word)
+ (define-key-after menu [select-region mark-word]
+ `(menu-item "Word"
+ ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'word))
+ :help "Mark the word at click for a subsequent cut/copy")
+ 'mark-whole-buffer))
+ (define-key-after menu [select-region mark-sentence]
+ `(menu-item "Sentence"
+ ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'sentence))
+ :help "Mark the sentence at click for a subsequent cut/copy")
+ 'mark-whole-buffer)
+ (define-key-after menu [select-region mark-paragraph]
+ `(menu-item "Paragraph"
+ ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'paragraph))
+ :help "Mark the paragraph at click for a subsequent cut/copy")
+ 'mark-whole-buffer)
+
+ menu)
+
(define-derived-mode text-mode nil "Text"
"Major mode for editing text written for humans to read.
@@ -104,7 +126,8 @@ You can thus get the full benefit of adaptive filling
\\{text-mode-map}
Turning on Text mode runs the normal hook `text-mode-hook'."
(setq-local text-mode-variant t)
- (setq-local require-final-newline mode-require-final-newline))
+ (setq-local require-final-newline mode-require-final-newline)
+ (add-hook 'context-menu-functions 'text-mode-menu 10 t))
(define-derived-mode paragraph-indent-text-mode text-mode "Parindent"
"Major mode for editing text, with leading spaces starting a paragraph.
diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el
index 01e2ad72d88..2a4c8cff8f0 100644
--- a/lisp/textmodes/tildify.el
+++ b/lisp/textmodes/tildify.el
@@ -67,7 +67,7 @@ matching the white space). The pattern is matched case-sensitive regardless of
the value of `case-fold-search' setting."
:version "25.1"
:type 'regexp
- :safe t)
+ :safe #'stringp)
(defcustom tildify-pattern-alist ()
"Alist specifying where to insert hard spaces.
@@ -112,7 +112,7 @@ If nil, current major mode has no way to represent a hard space."
" ")
(const :tag "No-break space (U+00A0)" "\u00A0")
(string :tag "Custom string"))
- :safe t)
+ :safe #'string-or-null-p)
(defcustom tildify-string-alist ()
"Alist specifying what is a hard space in the current major mode.
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index e1ea922d040..178e490fb7d 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -59,7 +59,7 @@ with %, as follows.
%#p `am' or `pm' %P gives uppercase: `AM' or `PM'
%02S seconds
%w day number of week, Sunday is 0
-%02y 2-digit year: `03' %Y 4-digit year: `2003'
+%02y 2-digit year %Y 4-digit year
%Z time zone name: `EST' %#Z gives lowercase: `est'
%5z time zone offset: `-0500' (since Emacs 27; see note below)
diff --git a/src/Makefile.in b/src/Makefile.in
index 34335cfa96d..25c7865d4a1 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -55,6 +55,8 @@ lwlibdir = ../lwlib
# Configuration files for .o files to depend on.
config_h = config.h $(srcdir)/conf_post.h
+HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@
+
## ns-app if NS self contained app, else empty.
OTHER_FILES = @OTHER_FILES@
@@ -448,14 +450,9 @@ FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
# Must be first, before dep inclusion!
-ifeq ($(HAVE_NATIVE_COMP),yes)
-ifeq ($(NATIVE_DISABLED),)
-all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) ../native-lisp
-else
-all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
-endif
-else
all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
+ifeq ($(HAVE_NATIVE_COMP):$(NATIVE_DISABLED),yes:)
+all: ../native-lisp
endif
.PHONY: all
@@ -783,8 +780,7 @@ tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
@$(MAKE) $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\
THEFILE=$< $<c
-ifeq ($(HAVE_NATIVE_COMP),yes)
-ifeq ($(NATIVE_DISABLED),)
+ifeq ($(HAVE_NATIVE_COMP):$(NATIVE_DISABLED),yes:)
## The following rules are used only when building a source tarball
## for the first time, when the native-lisp/ directory doesn't yet
## exist and needs to be created and populated with the preloaded
@@ -808,11 +804,12 @@ elnlisp := $(addprefix ${lispsource}/,${elnlisp}) $(lisp:.elc=.eln)
THEFILE=$< $<n
../native-lisp: | $(pdmp)
- mkdir $@ && $(MAKE) $(AM_V_NO_PD) $(elnlisp)
- LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump \
- --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR)
- cp -f $@ $(bootstrap_pdmp)
-endif
+ if test ! -d $@; then \
+ mkdir $@ && $(MAKE) $(AM_V_NO_PD) $(elnlisp); \
+ LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump \
+ --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR); \
+ cp -f $@ $(bootstrap_pdmp); \
+ fi
endif
## VCSWITNESS points to the file that holds info about the current checkout.
diff --git a/src/alloc.c b/src/alloc.c
index 0895a0f52aa..0c04d5cde05 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -988,7 +988,8 @@ record_xmalloc (size_t size)
/* Like malloc but used for allocating Lisp data. NBYTES is the
number of bytes to allocate, TYPE describes the intended use of the
- allocated memory block (for strings, for conses, ...). */
+ allocated memory block (for strings, for conses, ...).
+ NBYTES must be positive. */
#if ! USE_LSB_TAG
void *lisp_malloc_loser EXTERNALLY_VISIBLE;
@@ -1030,7 +1031,7 @@ lisp_malloc (size_t nbytes, bool clearit, enum mem_type type)
#endif
MALLOC_UNBLOCK_INPUT;
- if (!val && nbytes)
+ if (!val)
memory_full (nbytes);
MALLOC_PROBE (nbytes);
return val;
diff --git a/src/conf_post.h b/src/conf_post.h
index 8558dc466cc..2c6fbb0dba5 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -293,7 +293,6 @@ extern int emacs_setenv_TZ (char const *);
ATTRIBUTE_FORMAT ((PRINTF_ARCHETYPE, string_index, first_to_check))
#define ARG_NONNULL ATTRIBUTE_NONNULL
-#define ATTRIBUTE_UNUSED MAYBE_UNUSED
/* Declare NAME to be a pointer to an object of type TYPE, initialized
to the address ADDR, which may be of a different type. Accesses
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 313cfc82c26..e87845caf70 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2932,8 +2932,9 @@ xg_item_label_same_p (GtkMenuItem *witem, const char *label)
char *utf8_label = get_utf8_string (label);
const char *old_label = witem ? xg_get_menu_item_label (witem) : 0;
- bool is_same = (!old_label == !utf8_label
- && (!old_label || strcmp (utf8_label, old_label) == 0));
+ bool is_same = (old_label
+ ? utf8_label && strcmp (utf8_label, old_label) == 0
+ : !utf8_label);
if (utf8_label) g_free (utf8_label);
diff --git a/src/lread.c b/src/lread.c
index af0a7994592..07580d11d13 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4626,29 +4626,29 @@ oblookup (Lisp_Object obarray, register const char *ptr, ptrdiff_t size, ptrdiff
return tem;
}
-/* Like 'oblookup', but considers 'Velisp_shorthands', potentially
- recognizing that IN is shorthand for some other longhand name,
- which is then then placed in OUT. In that case, memory is
- malloc'ed for OUT (which the caller must free) while SIZE_OUT and
- SIZE_BYTE_OUT respectively hold the character and byte sizes of the
- transformed symbol name. If IN is not recognized shorthand for any
- other symbol, OUT is set to point to NULL and 'oblookup' is
- called. */
+/* Like 'oblookup', but considers 'Vread_symbol_shorthands',
+ potentially recognizing that IN is shorthand for some other
+ longhand name, which is then then placed in OUT. In that case,
+ memory is malloc'ed for OUT (which the caller must free) while
+ SIZE_OUT and SIZE_BYTE_OUT respectively hold the character and byte
+ sizes of the transformed symbol name. If IN is not recognized
+ shorthand for any other symbol, OUT is set to point to NULL and
+ 'oblookup' is called. */
Lisp_Object
oblookup_considering_shorthand (Lisp_Object obarray, const char *in,
ptrdiff_t size, ptrdiff_t size_byte, char **out,
ptrdiff_t *size_out, ptrdiff_t *size_byte_out)
{
- Lisp_Object tail = Velisp_shorthands;
+ Lisp_Object tail = Vread_symbol_shorthands;
/* First, assume no transformation will take place. */
*out = NULL;
- /* Then, iterate each pair in Velisp_shorthands. */
+ /* Then, iterate each pair in Vread_symbol_shorthands. */
FOR_EACH_TAIL_SAFE (tail)
{
Lisp_Object pair = XCAR (tail);
- /* Be lenient to 'elisp-shorthands': if some element isn't a
+ /* Be lenient to 'read-symbol-shorthands': if some element isn't a
cons, or some member of that cons isn't a string, just skip
to the next element. */
if (!CONSP (pair))
@@ -5446,10 +5446,10 @@ that are loaded before your customizations are read! */);
DEFSYM (Qchar_from_name, "char-from-name");
- DEFVAR_LISP ("elisp-shorthands", Velisp_shorthands,
+ DEFVAR_LISP ("read-symbol-shorthands", Vread_symbol_shorthands,
doc: /* Alist of known symbol-name shorthands.
This variable's value can only be set via file-local variables.
See Info node `(elisp)Shorthands' for more details. */);
- Velisp_shorthands = Qnil;
+ Vread_symbol_shorthands = Qnil;
DEFSYM (Qobarray_cache, "obarray-cache");
}
diff --git a/src/pdumper.c b/src/pdumper.c
index 2291fced5d7..11c680d77b7 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -799,7 +799,7 @@ dump_tailq_length (const struct dump_tailq *tailq)
return tailq->length;
}
-static void ATTRIBUTE_UNUSED
+static void
dump_tailq_prepend (struct dump_tailq *tailq, Lisp_Object value)
{
Lisp_Object link = Fcons (value, tailq->head);
@@ -809,24 +809,6 @@ dump_tailq_prepend (struct dump_tailq *tailq, Lisp_Object value)
tailq->length += 1;
}
-static void ATTRIBUTE_UNUSED
-dump_tailq_append (struct dump_tailq *tailq, Lisp_Object value)
-{
- Lisp_Object link = Fcons (value, Qnil);
- if (NILP (tailq->head))
- {
- eassert (NILP (tailq->tail));
- tailq->head = tailq->tail = link;
- }
- else
- {
- eassert (!NILP (tailq->tail));
- XSETCDR (tailq->tail, link);
- tailq->tail = link;
- }
- tailq->length += 1;
-}
-
static bool
dump_tailq_empty_p (struct dump_tailq *tailq)
{
diff --git a/src/process.c b/src/process.c
index 58347a154a3..221d4c7f6c3 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4004,7 +4004,7 @@ usage: (make-network-process &rest ARGS) */)
if (!NILP (host))
{
- ptrdiff_t portstringlen ATTRIBUTE_UNUSED;
+ MAYBE_UNUSED ptrdiff_t portstringlen;
/* SERVICE can either be a string or int.
Convert to a C string for later use by getaddrinfo. */
diff --git a/src/systhread.h b/src/systhread.h
index 0f47d7c1a8a..601505f4f86 100644
--- a/src/systhread.h
+++ b/src/systhread.h
@@ -101,14 +101,11 @@ extern void sys_cond_signal (sys_cond_t *);
extern void sys_cond_broadcast (sys_cond_t *);
extern void sys_cond_destroy (sys_cond_t *);
-extern sys_thread_t sys_thread_self (void)
- NODISCARD;
-extern bool sys_thread_equal (sys_thread_t, sys_thread_t)
- NODISCARD;
-
-extern bool sys_thread_create (sys_thread_t *, thread_creation_function *,
- void *)
- NODISCARD;
+NODISCARD extern sys_thread_t sys_thread_self (void);
+NODISCARD extern bool sys_thread_equal (sys_thread_t, sys_thread_t);
+
+NODISCARD extern bool sys_thread_create (sys_thread_t *,
+ thread_creation_function *, void *);
extern void sys_thread_yield (void);
extern void sys_thread_set_name (const char *);
diff --git a/src/term.c b/src/term.c
index 7d9fe8cee30..0858f816851 100644
--- a/src/term.c
+++ b/src/term.c
@@ -549,13 +549,14 @@ encode_terminal_code (struct glyph *src, int src_len,
{
if (src->type == COMPOSITE_GLYPH)
{
- struct composition *cmp UNINIT;
- Lisp_Object gstring UNINIT;
+ struct composition *cmp;
+ Lisp_Object gstring;
int i;
nbytes = buf - encode_terminal_src;
if (src->u.cmp.automatic)
{
+ cmp = NULL;
gstring = composition_gstring_from_id (src->u.cmp.id);
required = src->slice.cmp.to - src->slice.cmp.from + 1;
}
@@ -575,7 +576,7 @@ encode_terminal_code (struct glyph *src, int src_len,
buf = encode_terminal_src + nbytes;
}
- if (src->u.cmp.automatic)
+ if (!cmp)
for (i = src->slice.cmp.from; i <= src->slice.cmp.to; i++)
{
Lisp_Object g = LGSTRING_GLYPH (gstring, i);
diff --git a/src/unexcw.c b/src/unexcw.c
index 7a80b05963b..157e9f45607 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -48,7 +48,7 @@ static exe_header_t *
read_exe_header (int fd, exe_header_t * exe_header_buffer)
{
int i;
- int ret ATTRIBUTE_UNUSED;
+ MAYBE_UNUSED int ret;
assert (fd >= 0);
assert (exe_header_buffer != 0);
@@ -111,7 +111,7 @@ fixup_executable (int fd)
exe_header_t exe_header_buffer;
exe_header_t *exe_header;
int i;
- int ret ATTRIBUTE_UNUSED;
+ MAYBE_UNUSED int ret;
int found_data = 0;
int found_bss = 0;
@@ -269,7 +269,7 @@ unexec (const char *outfile, const char *infile)
int fd_in;
int fd_out;
int ret;
- int ret2 ATTRIBUTE_UNUSED;
+ MAYBE_UNUSED int ret2;
infile = add_exe_suffix_if_necessary (infile, infile_buffer);
outfile = add_exe_suffix_if_necessary (outfile, outfile_buffer);
diff --git a/src/xfns.c b/src/xfns.c
index 0d0335c2997..785ae3baca5 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6222,7 +6222,7 @@ Otherwise, the return value is a vector with the following fields:
static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object,
Lisp_Object, int, int, int *, int *);
-/* The frame of the currently visible tooltip. */
+/* The frame of the currently visible tooltip, or nil if none. */
static Lisp_Object tip_frame;
/* The window-system window corresponding to the frame of the
@@ -6710,7 +6710,7 @@ x_hide_tip (bool delete)
if ((NILP (tip_last_frame) && NILP (tip_frame))
|| (!x_gtk_use_system_tooltips
&& !delete
- && FRAMEP (tip_frame)
+ && !NILP (tip_frame)
&& FRAME_LIVE_P (XFRAME (tip_frame))
&& !FRAME_VISIBLE_P (XFRAME (tip_frame))))
/* Either there's no tooltip to hide or it's an already invisible
@@ -6727,7 +6727,7 @@ x_hide_tip (bool delete)
specbind (Qinhibit_quit, Qt);
/* Try to hide the GTK+ system tip first. */
- if (FRAMEP (tip_last_frame))
+ if (!NILP (tip_last_frame))
{
struct frame *f = XFRAME (tip_last_frame);
@@ -6745,7 +6745,7 @@ x_hide_tip (bool delete)
tip_last_frame = Qnil;
/* Now look whether there's an Emacs tip around. */
- if (FRAMEP (tip_frame))
+ if (!NILP (tip_frame))
{
struct frame *f = XFRAME (tip_frame);
@@ -6775,7 +6775,7 @@ x_hide_tip (bool delete)
#else /* not USE_GTK */
if (NILP (tip_frame)
|| (!delete
- && FRAMEP (tip_frame)
+ && !NILP (tip_frame)
&& FRAME_LIVE_P (XFRAME (tip_frame))
&& !FRAME_VISIBLE_P (XFRAME (tip_frame))))
return Qnil;
@@ -6788,7 +6788,7 @@ x_hide_tip (bool delete)
specbind (Qinhibit_redisplay, Qt);
specbind (Qinhibit_quit, Qt);
- if (FRAMEP (tip_frame))
+ if (!NILP (tip_frame))
{
struct frame *f = XFRAME (tip_frame);
@@ -6931,7 +6931,7 @@ Text larger than the specified size is clipped. */)
}
#endif /* USE_GTK */
- if (FRAMEP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame)))
+ if (!NILP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame)))
{
if (FRAME_VISIBLE_P (XFRAME (tip_frame))
&& EQ (frame, tip_last_frame)
@@ -7016,7 +7016,7 @@ Text larger than the specified size is clipped. */)
tip_last_string = string;
tip_last_parms = parms;
- if (!FRAMEP (tip_frame) || !FRAME_LIVE_P (XFRAME (tip_frame)))
+ if (NILP (tip_frame) || !FRAME_LIVE_P (XFRAME (tip_frame)))
{
/* Add default values to frame parameters. */
if (NILP (Fassq (Qname, parms)))
diff --git a/src/xmenu.c b/src/xmenu.c
index a6762236bc4..709e455dd05 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1603,6 +1603,14 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
STRINGP (help) ? help : Qnil);
if (prev_wv)
prev_wv->next = wv;
+ else if (!save_wv)
+ {
+ /* This call to 'abort' pacifies gcc 11.2.1 when Emacs
+ is configured with --enable-gcc-warnings. FIXME: If
+ save_wv can be null, do something better; otherwise,
+ explain why save_wv cannot be null. */
+ abort ();
+ }
else
save_wv->contents = wv;
if (!NILP (descrip))
diff --git a/src/xterm.c b/src/xterm.c
index ae3af598da6..89885e0d889 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4049,7 +4049,7 @@ x_delete_glyphs (struct frame *f, int n)
/* Like XClearArea, but check that WIDTH and HEIGHT are reasonable.
If they are <= 0, this is probably an error. */
-static ATTRIBUTE_UNUSED void
+MAYBE_UNUSED static void
x_clear_area1 (Display *dpy, Window window,
int x, int y, int width, int height, int exposures)
{
@@ -10133,8 +10133,9 @@ x_connection_closed (Display *dpy, const char *error_message, bool ioerror)
frame on it. */
dpyinfo->reference_count++;
dpyinfo->terminal->reference_count++;
+ if (ioerror)
+ dpyinfo->display = 0;
}
- if (ioerror) dpyinfo->display = 0;
/* First delete frames whose mini-buffers are on frames
that are on the dead display. */
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 9a1c9d659b4..ebedbaf45f2 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -69,6 +69,7 @@
(defvar tramp-connection-properties)
(defvar tramp-copy-size-limit)
(defvar tramp-display-escape-sequence-regexp)
+(defvar tramp-fuse-unmount-on-cleanup)
(defvar tramp-inline-compress-start-size)
(defvar tramp-persistency-file-name)
(defvar tramp-remote-path)
@@ -5884,10 +5885,7 @@ Use direct async.")
tramp-allow-unsafe-temporary-files
(inhibit-message t)
;; tramp-rclone.el and tramp-sshfs.el cache the mounted files.
- (tramp-cleanup-connection-hook
- (append
- (and (tramp--test-fuse-p) '(tramp-fuse-unmount))
- tramp-cleanup-connection-hook))
+ (tramp-fuse-unmount-on-cleanup t)
auto-save-default
noninteractive)
diff --git a/test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el b/test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el
index ec568093af2..14c8e845d11 100644
--- a/test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el
+++ b/test/lisp/progmodes/elisp-mode-resources/simple-shorthand-test.el
@@ -1,23 +1,31 @@
(defun f-test ()
- (let ((elisp-shorthands '(("foo-" . "bar-"))))
+ (let ((read-symbol-shorthands '(("foo-" . "bar-"))))
(with-temp-buffer
(insert "(foo-bar)")
(goto-char (point-min))
(read (current-buffer)))))
(defun f-test2 ()
- (let ((elisp-shorthands '(("foo-" . "bar-"))))
+ (let ((read-symbol-shorthands '(("foo-" . "bar-"))))
(read-from-string "(foo-bar)")))
(defun f-test3 ()
- (let ((elisp-shorthands '(("foo-" . "bar-"))))
+ (let ((read-symbol-shorthands '(("foo-" . "bar-"))))
(intern "foo-bar")))
(defvar f-test-complete-me 42)
+(elisp--foo-test3)
+
(defun #_f-test4--- () 84)
+(defmacro f-define-test-5 ())
+
+;; should be font locked with both shorthand
+;; highlighting _and_ macro highlighting.
+(f-define-test-5)
+
(when nil
(f-test3)
(f-test2)
@@ -26,5 +34,5 @@
;; Local Variables:
-;; elisp-shorthands: (("f-" . "elisp--foo-"))
+;; read-symbol-shorthands: (("f-" . "elisp--foo-"))
;; End:
diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el
index 7d30987176f..3856dcd717a 100644
--- a/test/lisp/progmodes/elisp-mode-tests.el
+++ b/test/lisp/progmodes/elisp-mode-tests.el
@@ -1015,7 +1015,7 @@ evaluation of BODY."
(shorthand-sname (format "s-%s" gsym))
(expected (intern (format "shorthand-longhand-%s" gsym))))
(cl-assert (not (intern-soft shorthand-sname)))
- (should (equal (let ((elisp-shorthands
+ (should (equal (let ((read-symbol-shorthands
'(("s-" . "shorthand-longhand-"))))
(with-temp-buffer
(insert shorthand-sname)
@@ -1029,7 +1029,7 @@ evaluation of BODY."
(shorthand-sname (format "s-%s" gsym))
(expected (intern (format "shorthand-longhand-%s" gsym))))
(cl-assert (not (intern-soft shorthand-sname)))
- (should (equal (let ((elisp-shorthands
+ (should (equal (let ((read-symbol-shorthands
'(("s-" . "shorthand-longhand-"))))
(car (read-from-string shorthand-sname)))
expected))
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 5c4e0b9de93..32c0bc3ed3c 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -769,15 +769,14 @@ See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=19350."
(ert-deftest subr-test-internal--format-docstring-line ()
(should
- (string= (let ((fill-column 60))
+ (string= (let ((fill-column 70))
(internal--format-docstring-line
- "Emacs is the advanced, extensible, customizable, \
-self-documenting editor. This manual describes how to edit with Emacs and \
-some of the ways to customize it; it corresponds to GNU Emacs version 28.1."))
- "Emacs is the advanced, extensible, customizable,
-self-documenting editor. This manual describes how to edit
-with Emacs and some of the ways to customize it; it
-corresponds to GNU Emacs version 28.1."))
+ "In addition to any hooks its parent mode might have run, this \
+mode runs the hook ‘foo-bar-baz-very-long-name-indeed-mode-hook’, as the final \
+or penultimate step during initialization."))
+ "In addition to any hooks its parent mode might have run, this mode
+runs the hook ‘foo-bar-baz-very-long-name-indeed-mode-hook’, as the
+final or penultimate step during initialization."))
(should-error (internal--format-docstring-line "foo\nbar")))
(ert-deftest test-ensure-list ()