Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk

This commit is contained in:
Yuuki Harano 2021-05-29 18:00:13 +09:00
commit 67ae4b6271
110 changed files with 3331 additions and 1555 deletions

View file

@ -185,8 +185,8 @@ x_default_search_path=@x_default_search_path@
# Where the etc/emacs.desktop file is to be installed.
desktopdir=$(datarootdir)/applications
# Where the etc/emacs.appdata.xml file is to be installed.
appdatadir=$(datarootdir)/metainfo
# Where the etc/emacs.metainfo.xml file is to be installed.
metainfodir=$(datarootdir)/metainfo
# Where the etc/emacs.service file is to be installed.
# The system value (typically /usr/lib/systemd/user) can be
@ -728,11 +728,11 @@ install-etc:
${srcdir}/etc/emacsclient.desktop > $${tmp}; \
${INSTALL_DATA} $${tmp} "$(DESTDIR)${desktopdir}/$${client_name}.desktop"; \
rm -f $${tmp}
umask 022; ${MKDIR_P} "$(DESTDIR)${appdatadir}"
tmp=etc/emacs.tmpappdata; rm -f $${tmp}; \
umask 022; ${MKDIR_P} "$(DESTDIR)${metainfodir}"
tmp=etc/emacs.tmpmetainfo; rm -f $${tmp}; \
sed -e "s/emacs\.desktop/${EMACS_NAME}.desktop/" \
${srcdir}/etc/emacs.appdata.xml > $${tmp}; \
${INSTALL_DATA} $${tmp} "$(DESTDIR)${appdatadir}/${EMACS_NAME}.appdata.xml"; \
${srcdir}/etc/emacs.metainfo.xml > $${tmp}; \
${INSTALL_DATA} $${tmp} "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml"; \
rm -f $${tmp}
umask 022; $(MKDIR_P) "$(DESTDIR)$(systemdunitdir)"
tmp=etc/emacs.tmpservice; rm -f $${tmp}; \
@ -818,7 +818,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc uninstall-gsettings-schemas
"hicolor/scalable/mimetypes/${EMACS_NAME}-document23.svg"; \
fi)
-rm -f "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop"
-rm -f "$(DESTDIR)${appdatadir}/${EMACS_NAME}.appdata.xml"
-rm -f "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml"
-rm -f "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"
ifneq (,$(use_gamedir))
for file in snake-scores tetris-scores; do \

View file

@ -32,7 +32,9 @@ s#^./temacs.*# \\& #
egrep --line-buffered -v "^make|\
^Loading|\
SCRAPE|\
INFO.*Scraping.*[.]\$|\
INFO.*Scraping.*[.] ?\$|\
INFO.*Scraping.*done\$|\
GEN.*etc/DOC|\
^Waiting for git|\
^Finding pointers|\
^Using load-path|\

View file

@ -2285,6 +2285,9 @@ doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
hybrid_malloc=
system_malloc=yes
dnl This must be before the test of $ac_cv_func_sbrk below.
AC_CHECK_FUNCS_ONCE([sbrk])
test $with_unexec = yes &&
case "$opsys" in
## darwin ld insists on the use of malloc routines in the System framework.
@ -4752,7 +4755,7 @@ AC_CHECK_HEADERS(valgrind/valgrind.h)
AC_CHECK_MEMBERS([struct unipair.unicode], [], [], [[#include <linux/kd.h>]])
AC_CHECK_FUNCS_ONCE([__lsan_ignore_object sbrk])
AC_CHECK_FUNCS_ONCE([__lsan_ignore_object])
AC_FUNC_FORK

View file

@ -795,6 +795,8 @@ Maintaining Large Programs
@ifnottex
* Emerge:: A convenient way of merging two versions of a program.
@end ifnottex
* Bug Reference:: Highlighting references to bug reports and browsing
them in their issue trackers.
Version Control

View file

@ -614,7 +614,10 @@ If you are running Emacs on the GNOME desktop, you can tell Emacs to
use the default system font by setting the variable
@code{font-use-system-font} to @code{t} (the default is @code{nil}).
For this to work, Emacs must have been compiled with support for
Gsettings (or the older Gconf).
Gsettings (or the older Gconf). (To be specific, the Gsettings
configuration names used are
@samp{org.gnome.desktop.interface monospace-font-name} and
@samp{org.gnome.desktop.interface font-name}.)
@item
Use the command line option @samp{-fn} (or @samp{--font}). @xref{Font

View file

@ -32,6 +32,10 @@ symbols (a.k.a.@: ``identifiers'') and their references.
A mode for merging changes to program sources made on separate
branches of development.
@end ifnottex
@item
A minor-mode for highlighting bug references and visiting the
referenced bug reports in their issue tracker.
@end itemize
If you are maintaining a large Lisp program, then in addition to the
@ -49,6 +53,8 @@ Lisp Regression Testing}).
@ifnottex
* Emerge:: A convenient way of merging two versions of a program.
@end ifnottex
* Bug Reference:: Highlighting references to bug reports and browsing
them in their issue trackers.
@end menu
@node Version Control
@ -3053,3 +3059,170 @@ the target should be built.
@ifnottex
@include emerge-xtra.texi
@end ifnottex
@node Bug Reference
@section Bug Reference
@cindex bug reference
Most projects with a certain amount of users track bug reports in some
issue tracking software which assigns each report a unique and short
number or identifier. Those are used to reference a given bug, e.g.,
in a source code comment above the code fixing some bug, in
documentation files, or in discussions on some mailinglist or IRC
channel.
@findex bug-reference-mode
@findex bug-reference-prog-mode
The minor modes @code{bug-reference-mode} and
@code{bug-reference-prog-mode} highlight such bug references and make
it possible to follow them to the corresponding bug report on the
project's issue tracker. @code{bug-reference-prog-mode} is a variant
of @code{bug-reference-mode} which highlights bug references only
inside source code comments and strings.
@vindex bug-reference-bug-regexp
@vindex bug-reference-url-format
For its working, bug reference mode needs to know the syntax of bug
references (@code{bug-reference-bug-regexp}), and the URL of the
tracker where bug reports can be looked up
(@code{bug-reference-url-format}). Since those are typically
different from project to project, it makes sense to specify them in
@pxref{Directory Variables} or @pxref{File Variables}.
For example, let's assume in our project, we usually write references
to bug reports as bug#1234, or Bug-1234 and that this bug's page on
the issue tracker is @url{https://project.org/issues/1234}, then
these local variables section would do.
@smallexample
;; Local Variables:
;; bug-reference-bug-regexp: "\\([Bb]ug[#-]\\)\\([0-9]+\\)"
;; bug-reference-url-format: "https://project.org/issues/%s"
;; End:
@end smallexample
The string captured by the second regexp group in
@code{bug-reference-bug-regexp} is used to replace the @code{%s}
template in the @code{bug-reference-url-format}.
Note that @code{bug-reference-url-format} may also be a function in
order to cater for more complex scenarios, e.g., when the part before
the actual bug number has to be used to distinguish between issues and
merge requests where each of them has a different URL.
@heading Automatic Setup
@vindex bug-reference-auto-setup-functions
If @code{bug-reference-mode} is activated,
@code{bug-reference-mode-hook} has been run and still
@code{bug-reference-bug-regexp}, and @code{bug-reference-url-format}
aren't both set, it'll try to setup suitable values for these two
variables itself by calling the functions in
@code{bug-reference-auto-setup-functions} one after the other until
one is able to set the variables.
@vindex bug-reference-setup-from-vc-alist
@vindex bug-reference-setup-from-mail-alist
@vindex bug-reference-setup-from-irc-alist
Right now, there are three types of setup functions.
@enumerate
@item
Setup for version-controlled files configurable by the variable
@code{bug-reference-setup-from-vc-alist}. The default is able to
setup GNU projects where @url{https://debbugs.gnu.org} is used as
issue tracker, Github projects where both bugs and pull requests are
referenced using the @code{#42} notation, and GitLab projects where
bugs are references with @code{#17}, too, but merge requests use the
@code{!18} notation.
@item
Setup for email guessing from mail folder/mbox names, and mail header
values configurable by the variable
@code{bug-reference-setup-from-mail-alist}. The built-in news- and
mailreader @ref{Gnus} and @ref{Rmail} are supported.
@item
Setup for IRC channels configurable by the variable
@code{bug-reference-setup-from-irc-alist}. The built-in IRC clients
Rcirc, @xref{Top, Rcirc,, rcirc, The Rcirc Manual}, and ERC,
@xref{Top, ERC,, erc, The ERC Manual}, are supported.
@end enumerate
For almost all of those modes, it's enough to simply enable
@code{bug-reference-mode}, only Rmail requires a slightly different
setup.
@smallexample
;; Use VC-based setup if file is under version control.
(add-hook 'prog-mode-hook #'bug-reference-prog-mode)
;; Gnus (summary & article buffers)
(add-hook 'gnus-mode-hook #'bug-reference-mode)
;; Rmail
(add-hook 'rmail-show-message-hook #'bug-reference-mode-force-auto-setup)
;; Rcirc
(add-hook 'rcirc-mode-hook #'bug-reference-mode)
;; ERC
(add-hook 'erc-mode-hook #'bug-reference-mode)
@end smallexample
In the Rmail case, instead of the mode hook, the
@code{rmail-show-message-hook} has to be used in combination with the
function @code{bug-reference-mode-force-auto-setup} which activates
@code{bug-reference-mode} and forces auto-setup. The reason is that
with Rmail all messages reside in the same buffer but the setup needs
to be performed whenever another messages is displayed.
@heading Adding support for third-party packages
@vindex bug-reference-auto-setup-functions
Adding support for bug-reference' auto-setup is usually quite
straight-forward: write a setup function of zero arguments which
gathers the required information (e.g., List-Id/To/From/Cc mail header
values in the case of a MUA), and then calls one of the following
helper functions:
@itemize @bullet
@item
@code{bug-reference-maybe-setup-from-vc} which does the setup
according to @code{bug-reference-setup-from-vc-alist},
@item
@code{bug-reference-maybe-setup-from-mail} which does the setup
according to @code{bug-reference-setup-from-mail-alist},
@item
and @code{bug-reference-maybe-setup-from-irc} which does the setup
according to @code{bug-reference-setup-from-irc-alist}.
@end itemize
A setup function should return non-nil if it could setup bug-reference
mode which is the case if the last thing the function does is calling
one of the helper functions above.
Finally, the setup function has to be added to
@code{bug-reference-auto-setup-functions}.
Note that these auto-setup functions should check as a first step if
they are applicable, e.g., by checking the @code{major-mode} value.
@heading Integration with the debbugs package
@findex debbugs-browse-mode
If your project's issues are tracked on the server
@url{https://debbugs.gnu.org}, you can browse and reply to reports
directly in Emacs using the @code{debbugs} package, which can be
downloaded via the Package Menu (@pxref{Packages}). This package adds
the minor mode @code{debbugs-browse-mode}, which can be activated on
top of @code{bug-reference-mode} and @code{bug-reference-prog-mode} as
follows:
@smallexample
(add-hook 'bug-reference-mode-hook 'debbugs-browse-mode)
(add-hook 'bug-reference-prog-mode-hook 'debbugs-browse-mode)
@end smallexample

View file

@ -374,9 +374,9 @@ used with the completion list:
@itemx @key{prior}
Typing @kbd{M-v}, while in the minibuffer, selects the window showing
the completion list (@code{switch-to-completions}). This paves the
way for using the commands below. @key{PageUp} or @key{prior} does
the same. You can also select the window in other ways
(@pxref{Windows}).
way for using the commands below. @key{PageUp}, @key{prior} and
@kbd{M-g M-c} does the same. You can also select the window in other
ways (@pxref{Windows}).
@findex choose-completion
@item @key{RET}
@ -388,12 +388,14 @@ point (@code{choose-completion}).
@findex next-completion
@item @key{TAB}
@item @key{RIGHT}
@item @key{n}
While in the completion list buffer, these keys move point to the
following completion alternative (@code{next-completion}).
@findex previous-completion
@item @key{S-TAB}
@item @key{LEFT}
@item @key{p}
While in the completion list buffer, these keys move point to the
previous completion alternative (@code{previous-completion}).

View file

@ -1028,7 +1028,10 @@ execution unit.
@defopt native-comp-async-report-warnings-errors
If this variable's value is non-@code{nil}, warnings and errors from
asynchronous native-compilation subprocesses are reported in the main
Emacs session. The default is @code{t}.
Emacs session in a buffer named @file{*Warnings*}. The default value
@code{t} means display the resulting buffer. To log warnings without
popping up the @file{*Warnings*} buffer, set this variable to
@code{silent}.
@end defopt
@defopt native-comp-async-query-on-exit

View file

@ -7615,7 +7615,7 @@ Chars}.
The above display conventions apply even when there is a display
table, for any character whose entry in the active display table is
@code{nil}. Thus, when you set up a display table, you need only
specify the characters for which you want special behavior.
specify the characters for which you want special display behavior.
The following variables affect how certain characters are displayed
on the screen. Since they change the number of columns the characters
@ -7649,7 +7649,8 @@ command @code{tab-to-tab-stop}. @xref{Indent Tabs}.
(@pxref{Char-Tables}), with @code{display-table} as its subtype, which
is used to override the usual character display conventions. This
section describes how to make, inspect, and assign elements to a
display table object.
display table object. The next section (@pxref{Active Display Table})
describes the various standard display tables and their precedence.
@defun make-display-table
This creates and returns a display table. The table initially has

View file

@ -1943,6 +1943,16 @@ the completion string in the @file{*Completions*} buffer, and
a suffix displayed after the completion string. This function
takes priority over @code{annotation-function}.
@item group-function
The value should be a function for grouping the completion candidates.
The function must take two arguments, @var{completion}, which is a
completion candidate and @var{transform}, which is a boolean flag. If
@var{transform} is @code{nil}, the function must return the group
title of the group to which the candidate belongs. The returned title
can also be @code{nil}. Otherwise the function must return the
transformed candidate. The transformation can for example remove a
redundant prefix, which is displayed in the group title.
@item display-sort-function
The value should be a function for sorting completions. The function
should take one argument, a list of completion strings, and return a

View file

@ -237,7 +237,8 @@ precede the number and its exponent. For example, @samp{1500.0},
@samp{+15e2}, @samp{15.0e+2}, @samp{+1500000e-3}, and @samp{.15e4} are
five ways of writing a floating-point number whose value is 1500.
They are all equivalent. Like Common Lisp, Emacs Lisp requires at
least one digit after any decimal point in a floating-point number;
least one digit after a decimal point in a floating-point number that
does not have an exponent;
@samp{1500.} is an integer, not a floating-point number.
Emacs Lisp treats @code{-0.0} as numerically equal to ordinary zero

View file

@ -219,10 +219,9 @@ or can be downloaded from @url{https://savannah.gnu.org/projects/emacs/}.
@summarycontents
@contents
@node Top, Introduction, (dir), (dir)
@comment node-name, next, previous, up
@ifnottex
@node Top
@top @ccmode{}
@ccmode{} is a GNU Emacs mode for editing files containing C, C++,
@ -360,8 +359,7 @@ Custom Macros
@end detailmenu
@end menu
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Introduction, Overview, Top, Top
@comment node-name, next, previous, up
@node Introduction
@chapter Introduction
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -420,7 +418,7 @@ also like to thank all the @ccmode{} victims who help enormously
during the early beta stages of @ccmode{}'s development.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Overview, Getting Started, Introduction, Top
@node Overview
@comment node-name, next, previous, up@cindex organization of the manual
@chapter Overview of the Manual
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -489,8 +487,7 @@ project: whether for updating @ccmode{} or submitting bug reports.
Finally, there are the customary indices.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Getting Started, Commands, Overview, Top
@comment node-name, next, previous, up
@node Getting Started
@chapter Getting Started
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -601,8 +598,7 @@ where @samp{XX} is the minor release number.
@end deffn
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Commands, Font Locking, Getting Started, Top
@comment node-name, next, previous, up
@node Commands
@chapter Commands
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -638,7 +634,7 @@ structures.
@end menu
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Indentation Commands, Comment Commands, Commands, Commands
@node Indentation Commands
@comment node-name, next, previous,up
@section Indentation Commands
@cindex indentation
@ -817,8 +813,7 @@ often (in seconds) progress messages are to be displayed.
@end defopt
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Comment Commands, Movement Commands, Indentation Commands, Commands
@comment node-name, next, previous, up
@node Comment Commands
@section Comment Commands
@cindex comments (insertion of)
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -886,8 +881,7 @@ lines.
@end table
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Movement Commands, Filling and Breaking, Comment Commands, Commands
@comment node-name, next, previous, up
@node Movement Commands
@section Movement Commands
@cindex movement
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -1042,7 +1036,7 @@ Movement}. They might be removed from a future release of @ccmode{}.
@end table
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Filling and Breaking, Minor Modes, Movement Commands, Commands
@node Filling and Breaking
@comment node-name, next, previous, up
@section Filling and Line Breaking Commands
@cindex text filling
@ -1136,8 +1130,7 @@ line break.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Minor Modes, Electric Keys, Filling and Breaking, Commands
@comment node-name, next, previous, up
@node Minor Modes
@section Minor Modes
@cindex Minor Modes
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -1257,8 +1250,7 @@ value will turn it (or them) off.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Electric Keys, Auto-newlines, Minor Modes, Commands
@comment node-name, next, previous, up
@node Electric Keys
@section Electric Keys and Keywords
@cindex electric characters
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -1437,8 +1429,7 @@ modes except IDL mode, since CORBA IDL doesn't have any statements.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Auto-newlines, Hungry WS Deletion, Electric Keys, Commands
@comment node-name, next, previous, up
@node Auto-newlines
@section Auto-newline Insertion
@cindex auto-newline
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -1493,8 +1484,7 @@ clean-ups listed by key.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Hungry WS Deletion, Subword Movement, Auto-newlines, Commands
@comment node-name, next, previous, up
@node Hungry WS Deletion
@section Hungry Deletion of Whitespace
@cindex hungry-deletion
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -1651,8 +1641,7 @@ trouble with this in GNU Emacs.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Subword Movement, Other Commands, Hungry WS Deletion, Commands
@comment node-name, next, previous, up
@node Subword Movement
@section Subword Movement and Editing
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -1744,8 +1733,7 @@ As a bonus, you can also use @code{subword-mode} in non-@ccmode{}
buffers by typing @kbd{M-x subword-mode}.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Other Commands, , Subword Movement, Commands
@comment node-name, next, previous, up
@node Other Commands
@section Other Commands
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -1842,8 +1830,7 @@ ask for help in the standard (X)Emacs forums.
@end table
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Font Locking, Config Basics, Commands, Top
@comment node-name, next, previous, up
@node Font Locking
@chapter Font Locking
@cindex font locking
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -1874,8 +1861,7 @@ sections apply to the other languages.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Font Locking Preliminaries, Faces, Font Locking, Font Locking
@comment node-name, next, previous, up
@node Font Locking Preliminaries
@section Font Locking Preliminaries
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -1972,8 +1958,7 @@ recognize types.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Faces, Doc Comments, Font Locking Preliminaries, Font Locking
@comment node-name, next, previous, up
@node Faces
@section Faces
@cindex faces
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2071,8 +2056,7 @@ since those aren't syntactic errors in themselves.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Doc Comments, Wrong Comment Style, Faces, Font Locking
@comment node-name, next, previous, up
@node Doc Comments
@section Documentation Comments
@cindex documentation comments
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2156,7 +2140,7 @@ If you add support for another doc comment style, please consider
contributing it: send a note to @email{bug-cc-mode@@gnu.org}.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Wrong Comment Style, Misc Font Locking, Doc Comments, Font Locking
@node Wrong Comment Style
@comment node-name, next, previous, up
@section Marking ``Wrong'' style comments
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2178,7 +2162,7 @@ which aren't of the default style will be fontified with
@end defvar
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Misc Font Locking, AWK Mode Font Locking, Wrong Comment Style, Font Locking
@node Misc Font Locking
@comment node-name, next, previous, up
@section Miscellaneous Font Locking
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2233,7 +2217,7 @@ section only applies when CC Mode cannot disambiguate a construct in
any other way.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node AWK Mode Font Locking, , Misc Font Locking, Font Locking
@node AWK Mode Font Locking
@comment node-name, next, previous, up
@section AWK Mode Font Locking
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2294,7 +2278,7 @@ escaped newline. The @samp{\} is highlighted.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Config Basics, Custom Filling and Breaking, Font Locking, Top
@node Config Basics
@comment node-name, next, previous, up
@chapter Configuration Basics
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2486,8 +2470,7 @@ have it enabled by default by placing the following in your
@end menu
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node CC Hooks, Style Variables, Config Basics, Config Basics
@comment node-name, next, previous, up
@node CC Hooks
@section Hooks
@cindex mode hooks
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2560,8 +2543,7 @@ file.
@end example
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Style Variables, Styles, CC Hooks, Config Basics
@comment node-name, next, previous, up
@node Style Variables
@section Style Variables
@cindex styles
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2648,8 +2630,7 @@ Commas});@*
(@pxref{Custom Macros}).
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Styles, , Style Variables, Config Basics
@comment node-name, next, previous, up
@node Styles
@section Styles
@cindex styles
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2683,8 +2664,7 @@ already formatted piece of your code, @ref{Guessing the Style}.
@end menu
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Built-in Styles, Choosing a Style, Styles, Styles
@comment node-name, next, previous, up
@node Built-in Styles
@subsection Built-in Styles
@cindex styles, built-in
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2761,8 +2741,7 @@ afterwards.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Choosing a Style, Adding Styles, Built-in Styles, Styles
@comment node-name, next, previous, up
@node Choosing a Style
@subsection Choosing a Style
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2819,8 +2798,7 @@ string.
@end defvar
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Adding Styles, Guessing the Style, Choosing a Style, Styles
@comment node-name, next, previous, up
@node Adding Styles
@subsection Adding and Amending Styles
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -2907,8 +2885,7 @@ should not be changed directly; use @code{c-add-style} instead.
@end defvar
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Guessing the Style, File Styles, Adding Styles, Styles
@comment node-name, next, previous, up
@node Guessing the Style
@subsection Guessing the Style
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -3030,8 +3007,7 @@ these offsets or the parent style name.
@end table
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node File Styles, , Guessing the Style, Styles
@comment node-name, next, previous, up
@node File Styles
@subsection File Styles
@cindex styles, file local
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -3079,8 +3055,7 @@ mode hooks (@pxref{CC Hooks}). Any individual setting of a variable
will override one made through @code{c-file-style} or
@code{c-file-offsets}.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Custom Filling and Breaking, Custom Auto-newlines, Config Basics, Top
@comment node-name, next, previous, up
@node Custom Filling and Breaking
@chapter Customizing Filling and Line Breaking
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -3298,8 +3273,7 @@ as one comment, and the rest of the paragraph handling code
inconsistent behavior.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Custom Auto-newlines, Clean-ups, Custom Filling and Breaking, Top
@comment node-name, next, previous, up
@node Custom Auto-newlines
@chapter Customizing Auto-newlines
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -3354,8 +3328,7 @@ circumstances. @xref{Clean-ups}.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Hanging Braces, Hanging Colons, Custom Auto-newlines, Custom Auto-newlines
@comment node-name, next, previous, up
@node Hanging Braces
@section Hanging Braces
@cindex hanging braces
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -3504,8 +3477,7 @@ themselves.
@end menu
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Custom Braces, , Hanging Braces, Hanging Braces
@comment node-name, next, previous, up
@node Custom Braces
@subsection Custom Brace Hanging
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -3592,8 +3564,7 @@ In all other cases, it returns the list @samp{(before after)} so
that the brace appears on a line by itself.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Hanging Colons, Hanging Semicolons and Commas, Hanging Braces, Custom Auto-newlines
@comment node-name, next, previous, up
@node Hanging Colons
@section Hanging Colons
@cindex hanging colons
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -3635,8 +3606,7 @@ them are controlled by a different mechanism, called @dfn{clean-ups} in
@ccmode{}. @xref{Clean-ups}, for details.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Hanging Semicolons and Commas, , Hanging Colons, Custom Auto-newlines
@comment node-name, next, previous, up
@node Hanging Semicolons and Commas
@section Hanging Semicolons and Commas
@cindex hanging semicolons
@cindex hanging commas
@ -3715,8 +3685,7 @@ newlines after semicolons inside one-line inline method definitions
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Clean-ups, Indentation Engine Basics, Custom Auto-newlines, Top
@comment node-name, next, previous, up
@node Clean-ups
@chapter Clean-ups
@cindex clean-ups
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -3968,8 +3937,7 @@ situation if you just want a literal @samp{/} inserted.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Indentation Engine Basics, Customizing Indentation, Clean-ups, Top
@comment node-name, next, previous, up
@node Indentation Engine Basics
@chapter Indentation Engine Basics
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -4028,8 +3996,7 @@ of the variables associated with indentation, not even
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Syntactic Analysis, Syntactic Symbols, Indentation Engine Basics, Indentation Engine Basics
@comment node-name, next, previous, up
@node Syntactic Analysis
@section Syntactic Analysis
@cindex syntactic analysis
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -4187,8 +4154,7 @@ anchor position.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Syntactic Symbols, Indentation Calculation, Syntactic Analysis, Indentation Engine Basics
@comment node-name, next, previous, up
@node Syntactic Symbols
@section Syntactic Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -4435,8 +4401,7 @@ Java. @ref{Java Symbols}.
@end menu
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Function Symbols, Class Symbols, Syntactic Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Function Symbols
@subsection Function Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -4478,8 +4443,7 @@ isn't much special about them. Note however that line 8 is given
on the previous line.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Class Symbols, Conditional Construct Symbols, Function Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Class Symbols
@subsection Class related Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -4625,8 +4589,7 @@ Here, line 1 is analyzed as a @code{topmost-intro}, but lines 2 and 3
are both analyzed as @code{template-args-cont} lines.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Conditional Construct Symbols, Switch Statement Symbols, Class Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Conditional Construct Symbols
@subsection Conditional Construct Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -4693,8 +4656,7 @@ the same line as the preceding close brace, that line would still have
@code{block-close} syntax.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Switch Statement Symbols, Brace List Symbols, Conditional Construct Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Switch Statement Symbols
@subsection Switch Statement Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -4729,8 +4691,7 @@ is treated slightly differently since it contains a brace that opens a
block; it is given @code{statement-case-open} syntax.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Brace List Symbols, External Scope Symbols, Switch Statement Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Brace List Symbols
@subsection Brace List Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -4796,8 +4757,7 @@ giving @code{brace-list-entry} an offset of
@code{brace-list-entry} anchored on the @samp{1} of line 8.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node External Scope Symbols, Paren List Symbols, Brace List Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node External Scope Symbols
@subsection External Scope Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -4860,8 +4820,7 @@ that isn't the case for historical reasons.}
@end table
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Paren List Symbols, Literal Symbols, External Scope Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Paren List Symbols
@subsection Parenthesis (Argument) List Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -4920,8 +4879,7 @@ parenthesis that opens an argument list, appearing on a separate line,
is assigned the @code{statement-cont} syntax instead.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Literal Symbols, Multiline Macro Symbols, Paren List Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Literal Symbols
@subsection Comment String Label and Macro Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -5009,8 +4967,7 @@ Line 17 is assigned @code{stream-op} syntax.
@end itemize
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Multiline Macro Symbols, Objective-C Method Symbols, Literal Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Multiline Macro Symbols
@subsection Multiline Macro Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -5050,8 +5007,7 @@ macros.}.
@xref{Custom Macros}, for more info about the treatment of macros.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Objective-C Method Symbols, Java Symbols, Multiline Macro Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Objective-C Method Symbols
@subsection Objective-C Method Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -5077,8 +5033,7 @@ assigned @code{objc-method-args-cont} syntax. Lines 5 and 6 are both
assigned @code{objc-method-call-cont} syntax.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Java Symbols, Statement Block Symbols, Objective-C Method Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Java Symbols
@subsection Java Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -5115,8 +5070,7 @@ syntax due to it being a continuation of a variable declaration where preceding
the declaration is an annotation.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Statement Block Symbols, K&R Symbols, Java Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node Statement Block Symbols
@subsection Statement Block Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -5194,8 +5148,7 @@ example above. The other similar special function, @code{gauge}, is
handled like this too.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node K&R Symbols, , Statement Block Symbols, Syntactic Symbols
@comment node-name, next, previous, up
@node K&R Symbols
@subsection K&R Symbols
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -5221,8 +5174,7 @@ syntax.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Indentation Calculation, , Syntactic Symbols, Indentation Engine Basics
@comment node-name, next, previous, up
@node Indentation Calculation
@section Indentation Calculation
@cindex indentation
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -5320,8 +5272,7 @@ minibuffer when you hit @kbd{TAB}.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Customizing Indentation, Custom Macros, Indentation Engine Basics, Top
@comment node-name, next, previous, up
@node Customizing Indentation
@chapter Customizing Indentation
@cindex customization, indentation
@cindex indentation
@ -5367,8 +5318,7 @@ indentation.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node c-offsets-alist, Interactive Customization, Customizing Indentation, Customizing Indentation
@comment node-name, next, previous, up
@node c-offsets-alist
@section c-offsets-alist
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -5536,8 +5486,7 @@ it doesn't work well with some of the alignment functions that return
@code{c-strict-syntax-p} set to @code{nil}.}.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Interactive Customization, Line-Up Functions, c-offsets-alist, Customizing Indentation
@comment node-name, next, previous, up
@node Interactive Customization
@section Interactive Customization
@cindex customization, interactive
@cindex interactive customization
@ -5644,8 +5593,7 @@ for that syntactic element.
@c End of MOVE THIS BIT.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Line-Up Functions, Custom Line-Up, Interactive Customization, Customizing Indentation
@comment node-name, next, previous, up
@node Line-Up Functions
@section Line-Up Functions
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -5718,8 +5666,7 @@ Works with:
@end menu
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Brace/Paren Line-Up, List Line-Up, Line-Up Functions, Line-Up Functions
@comment node-name, next, previous, up
@node Brace/Paren Line-Up
@subsection Brace and Parenthesis Line-Up Functions
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -5975,8 +5922,7 @@ and @code{inextern-lang}.
@end defun
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node List Line-Up, Operator Line-Up, Brace/Paren Line-Up, Line-Up Functions
@comment node-name, next, previous, up
@node List Line-Up
@subsection List Line-Up Functions
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -6300,8 +6246,7 @@ the current line with the colon on the previous line.
@end defun
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Operator Line-Up, Comment Line-Up, List Line-Up, Line-Up Functions
@comment node-name, next, previous, up
@node Operator Line-Up
@subsection Operator Line-Up Functions
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -6468,8 +6413,7 @@ lineup functions.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Comment Line-Up, Misc Line-Up, Operator Line-Up, Line-Up Functions
@comment node-name, next, previous, up
@node Comment Line-Up
@subsection Comment Line-Up Functions
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -6578,8 +6522,7 @@ expressions.
@end defun
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Misc Line-Up, , Comment Line-Up, Line-Up Functions
@comment node-name, next, previous, up
@node Misc Line-Up
@subsection Miscellaneous Line-Up Functions
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -6780,8 +6723,7 @@ the_larch, @hereFn{c-lineup-topmost-intro-cont}
@end defun
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Custom Line-Up, Other Indentation, Line-Up Functions, Customizing Indentation
@comment node-name, next, previous, up
@node Custom Line-Up
@section Custom Line-Up Functions
@cindex customization, indentation functions
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -6896,8 +6838,7 @@ any syntactic symbol that appears in @code{c-offsets-alist} can have a
custom line-up function associated with it.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Other Indentation, , Custom Line-Up, Customizing Indentation
@comment node-name, next, previous, up
@node Other Indentation
@section Other Special Indentations
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -6948,8 +6889,7 @@ functions to this hook, not remove them. @xref{Style Variables}.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Custom Macros, Odds and Ends, Customizing Indentation, Top
@comment node-name, next, previous, up
@node Custom Macros
@chapter Customizing Macros
@cindex macros
@cindex preprocessor directives
@ -6997,7 +6937,7 @@ Macros}.
@end menu
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Macro Backslashes, Macros with ;, Custom Macros, Custom Macros
@node Macro Backslashes
@comment node-name, next, previous, up
@section Customizing Macro Backslashes
@cindex @code{#define}
@ -7045,7 +6985,7 @@ get aligned only when you explicitly invoke the command
@end defopt
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Macros with ;, Noise Macros, Macro Backslashes, Custom Macros
@node Macros with ;
@comment node-name, next, previous, up
@section Macros with semicolons
@cindex macros with semicolons
@ -7103,8 +7043,7 @@ initialization code, after the mode hooks have run.
@end defun
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Noise Macros, Indenting Directives, Macros with ;, Custom Macros
@comment node-name, next, previous, up
@node Noise Macros
@section Noise Macros
@cindex noise macros
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -7160,8 +7099,7 @@ after the mode hooks have run.
@end defun
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Indenting Directives, , Noise Macros, Custom Macros
@comment node-name, next, previous, up
@node Indenting Directives
@section Indenting Directives
@cindex Indenting Directives
@cindex Indenting #pragma
@ -7202,8 +7140,7 @@ depends on that variable.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Odds and Ends, Sample Init File, Custom Macros, Top
@comment node-name, next, previous, up
@node Odds and Ends
@chapter Odds and Ends
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -7246,8 +7183,7 @@ anchoring position to indent the line in that case.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Sample Init File, Performance Issues, Odds and Ends, Top
@comment node-name, next, previous, up
@node Sample Init File
@appendix Sample Init File
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -7305,8 +7241,7 @@ to change some of the actual values.
@end verbatim
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Performance Issues, Limitations and Known Bugs, Sample Init File, Top
@comment node-name, next, previous, up
@node Performance Issues
@appendix Performance Issues
@cindex performance
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -7414,8 +7349,7 @@ more info.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Limitations and Known Bugs, FAQ, Performance Issues, Top
@comment node-name, next, previous, up
@node Limitations and Known Bugs
@appendix Limitations and Known Bugs
@cindex limitations
@cindex bugs
@ -7480,8 +7414,7 @@ early on:
@end itemize
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node FAQ, Updating CC Mode, Limitations and Known Bugs, Top
@comment node-name, next, previous, up
@node FAQ
@appendix Frequently Asked Questions
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -7609,8 +7542,7 @@ there since it's got its own system to keep track of blocks.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Updating CC Mode, Mailing Lists and Bug Reports, FAQ, Top
@comment node-name, next, previous, up
@node Updating CC Mode
@appendix Getting the Latest CC Mode Release
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -7629,8 +7561,7 @@ compatibility, etc.@: are all available on the web site:
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Mailing Lists and Bug Reports, GNU Free Documentation License, Updating CC Mode, Top
@comment node-name, next, previous, up
@node Mailing Lists and Bug Reports
@appendix Mailing Lists and Submitting Bug Reports
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -7673,15 +7604,14 @@ to the Usenet newsgroups @code{gnu.emacs.sources}, @code{comp.emacs},
@c There is no newsgroup for Pike. :-(
@node GNU Free Documentation License, Command and Function Index, Mailing Lists and Bug Reports, Top
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include doclicense.texi
@c Removed the tentative node "Mode Initialization" from here, 2005/8/27.
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Command and Function Index, Variable Index, GNU Free Documentation License, Top
@comment node-name, next, previous, up
@node Command and Function Index
@unnumbered Command and Function Index
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -7695,8 +7625,7 @@ Since most @ccmode{} commands are prepended with the string
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Variable Index, Concept and Key Index, Command and Function Index, Top
@comment node-name, next, previous, up
@node Variable Index
@unnumbered Variable Index
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ -7710,8 +7639,7 @@ Since most @ccmode{} variables are prepended with the string
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Concept and Key Index, , Variable Index, Top
@comment node-name, next, previous, up
@node Concept and Key Index
@unnumbered Concept and Key Index
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

File diff suppressed because it is too large Load diff

View file

@ -340,7 +340,8 @@ When invoked like that, it prompts in the minibuffer for one of the
previous kills, offering completion and minibuffer-history navigation
through previous kills recorded in the kill ring. A similar feature
in Isearch can be invoked if you bind 'C-s M-y' to the command
'isearch-yank-pop'.
'isearch-yank-pop'. When the user option 'yank-from-kill-ring-rotate'
is nil the kill ring is not rotated after 'yank-from-kill-ring'.
---
** New user options 'copy-region-blink-delay' and 'delete-pair-blink-delay'.
@ -441,6 +442,11 @@ major mode.
* Changes in Specialized Modes and Packages in Emacs 28.1
** Completion List Mode
New key bindings have been added: 'n' and 'p' to navigate completions,
and 'M-g M-c' to switch to the minibuffer, and you can also switch back
to the completion list buffer with 'M-g M-c'.
** Benchmark
*** New function 'benchmark-call' to measure the execution time of a function.
Additionally, the number of repetitions can be expressed as a minimal duration
@ -747,6 +753,11 @@ If set to non-nil, Dired will dereference symbolic links when copying.
This can be switched off on a per-usage basis by providing
'dired-do-copy' with a 'C-u' prefix.
*** New user option 'dired-do-revert-buffer'.
Non-nil reverts the destination Dired buffer after performing one
of these operations: 'dired-do-copy', 'dired-do-rename',
'dired-do-symlink', 'dired-do-hardlink'.
*** New user option 'dired-mark-region' affects all Dired commands
that mark files. When non-nil and the region is active in Transient
Mark mode, then Dired commands operate only on files in the active
@ -1051,6 +1062,11 @@ commands and is globally bound to `C-h x'.
+++
*** New command 'describe-keymap' describes keybindings in a keymap.
---
*** New user option 'describe-bindings-outline'.
It enables outlines in the output buffer of `describe-bindings' that
can provide a better overview in a long list of available bindings.
---
*** New keybinding 'C-h R' prompts for a manual to display and displays it.
@ -1089,12 +1105,11 @@ so e.g. like 'C-x 8 [' inserts a left single quotation mark,
'C-x \ [' does the same.
---
*** New user options 'read-char-by-name-sort' and 'read-char-by-name-group'.
'read-char-by-name-sort' defines the sorting order of characters for
completion of 'C-x 8 RET TAB' and can be customized to sort them
by codepoints instead of character names by default. The 't' value of
'read-char-by-name-group' groups the characters for completion of
'C-x 8 RET TAB' by Unicode blocks.
*** New user option 'read-char-by-name-sort'.
It defines the sorting order of characters for completion of 'C-x 8 RET TAB'
and can be customized to sort them by codepoints instead of character names.
Additionally, you can group characters by Unicode blocks after customizing
'completions-group' and 'completions-group-sort'.
---
*** Improved language transliteration in Malayalam input methods.
@ -2481,6 +2496,14 @@ This is to keep the same behavior as Eshell.
* Incompatible Lisp Changes in Emacs 28.1
---
** Some floating-point numbers are now handled differently by the Lisp reader.
In previous versions of Emacs, numbers with a trailing dot and an exponent
were read as integers and the exponent ignored: 2.e6 was interpreted as the
integer 2. Such numerals are now read as floats with the exponent included:
2.e6 is now read as the floating-point value 2000000.0.
That is, (read-from-string "1.e3") => (1000.0 . 4) now.
+++
** The 'lexical-binding' local variable is always enabled.
Previously, if 'enable-local-variables' was nil, a 'lexical-binding'
@ -2687,9 +2710,24 @@ The implementation was buggy, and multiple '&define' forms in an '&or'
form should be exceedingly rare. See the Info node "(elisp) Backtracking" in
the Emacs Lisp reference manual for background.
---
** 'sql-*-statement-starters' are no longer defcustoms.
These variables describe facts about the SQL standard and
product-specific additions. There should be no need for users to
customize them.
* Lisp Changes in Emacs 28.1
---
** Emacs now attempts to test for high-rate subprocess output more fairly.
When several subprocesses produce output simultaneously at high rate,
Emacs will now by default attempt to service them all in a round-robin
fashion. Set the new variable 'process-prioritize-lower-fds' to a
non-nil value to get back the old behavior, whereby after reading
from a subprocess, Emacs would check for output of other subprocesses
in a way that is likely to read from the same process again.
+++
** New function 'sxhash-equal-including-properties'.
This is identical to 'sxhash-equal' but accounting also for string
@ -2766,6 +2804,10 @@ It accepts a list of completions and should return a list where
each element is a list with three elements: a completion,
a prefix string, and a suffix string.
+++
** New completion function 'group-function' for grouping candidates.
It takes two arguments: a completion candidate and a 'transform' flag.
+++
** 'read-char-from-minibuffer' and 'y-or-n-p' support 'help-form'.
If you bind 'help-form' to a non-nil value while calling these functions,

View file

@ -3,9 +3,9 @@
<component type="desktop-application">
<id>org.gnu.emacs</id>
<metadata_license>GFDL-1.3+</metadata_license>
<project_license>GPL-3.0+ and GFDL-1.3+</project_license>
<name>GNU Emacs</name>
<summary>An extensible text editor</summary>
<icon type="remote" width="128" height="128">https://www.gnu.org/software/emacs/images/emacs.png</icon>
<description>
<p>
GNU Emacs is an extensible, customizable text editor - and more.
@ -23,13 +23,26 @@
interface, calendar, and more</li>
</ul>
</description>
<categories>
<category>Development</category>
<category>TextEditor</category>
</categories>
<url type="homepage">https://www.gnu.org/software/emacs</url>
<url type="bugtracker">https://debbugs.gnu.org/</url>
<url type="faq">https://www.gnu.org/software/emacs/manual/html_mono/efaq.html</url>
<url type="help">https://www.gnu.org/software/emacs/documentation.html</url>
<url type="donation">https://my.fsf.org/donate/</url>
<url type="contact">https://lists.gnu.org/mailman/listinfo/emacs-devel/</url>
<launchable type="desktop-id">emacs.desktop</launchable>
<launchable type="service">emacs.service</launchable>
<project_group>GNU</project_group>
<project_license>GPL-3.0+ and GFDL-1.3+</project_license>
<developer_name>Free Software Foundation</developer_name>
<screenshots>
<screenshot type="default">
<image type="source" width="632" height="354">https://www.gnu.org/software/emacs/images/appdata-26.png</image>
</screenshot>
<image type="source" width="632" height="354">https://www.gnu.org/software/emacs/images/appdata-26.png</image>
<caption>Editing a Lisp program whilst viewing the Emacs manual.</caption>
</screenshot>
</screenshots>
<launchable type="desktop-id">emacs</launchable>
<url type="homepage">https://www.gnu.org/software/emacs</url>
<update_contact>emacs-devel_AT_gnu.org</update_contact>
<project_group>GNU</project_group>
</component>

View file

@ -4,7 +4,7 @@
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; URL: https://gitlab.com/protesilaos/modus-themes
;; Version: 1.3.2
;; Version: 1.4.0
;; Package-Requires: ((emacs "26.1"))
;; Keywords: faces, theme, accessibility

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; URL: https://gitlab.com/protesilaos/modus-themes
;; Version: 1.3.2
;; Version: 1.4.0
;; Package-Requires: ((emacs "26.1"))
;; Keywords: faces, theme, accessibility

View file

@ -1056,7 +1056,7 @@ att först senare ta bort fönstret med C-x 1.
Här är fler varianter C-h:
C-h f Beskriv ett kommando. Du skriver in kommandots namn.
C-h x Beskriv ett kommando. Du skriver in kommandots namn.
>> Prova att skriva C-h x previous-line <Return>.
Detta visar den information Emacs har om den funktion

View file

@ -69,7 +69,9 @@ Makefile: ../config.status $(srcdir)/Makefile.in
# Object modules that need not be built for Emacs.
# Emacs does not need e-regex.o (it has its own regex-emacs.c),
# and building it would just waste time.
not_emacs_OBJECTS = regex.o
# Emacs also doesn't need the dynarray-related files in malloc/ and
# the replacement 'free'.
not_emacs_OBJECTS = regex.o malloc/%.o free.o
libgnu_a_OBJECTS = fingerprint.o $(gl_LIBOBJS) \
$(patsubst %.c,%.o,$(filter %.c,$(libgnu_a_SOURCES)))

View file

@ -2054,7 +2054,10 @@ You can mark bookmarks with the \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-mar
(defun bookmark-bmenu-save ()
"Save the current list into a bookmark file.
With a prefix arg, prompts for a file to save them in."
With a prefix arg, prompts for a file to save them in.
See also the related behaviors of `bookmark-load' and
`bookmark-bmenu-load'."
(interactive nil bookmark-bmenu-mode)
(save-excursion
(save-window-excursion
@ -2063,7 +2066,19 @@ With a prefix arg, prompts for a file to save them in."
(defun bookmark-bmenu-load ()
"Load the bookmark file and rebuild the bookmark menu-buffer."
"Load bookmarks from a file and rebuild the bookmark menu-buffer.
Prompt for a file, with the default choice being the value of
`bookmark-default-file'.
With a prefix argument, replace the current ambient bookmarks
(i.e., the ones in `bookmark-alist') with the ones from the selected
file and make that file be the new value of `bookmark-default-file'.
In other words, a prefix argument means \"switch over to the bookmark
universe defined in the loaded file\". Without a prefix argument,
just add the loaded bookmarks into the current ambient set.
See the documentation for `bookmark-load' for more details; see also
the related behaviors of `bookmark-save' and `bookmark-bmenu-save'."
(interactive nil bookmark-bmenu-mode)
(bookmark-bmenu-ensure-position)
(save-excursion

View file

@ -153,8 +153,7 @@ Optional argument FACE specifies the face to do the highlighting."
;; with a reference face needed for the color.
(pulse-reset-face face)
(let* ((start (color-name-to-rgb
(face-background 'pulse-highlight-start-face
nil 'default)))
(face-background 'pulse-highlight-face nil 'default)))
(stop (color-name-to-rgb (face-background 'default)))
(colors (mapcar (apply-partially 'apply 'color-rgb-to-hex)
(color-gradient start stop pulse-iterations))))

View file

@ -1169,7 +1169,7 @@ ARGS are command switches passed to PROGRAM.")
(defcustom dired-compress-file-default-suffix nil
"Default suffix for compressing a single file.
If nil, \".gz\" will be used."
:type 'string
:type '(choice (const :tag ".gz" nil) string)
:group 'dired
:version "28.1")
@ -1190,7 +1190,7 @@ output file. %i path(s) are relative, while %o is absolute.")
(defcustom dired-compress-directory-default-suffix nil
"Default suffix for compressing a directory.
If nil, \".tar.gz\" will be used."
:type 'string
:type '(choice (const :tag ".tar.gz" nil) string)
:group 'dired
:version "28.1")
@ -2065,6 +2065,25 @@ ESC or `q' to not overwrite any of the remaining files,
operation success-count))))
(dired-move-to-filename))
(defcustom dired-do-revert-buffer nil
"Automatically revert Dired buffers after `dired-do' operations.
This option controls whether to refresh the directory listing in a
Dired buffer that is the destination of one of these operations:
`dired-do-copy', `dired-do-rename', `dired-do-symlink', `dired-do-hardlink'.
If the value is t, always revert the Dired buffer updated in the result
of these operations.
If the value is a function, it is called with the destination directory name
as a single argument, and the buffer is reverted after Dired operations
if the function returns non-nil."
:type '(choice
(const :tag "Don't revert" nil)
(const :tag "Always revert destination directory" t)
(const :tag "Revert only local Dired buffers"
(lambda (dir) (not (file-remote-p dir))))
(function :tag "Predicate function"))
:group 'dired
:version "28.1")
(defun dired-do-create-files (op-symbol file-creator operation arg
&optional marker-char op1
how-to)
@ -2160,15 +2179,21 @@ Optional arg HOW-TO determines how to treat the target.
(error "%s: Target directory does not exist: %s" operation target))
;; rename-file bombs when moving directories unless we do this:
(or into-dir (setq target (directory-file-name target)))
(dired-create-files
file-creator operation fn-list
(if into-dir ; target is a directory
;; This function uses fluid variable target when called
;; inside dired-create-files:
(lambda (from)
(expand-file-name (file-name-nondirectory from) target))
(lambda (_from) target))
marker-char))))
(prog1
(dired-create-files
file-creator operation fn-list
(if into-dir ; target is a directory
;; This function uses fluid variable target when called
;; inside dired-create-files:
(lambda (from)
(expand-file-name (file-name-nondirectory from) target))
(lambda (_from) target))
marker-char)
(when (or (eq dired-do-revert-buffer t)
(and (functionp dired-do-revert-buffer)
(funcall dired-do-revert-buffer target)))
(dired-fun-in-all-buffers (file-name-directory target) nil
#'revert-buffer))))))
;; Read arguments for a marked-files command that wants a file name,
;; perhaps popping up the list of marked files.

View file

@ -576,7 +576,7 @@ files in the active region if `dired-mark-region' is non-nil."
(defalias 'virtual-dired 'dired-virtual)
(defun dired-virtual (dirname &optional switches)
"Put this buffer into Virtual Dired mode.
"Put this Dired buffer into Virtual Dired mode.
In Virtual Dired mode, all commands that do not actually consult the
filesystem will work.
@ -608,7 +608,8 @@ you can relist single subdirs using \\[dired-do-redisplay]."
;; hand if you want them.
(interactive
(list (read-string "Virtual Dired directory: " (dired-virtual-guess-dir))))
(list (read-directory-name "Virtual Dired directory: "
nil (dired-virtual-guess-dir))))
(goto-char (point-min))
(or (looking-at-p " ")
;; if not already indented, do it now:
@ -940,10 +941,15 @@ Each element of this list looks like
(REGEXP COMMAND...)
where each COMMAND can either be a string or a Lisp expression that evaluates
COMMAND will be used if REGEXP matches the file to be processed.
If several files are to be processed, REGEXP has to match all the
files.
Each COMMAND can either be a string or a Lisp expression that evaluates
to a string. If this expression needs to consult the name of the file for
which the shell commands are being requested, it can access that file name
as the variable `file'.
If several COMMANDs are given, the first one will be the default
and the rest will be added temporarily to the history and can be retrieved
with \\[previous-history-element] (M-p) .

View file

@ -225,6 +225,14 @@
(byte-compile-log-lap-1 ,format-string ,@args)))
(defvar byte-optimize--lexvars nil
"Lexical variables in scope, in reverse order of declaration.
Each element is on the form (NAME KEEP [VALUE]), where:
NAME is the variable name,
KEEP is a boolean indicating whether the binding must be retained,
VALUE, if present, is a substitutable expression.
Earlier variables shadow later ones with the same name.")
;;; byte-compile optimizers to support inlining
(put 'inline 'byte-optimizer #'byte-optimize-inline-handler)
@ -268,32 +276,31 @@
;; The byte-code will be really inlined in byte-compile-unfold-bcf.
`(,fn ,@(cdr form)))
((or `(lambda . ,_) `(closure . ,_))
(if (not (or (eq fn localfn) ;From the same file => same mode.
(eq (car fn) ;Same mode.
(if lexical-binding 'closure 'lambda))))
;; While byte-compile-unfold-bcf can inline dynbind byte-code into
;; letbind byte-code (or any other combination for that matter), we
;; can only inline dynbind source into dynbind source or letbind
;; source into letbind source.
(progn
;; We can of course byte-compile the inlined function
;; first, and then inline its byte-code.
(byte-compile name)
`(,(symbol-function name) ,@(cdr form)))
(let ((newfn (if (eq fn localfn)
;; If `fn' is from the same file, it has already
;; been preprocessed!
`(function ,fn)
;; Try and process it "in its original environment".
(let ((byte-compile-bound-variables nil))
(byte-compile-preprocess
(byte-compile--reify-function fn))))))
(if (eq (car-safe newfn) 'function)
(macroexp--unfold-lambda `(,(cadr newfn) ,@(cdr form)))
;; This can happen because of macroexp-warn-and-return &co.
(byte-compile-warn
"Inlining closure %S failed" name)
form))))
;; While byte-compile-unfold-bcf can inline dynbind byte-code into
;; letbind byte-code (or any other combination for that matter), we
;; can only inline dynbind source into dynbind source or letbind
;; source into letbind source.
;; When the function comes from another file, we byte-compile
;; the inlined function first, and then inline its byte-code.
;; This also has the advantage that the final code does not
;; depend on the order of compilation of ELisp files, making
;; the build more reproducible.
(if (eq fn localfn)
;; From the same file => same mode.
(macroexp--unfold-lambda `(,fn ,@(cdr form)))
;; Since we are called from inside the optimiser, we need to make
;; sure not to propagate lexvar values.
(let ((byte-optimize--lexvars nil)
;; Silence all compilation warnings: the useful ones should
;; be displayed when the function's source file will be
;; compiled anyway, but more importantly we would otherwise
;; emit spurious warnings here because we don't have the full
;; context, such as `declare-functions' placed earlier in the
;; source file's code or `with-suppressed-warnings' that
;; surrounded the `defsubst'.
(byte-compile-warnings nil))
(byte-compile name))
`(,(symbol-function name) ,@(cdr form))))
(_ ;; Give up on inlining.
form))))
@ -308,14 +315,6 @@
This does usually not indicate a problem and makes the compiler
very chatty, but can be useful for debugging.")
(defvar byte-optimize--lexvars nil
"Lexical variables in scope, in reverse order of declaration.
Each element is on the form (NAME KEEP [VALUE]), where:
NAME is the variable name,
KEEP is a boolean indicating whether the binding must be retained,
VALUE, if present, is a substitutable expression.
Earlier variables shadow later ones with the same name.")
(defvar byte-optimize--vars-outside-condition nil
"Alist of variables lexically bound outside conditionally executed code.
Variables here are sensitive to mutation inside the conditional code,
@ -369,7 +368,7 @@ Same format as `byte-optimize--lexvars', with shared structure and contents.")
;; to `(if . (or `(,exp ,then ,else) pcase--dontcare))'.
;;
;; The resulting macroexpansion is also significantly cleaner/smaller/faster.
(declare (indent 1) (debug (form &rest (pcase-PAT body))))
(declare (indent 1) (debug pcase))
`(pcase ,exp
. ,(mapcar (lambda (case)
`(,(pcase (car case)

View file

@ -941,7 +941,8 @@ For more details, see Info node `(cl)Loop Facility'.
"above" "below" "by" "in" "on" "=" "across"
"repeat" "while" "until" "always" "never"
"thereis" "collect" "append" "nconc" "sum"
"count" "maximize" "minimize" "if" "unless"
"count" "maximize" "minimize"
"if" "when" "unless"
"return"]
form]
["using" (symbolp symbolp)]

View file

@ -154,7 +154,7 @@ buffer."
:type '(choice
(const :tag "Do not report warnings" nil)
(const :tag "Report and display warnings" t)
(const :tag "Report but do not display warnings" 'silent))
(const :tag "Report but do not display warnings" silent))
:version "28.1")
(defcustom native-comp-async-query-on-exit nil

View file

@ -51,7 +51,7 @@ This is useful for ChangeLogs."
"\\\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
\\|[Cc]opyright\\s *:?\\s *©\\)\
\\s *[^0-9\n]*\\s *\
\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
"What your copyright notice looks like.
The second \\( \\) construct must match the years."
:type 'regexp)
@ -69,7 +69,7 @@ someone else or to a group for which you do not work."
;;;###autoload(put 'copyright-names-regexp 'safe-local-variable 'stringp)
(defcustom copyright-years-regexp
"\\(\\s *\\)\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
"\\(\\s *\\)\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
"Match additional copyright notice years.
The second \\( \\) construct must match the years."
:type 'regexp)
@ -197,8 +197,8 @@ skips to the end of all the years."
(point))))
100)
1)
(or (eq (char-after (+ (point) size -1)) ?-)
(eq (char-after (+ (point) size -2)) ?-)))
(or (memq (char-after (+ (point) size -1)) '(?- ?))
(memq (char-after (+ (point) size -2)) '(?- ?))))
;; This is a range so just replace the end part.
(delete-char size)
;; Insert a comma with the preferred number of spaces.
@ -287,7 +287,7 @@ independently replaces consecutive years with a range."
(setq year (string-to-number (match-string 0)))
(and (setq sep (char-before))
(/= (char-syntax sep) ?\s)
(/= sep ?-)
(not (memq sep '(?- ?)))
(insert " "))
(when (< year 100)
(insert (if (>= year 50) "19" "20"))
@ -297,7 +297,7 @@ independently replaces consecutive years with a range."
;; If the previous thing was a range, don't try to tack more on.
;; Ie not 2000-2005 -> 2000-2005-2007
;; TODO should merge into existing range if possible.
(if (eq sep ?-)
(if (memq sep '(?- ?))
(setq prev-year nil
year nil)
(if (and prev-year (= year (1+ prev-year)))
@ -306,7 +306,7 @@ independently replaces consecutive years with a range."
(> prev-year first-year))
(goto-char range-end)
(delete-region range-start range-end)
(insert (format "-%d" prev-year))
(insert (format "%c%d" sep prev-year))
(goto-char p))
(setq first-year year
range-start (point)))))

View file

@ -1442,10 +1442,9 @@ following constructs:
introduced by a previous (let REF ...)
construct."
(let* ((rx--pcase-vars nil)
(regexp (rx--to-expr (rx--pcase-transform (cons 'seq regexps))))
(nvars (length rx--pcase-vars)))
(regexp (rx--to-expr (rx--pcase-transform (cons 'seq regexps)))))
`(and (pred stringp)
,(pcase nvars
,(pcase (length rx--pcase-vars)
(0
;; No variables bound: a single predicate suffices.
`(pred (string-match ,regexp)))
@ -1458,7 +1457,7 @@ following constructs:
(match-string 1 s)
0))
(and ,(car rx--pcase-vars) (pred (not numberp)))))
(_
(nvars
;; Pack the submatches into a dotted list which is then
;; immediately destructured into individual variables again.
;; This is of course slightly inefficient.

View file

@ -221,7 +221,7 @@ There can be any number of :example/:result elements."
(string-greaterp
:eval (string-greaterp "foo" "bar"))
(string-version-lessp
:eval (string-lessp "foo32.png" "bar4.png"))
:eval (string-version-lessp "pic4.png" "pic32.png"))
(string-prefix-p
:eval (string-prefix-p "foo" "foobar"))
(string-suffix-p
@ -613,7 +613,7 @@ There can be any number of :example/:result elements."
(lax-plist-get
:eval (lax-plist-get '("a" 1 "b" 2 "c" 3) "b"))
(lax-plist-put
:no-eval (setq plist (plist-put plist "d" 4))
:no-eval (setq plist (lax-plist-put plist "d" 4))
:eq-result '("a" 1 "b" 2 "c" 3 "d" 4))
(plist-member
:eval (plist-member '(a 1 b 2 c 3) 'b))
@ -666,7 +666,7 @@ There can be any number of :example/:result elements."
:no-eval (re-search-backward "^foo$" nil t)
:eg-result 43)
(looking-at-p
:no-eval (looking-at "f[0-9]")
:no-eval (looking-at-p "f[0-9]")
:eg-result t)
"Match Data"
(match-string
@ -838,7 +838,7 @@ There can be any number of :example/:result elements."
(point
:eval (point))
(point-min
:eval (point-max))
:eval (point-min))
(point-max
:eval (point-max))
(line-beginning-position
@ -1056,7 +1056,7 @@ There can be any number of :example/:result elements."
(logb
:eval (logb 10.5))
(ffloor
:eval (floor 1.2))
:eval (ffloor 1.2))
(fceiling
:eval (fceiling 1.2))
(ftruncate

View file

@ -127,7 +127,7 @@ This is like `if-let' but doesn't handle a VARLIST of the form
\(SYMBOL SOMETHING) specially."
(declare (indent 2)
(debug ((&rest [&or symbolp (symbolp form) (form)])
form body)))
body)))
(if varlist
`(let* ,(setq varlist (internal--build-bindings varlist))
(if ,(caar (last varlist))
@ -146,9 +146,7 @@ This is like `when-let' but doesn't handle a VARLIST of the form
"Bind variables according to VARLIST and conditionally evaluate BODY.
Like `when-let*', except if BODY is empty and all the bindings
are non-nil, then the result is non-nil."
(declare (indent 1)
(debug ((&rest [&or symbolp (symbolp form) (form)])
body)))
(declare (indent 1) (debug if-let*))
(let (res)
(if varlist
`(let* ,(setq varlist (internal--build-bindings varlist))
@ -176,7 +174,7 @@ with an old syntax that accepted only one binding."
(declare (indent 2)
(debug ([&or (symbolp form) ; must be first, Bug#48489
(&rest [&or symbolp (symbolp form) (form)])]
form body)))
body)))
(when (and (<= (length spec) 2)
(not (listp (car spec))))
;; Adjust the single binding case

View file

@ -32,8 +32,8 @@
;; As a default, ERC has the data for the official nickname services on
;; the networks Austnet, BrasNET, Dalnet, freenode, GalaxyNet, GRnet,
;; and Slashnet. You can add more by using M-x customize-variable RET
;; erc-nickserv-alist.
;; Libera.Chat and Slashnet. You can add more by using
;; M-x customize-variable RET erc-nickserv-alist.
;; Usage:
;;
@ -197,6 +197,7 @@ Example of use:
(const GalaxyNet)
(const GRnet)
(const iip)
(const Libera.Chat)
(const OFTC)
(const QuakeNet)
(const Rizon)
@ -264,6 +265,15 @@ Example of use:
"type\\s-/squery\\s-Trent\\s-identify\\s-<password>"
"Trent@anon.iip"
"IDENTIFY" nil "SQUERY" nil)
(Libera.Chat
"NickServ!NickServ@services.libera.chat"
;; Libera.Chat also accepts a password at login, see the `erc'
;; :password argument.
"This\\s-nickname\\s-is\\s-registered.\\s-Please\\s-choose"
"NickServ"
"IDENTIFY" nil nil
;; See also the 901 response code message.
"You\\s-are\\s-now\\s-identified\\s-for\\s-")
(OFTC
"NickServ!services@services.oftc.net"
;; OFTC's NickServ doesn't ask you to identify anymore.

View file

@ -46,7 +46,7 @@ the terminal-initialization file to be loaded."
("vt320" . "vt200")
("vt400" . "vt200")
("vt420" . "vt200")
)
("alacritty" . "xterm"))
"Alist of terminal type aliases.
Entries are of the form (TYPE . ALIAS), where both elements are strings.
This means to treat a terminal of type TYPE as if it were of type ALIAS."

View file

@ -4359,6 +4359,9 @@ Return the new class name, which is a symbol named DIR."
(let ((read-circle nil))
(read (current-buffer)))
(end-of-file nil))))
(unless (listp newvars)
(message "Invalid data in %s: %s" file newvars)
(setq newvars nil))
(setq variables
;; Try and avoid loading `map' since that also loads cl-lib
;; which then might hamper bytecomp warnings (bug#30635).
@ -7945,6 +7948,7 @@ Otherwise, trash FILENAME using the freedesktop.org conventions,
;; Make a .trashinfo file. Use O_EXCL, as per trash-spec 1.0.
(let* ((files-base (file-name-nondirectory fn))
(is-directory (file-directory-p fn))
(overwrite nil)
info-fn)
;; We're checking further down whether the info file
@ -7956,7 +7960,8 @@ Otherwise, trash FILENAME using the freedesktop.org conventions,
files-base (file-name-nondirectory
(make-temp-file
(expand-file-name
files-base trash-files-dir)))))
files-base trash-files-dir)
is-directory))))
(setq info-fn (expand-file-name
(concat files-base ".trashinfo")
trash-info-dir))

View file

@ -305,6 +305,10 @@ Being on a `#include' line pulls in that file.
If optional IN-OTHER-WINDOW is non-nil, find the file in the other window.
If optional IGNORE-INCLUDE is non-nil, ignore being on `#include' lines.
If optional EVENT is non-nil (default `last-nonmenu-event', move
point to the end position of that event before calling the
various ff-* hooks.
Variables of interest include:
- `ff-case-fold-search'
@ -351,10 +355,16 @@ Variables of interest include:
- `ff-file-created-hook'
List of functions to be called if the other file has been created."
(interactive (list current-prefix-arg nil last-nonmenu-event))
(save-excursion
;; We want to preserve point in the current buffer. But the point of
;; ff-find-the-other-file is to make the the other file buffer
;; current, so we can't use save-excursion here (see bug 48535).
(let ((start-buffer (current-buffer))
(start-point (point)))
(posn-set-point (event-end event))
(let ((ff-ignore-include ignore-include))
(ff-find-the-other-file in-other-window))))
(ff-find-the-other-file in-other-window))
(with-current-buffer start-buffer
(goto-char start-point))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Support functions

View file

@ -206,12 +206,11 @@ different input formats."
(defun gnus-convert-face-to-png (face)
"Convert FACE (which is base64-encoded) to a PNG.
The PNG is returned as a string."
(let ((face (gnus-base64-repad face nil nil t)))
(mm-with-unibyte-buffer
(insert face)
(ignore-errors
(base64-decode-region (point-min) (point-max)))
(buffer-string))))
(mm-with-unibyte-buffer
(insert face)
(ignore-errors
(base64-decode-region (point-min) (point-max)))
(buffer-string)))
;;;###autoload
(defun gnus-convert-png-to-face (file)

View file

@ -1358,9 +1358,12 @@ Returns a list of [group article score] vectors."
"\\|")))
artlist vectors article group)
(goto-char (point-min))
(while (not (eobp))
(while (not (or (eobp)
(looking-at-p
"\\(?:[[:space:]\n]+\\)?Process .+ finished")))
(pcase-let ((`(,f-name ,score) (gnus-search-indexed-extract engine)))
(when (and (file-readable-p f-name)
(when (and f-name
(file-readable-p f-name)
(null (file-directory-p f-name))
(or (null groups)
(and (gnus-search-single-p query)

View file

@ -1291,61 +1291,6 @@ forbidden in URL encoding."
(setq tmp (concat tmp str))
tmp))
(defun gnus-base64-repad (str &optional reject-newlines line-length no-check)
"Take a base 64-encoded string and return it padded correctly.
Existing padding is ignored.
If any combination of CR and LF characters are present and
REJECT-NEWLINES is nil, remove them; otherwise raise an error.
If LINE-LENGTH is set and the string (or any line in the string
if REJECT-NEWLINES is nil) is longer than that number, raise an
error. Common line length for input characters are 76 plus CRLF
\(RFC 2045 MIME), 64 plus CRLF (RFC 1421 PEM), and 1000 including
CRLF (RFC 5321 SMTP).
If NOCHECK, don't check anything, but just repad."
;; RFC 4648 specifies that:
;; - three 8-bit inputs make up a 24-bit group
;; - the 24-bit group is broken up into four 6-bit values
;; - each 6-bit value is mapped to one character of the base 64 alphabet
;; - if the final 24-bit quantum is filled with only 8 bits the output
;; will be two base 64 characters followed by two "=" padding characters
;; - if the final 24-bit quantum is filled with only 16 bits the output
;; will be three base 64 character followed by one "=" padding character
;;
;; RFC 4648 section 3 considerations:
;; - if reject-newlines is nil (default), concatenate multi-line
;; input (3.1, 3.3)
;; - if line-length is set, error on input exceeding the limit (3.1)
;; - reject characters outside base encoding (3.3, also section 12)
;;
;; RFC 5322 section 2.2.3 consideration:
;; Because base 64-encoded strings can appear in long header fields, remove
;; folding whitespace while still observing the RFC 4648 decisions above.
(when no-check
(setq str (replace-regexp-in-string "[\n\r \t]+" "" str)));
(let ((splitstr (split-string str "[ \t]*[\r\n]+[ \t]?" t)))
(when (and reject-newlines (> (length splitstr) 1))
(error "Invalid Base64 string"))
(dolist (substr splitstr)
(when (and line-length (> (length substr) line-length))
(error "Base64 string exceeds line-length"))
(when (string-match "[^A-Za-z0-9+/=]" substr)
(error "Invalid Base64 string")))
(let* ((str (string-join splitstr))
(len (length str)))
(when (string-match "=" str)
(setq len (match-beginning 0)))
(concat
(substring str 0 len)
(make-string (/
(- 24
(pcase (mod (* len 6) 24)
(`0 24)
(n n)))
6)
?=)))))
(defun gnus-make-predicate (spec)
"Transform SPEC into a function that can be called.
SPEC is a predicate specifier that contains stuff like `or', `and',

View file

@ -1076,7 +1076,9 @@ during splitting, which may be slow."
"UID COPY %s %S")
(nnimap-article-ranges (gnus-compress-sequence articles))
(nnimap-group-to-imap (gnus-group-real-name nnmail-expiry-target)))
(set (if can-move 'deleted-articles 'articles-to-delete) articles))))
(if can-move
(setq deleted-articles articles)
(setq articles-to-delete articles)))))
t)
(t
(dolist (article articles)

View file

@ -561,6 +561,12 @@ To record all your input, use `open-dribble-file'."
'font-lock-face 'help-key-binding
'face 'help-key-binding))
(defcustom describe-bindings-outline nil
"Non-nil enables outlines in the output buffer of `describe-bindings'."
:type 'boolean
:group 'help
:version "28.1")
(defun describe-bindings (&optional prefix buffer)
"Display a buffer showing a list of all defined keys, and their definitions.
The keys are displayed in order of precedence.
@ -578,23 +584,26 @@ or a buffer name."
;; Be aware that `describe-buffer-bindings' puts its output into
;; the current buffer.
(with-current-buffer (help-buffer)
(describe-buffer-bindings buffer prefix))))
(describe-buffer-bindings buffer prefix)
(defun describe-bindings-internal (&optional menus prefix)
"Show a list of all defined keys, and their definitions.
We put that list in a buffer, and display the buffer.
The optional argument MENUS, if non-nil, says to mention menu bindings.
\(Ordinarily these are omitted from the output.)
The optional argument PREFIX, if non-nil, should be a key sequence;
then we display only bindings that start with that prefix."
(declare (obsolete describe-buffer-bindings "24.4"))
(let ((buf (current-buffer)))
(with-help-window (help-buffer)
;; Be aware that `describe-buffer-bindings' puts its output into
;; the current buffer.
(with-current-buffer (help-buffer)
(describe-buffer-bindings buf prefix menus)))))
(when describe-bindings-outline
(setq-local outline-regexp ".*:$")
(setq-local outline-heading-end-regexp ":\n")
(setq-local outline-level (lambda () 1))
(setq-local outline-minor-mode-cycle t
outline-minor-mode-highlight t)
(outline-minor-mode 1)
(save-excursion
(let ((inhibit-read-only t))
(goto-char (point-min))
(insert (substitute-command-keys
(concat "\\<outline-mode-cycle-map>Type "
"\\[outline-cycle] or \\[outline-cycle-buffer] "
"on headings to cycle their visibility.\n\n")))
;; Hide the longest body
(when (and (re-search-forward "Key translations" nil t)
(fboundp 'outline-cycle))
(outline-cycle))))))))
(defun where-is (definition &optional insert)
"Print message listing key sequences that invoke the command DEFINITION.

View file

@ -3104,35 +3104,12 @@ on encoding."
(list name (concat (if char (list char) " ") "\t") "")))
names))
(defun mule--ucs-names-group (names)
(let* ((codes-and-names
(mapcar (lambda (name) (cons (gethash name ucs-names) name)) names))
(grouped
(seq-group-by
(lambda (code-name)
(let ((script (aref char-script-table (car code-name))))
(if script (symbol-name script) "ungrouped")))
codes-and-names))
names-with-header header)
(dolist (group (sort grouped (lambda (a b) (string< (car a) (car b)))))
(setq header t)
(dolist (code-name (cdr group))
(push (list
(cdr code-name)
(concat
(if header
(progn
(setq header nil)
(concat "\n" (propertize
(format "* %s\n" (car group))
'face 'header-line)))
"")
;; prefix
(if (car code-name) (format "%c" (car code-name)) " ") "\t")
;; suffix
"")
names-with-header)))
(nreverse names-with-header)))
(defun mule--ucs-names-group (name transform)
(if transform
name
(let* ((char (gethash name ucs-names))
(script (and char (aref char-script-table char))))
(if script (symbol-name script) "ungrouped"))))
(defun char-from-name (string &optional ignore-case)
"Return a character as a number from its Unicode name STRING.
@ -3164,14 +3141,6 @@ Defines the sorting order either by character names or their codepoints."
:group 'mule
:version "28.1")
(defcustom read-char-by-name-group nil
"How to group characters for `read-char-by-name' completion.
When t, split characters to sections of Unicode blocks
sorted alphabetically."
:type 'boolean
:group 'mule
:version "28.1")
(defun read-char-by-name (prompt)
"Read a character by its Unicode name or hex number string.
Display PROMPT and read a string that represents a character by its
@ -3185,8 +3154,9 @@ preceded by an asterisk `*' and use completion, it will show all
the characters whose names include that substring, not necessarily
at the beginning of the name.
The options `read-char-by-name-sort' and `read-char-by-name-group'
define the sorting order of completion characters and how to group them.
The options `read-char-by-name-sort', `completions-group', and
`completions-group-sort' define the sorting order of completion characters,
whether to group them, and how to sort groups.
Accept a name like \"CIRCULATION FUNCTION\", a hexadecimal
number like \"2A10\", or a number in hash notation (e.g.,
@ -3204,11 +3174,12 @@ as names, not numbers."
`(metadata
(display-sort-function
. ,(when (eq read-char-by-name-sort 'code)
#'mule--ucs-names-sort-by-code))
#'mule--ucs-names-sort-by-code))
(affixation-function
. ,(if read-char-by-name-group
#'mule--ucs-names-group
#'mule--ucs-names-affixation))
. ,#'mule--ucs-names-affixation)
(group-function
. ,(when completions-group
#'mule--ucs-names-group))
(category . unicode-name))
(complete-with-action action (ucs-names) string pred)))))
(char

View file

@ -1368,6 +1368,30 @@ If STR has `advice' text property, append the following special event:
(delete-region (overlay-start quail-overlay)
(overlay-end quail-overlay))))
;; Quail puts keys back in `unread-command-events' to be re-read
;; again, but these keys have already been recorded in recent-keys and
;; in the keyboard macro, if one is being defined, which means that
;; recording them again creates duplicates. This function is a
;; wrapper around adding input events to `unread-command-events', but
;; it makes sure these events will not be recorded a second time.
(defun quail-add-unread-command-events (key &optional reset)
"Add KEY to `unread-command-events', but avoid recording it a second time.
If KEY is a character, it is prepended to `unread-command-events' as
a cons cell of the form (no-record . KEY).
If KEY is a vector of events, the events in the vector are prepended
to `unread-command-events', after converting each event to a cons cell
of the form (no-record . EVENT).
If RESET is non-nil, the events in `unread-command-events' are first
discarded, i.e. in this case KEY will end up being the only key
in `unread-command-events'."
(if reset (setq unread-command-events nil))
(setq unread-command-events
(if (characterp key)
(cons (cons 'no-record key) unread-command-events)
(append (mapcan (lambda (e) (list (cons 'no-record e)))
(append key nil))
unread-command-events))))
(defun quail-start-translation (key)
"Start translation of the typed character KEY by the current Quail package.
Return the input string."
@ -1385,13 +1409,11 @@ Return the input string."
;; (generated-events nil) ;FIXME: What is this?
(input-method-function nil)
(modified-p (buffer-modified-p))
last-command-event last-command this-command inhibit-record)
last-command-event last-command this-command)
(setq quail-current-key ""
quail-current-str ""
quail-translating t)
(if key
(setq unread-command-events (cons key unread-command-events)
inhibit-record t))
(if key (quail-add-unread-command-events key))
(while quail-translating
(set-buffer-modified-p modified-p)
(quail-show-guidance)
@ -1400,13 +1422,8 @@ Return the input string."
(or input-method-previous-message "")
quail-current-str
quail-guidance-str)))
;; We inhibit record_char only for the first key,
;; because it was already recorded before read_char
;; called quail-input-method.
(inhibit--record-char inhibit-record)
(keyseq (read-key-sequence prompt nil nil t))
(cmd (lookup-key (quail-translation-keymap) keyseq)))
(setq inhibit-record nil)
(if (if key
(and (commandp cmd) (not (eq cmd 'quail-other-command)))
(eq cmd 'quail-self-insert-command))
@ -1420,9 +1437,7 @@ Return the input string."
(quail-error (message "%s" (cdr err)) (beep))))
;; KEYSEQ is not defined in the translation keymap.
;; Let's return the event(s) to the caller.
(setq unread-command-events
(append (this-single-command-raw-keys)
unread-command-events))
(quail-add-unread-command-events (this-single-command-raw-keys))
(setq quail-translating nil))))
(quail-delete-region)
quail-current-str)
@ -1450,15 +1465,13 @@ Return the input string."
;; (generated-events nil) ;FIXME: What is this?
(input-method-function nil)
(modified-p (buffer-modified-p))
last-command-event last-command this-command inhibit-record)
last-command-event last-command this-command)
(setq quail-current-key ""
quail-current-str ""
quail-translating t
quail-converting t
quail-conversion-str "")
(if key
(setq unread-command-events (cons key unread-command-events)
inhibit-record t))
(if key (quail-add-unread-command-events key))
(while quail-converting
(set-buffer-modified-p modified-p)
(or quail-translating
@ -1474,13 +1487,8 @@ Return the input string."
quail-conversion-str
quail-current-str
quail-guidance-str)))
;; We inhibit record_char only for the first key,
;; because it was already recorded before read_char
;; called quail-input-method.
(inhibit--record-char inhibit-record)
(keyseq (read-key-sequence prompt nil nil t))
(cmd (lookup-key (quail-conversion-keymap) keyseq)))
(setq inhibit-record nil)
(if (if key (commandp cmd) (eq cmd 'quail-self-insert-command))
(progn
(setq last-command-event (aref keyseq (1- (length keyseq)))
@ -1503,9 +1511,7 @@ Return the input string."
(setq quail-converting nil)))))
;; KEYSEQ is not defined in the conversion keymap.
;; Let's return the event(s) to the caller.
(setq unread-command-events
(append (this-single-command-raw-keys)
unread-command-events))
(quail-add-unread-command-events (this-single-command-raw-keys))
(setq quail-converting nil))))
(setq quail-translating nil)
(if (overlay-start quail-conv-overlay)
@ -1551,9 +1557,8 @@ with more keys."
(or input-method-exit-on-first-char
(while (> len control-flag)
(setq len (1- len))
(setq unread-command-events
(cons (aref quail-current-key len)
unread-command-events))))))
(quail-add-unread-command-events
(aref quail-current-key len))))))
((null control-flag)
(unless quail-current-str
(setq quail-current-str
@ -1799,8 +1804,7 @@ sequence counting from the head."
(setcar indices (1+ (car indices)))
(quail-update-current-translations)
(quail-update-translation nil)))
(setq unread-command-events
(cons last-command-event unread-command-events))
(quail-add-unread-command-events last-command-event)
(quail-terminate-translation)))
(defun quail-prev-translation ()
@ -1814,8 +1818,7 @@ sequence counting from the head."
(setcar indices (1- (car indices)))
(quail-update-current-translations)
(quail-update-translation nil)))
(setq unread-command-events
(cons last-command-event unread-command-events))
(quail-add-unread-command-events last-command-event)
(quail-terminate-translation)))
(defun quail-next-translation-block ()
@ -1830,8 +1833,7 @@ sequence counting from the head."
(setcar indices (+ (nth 2 indices) offset))
(quail-update-current-translations)
(quail-update-translation nil)))
(setq unread-command-events
(cons last-command-event unread-command-events))
(quail-add-unread-command-events last-command-event)
(quail-terminate-translation)))
(defun quail-prev-translation-block ()
@ -1850,8 +1852,7 @@ sequence counting from the head."
(setcar indices (+ (nth 1 indices) offset))
(quail-update-current-translations)))
(quail-update-translation nil)))
(setq unread-command-events
(cons last-command-event unread-command-events))
(quail-add-unread-command-events last-command-event)
(quail-terminate-translation)))
(defun quail-abort-translation ()
@ -2006,8 +2007,8 @@ Remaining args are for FUNC."
(sit-for 1000000)
(delete-region point-max (point-max))
(when quit-flag
(setq quit-flag nil
unread-command-events '(7)))))
(setq quit-flag nil)
(quail-add-unread-command-events 7 t))))
(defun quail-show-guidance ()
"Display a guidance for Quail input method in some window.

View file

@ -3462,6 +3462,10 @@ Can be changed via `isearch-search-fun-function' for special needs."
(if isearch-forward #'re-search-forward #'re-search-backward)
regexp bound noerror count))))
;; This is for when we compile this file during bootstrap, with
;; loaddefs.el still not loaded.
(declare-function multi-isearch-switch-buffer "misearch" ())
(defun isearch-search-string (string bound noerror)
"Search for the first occurrence of STRING or its translation.
STRING's characters are translated using `translation-table-for-input'

View file

@ -782,17 +782,23 @@ If kbd macro currently being defined end it before activating it."
;; executing the macro later on (but that's controversial...)
;;;###autoload
(defun kmacro-lambda-form (mac)
(defun kmacro-lambda-form (mac &optional counter format)
"Create lambda form for macro bound to symbol or key."
;; FIXME: This should be a "funcallable struct"!
(lambda (&optional arg)
"Keyboard macro."
;; We put an "unused prompt" as a special marker so
;; `kmacro-extract-lambda' can see it's "one of us".
(interactive "pkmacro")
(if (eq arg 'kmacro--extract-lambda)
(cons 'kmacro--extract-lambda mac)
(kmacro-exec-ring-item mac arg))))
;; Apparently, there are two different ways this is called:
;; either `counter' and `format' are both provided and `mac' is a vector,
;; or only `mac' is provided, as a list (MAC COUNTER FORMAT).
;; The first is used from `insert-kbd-macro' and `edmacro-finish-edit',
;; while the second is used from within this file.
(let ((mac (if counter (list mac counter format) mac)))
;; FIXME: This should be a "funcallable struct"!
(lambda (&optional arg)
"Keyboard macro."
;; We put an "unused prompt" as a special marker so
;; `kmacro-extract-lambda' can see it's "one of us".
(interactive "pkmacro")
(if (eq arg 'kmacro--extract-lambda)
(cons 'kmacro--extract-lambda mac)
(kmacro-exec-ring-item mac arg)))))
(defun kmacro-extract-lambda (mac)
"Extract kmacro from a kmacro lambda form."

View file

@ -3360,7 +3360,7 @@ tags such as [tag]."
;; Corporate mailing systems sometimes add `[External] :'; if that happened,
;; delete everything up thru there. Empirically, that deletion makes
;; the Subject match the other messages in the thread.
(if (string-match "[[]external][ \t\n]*:" subject)
(if (string-match "\\[external][ \t\n]*:" subject)
(setq subject (substring subject (match-end 0))))
(setq subject (rfc2047-decode-string subject))
(setq subject (replace-regexp-in-string regexp "" subject))

View file

@ -126,6 +126,13 @@ This metadata is an alist. Currently understood keys are:
three-element lists: completion, its prefix and suffix. This
function takes priority over `annotation-function' when both are
provided, so only this function is used.
- `group-function': function for grouping the completion candidates.
Takes two arguments: a completion candidate (COMPLETION) and a
boolean flag (TRANSFORM). If TRANSFORM is nil, the function
returns the group title of the group to which the candidate
belongs. The returned title may be nil. Otherwise the function
returns the transformed candidate. The transformation can remove a
redundant prefix, which is displayed in the group title.
- `display-sort-function': function to sort entries in *Completions*.
Takes one argument (COMPLETIONS) and should return a new list
of completions. Can operate destructively.
@ -1138,6 +1145,44 @@ completion candidates than this number."
:version "24.1"
:type completion--cycling-threshold-type)
(defcustom completions-group nil
"Enable grouping of completion candidates in the *Completions* buffer.
See also `completions-group-format' and `completions-group-sort'."
:type 'boolean
:version "28.1")
(defcustom completions-group-sort nil
"Sort groups in the *Completions* buffer.
The value can either be nil to disable sorting, `alphabetical' for
alphabetical sorting or a custom sorting function. The sorting
function takes and returns an alist of groups, where each element is a
pair of a group title string and a list of group candidate strings."
:type '(choice (const :tag "No sorting" nil)
(const :tag "Alphabetical sorting" alphabetical)
function)
:version "28.1")
(defcustom completions-group-format
(concat
(propertize " " 'face 'completions-group-separator)
(propertize " %s " 'face 'completions-group-title)
(propertize " " 'face 'completions-group-separator
'display '(space :align-to right)))
"Format string used for the group title."
:type 'string
:version "28.1")
(defface completions-group-title
'((t :inherit shadow :slant italic))
"Face used for the title text of the candidate group headlines."
:version "28.1")
(defface completions-group-separator
'((t :inherit shadow :strike-through t))
"Face used for the separator lines between the candidate groups."
:version "28.1")
(defun completion--cycle-threshold (metadata)
(let* ((cat (completion-metadata-get metadata 'category))
(over (completion--category-override cat 'cycle)))
@ -1401,6 +1446,22 @@ Remove completion BASE prefix string from history elements."
(substring c base-size)))
hist)))))
(defun minibuffer--group-by (group-fun sort-fun elems)
"Group ELEMS by GROUP-FUN and sort groups by SORT-FUN."
(let ((groups))
(dolist (cand elems)
(let* ((key (funcall group-fun cand nil))
(group (assoc key groups)))
(if group
(setcdr group (cons cand (cdr group)))
(push (list key cand) groups))))
(setq groups (nreverse groups)
groups (mapc (lambda (x)
(setcdr x (nreverse (cdr x))))
groups)
groups (funcall sort-fun groups))
(mapcan #'cdr groups)))
(defun completion-all-sorted-completions (&optional start end)
(or completion-all-sorted-completions
(let* ((start (or start (minibuffer-prompt-end)))
@ -1747,15 +1808,17 @@ or appended to completions."
:type 'boolean
:version "28.1")
(defun completion--insert-strings (strings)
(defun completion--insert-strings (strings &optional group-fun)
"Insert a list of STRINGS into the current buffer.
Uses columns to keep the listing readable but compact.
It also eliminates runs of equal strings."
The candidate strings are inserted into the buffer depending on the
completions format as specified by the variable `completions-format'.
Runs of equal candidate strings are eliminated. GROUP-FUN is a
`group-function' used for grouping the completion candidates."
(when (consp strings)
(let* ((length (apply #'max
(mapcar (lambda (s)
(if (consp s)
(apply #'+ (mapcar #'string-width s))
(apply #'+ (mapcar #'string-width s))
(string-width s)))
strings)))
(window (get-buffer-window (current-buffer) 0))
@ -1766,104 +1829,158 @@ It also eliminates runs of equal strings."
;; Don't allocate more columns than we can fill.
;; Windows can't show less than 3 lines anyway.
(max 1 (/ (length strings) 2))))
(colwidth (/ wwidth columns))
(column 0)
(rows (/ (length strings) columns))
(row 0)
(first t)
(laststring nil))
(colwidth (/ wwidth columns)))
(unless (or tab-stop-list (null completion-tab-width)
(zerop (mod colwidth completion-tab-width)))
;; Align to tab positions for the case
;; when the caller uses tabs inside prefix.
(setq colwidth (- colwidth (mod colwidth completion-tab-width))))
;; The insertion should be "sensible" no matter what choices were made
;; for the parameters above.
(dolist (str strings)
(unless (equal laststring str) ; Remove (consecutive) duplicates.
(setq laststring str)
(funcall (intern (format "completion--insert-%s" completions-format))
strings group-fun length wwidth colwidth columns))))
(defun completion--insert-horizontal (strings group-fun
length wwidth
colwidth _columns)
(let ((column 0)
(first t)
(last-title nil)
(last-string nil))
(dolist (str strings)
(unless (equal last-string str) ; Remove (consecutive) duplicates.
(setq last-string str)
(when group-fun
(let ((title (funcall group-fun (if (consp str) (car str) str) nil)))
(unless (equal title last-title)
(setq last-title title)
(when title
(insert (if first "" "\n") (format completions-group-format title) "\n")
(setq column 0
first t)))))
(unless first
;; FIXME: `string-width' doesn't pay attention to
;; `display' properties.
(let ((length (if (consp str)
(apply #'+ (mapcar #'string-width str))
(string-width str))))
(cond
((eq completions-format 'one-column)
;; Nothing special
)
((eq completions-format 'vertical)
;; Vertical format
(when (> row rows)
(forward-line (- -1 rows))
(setq row 0 column (+ column colwidth)))
(when (> column 0)
(end-of-line)
(while (> (current-column) column)
(if (eobp)
(insert "\n")
(forward-line 1)
(end-of-line)))
(insert " \t")
(set-text-properties (1- (point)) (point)
`(display (space :align-to ,column)))))
(t
;; Horizontal format
(unless first
(if (< wwidth (+ (max colwidth length) column))
;; No space for `str' at point, move to next line.
(progn (insert "\n") (setq column 0))
(insert " \t")
;; Leave the space unpropertized so that in the case we're
;; already past the goal column, there is still
;; a space displayed.
(set-text-properties (1- (point)) (point)
;; We can set tab-width using
;; completion-tab-width, but
;; the caller can prefer using
;; \t to align prefixes.
`(display (space :align-to ,column)))
nil))))
(setq first nil)
(if (not (consp str))
(put-text-property (point) (progn (insert str) (point))
'mouse-face 'highlight)
;; If `str' is a list that has 2 elements,
;; then the second element is a suffix annotation.
;; If `str' has 3 elements, then the second element
;; is a prefix, and the third element is a suffix.
(let* ((prefix (when (nth 2 str) (nth 1 str)))
(suffix (or (nth 2 str) (nth 1 str))))
(when prefix
(let ((beg (point))
(end (progn (insert prefix) (point))))
(put-text-property beg end 'mouse-face nil)))
(put-text-property (point) (progn (insert (car str)) (point))
'mouse-face 'highlight)
(let ((beg (point))
(end (progn (insert suffix) (point))))
(put-text-property beg end 'mouse-face nil)
;; Put the predefined face only when suffix
;; is added via annotation-function without prefix,
;; and when the caller doesn't use own face.
(unless (or prefix (text-property-not-all
0 (length suffix) 'face nil suffix))
(font-lock-prepend-text-property
beg end 'face 'completions-annotations)))))
(cond
((eq completions-format 'one-column)
(insert "\n"))
((eq completions-format 'vertical)
;; Vertical format
(if (> column 0)
(forward-line)
(insert "\n"))
(setq row (1+ row)))
(t
;; Horizontal format
;; Next column to align to.
(setq column (+ column
;; Round up to a whole number of columns.
(* colwidth (ceiling length colwidth))))))))))))
(if (< wwidth (+ column (max colwidth
(if (consp str)
(apply #'+ (mapcar #'string-width str))
(string-width str)))))
;; No space for `str' at point, move to next line.
(progn (insert "\n") (setq column 0))
(insert " \t")
;; Leave the space unpropertized so that in the case we're
;; already past the goal column, there is still
;; a space displayed.
(set-text-properties (1- (point)) (point)
;; We can set tab-width using
;; completion-tab-width, but
;; the caller can prefer using
;; \t to align prefixes.
`(display (space :align-to ,column)))
nil))
(setq first nil)
(completion--insert str group-fun)
;; Next column to align to.
(setq column (+ column
;; Round up to a whole number of columns.
(* colwidth (ceiling length colwidth))))))))
(defun completion--insert-vertical (strings group-fun
_length _wwidth
colwidth columns)
(while strings
(let ((group nil)
(column 0)
(row 0)
(rows)
(last-string nil))
(if group-fun
(let* ((str (car strings))
(title (funcall group-fun (if (consp str) (car str) str) nil)))
(while (and strings
(equal title (funcall group-fun
(if (consp (car strings))
(car (car strings))
(car strings))
nil)))
(push (car strings) group)
(pop strings))
(setq group (nreverse group)))
(setq group strings
strings nil))
(setq rows (/ (length group) columns))
(when group-fun
(let* ((str (car group))
(title (funcall group-fun (if (consp str) (car str) str) nil)))
(when title
(goto-char (point-max))
(insert (format completions-group-format title) "\n"))))
(dolist (str group)
(unless (equal last-string str) ; Remove (consecutive) duplicates.
(setq last-string str)
(when (> row rows)
(forward-line (- -1 rows))
(setq row 0 column (+ column colwidth)))
(when (> column 0)
(end-of-line)
(while (> (current-column) column)
(if (eobp)
(insert "\n")
(forward-line 1)
(end-of-line)))
(insert " \t")
(set-text-properties (1- (point)) (point)
`(display (space :align-to ,column))))
(completion--insert str group-fun)
(if (> column 0)
(forward-line)
(insert "\n"))
(setq row (1+ row)))))))
(defun completion--insert-one-column (strings group-fun &rest _)
(let ((last-title nil) (last-string nil))
(dolist (str strings)
(unless (equal last-string str) ; Remove (consecutive) duplicates.
(setq last-string str)
(when group-fun
(let ((title (funcall group-fun (if (consp str) (car str) str) nil)))
(unless (equal title last-title)
(setq last-title title)
(when title
(insert (format completions-group-format title) "\n")))))
(completion--insert str group-fun)
(insert "\n")))))
(defun completion--insert (str group-fun)
(if (not (consp str))
(add-text-properties
(point)
(progn
(insert
(if group-fun
(funcall group-fun str 'transform)
str))
(point))
`(mouse-face highlight completion--string ,str))
;; If `str' is a list that has 2 elements,
;; then the second element is a suffix annotation.
;; If `str' has 3 elements, then the second element
;; is a prefix, and the third element is a suffix.
(let* ((prefix (when (nth 2 str) (nth 1 str)))
(suffix (or (nth 2 str) (nth 1 str))))
(when prefix
(let ((beg (point))
(end (progn (insert prefix) (point))))
(put-text-property beg end 'mouse-face nil)))
(completion--insert (car str) group-fun)
(let ((beg (point))
(end (progn (insert suffix) (point))))
(put-text-property beg end 'mouse-face nil)
;; Put the predefined face only when suffix
;; is added via annotation-function without prefix,
;; and when the caller doesn't use own face.
(unless (or prefix (text-property-not-all
0 (length suffix) 'face nil suffix))
(font-lock-prepend-text-property
beg end 'face 'completions-annotations))))))
(defvar completion-setup-hook nil
"Normal hook run at the end of setting up a completion list buffer.
@ -1923,7 +2040,7 @@ and with BASE-SIZE appended as the last element."
completions)
base-size))))
(defun display-completion-list (completions &optional common-substring)
(defun display-completion-list (completions &optional common-substring group-fun)
"Display the list of completions, COMPLETIONS, using `standard-output'.
Each element may be just a symbol or string
or may be a list of two strings to be printed as if concatenated.
@ -1933,7 +2050,9 @@ alternative, the second serves as annotation.
The actual completion alternatives, as inserted, are given `mouse-face'
properties of `highlight'.
At the end, this runs the normal hook `completion-setup-hook'.
It can find the completion buffer in `standard-output'."
It can find the completion buffer in `standard-output'.
GROUP-FUN is a `group-function' used for grouping the completion
candidates."
(declare (advertised-calling-convention (completions) "24.4"))
(if common-substring
(setq completions (completion-hilit-commonality
@ -1946,7 +2065,7 @@ It can find the completion buffer in `standard-output'."
(let ((standard-output (current-buffer))
(completion-setup-hook nil))
(with-suppressed-warnings ((callargs display-completion-list))
(display-completion-list completions common-substring)))
(display-completion-list completions common-substring group-fun)))
(princ (buffer-string)))
(with-current-buffer standard-output
@ -1954,7 +2073,7 @@ It can find the completion buffer in `standard-output'."
(if (null completions)
(insert "There are no possible completions of what you have typed.")
(insert "Possible completions are:\n")
(completion--insert-strings completions))))
(completion--insert-strings completions group-fun))))
(run-hooks 'completion-setup-hook)
nil)
@ -2067,6 +2186,8 @@ variables.")
(aff-fun (or (completion-metadata-get all-md 'affixation-function)
(plist-get completion-extra-properties
:affixation-function)))
(sort-fun (completion-metadata-get all-md 'display-sort-function))
(group-fun (completion-metadata-get all-md 'group-function))
(mainbuf (current-buffer))
;; If the *Completions* buffer is shown in a new
;; window, mark it as softly-dedicated, so bury-buffer in
@ -2098,15 +2219,32 @@ variables.")
;; Remove the base-size tail because `sort' requires a properly
;; nil-terminated list.
(when last (setcdr last nil))
(setq completions
;; FIXME: This function is for the output of all-completions,
;; not completion-all-completions. Often it's the same, but
;; not always.
(let ((sort-fun (completion-metadata-get
all-md 'display-sort-function)))
(if sort-fun
(funcall sort-fun completions)
(sort completions 'string-lessp))))
;; Sort first using the `display-sort-function'.
;; FIXME: This function is for the output of
;; all-completions, not
;; completion-all-completions. Often it's the
;; same, but not always.
(setq completions (if sort-fun
(funcall sort-fun completions)
(sort completions 'string-lessp)))
;; After sorting, group the candidates using the
;; `group-function'.
(when group-fun
(setq completions
(minibuffer--group-by
group-fun
(pcase completions-group-sort
('nil #'identity)
('alphabetical
(lambda (groups)
(sort groups
(lambda (x y)
(string< (car x) (car y))))))
(_ completions-group-sort))
completions)))
(cond
(aff-fun
(setq completions
@ -2152,7 +2290,7 @@ variables.")
(if (eq (car bounds) (length result))
'exact 'finished)))))))
(display-completion-list completions)))))
(display-completion-list completions nil group-fun)))))
nil)))
nil))
@ -2465,6 +2603,7 @@ The completion method is determined by `completion-at-point-functions'."
(define-key map "?" 'minibuffer-completion-help)
(define-key map [prior] 'switch-to-completions)
(define-key map "\M-v" 'switch-to-completions)
(define-key map "\M-g\M-c" 'switch-to-completions)
map)
"Local keymap for minibuffer input with completion.")

View file

@ -949,7 +949,11 @@ Some AT&T folks claim to use something called `pftp' here."
:type 'string)
(defcustom ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v")
"A list of arguments passed to the FTP program when started."
;; Clients that use the BSD editline instead of the GNU readline
;; library may need to disable command line editing. (Bug#48494)
"A list of arguments passed to the FTP program when started.
Some FTP clients may also require the \"-e\" argument, which disables
command line editing."
:group 'ange-ftp
:type '(repeat string))

View file

@ -345,8 +345,17 @@ arguments to pass to the OPERATION."
(tramp-archive-run-real-handler operation args)))))))
;;;###autoload
(defalias
'tramp-archive-autoload-file-name-handler #'tramp-autoload-file-name-handler)
(progn (defun tramp-archive-autoload-file-name-handler (operation &rest args)
"Load Tramp archive file name handler, and perform OPERATION."
(when tramp-archive-enabled
;; We cannot use `tramp-compat-temporary-file-directory' here due
;; to autoload. When installing Tramp's GNU ELPA package, there
;; might be an older, incompatible version active. We try to
;; overload this.
(let ((default-directory temporary-file-directory)
(tramp-archive-autoload t))
tramp-archive-autoload ; Silence byte compiler.
(apply #'tramp-autoload-file-name-handler operation args)))))
;;;###autoload
(progn (defun tramp-register-archive-file-name-handler ()

View file

@ -237,8 +237,7 @@ Return VALUE."
;;;###tramp-autoload
(defun tramp-flush-file-properties (key file)
"Remove all properties of FILE in the cache context of KEY."
(let* ((file (tramp-run-real-handler
#'directory-file-name (list file)))
(let* ((file (tramp-run-real-handler #'directory-file-name (list file)))
(truename (tramp-get-file-property key file "file-truename" nil)))
;; Unify localname. Remove hop from `tramp-file-name' structure.
(setq file (tramp-compat-file-name-unquote file)

View file

@ -1089,7 +1089,7 @@ file names."
'copy filename newname ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes)
(tramp-run-real-handler
'copy-file
#'copy-file
(list filename newname ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes))))

View file

@ -42,6 +42,8 @@
(declare-function tramp-dissect-file-name "tramp")
(declare-function tramp-file-name-equal-p "tramp")
(declare-function tramp-tramp-file-p "tramp")
(declare-function tramp-rename-files "tramp-cmds")
(declare-function tramp-rename-these-files "tramp-cmds")
(defvar eshell-path-env)
(defvar ido-read-file-name-non-ido)
(defvar info-lookup-alist)
@ -184,14 +186,14 @@ NAME must be equal to `tramp-current-connection'."
;;; Integration of ido.el:
(with-eval-after-load 'ido
(add-to-list 'ido-read-file-name-non-ido 'tramp-rename-files)
(add-to-list 'ido-read-file-name-non-ido 'tramp-these-rename-files)
(add-to-list 'ido-read-file-name-non-ido #'tramp-rename-files)
(add-to-list 'ido-read-file-name-non-ido #'tramp-rename-these-files)
(add-hook 'tramp-integration-unload-hook
(lambda ()
(setq ido-read-file-name-non-ido
(delq 'tramp-these-rename-files ido-read-file-name-non-ido)
(delq #'tramp-rename-these-files ido-read-file-name-non-ido)
ido-read-file-name-non-ido
(delq 'tramp-rename-files ido-read-file-name-non-ido)))))
(delq #'tramp-rename-files ido-read-file-name-non-ido)))))
;;; Integration of ivy.el:
@ -199,17 +201,17 @@ NAME must be equal to `tramp-current-connection'."
(add-to-list 'ivy-completing-read-handlers-alist
'(tramp-rename-files . completing-read-default))
(add-to-list 'ivy-completing-read-handlers-alist
'(tramp-these-rename-files . completing-read-default))
'(tramp-rename-these-files . completing-read-default))
(add-hook
'tramp-integration-unload-hook
(lambda ()
(setq ivy-completing-read-handlers-alist
(delete
(assq 'tramp-these-rename-files ivy-completing-read-handlers-alist)
(assq #'tramp-rename-these-files ivy-completing-read-handlers-alist)
ivy-completing-read-handlers-alist)
ivy-completing-read-handlers-alist
(delete
(assq 'tramp-rename-files ivy-completing-read-handlers-alist)
(assq #'tramp-rename-files ivy-completing-read-handlers-alist)
ivy-completing-read-handlers-alist)))))
;;; Integration of info-look.el:

View file

@ -1843,7 +1843,7 @@ ID-FORMAT valid values are `string' and `integer'."
'copy filename newname ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes)
(tramp-run-real-handler
'copy-file
#'copy-file
(list filename newname ok-if-already-exists keep-date
preserve-uid-gid preserve-extended-attributes))))
@ -1884,7 +1884,7 @@ ID-FORMAT valid values are `string' and `integer'."
;; We must do it file-wise.
(tramp-run-real-handler
'copy-directory
#'copy-directory
(list dirname newname keep-date parents copy-contents)))
;; When newname did exist, we have wrong cached values.

View file

@ -650,7 +650,7 @@ component is used as the target of the symlink."
'rename filename newname ok-if-already-exists
'keep-date 'preserve-uid-gid)
(tramp-run-real-handler
'rename-file (list filename newname ok-if-already-exists))))
#'rename-file (list filename newname ok-if-already-exists))))
(defun tramp-sudoedit-handle-set-file-acl (filename acl-string)
"Like `set-file-acl' for Tramp files."

View file

@ -2631,6 +2631,8 @@ Falls back to normal file name handler if no Tramp file name handler exists."
;; might be an older, incompatible version active. We try to
;; overload this.
(let ((default-directory temporary-file-directory))
(when (bound-and-true-p tramp-archive-autoload)
(load "tramp-archive" 'noerror 'nomessage))
(load "tramp" 'noerror 'nomessage)))
(apply operation args)))
@ -2642,7 +2644,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
"Add Tramp file name handlers to `file-name-handler-alist' during autoload."
(add-to-list 'file-name-handler-alist
(cons tramp-autoload-file-name-regexp
'tramp-autoload-file-name-handler))
#'tramp-autoload-file-name-handler))
(put #'tramp-autoload-file-name-handler 'safe-magic t)))
;;;###autoload (tramp-register-autoload-file-name-handlers)
@ -2854,7 +2856,7 @@ not in completion mode."
result1
(ignore-errors
(tramp-run-real-handler
'file-name-all-completions (list filename directory))))))
#'file-name-all-completions (list filename directory))))))
;; Method, host name and user name completion for a file.
(defun tramp-completion-handle-file-name-completion
@ -3275,7 +3277,7 @@ User is always nil."
(tramp-compat-file-missing (tramp-dissect-file-name directory) directory))
;; We must do it file-wise.
(tramp-run-real-handler
'copy-directory
#'copy-directory
(list directory newname keep-date parents copy-contents)))
(defun tramp-handle-directory-file-name (directory)

View file

@ -205,7 +205,9 @@ in the file it applies to.")
(list 'face (outline-font-lock-face)
'keymap outline-mode-cycle-map)
(list 'face nil
'keymap outline-mode-cycle-map)))
'keymap outline-mode-cycle-map))
(if outline-minor-mode-highlight
(list 'face (outline-font-lock-face))))
(outline-font-lock-face))
(when outline-minor-mode
(pcase outline-minor-mode-highlight
@ -349,7 +351,7 @@ faces to major mode's faces."
(const :tag "Append outline faces to major mode faces" append)
(const :tag "Highlight separately from major mode faces" t))
:version "28.1")
;;;###autoload(put 'outline-minor-mode-highlight 'safe-local-variable 'booleanp)
;;;###autoload(put 'outline-minor-mode-highlight 'safe-local-variable 'symbolp)
(defun outline-minor-mode-highlight-buffer ()
;; Fallback to overlays when font-lock is unsupported.

View file

@ -165,7 +165,7 @@ Geospatial-Intelligence Agency at URL `https://www.nga.mil/'")
(setq sep ""))
((setq morse (assoc str morse-code))
(delete-char 1)
(insert sep (cdr morse))
(insert-before-markers sep (cdr morse))
(setq sep "/"))
(t
(forward-char 1)
@ -211,7 +211,7 @@ Geospatial-Intelligence Agency at URL `https://www.nga.mil/'")
(setq sep ""))
((setq nato (assoc str nato-alphabet))
(delete-char 1)
(insert sep (cdr nato))
(insert-before-markers sep (cdr nato))
(setq sep "-"))
(t
(forward-char 1)

View file

@ -138,7 +138,7 @@ The second subexpression should match the bug reference (usually a number)."
(when url
(browse-url url))))))
(defun bug-reference--maybe-setup-from-vc (url url-rx bug-rx bug-url-fmt)
(defun bug-reference-maybe-setup-from-vc (url url-rx bug-rx bug-url-fmt)
(when (string-match url-rx url)
(setq-local bug-reference-bug-regexp bug-rx)
(setq-local bug-reference-url-format
@ -224,7 +224,7 @@ and apply it if applicable."
(when url
(catch 'found
(dolist (config bug-reference-setup-from-vc-alist)
(when (apply #'bug-reference--maybe-setup-from-vc
(when (apply #'bug-reference-maybe-setup-from-vc
url config)
(throw 'found t)))))))))
@ -258,7 +258,7 @@ same `bug-reference-url-format' and `bug-reference-url-format'.")
(defvar gnus-newsgroup-name)
(defun bug-reference--maybe-setup-from-mail (group header-values)
(defun bug-reference-maybe-setup-from-mail (group header-values)
"Set up according to mail GROUP or HEADER-VALUES.
Group is a mail group/folder name and HEADER-VALUES is a list of
mail header values, e.g., the values of From, To, Cc, List-ID,
@ -294,53 +294,51 @@ and set it if applicable."
;; article changes.
(add-hook 'gnus-article-prepare-hook
#'bug-reference--try-setup-gnus-article)
(bug-reference--maybe-setup-from-mail gnus-newsgroup-name nil)))
(bug-reference-maybe-setup-from-mail gnus-newsgroup-name nil)))
(defvar gnus-article-buffer)
(defvar gnus-original-article-buffer)
(defvar gnus-summary-buffer)
(defun bug-reference--try-setup-gnus-article ()
(with-demoted-errors
"Error in bug-reference--try-setup-gnus-article: %S"
(when (and bug-reference-mode ;; Only if enabled in article buffers.
(derived-mode-p
'gnus-article-mode
;; Apparently, gnus-article-prepare-hook is run in the
;; summary buffer...
'gnus-summary-mode)
gnus-article-buffer
gnus-original-article-buffer
(buffer-live-p (get-buffer gnus-article-buffer))
(buffer-live-p (get-buffer gnus-original-article-buffer)))
(with-current-buffer gnus-article-buffer
(catch 'setup-done
;; Copy over the values from the summary buffer.
(when (and gnus-summary-buffer
(buffer-live-p gnus-summary-buffer))
(setq-local bug-reference-bug-regexp
(with-current-buffer gnus-summary-buffer
bug-reference-bug-regexp))
(setq-local bug-reference-url-format
(with-current-buffer gnus-summary-buffer
bug-reference-url-format))
(when (and bug-reference-bug-regexp
bug-reference-url-format)
(throw 'setup-done t)))
;; If the summary had no values, try setting according to
;; the values of the From, To, and Cc headers.
(let (header-values)
(with-current-buffer
(get-buffer gnus-original-article-buffer)
(save-excursion
(goto-char (point-min))
;; The Newsgroup is omitted because we already matched
;; based on group name in the summary buffer.
(dolist (field '("list-id" "to" "from" "cc"))
(let ((val (mail-fetch-field field)))
(when val
(push val header-values))))))
(bug-reference--maybe-setup-from-mail nil header-values)))))))
(when (and bug-reference-mode ;; Only if enabled in article buffers.
(derived-mode-p
'gnus-article-mode
;; Apparently, gnus-article-prepare-hook is run in the
;; summary buffer...
'gnus-summary-mode)
gnus-article-buffer
gnus-original-article-buffer
(buffer-live-p (get-buffer gnus-article-buffer))
(buffer-live-p (get-buffer gnus-original-article-buffer)))
(with-current-buffer gnus-article-buffer
(catch 'setup-done
;; Copy over the values from the summary buffer.
(when (and gnus-summary-buffer
(buffer-live-p gnus-summary-buffer))
(setq-local bug-reference-bug-regexp
(with-current-buffer gnus-summary-buffer
bug-reference-bug-regexp))
(setq-local bug-reference-url-format
(with-current-buffer gnus-summary-buffer
bug-reference-url-format))
(when (and bug-reference-bug-regexp
bug-reference-url-format)
(throw 'setup-done t)))
;; If the summary had no values, try setting according to
;; the values of the From, To, and Cc headers.
(let (header-values)
(with-current-buffer
(get-buffer gnus-original-article-buffer)
(save-excursion
(goto-char (point-min))
;; The Newsgroup is omitted because we already matched
;; based on group name in the summary buffer.
(dolist (field '("list-id" "to" "from" "cc"))
(let ((val (mail-fetch-field field)))
(when val
(push val header-values))))))
(bug-reference-maybe-setup-from-mail nil header-values))))))
(defun bug-reference-try-setup-from-rmail ()
"Try setting up `bug-reference-mode' from the current rmail mail.
@ -349,19 +347,17 @@ Guesses suitable `bug-reference-bug-regexp' and
file's name against GROUP-REGEXP and the values of List-Id, To,
From, and Cc against HEADER-REGEXP in
`bug-reference-setup-from-mail-alist'."
(with-demoted-errors
"Error in bug-reference-try-setup-from-rmail: %S"
(when (and bug-reference-mode
(derived-mode-p 'rmail-mode))
(let (header-values)
(save-excursion
(goto-char (point-min))
(dolist (field '("list-id" "to" "from" "cc"))
(let ((val (mail-fetch-field field)))
(when val
(push val header-values)))))
(bug-reference--maybe-setup-from-mail
(buffer-file-name) header-values)))))
(when (and bug-reference-mode
(derived-mode-p 'rmail-mode))
(let (header-values)
(save-excursion
(goto-char (point-min))
(dolist (field '("list-id" "to" "from" "cc"))
(let ((val (mail-fetch-field field)))
(when val
(push val header-values)))))
(bug-reference-maybe-setup-from-mail
(buffer-file-name) header-values))))
(defvar bug-reference-setup-from-irc-alist
`((,(concat "#" (regexp-opt '("emacs" "gnus" "org-mode" "rcirc"
@ -372,8 +368,8 @@ From, and Cc against HEADER-REGEXP in
"An alist for setting up `bug-reference-mode' in IRC modes.
This takes action if `bug-reference-mode' is enabled in IRC
channels using one of Emacs' IRC clients (rcirc and ERC).
Currently, rcirc and ERC are supported.
channels using one of Emacs' IRC clients. Currently, rcirc and
ERC are supported.
Each element has the form
@ -386,7 +382,7 @@ If all given entries match, BUG-REGEXP is set as
`bug-reference-bug-regexp' and URL-FORMAT is set as
`bug-reference-url-format'.")
(defun bug-reference--maybe-setup-from-irc (channel network)
(defun bug-reference-maybe-setup-from-irc (channel network)
"Set up according to IRC CHANNEL or NETWORK.
CHANNEL is an IRC channel name (or generally a target, i.e., it
could also be a user name) and NETWORK is that channel's network
@ -422,7 +418,7 @@ corresponding BUG-REGEXP and URL-FORMAT are set."
Test each configuration in `bug-reference-setup-from-irc-alist'
and set it if applicable."
(when (derived-mode-p 'rcirc-mode)
(bug-reference--maybe-setup-from-irc
(bug-reference-maybe-setup-from-irc
rcirc-target
(and rcirc-server-buffer
(buffer-live-p rcirc-server-buffer)
@ -437,7 +433,7 @@ and set it if applicable."
Test each configuration in `bug-reference-setup-from-irc-alist'
and set it if applicable."
(when (derived-mode-p 'erc-mode)
(bug-reference--maybe-setup-from-irc
(bug-reference-maybe-setup-from-irc
(erc-format-target)
(erc-network-name))))

View file

@ -2979,7 +2979,7 @@ Key bindings:
;; bug reporting
(defconst c-mode-help-address
"submit@debbugs.gnu.org"
"bug-gnu-emacs@gnu.org"
"Address(es) for CC Mode bug reports.")
(defun c-version ()

View file

@ -310,7 +310,7 @@ a block), `hs-hide-all', `hs-hide-block' and `hs-hide-level'.")
These commands include the toggling commands (when the result is to show
a block), `hs-show-all' and `hs-show-block'.")
(defvar hs-set-up-overlay #'ignore
(defcustom hs-set-up-overlay #'ignore
"Function called with one arg, OV, a newly initialized overlay.
Hideshow puts a unique overlay on each range of text to be hidden
in the buffer. Here is a simple example of how to use this variable:
@ -326,7 +326,9 @@ in the buffer. Here is a simple example of how to use this variable:
This example shows how to get information from the overlay as well
as how to set its `display' property. See `hs-make-overlay' and
info node `(elisp)Overlays'.")
info node `(elisp)Overlays'."
:type 'function
:version "28.1")
;;---------------------------------------------------------------------------
;; internal variables

View file

@ -201,7 +201,10 @@
((zerop (length tok))
(let ((forward-sexp-function nil))
(condition-case nil
(forward-sexp -1)
(let ((p (point)))
(forward-sexp -1)
(when (= p (point))
(setq res ":")))
(scan-error (setq res ":")))))
((member tok '("|" "OF" "..")) (setq res ":-case"))
((member tok '(":" "END" ";" "BEGIN" "VAR" "RECORD" "PROCEDURE"))

View file

@ -460,7 +460,8 @@ Non-nil means always go to the next Octave code line after sending."
(smie-rule-parent octave-block-offset)
;; For (invalid) code between switch and case.
;; (if (smie-rule-parent-p "switch") 4)
nil))))
nil))
('(:after . "=") octave-block-offset)))
(defun octave-indent-comment ()
"A function for `smie-indent-functions' (which see)."

View file

@ -297,11 +297,10 @@ to find the list of ignores for each directory."
;; expanded and not left for the shell command
;; to interpret.
(localdir (file-name-unquote (file-local-name (expand-file-name dir))))
(command (format "%s %s %s -type f %s -print0"
(command (format "%s -H %s %s -type f %s -print0"
find-program
(shell-quote-argument
;; In case DIR is a symlink.
(file-name-as-directory localdir))
(directory-file-name localdir)) ; Bug#48471
(xref--find-ignores-arguments ignores localdir)
(if files
(concat (shell-quote-argument "(")

View file

@ -4239,6 +4239,11 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'."
(point)))))
(num-quotes (python-syntax-count-quotes
(char-after str-start-pos) str-start-pos))
(str-line-start-pos
(save-excursion
(goto-char str-start-pos)
(beginning-of-line)
(point-marker)))
(str-end-pos
(save-excursion
(goto-char (+ str-start-pos num-quotes))
@ -4262,7 +4267,7 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'."
('symmetric (and multi-line-p (cons 1 1)))))
(fill-paragraph-function))
(save-restriction
(narrow-to-region str-start-pos str-end-pos)
(narrow-to-region str-line-start-pos str-end-pos)
(fill-paragraph justify))
(save-excursion
(when (and (python-info-docstring-p) python-fill-docstring-style)

View file

@ -2421,6 +2421,15 @@ If there is no Rubocop config file, Rubocop will be passed a flag
report-fn
args))
(defconst ruby--prettify-symbols-alist
'(("<=" . ?≤)
(">=" . ?≥)
("->" . ?→)
("=>" . ?⇒)
("::" . ?∷)
("lambda" . ))
"Value for `prettify-symbols-alist' in `ruby-mode'.")
;;;###autoload
(define-derived-mode ruby-mode prog-mode "Ruby"
"Major mode for editing Ruby code."
@ -2437,6 +2446,7 @@ If there is no Rubocop config file, Rubocop will be passed a flag
(setq-local font-lock-defaults '((ruby-font-lock-keywords) nil nil
((?_ . "w"))))
(setq-local prettify-symbols-alist ruby--prettify-symbols-alist)
(setq-local syntax-propertize-function #'ruby-syntax-propertize))

View file

@ -299,7 +299,9 @@ See `run-hooks'."
(concat
"(" (regexp-opt
'("begin" "call-with-current-continuation" "call/cc"
"call-with-input-file" "call-with-output-file" "case" "cond"
"call-with-input-file" "call-with-output-file"
"call-with-port"
"case" "cond"
"do" "else" "for-each" "if" "lambda" "λ"
"let" "let*" "let-syntax" "letrec" "letrec-syntax"
;; R6RS library subforms.
@ -542,6 +544,7 @@ indentation."
(put 'library 'scheme-indent-function 1) ; R6RS
(put 'call-with-input-file 'scheme-indent-function 1)
(put 'call-with-port 'scheme-indent-function 1)
(put 'with-input-from-file 'scheme-indent-function 1)
(put 'with-input-from-port 'scheme-indent-function 1)
(put 'call-with-output-file 'scheme-indent-function 1)

View file

@ -484,6 +484,7 @@ file. Since that is a plaintext file, this could be dangerous."
:prompt-regexp "^[[:alnum:]_]*=[#>] "
:prompt-length 5
:prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] "
:statement sql-postgres-statement-starters
:input-filter sql-remove-tabs-filter
:terminator ("\\(^\\s-*\\\\g\\|;\\)" . "\\g"))
@ -997,20 +998,6 @@ for the first time."
:version "24.1"
:type 'hook)
;; Customization for ANSI
(defcustom sql-ansi-statement-starters
(regexp-opt '("create" "alter" "drop"
"select" "insert" "update" "delete" "merge"
"grant" "revoke"))
"Regexp of keywords that start SQL commands.
All products share this list; products should define a regexp to
identify additional keywords in a variable defined by
the :statement feature."
:version "24.1"
:type 'regexp)
;; Customization for Oracle
(defcustom sql-oracle-program "sqlplus"
@ -1033,12 +1020,6 @@ You will find the file in your Orant\\bin directory."
:type 'sql-login-params
:version "24.1")
(defcustom sql-oracle-statement-starters
(regexp-opt '("declare" "begin" "with"))
"Additional statement starting keywords in Oracle."
:version "24.1"
:type 'string)
(defcustom sql-oracle-scan-on t
"Non-nil if placeholders should be replaced in Oracle SQLi.
@ -1502,6 +1483,26 @@ Based on `comint-mode-map'.")
table)
"Syntax table used in `sql-mode' and `sql-interactive-mode'.")
;; Motion Function Keywords
(defvar sql-ansi-statement-starters
(regexp-opt '("create" "alter" "drop"
"select" "insert" "update" "delete" "merge"
"grant" "revoke"))
"Regexp of keywords that start SQL commands.
All products share this list; products should define a regexp to
identify additional keywords in a variable defined by
the :statement feature.")
(defvar sql-oracle-statement-starters
(regexp-opt '("declare" "begin" "with"))
"Additional statement-starting keywords in Oracle.")
(defvar sql-postgres-statement-starters
(regexp-opt '("with"))
"Additional statement-starting keywords in Postgres.")
;; Font lock support
(defvar sql-mode-font-lock-object-name

View file

@ -1088,6 +1088,12 @@ local keymap that binds `RET' to `xref-quit-and-goto-xref'."
(define-obsolete-function-alias 'xref--show-defs-buffer-at-bottom
#'xref-show-definitions-buffer-at-bottom "28.1")
(defun xref--completing-read-group (cand transform)
"Return group title of candidate CAND or TRANSFORM the candidate."
(if transform
(substring cand (1+ (next-single-property-change 0 'xref--group cand)))
(get-text-property 0 'xref--group cand)))
(defun xref-show-definitions-completing-read (fetcher alist)
"Let the user choose the target definition with completion.
@ -1116,10 +1122,12 @@ between them by typing in the minibuffer with completion."
(format #("%d:" 0 2 (face xref-line-number))
line)
""))
(group-prefix
(substring group group-prefix-length))
(group-fmt
(propertize
(substring group group-prefix-length)
'face 'xref-file-header))
(propertize group-prefix
'face 'xref-file-header
'xref--group group-prefix))
(candidate
(format "%s:%s%s" group-fmt line-fmt summary)))
(push (cons candidate xref) xref-alist-with-line-info)))))
@ -1131,7 +1139,9 @@ between them by typing in the minibuffer with completion."
(lambda (string pred action)
(cond
((eq action 'metadata)
'(metadata . ((category . xref-location))))
`(metadata
. ((category . xref-location)
(group-function . ,#'xref--completing-read-group))))
(t
(complete-with-action action collection string pred)))))
(def (caar collection)))

View file

@ -673,7 +673,7 @@ the sequence."
(not (vectorp (aref (nth 2 composition) 0))))
(car composition)
to))
(ascii-or-latin-1 "[\000-\377]+")
(ascii-or-latin-1 "[\000-ÿ]+")
(run-width 0)
(endpos nil)
(font-spec-table (aref ps-mule-font-spec-tables
@ -699,6 +699,7 @@ the sequence."
(setq composition (find-composition (point) to nil t))
(setq stop (if composition (car composition) to)))))
;; We fold lines that contain ASCII or Latin-1.
((looking-at ascii-or-latin-1)
(let ((nchars (- (min (match-end 0) stop) (point))))
(setq width (* average-width nchars))
@ -710,6 +711,7 @@ the sequence."
(setq run-width (+ run-width width))
(forward-char nchars))))
;; Don't fold other lines. (But why?)
(t
(while (and (< (point) stop) (not endpos))
(setq width (char-width (following-char)))

View file

@ -1661,6 +1661,7 @@ in *Help* buffer. See also the command `describe-char'."
(define-key m "\t" 'completion-at-point)
(define-key m "\r" 'read--expression-try-read)
(define-key m "\n" 'read--expression-try-read)
(define-key m "\M-g\M-c" 'read-expression-switch-to-completions)
(set-keymap-parent m minibuffer-local-map)
m))
@ -5683,6 +5684,9 @@ PROMPT is a string to prompt with."
;; `current-kill' updates `kill-ring' with a possible interprogram-paste
(current-kill 0)
(let* ((history-add-new-input nil)
(history-pos (when yank-from-kill-ring-rotate
(- (length kill-ring)
(length kill-ring-yank-pointer))))
(ellipsis (if (char-displayable-p ?…) "" "..."))
;; Remove keymaps from text properties of copied string,
;; because typing RET in the minibuffer might call
@ -5730,7 +5734,16 @@ PROMPT is a string to prompt with."
'(metadata (display-sort-function . identity))
(complete-with-action action completions string pred)))
nil nil nil
'read-from-kill-ring-history))))
(if history-pos
(cons 'read-from-kill-ring-history (1+ history-pos))
'read-from-kill-ring-history)))))
(defcustom yank-from-kill-ring-rotate t
"Whether using `yank-from-kill-ring' should rotate `kill-ring-yank-pointer'.
If non-nil, the kill ring is rotated after selecting previously killed text."
:type 'boolean
:group 'killing
:version "28.1")
(defun yank-from-kill-ring (string &optional arg)
"Select a stretch of previously killed text and insert (\"paste\") it.
@ -5755,12 +5768,18 @@ beginning of the inserted text and mark at the end, like `yank' does.
When called from Lisp, insert STRING like `insert-for-yank' does."
(interactive (list (read-from-kill-ring "Yank from kill-ring: ")
current-prefix-arg))
(setq yank-window-start (window-start))
(push-mark)
(insert-for-yank string)
(when yank-from-kill-ring-rotate
(let ((pos (seq-position kill-ring string)))
(when pos
(setq kill-ring-yank-pointer (nthcdr pos kill-ring)))))
(if (consp arg)
;; Swap point and mark like in `yank'.
;; Swap point and mark like in `yank' and `yank-pop'.
(goto-char (prog1 (mark t)
(set-marker (mark-marker) (point) (current-buffer))))))
;; Some kill commands.
@ -8816,6 +8835,8 @@ makes it easier to edit it."
(defvar completion-list-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map special-mode-map)
(define-key map "g" nil) ;; There's nothing to revert from.
(define-key map [mouse-2] 'choose-completion)
(define-key map [follow-link] 'mouse-face)
(define-key map [down-mouse-2] nil)
@ -8825,8 +8846,10 @@ makes it easier to edit it."
(define-key map [right] 'next-completion)
(define-key map [?\t] 'next-completion)
(define-key map [backtab] 'previous-completion)
(define-key map "q" 'quit-window)
(define-key map "z" 'kill-current-buffer)
(define-key map "n" 'next-completion)
(define-key map "p" 'previous-completion)
(define-key map "\M-g\M-c" 'switch-to-minibuffer)
map)
"Local map for completion list buffers.")
@ -8913,18 +8936,17 @@ If EVENT, use EVENT's position to determine the starting position."
(choice
(save-excursion
(goto-char (posn-point (event-start event)))
(let (beg end)
(let (beg)
(cond
((and (not (eobp)) (get-text-property (point) 'mouse-face))
(setq end (point) beg (1+ (point))))
(setq beg (1+ (point))))
((and (not (bobp))
(get-text-property (1- (point)) 'mouse-face))
(setq end (1- (point)) beg (point)))
(setq beg (point)))
(t (error "No completion here")))
(setq beg (previous-single-property-change beg 'mouse-face))
(setq end (or (next-single-property-change end 'mouse-face)
(point-max)))
(buffer-substring-no-properties beg end)))))
(substring-no-properties
(get-text-property beg 'completion--string))))))
(unless (buffer-live-p buffer)
(error "Destination buffer is dead"))
@ -9116,6 +9138,18 @@ select the completion near point.\n\n"))))))
;; FIXME: Perhaps this should be done in `minibuffer-completion-help'.
(when (bobp)
(next-completion 1)))))
(defun read-expression-switch-to-completions ()
"Select the completion list window while reading an expression."
(interactive)
(completion-help-at-point)
(switch-to-completions))
(defun switch-to-minibuffer ()
"Select the minibuffer window."
(interactive)
(when (active-minibuffer-window)
(select-window (active-minibuffer-window))))
;;; Support keyboard commands to turn on various modifiers.

View file

@ -2319,6 +2319,9 @@ A fancy display is used on graphic displays, normal otherwise."
(set-buffer-major-mode (current-buffer))
(current-buffer))))
;; This avoids byte-compiler warning in the unexec build.
(declare-function pdumper-stats "pdumper.c" ())
(defun command-line-1 (args-left)
"A subroutine of `command-line'."
(display-startup-echo-area-message)

View file

@ -1757,6 +1757,12 @@ be a list of the form returned by `event-start' and `event-end'."
(make-obsolete-variable 'load-dangerous-libraries
"no longer used." "27.1")
(defvar inhibit--record-char nil
"Obsolete variable.
This was used internally by quail.el and keyboard.c in Emacs 27.
It does nothing in Emacs 28.")
(make-obsolete-variable 'inhibit--record-char nil "28.1")
;; We can't actually make `values' obsolete, because that will result
;; in warnings when using `values' in let-bindings.
;;(make-obsolete-variable 'values "no longer used" "28.1")

View file

@ -770,8 +770,7 @@ Can be nil to mean \"no timeout\".")
By not redisplaying right away for xterm queries, we can avoid
unsightly flashing during initialization. Give up and redisplay
anyway if we've been waiting a little while."
(let ((start-time (current-time))
(inhibit--record-char t))
(let ((start-time (current-time)))
(or (let ((inhibit-redisplay t))
(read-event nil nil xterm-query-redisplay-timeout))
(read-event nil nil
@ -839,8 +838,8 @@ We run the first FUNCTION whose STRING matches the input events."
basemap
(make-composed-keymap map (keymap-parent basemap))))
(defun terminal-init-xterm ()
"Terminal initialization function for xterm."
(defun xterm--init ()
"Initialize the terminal for xterm."
;; rxvt terminals sometimes set the TERM variable to "xterm", but
;; rxvt's keybindings are incompatible with xterm's. It is
;; better in that case to use rxvt's initialization function.
@ -882,9 +881,18 @@ We run the first FUNCTION whose STRING matches the input events."
;; support it just ignore the sequence.
(xterm--init-bracketed-paste-mode)
;; We likewise unconditionally enable support for focus tracking.
(xterm--init-focus-tracking)
(xterm--init-focus-tracking))
(run-hooks 'terminal-init-xterm-hook))
(defun terminal-init-xterm ()
"Terminal initialization function for xterm."
(unwind-protect
(progn
(xterm--init)
;; If the terminal initialization completed without errors, clear
;; the lossage to discard the responses of the terminal emulator
;; during initialization; otherwise they appear in the recent keys.
(clear-this-command-keys))
(run-hooks 'terminal-init-xterm-hook)))
(defun xterm--init-modify-other-keys ()
"Terminal initialization for xterm's modifyOtherKeys support."

View file

@ -4,25 +4,28 @@
;; Author: Jonas Bernoulli <jonas@bernoul.li>
;; Homepage: https://github.com/magit/transient
;; Package-Requires: ((emacs "25.1"))
;; Package-Version: 0.3.2
;; Keywords: bindings
;; This file is part of GNU Emacs.
;; Package-Requires: ((emacs "25.1"))
;; Package-Version: 0.3.4
;; SPDX-License-Identifier: GPL-3.0-or-later
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published
;; by the Free Software Foundation, either version 3 of the License,
;; or (at your option) any later version.
;;
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;; This file is part of GNU Emacs.
;;; Commentary:
;; Taking inspiration from prefix keys and prefix arguments, Transient

View file

@ -1767,13 +1767,26 @@ char-offset in TEXT."
(delete-region (point-min) keep))
;; Remove line-prefix characters, and unneeded lines (unified diffs).
;; Also skip lines like "\ No newline at end of file"
(let ((kill-chars (list (if destp ?- ?+) ?\\)))
(let ((kill-chars (list (if destp ?- ?+) ?\\))
curr-char last-char)
(goto-char (point-min))
(while (not (eobp))
(if (memq (char-after) kill-chars)
(delete-region (point) (progn (forward-line 1) (point)))
(setq curr-char (char-after))
(if (memq curr-char kill-chars)
(delete-region
;; Check for "\ No newline at end of file"
(if (and (eq curr-char ?\\)
(not (eq last-char (if destp ?- ?+)))
(save-excursion
(forward-line 1)
(or (eobp) (and (eq last-char ?-)
(eq (char-after) ?+)))))
(max (1- (point)) (point-min))
(point))
(progn (forward-line 1) (point)))
(delete-char num-pfx-chars)
(forward-line 1)))))
(forward-line 1))
(setq last-char curr-char))))
(let ((text (buffer-substring-no-properties (point-min) (point-max))))
(if char-offset (cons text (- (point) (point-min))) text))))))

View file

@ -1146,7 +1146,10 @@ are ignored."
(if (string-match "buffer" (symbol-name ediff-job-name))
ediff-coding-system-for-write
ediff-coding-system-for-read))
args)
(process-environment
;; Avoid localization of messages so we can parse the output.
(cons "LC_MESSAGES=C" process-environment))
args)
(setq args (append (split-string options)
(mapcar (lambda (file)
(when (stringp file)

View file

@ -8788,7 +8788,11 @@ font on WINDOW's frame."
(let* ((window (window-normalize-window window t))
(frame (window-frame window))
(default-font (face-font 'default frame)))
(if (and (display-multi-font-p (frame-parameter frame 'display))
;; Client frames can have the 'display' parameter set like for X
;; frames, even though they are TTY frames, so make sure we won't
;; be duped by that up front with 'framep'.
(if (and (not (eq (framep frame) t))
(display-multi-font-p (frame-parameter frame 'display))
(not (string-equal (frame-parameter frame 'font) default-font)))
(aref (font-info default-font frame) 3)
(frame-char-height frame))))
@ -10051,6 +10055,9 @@ is active. This function is run by `mouse-autoselect-window-timer'."
;; already selected.
(and (not (eq frame (selected-frame)))
(frame-parameter frame 'no-accept-focus))
;; Don't switch if window autoselection with mouse is active
;; and minibuffer window is selected.
(and mouse-autoselect-window (window-minibuffer-p))
;; Don't switch to minibuffer window unless it's active.
(and (window-minibuffer-p window)
(not (minibuffer-window-active-p window))))

View file

@ -90,8 +90,9 @@ ac_cv_func_readlinkat=yes
ac_cv_func_faccessat=yes
# Avoid compiling Gnulib's canonicalize-lgpl.c, which fails
ac_cv_func_canonicalize_file_name=yes
ac_cv_func_realpath="not-needed"
gl_cv_func_realpath_works="no-but-not-needed-so-yes"
# Implemented in w32.c
ac_cv_func_realpath=yes
gl_cv_func_realpath_works=yes
# Implemented in w32.c
ac_cv_func_fcntl=yes
gl_cv_func_fcntl_f_dupfd_cloexec=yes

View file

@ -345,7 +345,7 @@ DUMPING=@DUMPING@
CHECK_STRUCTS = @CHECK_STRUCTS@
HAVE_PDUMPER = @HAVE_PDUMPER@
## ARM Macs require that all code have a valid signature. Since pump
## ARM Macs require that all code have a valid signature. Since pdump
## invalidates the signature, we must re-sign to fix it.
DO_CODESIGN=$(patsubst aarch64-apple-darwin%,yes,@configuration@)

View file

@ -5681,10 +5681,10 @@ inserts one or more TAB characters, this variable will affect the
indentation step as well, even if `indent-tabs-mode' is non-nil. */);
DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil,
doc: /* Non-nil means display control chars with uparrow.
A value of nil means use backslash and octal digits.
This variable does not apply to characters whose display is specified
in the current display table (if there is one). */);
doc: /* Non-nil means display control chars with uparrow `^'.
A value of nil means use backslash `\\' and octal digits.
This variable does not apply to characters whose display is specified in
the current display table (if there is one; see `standard-display-table'). */);
DEFVAR_PER_BUFFER ("enable-multibyte-characters",
&BVAR (current_buffer, enable_multibyte_characters),

View file

@ -34,6 +34,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include "lisp.h"
#include "character.h"
#include "buffer.h"
#include "frame.h"
#include "dispextern.h"
#include "composite.h"
#include "disptab.h"
@ -338,11 +339,18 @@ lisp_string_width (Lisp_Object string, ptrdiff_t from, ptrdiff_t to,
contains only ascii and eight-bit-graphic, but that's
intentional. */
bool multibyte = SCHARS (string) < SBYTES (string);
unsigned char *str = SDATA (string);
ptrdiff_t i = from, i_byte = from ? string_char_to_byte (string, from) : 0;
ptrdiff_t from_byte = i_byte;
ptrdiff_t width = 0;
struct Lisp_Char_Table *dp = buffer_display_table ();
#ifdef HAVE_WINDOW_SYSTEM
struct frame *f =
(FRAMEP (selected_frame) && FRAME_LIVE_P (XFRAME (selected_frame)))
? XFRAME (selected_frame)
: NULL;
int font_width = -1;
Lisp_Object default_font, frame_font;
#endif
eassert (precision <= 0 || (nchars && nbytes));
@ -361,9 +369,51 @@ lisp_string_width (Lisp_Object string, ptrdiff_t from, ptrdiff_t to,
chars = end - i;
bytes = string_char_to_byte (string, end) - i_byte;
}
#ifdef HAVE_WINDOW_SYSTEM
else if (f && FRAME_WINDOW_P (f)
&& multibyte
&& find_automatic_composition (i, -1, &ignore, &end, &val, string)
&& end > i)
{
int j;
for (j = 0; j < LGSTRING_GLYPH_LEN (val); j++)
if (NILP (LGSTRING_GLYPH (val, j)))
break;
int pixelwidth = composition_gstring_width (val, 0, j, NULL);
/* The below is somewhat expensive, so compute it only once
for the entire loop, and only if needed. */
if (font_width < 0)
{
font_width = FRAME_COLUMN_WIDTH (f);
default_font = Fface_font (Qdefault, Qnil, Qnil);
frame_font = Fframe_parameter (Qnil, Qfont);
if (STRINGP (default_font) && STRINGP (frame_font)
&& (SCHARS (default_font) != SCHARS (frame_font)
|| SBYTES (default_font) != SBYTES (frame_font)
|| memcmp (SDATA (default_font), SDATA (frame_font),
SBYTES (default_font))))
{
Lisp_Object font_info = Ffont_info (default_font, Qnil);
if (VECTORP (font_info))
{
font_width = XFIXNUM (AREF (font_info, 11));
if (font_width <= 0)
font_width = XFIXNUM (AREF (font_info, 10));
}
}
}
thiswidth = (double) pixelwidth / font_width + 0.5;
chars = end - i;
bytes = string_char_to_byte (string, end) - i_byte;
}
#endif /* HAVE_WINDOW_SYSTEM */
else
{
int c;
unsigned char *str = SDATA (string);
if (multibyte)
{

View file

@ -4008,15 +4008,16 @@ DEFUN ("comp-el-to-eln-rel-filename", Fcomp_el_to_eln_rel_filename,
{
CHECK_STRING (filename);
/* Use `file-truename' or fall back to `expand-file-name' when the
first is not available (bug#44701).
`file-truename' is not available only for a short phases of the
bootstrap before file.el is loaded, given we do not symlink
inside the build directory this should work. */
filename = NILP (Ffboundp (intern_c_string ("file-truename")))
? Fexpand_file_name (filename, Qnil)
: CALL1I (file-truename, filename);
/* Resolve possible symlinks in FILENAME, so that path_hash below
always compares equal. (Bug#44701). */
filename = Fexpand_file_name (filename, Qnil);
char *file_normalized = realpath (SSDATA (ENCODE_FILE (filename)), NULL);
if (file_normalized)
{
filename = DECODE_FILE (make_unibyte_string (file_normalized,
strlen (file_normalized)));
xfree (file_normalized);
}
if (NILP (Ffile_exists_p (filename)))
xsignal1 (Qfile_missing, filename);
@ -4056,7 +4057,8 @@ DEFUN ("comp-el-to-eln-rel-filename", Fcomp_el_to_eln_rel_filename,
Lisp_Object sys_re =
concat2 (build_string ("\\`[[:ascii:]]+"),
Fregexp_quote (build_string ("/" PATH_REL_LOADSEARCH "/")));
Lisp_Object dump_load_search = build_string (PATH_DUMPLOADSEARCH "/");
Lisp_Object dump_load_search =
Fexpand_file_name (build_string (PATH_DUMPLOADSEARCH "/"), Qnil);
#ifdef WINDOWSNT
dump_load_search = Fw32_long_file_name (dump_load_search);
#endif

View file

@ -953,8 +953,12 @@ char_composable_p (int c)
Lisp_Object val;
return (c >= ' '
&& (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER
|| (val = CHAR_TABLE_REF (Vunicode_category_table, c),
(FIXNUMP (val) && (XFIXNUM (val) <= UNICODE_CATEGORY_Zs)))));
/* unicode-category-table may not be available during
dumping. */
|| (CHAR_TABLE_P (Vunicode_category_table)
&& (val = CHAR_TABLE_REF (Vunicode_category_table, c),
(FIXNUMP (val)
&& (XFIXNUM (val) <= UNICODE_CATEGORY_Zs))))));
}
/* Update cmp_it->stop_pos to the next position after CHARPOS (and
@ -1475,7 +1479,7 @@ struct position_record
representing the composition, and return true. Otherwise, *GSTRING to
Qnil, and return false. */
static bool
bool
find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit,
ptrdiff_t *start, ptrdiff_t *end,
Lisp_Object *gstring, Lisp_Object string)

View file

@ -320,6 +320,10 @@ extern bool composition_gstring_p (Lisp_Object);
extern int composition_gstring_width (Lisp_Object, ptrdiff_t, ptrdiff_t,
struct font_metrics *);
extern bool find_automatic_composition (ptrdiff_t, ptrdiff_t, ptrdiff_t *,
ptrdiff_t *, Lisp_Object *,
Lisp_Object);
extern void composition_compute_stop_pos (struct composition_it *,
ptrdiff_t, ptrdiff_t, ptrdiff_t,
Lisp_Object);

View file

@ -99,10 +99,28 @@ typedef bool bool_bf;
# define ADDRESS_SANITIZER false
#endif
#ifdef emacs
/* We include stdlib.h here, because Gnulib's stdlib.h might redirect
'free' to its replacement, and we want to avoid that in unexec
builds. Inclduing it here will render its inclusion after config.h
a no-op. */
# if (defined DARWIN_OS && defined HAVE_UNEXEC) || defined HYBRID_MALLOC
# include <stdlib.h>
# endif
#endif
#if defined DARWIN_OS && defined emacs && defined HAVE_UNEXEC
# undef malloc
# define malloc unexec_malloc
# undef realloc
# define realloc unexec_realloc
# undef free
# define free unexec_free
extern void *unexec_malloc (size_t);
extern void *unexec_realloc (void *, size_t);
extern void unexec_free (void *);
#endif
/* If HYBRID_MALLOC is defined (e.g., on Cygwin), emacs will use
@ -111,12 +129,23 @@ typedef bool bool_bf;
accomplish this. */
#ifdef HYBRID_MALLOC
#ifdef emacs
#undef malloc
#define malloc hybrid_malloc
#undef realloc
#define realloc hybrid_realloc
#undef aligned_alloc
#define aligned_alloc hybrid_aligned_alloc
#undef calloc
#define calloc hybrid_calloc
#undef free
#define free hybrid_free
#endif
extern void *hybrid_malloc (size_t);
extern void *hybrid_calloc (size_t, size_t);
extern void hybrid_free (void *);
extern void *hybrid_aligned_alloc (size_t, size_t);
extern void *hybrid_realloc (void *, size_t);
#endif /* emacs */
#endif /* HYBRID_MALLOC */
/* We have to go this route, rather than the old hpux9 approach of

View file

@ -1452,8 +1452,8 @@ DEFUN ("insert-char", Finsert_char, Sinsert_char, 1, 3,
(prefix-numeric-value current-prefix-arg)\
t))",
doc: /* Insert COUNT copies of CHARACTER.
Interactively, prompt for CHARACTER. You can specify CHARACTER in one
of these ways:
Interactively, prompt for CHARACTER using `read-char-by-name'.
You can specify CHARACTER in one of these ways:
- As its Unicode character name, e.g. \"LATIN SMALL LETTER A\".
Completion is available; if you type a substring of the name

View file

@ -2987,12 +2987,16 @@ file_directory_p (Lisp_Object file)
DEFUN ("file-accessible-directory-p", Ffile_accessible_directory_p,
Sfile_accessible_directory_p, 1, 1, 0,
doc: /* Return t if FILENAME names a directory you can open.
For the value to be t, FILENAME must specify the name of a directory
as a file, and the directory must allow you to open files in it. In
order to use a directory as a buffer's current directory, this
predicate must return true. A directory name spec may be given
instead; then the value is t if the directory so specified exists and
really is a readable and searchable directory. */)
This means that FILENAME must specify the name of a directory, and the
directory must allow you to open files in it. If this isn't the case,
return nil.
FILENAME can either be a directory name (eg. \"/tmp/foo/\") or the
file name of a file which is a directory (eg. \"/tmp/foo\", without
the final slash).
In order to use a directory as a buffer's current directory, this
predicate must return true. */)
(Lisp_Object filename)
{
Lisp_Object absname;

View file

@ -5892,12 +5892,14 @@ in OBJECT. */)
DEFUN ("line-number-at-pos", Fline_number_at_pos,
Sline_number_at_pos, 0, 2, 0,
doc: /* Return the line number at POSITION.
If POSITION is nil, use the current buffer location.
doc: /* Return the line number at POSITION in the current buffer.
If POSITION is nil or omitted, it defaults to point's position in the
current buffer.
If the buffer is narrowed, the position returned is the position in the
visible part of the buffer. If ABSOLUTE is non-nil, count the lines
from the absolute start of the buffer. */)
If the buffer is narrowed, the return value by default counts the lines
from the beginning of the accessible portion of the buffer. But if the
second optional argument ABSOLUTE is non-nil, the value counts the lines
from the absolute start of the buffer, disregarding the narrowing. */)
(register Lisp_Object position, Lisp_Object absolute)
{
ptrdiff_t pos, start = BEGV_BYTE;
@ -5915,9 +5917,9 @@ from the absolute start of the buffer. */)
if (!NILP (absolute))
start = BEG_BYTE;
/* Check that POSITION is n the visible range of the buffer. */
/* Check that POSITION is in the accessible range of the buffer. */
if (pos < BEGV || pos > ZV)
args_out_of_range (make_int (start), make_int (ZV));
args_out_of_range_3 (make_int (pos), make_int (BEGV), make_int (ZV));
return make_int (count_lines (start, CHAR_TO_BYTE (pos)) + 1);
}

View file

@ -1797,14 +1797,15 @@ gui_init_fringe (struct redisplay_interface *rif)
for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++)
{
struct fringe_bitmap *fb = &standard_bitmaps[bt];
rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width);
if (!fringe_bitmaps[bt])
rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width);
}
/* Set up user-defined fringe bitmaps that might have been defined
before the frame of this kind was initialized. This can happen
if Emacs is started as a daemon and the init files define fringe
bitmaps. */
for ( ; bt < max_used_fringe_bitmap; bt++)
for (bt = NO_FRINGE_BITMAP + 1; bt < max_used_fringe_bitmap; bt++)
{
struct fringe_bitmap *fb = fringe_bitmaps[bt];
if (fb)

View file

@ -1690,16 +1690,6 @@ valloc (size_t size)
#undef free
#ifdef HYBRID_MALLOC
/* Declare system malloc and friends. */
extern void *malloc (size_t size);
extern void *realloc (void *ptr, size_t size);
extern void *calloc (size_t nmemb, size_t size);
extern void free (void *ptr);
#ifdef HAVE_ALIGNED_ALLOC
extern void *aligned_alloc (size_t alignment, size_t size);
#elif defined HAVE_POSIX_MEMALIGN
extern int posix_memalign (void **memptr, size_t alignment, size_t size);
#endif
/* Assuming PTR was allocated via the hybrid malloc, return true if
PTR was allocated via gmalloc, not the system malloc. Also, return
@ -1736,8 +1726,8 @@ hybrid_calloc (size_t nmemb, size_t size)
return gcalloc (nmemb, size);
}
void
hybrid_free (void *ptr)
static void
hybrid_free_1 (void *ptr)
{
if (allocated_via_gmalloc (ptr))
gfree (ptr);
@ -1745,6 +1735,24 @@ hybrid_free (void *ptr)
free (ptr);
}
void
hybrid_free (void *ptr)
{
/* Stolen from Gnulib, to make sure we preserve errno. */
#if defined __GNUC__ && !defined __clang__
int err[2];
err[0] = errno;
err[1] = errno;
errno = 0;
hybrid_free_1 (ptr);
errno = err[errno == 0];
#else
int err = errno;
hybrid_free_1 (ptr);
errno = err;
#endif
}
#if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN
void *
hybrid_aligned_alloc (size_t alignment, size_t size)

View file

@ -3233,10 +3233,6 @@ help_char_p (Lisp_Object c)
static void
record_char (Lisp_Object c)
{
/* quail.el binds this to avoid recording keys twice. */
if (inhibit_record_char)
return;
int recorded = 0;
if (CONSP (c) && (EQ (XCAR (c), Qhelp_echo) || EQ (XCAR (c), Qmouse_movement)))
@ -12351,13 +12347,6 @@ If nil, Emacs crashes immediately in response to fatal signals. */);
Vwhile_no_input_ignore_events,
doc: /* Ignored events from while-no-input. */);
DEFVAR_BOOL ("inhibit--record-char",
inhibit_record_char,
doc: /* If non-nil, don't record input events.
This inhibits recording input events for the purposes of keyboard
macros, dribble file, and `recent-keys'.
Internal use only. */);
pdumper_do_now_and_after_load (syms_of_keyboard_for_pdumper);
}
@ -12391,8 +12380,6 @@ syms_of_keyboard_for_pdumper (void)
/* Create the initial keyboard. Qt means 'unset'. */
eassert (initial_kboard == NULL);
initial_kboard = allocate_kboard (Qt);
inhibit_record_char = false;
}
void

View file

@ -3938,8 +3938,7 @@ string_to_number (char const *string, int base, ptrdiff_t *plen)
bool signedp = negative | positive;
cp += signedp;
enum { INTOVERFLOW = 1, LEAD_INT = 2, DOT_CHAR = 4, TRAIL_INT = 8,
E_EXP = 16 };
enum { INTOVERFLOW = 1, LEAD_INT = 2, TRAIL_INT = 4, E_EXP = 16 };
int state = 0;
int leading_digit = digit_to_number (*cp, base);
uintmax_t n = leading_digit;
@ -3959,7 +3958,6 @@ string_to_number (char const *string, int base, ptrdiff_t *plen)
char const *after_digits = cp;
if (*cp == '.')
{
state |= DOT_CHAR;
cp++;
}
@ -4008,8 +4006,10 @@ string_to_number (char const *string, int base, ptrdiff_t *plen)
cp = ecp;
}
float_syntax = ((state & (DOT_CHAR|TRAIL_INT)) == (DOT_CHAR|TRAIL_INT)
|| (state & ~INTOVERFLOW) == (LEAD_INT|E_EXP));
/* A float has digits after the dot or an exponent.
This excludes numbers like "1." which are lexed as integers. */
float_syntax = ((state & TRAIL_INT)
|| ((state & LEAD_INT) && (state & E_EXP)));
}
if (plen)

View file

@ -5134,6 +5134,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
Lisp_Object wait_for_cell,
struct Lisp_Process *wait_proc, int just_wait_proc)
{
static int last_read_channel = -1;
int channel, nfds;
fd_set Available;
fd_set Writeok;
@ -5188,6 +5189,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
while (1)
{
bool process_skipped = false;
bool wrapped;
int channel_start;
/* If calling from keyboard input, do not quit
since we want to return C-g as an input character.
@ -5726,8 +5729,21 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
d->func (channel, d->data);
}
for (channel = 0; channel <= max_desc; channel++)
/* Do round robin if `process-pritoritize-lower-fds' is nil. */
channel_start
= process_prioritize_lower_fds ? 0 : last_read_channel + 1;
for (channel = channel_start, wrapped = false;
!wrapped || (channel < channel_start && channel <= max_desc);
channel++)
{
if (channel > max_desc)
{
wrapped = true;
channel = -1;
continue;
}
if (FD_ISSET (channel, &Available)
&& ((fd_callback_info[channel].flags & (KEYBOARD_FD | PROCESS_FD))
== PROCESS_FD))
@ -5765,6 +5781,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
don't try to read from any other processes
before doing the select again. */
FD_ZERO (&Available);
last_read_channel = channel;
if (do_display)
redisplay_preserve_echo_area (12);
@ -8481,6 +8498,16 @@ non-nil value means that the delay is not reset on write.
The variable takes effect when `start-process' is called. */);
Vprocess_adaptive_read_buffering = Qt;
DEFVAR_BOOL ("process-prioritize-lower-fds", process_prioritize_lower_fds,
doc: /* Whether to start checking for subprocess output from first file descriptor.
Emacs loops through file descriptors to check for output from subprocesses.
If this variable is nil, the default, then after accepting output from a
subprocess, Emacs will continue checking the rest of descriptors, starting
from the one following the descriptor it just read. If this variable is
non-nil, Emacs will always restart the loop from the first file descriptor,
thus favoring processes with lower descriptors. */);
process_prioritize_lower_fds = 0;
DEFVAR_LISP ("interrupt-process-functions", Vinterrupt_process_functions,
doc: /* List of functions to be called for `interrupt-process'.
The arguments of the functions are the same as for `interrupt-process'.

View file

@ -3626,7 +3626,7 @@ system_process_attributes (Lisp_Object pid)
ttyname = proc.ki_tdev == NODEV ? NULL : devname (proc.ki_tdev, S_IFCHR);
unblock_input ();
if (ttyname)
attrs = Fcons (Fcons (Qtty, build_string (ttyname)), attrs);
attrs = Fcons (Fcons (Qttname, build_string (ttyname)), attrs);
attrs = Fcons (Fcons (Qtpgid, INT_TO_INTEGER (proc.ki_tpgid)), attrs);
attrs = Fcons (Fcons (Qminflt, INT_TO_INTEGER (proc.ki_rusage.ru_minflt)),
@ -3898,20 +3898,19 @@ system_process_attributes (Lisp_Object pid)
Lisp_Object
system_process_attributes (Lisp_Object pid)
{
int proc_id;
int proc_id, i;
struct passwd *pw;
struct group *gr;
char *ttyname;
struct timeval starttime;
struct timespec t, now;
struct rusage *rusage;
dev_t tdev;
uid_t uid;
gid_t gid;
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID};
struct kinfo_proc proc;
size_t proclen = sizeof proc;
size_t len = sizeof proc;
Lisp_Object attrs = Qnil;
Lisp_Object decoded_comm;
@ -3920,7 +3919,7 @@ system_process_attributes (Lisp_Object pid)
CONS_TO_INTEGER (pid, int, proc_id);
mib[3] = proc_id;
if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0 || proclen == 0)
if (sysctl (mib, 4, &proc, &len, NULL, 0) != 0 || len == 0)
return attrs;
uid = proc.kp_eproc.e_ucred.cr_uid;
@ -3957,8 +3956,8 @@ system_process_attributes (Lisp_Object pid)
decoded_comm = (code_convert_string_norecord
(build_unibyte_string (comm),
Vlocale_coding_system, 0));
attrs = Fcons (Fcons (Qcomm, decoded_comm), attrs);
{
char state[2] = {'\0', '\0'};
switch (proc.kp_proc.p_stat)
@ -3994,27 +3993,24 @@ system_process_attributes (Lisp_Object pid)
ttyname = tdev == NODEV ? NULL : devname (tdev, S_IFCHR);
unblock_input ();
if (ttyname)
attrs = Fcons (Fcons (Qtty, build_string (ttyname)), attrs);
attrs = Fcons (Fcons (Qttname, build_string (ttyname)), attrs);
attrs = Fcons (Fcons (Qtpgid, INT_TO_INTEGER (proc.kp_eproc.e_tpgid)),
attrs);
rusage = proc.kp_proc.p_ru;
if (rusage)
rusage_info_current ri;
if (proc_pid_rusage(proc_id, RUSAGE_INFO_CURRENT, (rusage_info_t *) &ri) == 0)
{
attrs = Fcons (Fcons (Qminflt, INT_TO_INTEGER (rusage->ru_minflt)),
attrs);
attrs = Fcons (Fcons (Qmajflt, INT_TO_INTEGER (rusage->ru_majflt)),
attrs);
struct timespec utime = make_timespec (ri.ri_user_time / TIMESPEC_HZ,
ri.ri_user_time % TIMESPEC_HZ);
struct timespec stime = make_timespec (ri.ri_system_time / TIMESPEC_HZ,
ri.ri_system_time % TIMESPEC_HZ);
attrs = Fcons (Fcons (Qutime, make_lisp_time (utime)), attrs);
attrs = Fcons (Fcons (Qstime, make_lisp_time (stime)), attrs);
attrs = Fcons (Fcons (Qtime, make_lisp_time (timespec_add (utime, stime))), attrs);
attrs = Fcons (Fcons (Qutime, make_lisp_timeval (rusage->ru_utime)),
attrs);
attrs = Fcons (Fcons (Qstime, make_lisp_timeval (rusage->ru_stime)),
attrs);
t = timespec_add (timeval_to_timespec (rusage->ru_utime),
timeval_to_timespec (rusage->ru_stime));
attrs = Fcons (Fcons (Qtime, make_lisp_time (t)), attrs);
}
attrs = Fcons (Fcons (Qmajflt, INT_TO_INTEGER (ri.ri_pageins)), attrs);
}
starttime = proc.kp_proc.p_starttime;
attrs = Fcons (Fcons (Qnice, make_fixnum (proc.kp_proc.p_nice)), attrs);
@ -4024,6 +4020,50 @@ system_process_attributes (Lisp_Object pid)
t = timespec_sub (now, timeval_to_timespec (starttime));
attrs = Fcons (Fcons (Qetime, make_lisp_time (t)), attrs);
struct proc_taskinfo taskinfo;
if (proc_pidinfo (proc_id, PROC_PIDTASKINFO, 0, &taskinfo, sizeof (taskinfo)) > 0)
{
attrs = Fcons (Fcons (Qvsize, make_fixnum (taskinfo.pti_virtual_size / 1024)), attrs);
attrs = Fcons (Fcons (Qrss, make_fixnum (taskinfo.pti_resident_size / 1024)), attrs);
attrs = Fcons (Fcons (Qthcount, make_fixnum (taskinfo.pti_threadnum)), attrs);
}
#ifdef KERN_PROCARGS2
char args[ARG_MAX];
mib[1] = KERN_PROCARGS2;
mib[2] = proc_id;
len = sizeof args;
if (sysctl (mib, 3, &args, &len, NULL, 0) == 0 && len != 0)
{
char *start, *end;
int argc = *(int*)args; /* argc is the first int */
start = args + sizeof (int);
start += strlen (start) + 1; /* skip executable name and any '\0's */
while ((start - args < len) && ! *start) start++;
/* skip argv to find real end */
for (i = 0, end = start; i < argc && (end - args) < len; i++)
{
end += strlen (end) + 1;
}
len = end - start;
for (int i = 0; i < len; i++)
{
if (! start[i] && i < len - 1)
start[i] = ' ';
}
AUTO_STRING (comm, start);
decoded_comm = code_convert_string_norecord (comm,
Vlocale_coding_system, 0);
attrs = Fcons (Fcons (Qargs, decoded_comm), attrs);
}
#endif /* KERN_PROCARGS2 */
return attrs;
}

View file

@ -10587,6 +10587,45 @@ w32_my_exename (void)
return exename;
}
/* Emulate Posix 'realpath'. This is needed in
comp-el-to-eln-rel-filename. */
char *
realpath (const char *file_name, char *resolved_name)
{
char *tgt = chase_symlinks (file_name);
char target[MAX_UTF8_PATH];
if (tgt == file_name)
{
/* If FILE_NAME is not a symlink, chase_symlinks returns its
argument, possibly not in canonical absolute form. Make sure
we return a canonical file name. */
if (w32_unicode_filenames)
{
wchar_t file_w[MAX_PATH], tgt_w[MAX_PATH];
filename_to_utf16 (file_name, file_w);
if (GetFullPathNameW (file_w, MAX_PATH, tgt_w, NULL) == 0)
return NULL;
filename_from_utf16 (tgt_w, target);
}
else
{
char file_a[MAX_PATH], tgt_a[MAX_PATH];
filename_to_ansi (file_name, file_a);
if (GetFullPathNameA (file_a, MAX_PATH, tgt_a, NULL) == 0)
return NULL;
filename_from_ansi (tgt_a, target);
}
tgt = target;
}
if (resolved_name)
return strcpy (resolved_name, tgt);
return xstrdup (tgt);
}
/*
globals_of_w32 is used to initialize those global variables that
must always be initialized on startup even when the global variable

View file

@ -187,6 +187,7 @@ extern DWORD multiByteToWideCharFlags;
extern char *w32_my_exename (void);
extern const char *w32_relocate (const char *);
extern char *realpath (const char *, char *);
extern void init_environment (char **);
extern void check_windows_init_file (void);

View file

@ -7,6 +7,9 @@ Emacs's functionality. Please help add tests!
See the file file-organization.org for the details of the directory
structure and file-naming conventions.
For tests in the manual/ subdirectory, look there for separate README
files, or look for instructions in the test files themselves.
Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info
"(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/
for more information on writing and running tests.

View file

@ -70,3 +70,18 @@ RUN ./autogen.sh autoconf
RUN ./configure --with-ns
RUN make bootstrap
RUN make -j4
FROM emacs-base as emacs-native-comp-speed0
RUN apt-get update && \
apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 libgccjit-6-dev \
&& rm -rf /var/lib/apt/lists/*
ARG make_bootstrap_params=""
COPY . /checkout
WORKDIR /checkout
RUN ./autogen.sh autoconf
RUN ./configure --with-nativecomp
RUN make bootstrap -j2 NATIVE_FULL_AOT=1 BYTE_COMPILE_EXTRA_FLAGS='--eval "(setq comp-speed 0)"'
RUN make -j4

View file

@ -181,6 +181,21 @@ default:
- test/lisp/autorevert-tests.el
- test/lisp/filenotify-tests.el
.native-comp-template:
rules:
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
changes:
- "**/Makefile.in"
- .gitlab-ci.yml
- lisp/emacs-lisp/comp.el
- lisp/emacs-lisp/comp-cstr.el
- src/comp.{h,m}
- test/infra/*
- test/src/comp-resources/*.el
- test/src/comp-tests.el
timeout: 8 hours
stages:
- prep-images
- build-images
@ -188,6 +203,8 @@ stages:
- normal
- platform-images
- platforms
- native-comp-images
- native-comp
- slow
prep-image-base:
@ -199,6 +216,7 @@ prep-image-base:
build-image-inotify:
stage: build-images
extends: [.job-template, .build-template]
needs: [prep-image-base]
variables:
target: emacs-inotify
@ -209,18 +227,6 @@ test-fast-inotify:
target: emacs-inotify
make_params: "-C test check"
build-image-filenotify-gio:
stage: platform-images
extends: [.job-template, .build-template, .filenotify-gio-template]
variables:
target: emacs-filenotify-gio
build-image-gnustep:
stage: platform-images
extends: [.job-template, .build-template, .gnustep-template]
variables:
target: emacs-gnustep
test-lisp-inotify:
stage: normal
extends: [.job-template, .test-template]
@ -235,6 +241,20 @@ test-lisp-net-inotify:
target: emacs-inotify
make_params: "-C test check-lisp-net"
build-image-filenotify-gio:
stage: platform-images
extends: [.job-template, .build-template, .filenotify-gio-template]
needs: [prep-image-base]
variables:
target: emacs-filenotify-gio
build-image-gnustep:
stage: platform-images
extends: [.job-template, .build-template, .gnustep-template]
needs: [prep-image-base]
variables:
target: emacs-gnustep
test-filenotify-gio:
# This tests file monitor libraries gfilemonitor and gio.
stage: platforms
@ -244,38 +264,6 @@ test-filenotify-gio:
target: emacs-filenotify-gio
make_params: "-k -C test autorevert-tests.log filenotify-tests.log"
build-native-bootstrap-speed0:
# Test a full native bootstrap
# Run for now only speed 0 to limit memory usage and compilation time.
stage: slow
# Uncomment the following to run it only when scheduled.
# only:
# - schedules
script:
- DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 libgccjit-6-dev
- ./autogen.sh autoconf
- ./configure --with-nativecomp
- make bootstrap NATIVE_FULL_AOT=1 BYTE_COMPILE_EXTRA_FLAGS='--eval "(setq comp-speed 0)"' -j2
timeout: 8 hours
build-native-bootstrap-speed1:
stage: slow
script:
- DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 libgccjit-6-dev
- ./autogen.sh autoconf
- ./configure --with-nativecomp
- make bootstrap BYTE_COMPILE_EXTRA_FLAGS='--eval "(setq comp-speed 1)"'
timeout: 8 hours
build-native-bootstrap-speed2:
stage: slow
script:
- DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 libgccjit-6-dev
- ./autogen.sh autoconf
- ./configure --with-nativecomp
- make bootstrap
timeout: 8 hours
test-gnustep:
# This tests the GNUstep build process
stage: platforms
@ -285,6 +273,45 @@ test-gnustep:
target: emacs-gnustep
make_params: install
build-native-bootstrap-speed0:
stage: native-comp-images
extends: [.job-template, .build-template, .native-comp-template]
needs: [prep-image-base]
variables:
target: emacs-native-comp-speed0
# build-native-bootstrap-speed0:
# # Test a full native bootstrap
# # Run for now only speed 0 to limit memory usage and compilation time.
# stage: native-comp-images
# # Uncomment the following to run it only when scheduled.
# # only:
# # - schedules
# script:
# - DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 libgccjit-6-dev
# - ./autogen.sh autoconf
# - ./configure --with-nativecomp
# - make bootstrap NATIVE_FULL_AOT=1 BYTE_COMPILE_EXTRA_FLAGS='--eval "(setq comp-speed 0)"' -j2
# timeout: 8 hours
# build-native-bootstrap-speed1:
# stage: native-comp-images
# script:
# - DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 libgccjit-6-dev
# - ./autogen.sh autoconf
# - ./configure --with-nativecomp
# - make bootstrap BYTE_COMPILE_EXTRA_FLAGS='--eval "(setq comp-speed 1)"'
# timeout: 8 hours
# build-native-bootstrap-speed2:
# stage: native-comp-images
# script:
# - DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 libgccjit-6-dev
# - ./autogen.sh autoconf
# - ./configure --with-nativecomp
# - make bootstrap
# timeout: 8 hours
test-all-inotify:
# This tests also file monitor libraries inotify and inotifywatch.
stage: slow

View file

@ -0,0 +1,9 @@
;;; -*- lexical-binding: t -*-
(require 'bc-test-beta)
(defun bc-test-alpha-f (x)
(let ((y nil))
(list y (bc-test-beta-f x))))
(provide 'bc-test-alpha)

View file

@ -0,0 +1,6 @@
;;; -*- lexical-binding: t -*-
(defsubst bc-test-beta-f (y)
y)
(provide 'bc-test-beta)

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