1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

Merge remote-tracking branch 'savannah/master' into HEAD

This commit is contained in:
Andrea Corallo 2020-10-31 15:00:00 +00:00
commit f7f5d59ab4
297 changed files with 3204 additions and 1562 deletions

2
.gitignore vendored
View File

@ -153,7 +153,7 @@ test/manual/etags/regexfile
test/manual/etags/ETAGS
test/manual/etags/CTAGS
test/manual/indent/*.new
test/data/mml-sec/random_seed
test/lisp/gnus/mml-sec-resources/random_seed
# ctags, etags.
TAGS

View File

@ -9269,7 +9269,7 @@
This is related to the autogen.sh changes made by Paul Eggert in
commit d766ca8f (2016-02-01) and commit cedd7cad (2016-02-01), and to
my edits today to http://www.emacswiki.org/emacs/GitForEmacsDevs and
my edits today to https://www.emacswiki.org/emacs/GitForEmacsDevs and
to emacswiki.org/emacs/GitQuickStartForEmacsDevs. See also the thread
"Recommend these .gitconfig settings for git integrity." at
https://lists.gnu.org/r/emacs-devel/2016-01/threads.html#01802.
@ -13444,7 +13444,7 @@
(gdb-send): Recognize various ways of exiting from Python and
Guile interpreters and returning to GDB. For details, see
https://lists.gnu.org/r/emacs-devel/2015-12/msg00693.html
and http://stackoverflow.com/questions/31514741.
and https://stackoverflow.com/questions/31514741.
2015-12-16 Paul Eggert <eggert@cs.ucla.edu>
@ -23731,7 +23731,7 @@
* lisp/progmodes/etags.el (etags-tags-completion-table):
Allow even one non-regular character before the implicit tag name.
Reported at http://emacs.stackexchange.com/questions/15269/.
Reported at https://emacs.stackexchange.com/questions/15269/.
2015-09-06 Thomas Fitzsimmons <fitzsim@fitzsim.org>

View File

@ -44031,8 +44031,8 @@
* src/marker.c (buf_bytepos_to_charpos): Remove the assertion
regarding bytepos always at the head byte of a multibyte
sequence. For the reasons, see
http://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00100.html
http://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00102.html
https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00100.html
https://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00102.html
2019-03-05 Wilson Snyder <wsnyder@wsnyder.org>
@ -45541,7 +45541,7 @@
* lisp/startup.el (command-line): Pass 'early-init.el', with
an explicit .el extension, to load-user-init-file.
Reported by Radon Rosborough <radon.neon@gmail.com> in
http://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00314.html.
https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00314.html.
2019-02-15 Stefan Monnier <monnier@iro.umontreal.ca>
@ -50624,7 +50624,7 @@
the correct directory in emacs_wd, which is now initialized
way earlier in the startup process, when init_environment was
not yet called. For details, see the problems reported in
http://lists.gnu.org/archive/html/emacs-devel/2018-12/msg00068.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-12/msg00068.html.
Reported by Angelo Graziosi <angelo.g0@libero.it>.
2018-12-06 Juri Linkov <juri@linkov.net>
@ -52313,7 +52313,7 @@
* lib-src/emacsclient.c (set_local_socket): Don't ignore socket
ownership when run by root.
Ref: http://lists.gnu.org/r/emacs-devel/2018-11/msg00019.html
Ref: https://lists.gnu.org/r/emacs-devel/2018-11/msg00019.html
2018-11-13 Eli Zaretskii <eliz@gnu.org>
@ -57139,7 +57139,7 @@
alias for thai-iso8859-11. Instead, reinstate the original
definition of tis620-2533, but without eight-bit-control in
the :superset attribute. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00117.html
https://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00117.html
and the surrounding discussions.
* lisp/international/fontset.el (font-encoding-alist)
(font-encoding-charset-alist): Reinstate tis620-2533 charset.
@ -60017,7 +60017,7 @@
* src/w32proc.c (syms_of_ntproc) <w32-pipe-read-delay>: Set to
zero. For the details, see this discussion:
http://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00711.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00711.html.
* src/w32.c (_sys_read_ahead): Update the commentary for
w32-pipe-read-delay usage.
@ -62471,7 +62471,7 @@
* lisp/subr.el (string-to-unibyte): No longer obsolete. See the
emacs-devel discussion around this message:
http://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00656.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00656.html.
* etc/NEWS: Announce the change.
@ -63512,7 +63512,7 @@
* lisp/international/fontset.el (font-encoding-alist): Fix the
GB18030 entry to encode characters correctly when passing them to
the xfont back-end. (Bug#31315) See also
http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00754.html.
https://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00754.html.
2018-05-04 Noam Postavsky <npostavs@gmail.com>
@ -65267,7 +65267,7 @@
(eww-display-html): ... and don't get it here, because it's gone
by now.
Test URL: http://www.gnu.org/s/hyperbole/#summary
Test URL: https://www.gnu.org/s/hyperbole/#summary
2018-04-13 Robert Pluim <rpluim@gmail.com>
@ -70827,7 +70827,7 @@
TO_CHARPOS, but didn't yet produce glyphs for that buffer
position, because the last call to PRODUCE_GLYPHS at this position
was for an object other than the buffer. For further details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00537.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00537.html.
2018-01-19 Reuben Thomas <rrt@sc3d.org>
@ -80561,7 +80561,7 @@
* configure.ac: Add -Wabi to the list of disabled warning
options. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00123.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00123.html.
2018-08-10 Filipp Gunbin <fgunbin@fastmail.fm>
@ -80935,7 +80935,7 @@
* lisp/emacs-lisp/rx.el (rx): Clarify and improve the doc string.
For the details, see the discussion starting at
http://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00399.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00399.html.
2018-07-19 Eli Zaretskii <eliz@gnu.org>
@ -81072,7 +81072,7 @@
Improve documentation of Flyspell
For the background, see
http://lists.gnu.org/archive/html/help-gnu-emacs/2018-07/msg00099.html.
https://lists.gnu.org/archive/html/help-gnu-emacs/2018-07/msg00099.html.
* doc/emacs/fixit.texi (Spelling): Add a couple of caveats.
* lisp/textmodes/flyspell.el: Update commentary.
@ -81781,7 +81781,7 @@
* lisp/info.el: Explain in commentary why some commands start with
"info-" and others with "Info-". See also
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00482.html.
https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00482.html.
2018-06-13 Michael Albinus <michael.albinus@gmx.de>
@ -82336,7 +82336,7 @@
* lisp/international/fontset.el (font-encoding-alist): Fix the
GB18030 entry to encode characters correctly when passing them to
the xfont back-end. (Bug#31315) See also
http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00754.html.
https://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00754.html.
(cherry picked from commit bbe2cadc544e63e9378350621887f8fb9bbcc236)
@ -82460,7 +82460,7 @@
TO_CHARPOS, but didn't yet produce glyphs for that buffer
position, because the last call to PRODUCE_GLYPHS at this position
was for an object other than the buffer. For further details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00537.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00537.html.
(cherry picked from commit c0154ac7c3423f68d8f3a2e85a756c9759219039)
@ -83153,7 +83153,7 @@
(Note for Novices):
* doc/lispref/tips.texi (Key Binding Conventions): Fix use of
@key. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00390.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00390.html.
2018-04-19 Eli Zaretskii <eliz@gnu.org>
@ -83239,7 +83239,7 @@
* src/process.c (Fmake_pipe_process): Set up the decoding and
encoding buffers. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00295.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00295.html.
2018-04-13 Robert Pluim <rpluim@gmail.com>
@ -84015,7 +84015,7 @@
* doc/lispref/variables.texi (Local Variables): Make more clear
that local bindings of 'let' are in effect only within the body.
Suggested by Marcin Borkowski <mbork@mbork.pl>, see
http://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00217.html
https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00217.html
for the details.
* doc/emacs/programs.texi (Matching): Fix a typo. Reported by
@ -85790,7 +85790,7 @@
* doc/emacs/text.texi (Words): Improve wording. Reported by
Marcin Borkowski <mbork@mbork.pl> in
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00784.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00784.html.
2018-01-28 Martin Rudalics <rudalics@gmx.at>
@ -86006,7 +86006,7 @@
This is part two of a two part fix for the GTK scaling
problems. See the thread starting at
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00372.html
https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00372.html
for an explanation of why it has been added to Emacs 26.
* src/gtkutil.c (xg_set_geometry): Scale down the coordinates that we
@ -86019,7 +86019,7 @@
This is part one of a two part fix for the GTK scaling
problems. See the thread starting at
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00372.html
https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00372.html
for an explanation of why it has been added to Emacs 26.
* src/xfns.c (Fx_display_monitor_attributes_list): Take scaling factor
@ -86163,7 +86163,7 @@
being compiled is specified by an absolute file name. This avoids
problems with ACL copying from temporary-file-directory on
FreeBSD. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00513.html.
https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00513.html.
2018-01-19 Eli Zaretskii <eliz@gnu.org>
@ -86356,7 +86356,7 @@
* doc/lispref/variables.texi (File Local Variables): Mention the
autoload cookie as a means of defining safe values for variables.
See http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00261.html
See https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00261.html
for the details.
* doc/lispref/compile.texi (Compiler Errors): Document
'byte-compile-error-on-warn'.
@ -86750,7 +86750,7 @@
scroll-margin when scrolling down, i.e. moving window-start
towards the beginning of the buffer. Reported by zhang cc
<ccsmile2008@outlook.com> in
http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00894.html.
https://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00894.html.
2017-12-29 Eli Zaretskii <eliz@gnu.org>
@ -86991,7 +86991,7 @@
Clarify what selecting a window means for keyboard input, and that
input focus may need to be considered when selecting windows on
other frames. See
http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00372.html
https://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00372.html
for more details.
2017-12-22 Eli Zaretskii <eliz@gnu.org>
@ -87530,7 +87530,7 @@
* lisp/progmodes/prog-mode.el (prog-indentation-context):
Un-document all elements but the first.
(prog-widen): Remove.
(http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00321.html)
(https://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00321.html)
* doc/lispref/text.texi (Mode-Specific Indent): Update.
@ -87675,7 +87675,7 @@
Import the latest IVD_Sequences.txt
* admin/unidata/IVD_Sequences.txt: New version from
http://www.unicode.org/ivd/, the 2017-12-12 version of the Unicode
https://www.unicode.org/ivd/, the 2017-12-12 version of the Unicode
Ideographic Variation Database.
* src/macuvs.h: Regenerated.
@ -87989,7 +87989,7 @@
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Pass basename
of target-file to make-temp-file, in case target-file includes a
leading directory that might not exist under TMPDIR. See
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00680.html
https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00680.html
for the details.
2017-12-02 Michael Albinus <michael.albinus@gmx.de>
@ -88670,7 +88670,7 @@
* lisp/calc/calc-aent.el (math-read-token): Make sure the match
against "0[xX][0-9a-fA-F]+" is found at math-exp-pos. See
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00174.html
https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00174.html
for the details.
2017-11-18 Eli Zaretskii <eliz@gnu.org>
@ -88984,7 +88984,7 @@
* lisp/files.el (find-file, find-file-other-window)
(find-file-other-frame): Mention file-name-at-point-functions in
the doc string. Reported by Florian Weimer <fw@deneb.enyo.de> in
http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00224.html.
https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00224.html.
* doc/emacs/mini.texi (Minibuffer History): Document
file-name-at-point-functions and its effect on M-n when typing
@ -97350,7 +97350,7 @@
Improve make-temp-file performance on local files
For the motivation behind this patch, please see Bug#28023 and:
http://emacshorrors.com/posts/make-temp-name.html
https://emacshorrors.com/posts/make-temp-name.html
Although, given the recent changes to Tramp, the related security
problem in make-temp-file is already fixed, make-temp-file still has
several unnecessary system calls. In the typical case on GNU/Linux,
@ -104823,7 +104823,7 @@
Remove s_client usage from tls.el
* lisp/net/tls.el (tls-program, tls-checktrust): Remove s_client.
Ref http://bugs.debian.org/766397
Ref https://bugs.debian.org/766397
https://lists.gnu.org/r/emacs-devel/2014-10/msg00803.html
@ -107262,7 +107262,7 @@
Remove s_client usage from tls.el
* lisp/net/tls.el (tls-program, tls-checktrust): Remove s_client.
Ref http://bugs.debian.org/766397
Ref https://bugs.debian.org/766397
https://lists.gnu.org/r/emacs-devel/2014-10/msg00803.html
2017-04-25 Glenn Morris <rgm@gnu.org>
@ -107708,7 +107708,7 @@
* lisp/emacs-lisp/ert.el (ert--expand-should-1):
Avoid errors related to undefined byte-compile-macro-environment.
Somehow masked until very recently because loading seq (eg)
loads bytecomp. http://hydra.nixos.org/build/51730765
loads bytecomp. https://hydra.nixos.org/build/51730765
2017-04-18 Eli Zaretskii <eliz@gnu.org>
@ -108380,7 +108380,7 @@
* test/lisp/emacs-lisp/package-tests.el (with-package-test):
Also bind package-gnupghome-dir, see eg
http://hydra.nixos.org/build/51462182 .
https://hydra.nixos.org/build/51462182 .
2017-04-11 Martin Rudalics <rudalics@gmx.at>
@ -113197,7 +113197,7 @@
The [5ec3a584: Generate upcase and downcase tables from Unicode data]
commit broke bootstrap from a truly clean tree (e.g. a fresh clone or
one created with make extraclean), see
<http://hydra.nixos.org/build/48774928>.
<https://hydra.nixos.org/build/48774928>.
The failure was caused by characters.el trying to read Unicode
property tables which arent available so early in the build process.
@ -122075,7 +122075,7 @@
Support zstd compressed files
* lisp/jka-cmpr-hook.el (jka-compr-compression-info-list): Add
zstd compression info: <http://facebook.github.io/zstd/>.
zstd compression info: <https://facebook.github.io/zstd/>.
(jka-compr-mode-alist-additions): Handle .tzst suffix for zstd
compressed tar archives. (Bug#24853)

View File

@ -147,7 +147,9 @@ lisp/ps-mule.el defines the *.bdf font files required for printing
each character set.
The intlfonts distribution contains its own installation instructions,
in the intlfonts/README file.
in the intlfonts/README file. See also the Emacs Frequently Asked
Questions info pages "(efaq) How to add fonts" for installation
instructions.
* Image support libraries

View File

@ -1629,10 +1629,10 @@
2010-09-05 Juanma Barranquero <lekktu@gmail.com>
* unidata/BidiMirroring.txt: Update from
http://www.unicode.org/Public/6.0.0/ucd/BidiMirroring-6.0.0d2.txt
https://www.unicode.org/Public/6.0.0/ucd/BidiMirroring-6.0.0d2.txt
* unidata/UnicodeData.txt: Update from
http://www.unicode.org/Public/6.0.0/ucd/UnicodeData-6.0.0d7.txt
https://www.unicode.org/Public/6.0.0/ucd/UnicodeData-6.0.0d7.txt
2010-08-09 Andreas Schwab <schwab@linux-m68k.org>
@ -1668,7 +1668,7 @@
* unidata/bidimirror.awk: New file.
* unidata/BidiMirroring.txt: New file from
http://www.unicode.org/Public/6.0.0/ucd/BidiMirroring-6.0.0d1.txt.
https://www.unicode.org/Public/6.0.0/ucd/BidiMirroring-6.0.0d1.txt.
* unidata/Makefile.in (../../src/bidimirror.h): New target.
(all): Depend on ../../src/biditype.h and ../../src/bidimirror.h.
@ -1685,7 +1685,7 @@
2010-06-09 Juanma Barranquero <lekktu@gmail.com>
* unidata/UnicodeData.txt: Update from
http://www.unicode.org/Public/6.0.0/ucd/UnicodeData-6.0.0d5.txt
https://www.unicode.org/Public/6.0.0/ucd/UnicodeData-6.0.0d5.txt
2010-05-27 Glenn Morris <rgm@gnu.org>
@ -2031,7 +2031,7 @@
* unidata/unidata-gen.el: New file.
* unidata/UnicodeData.txt: New file. Copied from
http://www.unicode.org on 2006-05-23.
https://www.unicode.org on 2006-05-23.
* unidata/.cvsignore: New file.

View File

@ -20,7 +20,7 @@ Available at:
* PTCP154
Available at:
<http://www.iana.org/assignments/charset-reg/PTCP154>
<https://www.iana.org/assignments/charset-reg/PTCP154>
* Uni2JIS
@ -50,8 +50,8 @@ Available at:
* CP720.map and CP858.map
Created manually by looking at these pages:
<http://en.wikipedia.org/wiki/Code_page_720>.
<http://en.wikipedia.org/wiki/Code_page_859>.
<https://en.wikipedia.org/wiki/Code_page_720>.
<https://en.wikipedia.org/wiki/Code_page_859>.
The text in that page is under the terms of the GNU Free Documentation
License.

View File

@ -244,6 +244,7 @@ point vertically in the window, but there are several ways to alter
this behavior.
@vindex scroll-conservatively
@vindex scroll-minibuffer-conservatively
If you set @code{scroll-conservatively} to a small number @var{n},
then moving point just a little off the screen (no more than @var{n}
lines) causes Emacs to scroll just enough to bring point back on
@ -255,6 +256,9 @@ moves; Emacs always scrolls text just enough to bring point into view,
either at the top or bottom of the window depending on the scroll
direction. By default, @code{scroll-conservatively} is@tie{}0, which
means to always center point in the window.
This said, in minibuffer windows, scrolling is always conservative by
default because @code{scroll-minibuffer-conservatively} is non-nil,
which takes precedence over @code{scroll-conservatively}.
@vindex scroll-step
Another way to control automatic scrolling is to customize the
@ -1173,31 +1177,34 @@ right-to-left paragraphs.
@cindex mode, display-fill-column-indicator
@findex display-fill-column-indicator-mode
@findex global-display-fill-column-indicator-mode
Emacs can add an indicator to display a fill column position. The
fill column indicator is a useful functionality especially in
@code{prog-mode} to indicate the position of a specific column.
Emacs can display an indication of the @code{fill-column} position
(@pxref{Fill Commands}). The fill-column indicator is a useful
functionality especially in @code{prog-mode} and its descendants
(@pxref{Major Modes}) to indicate the position of a specific column
that has some special meaning for formatting the source code of a
program.
You can set the buffer-local variables
To activate the fill-column indication display, use the minor modes
@w{@kbd{M-x display-fill-column-indicator-mode}} and
@w{@kbd{M-x global-display-fill-column-indicator-mode}}, which enable
the indicator locally or globally, respectively.
Alternatively, you can set the two buffer-local variables
@code{display-fill-column-indicator} and
@code{display-fill-column-indicator-character} to activate the
indicator and control how it looks, respectively.
indicator and control the character used for the indication. Note
that both variables must be non-@code{nil} for the indication to be
displayed. (Turning on the minor mode sets both these variables.)
Alternatively you can type @w{@kbd{M-x display-fill-column-indicator-mode}}
or @w{@kbd{M-x global-display-fill-column-indicator-mode}} which
enables the indicator locally or globally, respectively, and also
chooses the character to use if none is already set. It is possible
to use the first one to activate the indicator in a hook and the
second one to enable it globally.
There are 2 buffer local variables and 1 face to customize this mode:
There are 2 buffer local variables and a face to customize this mode:
@table @code
@item display-fill-column-indicator-column
@vindex display-fill-column-indicator-column
Specifies the column number where the indicator should be set. It can
take positive numerical values for the column or the special value
@code{t} which means that the variable @code{fill-column} will be
used.
take positive numerical values for the column, or the special value
@code{t}, which means that the value of the variable
@code{fill-column} will be used.
Any other value disables the indicator. The default value is @code{t}.
@ -1205,18 +1212,18 @@ Any other value disables the indicator. The default value is @code{t}.
@vindex display-fill-column-indicator-character
Specifies the character used for the indicator. This character can be
any valid character including Unicode ones if the font supports them.
When the mode is enabled through the functions
@code{display-fill-column-indicator-mode} or
@code{global-display-fill-column-indicator-mode}, the initialization
functions check if this variable is non-@code{nil}, otherwise the
initialization tries to set it to @code{U+2502} or @samp{|}.
The value @code{nil} disables the indicator. When the mode is enabled
through the functions @code{display-fill-column-indicator-mode} or
@code{global-display-fill-column-indicator-mode}, they will use the
character specified by this variable, if it is non-@code{nil};
otherwise Emacs will use the character @samp{U+2502 VERTICAL LINE},
falling back to @samp{|} if @code{U+2502} cannot be displayed.
@item fill-column-indicator
@vindex fill-column-indicator
Specifies the face used to display the indicator. It inherits its
default values from the face @code{shadow} but without background
color. To change the indicator color you need only set the foreground
default values from the face @code{shadow}, but without background
color. To change the indicator color, you need only set the foreground
color of this face.
@end table
@ -1605,7 +1612,8 @@ can cause problems if they are entered into a buffer without your
realization, e.g., by yanking; for instance, source code compilers
typically do not treat non-@acronym{ASCII} spaces as whitespace
characters. To deal with this problem, Emacs displays such characters
specially: it displays @code{U+00A0} (no-break space) with the
specially: it displays @code{U+00A0} (no-break space) and other
characters from the Unicode horizontal space class with the
@code{nobreak-space} face, and it displays @code{U+00AD} (soft
hyphen), @code{U+2010} (hyphen), and @code{U+2011} (non-breaking
hyphen) with the @code{nobreak-hyphen} face. To disable this, change

View File

@ -1629,6 +1629,10 @@ Convert the entire buffer to unified diff format
unified format to context format. When the mark is active, convert
only the hunks within the region.
@item C-c C-l
@findex diff-refresh-hunk
Re-generate the current hunk (@code{diff-refresh-hunk}).
@item C-c C-w
@findex diff-ignore-whitespace-hunk
Re-generate the current hunk, disregarding changes in whitespace

View File

@ -2508,16 +2508,22 @@ button-down events entirely. It also reshuffles focus events and
miscellaneous window events so that they never appear in a key sequence
with any other events.
@cindex @code{tab-line} prefix key
@cindex @code{header-line} prefix key
@cindex @code{mode-line} prefix key
@cindex @code{vertical-line} prefix key
@cindex @code{horizontal-scroll-bar} prefix key
@cindex @code{vertical-scroll-bar} prefix key
@cindex @code{menu-bar} prefix key
@cindex @code{tab-bar} prefix key
@cindex mouse events, in special parts of frame
When mouse events occur in special parts of a window, such as a mode
@cindex @code{tab-line}, prefix key
@cindex @code{header-line}, prefix key
@cindex @code{mode-line}, prefix key
@cindex @code{vertical-line}, prefix key
@cindex @code{horizontal-scroll-bar}, prefix key
@cindex @code{vertical-scroll-bar}, prefix key
@cindex @code{menu-bar}, prefix key
@cindex @code{tab-bar}, prefix key
@cindex @code{left-margin}, prefix key
@cindex @code{right-margin}, prefix key
@cindex @code{left-fringe}, prefix key
@cindex @code{right-fringe}, prefix key
@cindex @code{right-divider}, prefix key
@cindex @code{bottom-divider}, prefix key
@cindex mouse events, in special parts of window or frame
When mouse events occur in special parts of a window or frame, such as a mode
line or a scroll bar, the event type shows nothing special---it is the
same symbol that would normally represent that combination of mouse
button and modifier keys. The information about the window part is kept
@ -2525,9 +2531,11 @@ elsewhere in the event---in the coordinates. But
@code{read-key-sequence} translates this information into imaginary
prefix keys, all of which are symbols: @code{tab-line}, @code{header-line},
@code{horizontal-scroll-bar}, @code{menu-bar}, @code{tab-bar}, @code{mode-line},
@code{vertical-line}, and @code{vertical-scroll-bar}. You can define
meanings for mouse clicks in special window parts by defining key
sequences using these imaginary prefix keys.
@code{vertical-line}, @code{vertical-scroll-bar}, @code{left-margin},
@code{right-margin}, @code{left-fringe}, @code{right-fringe},
@code{right-divider}, and @code{bottom-divider}. You can define meanings for
mouse clicks in special window parts by defining key sequences using these
imaginary prefix keys.
For example, if you call @code{read-key-sequence} and then click the
mouse on the window's mode line, you get two events, like this:

View File

@ -8037,7 +8037,7 @@ positions do not increase monotonically with string or buffer
position. In performing this @dfn{bidirectional reordering}, Emacs
follows the Unicode Bidirectional Algorithm (a.k.a.@: @acronym{UBA}),
which is described in Annex #9 of the Unicode standard
(@url{http://www.unicode.org/reports/tr9/}). Emacs provides a ``Full
(@url{https://www.unicode.org/reports/tr9/}). Emacs provides a ``Full
Bidirectionality'' class implementation of the @acronym{UBA},
consistent with the requirements of the Unicode Standard v9.0. Note,
however, that the way Emacs displays continuation lines when text

View File

@ -3526,6 +3526,13 @@ This abnormal hook exists for the benefit of packages like
@file{xt-mouse.el} that need to do mouse handling at the Lisp level.
@end defvar
@defvar tty-menu-calls-mouse-position-function
If non-@code{nil}, TTY menus will call @code{mouse-position-function}
as described above. This exists for cases where
@code{mouse-position-function} is not safe to be called by the TTY
menus, such as if it could trigger redisplay.
@end defvar
@defun set-mouse-position frame x y
This function @dfn{warps the mouse} to position @var{x}, @var{y} in
frame @var{frame}. The arguments @var{x} and @var{y} are integers,

View File

@ -2501,8 +2501,10 @@ frame is the buffer whose contents will be shown the next time that
window is redisplayed. The function is expected to fit the frame to
the buffer in some appropriate way.
Any other non-@code{nil} value means to resize minibuffer-only frames
by calling @code{fit-frame-to-buffer} (@pxref{Resizing Windows}).
Any other non-@code{nil} value means to resize minibuffer-only frames by
calling @code{fit-mini-frame-to-buffer}, a function that behaves like
@code{fit-frame-to-buffer} (@pxref{Resizing Windows}) but does not strip
leading or trailing empty lines from the buffer text.
@end defopt

View File

@ -1806,10 +1806,11 @@ don't need any.
@defmac define-globalized-minor-mode global-mode mode turn-on keyword-args@dots{} body@dots{}
This defines a global toggle named @var{global-mode} whose meaning is
to enable or disable the buffer-local minor mode @var{mode} in all
buffers. It also executes the @var{body} forms. To turn on the minor
mode in a buffer, it uses the function @var{turn-on}; to turn off the
minor mode, it calls @var{mode} with @minus{}1 as argument.
to enable or disable the buffer-local minor mode @var{mode} in all (or
some; see below) buffers. It also executes the @var{body} forms. To
turn on the minor mode in a buffer, it uses the function
@var{turn-on}; to turn off the minor mode, it calls @var{mode} with
@minus{}1 as argument.
Globally enabling the mode also affects buffers subsequently created
by visiting files, and buffers that use a major mode other than
@ -1830,6 +1831,38 @@ also define a non-globalized version, so that people can use (or
disable) it in individual buffers. This also allows them to disable a
globally enabled minor mode in a specific major mode, by using that
mode's hook.
If given a @code{:predicate} keyword, a user option called the same as
the global mode variable, but with @code{-modes} instead of
@code{-mode} at the end will be created. The variable is used as a
predicate that specifies which major modes the minor mode should be
activated in. Valid values include @code{t} (use in all major modes,
@code{nil} (use in no major modes), or a list of mode names (or
@code{(not mode-name ...)}) elements (as well as @code{t} and
@code{nil}).
@example
(c-mode (not mail-mode message-mode) text-mode)
@end example
This means ``use in modes derived from @code{c-mode}, and not in
modes derived from @code{message-mode} or @code{mail-mode}, but do use
in modes derived from @code{text-mode}, and otherwise no other
modes''.
@example
((not c-mode) t)
@end example
This means ``don't use modes derived from @code{c-mode}, but use
everywhere else''.
@example
(text-mode)
@end example
This means ``use in modes derived from @code{text-mode}, but nowhere
else''. (There's an implicit @code{nil} element at the end.)
@end defmac

View File

@ -1901,7 +1901,10 @@ The integer number of hours.
The integer number of minutes.
@item %s
@itemx %S
The integer number of seconds.
The number of seconds. If the optional @samp{,} parameter is used,
it's a floating point number, and the number after the @samp{,}
specifies how many decimals to be used. @samp{%,2s} means ``use two
decimals''.
@item %z
Non-printing control flag. When it is used, other specifiers must be
given in the order of decreasing size, i.e., years before days, hours

View File

@ -2566,7 +2566,7 @@ the beginning of the line (if @var{nochange-regexp} is non-@code{nil}).
This section describes two commands that indent the current line
based on the contents of previous lines.
@deffn Command indent-relative &optional unindented-ok
@deffn Command indent-relative &optional first-only unindented-ok
This command inserts whitespace at point, extending to the same
column as the next @dfn{indent point} of the previous nonblank line. An
indent point is a non-whitespace character following whitespace. The
@ -2582,6 +2582,9 @@ nothing (if @var{unindented-ok} is non-@code{nil}) or calls
of the last column of a short line of text, this command ordinarily
moves point to the next tab stop by inserting whitespace.
If @var{first-only} is non-@code{nil}, only the first indent point is
considered.
The return value of @code{indent-relative} is unpredictable.
In the following example, point is at the beginning of the second

View File

@ -94,6 +94,11 @@ it to Emacs. If and when we do, we can change the name easily enough.
If one prefix is insufficient, your package can use two or three
alternative common prefixes, so long as they make sense.
@item
We recommend enabling @code{lexical-binding} in new code, and
converting existing Emacs Lisp code to enable @code{lexical-binding}
if it doesn't already. @xref{Using Lexical Binding}.
@item
Put a call to @code{provide} at the end of each separate Lisp file.
@xref{Named Features}.
@ -990,7 +995,7 @@ explains these conventions, starting with an example:
@smallexample
@group
;;; foo.el --- Support for the Foo programming language
;;; foo.el --- Support for the Foo programming language -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2020 Your Name
@end group
@ -1013,14 +1018,14 @@ explains these conventions, starting with an example:
The very first line should have this format:
@example
;;; @var{filename} --- @var{description}
;;; @var{filename} --- @var{description} -*- lexical-binding: t; -*-
@end example
@noindent
The description should be contained in one line. If the file
needs a @samp{-*-} specification, put it after @var{description}.
If this would make the first line too long, use a Local Variables
section at the end of the file.
The description should be contained in one line. If the file needs to
set more variables in the @samp{-*-} specification, add it after
@code{lexical-binding}. If this would make the first line too long, use
a Local Variables section at the end of the file.
The copyright notice usually lists your name (if you wrote the
file). If you have an employer who claims copyright on your work, you

View File

@ -1317,9 +1317,9 @@ a Unix shell and @command{make} are used for byte-compilation:
@example
$ rm *.elc # force recompilation
$ EMACS_GENERATE_DYNVARS=1 make # generate .dynvars
$ cat *.dynvars > ~/my.dynvars # combine .dynvars
$ cat *.dynvars > ~/my-dynvars # combine .dynvars
$ rm *.elc # force recompilation
$ EMACS_DYNVARS_FILE=~/my.dynvars make # perform checks
$ EMACS_DYNVARS_FILE=~/my-dynvars make # perform checks
@end example
@node Buffer-Local Variables

View File

@ -1188,9 +1188,9 @@ MS Windows, but this has still been insufficient to keep up with
changes in printing technology from text and postscript based printers
connected via ports that can be accessed directly, to graphical
printers that are only accessible via USB@. For details, see
@uref{http://www.emacswiki.org/emacs/PrintingFromEmacs, Emacs
Wiki}, @uref{http://www.emacswiki.org/emacs/PrintWithWebBrowser}, and
@uref{http://www.emacswiki.org/emacs/PrintFromWindowsExplorer}.
@uref{https://www.emacswiki.org/emacs/PrintingFromEmacs, Emacs
Wiki}, @uref{https://www.emacswiki.org/emacs/PrintWithWebBrowser}, and
@uref{https://www.emacswiki.org/emacs/PrintFromWindowsExplorer}.
@c ------------------------------------------------------------
@node Sub-processes
@ -1414,7 +1414,7 @@ continue to use bash as your subshell:
@cindex cygwin mount points, using within Emacs
The package
@uref{http://www.emacswiki.org/emacs/cygwin-mount.el,
@uref{https://www.emacswiki.org/emacs/cygwin-mount.el,
cygwin-mount.el} teaches Emacs about Cygwin mount points.
@node Dired ls
@ -1793,7 +1793,7 @@ do not need to add its installation directory to the @env{PATH}.
@cindex Emacs distribution, checking digital signatures
GNU Privacy Guard is a Free replacement for PGP, with Windows binaries
available. See @uref{http://www.gnupg.org/}.
available. See @uref{https://www.gnupg.org/}.
@node Mouse wheel
@section Why doesn't my wheel mouse work in Emacs?
@ -2131,7 +2131,7 @@ suggestions} for improving the interaction of perldb and Emacs.
@cindex subprocesses, cygwin tools
@vindex exec-path
@uref{http://www.cygwin.com/}.
@uref{https://www.cygwin.com/}.
Cygwin is a popular complete POSIX emulation environment for Windows.
Most of its tools can be used with Emacs, and it covers a wide range
@ -2281,7 +2281,7 @@ and you can view the FAQ by typing @kbd{C-h C-f}. Other resources include:
@itemize
@item @uref{https://www.gnu.org/software/emacs/, The Emacs homepage}
@item @uref{https://www.gnu.org/software/emacs/manual/, Other Emacs manuals}
@item @uref{http://www.emacswiki.org/, Emacs Wiki}
@item @uref{https://www.emacswiki.org/, Emacs Wiki}
@end itemize
@node Mailing lists

View File

@ -400,7 +400,7 @@ archive can be browsed over the web at
@uref{https://lists.gnu.org/r/, the GNU mail archive}.
Web-based Usenet search services, such as
@uref{http://groups.google.com/groups/dir?q=gnu&, Google}, also
@uref{https://groups.google.com/groups/dir?q=gnu&, Google}, also
archive the @code{gnu.*} groups.
@node Reporting bugs
@ -865,7 +865,7 @@ Bulletin}, are at
@uref{https://www.gnu.org/bulletins/bulletins.html} and
@uref{http://www.cs.pdx.edu/~trent/gnu/gnu.html}
@uref{https://www.cs.pdx.edu/~trent/gnu/gnu.html}
@node Help installing Emacs
@section Where can I get help in installing Emacs?
@ -3613,7 +3613,7 @@ For a list of other MS-DOS implementations of Emacs (and Emacs
look-alikes), consult the list of ``Emacs implementations and literature,''
available at
@uref{http://www.finseth.com/emacs.html}
@uref{https://www.finseth.com/emacs.html}
Note that while many of these programs look similar to Emacs, they often
lack certain features, such as the Emacs Lisp extension language.

View File

@ -247,15 +247,15 @@ Here are a number of screenshots showing IDLWAVE in action:
@itemize @bullet
@item
@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_nav.gif,An IDLWAVE buffer}
@uref{https://github.com/jdtsmith/idlwave/screenshots/emacs_21_nav.gif,An IDLWAVE buffer}
@item
@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_keys.gif,A keyword being completed}
@uref{https://github.com/jdtsmith/idlwave/screenshots/emacs_21_keys.gif,A keyword being completed}
@item
@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_help.gif,Online help text.}
@uref{https://github.com/jdtsmith/idlwave/screenshots/emacs_21_help.gif,Online help text.}
@item
@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_ri.gif,Routine information displayed}
@uref{https://github.com/jdtsmith/idlwave/screenshots/emacs_21_ri.gif,Routine information displayed}
@item
@uref{http://github.com/jdtsmith/idlwave/screenshots/emacs_21_bp.gif,Debugging code
@uref{https://github.com/jdtsmith/idlwave/screenshots/emacs_21_bp.gif,Debugging code
stopped at a breakpoint}
@end itemize
@end ifnottex

View File

@ -3753,7 +3753,7 @@ A link should be enclosed in double brackets and may contain
descriptive text to be displayed instead of the URL (see @ref{Link Format}), for example:
@example
[[http://www.gnu.org/software/emacs/][GNU Emacs]]
[[https://www.gnu.org/software/emacs/][GNU Emacs]]
@end example
@ -22361,7 +22361,7 @@ Marco Wahl wrote @samp{ol-eww.el}.
@display
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
@uref{http://fsf.org/}
@uref{https://fsf.org/}
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@ -22786,7 +22786,7 @@ The Free Software Foundation may publish new, revised versions of
the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
@uref{http://www.gnu.org/copyleft/}.
@uref{https://www.gnu.org/copyleft/}.
Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered

View File

@ -1389,7 +1389,7 @@ bugs, please report them separately.
If you have problems using PCL-CVS or other questions, send them to
the @url{https://lists.gnu.org/mailman/listinfo/help-gnu-emacs,
help-gnu-emacs mailing list}. This is a good place to get help, as is
the @url{http://lists.nongnu.org/mailman/listinfo/info-cvs, info-cvs list}.
the @url{https://lists.nongnu.org/mailman/listinfo/info-cvs, info-cvs list}.
If you have ideas for improvements, or if you have written some
extensions to this package, we would like to hear from you. We hope that

View File

@ -94,7 +94,7 @@ and that you are familiar with its basic functions.
By default, PGG uses GnuPG@. If you are new to such a system, I
recommend that you should look over the GNU Privacy Handbook (GPH)
which is available at @uref{http://www.gnupg.org/documentation/}.
which is available at @uref{https://www.gnupg.org/documentation/}.
When using GnuPG, we recommend the use of the @code{gpg-agent}
program, which is distributed with versions 2.0 and later of GnuPG@.

View File

@ -40,6 +40,8 @@ Danish (dansk) Hej / Goddag / Halløj
Dutch (Nederlands) Hallo / Dag
Efik /ˈɛfɪk/ Mɔkɔm
Egyptian Hieroglyphs (𓂋𓐰𓏤𓈖𓆎𓅓𓏏𓐰𓊖) 𓅓𓊵𓐰𓐷𓏏𓊪𓐸, 𓇍𓇋𓂻𓍘𓇋
Emacs emacs --no-splash -f view-hello-file
Emoji 👋
@ -59,7 +61,7 @@ Hindi (हिंदी) नमस्ते / नमस्कार ।
Inuktitut (ᐃᓄᒃᑎᑐᑦ) ᐊᐃ
Italian (italiano) Ciao / Buon giorno
Javanese (ꦧꦱꦗꦮ) console.log("ꦱꦸꦒꦼꦁꦱꦶꦪꦁ");
Javanese (ꦧꦱꦗꦮꦶ) console.log("ꦲꦭꦺꦴ");
Kannada (ಕನ್ನಡ) ನಮಸ್ಕಾರ
Khmer (ភាសាខ្មែរ) ជំរាបសួរ
Lao (ພາສາລາວ) ສະບາຍດີ / ຂໍໃຫ້ໂຊກດີ
@ -124,7 +126,7 @@ along with GNU Emacs. If not, see <<https://www.gnu.org/licenses/>.
;;; Local Variables:
;;; tab-width: 32
;;; tab-width: 42
;;; bidi-display-reordering: t
;;; coding: utf-8
;;; inhibit-compacting-font-caches: t

View File

@ -85,6 +85,9 @@ useful on systems such as FreeBSD which ships only with "etc/termcap".
* Changes in Emacs 28.1
** Minibuffer scrolling is now conservative by default.
This is controlled by the new variable 'scroll-minibuffer-conservatively'.
+++
** New system for displaying documentation for groups of function.
This can either be used by saying 'M-x shortdoc-display-group' and
@ -163,6 +166,12 @@ your init file:
(setq frame-title-format '(multiple-frames "%b"
("" invocation-name "@" system-name)))
+++
** 'nobreak-char-display' now also affects all non-ASCII space characters.
Previously, this was limited only to NO-BREAK-SPACE and hyphen
characters. Now it also covers the rest of the non-ASCII Unicode
space characters.
* Editing Changes in Emacs 28.1
@ -201,6 +210,7 @@ It moves point to the line relative to the accessible portion of the
narrowed buffer. 'M-g M-g' in Info is rebound to this command.
When 'widen-automatically' is non-nil, 'goto-line' widens the narrowed
buffer to be able to move point to the inaccessible portion.
'goto-line-relative' is bound to 'C-x n g'.
+++
** When 'suggest-key-bindings' is non-nil, the completion list of 'M-x'
@ -239,6 +249,13 @@ the buffer cycles the whole buffer between "only top-level headings",
* Changes in Specialized Modes and Packages in Emacs 28.1
** Python mode
*** 'C-c C-r' can now be used on arbitrary regions.
The command previously extended the start of the region to the start
of the line, but will now actually send the marked region, as
documented.
** Ruby mode
*** 'ruby-use-smie' is declared obsolete.
@ -403,6 +420,14 @@ their 'default-directory' under VC.
*** New command 'vc-dir-root' uses the root directory without asking.
---
*** The responsible VC backend is now the most specific one.
'vc-responsible-backend' loops over the backends in
'vc-handled-backends' to determine which backend is responsible for a
specific (unregistered) file. Previously the first matching backend
was chosen, but now the one with the most specific path is chosen (in
case there's a directory handled by one backend inside another).
*** New commands 'vc-dir-mark-registered-files' (bound to '* r') and
'vc-dir-mark-unregistered-files'.
@ -575,6 +600,9 @@ skipped.
** Help
---
*** 'g' ('revert-buffer') in 'help-mode' no longer requires confirmation.
+++
*** New command 'describe-keymap' describes keybindings in a keymap.
@ -636,7 +664,7 @@ definition.
** ElDoc
+++
*** New user option 'eldoc-display-truncation-message'.
*** New user option 'eldoc-echo-area-display-truncation-message'.
If non-nil (the default), eldoc will display a message saying
something like "(Documentation truncated. Use `M-x eldoc-doc-buffer'
to see rest)" when a message has been truncated. If nil, truncated
@ -650,6 +678,13 @@ may arrange for it to be produced asynchronously. The results of all
doc string functions are accessible to the user through the user
option 'eldoc-documentation-strategy'.
*** New hook 'eldoc-display-functions'.
This hook is intended to be used for displaying doc string. The
functions receive the docstrings composed according to
`eldoc-documentation-strategy' and are tasked with displaying it to
the user. Examples of such functions would use the echo area, a
separate buffer or a tooltip.
+++
*** New user option 'eldoc-documentation-strategy'.
The built-in choices available for this user option let users compose
@ -1176,8 +1211,31 @@ them, using the DEL and INS buttons respectively. This is useful in
Custom buffers, for example, to change the order of the elements in a
list.
** Diff
---
*** New 'diff-mode' font locking face 'diff-error'.
This face is used for error messages from diff.
+++
*** New command 'diff-refresh-hunk'.
This new command (bound to 'C-c C-l') regenerates the current hunk.
** Miscellaneous
+++
*** 'format-seconds' can now be used for sub-second times.
The new optional "," parameter has been added, and
(format-seconds "%mm %,1ss" 66.4) will now result in "1m 6.4s".
---
*** 'global-display-fill-column-indicator-mode' skips some buffers.
By default, turning on 'global-display-fill-column-indicator-mode'
doesn't turn on 'display-fill-column-indicator-mode' in special-mode
buffers. This can be controlled by customizing the variable
'global-display-fill-column-indicator-modes'.
---
*** New user option 'compilation-search-all-directories'.
When doing parallel builds, directories and compilation errors may
@ -1264,10 +1322,6 @@ number [10]", or not have the default displayed at all, like "Enter a
number". (This requires that all callers are altered to use
'format-prompt', though.)
---
*** New 'diff-mode' font locking face 'diff-error'.
This face is used for error messages from diff.
+++
*** New global mode 'global-goto-address-mode'.
This will enable 'goto-address-mode' in all buffers.
@ -1325,6 +1379,16 @@ to 'tab-bar-new-tab-choice' for new tabs to show the bookmark list.
'gomoku-move-sw' and 'gomoku-move-ne' now work correctly, and
horizontal movements now stop at the edge of the board.
** xterm-mouse mode
---
*** TTY menu navigation is now supported in 'xterm-mouse-mode'.
TTY menus support mouse navigation and selection when xterm-mouse-mode
is active. When run on a terminal, clicking on the menu bar with the
mouse now pops up a TTY menu by default instead of running the command
'tmm-menubar'. To restore the old behavior, set the variable
'tty-menu-open-use-tmm' to non-nil.
** xwidget-webkit mode
*** New xwidget commands.
@ -1599,6 +1663,11 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el.
* Lisp Changes in Emacs 28.1
+++
** 'define-globalized-minor-mode' now takes a :predicate parameter.
This can be used to control which major modes the minor mode should be
used in.
+++
** 'truncate-string-ellipsis' now uses '…' by default.
Modes that use 'truncate-string-to-width' with non-nil, non-string
@ -1748,6 +1817,14 @@ convert them to a list '(R G B)' of primary color values.
This user option can be one of the predefined styles or a function to
personalize the uniquified buffer name.
+++
** New variable 'tty-menu-calls-mouse-position-function'.
This controls whether 'mouse-position-function' is called by functions
that retrieve the mouse position when that happens during TTY menu
handling. Lisp programs that set 'mouse-position-function' should
also set this variable non-nil if they are compatible with the tty
menu handling.
+++
** 'inhibit-nul-byte-detection' is renamed to 'inhibit-null-byte-detection'.
@ -1761,6 +1838,11 @@ file can affect code in another. For details, see the manual section
---
** 'unload-feature' now also tries to undo additions to buffer-local hooks.
---
** Some functions are no longer considered safe by 'unsafep':
'replace-regexp-in-string', 'catch', 'throw', 'error', 'signal'
and 'play-sound-file'.
* Changes in Emacs 28.1 on Non-Free Operating Systems

View File

@ -21,10 +21,47 @@ Temporary note:
When you add a new item, use the appropriate mark if you are sure it
applies, and please also update docstrings as needed.
* Installation Changes in Emacs 27.2
* Startup Changes in Emacs 27.2
* Changes in Emacs 27.2
This is a bug-fix release with no new features.
* Lisp Changes in Emacs 27.2
*** The behavior of the user option 'resize-mini-frames' has changed.
If set to non-nil, resize the mini frame using the new function
'fit-mini-frame-to-buffer' which won't skip leading or trailing empty
lines of the buffer.
* Editing Changes in Emacs 27.2
* Changes in Specialized Modes and Packages in Emacs 27.2
** Tramp
*** The user option 'tramp-completion-reread-directory-timeout' is made obsolete.
* New Modes and Packages in Emacs 27.2
* Incompatible Lisp Changes in Emacs 27.2
* Lisp Changes in Emacs 27.2
* Changes in Emacs 27.2 on Non-Free Operating Systems
* Installation Changes in Emacs 27.1

View File

@ -27,7 +27,7 @@ the absence of any other determinant, we are using the term
created these APIs, and because all of the classes and functions still
begin with the letters "NS".
(See http://en.wikipedia.org/wiki/Nextstep)
(See https://en.wikipedia.org/wiki/Nextstep)
This Emacs port was first released in the early 1990's on the NeXT
computer, and was successively updated to OpenStep, Rhapsody, Mac OS

View File

@ -402,7 +402,7 @@ built-in.
See the discussion of bug#39799 for more details about this task.
Another relevant resource is the Unicode Technical Standard #51
"Unicode Emoji" (http://www.unicode.org/reports/tr51/).
"Unicode Emoji" (https://www.unicode.org/reports/tr51/).
** Extend text-properties and overlays
@ -497,7 +497,7 @@ https://savannah.nongnu.org/projects/emacs-rtf/, which is still in
very early stages.
Another place to look is the Wikipedia article at
http://en.wikipedia.org/wiki/Rich_Text_Format. It currently points to
https://en.wikipedia.org/wiki/Rich_Text_Format. It currently points to
the latest spec of RTF v1.9.1 at
https://web.archive.org/web/20190708132914/http://www.kleinlercher.at/tools/Windows_Protocols/Word2007RTFSpec9.pdf

View File

@ -62,7 +62,7 @@
;; org-mode, CUA-mode, apt-utils, bbdb, compilation buffers, changelog
;; mode, diff and ediff, eshell, and more. You need emacs-goodies
;; package on Debian to use this. See the wiki page at
;; http://www.emacswiki.org/cgi-bin/wiki?ColorTheme for details. The
;; https://www.emacswiki.org/cgi-bin/wiki?ColorTheme for details. The
;; project home page is at https://gna.org/projects/color-theme.
;;; Code:

View File

@ -1280,7 +1280,7 @@ Funktion set-language-environment). Mittels
C-x <Return> l latin-1 <Return>
können Sie z.B. in einer laufenden Emacs-Sitzung auf Latin-1
umzuschalten. Dadurch wird erreicht, dass Emacs beim Laden einer
umschalten. Dadurch wird erreicht, dass Emacs beim Laden einer
Datei (und Speichern derselben) standardmäßig die
Latin-1-Zeichenkodierung verwendet. Sie können an der Ziffer 1
unmittelbar vor dem Doppelpunkt links unten in der Statuszeile

View File

@ -23,7 +23,7 @@
# 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 <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#
# File Format:

View File

@ -23,7 +23,7 @@
# 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 <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#
# File Format:

Binary file not shown.

Binary file not shown.

View File

@ -13392,7 +13392,7 @@
* progmodes/compile.el (compilation-error-regexp-alist):
Add Java ANt error detection as described in document
http://ant.apache.org/faq.html
https://ant.apache.org/faq.html
2003-08-12 Juri Linkov <juri@jurta.org> (tiny change)

View File

@ -379,7 +379,7 @@
2013-02-28 Sam Steingold <sds@gnu.org>
* vc/diff-mode.el (diff-hunk-file-names): Handle filenames with spaces.
See <http://stackoverflow.com/questions/14720205>.
See <https://stackoverflow.com/questions/14720205>.
2013-02-28 Thierry Volpiatto <thierry.volpiatto@gmail.com>
@ -1326,7 +1326,7 @@
* net/soap-client.el (soap-invoke): Encode the string for
`url-request-data' as UTF-8.
Fixes <http://code.google.com/p/emacs-soap-client/issues/detail?id=16>.
Fixes <https://code.google.com/p/emacs-soap-client/issues/detail?id=16>.
2013-02-01 Glenn Morris <rgm@gnu.org>
@ -2462,7 +2462,7 @@
2012-12-27 Sam Steingold <sds@gnu.org>
* progmodes/cperl-mode.el (cperl-calculate-indent): Do not stagger
continuations, see <http://stackoverflow.com/questions/3582436>.
continuations, see <https://stackoverflow.com/questions/3582436>.
2012-12-27 Dmitry Gutov <dgutov@yandex.ru>
@ -11473,7 +11473,7 @@
(sh-set-shell): Use smie-setup if requested.
* term.el (term-set-escape-char): Properly set term-escape-char.
See http://stackoverflow.com/questions/10524656.
See https://stackoverflow.com/questions/10524656.
2012-05-10 Chong Yidong <cyd@gnu.org>
@ -16476,7 +16476,7 @@
(python-pdbtrack-track-stack-file): Adjust to recognize ipdb as well as
regular python pdb prompts. Adjustments shamelessly taken exactly as
suggested in EmacsWiki page (tiny change):
http://www.emacswiki.org/PythonProgrammingInEmacs#toc14
https://www.emacswiki.org/PythonProgrammingInEmacs#toc14
2011-11-16 Juanma Barranquero <lekktu@gmail.com>

View File

@ -23951,7 +23951,7 @@
* simple.el (shell-command-on-region): Pass the `replace' argument
down to `call-process-region' to comply with the doc as reported on
<http://stackoverflow.com/questions/16720458/emacs-noninteractive-call-to-shell-command-on-region-always-deletes-region>
<https://stackoverflow.com/questions/16720458/emacs-noninteractive-call-to-shell-command-on-region-always-deletes-region>
2013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>

View File

@ -189,17 +189,21 @@ the ones defined from the buffer now."
(table (read buf))
abbrevs name hook exp count sys)
(forward-line 1)
(while (progn (forward-line 1)
(not (eolp)))
(setq name (read buf) count (read buf))
(if (equal count '(sys))
(setq sys t count (read buf))
(setq sys nil))
(setq exp (read buf))
(skip-chars-backward " \t\n\f")
(setq hook (if (not (eolp)) (read buf)))
(skip-chars-backward " \t\n\f")
(setq abbrevs (cons (list name exp hook count sys) abbrevs)))
(while (and (not (eobp))
;; Advance as long as we're looking at blank lines
;; or we have an abbrev.
(looking-at "[ \t\n]\\|\\(\"\\)"))
(when (match-string 1)
(setq name (read buf) count (read buf))
(if (equal count '(sys))
(setq sys t count (read buf))
(setq sys nil))
(setq exp (read buf))
(skip-chars-backward " \t\n\f")
(setq hook (if (not (eolp)) (read buf)))
(skip-chars-backward " \t\n\f")
(setq abbrevs (cons (list name exp hook count sys) abbrevs)))
(forward-line 1))
(define-abbrev-table table abbrevs)))))
(defun read-abbrev-file (&optional file quietly)

View File

@ -39,7 +39,7 @@
;;
;; SGR control sequences are defined in section 3.8.117 of the ECMA-48
;; standard (identical to ISO/IEC 6429), which is freely available as a
;; PDF file <URL:http://www.ecma-international.org/publications/standards/Ecma-048.htm>.
;; PDF file <URL:https://www.ecma-international.org/publications/standards/Ecma-048.htm>.
;; The "Graphic Rendition Combination Mode (GRCM)" implemented is
;; "cumulative mode" as defined in section 7.2.8. Cumulative mode
;; means that whenever possible, SGR control sequences are combined
@ -84,7 +84,7 @@ This translation effectively colorizes strings and regions based upon
SGR control sequences embedded in the text. SGR (Select Graphic
Rendition) control sequences are defined in section 8.3.117 of the
ECMA-48 standard (identical to ISO/IEC 6429), which is freely available
at <URL:http://www.ecma-international.org/publications/standards/Ecma-048.htm>
at <URL:https://www.ecma-international.org/publications/standards/Ecma-048.htm>
as a PDF file."
:version "21.1"
:group 'processes)

View File

@ -918,6 +918,7 @@ if `inhibit-field-text-motion' is non-nil."
(define-key narrow-map "n" 'narrow-to-region)
(define-key narrow-map "w" 'widen)
(define-key narrow-map "g" 'goto-line-relative)
;; Quitting
(define-key global-map "\e\e\e" 'keyboard-escape-quit)

View File

@ -490,8 +490,8 @@ Uses binary search."
(utmin (+ ut (* direction 12.0)))
(utmax ut) ; the time searched is between utmin and utmax
;; utmin and utmax are in hours.
(utmoment-old 0.0) ; rise or set approximation
(utmoment 1.0) ; rise or set approximation
(utmoment-old utmin) ; rise or set approximation
(utmoment utmax) ; rise or set approximation
(hut 0) ; sun height at utmoment
(t0 (car time))
(hmin (cadr (solar-horizontal-coordinates (list t0 utmin)

View File

@ -278,6 +278,10 @@ Lower-case specifiers return only the unit.
optional leading \".\" for zero-padding. For example, \"%.3Y\" will
return something of the form \"001 year\".
The \"%s\" spec takes an additional optional parameter,
introduced by the \",\" character, to say how many decimals to
use. \"%,1s\" means \"use one decimal\".
The \"%z\" specifier does not print anything. When it is used, specifiers
must be given in order of decreasing size. To the left of \"%z\", nothing
is output until the first non-zero unit is encountered."
@ -289,10 +293,11 @@ is output until the first non-zero unit is encountered."
("s" "second" 1)
("z")))
(case-fold-search t)
spec match usedunits zeroflag larger prev name unit num zeropos)
(while (string-match "%\\.?[0-9]*\\(.\\)" string start)
spec match usedunits zeroflag larger prev name unit num zeropos
fraction)
(while (string-match "%\\.?[0-9]*\\(,[0-9]\\)?\\(.\\)" string start)
(setq start (match-end 0)
spec (match-string 1 string))
spec (match-string 2 string))
(unless (string-equal spec "%")
(or (setq match (assoc (downcase spec) units))
(error "Bad format specifier: `%s'" spec))
@ -307,12 +312,17 @@ is output until the first non-zero unit is encountered."
(push match usedunits)))
(and zeroflag larger
(error "Units are not in decreasing order of size"))
(setq seconds (time-convert seconds 'integer))
(unless (numberp seconds)
(setq seconds (float-time seconds)))
(setq fraction (mod seconds 1)
seconds (round seconds))
(dolist (u units)
(setq spec (car u)
name (cadr u)
unit (nth 2 u))
(when (string-match (format "%%\\(\\.?[0-9]+\\)?\\(%s\\)" spec) string)
(when (string-match
(format "%%\\(\\.?[0-9]+\\)?\\(,[0-9]+\\)?\\(%s\\)" spec)
string)
(if (string-equal spec "z") ; must be last in units
(setq string
(replace-regexp-in-string
@ -327,9 +337,23 @@ is output until the first non-zero unit is encountered."
(setq zeropos (unless (zerop num) (match-beginning 0))))
(setq string
(replace-match
(format (concat "%" (match-string 1 string) "d%s") num
(if (string-equal (match-string 2 string) spec)
"" ; lower-case, no unit-name
(format (if (match-string 2 string)
(concat
"%"
(and (match-string 1 string)
(if (= (elt (match-string 1 string) 0) ?.)
(concat "0" (substring
(match-string 1 string) 1))
(match-string 1 string)))
(concat "." (substring
(match-string 2 string) 1))
"f%s")
(concat "%" (match-string 1 string) "d%s"))
(if (= unit 1)
(+ num fraction)
num)
(if (string-equal (match-string 3 string) spec)
"" ; lower-case, no unit-name
(format " %s%s" name
(if (= num 1) "" "s"))))
t t string))))))

View File

@ -96,15 +96,12 @@ of the anchor file for the project."
(defun ede--put-inode-dir-hash (dir inode)
"Add to the EDE project hash DIR associated with INODE."
(when (fboundp 'puthash)
(puthash dir inode ede-inode-directory-hash)
inode))
(puthash dir inode ede-inode-directory-hash)
inode)
(defun ede--get-inode-dir-hash (dir)
"Get the EDE project hash DIR associated with INODE."
(when (fboundp 'gethash)
(gethash dir ede-inode-directory-hash)
))
(gethash dir ede-inode-directory-hash))
(defun ede--inode-for-dir (dir)
"Return the inode for the directory DIR."
@ -272,28 +269,24 @@ Do this only when developing new projects that are incorrectly putting
Do this whenever a new project is created, as opposed to loaded."
;; TODO - Use maphash, and delete by regexp, not by dir searching!
(setq dir (expand-file-name dir))
(when (fboundp 'remhash)
(remhash (file-name-as-directory dir) ede-project-directory-hash)
;; Look for all subdirs of D, and remove them.
(let ((match (concat "^" (regexp-quote dir))))
(maphash (lambda (K O)
(when (string-match match K)
(remhash K ede-project-directory-hash)))
ede-project-directory-hash))
))
(remhash (file-name-as-directory dir) ede-project-directory-hash)
;; Look for all subdirs of D, and remove them.
(let ((match (concat "^" (regexp-quote dir))))
(maphash (lambda (K O)
(when (string-match match K)
(remhash K ede-project-directory-hash)))
ede-project-directory-hash)))
(defun ede--directory-project-from-hash (dir)
"If there is an already loaded project for DIR, return it from the hash."
(when (fboundp 'gethash)
(setq dir (expand-file-name dir))
(gethash dir ede-project-directory-hash nil)))
(setq dir (expand-file-name dir))
(gethash dir ede-project-directory-hash nil))
(defun ede--directory-project-add-description-to-hash (dir desc)
"Add to the EDE project hash DIR associated with DESC."
(when (fboundp 'puthash)
(setq dir (expand-file-name dir))
(puthash dir desc ede-project-directory-hash)
desc))
(setq dir (expand-file-name dir))
(puthash dir desc ede-project-directory-hash)
desc)
;;; DIRECTORY-PROJECT-P, -CONS
;;

View File

@ -427,7 +427,7 @@ Menu items are appended to the common grammar menu.")
"\n;; It is derived from the grammar in the ECMAScript Language
;; Specification published at
;;
;; http://www.ecma-international.org/publications/standards/Ecma-262.htm
;; https://www.ecma-international.org/publications/standards/Ecma-262.htm
;;
;; and redistributed under the following license:
;;

View File

@ -611,6 +611,7 @@ The command \\[comint-accumulate] sets this.")
(put 'comint-replace-by-expanded-history 'menu-enable 'comint-input-autoexpand)
(put 'comint-input-ring 'permanent-local t)
(put 'comint-input-ring-file-name 'permanent-local t)
(put 'comint-input-ring-index 'permanent-local t)
(put 'comint-save-input-ring-index 'permanent-local t)
(put 'comint-input-autoexpand 'permanent-local t)

View File

@ -747,7 +747,18 @@ All non-spacing characters have this function in
unicode-category-table))
;; for dotted-circle
(aset composition-function-table #x25CC
`([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle])))
`([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle]))
;; For prettier display of fractions
(set-char-table-range
composition-function-table
#x2044
;; We use font-shape-gstring so that if the font doesn't support
;; fractional display, the characters are shown separately, not as
;; a composed cluster.
(list (vector (purecopy "[1-9][0-9][0-9]\u2044[0-9]+")
3 'font-shape-gstring)
(vector (purecopy "[1-9][0-9]\u2044[0-9]+") 2 'font-shape-gstring)
(vector (purecopy "[1-9]\u2044[0-9]+") 1 'font-shape-gstring))))
(defun compose-gstring-for-terminal (gstring _direction)
"Compose glyph-string GSTRING for terminal display.

View File

@ -3739,6 +3739,14 @@ the present value is saved to its :shown-value property instead."
(widget-put widget :children children)
(custom-face-state-set widget))))))
(defun cus--face-link (widget _format)
(widget-create-child-and-convert
widget 'face-link
:button-face 'link
:tag "link"
:action (lambda (&rest _x)
(customize-face (widget-value widget)))))
(defvar custom-face-menu nil
"If non-nil, an alist of actions for the `custom-face' widget.
@ -4008,7 +4016,7 @@ restoring it to the state of a face that has never been customized."
(define-widget 'face 'symbol
"A Lisp face name (with sample)."
:format "%{%t%}: (%{sample%}) %v"
:format "%f %{%t%}: (%{sample%}) %v"
:tag "Face"
:value 'default
:sample-face-get 'widget-face-sample-face-get
@ -4018,6 +4026,7 @@ restoring it to the state of a face that has never been customized."
obarray #'facep 'strict)
:prompt-match 'facep
:prompt-history 'widget-face-prompt-value-history
:format-handler 'cus--face-link
:validate (lambda (widget)
(unless (facep (widget-value widget))
(widget-put widget

View File

@ -324,9 +324,9 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(resize-mini-frames
frames (choice
(const :tag "Never" nil)
(const :tag "Fit frame to buffer" t)
(const :tag "Fit mini frame to buffer" t)
(function :tag "User-defined function"))
"27.1")
"27.2")
(menu-bar-mode frames boolean nil
;; FIXME?
;; :initialize custom-initialize-default

View File

@ -217,6 +217,10 @@ With ARG, repeat that many times. `C-u' means until end of buffer."
(self-insert-command
(prefix-numeric-value current-prefix-arg))
(setq this-command 'ignore)))))
;; If the user has quit here (for instance, if the user is
;; presented with a "changed on disk; really edit the buffer?"
;; prompt, but hit `C-g'), just ding.
(quit (ding))
;; If ask-user-about-supersession-threat signals an error,
;; stop safe_run_hooks from clearing out pre-command-hook.
(file-supersession (message "%s" (cadr data)) (ding))

View File

@ -51,6 +51,8 @@ This uses `display-fill-column-indicator' internally.
To change the position of the column displayed by default
customize `display-fill-column-indicator-column'. You can change the
character for the indicator setting `display-fill-column-indicator-character'.
The globalized version is `global-display-fill-column-indicator-mode',
which see.
See Info node `Displaying Boundaries' for details."
:lighter nil
(if display-fill-column-indicator-mode
@ -74,7 +76,8 @@ See Info node `Displaying Boundaries' for details."
;;;###autoload
(define-globalized-minor-mode global-display-fill-column-indicator-mode
display-fill-column-indicator-mode display-fill-column-indicator--turn-on)
display-fill-column-indicator-mode display-fill-column-indicator--turn-on
:predicate '((not special-mode) t))
(provide 'display-fill-column-indicator)

View File

@ -1,4 +1,4 @@
;;; bindat.el --- binary data structure packing and unpacking. -*- lexical-binding: t -*-
;;; bindat.el --- binary data structure packing and unpacking.
;; Copyright (C) 2002-2020 Free Software Foundation, Inc.
@ -193,8 +193,8 @@
;; Helper functions for structure unpacking.
;; Relies on dynamic binding of BINDAT-RAW and BINDAT-IDX
(defvar bindat-raw nil)
(defvar bindat-idx nil)
(defvar bindat-raw)
(defvar bindat-idx)
(defun bindat--unpack-u8 ()
(prog1
@ -276,7 +276,7 @@
(t nil)))
(defun bindat--unpack-group (spec)
(let (struct)
(let (struct last)
(while spec
(let* ((item (car spec))
(field (car item))
@ -330,21 +330,21 @@
(setq data (bindat--unpack-group (cdr case))
cases nil)))))
(t
(setq data (bindat--unpack-item type len vectype))))
(setq data (bindat--unpack-item type len vectype)
last data)))
(if data
(if field
(setq struct (cons (cons field data) struct))
(setq struct (append data struct))))))
struct))
(defun bindat-unpack (spec raw &optional idx)
"Return structured data according to SPEC for binary data in RAW.
RAW is a unibyte string or vector.
Optional third arg IDX specifies the starting offset in RAW."
(when (multibyte-string-p raw)
(defun bindat-unpack (spec bindat-raw &optional bindat-idx)
"Return structured data according to SPEC for binary data in BINDAT-RAW.
BINDAT-RAW is a unibyte string or vector.
Optional third arg BINDAT-IDX specifies the starting offset in BINDAT-RAW."
(when (multibyte-string-p bindat-raw)
(error "String is multibyte"))
(setq bindat-raw raw)
(setq bindat-idx (or idx 0))
(unless bindat-idx (setq bindat-idx 0))
(bindat--unpack-group spec))
(defun bindat-get-field (struct &rest field)
@ -373,70 +373,74 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..."
(ip . 4)))
(defun bindat--length-group (struct spec)
(while spec
(let* ((item (car spec))
(field (car item))
(type (nth 1 item))
(len (nth 2 item))
(vectype (and (eq type 'vec) (nth 3 item)))
(tail 3))
(setq spec (cdr spec))
(if (and (consp field) (eq (car field) 'eval))
(setq field (eval (car (cdr field)))))
(if (and type (consp type) (eq (car type) 'eval))
(setq type (eval (car (cdr type)))))
(if (and len (consp len) (eq (car len) 'eval))
(setq len (eval (car (cdr len)))))
(if (memq field '(eval fill align struct union))
(setq tail 2
len type
type field
field nil))
(if (and (consp len) (not (eq type 'eval)))
(setq len (apply #'bindat-get-field struct len)))
(if (not len)
(setq len 1))
(while (eq type 'vec)
(if (consp vectype)
(setq len (* len (nth 1 vectype))
type (nth 2 vectype))
(setq type (or vectype 'u8)
vectype nil)))
(cond
((eq type 'eval)
(if field
(setq struct (cons (cons field (eval len)) struct))
(eval len)))
((eq type 'fill)
(setq bindat-idx (+ bindat-idx len)))
((eq type 'align)
(while (/= (% bindat-idx len) 0)
(setq bindat-idx (1+ bindat-idx))))
((eq type 'struct)
(bindat--length-group
(if field (bindat-get-field struct field) struct) (eval len)))
((eq type 'repeat)
(let ((index 0) (count len))
(while (< index count)
(bindat--length-group
(nth index (bindat-get-field struct field))
(nthcdr tail item))
(setq index (1+ index)))))
((eq type 'union)
(let ((tag len) (cases (nthcdr tail item)) case cc)
(while cases
(setq case (car cases)
cases (cdr cases)
cc (car case))
(if (or (equal cc tag) (equal cc t)
(and (consp cc) (eval cc)))
(progn
(bindat--length-group struct (cdr case))
(setq cases nil))))))
(t
(if (setq type (assq type bindat--fixed-length-alist))
(setq len (* len (cdr type))))
(setq bindat-idx (+ bindat-idx len)))))))
(let (last)
(while spec
(let* ((item (car spec))
(field (car item))
(type (nth 1 item))
(len (nth 2 item))
(vectype (and (eq type 'vec) (nth 3 item)))
(tail 3))
(setq spec (cdr spec))
(if (and (consp field) (eq (car field) 'eval))
(setq field (eval (car (cdr field)))))
(if (and type (consp type) (eq (car type) 'eval))
(setq type (eval (car (cdr type)))))
(if (and len (consp len) (eq (car len) 'eval))
(setq len (eval (car (cdr len)))))
(if (memq field '(eval fill align struct union))
(setq tail 2
len type
type field
field nil))
(if (and (consp len) (not (eq type 'eval)))
(setq len (apply 'bindat-get-field struct len)))
(if (not len)
(setq len 1))
(while (eq type 'vec)
(let ((vlen 1))
(if (consp vectype)
(setq len (* len (nth 1 vectype))
type (nth 2 vectype))
(setq type (or vectype 'u8)
vectype nil))))
(cond
((eq type 'eval)
(if field
(setq struct (cons (cons field (eval len)) struct))
(eval len)))
((eq type 'fill)
(setq bindat-idx (+ bindat-idx len)))
((eq type 'align)
(while (/= (% bindat-idx len) 0)
(setq bindat-idx (1+ bindat-idx))))
((eq type 'struct)
(bindat--length-group
(if field (bindat-get-field struct field) struct) (eval len)))
((eq type 'repeat)
(let ((index 0) (count len))
(while (< index count)
(bindat--length-group
(nth index (bindat-get-field struct field))
(nthcdr tail item))
(setq index (1+ index)))))
((eq type 'union)
(let ((tag len) (cases (nthcdr tail item)) case cc)
(while cases
(setq case (car cases)
cases (cdr cases)
cc (car case))
(if (or (equal cc tag) (equal cc t)
(and (consp cc) (eval cc)))
(progn
(bindat--length-group struct (cdr case))
(setq cases nil))))))
(t
(if (setq type (assq type bindat--fixed-length-alist))
(setq len (* len (cdr type))))
(if field
(setq last (bindat-get-field struct field)))
(setq bindat-idx (+ bindat-idx len))))))))
(defun bindat-length (spec struct)
"Calculate bindat-raw length for STRUCT according to bindat SPEC."
@ -592,17 +596,17 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..."
(bindat--pack-item last type len vectype)
))))))
(defun bindat-pack (spec struct &optional raw idx)
(defun bindat-pack (spec struct &optional bindat-raw bindat-idx)
"Return binary data packed according to SPEC for structured data STRUCT.
Optional third arg RAW is a pre-allocated unibyte string or
vector to pack into.
Optional fourth arg IDX is the starting offset into BINDAT-RAW."
(when (multibyte-string-p raw)
Optional third arg BINDAT-RAW is a pre-allocated unibyte string or vector to
pack into.
Optional fourth arg BINDAT-IDX is the starting offset into BINDAT-RAW."
(when (multibyte-string-p bindat-raw)
(error "Pre-allocated string is multibyte"))
(let ((no-return raw))
(setq bindat-idx (or idx 0))
(setq bindat-raw (or raw
(make-string (+ bindat-idx (bindat-length spec struct)) 0)))
(let ((no-return bindat-raw))
(unless bindat-idx (setq bindat-idx 0))
(unless bindat-raw
(setq bindat-raw (make-string (+ bindat-idx (bindat-length spec struct)) 0)))
(bindat--pack-group struct spec)
(if no-return nil bindat-raw)))

View File

@ -830,11 +830,13 @@
(defun byte-optimize-assoc (form)
;; Replace 2-argument `assoc' with `assq', `rassoc' with `rassq',
;; if the first arg is a symbol.
(if (and (= (length form) 3)
(byte-optimize--constant-symbol-p (nth 1 form)))
(cons (if (eq (car form) 'assoc) 'assq 'rassq)
(cdr form))
form))
(cond
((/= (length form) 3)
form)
((byte-optimize--constant-symbol-p (nth 1 form))
(cons (if (eq (car form) 'assoc) 'assq 'rassq)
(cdr form)))
(t (byte-optimize-constant-args form))))
(defun byte-optimize-memq (form)
;; (memq foo '(bar)) => (and (eq foo 'bar) '(bar))
@ -1144,7 +1146,7 @@
;; I wonder if I missed any :-\)
(let ((side-effect-free-fns
'(% * + - / /= 1+ 1- < <= = > >= abs acos append aref ash asin atan
assoc assq
assq
boundp buffer-file-name buffer-local-variables buffer-modified-p
buffer-substring byte-code-function-p
capitalize car-less-than-car car cdr ceiling char-after char-before

View File

@ -1989,7 +1989,7 @@ See also `emacs-lisp-byte-compile-and-load'."
(byte-compile--known-dynamic-vars
(byte-compile--load-dynvars (getenv "EMACS_DYNVARS_FILE")))
target-file input-buffer output-buffer
byte-compile-dest-file)
byte-compile-dest-file byte-compiler-error-flag)
(setq target-file (byte-compile-dest-file filename))
(setq byte-compile-dest-file target-file)
(with-current-buffer
@ -2051,7 +2051,6 @@ See also `emacs-lisp-byte-compile-and-load'."
'no-byte-compile)
(when byte-compile-verbose
(message "Compiling %s..." filename))
(setq byte-compiler-error-flag nil)
;; It is important that input-buffer not be current at this call,
;; so that the value of point set in input-buffer
;; within byte-compile-from-buffer lingers in that buffer.

View File

@ -2589,7 +2589,7 @@ This function will not modify `match-data'."
;; going on.
(if checkdoc-bouncy-flag (message "%s -> done" question))
(delete-region start end)
(insert replacewith)
(insert-before-markers replacewith)
(if checkdoc-bouncy-flag (sit-for 0))
(setq ret t)))
(delete-overlay o)

View File

@ -1,4 +1,4 @@
;;; copyright.el --- update the copyright notice in current buffer
;;; copyright.el --- update the copyright notice in current buffer -*- lexical-binding: t -*-
;; Copyright (C) 1991-1995, 1998, 2001-2020 Free Software Foundation,
;; Inc.
@ -37,14 +37,12 @@
(defcustom copyright-limit 2000
"Don't try to update copyright beyond this position unless interactive.
A value of nil means to search whole buffer."
:group 'copyright
:type '(choice (integer :tag "Limit")
(const :tag "No limit")))
(defcustom copyright-at-end-flag nil
"Non-nil means to search backwards from the end of the buffer for copyright.
This is useful for ChangeLogs."
:group 'copyright
:type 'boolean
:version "23.1")
;;;###autoload(put 'copyright-at-end-flag 'safe-local-variable 'booleanp)
@ -56,7 +54,6 @@ This is useful for ChangeLogs."
\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
"What your copyright notice looks like.
The second \\( \\) construct must match the years."
:group 'copyright
:type 'regexp)
(defcustom copyright-names-regexp ""
@ -64,7 +61,6 @@ The second \\( \\) construct must match the years."
Only copyright lines where the name matches this regexp will be updated.
This allows you to avoid adding years to a copyright notice belonging to
someone else or to a group for which you do not work."
:group 'copyright
:type 'regexp)
;; The worst that can happen is a malicious regexp that overflows in
@ -76,7 +72,6 @@ someone else or to a group for which you do not work."
"\\(\\s *\\)\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
"Match additional copyright notice years.
The second \\( \\) construct must match the years."
:group 'copyright
:type 'regexp)
;; See "Copyright Notices" in maintain.info.
@ -87,7 +82,6 @@ The second \\( \\) construct must match the years."
For example: 2005, 2006, 2007, 2008 might be replaced with 2005-2008.
If you use ranges, you should add an explanatory note in a README file.
The function `copyright-fix-years' respects this variable."
:group 'copyright
:type 'boolean
:version "24.1")
@ -96,7 +90,6 @@ The function `copyright-fix-years' respects this variable."
(defcustom copyright-query 'function
"If non-nil, ask user before changing copyright.
When this is `function', only ask when called non-interactively."
:group 'copyright
:type '(choice (const :tag "Do not ask")
(const :tag "Ask unless interactive" function)
(other :tag "Ask" t)))

View File

@ -375,18 +375,21 @@ No problems result if this variable is not bound.
(defmacro define-globalized-minor-mode (global-mode mode turn-on &rest body)
"Make a global mode GLOBAL-MODE corresponding to buffer-local minor MODE.
TURN-ON is a function that will be called with no args in every buffer
and that should try to turn MODE on if applicable for that buffer.
Each of KEY VALUE is a pair of CL-style keyword arguments. As
the minor mode defined by this function is always global, any
:global keyword is ignored. Other keywords have the same
meaning as in `define-minor-mode', which see. In particular,
:group specifies the custom group. The most useful keywords
are those that are passed on to the `defcustom'. It normally
makes no sense to pass the :lighter or :keymap keywords to
`define-globalized-minor-mode', since these are usually passed
to the buffer-local version of the minor mode.
and that should try to turn MODE on if applicable for that buffer.
Each of KEY VALUE is a pair of CL-style keyword arguments. :predicate
specifies which major modes the globalized minor mode should be switched on
in. As the minor mode defined by this function is always global, any
:global keyword is ignored. Other keywords have the same meaning as in
`define-minor-mode', which see. In particular, :group specifies the custom
group. The most useful keywords are those that are passed on to the
`defcustom'. It normally makes no sense to pass the :lighter or :keymap
keywords to `define-globalized-minor-mode', since these are usually passed
to the buffer-local version of the minor mode.
BODY contains code to execute each time the mode is enabled or disabled.
It is executed after toggling the mode, and before running GLOBAL-MODE-hook.
It is executed after toggling the mode, and before running
GLOBAL-MODE-hook.
If MODE's set-up depends on the major mode in effect when it was
enabled, then disabling and reenabling MODE should make MODE work
@ -415,7 +418,11 @@ on if the hook has explicitly disabled it.
(minor-MODE-hook (intern (concat mode-name "-hook")))
(MODE-set-explicitly (intern (concat mode-name "-set-explicitly")))
(MODE-major-mode (intern (concat (symbol-name mode) "-major-mode")))
keyw)
(MODE-predicate (intern (concat (replace-regexp-in-string
"-mode\\'" "" global-mode-name)
"-modes")))
(turn-on-function `#',turn-on)
keyw predicate)
;; Check keys.
(while (keywordp (setq keyw (car body)))
@ -423,6 +430,13 @@ on if the hook has explicitly disabled it.
(pcase keyw
(:group (setq group (nconc group (list :group (pop body)))))
(:global (pop body))
(:predicate
(setq predicate (list (pop body)))
(setq turn-on-function
`(lambda ()
(require 'easy-mmode)
(when (easy-mmode--globalized-predicate-p ,(car predicate))
(funcall ,turn-on-function)))))
(_ (push keyw extra-keywords) (push (pop body) extra-keywords))))
`(progn
@ -442,10 +456,17 @@ ARG is omitted or nil.
%s is enabled in all buffers where
`%s' would do it.
See `%s' for more information on %s."
See `%s' for more information on
%s.%s"
pretty-name pretty-global-name
pretty-name turn-on mode pretty-name)
:global t ,@group ,@(nreverse extra-keywords)
pretty-name turn-on mode pretty-name
(if predicate
(format "\n\n`%s' is used to control which modes
this minor mode is used in."
MODE-predicate)
""))
:global t ,@group ,@(nreverse extra-keywords)
;; Setup hook to handle future mode changes and new buffers.
(if ,global-mode
@ -461,9 +482,28 @@ See `%s' for more information on %s."
;; Go through existing buffers.
(dolist (buf (buffer-list))
(with-current-buffer buf
(if ,global-mode (funcall #',turn-on) (when ,mode (,mode -1)))))
(if ,global-mode (funcall ,turn-on-function)
(when ,mode (,mode -1)))))
,@body)
,(when predicate
`(defcustom ,MODE-predicate ,(car predicate)
,(format "Which major modes `%s' is switched on in.
This variable can be either t (all major modes), nil (no major modes),
or a list of modes and (not modes) to switch use this minor mode or
not. For instance
(c-mode (not message-mode mail-mode) text-mode)
means \"use this mode in all modes derived from `c-mode', don't use in
modes derived from `message-mode' or `mail-mode', but do use in other
modes derived from `text-mode'\". An element with value t means \"use\"
and nil means \"don't use\". There's an implicit nil at the end of the
list."
mode)
:type '(repeat sexp)
:group ,group))
;; Autoloading define-globalized-minor-mode autoloads everything
;; up-to-here.
:autoload-end
@ -497,8 +537,8 @@ See `%s' for more information on %s."
(if ,mode
(progn
(,mode -1)
(funcall #',turn-on))
(funcall #',turn-on))))
(funcall ,turn-on-function))
(funcall ,turn-on-function))))
(setq ,MODE-major-mode major-mode))))))
(put ',MODE-enable-in-buffers 'definition-name ',global-mode)
@ -513,6 +553,33 @@ See `%s' for more information on %s."
(add-hook 'post-command-hook ',MODE-check-buffers))
(put ',MODE-cmhh 'definition-name ',global-mode))))
(defun easy-mmode--globalized-predicate-p (predicate)
(cond
((eq predicate t)
t)
((eq predicate nil)
nil)
((listp predicate)
;; Legacy support for (not a b c).
(when (eq (car predicate) 'not)
(setq predicate (nconc (mapcar (lambda (e) (list 'not e))
(cdr predicate))
(list t))))
(catch 'found
(dolist (elem predicate)
(cond
((eq elem t)
(throw 'found t))
((eq elem nil)
(throw 'found nil))
((and (consp elem)
(eq (car elem) 'not))
(when (apply #'derived-mode-p (cdr elem))
(throw 'found nil)))
((symbolp elem)
(when (derived-mode-p elem)
(throw 'found t)))))))))
;;;
;;; easy-mmode-defmap
;;;

View File

@ -2665,9 +2665,6 @@ See `edebug-behavior-alist' for implementations.")
(defvar edebug-previous-result nil) ;; Last result returned.
;; Emacs 19 adds an arg to mark and mark-marker.
(defalias 'edebug-mark-marker 'mark-marker)
(defun edebug--display (value offset-index arg-mode)
;; edebug--display-1 is too big, we should split it. This function
;; here was just introduced to avoid making edebug--display-1
@ -2895,8 +2892,8 @@ See `edebug-behavior-alist' for implementations.")
;; But don't restore point if edebug-buffer is current buffer.
(if (not (eq edebug-buffer edebug-outside-buffer))
(goto-char edebug-outside-point))
(if (marker-buffer (edebug-mark-marker))
(set-marker (edebug-mark-marker) edebug-outside-mark))
(if (marker-buffer (mark-marker))
(set-marker (mark-marker) edebug-outside-mark))
)) ; unwind-protect
;; None of the following is done if quit or signal occurs.
@ -3153,8 +3150,8 @@ before returning. The default is one second."
(goto-char edebug-outside-point)
(message "Current buffer: %s Point: %s Mark: %s"
(current-buffer) (point)
(if (marker-buffer (edebug-mark-marker))
(marker-position (edebug-mark-marker)) "<not set>"))
(if (marker-buffer (mark-marker))
(marker-position (mark-marker)) "<not set>"))
(sit-for arg)
(edebug-pop-to-buffer edebug-buffer (car edebug-window-data)))))
@ -3725,8 +3722,8 @@ Return the result of the last expression."
;; for us.
(with-current-buffer edebug-outside-buffer ; of edebug-buffer
(goto-char edebug-outside-point)
(if (marker-buffer (edebug-mark-marker))
(set-marker (edebug-mark-marker) edebug-outside-mark))
(if (marker-buffer (mark-marker))
(set-marker (mark-marker) edebug-outside-mark))
,@body)
;; Back to edebug-buffer. Restore rest of inside context.
@ -4667,5 +4664,7 @@ instrumentation for, defaulting to all functions."
(message "Removed edebug instrumentation from %s"
(mapconcat #'symbol-name functions ", ")))
(define-obsolete-function-alias 'edebug-mark-marker #'mark-marker "28.1")
(provide 'edebug)
;;; edebug.el ends here

View File

@ -5,7 +5,7 @@
;; Author: Noah Friedman <friedman@splode.com>
;; Keywords: extensions
;; Created: 1995-10-06
;; Version: 1.10.0
;; Version: 1.11.0
;; Package-Requires: ((emacs "26.3"))
;; This is a GNU ELPA :core package. Avoid functionality that is not
@ -67,7 +67,7 @@ If this variable is set to 0, no idle time is required."
Changing the value requires toggling `eldoc-mode'."
:type 'boolean)
(defcustom eldoc-display-truncation-message t
(defcustom eldoc-echo-area-display-truncation-message t
"If non-nil, provide verbose help when a message has been truncated.
If nil, truncated messages will just have \"...\" appended."
:type 'boolean
@ -96,19 +96,22 @@ Note that this variable has no effect, unless
If value is t, never attempt to truncate messages, even if the
echo area must be resized to fit.
If value is a number (integer or floating point), it has the
semantics of `max-mini-window-height', constraining the resizing
for ElDoc purposes only.
If the value is a positive number, it is used to calculate a
number of logical lines of documentation that ElDoc is allowed to
put in the echo area. If a positive integer, the number is used
directly, while a float specifies the number of lines as a
proporting of the echo area frame's height.
Any resizing respects `max-mini-window-height'.
If value is any non-nil symbol other than t, the part of the doc
string that represents the symbol's name may be truncated if it
will enable the rest of the doc string to fit on a single line,
without resizing the echo area.
If value is the symbol `truncate-sym-name-if-fit' t, the part of
the doc string that represents a symbol's name may be truncated
if it will enable the rest of the doc string to fit on a single
line, without resizing the echo area.
If value is nil, a doc string is always truncated to fit in a
single line of display in the echo area."
single line of display in the echo area.
Any resizing of the echo area additionally respects
`max-mini-window-height'."
:type '(radio (const :tag "Always" t)
(float :tag "Fraction of frame height" 0.25)
(integer :tag "Number of lines" 5)
@ -117,12 +120,13 @@ single line of display in the echo area."
symbol names if it will\ enable argument list to fit on one
line" truncate-sym-name-if-fit)))
(defcustom eldoc-prefer-doc-buffer nil
(defcustom eldoc-echo-area-prefer-doc-buffer nil
"Prefer ElDoc's documentation buffer if it is showing in some frame.
If this variable's value is t and a piece of documentation needs
to be truncated to fit in the echo area, do so if ElDoc's
documentation buffer is not already showing, since the buffer
always holds the full documentation."
If this variable's value is t, ElDoc will skip showing
documentation in the echo area if the dedicated documentation
buffer (given by `eldoc-doc-buffer') is being displayed in some
window. If the value is the symbol `maybe', then the echo area
is only skipped if the documentation doesn't fit there."
:type 'boolean)
(defface eldoc-highlight-function-argument
@ -237,8 +241,9 @@ expression point is on." :lighter eldoc-minor-mode-string
;; `emacs-lisp-mode' itself?
(cond ((<= emacs-major-version 27)
(declare-function elisp-eldoc-documentation-function "elisp-mode")
(add-function :before-until (local 'eldoc-documentation-function)
#'elisp-eldoc-documentation-function))
(with-no-warnings
(add-function :before-until (local 'eldoc-documentation-function)
#'elisp-eldoc-documentation-function)))
(t (add-hook 'eldoc-documentation-functions
#'elisp-eldoc-var-docstring nil t)
(add-hook 'eldoc-documentation-functions
@ -350,40 +355,26 @@ Also store it in `eldoc-last-message' and return that value."
;; for us, but do note that the last-message will be gone.
(setq eldoc-last-message nil))))
(defvar-local eldoc--last-request-state nil
;; The point of `eldoc--request-state' is not to over-request, which
;; can happen if the idle timer is restarted on execution of command
;; which is guaranteed not to change the conditions that warrant a new
;; request for documentation.
(defvar eldoc--last-request-state nil
"Tuple containing information about last ElDoc request.")
(defun eldoc--request-state ()
"Compute information to store in `eldoc--last-request-state'."
(list (current-buffer) (buffer-modified-tick) (point)))
(defun eldoc-display-message-p ()
(eldoc--request-docs-p (eldoc--request-state)))
"Tell if ElDoc can use the echo area."
(and (eldoc-display-message-no-interference-p)
(not this-command)
(eldoc--message-command-p last-command)))
(make-obsolete 'eldoc-display-message-p
"Use `eldoc-documentation-functions' instead."
"eldoc-1.6.0")
(defun eldoc--request-docs-p (request-state)
"Return non-nil when it is appropriate to request docs.
REQUEST-STATE is a candidate for `eldoc--last-request-state'"
(and
;; FIXME: The original idea behind this function is to protect the
;; Echo area from ElDoc interference, but since that is only one of
;; the possible outlets of ElDoc, this must soon be reworked.
(eldoc-display-message-no-interference-p)
(not (and eldoc--doc-buffer
(get-buffer-window eldoc--doc-buffer)
(equal request-state
(with-current-buffer
eldoc--doc-buffer
eldoc--last-request-state))))
;; If this-command is non-nil while running via an idle
;; timer, we're still in the middle of executing a command,
;; e.g. a query-replace where it would be annoying to
;; overwrite the echo area.
(not this-command)
(eldoc--message-command-p last-command)))
;; Check various conditions about the current environment that might make
;; it undesirable to print eldoc messages right this instant.
(defun eldoc-display-message-no-interference-p ()
@ -416,43 +407,159 @@ about the context around point.
To call the CALLBACK function, the hook function must pass it an
obligatory argument DOCSTRING, a string containing the
documentation, followed by an optional list of keyword-value
pairs of the form (:KEY VALUE :KEY2 VALUE2...). KEY can be:
documentation, followed by an optional list of arbitrary
keyword-value pairs of the form (:KEY VALUE :KEY2 VALUE2...).
The information contained in these pairs is understood by members
of `eldoc-display-functions', allowing the
documentation-producing backend to cooperate with specific
documentation-displaying frontends. For example, KEY can be:
* `:thing', VALUE is a short string or symbol designating what is
being reported on. The documentation display engine can elect
to remove this information depending on space constraints;
* `:thing', VALUE being a short string or symbol designating what
is being reported on. It can, for example be the name of the
function whose signature is being documented, or the name of
the variable whose docstring is being documented.
`eldoc-display-in-echo-area', a member of
`eldoc-display-functions', sometimes omits this information
depending on space constraints;
* `:face', VALUE is a symbol designating a face to use when
displaying `:thing''s value.
* `:face', VALUE being a symbol designating a face which both
`eldoc-display-in-echo-area' and `eldoc-display-in-buffer' will
use when displaying `:thing''s value.
Major modes should modify this hook locally, for example:
Finally, major modes should modify this hook locally, for
example:
(add-hook \\='eldoc-documentation-functions #\\='foo-mode-eldoc nil t)
so that the global value (i.e. the default value of the hook) is
taken into account if the major mode specific function does not
return any documentation.")
(defvar eldoc-display-functions
'(eldoc-display-in-echo-area eldoc-display-in-buffer)
"Hook of functions tasked with displaying ElDoc results.
Each function is passed two arguments: DOCS and INTERACTIVE. DOCS
is a list (DOC ...) where DOC looks like (STRING :KEY VALUE :KEY2
VALUE2 ...). STRING is a string containing the documentation's
text and the remainder of DOC is an optional list of
keyword-value pairs denoting additional properties of that
documentation. For commonly recognized properties, see
`eldoc-documentation-functions'.
INTERACTIVE says if the request to display doc strings came
directly from the user or from ElDoc's automatic mechanisms'.")
(defvar eldoc--doc-buffer nil "Buffer displaying latest ElDoc-produced docs.")
(defun eldoc-doc-buffer (&optional interactive)
"Get latest *eldoc* help buffer. Interactively, display it."
(defvar eldoc--doc-buffer-docs nil "Documentation items in `eldoc--doc-buffer'.")
(defun eldoc-doc-buffer ()
"Display ElDoc documentation buffer.
This holds the results of the last documentation request."
(interactive)
(unless (buffer-live-p eldoc--doc-buffer)
(user-error (format
"ElDoc buffer doesn't exist, maybe `%s' to produce one."
(substitute-command-keys "\\[eldoc]"))))
(with-current-buffer eldoc--doc-buffer
(rename-buffer (replace-regexp-in-string "^ *" ""
(buffer-name)))
(display-buffer (current-buffer))))
(defun eldoc--format-doc-buffer (docs)
"Ensure DOCS are displayed in an *eldoc* buffer."
(interactive (list t))
(prog1
(if (and eldoc--doc-buffer (buffer-live-p eldoc--doc-buffer))
eldoc--doc-buffer
(setq eldoc--doc-buffer (get-buffer-create "*eldoc*")))
(when interactive (display-buffer eldoc--doc-buffer))))
(with-current-buffer (if (buffer-live-p eldoc--doc-buffer)
eldoc--doc-buffer
(setq eldoc--doc-buffer
(get-buffer-create " *eldoc*")))
(unless (eq docs eldoc--doc-buffer-docs)
(setq-local eldoc--doc-buffer-docs docs)
(let ((inhibit-read-only t)
(things-reported-on))
(erase-buffer) (setq buffer-read-only t)
(local-set-key "q" 'quit-window)
(cl-loop for (docs . rest) on docs
for (this-doc . plist) = docs
for thing = (plist-get plist :thing)
when thing do
(cl-pushnew thing things-reported-on)
(setq this-doc
(concat
(propertize (format "%s" thing)
'face (plist-get plist :face))
": "
this-doc))
do (insert this-doc)
when rest do (insert "\n")
finally (goto-char (point-min)))
;; Rename the buffer, taking into account whether it was
;; hidden or not
(rename-buffer (format "%s*eldoc%s*"
(if (string-match "^ " (buffer-name)) " " "")
(if things-reported-on
(format " for %s"
(mapconcat
(lambda (s) (format "%s" s))
things-reported-on
", "))
""))))))
eldoc--doc-buffer)
(defun eldoc--echo-area-substring (available)
"Given AVAILABLE lines, get buffer substring to display in echo area.
Helper for `eldoc-display-in-echo-area'."
(let ((start (prog1 (progn
(goto-char (point-min))
(skip-chars-forward " \t\n")
(point))
(goto-char (line-end-position available))
(skip-chars-backward " \t\n")))
(truncated (save-excursion
(skip-chars-forward " \t\n")
(not (eobp)))))
(cond ((eldoc--echo-area-prefer-doc-buffer-p truncated)
nil)
((and truncated
(> available 1)
eldoc-echo-area-display-truncation-message)
(goto-char (line-end-position 0))
(concat (buffer-substring start (point))
(format
"\n(Documentation truncated. Use `%s' to see rest)"
(substitute-command-keys "\\[eldoc-doc-buffer]"))))
(t
(buffer-substring start (point))))))
(defun eldoc--handle-docs (docs)
"Display multiple DOCS in echo area.
DOCS is a list of (STRING PLIST...). It is already sorted.
Honor most of `eldoc-echo-area-use-multiline-p'."
;; If there's nothing to report clear the echo area, but don't erase
;; the last *eldoc* buffer.
(if (null docs) (eldoc--message nil)
(defun eldoc--echo-area-prefer-doc-buffer-p (truncatedp)
"Tell if display in the echo area should be skipped.
Helper for `eldoc-display-in-echo-area'. If TRUNCATEDP the
documentation to potentially appear in the echo are is truncated."
(and (or (eq eldoc-echo-area-prefer-doc-buffer t)
(and truncatedp
(eq eldoc-echo-area-prefer-doc-buffer
'maybe)))
(get-buffer-window eldoc--doc-buffer)))
(defun eldoc-display-in-echo-area (docs _interactive)
"Display DOCS in echo area.
Honor `eldoc-echo-area-use-multiline-p' and
`eldoc-echo-area-prefer-doc-buffer'."
(cond
(;; Check if he wave permission to mess with echo area at all. For
;; example, if this-command is non-nil while running via an idle
;; timer, we're still in the middle of executing a command, e.g. a
;; query-replace where it would be annoying to overwrite the echo
;; area.
(or
(not (eldoc-display-message-no-interference-p))
this-command
(not (eldoc--message-command-p last-command))))
(;; If we do but nothing to report, clear the echo area.
(null docs)
(eldoc--message nil))
(t
;; Otherwise, establish some parameters.
(let*
;; Otherwise, establish some parameters.
((width (1- (window-width (minibuffer-window))))
(val (if (and (symbolp eldoc-echo-area-use-multiline-p)
eldoc-echo-area-use-multiline-p)
@ -461,44 +568,13 @@ Honor most of `eldoc-echo-area-use-multiline-p'."
(available (cl-typecase val
(float (truncate (* (frame-height) val)))
(integer val)
(t 1)))
(things-reported-on)
(request eldoc--last-request-state)
(t 'just-one-line)))
single-doc single-doc-sym)
;; Then, compose the contents of the `*eldoc*' buffer.
(with-current-buffer (eldoc-doc-buffer)
;; Set doc-buffer's `eldoc--last-request-state', too
(setq eldoc--last-request-state request)
(let ((inhibit-read-only t))
(erase-buffer) (setq buffer-read-only t)
(local-set-key "q" 'quit-window)
(cl-loop for (docs . rest) on docs
for (this-doc . plist) = docs
for thing = (plist-get plist :thing)
when thing do
(cl-pushnew thing things-reported-on)
(setq this-doc
(concat
(propertize (format "%s" thing)
'face (plist-get plist :face))
": "
this-doc))
do (insert this-doc)
when rest do (insert "\n")))
;; Rename the buffer.
(when things-reported-on
(rename-buffer (format "*eldoc for %s*"
(mapconcat (lambda (s) (format "%s" s))
things-reported-on
", ")))))
;; Finally, output to the echo area. I'm pretty sure nicer
;; strategies can be used here, probably by splitting this
;; function into some `eldoc-display-functions' special hook.
(let ((echo-area-message
(cond
(;; We handle the `truncate-sym-name-if-fit' special
;; case first, by checking if for a lot of special
;; conditions.
(;; To output to the echo area, we handle the
;; `truncate-sym-name-if-fit' special case first, by
;; checking for a lot of special conditions.
(and
(eq 'truncate-sym-name-if-fit eldoc-echo-area-use-multiline-p)
(null (cdr docs))
@ -509,45 +585,32 @@ Honor most of `eldoc-echo-area-use-multiline-p'."
(not (string-match "\n" single-doc))
(> (+ (length single-doc) (length single-doc-sym) 2) width))
single-doc)
((> available 1)
;; The message takes one extra line, so if we don't
;; display that, we have one extra line to use.
(unless eldoc-display-truncation-message
(setq available (1+ available)))
(with-current-buffer (eldoc-doc-buffer)
(cl-loop
initially
(goto-char (point-min))
(goto-char (line-end-position (1+ available)))
for truncated = nil then t
for needed
= (let ((truncate-lines message-truncate-lines))
(count-screen-lines (point-min) (point) t
(minibuffer-window)))
while (> needed (if truncated (1- available) available))
do (goto-char (line-end-position (if truncated 0 -1)))
(while (and (not (bobp)) (bolp)) (goto-char (line-end-position 0)))
finally
(unless (and truncated
eldoc-prefer-doc-buffer
(get-buffer-window eldoc--doc-buffer))
(cl-return
(concat
(buffer-substring (point-min) (point))
(and
truncated
(if eldoc-display-truncation-message
(format
"\n(Documentation truncated. Use `%s' to see rest)"
(substitute-command-keys "\\[eldoc-doc-buffer]"))
"..."))))))))
((= available 1)
;; Truncate "brutally." ; FIXME: use `eldoc-prefer-doc-buffer' too?
(with-current-buffer (eldoc-doc-buffer)
(truncate-string-to-width
(buffer-substring (goto-char (point-min)) (line-end-position 1)) width))))))
((and (numberp available)
(cl-plusp available))
;; Else, given a positive number of logical lines, we
;; format the *eldoc* buffer, using as most of its
;; contents as we know will fit.
(with-current-buffer (eldoc--format-doc-buffer docs)
(eldoc--echo-area-substring available)))
(t ;; this is the "truncate brutally" situation
(let ((string
(with-current-buffer (eldoc--format-doc-buffer docs)
(buffer-substring (goto-char (point-min))
(line-end-position 1)))))
(if (> (length string) width) ; truncation to happen
(unless (eldoc--echo-area-prefer-doc-buffer-p t)
(truncate-string-to-width string width))
(unless (eldoc--echo-area-prefer-doc-buffer-p nil)
string)))))))
(when echo-area-message
(eldoc--message echo-area-message))))))
(eldoc--message echo-area-message)))))))
(defun eldoc-display-in-buffer (docs interactive)
"Display DOCS in a dedicated buffer.
If INTERACTIVE is t, also display the buffer."
(eldoc--format-doc-buffer docs)
(when interactive
(eldoc-doc-buffer)))
(defun eldoc-documentation-default ()
"Show first doc string for item at point.
@ -709,19 +772,29 @@ have the following values:
strings so far, as soon as possible."
(funcall eldoc--make-callback method))
(defun eldoc--invoke-strategy ()
(defun eldoc--invoke-strategy (interactive)
"Invoke `eldoc-documentation-strategy' function.
If INTERACTIVE is non-nil, the request came directly from a user
command, otherwise it came from ElDoc's idle
timer, `eldoc-timer'.
That function's job is to run the `eldoc-documentation-functions'
special hook, using the `run-hook' family of functions. ElDoc's
built-in strategy functions play along with the
`eldoc--make-callback' protocol, using it to produce callback to
feed to the functgions of `eldoc-documentation-functions'.
`eldoc--make-callback' protocol, using it to produce a callback
argument to feed the functions that the user places in
`eldoc-documentation-functions'. Whenever the strategy
determines it has information to display to the user, this
function passes responsibility to the functions in
`eldoc-display-functions'.
Other third-party strategy functions do not use
`eldoc--make-callback'. They must find some alternate way to
produce callbacks to feed to `eldoc-documentation-function' and
should endeavour to display the docstrings eventually produced."
Other third-party values of `eldoc-documentation-strategy' should
not use `eldoc--make-callback'. They must find some alternate
way to produce callbacks to feed to
`eldoc-documentation-function' and should endeavour to display
the docstrings eventually produced, using
`eldoc-display-functions'."
(let* (;; How many callbacks have been created by the strategy
;; function and passed to elements of
;; `eldoc-documentation-functions'.
@ -739,11 +812,12 @@ should endeavour to display the docstrings eventually produced."
(push (cons pos (cons string plist)) docs-registered)))
(display-doc
()
(eldoc--handle-docs
(mapcar #'cdr
(setq docs-registered
(sort docs-registered
(lambda (a b) (< (car a) (car b))))))))
(run-hook-with-args
'eldoc-display-functions (mapcar #'cdr
(setq docs-registered
(sort docs-registered
(lambda (a b) (< (car a) (car b))))))
interactive))
(make-callback
(method)
(let ((pos (prog1 howmany (cl-incf howmany))))
@ -786,22 +860,23 @@ should endeavour to display the docstrings eventually produced."
(defun eldoc-print-current-symbol-info (&optional interactive)
"Document thing at point."
(interactive '(t))
(let ((token (eldoc--request-state)))
(let (token)
(cond (interactive
(eldoc--invoke-strategy))
((not (eldoc--request-docs-p token))
;; Erase the last message if we won't display a new one.
(when eldoc-last-message
(eldoc--message nil)))
(t
(eldoc--invoke-strategy t))
((not (equal (setq token (eldoc--request-state))
eldoc--last-request-state))
(let ((non-essential t))
(setq eldoc--last-request-state token)
;; Only keep looking for the info as long as the user hasn't
;; requested our attention. This also locally disables
;; inhibit-quit.
(while-no-input
(eldoc--invoke-strategy)))))))
(eldoc--invoke-strategy nil)))))))
;; This section only affects ElDoc output to the echo area, as in
;; `eldoc-display-in-echo-area'.
;;
;; When point is in a sexp, the function args are not reprinted in the echo
;; area after every possible interactive command because some of them print
;; their own messages in the echo area; the eldoc functions would instantly
@ -833,7 +908,6 @@ should endeavour to display the docstrings eventually produced."
(apply #'eldoc-remove-command
(all-completions name eldoc-message-commands))))
;; Prime the command list.
(eldoc-add-command-completions
"back-to-indentation"

View File

@ -1305,7 +1305,8 @@ EXPECTEDP specifies whether the result was expected."
"Pretty-print OBJECT, indenting it to the current column of point.
Ensures a final newline is inserted."
(let ((begin (point))
(pp-escape-newlines nil))
(pp-escape-newlines nil)
(print-escape-control-characters t))
(pp object (current-buffer))
(unless (bolp) (insert "\n"))
(save-excursion

View File

@ -25,25 +25,24 @@
;;; Code:
(require 'seq)
(require 'text-property-search)
(eval-when-compile (require 'cl-lib))
(defgroup shortdoc nil
"Short documentation."
:group 'lisp)
(defface shortdoc-section
(defface shortdoc-separator
'((((class color) (background dark))
:inherit variable-pitch :background "#303030" :extend t)
:height 0.1 :background "#505050" :extend t)
(((class color) (background light))
:inherit variable-pitch :background "#f0f0f0" :extend t))
"Face used for a section.")
:height 0.1 :background "#a0a0a0" :extend t)
(t :height 0.1 :inverse-video t :extend t))
"Face used to separate sections.")
(defface shortdoc-example
'((((class color) (background dark))
:background "#202020" :extend t)
(((class color) (background light))
:background "#e8e8e8" :extend t))
"Face used for examples.")
(defface shortdoc-section
'((t :inherit variable-pitch))
"Face used for a section.")
(defvar shortdoc--groups nil)
@ -78,6 +77,45 @@ There can be any number of :example/:result elements."
shortdoc--groups))
(push (cons ',group ',functions) shortdoc--groups)))
(define-short-documentation-group alist
"Alist Basics"
(assoc
:eval (assoc 'foo '((foo . bar) (zot . baz))))
(rassoc
:eval (rassoc 'bar '((foo . bar) (zot . baz))))
(assq
:eval (assq 'foo '((foo . bar) (zot . baz))))
(rassq
:eval (rassq 'bar '((foo . bar) (zot . baz))))
(assoc-string
:eval (assoc-string "foo" '(("foo" . "bar") ("zot" "baz"))))
"Manipulating Alists"
(assoc-delete-all
:eval (assoc-delete-all "foo" '(("foo" . "bar") ("zot" . "baz")) #'equal))
(assq-delete-all
:eval (assq-delete-all 'foo '((foo . bar) (zot . baz))))
(rassq-delete-all
:eval (rassq-delete-all 'bar '((foo . bar) (zot . baz))))
(alist-get
:eval (let ((foo '((bar . baz))))
(setf (alist-get 'bar foo) 'zot)
foo))
"Misc"
(assoc-default
:eval (assoc-default "foobar" '(("foo" . baz)) #'string-match))
(copy-alist
:eval (let* ((old '((foo . bar)))
(new (copy-alist old)))
(eq old new)))
;; FIXME: Outputs "\.rose" for the symbol `.rose'.
;; (let-alist
;; :eval (let ((colors '((rose . red)
;; (lily . white))))
;; (let-alist colors
;; (if (eq .rose 'red)
;; .lily))))
)
(define-short-documentation-group string
"Making Strings"
(make-string
@ -380,6 +418,37 @@ There can be any number of :example/:result elements."
:no-eval (set-file-acl "/tmp/foo" "group::rxx")
:eg-result t))
(define-short-documentation-group hash-table
"Hash Table Basics"
(make-hash-table
:no-eval (make-hash-table)
:result-string "#s(hash-table ...)")
(puthash
:no-eval (puthash 'key "value" table))
(gethash
:no-eval (gethash 'key table)
:eg-result "value")
(remhash
:no-eval (remhash 'key table)
:result nil)
(clrhash
:no-eval (clrhash table)
:result-string "#s(hash-table ...)")
(maphash
:no-eval (maphash (lambda (key value) (message value)) table)
:result nil)
"Other Hash Table Functions"
(hash-table-p
:eval (hash-table-p 123))
(copy-hash-table
:no-eval (copy-hash-table table)
:result-string "#s(hash-table ...)")
(hash-table-count
:no-eval (hash-table-count table)
:eg-result 15)
(hash-table-size
:no-eval (hash-table-size table)
:eg-result 65))
(define-short-documentation-group list
"Making Lists"
@ -557,15 +626,6 @@ There can be any number of :example/:result elements."
:eval (replace-regexp-in-string "[a-z]+" "_" "*foo*"))
(string-match-p
:eval (string-match-p "^[fo]+" "foobar"))
(match-string
:eval (and (string-match "^\\([fo]+\\)b" "foobar")
(match-string 0 "foobar")))
(match-beginning
:no-eval (match-beginning 1)
:eg-result 0)
(match-end
:no-eval (match-end 1)
:eg-result 3)
"Looking in Buffers"
(re-search-forward
:no-eval (re-search-forward "^foo$" nil t)
@ -576,6 +636,25 @@ There can be any number of :example/:result elements."
(looking-at-p
:no-eval (looking-at "f[0-9]")
:eg-result t)
"Match Data"
(match-string
:eval (and (string-match "^\\([fo]+\\)b" "foobar")
(match-string 0 "foobar")))
(match-beginning
:no-eval (match-beginning 1)
:eg-result 0)
(match-end
:no-eval (match-end 1)
:eg-result 3)
(save-match-data
:no-eval (save-match-data ...))
"Replacing Match"
(replace-match
:no-eval (replace-match "new")
:eg-result nil)
(match-substitute-replacement
:no-eval (match-substitute-replacement "new")
:eg-result "new")
"Utilities"
(regexp-quote
:eval (regexp-quote "foo.*bar"))
@ -584,7 +663,28 @@ There can be any number of :example/:result elements."
(regexp-opt-depth
:eval (regexp-opt-depth "\\(a\\(b\\)\\)"))
(regexp-opt-charset
:eval (regexp-opt-charset '(?a ?b ?c ?d ?e))))
:eval (regexp-opt-charset '(?a ?b ?c ?d ?e)))
"The `rx' Structured Regexp Notation"
(rx
:eval (rx "IP=" (+ digit) (= 3 "." (+ digit))))
(rx-to-string
:eval (rx-to-string '(| "foo" "bar")))
(rx-define
:no-eval "(and (rx-define haskell-comment (seq \"--\" (zero-or-more nonl)))
(rx haskell-comment))"
:result "--.*")
(rx-let
:eval "(rx-let ((comma-separated (item) (seq item (0+ \",\" item)))
(number (1+ digit))
(numbers (comma-separated number)))
(rx \"(\" numbers \")\"))"
:result "([[:digit:]]+\\(?:,[[:digit:]]+\\)*)")
(rx-let-eval
:eval "(rx-let-eval
'((ponder (x) (seq \"Where have all the \" x \" gone?\")))
(rx-to-string
'(ponder (or \"flowers\" \"cars\" \"socks\"))))"
:result "\\(?:Where have all the \\(?:\\(?:car\\|flower\\|sock\\)s\\) gone\\?\\)"))
(define-short-documentation-group sequence
"Sequence Predicates"
@ -963,19 +1063,27 @@ There can be any number of :example/:result elements."
(unless (assq group shortdoc--groups)
(error "No such documentation group %s" group))
(pop-to-buffer (format "*Shortdoc %s*" group))
(let ((inhibit-read-only t))
(let ((inhibit-read-only t)
(prev nil))
(erase-buffer)
(special-mode)
(shortdoc-mode)
(button-mode)
(mapc
(lambda (data)
(cond
((stringp data)
(setq prev nil)
(unless (bobp)
(insert "\n"))
(insert (propertize
(concat data "\n\n")
'face '(variable-pitch (:height 1.3 :weight bold)))))
(concat (substitute-command-keys data) "\n\n")
'face '(variable-pitch (:height 1.3 :weight bold))
'shortdoc-section t)))
;; There may be functions not yet defined in the data.
((fboundp (car data))
(when prev
(insert (propertize "\n" 'face 'shortdoc-separator)))
(setq prev t)
(shortdoc--display-function data))))
(cdr (assq group shortdoc--groups))))
(goto-char (point-min)))
@ -985,7 +1093,8 @@ There can be any number of :example/:result elements."
(start-section (point))
arglist-start)
;; Function calling convention.
(insert "(")
(insert (propertize "("
'shortdoc-function t))
(if (plist-get data :no-manual)
(insert (symbol-name function))
(insert-text-button
@ -1001,8 +1110,7 @@ There can be any number of :example/:result elements."
(car (split-string (documentation function) "\n"))))
(insert "\n")
(add-face-text-property start-section (point) 'shortdoc-section t)
(let ((start (point))
(print-escape-newlines t)
(let ((print-escape-newlines t)
(double-arrow (if (char-displayable-p ?⇒)
""
"=>"))
@ -1057,9 +1165,7 @@ There can be any number of :example/:result elements."
(:eg-result-string
(insert " eg. " double-arrow " ")
(princ value (current-buffer))
(insert "\n"))))
(put-text-property start (point) 'face 'shortdoc-example))
(insert "\n")
(insert "\n")))))
;; Insert the arglist after doing the evals, in case that's pulled
;; in the function definition.
(save-excursion
@ -1098,6 +1204,51 @@ Example:
(setq slist (cdr slist)))
(setcdr slist (cons elem (cdr slist))))))
(defvar shortdoc-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "n") 'shortdoc-next)
(define-key map (kbd "p") 'shortdoc-previous)
(define-key map (kbd "C-c C-n") 'shortdoc-next-section)
(define-key map (kbd "C-c C-p") 'shortdoc-previous-section)
map)
"Keymap for `shortdoc-mode'")
(define-derived-mode shortdoc-mode special-mode "shortdoc"
"Mode for shortdoc.")
(defmacro shortdoc--goto-section (arg sym &optional reverse)
`(progn
(unless (natnump ,arg)
(setq ,arg 1))
(while (< 0 ,arg)
(,(if reverse
'text-property-search-backward
'text-property-search-forward)
,sym t)
(setq ,arg (1- ,arg)))))
(defun shortdoc-next (&optional arg)
"Move cursor to next function."
(interactive "p")
(shortdoc--goto-section arg 'shortdoc-function))
(defun shortdoc-previous (&optional arg)
"Move cursor to previous function."
(interactive "p")
(shortdoc--goto-section arg 'shortdoc-function t)
(backward-char 1))
(defun shortdoc-next-section (&optional arg)
"Move cursor to next section."
(interactive "p")
(shortdoc--goto-section arg 'shortdoc-section))
(defun shortdoc-previous-section (&optional arg)
"Move cursor to previous section."
(interactive "p")
(shortdoc--goto-section arg 'shortdoc-section t)
(forward-line -2))
(provide 'shortdoc)
;;; shortdoc.el ends here

View File

@ -34,11 +34,11 @@
"Search for the next region of text whose PROPERTY matches VALUE.
If not found, return nil and don't move point.
If found, move point to end of the region and return a `prop-match'
object describing the match. To access the details of the match,
use `prop-match-beginning' and `prop-match-end' for the buffer
positions that limit the region, and `prop-match-value' for the
value of PROPERTY in the region.
If found, move point to the start of the region and return a
`prop-match' object describing the match. To access the details
of the match, use `prop-match-beginning' and `prop-match-end' for
the buffer positions that limit the region, and
`prop-match-value' for the value of PROPERTY in the region.
PREDICATE is used to decide whether a value of PROPERTY should be
considered as matching VALUE.
@ -125,7 +125,7 @@ that matches VALUE."
"Search for the previous region of text whose PROPERTY matches VALUE.
Like `text-property-search-forward', which see, but searches backward,
and if a matching region is found, moves point to its beginning."
and if a matching region is found, place point at its end."
(interactive
(list
(let ((string (completing-read "Search for property: " obarray)))

View File

@ -49,23 +49,25 @@
(let ((time (list (aref timer 1)
(aref timer 2)
(aref timer 3))))
(format "%10.2f"
(float-time
(if (aref timer 7)
time
(time-subtract time nil)))))
'help-echo "Time in sec till next invocation")
(format "%12s"
(format-seconds "%dd %hh %mm %z%,1ss"
(float-time
(if (aref timer 7)
time
(time-subtract time nil))))))
'help-echo "Time until next invocation")
;; Repeat.
,(propertize
(let ((repeat (aref timer 4)))
(cond
((numberp repeat)
(format "%8.1f" repeat))
((null repeat)
" -")
(t
(format "%8s" repeat))))
'help-echo "Symbol: repeat; number: repeat interval in sec")
,(let ((repeat (aref timer 4)))
(cond
((numberp repeat)
(propertize
(format "%12s" (format-seconds
"%dd %hh %mm %z%,1ss" repeat))
'help-echo "Repeat interval"))
((null repeat)
(propertize " -" 'help-echo "Runs once"))
(t
(format "%12s" repeat))))
;; Function.
,(propertize
(let ((cl-print-compiled 'static)
@ -93,8 +95,8 @@
(setq-local revert-buffer-function #'list-timers)
(setq tabulated-list-format
'[("Idle" 6 timer-list--idle-predicate)
(" Next" 12 timer-list--next-predicate)
(" Repeat" 11 timer-list--repeat-predicate)
(" Next" 12 timer-list--next-predicate)
(" Repeat" 12 timer-list--repeat-predicate)
("Function" 10 timer-list--function-predicate)]))
(defun timer-list--idle-predicate (A B)

View File

@ -91,17 +91,41 @@
in the parse.")
(put 'unsafep-vars 'risky-local-variable t)
;;Other safe functions
;; Other safe forms.
;;
;; A function, macro or special form may be put here only if all of
;; the following statements are true:
;;
;; * It is not already marked `pure' or `side-effect-free', or handled
;; explicitly by `unsafep'.
;;
;; * It is not inherently unsafe; eg, would allow the execution of
;; arbitrary code, interact with the file system, network or other
;; processes, or otherwise exfiltrate information from the running
;; Emacs process or manipulate the user's environment.
;;
;; * It does not have side-effects that can make other code behave in
;; unsafe and/or unexpected ways; eg, set variables, mutate data, or
;; change control flow.
;; Any side effect must be innocuous; altering the match data is
;; explicitly permitted.
;;
;; * It does not allow Emacs to behave deceptively to the user; eg,
;; display arbitrary messages.
;;
;; * It does not present a potentially large attack surface; eg,
;; play arbitrary audio files.
(dolist (x '(;;Special forms
and catch if or prog1 prog2 progn while unwind-protect
and if or prog1 prog2 progn while unwind-protect
;;Safe subrs that have some side-effects
ding error random signal sleep-for string-match throw
ding random sleep-for string-match
;;Defsubst functions from subr.el
caar cadr cdar cddr
;;Macros from subr.el
save-match-data unless when
;;Functions from subr.el that have side effects
split-string replace-regexp-in-string play-sound-file))
split-string))
(put x 'safe-function t))
;;;###autoload

View File

@ -37,26 +37,56 @@
(require 'rect)
;; If non-nil, restrict current region to this rectangle.
;; Value is a vector [top bot left right corner ins virt select].
;; CORNER specifies currently active corner 0=t/l 1=t/r 2=b/l 3=b/r.
;; INS specifies whether to insert on left(nil) or right(t) side.
;; If VIRT is non-nil, virtual straight edges are enabled.
;; If SELECT is a regexp, only lines starting with that regexp are affected.")
(defvar cua--rectangle nil)
(defvar cua--rectangle nil
"If non-nil, restrict current region to this rectangle.
A cua-rectangle definition is a vector used for all actions in
`cua-rectangle-mark-mode', of the form:
[top bot left right corner ins virt select]
TOP is the upper-left corner point.
BOTTOM is the point at the end of line after the the lower-right
corner point.
LEFT and RIGHT are column numbers.
CORNER specifies currently active corner 0=t/l 1=t/r 2=b/l 3=b/r.
INS specifies whether to insert on left(nil) or right(t) side.
If VIRT is non-nil, virtual straight edges are enabled.
If SELECT is a regexp, only lines starting with that regexp are
affected.")
(make-variable-buffer-local 'cua--rectangle)
;; Most recent rectangle geometry. Note: car is buffer.
(defvar cua--last-rectangle nil)
(defvar cua--last-rectangle nil
"Most recent rectangle geometry.
A CONS cell, the car of which is the rectangle's buffer, and the
cdr of which is a cua-rectangle definition.
See `cua--rectangle'.")
;; Rectangle restored by undo.
(defvar cua--restored-rectangle nil)
(defvar cua--restored-rectangle nil
"Rectangle restored by undo.")
;; Last rectangle copied/killed; nil if last kill was not a rectangle.
;; FIXME: The above seems to be incorrect:
;; + It seems to be the two most recent killed rectangles, and is not
;; reset upon either a `kill-region' or `kill-line'
;; + In the following example, the rectangle full of question marks
;; was killed prior to the rectangle with the string "active".
;; (#("???e\n??? \n???i\n???," 0 19
;; (yank-handler
;; (rectangle--insert-for-yank
;; ("???e" "??? " "???i" "???,")
;; t)))
;; "active " "sert on" " straig" " lines ")
(defvar cua--last-killed-rectangle nil)
;; List of overlays used to display current rectangle.
(defvar cua--rectangle-overlays nil)
(defvar cua--rectangle-overlays nil
"List of overlays used to display current rectangle.")
(make-variable-buffer-local 'cua--rectangle-overlays)
(put 'cua--rectangle-overlays 'permanent-local t)
@ -522,7 +552,7 @@ If command is repeated at same position, delete the rectangle."
;;; Operations on current rectangle
(defun cua--tabify-start (start end)
;; Return position where auto-tabify should start (or nil if not required).
"Return position where auto-tabify should start (or nil if not required)."
(save-excursion
(save-restriction
(widen)
@ -538,15 +568,15 @@ If command is repeated at same position, delete the rectangle."
start)))))
(defun cua--rectangle-operation (keep-clear visible undo pad tabify &optional fct post-fct)
;; Call FCT for each line of region with 4 parameters:
;; Region start, end, left-col, right-col
;; Point is at start when FCT is called
;; Call fct with (s,e) = whole lines if VISIBLE non-nil.
;; Only call fct for visible lines if VISIBLE==t.
;; Set undo boundary if UNDO is non-nil.
;; Rectangle is padded if PAD = t or numeric and (cua--rectangle-virtual-edges)
;; Perform auto-tabify after operation if TABIFY is non-nil.
;; Mark is kept if keep-clear is 'keep and cleared if keep-clear is 'clear.
"Call FCT for each line of region with 4 parameters:
Region start, end, left-col, right-col.
Point is at start when FCT is called.
Call fct with (s,e) = whole lines if VISIBLE non-nil.
Only call fct for visible lines if VISIBLE==t.
Set undo boundary if UNDO is non-nil.
Rectangle is padded if PAD = t or numeric and (cua--rectangle-virtual-edges)
Perform auto-tabify after operation if TABIFY is non-nil.
Mark is kept if keep-clear is 'keep and cleared if keep-clear is 'clear."
(let* ((inhibit-field-text-motion t)
(start (cua--rectangle-top))
(end (cua--rectangle-bot))
@ -683,9 +713,9 @@ If command is repeated at same position, delete the rectangle."
(nreverse rect)))
(defun cua--insert-rectangle (rect &optional below paste-column line-count)
;; Insert rectangle as insert-rectangle, but don't set mark and exit with
;; point at either next to top right or below bottom left corner
;; Notice: In overwrite mode, the rectangle is inserted as separate text lines.
"Insert rectangle as insert-rectangle, but don't set mark and exit with
point at either next to top right or below bottom left corner
Notice: In overwrite mode, the rectangle is inserted as separate text lines."
(if (eq below 'auto)
(setq below (and (bolp)
(or (eolp) (eobp) (= (1+ (point)) (point-max))))))

View File

@ -9116,7 +9116,7 @@
2002-11-10 Alex Schroeder <alex@gnu.org>
* TODO:
TODO: moved it to http://www.emacswiki.org/cgi-bin/wiki.pl?ErcTODO
TODO: moved it to https://www.emacswiki.org/cgi-bin/wiki.pl?ErcTODO
* erc.el(with-erc-channel-buffer): Rudimentary doc string.

View File

@ -408,7 +408,7 @@ This string is processed using `format-time-string'."
;;; Flood-related
;; Most of this is courtesy of Jorgen Schaefer and Circe
;; (http://www.nongnu.org/circe)
;; (https://www.nongnu.org/circe)
(defcustom erc-server-flood-margin 10
"A margin on how much excess data we send.

View File

@ -439,7 +439,10 @@ Remove the DIRECTORY(ies), if they are empty.")
(setq link (file-symlink-p source)))
(progn
(apply 'eshell-funcalln 'make-symbolic-link
link target args)
link target
;; `make-symbolic-link' doesn't have
;; KEEP-TIME; just OK-IF-ALREADY-EXISTS.
(list (car args)))
(if (eq func 'rename-file)
(if (and (file-directory-p source)
(not (file-symlink-p source)))

View File

@ -6959,6 +6959,9 @@ If DIR's free space cannot be obtained, this function returns nil."
s "+"
"\\(" HH:MM "\\|" yyyy "\\)"))
(western-comma (concat month s "+" dd "," s "+" yyyy))
;; This represents the date in strftime(3) format "%e-%b-%Y"
;; (aka "%v"), as it is the default for many ls incarnations.
(DD-MMM-YYYY (concat dd "-" month "-" yyyy s HH:MM))
;; Japanese MS-Windows ls-lisp has one-digit months, and
;; omits the Kanji characters after month and day-of-month.
;; On Mac OS X 10.3, the date format in East Asian locales is
@ -6986,7 +6989,8 @@ If DIR's free space cannot be obtained, this function returns nil."
;; This is not supported yet.
(purecopy (concat "\\([0-9][BkKMGTPEZY]? " iso
"\\|.*[0-9][BkKMGTPEZY]? "
"\\(" western "\\|" western-comma "\\|" east-asian "\\)"
"\\(" western "\\|" western-comma
"\\|" DD-MMM-YYYY "\\|" east-asian "\\)"
"\\) +")))
"Regular expression to match up to the file name in a directory listing.
The default value is designed to recognize dates and times

View File

@ -168,10 +168,9 @@
;; modified (using text-property `read-only').
;; Also, the read-write fields are shown using a
;; distinct face, if possible.
;; As of emacs 19.29, the `intangible' text property
;; is used to prevent moving into read-only fields.
;; This variable defaults to t if running Emacs 19 or
;; later with text properties.
;; The `intangible' text property is used to
;; prevent moving into read-only fields.
;; This variable defaults to t.
;; The default face to show read-write fields is
;; copied from face `region'.
;;
@ -363,8 +362,7 @@ This variable is for use by the filter routines only.
The contents may NOT be modified.")
(defcustom forms-use-text-properties t
"Non-nil means: use text properties.
Defaults to t if this Emacs is capable of handling text properties."
"Non-nil means to use text properties. "
:group 'forms
:type 'boolean)

View File

@ -1934,7 +1934,7 @@ for FRAME."
;; features change, it will be easy to find all the tests for such
;; capabilities by a simple text search. See more about the history
;; and the intent of these functions in
;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2019-04/msg00004.html
;; https://lists.gnu.org/archive/html/bug-gnu-emacs/2019-04/msg00004.html
;; or in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35058#17.
(declare-function msdos-mouse-p "dosfns.c")

View File

@ -2169,7 +2169,9 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")."
(interactive)
(save-excursion
(when (article-goto-body)
(let ((inhibit-read-only t))
(require 'ansi-color)
(let ((inhibit-read-only t)
(ansi-color-context-region nil))
(ansi-color-apply-on-region (point) (point-max))))))
(defun gnus-article-treat-unfold-headers ()

View File

@ -1013,6 +1013,12 @@ FILENAME exists and is Babyl format."
(rmail-swap-buffers-maybe)
(rmail-maybe-set-message-counters))
(widen)
(unless babyl
(goto-char (point-max))
;; Ensure we have a blank line before the next message.
(unless (bolp)
(insert "\n"))
(insert "\n"))
(narrow-to-region (point-max) (point-max)))
(insert-buffer-substring tmpbuf)
(when msg

View File

@ -2788,9 +2788,7 @@ Consider adding this function to `message-header-setup-hook'"
;; add URL
(when (nth 1 message-openpgp-header)
(when need-sep (insert "; "))
(if (string-match-p ";")
(insert "url=\"" (nth 1 message-openpgp-header) "\"")
(insert "url=\"" (nth 1 message-openpgp-header) "\""))
(insert "url=\"" (nth 1 message-openpgp-header) "\"")
(setq need-sep t))
;; add preference
(when (nth 2 message-openpgp-header)

View File

@ -756,16 +756,15 @@ Show all docs for that symbol as either a variable, function or face."
(help-do-xref pos #'describe-symbol (list sym))
(user-error "No symbol here"))))
(defun help-mode-revert-buffer (_ignore-auto noconfirm)
(when (or noconfirm (yes-or-no-p "Revert help buffer? "))
(let ((pos (point))
(item help-xref-stack-item)
;; Pretend there is no current item to add to the history.
(help-xref-stack-item nil)
;; Use the current buffer.
(help-xref-following t))
(apply (car item) (cdr item))
(goto-char pos))))
(defun help-mode-revert-buffer (_ignore-auto _noconfirm)
(let ((pos (point))
(item help-xref-stack-item)
;; Pretend there is no current item to add to the history.
(help-xref-stack-item nil)
;; Use the current buffer.
(help-xref-following t))
(apply (car item) (cdr item))
(goto-char pos)))
(defun help-insert-string (string)
"Insert STRING to the help buffer and install xref info for it.

View File

@ -191,6 +191,7 @@
(kanbun #x319D)
(han #x5B57)
(yi #xA288)
(javanese #xA980)
(cham #xAA00)
(tai-viet #xAA80)
(hangul #xAC00)
@ -723,6 +724,7 @@
symbol
braille
yi
javanese
tai-viet
aegean-number
ancient-greek-number

View File

@ -39,7 +39,7 @@
;; Society of Japan/Information Technology Standards Commission of
;; Japan (IPSJ/ITSCJ) at https://www.itscj.ipsj.or.jp/itscj_english/.
;; Standards docs equivalent to iso-2022 and iso-8859 are at
;; http://www.ecma.ch/.
;; https://www.ecma.ch/.
;; FWIW, http://www.microsoft.com/globaldev/ lists the following for
;; MS Windows, which are presumably the only charsets we really need

View File

@ -54,7 +54,6 @@
;;; Code:
(eval-when-compile (require 'cl-lib))
(declare-function tmm-menubar-keymap "tmm.el")
;; Some additional options and constants.
@ -505,7 +504,7 @@ This is like `describe-bindings', but displays only Isearch keys."
(require 'tmm)
(run-hooks 'menu-bar-update-hook)
(let ((command nil))
(let ((menu-bar (tmm-menubar-keymap)))
(let ((menu-bar (menu-bar-keymap)))
(with-isearch-suspended
(setq command (let ((isearch-mode t)) ; Show bindings from
; `isearch-mode-map' in

View File

@ -26,7 +26,7 @@
;;; Commentary:
;; This library implements the JSONRPC 2.0 specification as described
;; in http://www.jsonrpc.org/. As the name suggests, JSONRPC is a
;; in https://www.jsonrpc.org/. As the name suggests, JSONRPC is a
;; generic Remote Procedure Call protocol designed around JSON
;; objects. To learn how to write JSONRPC programs with this library,
;; see Info node `(elisp)JSONRPC'."

View File

@ -1,4 +1,4 @@
;;; burmese.el --- support for Burmese -*- coding: utf-8 -*-
;;; burmese.el --- support for Burmese -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)

View File

@ -1,4 +1,4 @@
;;; cham.el --- support for Cham -*- coding: utf-8 -*-
;;; cham.el --- support for Cham -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2008, 2009, 2010, 2011, 2012
;; National Institute of Advanced Industrial Science and Technology (AIST)

View File

@ -1,4 +1,4 @@
;;; czech.el --- support for Czech -*- coding: utf-8 -*-
;;; czech.el --- support for Czech -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1998, 2001-2020 Free Software Foundation, Inc.

View File

@ -1,4 +1,4 @@
;;; georgian.el --- language support for Georgian
;;; georgian.el --- language support for Georgian -*- lexical-binding: t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc.

View File

@ -1,4 +1,4 @@
;;; greek.el --- support for Greek
;;; greek.el --- support for Greek -*- lexical-binding: t -*-
;; Copyright (C) 2002, 2013-2020 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,

View File

@ -1,4 +1,4 @@
;;; khmer.el --- support for Khmer -*- coding: utf-8 -*-
;;; khmer.el --- support for Khmer -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)

View File

@ -149,11 +149,50 @@ thin (i.e. 1-dot width) space."
;; Hieroglyphs in "quadrats", as directed by the format controls,
;; which specify how the hieroglyphs should be joined horizontally and
;; vertically.
(set-char-table-range
composition-function-table
'(#x13000 . #x1343F)
(list (vector "[\U00013000-\U0001343F]+"
0 'compose-gstring-for-graphic)))
(defun egyptian-shape-grouping (gstring direction)
(if (= (lgstring-char gstring 0) #x13437)
(let ((nchars (lgstring-char-len gstring))
(i 1)
(nesting 1)
ch)
;; Find where this group ends.
(while (and (< i nchars) (> nesting 0))
(setq ch (lgstring-char gstring i))
(cond
((= ch #x13437)
(setq nesting (1+ nesting)))
((= ch #x13438)
(setq nesting (1- nesting))))
(setq i (1+ i)))
(when (zerop nesting)
;; Make a new gstring from the characters that constitute a
;; complete nested group.
(let ((new-header (make-vector (1+ i) nil))
(new-gstring (make-vector (+ i 2) nil)))
(aset new-header 0 (lgstring-font gstring))
(dotimes (j i)
(aset new-header (1+ j) (lgstring-char gstring j))
(lgstring-set-glyph new-gstring j (lgstring-glyph gstring j)))
(lgstring-set-header new-gstring new-header)
(font-shape-gstring new-gstring direction))))))
(let ((hieroglyph "[\U00013000-\U0001342F]"))
;; HORIZONTAL/VERTICAL JOINER and INSERT AT.../OVERLAY controls
(set-char-table-range
composition-function-table
'(#x13430 . #x13436)
(list (vector (concat hieroglyph "[\U00013430-\U00013436]" hieroglyph)
;; We use font-shape-gstring so that, if the font
;; doesn't support these controls, the glyphs are
;; displayed individually, and not as a single
;; grapheme cluster.
1 'font-shape-gstring)))
;; Grouping controls
(set-char-table-range
composition-function-table
#x13437
(list (vector "\U00013437[\U00013000-\U0001343F]+"
0 'egyptian-shape-grouping))))
(provide 'misc-lang)

View File

@ -1,4 +1,4 @@
;;; romanian.el --- support for Romanian -*- coding: utf-8 -*-
;;; romanian.el --- support for Romanian -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1998, 2001-2020 Free Software Foundation, Inc.

View File

@ -1,4 +1,4 @@
;;; sinhala.el --- support for Sinhala -*- coding: utf-8 -*-
;;; sinhala.el --- support for Sinhala -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)

View File

@ -1,4 +1,4 @@
;;; slovak.el --- support for Slovak -*- coding: utf-8 -*-
;;; slovak.el --- support for Slovak -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1998, 2001-2020 Free Software Foundation, Inc.

View File

@ -1,4 +1,4 @@
;;; tai-viet.el --- support for Tai Viet -*- coding: utf-8 -*-
;;; tai-viet.el --- support for Tai Viet -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 2007-2020 Free Software Foundation, Inc.
;; Copyright (C) 2007, 2008, 2009, 2010, 2011

View File

@ -1,4 +1,4 @@
;;; vietnamese.el --- support for Vietnamese -*- coding: utf-8; -*-
;;; vietnamese.el --- support for Vietnamese -*- coding: utf-8; lexical-binding: t -*-
;; Copyright (C) 1998, 2001-2020 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,

View File

@ -836,6 +836,9 @@ Return nil if no time switch found."
((memq ?t switches) 5) ; last modtime
((memq ?u switches) 4))) ; last access
(defvar ls-lisp--time-locale nil
"Locale to be used for formatting file times.")
(defun ls-lisp-format-time (file-attr time-index)
"Format time for file with attributes FILE-ATTR according to TIME-INDEX.
Use the same method as ls to decide whether to show time-of-day or year,
@ -851,11 +854,13 @@ All ls time options, namely c, t and u, are handled."
(condition-case nil
;; Use traditional time format in the C or POSIX locale,
;; ISO-style time format otherwise, so columns line up.
(let ((locale system-time-locale))
(let ((locale (or system-time-locale ls-lisp--time-locale)))
(if (not locale)
(let ((vars '("LC_ALL" "LC_TIME" "LANG")))
(while (and vars (not (setq locale (getenv (car vars)))))
(setq vars (cdr vars)))))
(setq vars (cdr vars)))
;; Cache the locale for next calls.
(setq ls-lisp--time-locale (or locale "C"))))
(if (member locale '("C" "POSIX"))
(setq locale nil))
(format-time-string

View File

@ -317,7 +317,7 @@ If HEADER-ONLY is non-nil only decode header and return filename."
(binhex-decode-region-external start end)
(binhex-decode-region-internal start end)))
(define-obsolete-function-alias 'binhex-char-int #'identity)
(define-obsolete-function-alias 'binhex-char-int #'identity "28.1")
(provide 'binhex)

View File

@ -519,8 +519,8 @@ Message buffer where you can explain more about the patch."
(add-hook 'message-send-hook
(lambda ()
(message-goto-body)
(insert "Tags: patch\nthanks\n\n"))
t)
(insert "Tags: patch\n\n"))
nil t)
(message-add-action
(lambda ()
;; Bury the help buffer (if it's shown).

View File

@ -1911,7 +1911,7 @@ see the variable feedmail-prompt-before-queue-user-alist.
(and (stringp feedmail-prompt-before-queue-help-supplement)
(princ feedmail-prompt-before-queue-help-supplement))
(with-current-buffer standard-output
(if (fboundp 'help-mode) (help-mode)))))
(help-mode))))
(defun feedmail-message-action-scroll-up ()
@ -1972,13 +1972,9 @@ backup file names and the like)."
(list-of-possible-fqms))
(if (and (> q-cnt 0) feedmail-queue-runner-confirm-global)
(setq do-the-run
(if (fboundp 'y-or-n-p-with-timeout)
(y-or-n-p-with-timeout (format "FQM: Draft: %dm+%d, Queue: %dm+%d; run the queue? "
d-cnt d-oth q-cnt q-oth)
5 nil)
(y-or-n-p (format "FQM: Draft: %dm+%d, Queue: %dm+%d; run the queue? "
d-cnt d-oth q-cnt q-oth))
)))
(y-or-n-p-with-timeout (format "FQM: Draft: %dm+%d, Queue: %dm+%d; run the queue? "
d-cnt d-oth q-cnt q-oth)
5 nil)))
(if (not do-the-run)
(setq messages-skipped q-cnt)
(save-window-excursion
@ -1997,15 +1993,10 @@ backup file names and the like)."
(if (and already-buffer (buffer-modified-p already-buffer))
(save-window-excursion
(display-buffer (set-buffer already-buffer))
(if (fboundp 'y-or-n-p-with-timeout)
;; make a guess that the user just forgot to save
(if (y-or-n-p-with-timeout (format "FQM: Visiting %s; save before send? " blobby) 10 t)
(save-buffer))
(if (y-or-n-p (format "FQM: Visiting %s; save before send? " blobby))
(save-buffer))
)))
(set-buffer blobby-buffer)
;; make a guess that the user just forgot to save
(if (y-or-n-p-with-timeout (format "FQM: Visiting %s; save before send? " blobby) 10 t)
(save-buffer))))
(set-buffer blobby-buffer)
(setq buffer-offer-save nil)
(buffer-disable-undo blobby-buffer)
(insert-file-contents-literally maybe-file)
@ -2158,17 +2149,8 @@ you can set `feedmail-queue-reminder-alist' to nil."
(setq answer (cons '^ helper))
(if (or (eq user-sez ?\C-m) (eq user-sez ?\C-j) (eq user-sez ?y))
(setq user-sez d-char))
;; these char-to-int things are because of some
;; incomprehensible difference between the two in
;; byte-compiled stuff between Emacs and XEmacs
;; (well, I'm sure someone could comprehend it,
;; but I say 'uncle')
(setq answer (or (assoc user-sez user-alist)
(and (fboundp 'char-to-int)
(assoc (char-to-int user-sez) user-alist))
(assoc user-sez standard-alist)
(and (fboundp 'char-to-int)
(assoc (char-to-int user-sez) standard-alist))))
(setq answer (or (assoc user-sez user-alist)
(assoc user-sez standard-alist)))
(if (or (null answer) (null (cdr answer)))
(progn
(beep)
@ -2414,7 +2396,7 @@ mapped to mostly alphanumerics for safety."
;; mail-aliases nil = mail-abbrevs.el
(feedmail-say-debug "expanding mail aliases")
(if (or feedmail-force-expand-mail-aliases
(and (fboundp 'expand-mail-aliases) mail-aliases))
mail-aliases)
(expand-mail-aliases (point-min) eoh-marker))
;; Make it pretty.
@ -3130,8 +3112,7 @@ been weeded out."
;; won't delete the newly created frame upon exit!
(save-window-excursion
(switch-to-buffer buffer)
(if (and (fboundp 'y-or-n-p-with-timeout)
(numberp feedmail-confirm-outgoing-timeout))
(if (numberp feedmail-confirm-outgoing-timeout)
(y-or-n-p-with-timeout
"FQM: Send this email? "
(abs feedmail-confirm-outgoing-timeout)

View File

@ -116,15 +116,6 @@ For example, you may want to set this to (\"-Z2\") to reduce header length."
(require 'mail-utils)
(eval-and-compile
(if (fboundp 'point-at-bol)
(defalias 'hashcash-point-at-bol 'point-at-bol)
(defalias 'hashcash-point-at-bol 'line-beginning-position))
(if (fboundp 'point-at-eol)
(defalias 'hashcash-point-at-eol 'point-at-eol)
(defalias 'hashcash-point-at-eol 'line-end-position)))
(defun hashcash-strip-quoted-names (addr)
(setq addr (mail-strip-quoted-names addr))
(if (and addr (string-match "\\`\\([^+@]+\\)\\+[^@]*\\(@.+\\)" addr))
@ -141,8 +132,8 @@ For example, you may want to set this to (\"-Z2\") to reduce header length."
(let ((token ""))
(cl-loop
(setq token
(concat token (buffer-substring (point) (hashcash-point-at-eol))))
(goto-char (hashcash-point-at-eol))
(concat token (buffer-substring (point) (line-end-position))))
(goto-char (line-end-position))
(forward-char 1)
(unless (looking-at "[ \t]") (cl-return token))
(while (looking-at "[ \t]") (forward-char 1))))))
@ -374,6 +365,9 @@ Prefix arg sets default accept amount temporarily."
(message "Payment valid"))
ok))))
(define-obsolete-function-alias 'hashcash-point-at-bol #'line-beginning-position "28.1")
(define-obsolete-function-alias 'hashcash-point-at-eol #'line-end-position "28.1")
(provide 'hashcash)
;;; hashcash.el ends here

View File

@ -1851,7 +1851,7 @@ place. It affects how `mail-extract-address-components' works."
;; Updated by the RIPE Network Coordination Centre.
;;
;; Source: ISO 3166 Maintenance Agency
;; http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1-semic.txt
;; https://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1-semic.txt
;; https://www.iana.org/domain-names.htm
;; https://www.iana.org/cctld/cctld-whois.htm
;; Latest change: 2007/11/15

View File

@ -1,4 +1,4 @@
;;; mail-parse.el --- Interface functions for parsing mail
;;; mail-parse.el --- Interface functions for parsing mail -*- lexical-binding: t -*-
;; Copyright (C) 1998-2020 Free Software Foundation, Inc.

View File

@ -1,4 +1,4 @@
;;; mail-prsvr.el --- Interface variables for parsing mail
;;; mail-prsvr.el --- Interface variables for parsing mail -*- lexical-binding: t -*-
;; Copyright (C) 1999-2020 Free Software Foundation, Inc.

View File

@ -931,8 +931,8 @@ a negative argument means to delete and move backward."
(not (and backward (bobp))))
(rmail-summary-goto-msg)
(with-current-buffer rmail-buffer
(rmail-delete-message)
(setq del-msg rmail-current-message))
(setq del-msg rmail-current-message)
(rmail-delete-message))
(rmail-summary-mark-deleted del-msg)
(while (and (not (if backward (bobp) (eobp)))
(save-excursion (beginning-of-line)

View File

@ -22,6 +22,16 @@
;; 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:
;; The MD4 Message-Digest Algorithm.
;;
;; The security of the MD4 hashing algorithm is very poor to
;; non-existent. It was declared obsolete by RFC 6150 in 2011:
;; https://tools.ietf.org/html/rfc6150
;;
;; You probably want to use `secure-hash' instead.
;;; Code:
;;;
@ -33,7 +43,12 @@
(defun md4 (in n)
"Return the MD4 hash for a string IN of length N bytes.
The returned hash is 16 bytes long. N is required to handle
strings containing the character 0."
strings containing the character 0.
The security of the MD4 hashing algorithm is very poor to
non-existent. It was declared obsolete by RFC 6150 in 2011.
You probably want to use `secure-hash' instead."
(let (m
(b (cons 0 (* n 8)))
(i 0)

Some files were not shown because too many files have changed in this diff Show More