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

This commit is contained in:
Andrea Corallo 2020-10-23 20:08:58 +01:00
commit 99e7cc0da6
319 changed files with 5156 additions and 3702 deletions

View file

@ -213,6 +213,7 @@ Paul Eggert
src/* (except for *.m, *w32*, bitmaps, files others want to maintain) src/* (except for *.m, *w32*, bitmaps, files others want to maintain)
Michael Albinus Michael Albinus
.gitlab-ci.yml
src/inotify.c src/inotify.c
lisp/autorevert.el lisp/autorevert.el
lisp/eshell/em-tramp.el lisp/eshell/em-tramp.el

View file

@ -222,6 +222,12 @@ lower, equal or higher version than the one specified.
Filter package list by non-empty mark (@code{package-menu-filter-marked}). Filter package list by non-empty mark (@code{package-menu-filter-marked}).
This shows only the packages that have been marked to be installed or deleted. This shows only the packages that have been marked to be installed or deleted.
@item / u
@kindex / u @r{(Package Menu)}
@findex package-menu-filter-upgradable
Filter package list to show only packages for which there are
available upgrades (@code{package-menu-filter-upgradable}).
@item / / @item / /
@kindex / / @r{(Package Menu)} @kindex / / @r{(Package Menu)}
@findex package-menu-filter-clear @findex package-menu-filter-clear

View file

@ -1345,10 +1345,11 @@ button. @xref{Repeat Events}.
To access the contents of a mouse position list in the To access the contents of a mouse position list in the
@var{position} slot of a click event, you should typically use the @var{position} slot of a click event, you should typically use the
functions documented in @ref{Accessing Mouse}. The explicit format of functions documented in @ref{Accessing Mouse}.
the list depends on where the click occurred. For clicks in the text
area, mode line, header line, tab line, or in the fringe or marginal The explicit format of the list depends on where the click occurred.
areas, the mouse position list has the form For clicks in the text area, mode line, header line, tab line, or in
the fringe or marginal areas, the mouse position list has the form
@example @example
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp} (@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
@ -1478,6 +1479,45 @@ handle), @code{up} (the up arrow at one end of the scroll bar), or
@c The 'top', 'bottom', and 'end-scroll' codes don't seem to be used. @c The 'top', 'bottom', and 'end-scroll' codes don't seem to be used.
@end table @end table
For clicks on the frame's internal border (@pxref{Frame Layout}),
@var{position} has this form:
@example
(@var{frame} @var{part} (@var{X} . @var{Y}) @var{timestamp})
@end example
@table @asis
@item @var{frame}
The frame whose internal border was clicked on.
@item @var{part}
The part of the internal border which was clicked on. This can be one
of the following:
@table @code
@item nil
The frame does not have an internal border. This usually happens on
text-mode frames. This can also happen on GUI frames with internal
border if the frame doesn't have its @code{drag-internal-border}
parameter (@pxref{Mouse Dragging Parameters}) set to a non-@code{nil}
value.
@item left-edge
@itemx top-edge
@itemx right-edge
@itemx bottom-edge
The click was on the corresponding border at an offset of at least one
canonical character from the border's nearest corner.
@item top-left-corner
@itemx top-right-corner
@itemx bottom-right-corner
@itemx bottom-left-corner
The click was on the corresponding corner of the internal border.
@end table
@end table
@node Drag Events @node Drag Events
@subsection Drag Events @subsection Drag Events

View file

@ -164,7 +164,7 @@ echo area, but if @var{arg} is non-@code{nil}, it inserts the result
in the current buffer after the form it has compiled. in the current buffer after the form it has compiled.
@end deffn @end deffn
@deffn Command byte-compile-file filename &optional load @deffn Command byte-compile-file filename
This function compiles a file of Lisp code named @var{filename} into a This function compiles a file of Lisp code named @var{filename} into a
file of byte-code. The output file's name is made by changing the file of byte-code. The output file's name is made by changing the
@samp{.el} suffix into @samp{.elc}; if @var{filename} does not end in @samp{.el} suffix into @samp{.elc}; if @var{filename} does not end in
@ -180,9 +180,6 @@ input file is read.
This command returns @code{t} if there were no errors and @code{nil} This command returns @code{t} if there were no errors and @code{nil}
otherwise. When called interactively, it prompts for the file name. otherwise. When called interactively, it prompts for the file name.
If @var{load} is non-@code{nil}, this command loads the compiled file
after compiling it. Interactively, @var{load} is the prefix argument.
@example @example
@group @group
$ ls -l push* $ ls -l push*

View file

@ -2926,11 +2926,11 @@ absolute file names. Otherwise, it returns the names relative to
the specified directory. the specified directory.
If @var{match-regexp} is non-@code{nil}, this function returns only If @var{match-regexp} is non-@code{nil}, this function returns only
those file names that contain a match for that regular expression---the those file names whose non-directory part contain a match for that
other file names are excluded from the list. On case-insensitive regular expression---the other file names are excluded from the list.
filesystems, the regular expression matching is case-insensitive. On case-insensitive filesystems, the regular expression matching is
case-insensitive.
@c Emacs 19 feature
If @var{nosort} is non-@code{nil}, @code{directory-files} does not sort If @var{nosort} is non-@code{nil}, @code{directory-files} does not sort
the list, so you get the file names in no particular order. Use this if the list, so you get the file names in no particular order. Use this if
you want the utmost possible speed and don't care what order the files you want the utmost possible speed and don't care what order the files
@ -3007,6 +3007,19 @@ corresponding argument to @code{file-attributes} (@pxref{Definition
of file-attributes}). of file-attributes}).
@end defun @end defun
@defvr Constant directory-files-no-dot-files-regexp
This regular expression matches any file name except @samp{.} and
@samp{..}. More precisely, it matches parts of any nonempty string
except those two. It is useful as the @var{match-regexp} argument to
@code{directory-files} and @code{directory-files-and-attributes}:
@example
(directory-files "/foo" nil directory-files-no-dot-files-regexp)
@end example
returns @code{nil}, if directory @samp{/foo} is empty.
@end defvr
@defun file-expand-wildcards pattern &optional full @defun file-expand-wildcards pattern &optional full
This function expands the wildcard pattern @var{pattern}, returning This function expands the wildcard pattern @var{pattern}, returning
a list of file names that match it. a list of file names that match it.

View file

@ -1063,7 +1063,7 @@ It then restores any autoloads formerly associated with those symbols.
(Loading saves these in the @code{autoload} property of the symbol.) (Loading saves these in the @code{autoload} property of the symbol.)
Before restoring the previous definitions, @code{unload-feature} runs Before restoring the previous definitions, @code{unload-feature} runs
@code{remove-hook} to remove functions in the library from certain @code{remove-hook} to remove functions defined by the library from certain
hooks. These hooks include variables whose names end in @samp{-hook} hooks. These hooks include variables whose names end in @samp{-hook}
(or the deprecated suffix @samp{-hooks}), plus those listed in (or the deprecated suffix @samp{-hooks}), plus those listed in
@code{unload-feature-special-hooks}, as well as @code{unload-feature-special-hooks}, as well as
@ -1071,7 +1071,7 @@ hooks. These hooks include variables whose names end in @samp{-hook}
function because important hooks refer to functions that are no longer function because important hooks refer to functions that are no longer
defined. defined.
Standard unloading activities also undoes ELP profiling of functions Standard unloading activities also undo ELP profiling of functions
in that library, unprovides any features provided by the library, and in that library, unprovides any features provided by the library, and
cancels timers held in variables defined by the library. cancels timers held in variables defined by the library.

View file

@ -722,7 +722,10 @@ The value of this variable is a char-table that specifies, for each
character, a symbol whose name is the script to which the character character, a symbol whose name is the script to which the character
belongs, according to the Unicode Standard classification of the belongs, according to the Unicode Standard classification of the
Unicode code space into script-specific blocks. This char-table has a Unicode code space into script-specific blocks. This char-table has a
single extra slot whose value is the list of all script symbols. single extra slot whose value is the list of all script symbols. Note
that Emacs' classification of characters into scripts is not a 1-for-1
reflection of the Unicode standard, e.g. there is no @samp{symbol}
script in Unicode.
@end defvar @end defvar
@defvar char-width-table @defvar char-width-table

View file

@ -658,8 +658,13 @@ for which @var{predicate} returns @code{nil}.
@var{initial-value} and the first element of @var{sequence}, then calling @var{initial-value} and the first element of @var{sequence}, then calling
@var{function} with that result and the second element of @var{sequence}, @var{function} with that result and the second element of @var{sequence},
then with that result and the third element of @var{sequence}, etc. then with that result and the third element of @var{sequence}, etc.
@var{function} should be a function of two arguments. If @var{function} should be a function of two arguments.
@var{sequence} is empty, this returns @var{initial-value} without
@var{function} is called with two arguments. @var{intial-value}
(and then the accumulated value) is used as the first argument, and
the elements in @var{sequence} are used for the second argument.
If @var{sequence} is empty, this returns @var{initial-value} without
calling @var{function}. calling @var{function}.
@example @example

View file

@ -1283,6 +1283,45 @@ you can also add a leading underscore to the variable's name to
indicate to the compiler that this is a variable known not to indicate to the compiler that this is a variable known not to
be used.) be used.)
@subsubheading Cross-file variable checking
@strong{Note:} This is an experimental feature that may change or
disappear without prior notice.
The byte-compiler can also warn about lexical variables that are
special in other Emacs Lisp files, often indicating a missing
@code{defvar} declaration. This useful but somewhat specialised check
requires three steps:
@enumerate
@item
Byte-compile all files whose special variable declarations may be of
interest, with the environment variable @env{EMACS_GENERATE_DYNVARS}
set to a nonempty string. These are typically all the files in the
same package or related packages or Emacs subsystems. The process
will generate a file whose name ends in @file{.dynvars} for each
compiled Emacs Lisp file.
@item
Concatenate the @file{.dynvars} files into a single file.
@item
Byte-compile the files that need to be checked, this time with
the environment variable @env{EMACS_DYNVARS_FILE} set to the name
of the aggregated file created in step 2.
@end enumerate
Here is an example illustrating how this could be done, assuming that
a Unix shell and @command{make} are used for byte-compilation:
@example
$ rm *.elc # force recompilation
$ EMACS_GENERATE_DYNVARS=1 make # generate .dynvars
$ cat *.dynvars > ~/my.dynvars # combine .dynvars
$ rm *.elc # force recompilation
$ EMACS_DYNVARS_FILE=~/my.dynvars make # perform checks
@end example
@node Buffer-Local Variables @node Buffer-Local Variables
@section Buffer-Local Variables @section Buffer-Local Variables
@cindex variable, buffer-local @cindex variable, buffer-local
@ -2346,6 +2385,14 @@ equivalent to the following:
(defvaralias @var{obsolete-name} @var{current-name} @var{docstring}) (defvaralias @var{obsolete-name} @var{current-name} @var{docstring})
(make-obsolete-variable @var{obsolete-name} @var{current-name} @var{when}) (make-obsolete-variable @var{obsolete-name} @var{current-name} @var{when})
@end example @end example
This macro evaluates all its parameters, and both @var{obsolete-name}
and @var{current-name} should be symbols, so a typical usage would
look like:
@lisp
(define-obsolete-variable-alias 'foo-thing 'bar-thing "27.1")
@end lisp
@end defmac @end defmac
@defun indirect-variable variable @defun indirect-variable variable

View file

@ -1,5 +1,5 @@
.\" See section COPYING for conditions for redistribution. .\" See section COPYING for conditions for redistribution.
.TH EMACSCLIENT 1 "2020-10-15" "GNU Emacs" "GNU" .TH EMACSCLIENT 1 "2020-10-18" "GNU Emacs" "GNU"
.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
.\" other params are allowed: see man(7), man(1) .\" other params are allowed: see man(7), man(1)
.SH NAME .SH NAME
@ -61,45 +61,45 @@ is treated as column 1.
This option applies only to the next file specified. This option applies only to the next file specified.
.TP .TP
.B \-a, \-\-alternate-editor=COMMAND .B \-a, \-\-alternate-editor=COMMAND
if the Emacs server is not running, run the specified shell command instead. If the Emacs server is not running, run the specified shell command instead.
This can also be specified via the ALTERNATE_EDITOR environment variable. This can also be specified via the ALTERNATE_EDITOR environment variable.
If the value of ALTERNATE_EDITOR is the empty string, run "emacs \-\-daemon" to If the value of ALTERNATE_EDITOR is the empty string, run "emacs \-\-daemon" to
start Emacs in daemon mode, and try to connect to it. start Emacs in daemon mode, and try to connect to it.
.TP .TP
.B -c, \-\-create-frame .B -c, \-\-create-frame
create a new frame instead of trying to use the current Emacs frame Create a new frame instead of trying to use the current Emacs frame.
.TP .TP
.B \-F, \-\-frame-parameters=ALIST .B \-F, \-\-frame-parameters=ALIST
set the parameters of a newly-created frame. Set the parameters of a newly-created frame.
.TP .TP
.B \-d, \-\-display=DISPLAY .B \-d, \-\-display=DISPLAY
tell the server to display the files on the given display. Tell the server to display the files on the given display.
.TP .TP
.B \-e, \-\-eval .B \-e, \-\-eval
do not visit files but instead evaluate the arguments as Emacs Do not visit files but instead evaluate the arguments as Emacs
Lisp expressions. Lisp expressions.
.TP .TP
.B \-f, \-\-server-file=FILENAME .B \-f, \-\-server-file=FILENAME
use TCP configuration file FILENAME for communication. Use TCP configuration file FILENAME for communication.
This can also be specified via the EMACS_SERVER_FILE environment variable. This can also be specified via the EMACS_SERVER_FILE environment variable.
.TP .TP
.B \-n, \-\-no-wait .B \-n, \-\-no-wait
returns Return
immediately without waiting for you to "finish" the buffer in Emacs. immediately without waiting for you to "finish" the buffer in Emacs.
If combined with --eval, this option is ignored. If combined with --eval, this option is ignored.
.TP .TP
.B \-nw, \-t, \-\-tty .B \-nw, \-t, \-\-tty
open a new Emacs frame on the current terminal Open a new Emacs frame on the current terminal.
.TP .TP
.B \-s, \-\-socket-name=FILENAME .B \-s, \-\-socket-name=FILENAME
use socket named FILENAME for communication. Use socket named FILENAME for communication.
This can also be specified via the EMACS_SOCKET_NAME environment variable. This can also be specified via the EMACS_SOCKET_NAME environment variable.
.TP .TP
.B \-V, \-\-version .B \-V, \-\-version
print version information and exit Print version information and exit.
.TP .TP
.B \-H, \-\-help .B \-H, \-\-help
print this usage information message and exit Print this usage information message and exit.
.SH "EXIT STATUS" .SH "EXIT STATUS"
Normally, the exit status is 0. If emacsclient shuts down due to Normally, the exit status is 0. If emacsclient shuts down due to
Emacs signaling an error, the exit status is 1. Emacs signaling an error, the exit status is 1.

View file

@ -2718,8 +2718,7 @@ menus}), use:
@cindex FAQ, @code{font-lock-mode} @cindex FAQ, @code{font-lock-mode}
@code{font-lock-mode} is the standard way to have Emacs perform syntax @code{font-lock-mode} is the standard way to have Emacs perform syntax
highlighting in the current buffer. It is enabled by default in Emacs highlighting in the current buffer. It is enabled by default.
22.1 and later.
With @code{font-lock-mode} turned on, different types of text will With @code{font-lock-mode} turned on, different types of text will
appear in different colors. For instance, in a programming mode, appear in different colors. For instance, in a programming mode,
@ -2729,13 +2728,6 @@ a third.
To turn @code{font-lock-mode} off within an existing buffer, use To turn @code{font-lock-mode} off within an existing buffer, use
@kbd{M-x font-lock-mode @key{RET}}. @kbd{M-x font-lock-mode @key{RET}}.
In Emacs 21 and earlier versions, you could use the following code in
your @file{.emacs} file to turn on @code{font-lock-mode} globally:
@lisp
(global-font-lock-mode 1)
@end lisp
Highlighting a buffer with @code{font-lock-mode} can take quite a while, Highlighting a buffer with @code{font-lock-mode} can take quite a while,
and cause an annoying delay in display, so several features exist to and cause an annoying delay in display, so several features exist to
work around this. work around this.
@ -3672,7 +3664,6 @@ See the file @file{nextstep/INSTALL} in the distribution.
* Compose Character:: * Compose Character::
* Binding combinations of modifiers and function keys:: * Binding combinations of modifiers and function keys::
* Meta key does not work in xterm:: * Meta key does not work in xterm::
* ExtendChar key does not work as Meta::
* SPC no longer completes file names:: * SPC no longer completes file names::
@end menu @end menu
@ -4147,29 +4138,6 @@ You might have to replace @samp{Meta} with @samp{Alt}.
@end itemize @end itemize
@node ExtendChar key does not work as Meta
@section Why doesn't my @key{ExtendChar} key work as a @key{Meta} key under HP-UX 8.0 and 9.x?
@cindex @key{ExtendChar} key as @key{Meta}
@cindex @key{Meta}, using @key{ExtendChar} for
@cindex HP-UX, the @key{ExtendChar} key
This is a result of an internationalization extension in X11R4 and the
fact that HP is now using this extension. Emacs assumes that the
@code{XLookupString} function returns the same result regardless of the
@key{Meta} key state which is no longer necessarily true. Until Emacs
is fixed, the temporary kludge is to run this command after each time
the X server is started but preferably before any xterm clients are:
@example
xmodmap -e 'remove mod1 = Mode_switch'
@end example
@c FIXME: Emacs 21 supports I18N in X11; does that mean that this bug is
@c solved?
This will disable the use of the extra keysyms systemwide, which may be
undesirable if you actually intend to use them.
@node SPC no longer completes file names @node SPC no longer completes file names
@section Why doesn't @key{SPC} complete file names anymore? @section Why doesn't @key{SPC} complete file names anymore?
@cindex @kbd{SPC} file name completion @cindex @kbd{SPC} file name completion

View file

@ -23919,10 +23919,10 @@ The following variables customize the appearance of the smileys:
@item smiley-style @item smiley-style
@vindex smiley-style @vindex smiley-style
Specifies the smiley style. Predefined smiley styles include Specifies the smiley style. Predefined smiley styles include
@code{low-color} (small 13x14 pixel, three-color images), @code{medium} @code{emoji} (use emoji characters), @code{low-color} (small 13x14
(more colorful images, 16x16 pixel), and @code{grayscale} (grayscale pixel, three-color images), @code{medium} (more colorful images, 16x16
images, 14x14 pixel). The default depends on the height of the default pixel), and @code{grayscale} (grayscale images, 14x14 pixel). The
face. default depends on the height of the default face.
@item smiley-data-directory @item smiley-data-directory
@vindex smiley-data-directory @vindex smiley-data-directory

View file

@ -798,17 +798,17 @@ in cross references and node names if it differs from the current
file, so you can always know that you are going to be switching to file, so you can always know that you are going to be switching to
another manual and which one. another manual and which one.
However, Emacs normally hides some other text in cross-references. Emacs normally hides some text in cross references. If you put your
If you put your mouse over the cross reference, then the information mouse over the cross reference, then the information appearing in a
appearing in a separate box (tool tip) or in the echo area will show separate box (tool tip) or in the echo area will show the full
the full cross-reference including the file name and the node name of cross reference, including the file name and the node name of the
the cross reference. If you have a mouse, just leave it over the cross reference if it leads to another file. If you have a mouse,
cross reference @xref{Top,, Overview of Texinfo, texinfo, Texinfo: just leave it over the next cross reference: @xref{Top,, Overview of
The GNU Documentation Format}, and watch what happens. If you Texinfo, texinfo, Texinfo: The GNU Documentation Format}, and watch
always like to have that information visible without having to move what happens. If you always like to have that information visible
your mouse over the cross reference, use @kbd{M-x visible-mode}, or without having to move your mouse over the cross reference, use
set @code{Info-hide-note-references} to a value other than @code{t} @kbd{M-x visible-mode}, or set @code{Info-hide-note-references} to a
(@pxref{Emacs Info Variables}). value other than @code{t} (@pxref{Emacs Info Variables}).
@format @format
>> Now type @kbd{n} to learn more commands. >> Now type @kbd{n} to learn more commands.
@ -1227,12 +1227,20 @@ not scroll with the rest of the buffer, making these links always
visible. visible.
@item Info-hide-note-references @item Info-hide-note-references
As explained in earlier nodes, the Emacs version of Info normally As explained in earlier sections, the Emacs version of Info normally
hides some text in menus and cross-references. You can completely hides some text in menus and cross references. It also replaces the
disable this feature, by setting this option to @code{nil}. Setting @samp{*note} prefix of each cross reference with a more grammatically
it to a value that is neither @code{nil} nor @code{t} produces an correct @samp{see}. This is the effect of the default value of this
intermediate behavior, hiding a limited amount of text, but showing option, @code{t}. Setting this option to @code{nil} disables both
all text that could potentially be useful. hiding and replacing of the original cross reference text, and Emacs
will then display them as they are in the Info file. If you set it to
the value @code{hide}, Emacs will do the same as with @code{t}, but
will also remove @samp{*note} without replacing it with anything.
Setting it to any other non-@code{nil} value produces an intermediate
behavior, hiding a limited amount of text, but showing all text that
could potentially be useful, including the name of the node that is
the target of the cross reference and its file if it is different from
the current file.
@item Info-scroll-prefer-subnodes @item Info-scroll-prefer-subnodes
If set to a non-@code{nil} value, @key{SPC} and @key{BACKSPACE} (or If set to a non-@code{nil} value, @key{SPC} and @key{BACKSPACE} (or

View file

@ -50,8 +50,8 @@ and with no Back-Cover Texts.
* Overview:: * Overview::
* Installation:: * Installation::
* Enable and load:: * Enable and load::
* Customisation Options:: * Customization Options::
* Advanced customisation (do-it-yourself):: * Advanced customization (do-it-yourself)::
* Face coverage:: * Face coverage::
* Notes for individual packages:: * Notes for individual packages::
* Contributing:: * Contributing::
@ -85,7 +85,7 @@ Enable and load
* Toggle between the themes on demand:: * Toggle between the themes on demand::
* Configure options prior to loading:: * Configure options prior to loading::
Customisation Options Customization Options
* Bold constructs:: Toggle bold constructs in code * Bold constructs:: Toggle bold constructs in code
* Slanted constructs:: Toggle slanted constructs (italics) in code * Slanted constructs:: Toggle slanted constructs (italics) in code
@ -108,7 +108,7 @@ Scaled headings
* Scaled heading sizes:: Specify rate of increase for scaled headings * Scaled heading sizes:: Specify rate of increase for scaled headings
Advanced customisation (do-it-yourself) Advanced customization (do-it-yourself)
* Tweak colors (DIY):: Declare your own palette overrides * Tweak colors (DIY):: Declare your own palette overrides
* Font configs (DIY):: Optimise for mixed typeface buffers * Font configs (DIY):: Optimise for mixed typeface buffers
@ -177,7 +177,7 @@ display that draw attention to details and important aspects in the
design of the themes. They also showcase the numerous customization design of the themes. They also showcase the numerous customization
options. options.
@xref{Customisation Options, , Customisation options}. @xref{Customization Options}.
@node Learn about the latest changes @node Learn about the latest changes
@section Learn about the latest changes @section Learn about the latest changes
@ -193,9 +193,8 @@ On older versions of Emacs, they can be installed using Emacs' package
manager or manually from their code repository. manager or manually from their code repository.
Modus Operandi (light theme) and Modus Vivendi (dark) are normally Modus Operandi (light theme) and Modus Vivendi (dark) are normally
distributed as standalone packages in Emacs-specific archives: GNU ELPA, distributed as standalone packages in Emacs-specific archives. There
MELPA, and MELPA Stable. There also exist packages for GNU/Linux also exist packages for GNU/Linux distributions.
distributions.
@menu @menu
* Install from the archives:: * Install from the archives::
@ -206,14 +205,12 @@ distributions.
@section Install from the archives @section Install from the archives
@samp{modus-operandi-theme} and @samp{modus-vivendi-theme} are @samp{modus-operandi-theme} and @samp{modus-vivendi-theme} are
available from GNU ELPA. available from the GNU ELPA archive, which is configured by default.
Prior to querying any package archive, make sure to have updated the Prior to querying any package archive, make sure to have updated the
index, with @samp{M-x package-refresh-contents}. Then all you need to do is index, with @samp{M-x package-refresh-contents}. Then all you need to do is
type @samp{M-x package-install} and specify the theme of your choice. type @samp{M-x package-install} and specify the theme of your choice.
GNU ELPA contains the last tagged release.
@node Install on GNU/Linux @node Install on GNU/Linux
@section Install on GNU/Linux @section Install on GNU/Linux
@ -247,22 +244,22 @@ Users of either the Guix System (the distro) or just Guix (the package
manager) can get each theme as a standalone package. manager) can get each theme as a standalone package.
@example @example
guix package -i modus-operandi-theme guix package -i emacs-modus-operandi-theme
@end example @end example
And/or: And/or:
@example @example
guix package -i modus-vivendi-theme guix package -i emacs-modus-vivendi-theme
@end example @end example
@node Enable and load @node Enable and load
@chapter Enable and load @chapter Enable and load
This section documents how to load the theme of your This section documents how to load the theme of your choice and how to
choice and how to further control its initialization. It also includes further control its initialization. It also includes some sample code
some sample code snippets that could help you in the task, especially if snippets that could help you in the task, especially if you intend to
you intend to use both Modus Operandi and Modus Vivendi. use both Modus Operandi and Modus Vivendi.
@menu @menu
* Load automatically:: * Load automatically::
@ -298,7 +295,7 @@ evaluate the expression:
@section Load at a given time or at sunset/sunrise @section Load at a given time or at sunset/sunrise
It is possible to schedule a time during the day at or after which a It is possible to schedule a time during the day at or after which a
given theme will be loaded.@footnote{Contributed on Reddit by user b3n given theme will be loaded.@footnote{Contributed on Reddit by user @samp{b3n}
@uref{https://www.reddit.com/r/emacs/comments/gdtqov/weekly_tipstricketc_thread/fq9186h/}.} @uref{https://www.reddit.com/r/emacs/comments/gdtqov/weekly_tipstricketc_thread/fq9186h/}.}
@lisp @lisp
@ -373,7 +370,7 @@ disabling a single target, but you get the idea.
@section Configure options prior to loading @section Configure options prior to loading
If you plan to use both themes and wish to apply styles consistently If you plan to use both themes and wish to apply styles consistently
(see @ref{Customisation Options}), you could define wrapper functions around (see @ref{Customization Options}), you could define wrapper functions around
the standard @samp{load-theme} command. These extend the simple function we the standard @samp{load-theme} command. These extend the simple function we
presented in @ref{Toggle between the themes on demand}. presented in @ref{Toggle between the themes on demand}.
@ -427,8 +424,8 @@ method were contributed on Reddit by user @samp{b3n},
(modus-operandi-theme-load))) (modus-operandi-theme-load)))
@end lisp @end lisp
@node Customisation Options @node Customization Options
@chapter Customisation Options @chapter Customization Options
The Modus themes are highly configurable, though they should work well The Modus themes are highly configurable, though they should work well
without any further tweaks. without any further tweaks.
@ -639,7 +636,7 @@ background and foreground to the minibuffer and other REPL prompts (like
@samp{M-x shell} and @samp{M-x eshell}). The difference between the two is that the @samp{M-x shell} and @samp{M-x eshell}). The difference between the two is that the
latter has a more pronounced/noticeable effect than the former. latter has a more pronounced/noticeable effect than the former.
The default is not to use any background for such prompts, while relying The default does not use any background for such prompts, while relying
exclusively on an accented foreground color. exclusively on an accented foreground color.
@node Mode line @node Mode line
@ -1182,13 +1179,13 @@ main font family.
@ref{Font configs (DIY), , Font configurations for Org (and others)}. @ref{Font configs (DIY), , Font configurations for Org (and others)}.
@node Advanced customisation (do-it-yourself) @node Advanced customization (do-it-yourself)
@chapter Advanced customisation (do-it-yourself) @chapter Advanced customization (do-it-yourself)
Unlike the predefined customization options which follow a Unlike the predefined customization options which follow a
straightforward pattern of allowing the user to quickly specify their straightforward pattern of allowing the user to quickly specify their
preference, the themes also provide a more flexible, albeit difficult, preference, the themes also provide a more flexible, albeit difficult,
mechanism to control things with precision (see @ref{Customisation Options}). mechanism to control things with precision (see @ref{Customization Options}).
This section is of interest only to users who are prepared to maintain This section is of interest only to users who are prepared to maintain
their own local tweaks and who are willing to deal with any possible their own local tweaks and who are willing to deal with any possible
@ -2043,7 +2040,7 @@ that secondary elements like sidebars can have the default (pure
white/black) background. white/black) background.
I will only cover this package if it ever supports the inverse effect: I will only cover this package if it ever supports the inverse effect:
less intense colors (but still accessible) for supportive interfaces less intense colors (but still accessible) for ancillary interfaces
and the intended styles for the content you are actually working on. and the intended styles for the content you are actually working on.
@node Notes for individual packages @node Notes for individual packages
@ -2302,13 +2299,13 @@ The Modus themes are a collective effort. Every contribution counts.
Protesilaos Stavrou. Protesilaos Stavrou.
@item Code contributions @item Code contributions
Anders Johansson, Basil L@. Contovounisios, Anders Johansson, Basil L@. Contovounesios,
Markus Beppler, Matthew Stevenson. Markus Beppler, Matthew Stevenson.
@item Ideas and user feedback @item Ideas and user feedback
Aaron Jensen, Adam Spiers, Alex Griffin, Aaron Jensen, Adam Spiers, Alex Griffin,
Alex Peitsinis, Alexey Shmalko, Anders Johansson, André Alexandre Alex Peitsinis, Alexey Shmalko, Anders Johansson, André Alexandre
Gomes, Arif Rezai, Basil L@. Contovounisios, Damien Cassou, Dario Gomes, Arif Rezai, Basil L@. Contovounesios, Damien Cassou, Dario
Gjorgjevski, David Edmondson, Davor Rotim, Divan Santana, Gerry Gjorgjevski, David Edmondson, Davor Rotim, Divan Santana, Gerry
Agbobada, Gianluca Recchia, Iris Garcia, Len Trigg, Manuel Uberti, Agbobada, Gianluca Recchia, Iris Garcia, Len Trigg, Manuel Uberti,
Mark Burton, Markus Beppler, Michael Goldenberg, Murilo Pereira, Mark Burton, Markus Beppler, Michael Goldenberg, Murilo Pereira,

View file

@ -3089,19 +3089,6 @@ Example:
@end group @end group
@end example @end example
During file name completion, remote directory contents are re-read
regularly to account for any changes in the file system that may
affect the completion candidates. Such re-reads can account for
changes to the file system by applications outside Emacs
(@pxref{Connection caching}).
@defopt tramp-completion-reread-directory-timeout
The timeout is number of seconds since last remote command for
rereading remote directory contents. A value of 0 re-reads
immediately during file name completion, @code{nil} uses cached
directory contents.
@end defopt
@node Ad-hoc multi-hops @node Ad-hoc multi-hops
@section Declaring multiple hops in the file name @section Declaring multiple hops in the file name
@ -4126,9 +4113,6 @@ files are not independently updated outside @value{tramp}'s control.
That cache cleanup will be necessary if the remote directories or That cache cleanup will be necessary if the remote directories or
files are updated independent of @value{tramp}. files are updated independent of @value{tramp}.
Set @code{tramp-completion-reread-directory-timeout} to @code{nil} to
speed up completions, @ref{File name completion}.
Disable version control to avoid delays: Disable version control to avoid delays:
@lisp @lisp

111
etc/HELLO
View file

@ -7,88 +7,89 @@ some of the character sets that Emacs supports.
Non-ASCII examples: Non-ASCII examples:
Europe: <x-charset><param>latin-iso8859-1</param>¡Hola!, Grüß Gott, Hyvää päivää,</x-charset><x-charset><param>latin-iso8859-15</param> Tere õhtust,</x-charset><x-charset><param>latin-iso8859-3</param> Bonġu Europe: <x-charset><param>latin-iso8859-1</param>¡Hola!, Grüß Gott, Hyvää päivää,</x-charset> Tere õhtust,<x-charset><param>latin-iso8859-3</param> Bonġu
Cześć!,</x-charset><x-charset><param>latin-iso8859-2</param> Dobrý den,</x-charset><x-charset><param>cyrillic-iso8859-5</param> Здравствуйте!,</x-charset><x-charset><param>greek-iso8859-7</param> Γειά σας,</x-charset><x-charset><param>mule-unicode-0100-24ff</param> გამარჯობა</x-charset> Cześć!,</x-charset><x-charset><param>latin-iso8859-2</param> Dobrý den,</x-charset><x-charset><param>cyrillic-iso8859-5</param> Здравствуйте!,</x-charset><x-charset><param>greek-iso8859-7</param> Γειά σας,</x-charset> გამარჯობა
Africa:<x-charset><param>mule-unicode-0100-24ff</param> </x-charset><x-charset><param>ethiopic</param>ሠላም</x-charset> Africa: <x-charset><param>ethiopic</param>ሠላም</x-charset>
Middle/Near East:<x-charset><param>hebrew-iso8859-8</param> שָׁלוֹם,</x-charset><x-charset><param>mule-unicode-0100-24ff</param> السّلام عليكم</x-charset> Middle/Near East:<x-charset><param>hebrew-iso8859-8</param> שָׁלוֹם,</x-charset> السّلام عليكم
South Asia:<x-charset><param>mule-unicode-0100-24ff</param> નમસ્તે, नमस्ते, ನಮಸ್ಕಾರ, നമസ്കാരം, ଶୁଣିବେ, South Asia: નમસ્તે, नमस्ते, ನಮಸ್ಕಾರ, നമസ്കാരം, ଶୁଣିବେ,
ආයුබෝවන්, வணக்கம், నమస్కారం,</x-charset><x-charset><param>tibetan</param> བཀྲ་ཤིས་བདེ་ལེགས༎</x-charset> ආයුබෝවන්, வணக்கம், నమస్కారం,<x-charset><param>tibetan</param> བཀྲ་ཤིས་བདེ་ལེགས༎</x-charset>
South East Asia:<x-charset><param>mule-unicode-0100-24ff</param> ជំរាបសួរ,</x-charset><x-charset><param>lao</param> ສະບາຍດີ,</x-charset><x-charset><param>mule-unicode-0100-24ff</param> မင်္ဂလာပါ,</x-charset><x-charset><param>thai-tis620</param> สวัสดีครับ,</x-charset><x-charset><param>vietnamese-viscii-lower</param> </x-charset><x-charset><param>vietnamese-viscii-upper</param>C</x-charset><x-charset><param>vietnamese-viscii-lower</param>hào bạn</x-charset> South East Asia: ជំរាបសួរ,<x-charset><param>lao</param> ສະບາຍດີ,</x-charset> မင်္ဂလာပါ,<x-charset><param>thai-tis620</param> สวัสดีครับ,</x-charset><x-charset><param>vietnamese-viscii-lower</param> </x-charset><x-charset><param>vietnamese-viscii-upper</param>C</x-charset><x-charset><param>vietnamese-viscii-lower</param>hào bạn</x-charset>
East Asia:<x-charset><param>chinese-gb2312</param> 你好,</x-charset><x-charset><param>chinese-big5-1</param> 早晨,</x-charset><x-charset><param>japanese-jisx0208</param> こんにちは,</x-charset><x-charset><param>korean-ksc5601</param> 안녕하세요</x-charset> East Asia:<x-charset><param>chinese-gb2312</param> 你好,</x-charset><x-charset><param>chinese-big5-1</param> 早晨,</x-charset><x-charset><param>japanese-jisx0208</param> こんにちは,</x-charset><x-charset><param>korean-ksc5601</param> 안녕하세요</x-charset>
Misc:<x-charset><param>latin-iso8859-3</param> Eĥoŝanĝo ĉiuĵaŭde,</x-charset><x-charset><param>mule-unicode-2500-33ff</param> ⠓⠑⠇⠇⠕,</x-charset><x-charset><param>mule-unicode-0100-24ff</param> ∀ p ∈ world • hello p </x-charset><x-charset><param>mule-unicode-2500-33ff</param>□</x-charset> Misc:<x-charset><param>latin-iso8859-3</param> Eĥoŝanĝo ĉiuĵaŭde,</x-charset> ⠓⠑⠇⠇⠕, ∀ p ∈ world • hello p □
CJK variety:<x-charset><param>chinese-gb2312</param> GB(元气,开发),</x-charset><x-charset><param>chinese-big5-1</param> BIG5(元氣,開發),</x-charset><x-charset><param>japanese-jisx0208</param> JIS(元気,開発),</x-charset><x-charset><param>korean-ksc5601</param> KSC(元氣,開發)</x-charset> CJK variety:<x-charset><param>chinese-gb2312</param> GB(元气,开发),</x-charset><x-charset><param>chinese-big5-1</param> BIG5(元氣,開發),</x-charset><x-charset><param>japanese-jisx0208</param> JIS(元気,開発),</x-charset><x-charset><param>korean-ksc5601</param> KSC(元氣,開發)</x-charset>
Unicode charset:<x-charset><param>unicode</param> Eĥoŝanĝo ĉiuĵaŭde, Γειά σας, שלום, Здравствуйте!</x-charset> Unicode charset:<x-charset><param>unicode</param> Eĥoŝanĝo ĉiuĵaŭde, Γειά σας, שלום, Здравствуйте!</x-charset>
LANGUAGE (NATIVE NAME) HELLO LANGUAGE (NATIVE NAME) HELLO
---------------------- ----- ---------------------- -----
<x-charset><param>mule-unicode-0100-24ff</param>Amharic (አማርኛ) ሠላም Amharic (አማርኛ) ሠላም
Arabic (العربيّة) السّلام عليكم Arabic (العربيّة) السّلام عليكم
Armenian (հայերեն) Բարև ձեզ Armenian (հայերեն) Բարև ձեզ
Belarusian (беларуская) Прывітанне
Bengali (বাংলা) নমস্কার Bengali (বাংলা) নমস্কার
</x-charset><x-charset><param>mule-unicode-2500-33ff</param>Braille ⠓⠑⠇⠇⠕ Braille ⠓⠑⠇⠇⠕
</x-charset><x-charset><param>mule-unicode-0100-24ff</param>Burmese (မြန်မာ) မင်္ဂလာပါ Burmese (မြန်မာ) မင်္ဂလာပါ
</x-charset>C printf ("Hello, world!\n"); C printf ("Hello, world!\n");
<x-charset><param>unicode</param>Cherokee (ᏣᎳᎩ ᎦᏬᏂᎯᏍᏗ) ᎣᏏᏲ / ᏏᏲ Cherokee (ᏣᎳᎩ ᎦᏬᏂᎯᏍᏗ) ᎣᏏᏲ / ᏏᏲ
Comanche /kəˈmæntʃiː/ Haa marʉ́awe Comanche /kəˈmæntʃiː/ Haa marʉ́awe
Cree (ᓀᐦᐃᔭᐍᐏᐣ) ᑕᓂᓯ / ᐙᒋᔮ Cree (ᓀᐦᐃᔭᐍᐏᐣ) ᑕᓂᓯ / ᐙᒋᔮ
</x-charset><x-charset><param>latin-iso8859-2</param>Czech (čeština) Dobrý den Czech (čeština) Dobrý den
</x-charset><x-charset><param>latin-iso8859-1</param>Danish (dansk) Hej / Goddag / Halløj Danish (dansk) Hej / Goddag / Halløj
Dutch (Nederlands) Hallo / Dag Dutch (Nederlands) Hallo / Dag
</x-charset><x-charset><param>unicode</param>Efik /ˈɛfɪk/ Mɔkɔm Efik /ˈɛfɪk/ Mɔkɔm
Emacs emacs --no-splash -f view-hello-file Emacs emacs --no-splash -f view-hello-file
Emoji 👋 Emoji 👋
</x-charset>English <x-charset><param>ipa</param>/ˈɪŋɡlɪʃ/</x-charset> Hello English /ˈɪŋɡlɪʃ/ Hello
<x-charset><param>latin-iso8859-3</param>Esperanto Saluton (Eĥoŝanĝo ĉiuĵaŭde) Esperanto Saluton (Eĥoŝanĝo ĉiuĵaŭde)
</x-charset><x-charset><param>latin-iso8859-15</param>Estonian (eesti keel) Tere päevast / Tere õhtust Estonian (eesti keel) Tere päevast / Tere õhtust
</x-charset><x-charset><param>latin-iso8859-1</param>Finnish (suomi) Hei / Hyvää päivää Finnish (suomi) Hei / Hyvää päivää
French (français) Bonjour / Salut French (français) Bonjour / Salut
</x-charset><x-charset><param>mule-unicode-0100-24ff</param>Georgian (ქართული) გამარჯობა Georgian (ქართული) გამარჯობა
</x-charset><x-charset><param>latin-iso8859-1</param>German (Deutsch) Guten Tag / Grüß Gott German (Deutsch) Guten Tag / Grüß Gott
</x-charset><x-charset><param>greek-iso8859-7</param>Greek (ελληνικά) Γειά σας Greek (ελληνικά) Γειά σας
</x-charset><x-charset><param>mule-unicode-0100-24ff</param>Greek, ancient (ἑλληνική) Οὖλέ τε καὶ μέγα χαῖρε Greek, ancient (ἑλληνική) Οὖλέ τε καὶ μέγα χαῖρε
Gujarati (ગુજરાતી) નમસ્તે Gujarati (ગુજરાતી) નમસ્તે
</x-charset><x-charset><param>hebrew-iso8859-8</param>Hebrew (עִבְרִית) שָׁלוֹם Hebrew (עִבְרִית) שָׁלוֹם
</x-charset><x-charset><param>latin-iso8859-2</param>Hungarian (magyar) Szép jó napot! Hungarian (magyar) Szép jó napot!
</x-charset><x-charset><param>mule-unicode-0100-24ff</param>Hindi (हिंदी) नमस्ते / नमस्कार । Hindi (हिंदी) नमस्ते / नमस्कार ।
</x-charset><x-charset><param>unicode</param>Inuktitut (ᐃᓄᒃᑎᑐᑦ) ᐊᐃ Inuktitut (ᐃᓄᒃᑎᑐᑦ) ᐊᐃ
</x-charset><x-charset><param>latin-iso8859-1</param>Italian (italiano) Ciao / Buon giorno Italian (italiano) Ciao / Buon giorno
</x-charset>Javanese (Jawa) System.out.println("Sugeng siang!"); Javanese (ꦧꦱꦗꦮ) console.log("ꦱꦸꦒꦼꦁꦱꦶꦪꦁ");
<x-charset><param>mule-unicode-0100-24ff</param>Kannada (ಕನ್ನಡ) ನಮಸ್ಕಾರ Kannada (ಕನ್ನಡ) ನಮಸ್ಕಾರ
Khmer (ភាសាខ្មែរ) ជំរាបសួរ Khmer (ភាសាខ្មែរ) ជំរាបសួរ
</x-charset><x-charset><param>lao</param>Lao (ພາສາລາວ) ສະບາຍດີ / ຂໍໃຫ້ໂຊກດີ Lao (ພາສາລາວ) ສະບາຍດີ / ຂໍໃຫ້ໂຊກດີ
</x-charset><x-charset><param>mule-unicode-0100-24ff</param>Malayalam (മലയാളം) നമസ്കാരം Malayalam (മലയാളം) നമസ്കാരം
</x-charset><x-charset><param>unicode</param>Maldivian (ދިވެހި) އައްސަލާމު ޢަލައިކުމް / ކިހިނެހް؟ Maldivian (ދިވެހި) އައްސަލާމު ޢަލައިކުމް / ކިހިނެހް؟
</x-charset><x-charset><param>latin-iso8859-3</param>Maltese (il-Malti) Bonġu / Saħħa Maltese (il-Malti) Bonġu / Saħħa
</x-charset><x-charset><param>unicode</param>Mathematics ∀ p ∈ world • hello p □ Mathematics ∀ p ∈ world • hello p □
</x-charset><x-charset><param>cyrillic-iso8859-5</param>Mongolian (монгол хэл) Сайн байна уу? Mongolian (монгол хэл) Сайн байна уу?
</x-charset><x-charset><param>latin-iso8859-1</param>Norwegian (norsk) Hei / God dag Norwegian (norsk) Hei / God dag
</x-charset><x-charset><param>mule-unicode-0100-24ff</param>Oriya (ଓଡ଼ିଆ) ଶୁଣିବେ Oriya (ଓଡ଼ିଆ) ଶୁଣିବେ
</x-charset><x-charset><param>latin-iso8859-2</param>Polish (język polski) Dzień dobry! / Cześć! Polish (język polski) Dzień dobry! / Cześć!
</x-charset><x-charset><param>cyrillic-iso8859-5</param>Russian (русский) Здра́вствуйте! Russian (русский) Здра́вствуйте!
</x-charset><x-charset><param>mule-unicode-0100-24ff</param>Sinhala (සිංහල) ආයුබෝවන් Sinhala (සිංහල) ආයුබෝවන්
</x-charset><x-charset><param>latin-iso8859-2</param>Slovak (slovenčina) Dobrý deň Slovak (slovenčina) Dobrý deň
Slovenian (slovenščina) Pozdravljeni! Slovenian (slovenščina) Pozdravljeni!
Spanish (espa</x-charset><x-charset><param>latin-iso8859-1</param>ñol) ¡Hola! Spanish (español) ¡Hola!
Swedish (svenska) Hej / Goddag / Hallå Swedish (svenska) Hej / Goddag / Hallå
</x-charset><x-charset><param>mule-unicode-0100-24ff</param>Tamil (தமிழ்) வணக்கம் Tamil (தமிழ்) வணக்கம்
Telugu (తెలుగు) నమస్కారం Telugu (తెలుగు) నమస్కారం
</x-charset>TaiViet (ꪁꪫꪱꪣ ꪼꪕ) ꪅꪰꪙꫂ ꪨꪮꫂ ꪁꪫꪱ / ꪅꪽ ꪨꪷ ꪁꪫꪱ TaiViet (ꪁꪫꪱꪣ ꪼꪕ) ꪅꪰꪙꫂ ꪨꪮꫂ ꪁꪫꪱ / ꪅꪽ ꪨꪷ ꪁꪫꪱ
Thai (ภาษาไทย) สวัสดีครับ / สวัสดีค่ะ
Tibetan (བོད་སྐད་) བཀྲ་ཤིས་བདེ་ལེགས༎
Tigrigna (ትግርኛ) ሰላማት
Turkish (Türkçe) Merhaba
Ukrainian (українська) Вітаю
Vietnamese (tiếng Việt) Chào bạn
<x-charset><param>thai-tis620</param>Thai (ภาษาไทย) สวัสดีครับ / สวัสดีค่ะ
</x-charset><x-charset><param>tibetan</param>Tibetan (བོད་སྐད་) བཀྲ་ཤིས་བདེ་ལེགས༎
</x-charset><x-charset><param>mule-unicode-0100-24ff</param>Tigrigna (ትግርኛ) ሰላማት
</x-charset><x-charset><param>latin-iso8859-9</param>Turkish (Türkçe) Merhaba
</x-charset><x-charset><param>cyrillic-iso8859-5</param>Ukrainian (українська) Вітаю
</x-charset><x-charset><param>vietnamese-viscii-lower</param>Vietnamese (tiếng </x-charset><x-charset><param>vietnamese-viscii-upper</param>V</x-charset><x-charset><param>vietnamese-viscii-lower</param>iệt) </x-charset><x-charset><param>vietnamese-viscii-upper</param>Chào bạn
</x-charset>
<x-charset><param>japanese-jisx0208</param>Japanese (日本語) こんにちは</x-charset> <x-charset><param>katakana-jisx0201</param>/ コンニチハ <x-charset><param>japanese-jisx0208</param>Japanese (日本語) こんにちは</x-charset> <x-charset><param>katakana-jisx0201</param>/ コンニチハ
</x-charset><x-charset><param>chinese-gb2312</param>Chinese (中文,普通话,汉语) 你好 </x-charset><x-charset><param>chinese-gb2312</param>Chinese (中文,普通话,汉语) 你好
@ -97,7 +98,7 @@ Telugu (తెలుగు) నమస్కారం
</x-charset> </x-charset>
<x-charset><param>unicode</param>
Copyright (C) 2001-2020 Free Software Foundation, Inc. Copyright (C) 2001-2020 Free Software Foundation, Inc.
@ -127,4 +128,4 @@ along with GNU Emacs. If not, see <<https://www.gnu.org/licenses/>.
;;; bidi-display-reordering: t ;;; bidi-display-reordering: t
;;; coding: utf-8 ;;; coding: utf-8
;;; inhibit-compacting-font-caches: t ;;; inhibit-compacting-font-caches: t
;;; End:</x-charset> ;;; End:

View file

@ -86,13 +86,13 @@ useful on systems such as FreeBSD which ships only with "etc/termcap".
* Changes in Emacs 28.1 * Changes in Emacs 28.1
+++ +++
*** A new system for displaying documentation for groups of function is added. ** New system for displaying documentation for groups of function.
This can either be used by saying 'M-x shortdoc-display-group' and This can either be used by saying 'M-x shortdoc-display-group' and
choosing a group, or clicking a button in the *Help* buffers when choosing a group, or clicking a button in the *Help* buffers when
looking at the doc string of a function that belongs to one of these looking at the doc string of a function that belongs to one of these
groups. groups.
*** New var 'redisplay-skip-initial-frame' to enable batch redisplay tests. ** New var 'redisplay-skip-initial-frame' to enable batch redisplay tests.
Setting it to nil forces the redisplay to do its job even in the Setting it to nil forces the redisplay to do its job even in the
initial frame used in batch mode. initial frame used in batch mode.
@ -104,7 +104,7 @@ sequences necessary to render faces with the 'strike-through'
attribute on TTY frames. attribute on TTY frames.
+++ +++
*** Emacs now defaults to UTF-8 instead of ISO-8859-1. ** Emacs now defaults to UTF-8 instead of ISO-8859-1.
This is only for the default, where the user has set no 'LANG' (or This is only for the default, where the user has set no 'LANG' (or
similar) variable or environment. This change should lead to no similar) variable or environment. This change should lead to no
user-visible changes for normal usage. user-visible changes for normal usage.
@ -163,13 +163,6 @@ your init file:
(setq frame-title-format '(multiple-frames "%b" (setq frame-title-format '(multiple-frames "%b"
("" invocation-name "@" system-name))) ("" invocation-name "@" system-name)))
** recentf
---
*** 'recentf-auto-cleanup' time string now repeats.
When 'recentf-auto-cleanup' is set to a time string, it now repeats
every day, rather than only running once after the mode is turned on.
* Editing Changes in Emacs 28.1 * Editing Changes in Emacs 28.1
@ -213,11 +206,6 @@ buffer to be able to move point to the inaccessible portion.
** When 'suggest-key-bindings' is non-nil, the completion list of 'M-x' ** When 'suggest-key-bindings' is non-nil, the completion list of 'M-x'
shows equivalent key bindings for all commands that have them. shows equivalent key bindings for all commands that have them.
---
** Movement commands in 'gomoku-mode' are fixed.
'gomoku-move-sw' and 'gomoku-move-ne' now work correctly, and
horizontal movements now stop at the edge of the board.
** Autosaving via 'auto-save-visited-mode' can now be inhibited by ** Autosaving via 'auto-save-visited-mode' can now be inhibited by
setting the variable 'auto-save-visited-mode' buffer-locally to nil. setting the variable 'auto-save-visited-mode' buffer-locally to nil.
@ -320,6 +308,9 @@ and variables.
** Archive mode ** Archive mode
---
*** Archive Mode can now parse .squashfs files.
*** Can now modify members of 'ar' archives. *** Can now modify members of 'ar' archives.
*** Display of summaries unified between backends. *** Display of summaries unified between backends.
@ -434,6 +425,11 @@ tags to be considered as well.
** Gnus ** Gnus
+++
*** New value for user option 'smiley-style'
Smileys can now be rendered with emojis instead of small images when
using the new 'emoji' value in 'smiley-style'.
+++ +++
*** New user option 'gnus-agent-eagerly-store-articles'. *** New user option 'gnus-agent-eagerly-store-articles'.
If non-nil (which is the default), the Gnus Agent will store all read If non-nil (which is the default), the Gnus Agent will store all read
@ -607,6 +603,16 @@ defaulting to active region when used interactively.
--- ---
** The old non-SMIE indentation of 'sh-mode' has been removed. ** The old non-SMIE indentation of 'sh-mode' has been removed.
---
** The 'list-bookmark' menu is now based on 'tabulated-list-mode'.
The interactive bookmark list will now benefit from features in
'tabulated-list-mode' like sorting columns or changing column width.
Support for the optional "inline" header line, allowing for a header
without using 'header-line-format', has been dropped. Consequently,
the variables 'bookmark-bmenu-use-header-line' and
'bookmark-bmenu-inline-header-height' are now declared obsolete.
--- ---
** The sb-image.el library is now marked obsolete. ** The sb-image.el library is now marked obsolete.
This file was a compatibility kludge which is no longer needed. This file was a compatibility kludge which is no longer needed.
@ -658,6 +664,13 @@ by the ElDoc library itself. Functions in
'eldoc-documentation-functions' don't need to worry about consulting 'eldoc-documentation-functions' don't need to worry about consulting
it when producing a doc string. it when producing a doc string.
** Shell
---
*** New command in 'shell-mode': 'narrow-to-prompt'.
This is bound to 'C-x n d' in 'shell-mode' buffers, and narrows to the
command line under point (and any following output).
** Eshell ** Eshell
--- ---
@ -726,6 +739,7 @@ key binding
/ s package-menu-filter-by-status / s package-menu-filter-by-status
/ v package-menu-filter-by-version / v package-menu-filter-by-version
/ m package-menu-filter-marked / m package-menu-filter-marked
/ u package-menu-filter-upgradable
/ / package-menu-filter-clear / / package-menu-filter-clear
--- ---
@ -818,6 +832,14 @@ current environment.
Its default value matches localized abbreviations of the "reply" Its default value matches localized abbreviations of the "reply"
prefix on the Subject line in various languages. prefix on the Subject line in various languages.
---
*** New user option 'shr-offer-extend-specpdl'.
If this is nil, rendering of HTML in the email message body that
requires to enlarge 'max-specpdl-size', the number of Lisp variable
bindings, will be aborted, and Emacs will not ask you whether to
enlarge 'max-specpdl-size' to complete the rendering. The default is
t, which preserves the original behavior.
** Apropos ** Apropos
*** New commands 'apropos-next-symbol' and 'apropos-previous-symbol'. *** New commands 'apropos-next-symbol' and 'apropos-previous-symbol'.
@ -1096,9 +1118,15 @@ custom rules, see the variables 'bug-reference-setup-from-vc-alist',
It's bound to the 'C-c C-c f' keystroke, and prompts for a local file It's bound to the 'C-c C-c f' keystroke, and prompts for a local file
name. name.
---
** Recentf ** Recentf
The recentf files are no longer backed up.
---
*** The recentf files are no longer backed up.
---
*** 'recentf-auto-cleanup' time string now repeats.
When 'recentf-auto-cleanup' is set to a time string, it now repeats
every day, rather than only running once after the mode is turned on.
** Calc ** Calc
@ -1141,6 +1169,13 @@ window after starting). This variable defaults to nil.
+++ +++
*** 'widget-choose' now supports menus in extended format. *** 'widget-choose' now supports menus in extended format.
---
*** The 'editable-list' widget now supports moving items up and down.
You can now move items up and down by deleting and then reinserting
them, using the DEL and INS buttons respectively. This is useful in
Custom buffers, for example, to change the order of the elements in a
list.
** Miscellaneous ** Miscellaneous
--- ---
@ -1155,6 +1190,8 @@ be done (and this restores how this previously worked).
*** New user option 'next-error-message-highlight'. *** New user option 'next-error-message-highlight'.
In addition to a fringe arrow, 'next-error' error may now optionally In addition to a fringe arrow, 'next-error' error may now optionally
highlight the current error message in the 'next-error' buffer. highlight the current error message in the 'next-error' buffer.
This user option can be also customized to keep highlighting on all
visited errors, so you can have an overview what errors were already visited.
+++ +++
*** New user option 'tab-first-completion'. *** New user option 'tab-first-completion'.
@ -1283,6 +1320,11 @@ never be narrower than 19 characters.
When the bookmark.el library is loaded, a customize choice is added When the bookmark.el library is loaded, a customize choice is added
to 'tab-bar-new-tab-choice' for new tabs to show the bookmark list. to 'tab-bar-new-tab-choice' for new tabs to show the bookmark list.
---
*** Movement commands in 'gomoku-mode' are fixed.
'gomoku-move-sw' and 'gomoku-move-ne' now work correctly, and
horizontal movements now stop at the edge of the board.
** xwidget-webkit mode ** xwidget-webkit mode
*** New xwidget commands. *** New xwidget commands.
@ -1403,9 +1445,11 @@ mode, as are other data files produced by Emacs.
It's a library to create, query, navigate and display hierarchy structures. It's a library to create, query, navigate and display hierarchy structures.
** New themes 'modus-vivendi' and 'modus-operandi'. ** New themes 'modus-vivendi' and 'modus-operandi'.
These themes are designed for colour-contrast accessibility. You can These themes are designed to conform with the highest standard for
load the new themes using 'M-x customize-themes' or 'load-theme' from color-contrast accessibility (WCAG AAA). You can load either of them
your init file. using 'M-x customize-themes' or 'load-theme' from your init file.
Consult the Modus Themes Info manual for more information on the user
options they provide.
* Incompatible Editing Changes in Emacs 28.1 * Incompatible Editing Changes in Emacs 28.1
@ -1466,6 +1510,11 @@ This is no longer supported, and setting this variable has no effect.
** The macro 'with-displayed-buffer-window' is now obsolete. ** The macro 'with-displayed-buffer-window' is now obsolete.
Use macro 'with-current-buffer-window' with action alist entry 'body-function'. Use macro 'with-current-buffer-window' with action alist entry 'body-function'.
+++
** `byte-compile-file' optional argument LOAD is now obsolete.
To load the file after byte-compiling, add a call to 'load' from Lisp
or use 'M-x emacs-lisp-byte-compile-and-load' interactively.
** The metamail.el library is now marked obsolete. ** The metamail.el library is now marked obsolete.
--- ---
@ -1702,6 +1751,16 @@ personalize the uniquified buffer name.
+++ +++
** 'inhibit-nul-byte-detection' is renamed to 'inhibit-null-byte-detection'. ** 'inhibit-nul-byte-detection' is renamed to 'inhibit-null-byte-detection'.
+++
** New byte-compiler check for missing dynamic variable declarations.
It is meant as an (experimental) aid for converting Emacs Lisp code
to lexical binding, where dynamic (special) variables bound in one
file can affect code in another. For details, see the manual section
'(Elisp) Converting to Lexical Binding'.
---
** 'unload-feature' now also tries to undo additions to buffer-local hooks.
* Changes in Emacs 28.1 on Non-Free Operating Systems * Changes in Emacs 28.1 on Non-Free Operating Systems

View file

@ -21,6 +21,10 @@ Temporary note:
When you add a new item, use the appropriate mark if you are sure it When you add a new item, use the appropriate mark if you are sure it
applies, and please also update docstrings as needed. applies, and please also update docstrings as needed.
** Tramp
*** The user option 'tramp-completion-reread-directory-timeout' is made obsolete.
* Installation Changes in Emacs 27.1 * Installation Changes in Emacs 27.1
@ -202,7 +206,7 @@ it won't work right without some adjustment:
Units that are ordered after 'emacs.service' will only be started Units that are ordered after 'emacs.service' will only be started
after Emacs has finished initialization and is ready for use, and after Emacs has finished initialization and is ready for use, and
Emacs needs to be built with systemd support. (If your Emacs is Emacs needs to be built with systemd support. (If your Emacs is
installed in a non-standard location and you copied the emacs.service installed in a non-standard location and you copied the "emacs.service"
file to e.g. "~/.config/systemd/user/", you will need to copy the new file to e.g. "~/.config/systemd/user/", you will need to copy the new
version of the file again.) version of the file again.)

View file

@ -181,6 +181,10 @@ Configure checks for the correct version, but this problem could occur
if a binary built against a shared libungif is run on a system with an if a binary built against a shared libungif is run on a system with an
older version. older version.
** SVG images may be cropped incorrectly with librsvg 2.45 and below.
Librsvg 2.46 and above have improved geometry code which Emacs is able
to take advantage of.
** Emacs aborts inside the function 'tparam1'. ** Emacs aborts inside the function 'tparam1'.
This can happen if Emacs was built without terminfo support, but the This can happen if Emacs was built without terminfo support, but the

View file

@ -19,15 +19,22 @@ EDIT oder ALT genannt). Folgende Abkürzungen werden verwendet:
<<Blank lines inserted here by startup of help-with-tutorial>> <<Blank lines inserted here by startup of help-with-tutorial>>
[Leerzeilen befinden sich hier aus didaktischen Gründen. Fortsetzung unten.] [Leerzeilen befinden sich hier aus didaktischen Gründen. Fortsetzung unten.]
>> Drücken Sie C-v, um zur nächsten Bildschirmseite vorzublättern. >> Drücken Sie C-v, um zur nächsten Bildschirmseite vorzublättern.
Ab jetzt sollten Sie das stets tun, wenn Sie eine Seite fertig Ab jetzt sollten Sie das stets tun, wenn Sie das untere
gelesen haben. Bildschirmende erreicht haben.
Beachten Sie bitte, dass beim Blättern die untersten zwei Zeilen der Beachten Sie bitte, dass beim Blättern die untersten zwei Zeilen der
vorigen Bildschirmseite als die zwei obersten Zeilen der neuen Seite vorigen Bildschirmseite als die zwei obersten Zeilen der neuen Seite
erscheinen, um eine gewisse Kontinuität während des Lesens zu erscheinen, um eine gewisse Kontinuität während des Lesens zu
ermöglichen. ermöglichen.
Was Sie gerade lesen, ist eine leicht angepasste Kopie der deutschen
Einführung. Später werden Sie aufgefordert, verschiedene Befehle
auszuführen, um den Text der Einführung zu ändern. Es spielt keine
Rolle, wenn Sie den Text schon vorher ändern sollten man nennt das
»editieren«, und genau dafür ist ein Editor wie Emacs da.
Wichtig: Sie können Emacs mit der Befehlsfolge C-x C-c beenden. Wichtig: Sie können Emacs mit der Befehlsfolge C-x C-c beenden.
Diese Einführung beenden Sie mit C-x k, gefolgt von der Eingabetaste.
Im weiteren wird die ESC-Taste mit <ESC> bezeichnet. Im weiteren wird die ESC-Taste mit <ESC> bezeichnet.
@ -41,7 +48,7 @@ Sie schon (C-v). Mit M-v blättern Sie eine Bildschirmseite zurück
(halten Sie die META-Taste gedrückt und geben Sie v ein, oder drücken (halten Sie die META-Taste gedrückt und geben Sie v ein, oder drücken
Sie zuerst <ESC> und anschließend v). Sie zuerst <ESC> und anschließend v).
>> Probieren Sie einige Male M-v und C-v aus. >> Probieren Sie einige Male M-v und C-v aus.
[Auf den meisten Tastaturen bewirkt die PgUp-Taste (»page up«, auch [Auf den meisten Tastaturen bewirkt die PgUp-Taste (»page up«, auch
mit »Bild« und einem Aufwärtspfeil beschriftet) dasselbe wie M-v bzw. mit »Bild« und einem Aufwärtspfeil beschriftet) dasselbe wie M-v bzw.
@ -277,14 +284,14 @@ Wert, signalisiert dem Befehl, etwas anderes zu tun.
C-v und M-v sind weitere Ausnahmen. Gibt man diesen Befehlen einen C-v und M-v sind weitere Ausnahmen. Gibt man diesen Befehlen einen
Parameter n, dann verschieben sie den Bildschirminhalt nicht um eine Parameter n, dann verschieben sie den Bildschirminhalt nicht um eine
ganze Bildschirmseite, sondern um n Zeilen. Beispiel: C-u 4 C-v ganze Bildschirmseite, sondern um n Zeilen. Beispiel: C-u 8 C-v
verschiebt den Bildschirminhalt um vier Zeilen. verschiebt den dargestellten Text um acht Zeilen.
>> Versuchen Sie jetzt C-u 8 C-v auszuführen. >> Versuchen Sie jetzt C-u 8 C-v auszuführen.
Der Bildschirminhalt sollte jetzt um acht Zeilen nach oben verschoben Der Text sollte jetzt um acht Zeilen nach oben verschoben sein.
sein. Wollen Sie ihn nach unten verschieben, dann geben Sie M-v mit Wollen Sie ihn nach unten verschieben, dann geben Sie M-v mit einem
einem numerischen Argument ein. numerischen Argument ein.
Wenn Sie eine graphische Oberfläche wie X oder MS-Windows verwenden, Wenn Sie eine graphische Oberfläche wie X oder MS-Windows verwenden,
dann befindet sich ein schmaler, langgezogener rechteckiger Bereich dann befindet sich ein schmaler, langgezogener rechteckiger Bereich
@ -411,12 +418,12 @@ Fortsetzungszeile.
>> Geben Sie <Return> ein, um wieder ein Zeilenvorschubzeichen >> Geben Sie <Return> ein, um wieder ein Zeilenvorschubzeichen
einzufügen. einzufügen.
Die <Return>-Taste ist insofern besonders, als dass sie mehr bewirken Die <Return>-Taste ist besonders, da sie mehr bewirken kann als
kann, als einfach ein Zeilenvorschubszeichen einzufügen. Abhängig vom einfach ein Zeilenvorschubzeichen einfügen. Abhängig vom umgebenden
umgebenden Text können zusätzliche Leerzeichen eingefügt werden, damit Text können zusätzliche Leerzeichen eingefügt werden, damit der neue
der neue Zeilenanfang bündig zur vorherigen Zeile ist. Wir nennen Zeilenanfang bündig zur vorherigen Zeile ist. Wir nennen dieses
dieses Verhalten (wenn das Drücken einer Taste mehr bewirkt, als nur Verhalten (wenn das Drücken einer Taste mehr bewirkt, als nur das
das entsprechende Zeichen einzufügen) »electric«. entsprechende Zeichen einzufügen) »electric«.
>> Ein Beispiel für dieses Verhalten von <Return>. >> Ein Beispiel für dieses Verhalten von <Return>.
Drücken Sie <Return> am Ende dieser Zeile. Drücken Sie <Return> am Ende dieser Zeile.
@ -468,7 +475,7 @@ gelöschten Text, damit Sie ihn bei Bedarf wieder zurückholen können.
Einfügen von bereits gelöschtem Text wird im englischen Dokumentation Einfügen von bereits gelöschtem Text wird im englischen Dokumentation
von Emacs als »yanking« (wörtlich »herausreißen«) bezeichnet. Sie von Emacs als »yanking« (wörtlich »herausreißen«) bezeichnet. Sie
können den gelöschten Text an einer beliebigen Stelle wieder können den gelöschten Text an einer beliebigen Stelle wieder
einzufügen. Solange Sie nichts neues löschen, steht Ihnen dieser einfügen. Solange Sie nichts neues löschen, steht Ihnen dieser
gelöschte Textteil immer wieder zu Verfügung. Der Befehl dazu ist C-y gelöschte Textteil immer wieder zu Verfügung. Der Befehl dazu ist C-y
(das Ypsilon steht für »yank«). (das Ypsilon steht für »yank«).
@ -584,9 +591,11 @@ Anzahl der notwendigen C-/-Befehle zu reduzieren.
>> Löschen Sie diese Zeilen mit C-k und drücken Sie anschließend >> Löschen Sie diese Zeilen mit C-k und drücken Sie anschließend
mehrmals C-/, und die Zeilen erscheinen wieder. mehrmals C-/, und die Zeilen erscheinen wieder.
Alternative Tastenkombinationen für C-/ sind C-_ und C-x u. Ein Alternative Tastenkombinationen für C-/ sind C-_ und C-x u (in manchen
numerisches Argument für C-/, C-_ oder C-x u wird als Terminals funktioniert C-_ auch ohne SHIFT-Taste). Wählen Sie das
Wiederholungszähler interpretiert. aus, was am bequemsten für Sie zu tippen ist. Ein numerisches
Argument für C-/, C-_ oder C-x u wird als Wiederholungszähler
interpretiert.
Der Unterschied zwischen der Undo-Funktion und dem oben erklärten C-y Der Unterschied zwischen der Undo-Funktion und dem oben erklärten C-y
ist, dass erstere gelöschten Text an exakt der gleichen Position wie ist, dass erstere gelöschten Text an exakt der gleichen Position wie
@ -668,10 +677,7 @@ Name besteht aus dem Originalnamen plus einer angehängten Tilde »~«
Namenserweiterung durch ».bak« ersetzt]. Namenserweiterung durch ».bak« ersetzt].
Emacs schreibt den Namen der gesicherten Datei in die unterste Zeile, Emacs schreibt den Namen der gesicherten Datei in die unterste Zeile,
sobald C-x C-s fertig ausgeführt ist. Sie sollten den editierten Text sobald C-x C-s fertig ausgeführt ist.
oft speichern, damit nicht allzuviel bei einem etwaigen Systemabsturz
verloren geht (siehe auch den Abschnitt »AUTOMATISCHES SPEICHERN«
weiter unten).
>> Geben Sie >> Geben Sie
@ -715,12 +721,11 @@ ein.
>> Probieren Sie jetzt C-x C-b. >> Probieren Sie jetzt C-x C-b.
Beachten Sie, dass jeder Puffer einen Namen hat und manche auch mit Beachten Sie, dass manche Puffer keine zugehörige Datei haben,
dem Namen einer Datei assoziiert sind, dessen Inhalt sie enthalten. z.B. der mit dem Namen »*Buffer List*«. Er wurde von dem Befehl C-x
Manche Puffer aber haben keinen zugehörige Datei, z.B. der mit dem C-b erzeugt, um die Pufferliste darzustellen. JEDER Text, den Sie
Namen »*Buffer List*«. Er wurde von dem Befehl C-x C-b erzeugt, um innerhalb Emacs in einem Fenster sehen, ist immer ein Ausschnitt eines
die Pufferliste darzustellen. JEDER Text, den Sie innerhalb Emacs in Puffers.
einem Fenster sehen, ist immer ein Ausschnitt eines Puffers.
>> Geben Sie jetzt C-x 1 ein, um die Pufferliste wieder verschwinden >> Geben Sie jetzt C-x 1 ein, um die Pufferliste wieder verschwinden
zu lassen. zu lassen.
@ -748,13 +753,11 @@ den Verzeichnispräfix), jedoch nicht immer. Die von C-x C-b erzeugte
Pufferliste zeigt stets die Namen aller Puffer mit den Pufferliste zeigt stets die Namen aller Puffer mit den
korrespondierenden Dateinamen. korrespondierenden Dateinamen.
JEDER Text in Emacs ist Teil eines Puffers, aber nicht jeder Puffer Wie schon erwähnt, ist JEDER Text in Emacs Teil eines Puffers, aber
entspricht einer Datei. So ist z.B. der Puffer »*Buffer List*« mit nicht jeder Puffer entspricht einer Datei. Auch dieser
keiner Datei assoziiert -- er wurde direkt von dem Befehl C-x C-b »TUTORIAL.de«-Puffer war anfangs keiner Datei zugeordnet, jetzt
erzeugt. Auch dieser »TUTORIAL.de«-Puffer war anfangs keiner Datei allerdings schon, denn Sie haben im letzten Abschnitt den Befehl C-x
zugeordnet, jetzt allerdings schon, denn Sie haben im letzten C-s eingegeben und so den Pufferinhalt als Datei gespeichert.
Abschnitt den Befehl C-x C-s eingegeben und so den Pufferinhalt als
Datei gespeichert.
Der Puffer »*Messages*« hat ebenfalls keine Entsprechung als Datei; er Der Puffer »*Messages*« hat ebenfalls keine Entsprechung als Datei; er
enthält alle Mitteilungen, die in der untersten Zeile während des enthält alle Mitteilungen, die in der untersten Zeile während des
@ -774,10 +777,10 @@ Datei permanent abzuspeichern. Es wäre äußerst umständlich, müsste
man jedesmal C-x C-f eingeben, um den Puffer dann mit C-x C-s man jedesmal C-x C-f eingeben, um den Puffer dann mit C-x C-s
abzuspeichern. Daher gibt es den Befehl abzuspeichern. Daher gibt es den Befehl
C-x s (sichere mehrere Puffer) C-x s (sichere mehrere Puffer in Dateien)
Dieser Befehl fragt Sie bei jedem Puffer, der Änderungen enthält, ob Dieser Befehl fragt Sie bei jedem einer Datei zugeordneten Puffer, der
Sie ihn speichern wollen. Änderungen enthält, ob Sie ihn in der Datei speichern wollen.
>> Fügen Sie eine Textzeile ein und drücken Sie dann C-x s. >> Fügen Sie eine Textzeile ein und drücken Sie dann C-x s.
Emacs fragt Sie jetzt, ob Sie einen Puffer mit dem Namen Emacs fragt Sie jetzt, ob Sie einen Puffer mit dem Namen
@ -824,15 +827,15 @@ zu Emacs zurückzukehren.
Der beste Zeitpunkt für C-x C-c ist, wenn Sie sich ausloggen Der beste Zeitpunkt für C-x C-c ist, wenn Sie sich ausloggen
(bzw. Ihren Computer ausschalten); Sie sollten Emacs ebenfalls (bzw. Ihren Computer ausschalten); Sie sollten Emacs ebenfalls
beenden, wenn Sie Emacs von einem anderen Programm aus aufgerufen beenden, wenn Sie Emacs von einem anderen Programm aus kurzzeitig
haben (z.B. einem Programm, das E-mails liest). aufgerufen haben (z.B. einem Programm, das E-Mails liest).
Hier ist eine Liste aller C-x-Befehle, die Sie bereits kennengelernt Hier ist eine Liste aller C-x-Befehle, die Sie bereits kennengelernt
haben: haben:
C-x C-f lade Datei C-x C-f lade Datei
C-x C-s sichere Datei C-x C-s sichere Puffer in Datei
C-x s sichere einige Puffer C-x s sichere einige Puffer in zugehörige Dateien
C-x C-b zeige Pufferliste an C-x C-b zeige Pufferliste an
C-x b wechsle zu Puffer C-x b wechsle zu Puffer
C-x C-c beende Emacs C-x C-c beende Emacs
@ -840,10 +843,10 @@ haben:
C-x u widerrufen C-x u widerrufen
Ein Beispiel für einen Befehl mit langen Namen ist replace-string, der Ein Beispiel für einen Befehl mit langen Namen ist replace-string, der
global (also in der ganzen Datei bzw. Puffer) eine Zeichenkette durch in der ganzen Datei bzw. Puffer eine Zeichenkette durch eine andere
eine andere ersetzt. Wenn Sie M-x drücken, dann fragt Sie Emacs in ersetzt. Wenn Sie M-x drücken, dann fragt Sie Emacs in der untersten
der untersten Bildschirmzeile nach dem Namen des Befehls (in diesem Bildschirmzeile nach dem Namen des Befehls (in diesem Fall
Fall »replace-string«). Geben Sie jetzt »repl s<TAB>« ein und Emacs »replace-string«). Geben Sie jetzt »repl s<TAB>« ein und Emacs
vervollständigt den Namen. Schließen Sie die Eingabe mit <Return> ab. vervollständigt den Namen. Schließen Sie die Eingabe mit <Return> ab.
[<TAB> bezeichnet die Tabulatortaste.] [<TAB> bezeichnet die Tabulatortaste.]
@ -855,7 +858,7 @@ vervollständigt den Namen. Schließen Sie die Eingabe mit <Return> ab.
ein und kehren Sie mit C-u C-SPC an diese Position zurück. ein und kehren Sie mit C-u C-SPC an diese Position zurück.
Beachten Sie wie diese Bildschirmzeile jetzt aussieht: Sie haben Beachten Sie wie diese Bildschirmzeile jetzt aussieht: Sie haben
den Wortteil B-i-l-d-s-c-h-i-r-m durch »Text« ersetzt (und zwar im den Wortteil »Bildschirm« durch »Text« ersetzt (und zwar im
ganzen Dokument beginnend von der Cursorposition). ganzen Dokument beginnend von der Cursorposition).
>> Drücken Sie jetzt C-x u, um diese Änderungen auf einmal rückgängig >> Drücken Sie jetzt C-x u, um diese Änderungen auf einmal rückgängig
@ -878,8 +881,8 @@ Stürzt der Rechner einmal wirklich ab, können Sie die Änderungen, die
beim letzten Auto-Save gespeichert worden sind, folgendermaßen beim letzten Auto-Save gespeichert worden sind, folgendermaßen
wiederherstellen: Laden Sie die Datei auf normalem Wege (die Datei, wiederherstellen: Laden Sie die Datei auf normalem Wege (die Datei,
die Sie bearbeitet haben, nicht die Auto-Save-Datei) und geben Sie die Sie bearbeitet haben, nicht die Auto-Save-Datei) und geben Sie
dann »M-x recover-file <Return>« ein. Wenn Emacs Sie um Bestätigung dann »M-x recover-this-file <Return>« ein. Wenn Emacs Sie um
fragt, antworten Sie mit »yes <Return>«, um den Inhalt der Bestätigung fragt, antworten Sie mit »yes <Return>«, um den Inhalt der
Auto-Save-Datei zu übernehmen. Auto-Save-Datei zu übernehmen.
@ -979,6 +982,7 @@ jeweils ein bisschen anders.
Dokumentation zum derzeit aktuellen Hauptmodus bekommen Sie mit C-h m. Dokumentation zum derzeit aktuellen Hauptmodus bekommen Sie mit C-h m.
>> Bewegen Sie den Cursor zur nächsten Zeile.
>> Drücken Sie C-l C-l, um diese Zeile an den oberen Bildschirmrand zu >> Drücken Sie C-l C-l, um diese Zeile an den oberen Bildschirmrand zu
bringen. bringen.
>> Lesen Sie nun mittels C-h m die englische Dokumentation zum >> Lesen Sie nun mittels C-h m die englische Dokumentation zum
@ -1129,13 +1133,13 @@ Rechteck dargestellt). Alle normalen Editierbefehle betreffen das
Fenster, in dem sich der Cursor befindet. Wir nennen dieses Fenster Fenster, in dem sich der Cursor befindet. Wir nennen dieses Fenster
»ausgewählt« (»selected window«). »ausgewählt« (»selected window«).
Der Befehl M-C-v ist sehr nützlich, wenn man Text in einem Fenster Der Befehl C-M-v ist sehr nützlich, wenn man Text in einem Fenster
editiert und das andere Fenster als Referenz verwendet. Ohne das editiert und das andere Fenster als Referenz verwendet. Ohne das
momentante Arbeitsfenster verlassen zu müssen, kann man mit M-C-v im momentante Arbeitsfenster verlassen zu müssen, kann man mit C-M-v im
anderen Fenster bequem vorwärtsblättern. anderen Fenster bequem vorwärtsblättern.
M-C-v ist ein Beispiel eines CONTROL-META-Zeichens. Haben Sie eine C-M-v ist ein Beispiel eines CONTROL-META-Zeichens. Haben Sie eine
META-Taste, dann kann man M-C-v erzeugen, indem man CTRL und META META-Taste, dann kann man C-M-v erzeugen, indem man CTRL und META
gleichzeitig niedergedrückt hält, während man v eintippt. Es ist gleichzeitig niedergedrückt hält, während man v eintippt. Es ist
egal, ob zuerst CTRL oder META niedergedrückt wird, da beide Tasten egal, ob zuerst CTRL oder META niedergedrückt wird, da beide Tasten
gleichberechtigt das jeweils einzugebende Zeichen modifizieren. gleichberechtigt das jeweils einzugebende Zeichen modifizieren.
@ -1146,10 +1150,10 @@ gefolgt von CTRL-v. CTRL-ESC v funktioniert nicht! Der Grund dafür
ist, dass ESC ein eigenes Zeichen ist und keine Modifizier-Taste wie ist, dass ESC ein eigenes Zeichen ist und keine Modifizier-Taste wie
META oder CTRL. META oder CTRL.
Der umgekehrte Befehl zu M-C-v ist M-C-S-v, um im anderen Fenster Der umgekehrte Befehl zu C-M-v ist C-M-S-v, um im anderen Fenster
rückwärts zu blättern (d.h., Sie müssen die META-Taste sowie die rückwärts zu blättern (d.h., Sie müssen die CONTROL-Taste sowie die
CONTROL- und SHIFT-Taste zusammen mit »v« betätigen) -- jetzt werden META- und SHIFT-Taste zusammen mit »v« betätigen) -- jetzt werden Sie
Sie wahrscheinlich verstehen, warum manche Kritiker das Wort Emacs als wahrscheinlich verstehen, warum manche Kritiker das Wort Emacs als
Abkürzung von Escape-Meta-Alt-Control-Shift betrachten. Leider Abkürzung von Escape-Meta-Alt-Control-Shift betrachten. Leider
funktioniert diese Befehlsfolge normalerweise nur mit graphischen funktioniert diese Befehlsfolge normalerweise nur mit graphischen
Oberflächen, da C-v von C-S-v auf den meisten Textterminals nicht Oberflächen, da C-v von C-S-v auf den meisten Textterminals nicht
@ -1196,7 +1200,7 @@ Textterminal kann genau ein Rahmen dargestellt werden.
>> Geben Sie >> Geben Sie
M-x make-frame <Return> C-x 5 2
ein, um einen neuen Rahmen zu erzeugen. ein, um einen neuen Rahmen zu erzeugen.
@ -1206,7 +1210,7 @@ gleichwertig.
>> Geben Sie >> Geben Sie
M-x delete-frame <Return> C-x 5 0
ein, um den ausgewählten Rahmen zu entfernen. ein, um den ausgewählten Rahmen zu entfernen.
@ -1343,7 +1347,7 @@ zwar für die Tastatur- und Bildschirmkodierung.]
Wir haben uns bemüht, in dieser Einführung genau soviel Information zu Wir haben uns bemüht, in dieser Einführung genau soviel Information zu
geben, dass Sie beginnen können, mit Emacs zu arbeiten. Emacs ist geben, dass Sie beginnen können, mit Emacs zu arbeiten. Emacs ist
jedoch so mächtig und umfangreich, dass es den Rahmen einer Einführung jedoch so mächtig und umfangreich, dass es den Rahmen einer Einführung
spränge, an dieser Stelle mehr zu erklären. Um Sie im weiteren sprengte, an dieser Stelle mehr zu erklären. Um Sie im weiteren
Lernverlauf zu unterstützen, stellt Emacs eine Reihe von Lernverlauf zu unterstützen, stellt Emacs eine Reihe von
Hilfe-Funktionen zu Verfügung, die alle mit dem Präfix C-h (dem Hilfe-Funktionen zu Verfügung, die alle mit dem Präfix C-h (dem
Hilfe-Zeichen, »Help character«) beginnen. Hilfe-Zeichen, »Help character«) beginnen.
@ -1424,18 +1428,44 @@ zugehörigen langen Namen, find-file.
>> Schließen Sie das Hilfefenster mit C-x 1. >> Schließen Sie das Hilfefenster mit C-x 1.
C-h i Dieser Befehl öffnet einen speziellen Puffer, um C-h i Dieser Befehl öffnet einen speziellen Puffer »*info*«,
Handbücher zu lesen (im »Info«-Format), die auf dem um Handbücher zu lesen (im »Info«-Format), die auf dem
verwendeten Computersystem installiert sind. Geben verwendeten Computersystem installiert sind. Geben
Sie z.B. m emacs <Return> ein, um das Emacs-Handbuch Sie z.B. m emacs <Return> ein, um das Emacs-Handbuch
zu lesen. Haben Sie »Info« noch nie benutzt, tippen zu lesen. Haben Sie »Info« noch nie benutzt, tippen
Sie ?, und Emacs führt Sie Schritt für Schritt durch Sie h, und Emacs führt Sie Schritt für Schritt durch
die Möglichkeiten des Info-Modus. Wenn Sie diese die Möglichkeiten des Info-Modus. Wenn Sie diese
Einführung fertiggelesen haben, sollten Sie das Einführung fertiggelesen haben, sollten Sie das
Info-Handbuch für Emacs als primäre Dokumentation Info-Handbuch für Emacs als primäre Dokumentation
benutzen. benutzen.
* MEHR FEATURES
---------------
Sie können mehr über Emacs lernen, in dem Sie das Handbuch lesen,
entweder in der gedruckten Form oder innerhalb von Emacs (benützen Sie
dazu das Hilfe-Menu oder tippen Sie C-h r). Zwei besonders nützliche
Features sind Vervollständigung, um weniger tippen zu müssen, und
Dired, um das Laden von Dateien zu vereinfachen.
Das Vervollständigungs-Feature ist eine Methode, um unnötiges Eingeben
von Zeichen zu vermeiden. Wenn Sie beispielsweise zum
»*Messages*«-Puffer umschalten wollen, genügt C-x b *M<TAB>, und Emacs
ergänzt automatisch den Namen des Puffers, soweit das anhand der
bisherigen Eingabe möglich ist. Vervollständigung funktioniert auch
für Befehls- und Dateinamen. Eine genaue Beschreibung finden Sie im
Abschnitt »Completion« des Emacs-Handbuchs.
Dired ermöglicht es, Dateien eines Verzeichnisses (auf Wunsch
inklusive seiner Unterverzeichnisse) aufzulisten, sich innerhalb der
Liste zu bewegen, Dateien zu besuchen, umzubenennen, zu löschen u.a.
Eine genaue Beschreibung finden Sie im Abschnitt »Dired« des
Emacs-Handbuchs.
Viele weitere Features sind ebenfalls im Handbuch beschrieben.
* SCHLUSSBEMERKUNG * SCHLUSSBEMERKUNG
------------------ ------------------

View file

@ -917,7 +917,7 @@ que vous recherchez. <Entrée> termine une recherche.
Avez-vous vu ce qui se passait ? Emacs, dans une recherche Avez-vous vu ce qui se passait ? Emacs, dans une recherche
incrémentale, essaie d'aller sur l'occurrence de la chaîne que vous incrémentale, essaie d'aller sur l'occurrence de la chaîne que vous
avec tapée jusqu'à cet instant. Pour aller sur l'occurrence suivante de avez tapée jusqu'à cet instant. Pour aller sur l'occurrence suivante de
« curseur », il suffit de refaire C-s : s'il ne trouve rien, Emacs « curseur », il suffit de refaire C-s : s'il ne trouve rien, Emacs
bippe et vous indique que la recherche a échoué. C-g permet également bippe et vous indique que la recherche a échoué. C-g permet également
de mettre fin à la recherche. de mettre fin à la recherche.

View file

@ -556,4 +556,10 @@ $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
$(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \ $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
$(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-align.elc
# https://debbugs.gnu.org/43037
# js.elc (like all modes using CC Mode's compile time macros) needs to
# be compiled under the same version of CC Mode it will run with.
$(lisp)/progmodes/js.elc: $(lisp)/progmodes/cc-defs.elc \
$(lisp)/progmodes/cc-engine.elc $(lisp)/progmodes/cc-mode.elc
# Makefile ends here. # Makefile ends here.

View file

@ -414,11 +414,17 @@ this."
;; if the rest of the region should have a face, put it there ;; if the rest of the region should have a face, put it there
(funcall ansi-color-apply-face-function (funcall ansi-color-apply-face-function
start-marker end-marker (ansi-color--find-face codes)) start-marker end-marker (ansi-color--find-face codes))
(setq ansi-color-context-region (if codes (list codes))))) ;; Save a restart position when there are codes active. It's
;; convenient for man.el's process filter to pass `begin'
;; positions that overlap regions previously colored; these
;; `codes' should not be applied to that overlap, so we need
;; to know where they should really start.
(setq ansi-color-context-region (if codes (list codes end-marker)))))
;; Clean up our temporary markers. ;; Clean up our temporary markers.
(unless (eq start-marker (cadr ansi-color-context-region)) (unless (eq start-marker (cadr ansi-color-context-region))
(set-marker start-marker nil)) (set-marker start-marker nil))
(set-marker end-marker nil))) (unless (eq end-marker (cadr ansi-color-context-region))
(set-marker end-marker nil))))
(defun ansi-color-apply-overlay-face (beg end face) (defun ansi-color-apply-overlay-face (beg end face)
"Make an overlay from BEG to END, and apply face FACE. "Make an overlay from BEG to END, and apply face FACE.

View file

@ -51,17 +51,17 @@
;; ARCHIVE TYPES: Currently only the archives below are handled, but the ;; ARCHIVE TYPES: Currently only the archives below are handled, but the
;; structure for handling just about anything is in place. ;; structure for handling just about anything is in place.
;; ;;
;; Arc Lzh Zip Zoo Rar 7z Ar ;; Arc Lzh Zip Zoo Rar 7z Ar Squashfs
;; -------------------------------------------------- ;; ---------------------------------------------------------------
;; View listing Intern Intern Intern Intern Y Y Y ;; View listing Intern Intern Intern Intern Y Y Y Y
;; Extract member Y Y Y Y Y Y Y ;; Extract member Y Y Y Y Y Y Y Y
;; Save changed member Y Y Y Y N Y Y ;; Save changed member Y Y Y Y N Y Y N
;; Add new member N N N N N N N ;; Add new member N N N N N N N N
;; Delete member Y Y Y Y N Y N ;; Delete member Y Y Y Y N Y N N
;; Rename member Y Y N N N N N ;; Rename member Y Y N N N N N N
;; Chmod - Y Y - N N N ;; Chmod - Y Y - N N N N
;; Chown - Y - - N N N ;; Chown - Y - - N N N N
;; Chgrp - Y - - N N N ;; Chgrp - Y - - N N N N
;; ;;
;; Special thanks to Bill Brodie <wbrodie@panix.com> for very useful tips ;; Special thanks to Bill Brodie <wbrodie@panix.com> for very useful tips
;; on the first released version of this package. ;; on the first released version of this package.
@ -370,6 +370,24 @@ file. Archive and member name will be added."
:inline t :inline t
(string :format "%v")))) (string :format "%v"))))
;; ------------------------------
;; Squashfs archive configuration
(defgroup archive-squashfs nil
"Squashfs-specific options to archive."
:group 'archive)
(defcustom archive-squashfs-extract '("rdsquashfs" "-c")
"Program and its options to run in order to extract a squashsfs file member.
Extraction should happen to standard output. Archive and member name will
be added."
:type '(list (string :tag "Program")
(repeat :tag "Options"
:inline t
(string :format "%v")))
:version "28.1"
:group 'archive-squashfs)
;; ------------------------------------------------------------------------- ;; -------------------------------------------------------------------------
;;; Section: Variables ;;; Section: Variables
@ -741,6 +759,7 @@ archive.
(re-search-forward "Rar!" (+ (point) 100000) t)) (re-search-forward "Rar!" (+ (point) 100000) t))
'rar-exe) 'rar-exe)
((looking-at "7z\274\257\047\034") '7z) ((looking-at "7z\274\257\047\034") '7z)
((looking-at "hsqs") 'squashfs)
(t (error "Buffer format not recognized"))))) (t (error "Buffer format not recognized")))))
;; ------------------------------------------------------------------------- ;; -------------------------------------------------------------------------
@ -2280,6 +2299,85 @@ NAME is expected to be the 16-bytes part of an ar record."
descr descr
'("ar" "r"))) '("ar" "r")))
;; -------------------------------------------------------------------------
;;; Section Squashfs archives.
(defun archive-squashfs-summarize (&optional file)
(unless file
(setq file buffer-file-name))
(let ((copy (file-local-copy file))
(files ()))
(with-temp-buffer
(call-process "unsquashfs" nil t nil "-ll" (or file copy))
(when copy
(delete-file copy))
(goto-char (point-min))
(search-forward-regexp "[drwxl\\-]\\{10\\}")
(beginning-of-line)
(while (looking-at (concat
"^\\(.[rwx\\-]\\{9\\}\\) " ;Mode
"\\(.+\\)/\\(.+\\) " ;user/group
"\\(.+\\) " ;size
"\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\) " ;date
"\\([0-9]\\{2\\}:[0-9]\\{2\\}\\) " ;time
"\\(.+\\)\n")) ;Filename
(let* ((name (match-string 7))
(flags (match-string 1))
(uid (match-string 2))
(gid (match-string 3))
(size (string-to-number (match-string 4)))
(date (match-string 5))
(time (match-string 6))
(date-time)
(mode))
;; Only list directory and regular files
(when (or (eq (aref flags 0) ?d)
(eq (aref flags 0) ?-))
(when (equal name "squashfs-root")
(setf name "/"))
;; Remove 'squashfs-root/' from filenames.
(setq name (string-replace "squashfs-root/" "" name))
(setq date-time (concat date " " time))
(setq mode (logior
(cond
((eq (aref flags 0) ?d) #o40000)
(t 0))
;; Convert symbolic to octal representation.
(file-modes-symbolic-to-number
(concat
"u=" (string-replace "-" "" (substring flags 1 4))
",g=" (string-replace "-" "" (substring flags 4 7))
",o=" (string-replace "-" ""
(substring flags 7 10))))))
(push (archive--file-desc name name mode size
date-time :uid uid :gid gid)
files)))
(goto-char (match-end 0))))
(archive--summarize-descs (nreverse files))))
(defun archive-squashfs-extract-by-stdout (archive name command
&optional stderr-test)
(let ((stderr-file (make-temp-file "arc-stderr")))
(unwind-protect
(prog1
(apply #'call-process
(car command)
nil
(if stderr-file (list t stderr-file) t)
nil
(append (cdr command) (list name archive)))
(with-temp-buffer
(insert-file-contents stderr-file)
(goto-char (point-min))
(when (if (stringp stderr-test)
(not (re-search-forward stderr-test nil t))
(> (buffer-size) 0))
(message "%s" (buffer-string)))))
(if (file-exists-p stderr-file)
(delete-file stderr-file)))))
(defun archive-squashfs-extract (archive name)
(archive-squashfs-extract-by-stdout archive name archive-squashfs-extract))
;; ------------------------------------------------------------------------- ;; -------------------------------------------------------------------------
;; This line was a mistake; it is kept now for compatibility. ;; This line was a mistake; it is kept now for compatibility.

View file

@ -32,6 +32,7 @@
;;; Code: ;;; Code:
(require 'pp) (require 'pp)
(require 'tabulated-list)
(require 'text-property-search) (require 'text-property-search)
(eval-when-compile (require 'cl-lib)) (eval-when-compile (require 'cl-lib))
@ -126,16 +127,16 @@ recently set ones come first, oldest ones come last)."
(defconst bookmark-bmenu-buffer "*Bookmark List*" (defconst bookmark-bmenu-buffer "*Bookmark List*"
"Name of buffer used for Bookmark List.") "Name of buffer used for Bookmark List.")
(defcustom bookmark-bmenu-use-header-line t (defvar bookmark-bmenu-use-header-line t
"Non-nil means to use an immovable header line. "Non-nil means to use an immovable header line.
This is as opposed to inline text at the top of the buffer." This is as opposed to inline text at the top of the buffer.")
:version "24.4" (make-obsolete-variable 'bookmark-bmenu-use-header-line "no longer used." "28.1")
:type 'boolean)
(defconst bookmark-bmenu-inline-header-height 2 (defconst bookmark-bmenu-inline-header-height 2
"Number of lines used for the *Bookmark List* header. "Number of lines used for the *Bookmark List* header.
\(This is only significant when `bookmark-bmenu-use-header-line' \(This is only significant when `bookmark-bmenu-use-header-line'
is nil.)") is nil.)")
(make-obsolete-variable 'bookmark-bmenu-inline-header-height "no longer used." "28.1")
(defconst bookmark-bmenu-marks-width 2 (defconst bookmark-bmenu-marks-width 2
"Number of columns (chars) used for the *Bookmark List* marks column. "Number of columns (chars) used for the *Bookmark List* marks column.
@ -165,6 +166,7 @@ A non-nil value may result in truncated bookmark names."
"Time before `bookmark-bmenu-search' updates the display." "Time before `bookmark-bmenu-search' updates the display."
:type 'number) :type 'number)
;; FIXME: No longer used. Should be declared obsolete or removed.
(defface bookmark-menu-heading (defface bookmark-menu-heading
'((t (:inherit font-lock-type-face))) '((t (:inherit font-lock-type-face)))
"Face used to highlight the heading in bookmark menu buffers." "Face used to highlight the heading in bookmark menu buffers."
@ -976,7 +978,7 @@ Lines beginning with `#' are ignored."
(when from-bookmark-list (when from-bookmark-list
(pop-to-buffer (get-buffer bookmark-bmenu-buffer)) (pop-to-buffer (get-buffer bookmark-bmenu-buffer))
(goto-char (point-min)) (goto-char (point-min))
(text-property-search-forward 'bookmark-name-prop bookmark-name)) (bookmark-bmenu-bookmark))
(kill-buffer old-buffer))) (kill-buffer old-buffer)))
@ -1587,7 +1589,7 @@ unique numeric suffixes \"<2>\", \"<3>\", etc."
(defvar bookmark-bmenu-mode-map (defvar bookmark-bmenu-mode-map
(let ((map (make-keymap))) (let ((map (make-keymap)))
(set-keymap-parent map special-mode-map) (set-keymap-parent map tabulated-list-mode-map)
(define-key map "v" 'bookmark-bmenu-select) (define-key map "v" 'bookmark-bmenu-select)
(define-key map "w" 'bookmark-bmenu-locate) (define-key map "w" 'bookmark-bmenu-locate)
(define-key map "5" 'bookmark-bmenu-other-frame) (define-key map "5" 'bookmark-bmenu-other-frame)
@ -1607,8 +1609,6 @@ unique numeric suffixes \"<2>\", \"<3>\", etc."
(define-key map "d" 'bookmark-bmenu-delete) (define-key map "d" 'bookmark-bmenu-delete)
(define-key map "D" 'bookmark-bmenu-delete-all) (define-key map "D" 'bookmark-bmenu-delete-all)
(define-key map " " 'next-line) (define-key map " " 'next-line)
(define-key map "n" 'next-line)
(define-key map "p" 'previous-line)
(define-key map "\177" 'bookmark-bmenu-backup-unmark) (define-key map "\177" 'bookmark-bmenu-backup-unmark)
(define-key map "u" 'bookmark-bmenu-unmark) (define-key map "u" 'bookmark-bmenu-unmark)
(define-key map "U" 'bookmark-bmenu-unmark-all) (define-key map "U" 'bookmark-bmenu-unmark-all)
@ -1676,6 +1676,30 @@ Don't affect the buffer ring order."
(save-window-excursion (save-window-excursion
(bookmark-bmenu-list))))) (bookmark-bmenu-list)))))
(defun bookmark-bmenu--revert ()
"Re-populate `tabulated-list-entries'."
(let (entries)
(dolist (full-record (bookmark-maybe-sort-alist))
(let* ((name (bookmark-name-from-full-record full-record))
(annotation (bookmark-get-annotation full-record))
(location (bookmark-location full-record)))
(push (list
full-record
`[,(if (and annotation (not (string-equal annotation "")))
"*" "")
,(if (display-mouse-p)
(propertize name
'font-lock-face 'bookmark-menu-bookmark
'mouse-face 'highlight
'follow-link t
'help-echo "mouse-2: go to this bookmark in other window")
name)
,@(if bookmark-bmenu-toggle-filenames
(list location))])
entries)))
(tabulated-list-init-header)
(setq tabulated-list-entries entries))
(tabulated-list-print t))
;;;###autoload ;;;###autoload
(defun bookmark-bmenu-get-buffer () (defun bookmark-bmenu-get-buffer ()
@ -1702,70 +1726,18 @@ deletion, or > if it is flagged for displaying."
(if (called-interactively-p 'interactive) (if (called-interactively-p 'interactive)
(switch-to-buffer buf) (switch-to-buffer buf)
(set-buffer buf))) (set-buffer buf)))
(let ((inhibit-read-only t)) (bookmark-bmenu-mode)
(erase-buffer) (bookmark-bmenu--revert))
(if (not bookmark-bmenu-use-header-line)
(insert "% Bookmark\n- --------\n"))
(add-text-properties (point-min) (point)
'(font-lock-face bookmark-menu-heading))
(dolist (full-record (bookmark-maybe-sort-alist))
(let ((name (bookmark-name-from-full-record full-record))
(annotation (bookmark-get-annotation full-record))
(start (point))
end)
;; if a bookmark has an annotation, prepend a "*"
;; in the list of bookmarks.
(insert (if (and annotation (not (string-equal annotation "")))
" *" " ")
name)
(setq end (point))
(put-text-property
(+ bookmark-bmenu-marks-width start) end 'bookmark-name-prop name)
(when (display-mouse-p)
(add-text-properties
(+ bookmark-bmenu-marks-width start) end
'(font-lock-face bookmark-menu-bookmark
mouse-face highlight
follow-link t
help-echo "mouse-2: go to this bookmark in other window")))
(insert "\n")))
(set-buffer-modified-p (not (= bookmark-alist-modification-count 0)))
(goto-char (point-min))
(bookmark-bmenu-mode)
(if bookmark-bmenu-use-header-line
(bookmark-bmenu-set-header)
(forward-line bookmark-bmenu-inline-header-height))
(when (and bookmark-alist bookmark-bmenu-toggle-filenames)
(bookmark-bmenu-toggle-filenames t))))
;;;###autoload ;;;###autoload
(defalias 'list-bookmarks 'bookmark-bmenu-list) (defalias 'list-bookmarks 'bookmark-bmenu-list)
;;;###autoload ;;;###autoload
(defalias 'edit-bookmarks 'bookmark-bmenu-list) (defalias 'edit-bookmarks 'bookmark-bmenu-list)
;; FIXME: This could also display the current default bookmark file (define-obsolete-function-alias 'bookmark-bmenu-set-header
;; according to `bookmark-bookmarks-timestamp'. #'tabulated-list-init-header "28.1")
(defun bookmark-bmenu-set-header ()
"Set the immutable header line."
(let ((header (copy-sequence "%% Bookmark")))
(when bookmark-bmenu-toggle-filenames
(setq header (concat header
(make-string (- bookmark-bmenu-file-column
(- (length header) 3)) ?\s)
"File")))
(let ((pos 0))
(while (string-match "[ \t\n]+" header pos)
(setq pos (match-end 0))
(put-text-property (match-beginning 0) pos 'display
(list 'space :align-to (- pos 1))
header)))
(put-text-property 0 2 'face 'fixed-pitch header)
(setq header (concat (propertize " " 'display '(space :align-to 0))
header))
;; Code derived from `buff-menu.el'.
(setq header-line-format header)))
(define-derived-mode bookmark-bmenu-mode special-mode "Bookmark Menu" (define-derived-mode bookmark-bmenu-mode tabulated-list-mode "Bookmark Menu"
"Major mode for editing a list of bookmarks. "Major mode for editing a list of bookmarks.
Each line describes one of the bookmarks in Emacs. Each line describes one of the bookmarks in Emacs.
Letters do not insert themselves; instead, they are commands. Letters do not insert themselves; instead, they are commands.
@ -1804,7 +1776,31 @@ Bookmark names preceded by a \"*\" have annotations.
\\[bookmark-bmenu-edit-annotation] -- edit the annotation for the current bookmark. \\[bookmark-bmenu-edit-annotation] -- edit the annotation for the current bookmark.
\\[bookmark-bmenu-search] -- incrementally search for bookmarks." \\[bookmark-bmenu-search] -- incrementally search for bookmarks."
(setq truncate-lines t) (setq truncate-lines t)
(setq buffer-read-only t)) (setq buffer-read-only t)
;; FIXME: The header could also display the current default bookmark file
;; according to `bookmark-bookmarks-timestamp'.
(setq tabulated-list-format
`[("" 1) ;; Space to add "*" for bookmark with annotation
("Bookmark" ,bookmark-bmenu-file-column bookmark-bmenu--name-predicate)
,@(if bookmark-bmenu-toggle-filenames
'(("File" 0 bookmark-bmenu--file-predicate)))])
(setq tabulated-list-padding bookmark-bmenu-marks-width)
(setq tabulated-list-sort-key '("Bookmark" . nil))
(add-hook 'tabulated-list-revert-hook #'bookmark-bmenu--revert nil t)'
(setq revert-buffer-function 'bookmark-bmenu--revert)
(tabulated-list-init-header))
(defun bookmark-bmenu--name-predicate (a b)
"Predicate to sort \"*Bookmark List*\" buffer by the name column.
This is used for `tabulated-list-format' in `bookmark-bmenu-mode'."
(string< (caar a) (caar b)))
(defun bookmark-bmenu--file-predicate (a b)
"Predicate to sort \"*Bookmark List*\" buffer by the file column.
This is used for `tabulated-list-format' in `bookmark-bmenu-mode'."
(string< (bookmark-location (car a)) (bookmark-location (car b))))
(defun bookmark-bmenu-toggle-filenames (&optional show) (defun bookmark-bmenu-toggle-filenames (&optional show)
@ -1813,100 +1809,42 @@ Optional argument SHOW means show them unconditionally."
(interactive) (interactive)
(cond (cond
(show (show
(setq bookmark-bmenu-toggle-filenames nil)
(bookmark-bmenu-show-filenames)
(setq bookmark-bmenu-toggle-filenames t)) (setq bookmark-bmenu-toggle-filenames t))
(bookmark-bmenu-toggle-filenames (bookmark-bmenu-toggle-filenames
(bookmark-bmenu-hide-filenames)
(setq bookmark-bmenu-toggle-filenames nil)) (setq bookmark-bmenu-toggle-filenames nil))
(t (t
(bookmark-bmenu-show-filenames)
(setq bookmark-bmenu-toggle-filenames t))) (setq bookmark-bmenu-toggle-filenames t)))
(when bookmark-bmenu-use-header-line (bookmark-bmenu-surreptitiously-rebuild-list))
(bookmark-bmenu-set-header)))
(defun bookmark-bmenu-show-filenames (&optional force) (defun bookmark-bmenu-show-filenames (&optional _)
"In an interactive bookmark list, show filenames along with bookmarks. "In an interactive bookmark list, show filenames along with bookmarks."
Non-nil FORCE forces a redisplay showing the filenames. FORCE is used (setq bookmark-bmenu-toggle-filenames t)
mainly for debugging, and should not be necessary in normal use." (bookmark-bmenu-surreptitiously-rebuild-list))
(if (and (not force) bookmark-bmenu-toggle-filenames)
nil ;already shown, so do nothing
(with-buffer-modified-unmodified
(save-excursion
(save-window-excursion
(goto-char (point-min))
(if (not bookmark-bmenu-use-header-line)
(forward-line bookmark-bmenu-inline-header-height))
(setq bookmark-bmenu-hidden-bookmarks ())
(let ((inhibit-read-only t))
(while (< (point) (point-max))
(let ((bmrk (bookmark-bmenu-bookmark)))
(push bmrk bookmark-bmenu-hidden-bookmarks)
(let ((start (line-end-position)))
(move-to-column bookmark-bmenu-file-column t)
;; Strip off `mouse-face' from the white spaces region.
(if (display-mouse-p)
(remove-text-properties start (point)
'(mouse-face nil help-echo nil))))
(delete-region (point) (progn (end-of-line) (point)))
(insert " ")
;; Pass the NO-HISTORY arg:
(bookmark-insert-location bmrk t)
(forward-line 1)))))))))
(defun bookmark-bmenu-hide-filenames (&optional force) (defun bookmark-bmenu-hide-filenames (&optional _)
"In an interactive bookmark list, hide the filenames of the bookmarks. "In an interactive bookmark list, hide the filenames of the bookmarks."
Non-nil FORCE forces a redisplay showing the filenames. FORCE is used (setq bookmark-bmenu-toggle-filenames nil)
mainly for debugging, and should not be necessary in normal use." (bookmark-bmenu-surreptitiously-rebuild-list))
(when (and (not force) bookmark-bmenu-toggle-filenames)
;; nothing to hide if above is nil
(with-buffer-modified-unmodified
(save-excursion
(goto-char (point-min))
(if (not bookmark-bmenu-use-header-line)
(forward-line bookmark-bmenu-inline-header-height))
(setq bookmark-bmenu-hidden-bookmarks
(nreverse bookmark-bmenu-hidden-bookmarks))
(let ((inhibit-read-only t))
(while bookmark-bmenu-hidden-bookmarks
(move-to-column bookmark-bmenu-marks-width t)
(bookmark-kill-line)
(let ((name (pop bookmark-bmenu-hidden-bookmarks))
(start (point)))
(insert name)
(put-text-property start (point) 'bookmark-name-prop name)
(if (display-mouse-p)
(add-text-properties
start (point)
'(font-lock-face bookmark-menu-bookmark
mouse-face highlight
follow-link t help-echo
"mouse-2: go to this bookmark in other window"))))
(forward-line 1)))))))
(defun bookmark-bmenu-ensure-position () (defun bookmark-bmenu-ensure-position ()
"If point is not on a bookmark line, move it to one. "If point is not on a bookmark line, move it to one.
If before the first bookmark line, move to the first; if after the If after the last full line, move to the last full line. The
last full line, move to the last full line. The return value is undefined." return value is undefined."
(cond ((and (not bookmark-bmenu-use-header-line) (cond ((and (bolp) (eobp))
(< (count-lines (point-min) (point))
bookmark-bmenu-inline-header-height))
(goto-char (point-min))
(forward-line bookmark-bmenu-inline-header-height))
((and (bolp) (eobp))
(beginning-of-line 0)))) (beginning-of-line 0))))
(defun bookmark-bmenu-bookmark () (defun bookmark-bmenu-bookmark ()
"Return the bookmark for this line in an interactive bookmark list buffer." "Return the bookmark for this line in an interactive bookmark list buffer."
(bookmark-bmenu-ensure-position) (bookmark-bmenu-ensure-position)
(save-excursion (let* ((id (tabulated-list-get-id))
(beginning-of-line) (entry (and id (assoc id tabulated-list-entries))))
(forward-char bookmark-bmenu-marks-width) (if entry
(get-text-property (point) 'bookmark-name-prop))) (caar entry)
"")))
(defun bookmark-show-annotation (bookmark-name-or-record) (defun bookmark-show-annotation (bookmark-name-or-record)
@ -1954,14 +1892,8 @@ If the annotation does not exist, do nothing."
(defun bookmark-bmenu-mark () (defun bookmark-bmenu-mark ()
"Mark bookmark on this line to be displayed by \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-select]." "Mark bookmark on this line to be displayed by \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-select]."
(interactive) (interactive)
(beginning-of-line)
(bookmark-bmenu-ensure-position) (bookmark-bmenu-ensure-position)
(with-buffer-modified-unmodified (tabulated-list-put-tag ">" t))
(let ((inhibit-read-only t))
(delete-char 1)
(insert ?>)
(forward-line 1)
(bookmark-bmenu-ensure-position))))
(defun bookmark-bmenu-mark-all () (defun bookmark-bmenu-mark-all ()
@ -1970,12 +1902,8 @@ If the annotation does not exist, do nothing."
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(bookmark-bmenu-ensure-position) (bookmark-bmenu-ensure-position)
(with-buffer-modified-unmodified (while (not (eobp))
(let ((inhibit-read-only t)) (tabulated-list-put-tag ">" t))))
(while (not (eobp))
(delete-char 1)
(insert ?>)
(forward-line 1))))))
(defun bookmark-bmenu-select () (defun bookmark-bmenu-select ()
@ -2126,17 +2054,12 @@ bookmark menu visible."
"Cancel all requested operations on bookmark on this line and move down. "Cancel all requested operations on bookmark on this line and move down.
Optional BACKUP means move up." Optional BACKUP means move up."
(interactive "P") (interactive "P")
(beginning-of-line) ;; any flags to reset according to circumstances? How about a
;; flag indicating whether this bookmark is being visited?
;; well, we don't have this now, so maybe later.
(bookmark-bmenu-ensure-position) (bookmark-bmenu-ensure-position)
(with-buffer-modified-unmodified (tabulated-list-put-tag " ")
(let ((inhibit-read-only t)) (forward-line (if backup -1 1)))
(delete-char 1)
;; any flags to reset according to circumstances? How about a
;; flag indicating whether this bookmark is being visited?
;; well, we don't have this now, so maybe later.
(insert " "))
(forward-line (if backup -1 1))
(bookmark-bmenu-ensure-position)))
(defun bookmark-bmenu-backup-unmark () (defun bookmark-bmenu-backup-unmark ()
@ -2155,26 +2078,16 @@ Optional BACKUP means move up."
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(bookmark-bmenu-ensure-position) (bookmark-bmenu-ensure-position)
(with-buffer-modified-unmodified (while (not (eobp))
(let ((inhibit-read-only t)) (tabulated-list-put-tag " " t))))
(while (not (eobp))
(delete-char 1)
(insert " ")
(forward-line 1))))))
(defun bookmark-bmenu-delete () (defun bookmark-bmenu-delete ()
"Mark bookmark on this line to be deleted. "Mark bookmark on this line to be deleted.
To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-execute-deletions]." To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-execute-deletions]."
(interactive) (interactive)
(beginning-of-line)
(bookmark-bmenu-ensure-position) (bookmark-bmenu-ensure-position)
(with-buffer-modified-unmodified (tabulated-list-put-tag "D" t))
(let ((inhibit-read-only t))
(delete-char 1)
(insert ?D)
(forward-line 1)
(bookmark-bmenu-ensure-position))))
(defun bookmark-bmenu-delete-backwards () (defun bookmark-bmenu-delete-backwards ()
@ -2182,10 +2095,7 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\
To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-execute-deletions]." To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-execute-deletions]."
(interactive) (interactive)
(bookmark-bmenu-delete) (bookmark-bmenu-delete)
(forward-line -2) (forward-line -2))
(bookmark-bmenu-ensure-position)
(forward-line 1)
(bookmark-bmenu-ensure-position))
(defun bookmark-bmenu-delete-all () (defun bookmark-bmenu-delete-all ()
@ -2196,12 +2106,8 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(bookmark-bmenu-ensure-position) (bookmark-bmenu-ensure-position)
(with-buffer-modified-unmodified (while (not (eobp))
(let ((inhibit-read-only t)) (tabulated-list-put-tag "D" t))))
(while (not (eobp))
(delete-char 1)
(insert ?D)
(forward-line 1))))))
(defun bookmark-bmenu-execute-deletions () (defun bookmark-bmenu-execute-deletions ()
@ -2217,8 +2123,6 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\
(progn (end-of-line) (point)))))) (progn (end-of-line) (point))))))
(o-col (current-column))) (o-col (current-column)))
(goto-char (point-min)) (goto-char (point-min))
(unless bookmark-bmenu-use-header-line
(forward-line 1))
(while (re-search-forward "^D" (point-max) t) (while (re-search-forward "^D" (point-max) t)
(bookmark-delete (bookmark-bmenu-bookmark) t)) ; pass BATCH arg (bookmark-delete (bookmark-bmenu-bookmark) t)) ; pass BATCH arg
(bookmark-bmenu-list) (bookmark-bmenu-list)

View file

@ -3458,6 +3458,8 @@ A command spec is a command name symbol, a keyboard macro string, a
list containing a numeric entry string, or nil. list containing a numeric entry string, or nil.
A key may contain additional specs for Inverse, Hyperbolic, and Inv+Hyp.") A key may contain additional specs for Inverse, Hyperbolic, and Inv+Hyp.")
(make-obsolete-variable 'calc-ext-load-hook
"use `with-eval-after-load' instead." "28.1")
(run-hooks 'calc-ext-load-hook) (run-hooks 'calc-ext-load-hook)
(provide 'calc-ext) (provide 'calc-ext)

View file

@ -1,4 +1,4 @@
;;; time-date.el --- Date and time handling functions ;;; time-date.el --- Date and time handling functions -*- lexical-binding: t -*-
;; Copyright (C) 1998-2020 Free Software Foundation, Inc. ;; Copyright (C) 1998-2020 Free Software Foundation, Inc.

View file

@ -4,7 +4,7 @@
;; Author: John Wiegley <johnw@gnu.org> ;; Author: John Wiegley <johnw@gnu.org>
;; Created: 25 Mar 1999 ;; Created: 25 Mar 1999
;; Version: 2.6.1 ;; Old-Version: 2.6.1
;; Keywords: calendar data ;; Keywords: calendar data
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.

View file

@ -2789,7 +2789,9 @@ Possible return values are `standard', `saved', `set', `themed',
(and (equal value (eval (car tmp))) (and (equal value (eval (car tmp)))
(equal comment temp)) (equal comment temp))
(error nil)) (error nil))
'set (if (equal value (eval (car (get symbol 'standard-value))))
'standard
'set)
'changed)) 'changed))
((progn (setq tmp (get symbol 'theme-value)) ((progn (setq tmp (get symbol 'theme-value))
(setq temp (get symbol 'saved-variable-comment)) (setq temp (get symbol 'saved-variable-comment))
@ -2859,6 +2861,18 @@ otherwise."
(defun custom-variable-standard-value (widget) (defun custom-variable-standard-value (widget)
(get (widget-value widget) 'standard-value)) (get (widget-value widget) 'standard-value))
(defun custom-variable-current-value (widget)
"Return the current value of the variable edited by WIDGET.
WIDGET should be a custom-variable widget."
(let* ((symbol (widget-value widget))
(get (or (get symbol 'custom-get) 'default-value))
(type (custom-variable-type symbol))
(conv (widget-convert type)))
(if (default-boundp symbol)
(funcall get symbol)
(widget-get conv :value))))
(defvar custom-variable-menu nil (defvar custom-variable-menu nil
"If non-nil, an alist of actions for the `custom-variable' widget. "If non-nil, an alist of actions for the `custom-variable' widget.
@ -2989,10 +3003,12 @@ Optional EVENT is the location for the menu."
(setq comment nil) (setq comment nil)
;; Make the comment invisible by hand if it's empty ;; Make the comment invisible by hand if it's empty
(custom-comment-hide comment-widget)) (custom-comment-hide comment-widget))
(custom-variable-backup-value widget) (setq val (widget-value child))
(unless (equal (eval val) (custom-variable-current-value widget))
(custom-variable-backup-value widget))
(custom-push-theme 'theme-value symbol 'user (custom-push-theme 'theme-value symbol 'user
'set (custom-quote (widget-value child))) 'set (custom-quote val))
(funcall set symbol (eval (setq val (widget-value child)))) (funcall set symbol (eval val))
(put symbol 'customized-value (list val)) (put symbol 'customized-value (list val))
(put symbol 'variable-comment comment) (put symbol 'variable-comment comment)
(put symbol 'customized-variable-comment comment)) (put symbol 'customized-variable-comment comment))
@ -3001,10 +3017,12 @@ Optional EVENT is the location for the menu."
(setq comment nil) (setq comment nil)
;; Make the comment invisible by hand if it's empty ;; Make the comment invisible by hand if it's empty
(custom-comment-hide comment-widget)) (custom-comment-hide comment-widget))
(custom-variable-backup-value widget) (setq val (widget-value child))
(unless (equal val (custom-variable-current-value widget))
(custom-variable-backup-value widget))
(custom-push-theme 'theme-value symbol 'user (custom-push-theme 'theme-value symbol 'user
'set (custom-quote (widget-value child))) 'set (custom-quote val))
(funcall set symbol (setq val (widget-value child))) (funcall set symbol val)
(put symbol 'customized-value (list (custom-quote val))) (put symbol 'customized-value (list (custom-quote val)))
(put symbol 'variable-comment comment) (put symbol 'variable-comment comment)
(put symbol 'customized-variable-comment comment))) (put symbol 'customized-variable-comment comment)))
@ -3073,17 +3091,23 @@ before this operation becomes the backup value."
(let* ((symbol (widget-value widget)) (let* ((symbol (widget-value widget))
(saved-value (get symbol 'saved-value)) (saved-value (get symbol 'saved-value))
(comment (get symbol 'saved-variable-comment)) (comment (get symbol 'saved-variable-comment))
(old-value (custom-variable-current-value widget))
value) value)
(custom-variable-backup-value widget)
(if (not (or saved-value comment)) (if (not (or saved-value comment))
;; If there is no saved value, remove the setting. (progn
(custom-push-theme 'theme-value symbol 'user 'reset) (setq value (car (get symbol 'standard-value)))
;; If there is no saved value, remove the setting.
(custom-push-theme 'theme-value symbol 'user 'reset)
;; And reset this property too.
(put symbol 'variable-comment nil))
(setq value (car-safe saved-value)) (setq value (car-safe saved-value))
(custom-push-theme 'theme-value symbol 'user 'set value) (custom-push-theme 'theme-value symbol 'user 'set value)
(put symbol 'variable-comment comment)) (put symbol 'variable-comment comment))
(unless (equal (eval value) old-value)
(custom-variable-backup-value widget))
(ignore-errors (ignore-errors
(funcall (or (get symbol 'custom-set) #'set-default) symbol (funcall (or (get symbol 'custom-set) #'set-default) symbol
(eval (or value (car (get symbol 'standard-value)))))) (eval value)))
(put symbol 'customized-value nil) (put symbol 'customized-value nil)
(put symbol 'customized-variable-comment nil) (put symbol 'customized-variable-comment nil)
(widget-put widget :custom-state 'unknown) (widget-put widget :custom-state 'unknown)
@ -3096,7 +3120,9 @@ If `custom-reset-standard-variables-list' is nil, save, reset and
redraw the widget immediately." redraw the widget immediately."
(let* ((symbol (widget-value widget))) (let* ((symbol (widget-value widget)))
(if (get symbol 'standard-value) (if (get symbol 'standard-value)
(custom-variable-backup-value widget) (unless (equal (custom-variable-current-value widget)
(eval (car (get symbol 'standard-value))))
(custom-variable-backup-value widget))
(user-error "No standard setting known for %S" symbol)) (user-error "No standard setting known for %S" symbol))
(put symbol 'variable-comment nil) (put symbol 'variable-comment nil)
(put symbol 'customized-value nil) (put symbol 'customized-value nil)
@ -3133,13 +3159,8 @@ becomes the backup value, so you can get it again."
(defun custom-variable-backup-value (widget) (defun custom-variable-backup-value (widget)
"Back up the current value for WIDGET's variable. "Back up the current value for WIDGET's variable.
The backup value is kept in the car of the `backup-value' property." The backup value is kept in the car of the `backup-value' property."
(let* ((symbol (widget-value widget)) (let ((symbol (widget-value widget))
(get (or (get symbol 'custom-get) 'default-value)) (value (custom-variable-current-value widget)))
(type (custom-variable-type symbol))
(conv (widget-convert type))
(value (if (default-boundp symbol)
(funcall get symbol)
(widget-get conv :value))))
(put symbol 'backup-value (list value)))) (put symbol 'backup-value (list value))))
(defun custom-variable-reset-backup (widget) (defun custom-variable-reset-backup (widget)

View file

@ -3,7 +3,7 @@
;; Copyright (C) 1999-2020 Free Software Foundation, Inc. ;; Copyright (C) 1999-2020 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com> ;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Version: 2.1 ;; Old-Version: 2.1
;; Keywords: convenience text ;; Keywords: convenience text
;; X-URL: https://www.emacswiki.org/emacs/ViniciusJoseLatorre ;; X-URL: https://www.emacswiki.org/emacs/ViniciusJoseLatorre

View file

@ -3,7 +3,6 @@
;; Copyright (C) 1993-1994, 2001-2020 Free Software Foundation, Inc. ;; Copyright (C) 1993-1994, 2001-2020 Free Software Foundation, Inc.
;; Author: Dave Gillespie <daveg@synaptics.com> ;; Author: Dave Gillespie <daveg@synaptics.com>
;; Version: 2.01
;; Keywords: abbrev ;; Keywords: abbrev
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.

View file

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

View file

@ -442,7 +442,16 @@ ACCESS-TYPE if non-nil should specify the kind of access that will trigger
(defmacro define-obsolete-variable-alias (obsolete-name current-name (defmacro define-obsolete-variable-alias (obsolete-name current-name
&optional when docstring) &optional when docstring)
"Make OBSOLETE-NAME a variable alias for CURRENT-NAME and mark it obsolete. "Make OBSOLETE-NAME a variable alias for CURRENT-NAME and mark it obsolete.
This uses `defvaralias' and `make-obsolete-variable' (which see).
WHEN should be a string indicating when the variable was first
made obsolete, for example a date or a release number.
This macro evaluates all its parameters, and both OBSOLETE-NAME
and CURRENT-NAME should be symbols, so a typical usage would look like:
(define-obsolete-variable-alias 'foo-thing 'bar-thing \"27.1\")
This macro uses `defvaralias' and `make-obsolete-variable' (which see).
See the Info node `(elisp)Variable Aliases' for more details. See the Info node `(elisp)Variable Aliases' for more details.
If CURRENT-NAME is a defcustom or a defvar (more generally, any variable If CURRENT-NAME is a defcustom or a defvar (more generally, any variable
@ -456,9 +465,6 @@ dumped with Emacs). This is so that any user customizations are
applied before the defcustom tries to initialize the applied before the defcustom tries to initialize the
variable (this is due to the way `defvaralias' works). variable (this is due to the way `defvaralias' works).
WHEN should be a string indicating when the variable was first
made obsolete, for example a date or a release number.
For the benefit of Customize, if OBSOLETE-NAME has For the benefit of Customize, if OBSOLETE-NAME has
any of the following properties, they are copied to any of the following properties, they are copied to
CURRENT-NAME, if it does not already have them: CURRENT-NAME, if it does not already have them:

View file

@ -268,6 +268,13 @@ This option is enabled by default because it reduces Emacs memory usage."
(defconst byte-compile-log-buffer "*Compile-Log*" (defconst byte-compile-log-buffer "*Compile-Log*"
"Name of the byte-compiler's log buffer.") "Name of the byte-compiler's log buffer.")
(defvar byte-compile--known-dynamic-vars nil
"Variables known to be declared as dynamic, for warning purposes.
Each element is (VAR . FILE), indicating that VAR is declared in FILE.")
(defvar byte-compile--seen-defvars nil
"All dynamic variable declarations seen so far.")
(defcustom byte-optimize-log nil (defcustom byte-optimize-log nil
"If non-nil, the byte-compiler will log its optimizations. "If non-nil, the byte-compiler will log its optimizations.
If this is `source', then only source-level optimizations will be logged. If this is `source', then only source-level optimizations will be logged.
@ -290,7 +297,7 @@ The information is logged to `byte-compile-log-buffer'."
(defconst byte-compile-warning-types (defconst byte-compile-warning-types
'(redefine callargs free-vars unresolved '(redefine callargs free-vars unresolved
obsolete noruntime cl-functions interactive-only obsolete noruntime cl-functions interactive-only
make-local mapcar constants suspicious lexical) make-local mapcar constants suspicious lexical lexical-dynamic)
"The list of warning types used when `byte-compile-warnings' is t.") "The list of warning types used when `byte-compile-warnings' is t.")
(defcustom byte-compile-warnings t (defcustom byte-compile-warnings t
"List of warnings that the byte-compiler should issue (t for all). "List of warnings that the byte-compiler should issue (t for all).
@ -310,6 +317,8 @@ Elements of the list may be:
interactive-only interactive-only
commands that normally shouldn't be called from Lisp code. commands that normally shouldn't be called from Lisp code.
lexical global/dynamic variables lacking a prefix. lexical global/dynamic variables lacking a prefix.
lexical-dynamic
lexically bound variable declared dynamic elsewhere
make-local calls to make-variable-buffer-local that may be incorrect. make-local calls to make-variable-buffer-local that may be incorrect.
mapcar mapcar called for effect. mapcar mapcar called for effect.
constants let-binding of, or assignment to, constants/nonvariables. constants let-binding of, or assignment to, constants/nonvariables.
@ -1887,10 +1896,9 @@ compile FILENAME. If optional argument ARG is 0, it compiles
the input file even if the `.elc' file does not exist. the input file even if the `.elc' file does not exist.
Any other non-nil value of ARG means to ask the user. Any other non-nil value of ARG means to ask the user.
If optional argument LOAD is non-nil, loads the file after compiling.
If compilation is needed, this functions returns the result of If compilation is needed, this functions returns the result of
`byte-compile-file'; otherwise it returns `no-byte-compile'." `byte-compile-file'; otherwise it returns `no-byte-compile'."
(declare (advertised-calling-convention (filename &optional force arg) "28.1"))
(interactive (interactive
(let ((file buffer-file-name) (let ((file buffer-file-name)
(file-name nil) (file-name nil)
@ -1919,11 +1927,24 @@ If compilation is needed, this functions returns the result of
(progn (progn
(if (and noninteractive (not byte-compile-verbose)) (if (and noninteractive (not byte-compile-verbose))
(message "Compiling %s..." filename)) (message "Compiling %s..." filename))
(byte-compile-file filename load)) (byte-compile-file filename)
(when load
(load (if (file-exists-p dest) dest filename))))
(when load (when load
(load (if (file-exists-p dest) dest filename))) (load (if (file-exists-p dest) dest filename)))
'no-byte-compile))) 'no-byte-compile)))
(defun byte-compile--load-dynvars (file)
(and file (not (equal file ""))
(with-temp-buffer
(insert-file-contents file)
(goto-char (point-min))
(let ((vars nil)
var)
(while (ignore-errors (setq var (read (current-buffer))))
(push var vars))
vars))))
(defvar byte-compile-level 0 ; bug#13787 (defvar byte-compile-level 0 ; bug#13787
"Depth of a recursive byte compilation.") "Depth of a recursive byte compilation.")
@ -1932,8 +1953,10 @@ If compilation is needed, this functions returns the result of
"Compile a file of Lisp code named FILENAME into a file of byte code. "Compile a file of Lisp code named FILENAME into a file of byte code.
The output file's name is generated by passing FILENAME to the The output file's name is generated by passing FILENAME to the
function `byte-compile-dest-file' (which see). function `byte-compile-dest-file' (which see).
With prefix arg (noninteractively: 2nd arg), LOAD the file after compiling. The value is non-nil if there were no errors, nil if errors.
The value is non-nil if there were no errors, nil if errors."
See also `emacs-lisp-byte-compile-and-load'."
(declare (advertised-calling-convention (filename) "28.1"))
;; (interactive "fByte compile file: \nP") ;; (interactive "fByte compile file: \nP")
(interactive (interactive
(let ((file buffer-file-name) (let ((file buffer-file-name)
@ -1962,6 +1985,9 @@ The value is non-nil if there were no errors, nil if errors."
(let ((byte-compile-current-file filename) (let ((byte-compile-current-file filename)
(byte-compile-current-group nil) (byte-compile-current-group nil)
(set-auto-coding-for-load t) (set-auto-coding-for-load t)
(byte-compile--seen-defvars nil)
(byte-compile--known-dynamic-vars
(byte-compile--load-dynvars (getenv "EMACS_DYNVARS_FILE")))
target-file input-buffer output-buffer target-file input-buffer output-buffer
byte-compile-dest-file) byte-compile-dest-file)
(setq target-file (byte-compile-dest-file filename)) (setq target-file (byte-compile-dest-file filename))
@ -2096,8 +2122,17 @@ The value is non-nil if there were no errors, nil if errors."
filename)))) filename))))
(save-excursion (save-excursion
(display-call-tree filename))) (display-call-tree filename)))
(let ((gen-dynvars (getenv "EMACS_GENERATE_DYNVARS")))
(when (and gen-dynvars (not (equal gen-dynvars ""))
byte-compile--seen-defvars)
(let ((dynvar-file (concat target-file ".dynvars")))
(message "Generating %s" dynvar-file)
(with-temp-buffer
(dolist (var (delete-dups byte-compile--seen-defvars))
(insert (format "%S\n" (cons var filename))))
(write-region (point-min) (point-max) dynvar-file)))))
(if load (if load
(load target-file)) (load target-file))
t)))) t))))
;;; compiling a single function ;;; compiling a single function
@ -2490,7 +2525,8 @@ list that represents a doc string reference.
(setq byte-compile-lexical-variables (setq byte-compile-lexical-variables
(delq sym byte-compile-lexical-variables)) (delq sym byte-compile-lexical-variables))
(byte-compile-warn "Variable `%S' declared after its first use" sym)) (byte-compile-warn "Variable `%S' declared after its first use" sym))
(push sym byte-compile-bound-variables)) (push sym byte-compile-bound-variables)
(push sym byte-compile--seen-defvars))
(defun byte-compile-file-form-defvar (form) (defun byte-compile-file-form-defvar (form)
(let ((sym (nth 1 form))) (let ((sym (nth 1 form)))
@ -2905,6 +2941,16 @@ If FORM is a lambda or a macro, byte-compile it as a function."
(ash nonrest 8) (ash nonrest 8)
(ash rest 7))))) (ash rest 7)))))
(defun byte-compile--warn-lexical-dynamic (var context)
(when (byte-compile-warning-enabled-p 'lexical-dynamic var)
(byte-compile-warn
"`%s' lexically bound in %s here but declared dynamic in: %s"
var context
(mapconcat #'identity
(mapcan (lambda (v) (and (eq var (car v))
(list (cdr v))))
byte-compile--known-dynamic-vars)
", "))))
(defun byte-compile-lambda (fun &optional add-lambda reserved-csts) (defun byte-compile-lambda (fun &optional add-lambda reserved-csts)
"Byte-compile a lambda-expression and return a valid function. "Byte-compile a lambda-expression and return a valid function.
@ -2933,6 +2979,10 @@ for symbols generated by the byte compiler itself."
(if (cdr body) (if (cdr body)
(setq body (cdr body)))))) (setq body (cdr body))))))
(int (assq 'interactive body))) (int (assq 'interactive body)))
(when lexical-binding
(dolist (var arglistvars)
(when (assq var byte-compile--known-dynamic-vars)
(byte-compile--warn-lexical-dynamic var 'lambda))))
;; Process the interactive spec. ;; Process the interactive spec.
(when int (when int
(byte-compile-set-symbol-position 'interactive) (byte-compile-set-symbol-position 'interactive)
@ -4460,6 +4510,8 @@ Return non-nil if the TOS value was popped."
;; VAR is a simple stack-allocated lexical variable. ;; VAR is a simple stack-allocated lexical variable.
(progn (push (assq var init-lexenv) (progn (push (assq var init-lexenv)
byte-compile--lexical-environment) byte-compile--lexical-environment)
(when (assq var byte-compile--known-dynamic-vars)
(byte-compile--warn-lexical-dynamic var 'let))
nil) nil)
;; VAR should be dynamically bound. ;; VAR should be dynamically bound.
(while (assq var byte-compile--lexical-environment) (while (assq var byte-compile--lexical-environment)
@ -5289,6 +5341,8 @@ and corresponding effects."
byte-compile-variable-ref)))) byte-compile-variable-ref))))
nil) nil)
(make-obsolete-variable 'bytecomp-load-hook
"use `with-eval-after-load' instead." "28.1")
(run-hooks 'bytecomp-load-hook) (run-hooks 'bytecomp-load-hook)
;;; bytecomp.el ends here ;;; bytecomp.el ends here

View file

@ -4,7 +4,7 @@
;; Software Foundation, Inc. ;; Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Version: 0.2 ;; Old-Version: 0.2
;; Keywords: OO, chart, graph ;; Keywords: OO, chart, graph
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.

View file

@ -910,6 +910,8 @@ Outputs to the current buffer."
(mapc #'cl--describe-class-slot cslots)))) (mapc #'cl--describe-class-slot cslots))))
(make-obsolete-variable 'cl-extra-load-hook
"use `with-eval-after-load' instead." "28.1")
(run-hooks 'cl-extra-load-hook) (run-hooks 'cl-extra-load-hook)
;; Local variables: ;; Local variables:

View file

@ -3464,6 +3464,8 @@ STRUCT and SLOT-NAME are symbols. INST is a structure instance."
(nth (cl-struct-slot-offset ,struct-type ,slot-name) ,inst) (nth (cl-struct-slot-offset ,struct-type ,slot-name) ,inst)
(aref ,inst (cl-struct-slot-offset ,struct-type ,slot-name))))))) (aref ,inst (cl-struct-slot-offset ,struct-type ,slot-name)))))))
(make-obsolete-variable 'cl-macs-load-hook
"use `with-eval-after-load' instead." "28.1")
(run-hooks 'cl-macs-load-hook) (run-hooks 'cl-macs-load-hook)
;; Local variables: ;; Local variables:

View file

@ -1042,6 +1042,8 @@ Atoms are compared by `eql'; cons cells are compared recursively.
(and (not (consp cl-x)) (not (consp cl-y)) (cl--check-match cl-x cl-y))) (and (not (consp cl-x)) (not (consp cl-y)) (cl--check-match cl-x cl-y)))
(make-obsolete-variable 'cl-seq-load-hook
"use `with-eval-after-load' instead." "28.1")
(run-hooks 'cl-seq-load-hook) (run-hooks 'cl-seq-load-hook)
;; Local variables: ;; Local variables:

View file

@ -2718,6 +2718,7 @@ either a full name or nil, and EMAIL is a valid email address."
(define-key map (kbd "/ s") 'package-menu-filter-by-status) (define-key map (kbd "/ s") 'package-menu-filter-by-status)
(define-key map (kbd "/ v") 'package-menu-filter-by-version) (define-key map (kbd "/ v") 'package-menu-filter-by-version)
(define-key map (kbd "/ m") 'package-menu-filter-marked) (define-key map (kbd "/ m") 'package-menu-filter-marked)
(define-key map (kbd "/ u") 'package-menu-filter-upgradable)
map) map)
"Local keymap for `package-menu-mode' buffers.") "Local keymap for `package-menu-mode' buffers.")
@ -3914,6 +3915,15 @@ Unlike other filters, this leaves the marks intact."
(tabulated-list-put-tag (char-to-string mark) t))) (tabulated-list-put-tag (char-to-string mark) t)))
(user-error "No packages found"))))) (user-error "No packages found")))))
(defun package-menu-filter-upgradable ()
"Filter \"*Packages*\" buffer to show only upgradable packages."
(interactive)
(let ((pkgs (mapcar #'car (package-menu--find-upgrades))))
(package-menu--filter-by
(lambda (pkg)
(memql (package-desc-name pkg) pkgs))
"upgradable")))
(defun package-menu-clear-filter () (defun package-menu-clear-filter ()
"Clear any filter currently applied to the \"*Packages*\" buffer." "Clear any filter currently applied to the \"*Packages*\" buffer."
(interactive) (interactive)

View file

@ -3,7 +3,7 @@
;; Copyright (C) 2010-2020 Free Software Foundation, Inc. ;; Copyright (C) 2010-2020 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca> ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: ;; Keywords: extensions
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.

View file

@ -4,7 +4,7 @@
;; Author: 1993 Barry A. Warsaw, Century Computing, Inc. <bwarsaw@cen.com> ;; Author: 1993 Barry A. Warsaw, Century Computing, Inc. <bwarsaw@cen.com>
;; Created: 24-Feb-1993 ;; Created: 24-Feb-1993
;; Version: 1.8 ;; Old-Version: 1.8
;; Last Modified: 1993/06/01 21:33:00 ;; Last Modified: 1993/06/01 21:33:00
;; Keywords: extensions, matching ;; Keywords: extensions, matching

View file

@ -336,9 +336,11 @@ list."
"Reduce the function FUNCTION across SEQUENCE, starting with INITIAL-VALUE. "Reduce the function FUNCTION across SEQUENCE, starting with INITIAL-VALUE.
Return the result of calling FUNCTION with INITIAL-VALUE and the Return the result of calling FUNCTION with INITIAL-VALUE and the
first element of SEQUENCE, then calling FUNCTION with that result and first element of SEQUENCE, then calling FUNCTION with that result
the second element of SEQUENCE, then with that result and the third and the second element of SEQUENCE, then with that result and the
element of SEQUENCE, etc. third element of SEQUENCE, etc. FUNCTION will be called with
INITIAL-VALUE (and then the accumulated value) as the first
argument, and the elements from SEQUENCE as the second argument.
If SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called." If SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called."
(if (seq-empty-p sequence) (if (seq-empty-p sequence)
@ -472,6 +474,7 @@ Equality is defined by TESTFN if non-nil or by `equal' if nil."
(seq-reverse sequence1) (seq-reverse sequence1)
'())) '()))
;;;###autoload
(cl-defgeneric seq-group-by (function sequence) (cl-defgeneric seq-group-by (function sequence)
"Apply FUNCTION to each element of SEQUENCE. "Apply FUNCTION to each element of SEQUENCE.
Separate the elements of SEQUENCE into an alist using the results as Separate the elements of SEQUENCE into an alist using the results as

View file

@ -24,7 +24,6 @@
;;; Code: ;;; Code:
(require 'macroexp)
(require 'seq) (require 'seq)
(eval-when-compile (require 'cl-lib)) (eval-when-compile (require 'cl-lib))
@ -34,18 +33,16 @@
(defface shortdoc-section (defface shortdoc-section
'((((class color) (background dark)) '((((class color) (background dark))
(:inherit variable-pitch :inherit variable-pitch :background "#303030" :extend t)
:background "#303030" :extend t))
(((class color) (background light)) (((class color) (background light))
(:inherit variable-pitch :inherit variable-pitch :background "#f0f0f0" :extend t))
:background "#f0f0f0" :extend t)))
"Face used for a section.") "Face used for a section.")
(defface shortdoc-example (defface shortdoc-example
'((((class color) (background dark)) '((((class color) (background dark))
(:background "#202020" :extend t)) :background "#202020" :extend t)
(((class color) (background light)) (((class color) (background light))
(:background "#e8e8e8" :extend t))) :background "#e8e8e8" :extend t))
"Face used for examples.") "Face used for examples.")
(defvar shortdoc--groups nil) (defvar shortdoc--groups nil)

View file

@ -92,10 +92,14 @@
" ")) " "))
(define-ibuffer-column erc-server-name (:name "Server") (define-ibuffer-column erc-server-name (:name "Server")
(if (and erc-server-process (processp erc-server-process)) (or
(with-current-buffer (process-buffer erc-server-process) (when (and erc-server-process (processp erc-server-process))
(or erc-server-announced-name erc-session-server)) (let ((buffer (process-buffer erc-server-process)))
"")) (if (buffer-live-p buffer)
(with-current-buffer buffer
(or erc-server-announced-name erc-session-server))
"(closed)")))
""))
(define-ibuffer-column erc-target (:name "Target") (define-ibuffer-column erc-target (:name "Target")
(if (eq major-mode 'erc-mode) (if (eq major-mode 'erc-mode)

View file

@ -1,4 +1,4 @@
;;; ffap.el --- find file (or url) at point ;;; ffap.el --- find file (or url) at point -*- lexical-binding: t -*-
;; Copyright (C) 1995-1997, 2000-2020 Free Software Foundation, Inc. ;; Copyright (C) 1995-1997, 2000-2020 Free Software Foundation, Inc.
@ -1049,22 +1049,19 @@ out of NAME."
"/pub/gnu/emacs/elisp-archive/")) "/pub/gnu/emacs/elisp-archive/"))
(substring name 2)))) (substring name 2))))
(defcustom ffap-rfc-path (defcustom ffap-rfc-path "https://www.rfc-editor.org/in-notes/rfc%s.txt"
(concat (ffap-host-to-filename "ftp.rfc-editor.org") "/in-notes/rfc%s.txt")
"A `format' string making a filename for RFC documents. "A `format' string making a filename for RFC documents.
This can be an ange-ftp or Tramp remote filename to download, or This can be an URL, an ange-ftp or Tramp remote filename to
a local filename if you have full set of RFCs locally. See also download, or a local filename if you have the full set of RFCs
`ffap-rfc-directories'." locally. See also `ffap-rfc-directories'."
:type 'string :type 'string
:version "23.1" :version "28.1")
:group 'ffap)
(defcustom ffap-rfc-directories nil (defcustom ffap-rfc-directories nil
"A list of directories to look for RFC files. "A list of directories to look for RFC files.
If a given RFC isn't in these then `ffap-rfc-path' is offered." If a given RFC isn't in these then `ffap-rfc-path' is offered."
:type '(repeat directory) :type '(repeat directory)
:version "23.1" :version "23.1")
:group 'ffap)
(defun ffap-rfc (name) (defun ffap-rfc (name)
(let ((num (match-string 1 name))) (let ((num (match-string 1 name)))
@ -1142,7 +1139,7 @@ Move point and return point if an adjustment was done."
(unless dir-separator (unless dir-separator
(setq dir-separator "/")) (setq dir-separator "/"))
(let ((opoint (point)) (let ((opoint (point))
point punct end whitespace-p) point punct whitespace-p)
(when (re-search-backward (when (re-search-backward
(regexp-quote dir-separator) (line-beginning-position) t) (regexp-quote dir-separator) (line-beginning-position) t)
;; Move to the beginning of the match.. ;; Move to the beginning of the match..
@ -1363,12 +1360,14 @@ Set to nil to disable matching gopher bookmarks.")
(defun ffap--gopher-var-on-line () (defun ffap--gopher-var-on-line ()
"Return (KEY . VALUE) of gopher bookmark on current line." "Return (KEY . VALUE) of gopher bookmark on current line."
(save-excursion (save-excursion
(let ((eol (progn (end-of-line) (skip-chars-backward " ") (point))) (end-of-line)
(bol (progn (beginning-of-line) (point)))) (skip-chars-backward " ")
(when (re-search-forward ffap-gopher-regexp eol t) (let ((eol (point)))
(let ((key (match-string 1)) (beginning-of-line)
(val (buffer-substring-no-properties (match-end 0) eol))) (when (re-search-forward ffap-gopher-regexp eol t)
(cons (intern (downcase key)) val)))))) (let ((key (match-string 1))
(val (buffer-substring-no-properties (match-end 0) eol)))
(cons (intern (downcase key)) val))))))
(defun ffap-gopher-at-point () (defun ffap-gopher-at-point ()
"If point is inside a gopher bookmark block, return its URL. "If point is inside a gopher bookmark block, return its URL.
@ -1383,7 +1382,8 @@ Sets the variable `ffap-string-at-point-region' to the bounds of URL, if any."
(point))) (point)))
(bookmark (cl-loop for keyval = (ffap--gopher-var-on-line) (bookmark (cl-loop for keyval = (ffap--gopher-var-on-line)
while keyval collect keyval while keyval collect keyval
do (forward-line 1)))) do (forward-line 1)
until (eobp))))
(when bookmark (when bookmark
(setq ffap-string-at-point-region (list beg (point))) (setq ffap-string-at-point-region (list beg (point)))
(let-alist (nconc bookmark '((type . "1") (port . "70"))) (let-alist (nconc bookmark '((type . "1") (port . "70")))

View file

@ -2763,8 +2763,8 @@ since only a single case-insensitive search through the alist is made."
;; The list of archive file extensions should be in sync with ;; The list of archive file extensions should be in sync with
;; `auto-coding-alist' with `no-conversion' coding system. ;; `auto-coding-alist' with `no-conversion' coding system.
("\\.\\(\ ("\\.\\(\
arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|cbr\\|7z\\|\ arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|cbr\\|7z\\|squashfs\\|\
ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\)\\'" . archive-mode) ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\|SQUASHFS\\)\\'" . archive-mode)
("\\.oxt\\'" . archive-mode) ;(Open|Libre)Office extensions. ("\\.oxt\\'" . archive-mode) ;(Open|Libre)Office extensions.
("\\.\\(deb\\|[oi]pk\\)\\'" . archive-mode) ; Debian/Opkg packages. ("\\.\\(deb\\|[oi]pk\\)\\'" . archive-mode) ; Debian/Opkg packages.
;; Mailer puts message to be edited in ;; Mailer puts message to be edited in
@ -4306,9 +4306,27 @@ Return the new class name, which is a symbol named DIR."
(if (not (and newvars variables)) (if (not (and newvars variables))
(or newvars variables) (or newvars variables)
(require 'map) (require 'map)
(map-merge-with 'list (lambda (a b) (map-merge 'list a b)) ;; We want to make the variable setting from
variables ;; newvars (the second .dir-locals file) take
newvars)))))) ;; presedence over the old variables, but we also
;; want to preserve all `eval' elements as is from
;; both lists.
(map-merge-with
'list
(lambda (a b)
(let ((ag
(seq-group-by
(lambda (e) (eq (car e) 'eval)) a))
(bg
(seq-group-by
(lambda (e) (eq (car e) 'eval)) b)))
(append (map-merge 'list
(assoc-default nil ag)
(assoc-default nil bg))
(assoc-default t ag)
(assoc-default t bg))))
variables
newvars))))))
(setq success latest)) (setq success latest))
(setq variables (dir-locals--sort-variables variables)) (setq variables (dir-locals--sort-variables variables))
(dir-locals-set-class-variables class-name variables) (dir-locals-set-class-variables class-name variables)

View file

@ -8863,6 +8863,8 @@ will then start up Emacs ready to compose mail."
(provide 'message) (provide 'message)
(make-obsolete-variable 'message-load-hook
"use `with-eval-after-load' instead." "28.1")
(run-hooks 'message-load-hook) (run-hooks 'message-load-hook)
;; Local Variables: ;; Local Variables:

View file

@ -1067,6 +1067,8 @@ See `find-file-noselect' for the arguments."
(setq nnheader-last-message-time now) (setq nnheader-last-message-time now)
(apply 'nnheader-message args)))) (apply 'nnheader-message args))))
(make-obsolete-variable 'nnheader-load-hook
"use `with-eval-after-load' instead." "28.1")
(run-hooks 'nnheader-load-hook) (run-hooks 'nnheader-load-hook)
(provide 'nnheader) (provide 'nnheader)

View file

@ -2082,6 +2082,8 @@ Doesn't change point."
(format "%S" split) (format "%S" split)
"\n")))) "\n"))))
(make-obsolete-variable 'nnmail-load-hook
"use `with-eval-after-load' instead." "28.1")
(run-hooks 'nnmail-load-hook) (run-hooks 'nnmail-load-hook)
(provide 'nnmail) (provide 'nnmail)

View file

@ -44,6 +44,7 @@
;; cry ;-( ;; cry ;-(
;; dead X-) ;; dead X-)
;; grin :-D ;; grin :-D
;; halo O:-)
;;; Code: ;;; Code:
@ -64,7 +65,8 @@
"Smiley style." "Smiley style."
:type '(choice (const :tag "small, 3 colors" low-color) ;; 13x14 :type '(choice (const :tag "small, 3 colors" low-color) ;; 13x14
(const :tag "medium, ~10 colors" medium) ;; 16x16 (const :tag "medium, ~10 colors" medium) ;; 16x16
(const :tag "dull, grayscale" grayscale)) ;; 14x14 (const :tag "dull, grayscale" grayscale) ;; 14x14
(const :tag "emoji, full color" emoji))
:set (lambda (symbol value) :set (lambda (symbol value)
(set-default symbol value) (set-default symbol value)
(setq smiley-data-directory (smiley-directory)) (setq smiley-data-directory (smiley-directory))
@ -96,6 +98,35 @@ is nil, use `smiley-style'."
:type 'directory :type 'directory
:group 'smiley) :group 'smiley)
(defcustom smiley-emoji-regexp-alist
'(("\\(;-)\\)\\W" 1 "😉")
("[^;]\\(;)\\)\\W" 1 "😉")
("\\(:-]\\)\\W" 1 "😬")
("\\(8-)\\)\\W" 1 "🥴")
("\\(:-|\\)\\W" 1 "😐")
("\\(:-[/\\]\\)\\W" 1 "😕")
("\\(:-(\\)\\W" 1 "😠")
("\\(X-)\\)\\W" 1 "😵") ; 💀
("\\(:-{\\)\\W" 1 "😦")
("\\(>:-)\\)\\W" 1 "😈")
("\\(;-(\\)\\W" 1 "😢")
("\\(:-D\\)\\W" 1 "😀")
("\\(O:-)\\)\\W" 1 "😇")
;; "smile" must be come after "evil"
("\\(\\^?:-?)\\)\\W" 1 "🙂"))
"A list of regexps to map smilies to emoji.
The elements are (REGEXP MATCH EMOJI), where MATCH is the submatch in
regexp to replace with EMOJI."
:version "28.1"
:type '(repeat (list regexp
(integer :tag "Regexp match number")
(string :tag "Emoji")))
:set (lambda (symbol value)
(set-default symbol value)
(smiley-update-cache))
:initialize 'custom-initialize-default
:group 'smiley)
;; The XEmacs version has a baroque, if not rococo, set of these. ;; The XEmacs version has a baroque, if not rococo, set of these.
(defcustom smiley-regexp-alist (defcustom smiley-regexp-alist
'(("\\(;-)\\)\\W" 1 "blink") '(("\\(;-)\\)\\W" 1 "blink")
@ -142,23 +173,25 @@ regexp to replace with IMAGE. IMAGE is the name of an image file in
(defun smiley-update-cache () (defun smiley-update-cache ()
(setq smiley-cached-regexp-alist nil) (setq smiley-cached-regexp-alist nil)
(dolist (elt (if (symbolp smiley-regexp-alist) (if (eq smiley-style 'emoji)
(symbol-value smiley-regexp-alist) (setq smiley-cached-regexp-alist smiley-emoji-regexp-alist)
smiley-regexp-alist)) (dolist (elt (if (symbolp smiley-regexp-alist)
(let ((types gnus-smiley-file-types) (symbol-value smiley-regexp-alist)
file type) smiley-regexp-alist))
(while (and (not file) (let ((types gnus-smiley-file-types)
(setq type (pop types))) file type)
(unless (file-exists-p (while (and (not file)
(setq file (expand-file-name (concat (nth 2 elt) "." type) (setq type (pop types)))
smiley-data-directory))) (unless (file-exists-p
(setq file nil))) (setq file (expand-file-name (concat (nth 2 elt) "." type)
(when type smiley-data-directory)))
(let ((image (gnus-create-image file (intern type) nil (setq file nil)))
:ascent 'center))) (when type
(when image (let ((image (gnus-create-image file (intern type) nil
(push (list (car elt) (cadr elt) image) :ascent 'center)))
smiley-cached-regexp-alist))))))) (when image
(push (list (car elt) (cadr elt) image)
smiley-cached-regexp-alist))))))))
;; Not implemented: ;; Not implemented:
;; (defvar smiley-mouse-map ;; (defvar smiley-mouse-map
@ -190,8 +223,15 @@ A list of images is returned."
(when image (when image
(push image images) (push image images)
(gnus-add-wash-type 'smiley) (gnus-add-wash-type 'smiley)
(gnus-add-image 'smiley image) (if (symbolp image)
(gnus-put-image image string 'smiley)))) (progn
(gnus-add-image 'smiley image)
(gnus-put-image image string 'smiley))
;; This is a string, but mark the property for
;; deletion if the washing method is switched off.
(insert (propertize string
'display image
'gnus-image-category 'smiley))))))
images)))) images))))
;;;###autoload ;;;###autoload

View file

@ -973,6 +973,476 @@ is currently activated with completion."
minor-modes nil) minor-modes nil)
(setq minor-modes (cdr minor-modes))))) (setq minor-modes (cdr minor-modes)))))
result)) result))
(defun substitute-command-keys (string)
"Substitute key descriptions for command names in STRING.
Each substring of the form \\\\=[COMMAND] is replaced by either a
keystroke sequence that invokes COMMAND, or \"M-x COMMAND\" if COMMAND
is not on any keys.
Each substring of the form \\\\={MAPVAR} is replaced by a summary of
the value of MAPVAR as a keymap. This summary is similar to the one
produced by describe-bindings. The summary ends in two newlines
(used by the helper function help-make-xrefs to find the end of the
summary).
Each substring of the form \\\\=<MAPVAR> specifies the use of MAPVAR
as the keymap for future \\\\=[COMMAND] substrings.
Each grave accent \\=` is replaced by left quote, and each apostrophe \\='
is replaced by right quote. Left and right quote characters are
specified by text-quoting-style.
\\\\== quotes the following character and is discarded; thus, \\\\==\\\\== puts \\\\==
into the output, \\\\==\\[ puts \\[ into the output, and \\\\==\\=` puts \\=` into the
output.
Return the original STRING if no substitutions are made.
Otherwise, return a new string (without any text properties)."
(when (not (null string))
;; KEYMAP is either nil (which means search all the active
;; keymaps) or a specified local map (which means search just that
;; and the global map). If non-nil, it might come from
;; overriding-local-map, or from a \\<mapname> construct in STRING
;; itself.
(let ((keymap overriding-local-map)
(inhibit-modification-hooks t)
(orig-buf (current-buffer)))
(with-temp-buffer
(insert string)
(goto-char (point-min))
(while (< (point) (point-max))
(let ((standard-output (current-buffer))
(orig-point (point))
end-point active-maps
close generate-summary)
(cond
;; 1. Handle all sequences starting with "\"
((= (following-char) ?\\)
(ignore-errors
(forward-char 1))
(cond
;; 1A. Ignore \= at end of string.
((and (= (+ (point) 1) (point-max))
(= (following-char) ?=))
(forward-char 1))
;; 1B. \= quotes the next character; thus, to put in \[
;; without its special meaning, use \=\[.
((= (following-char) ?=)
(goto-char orig-point)
(delete-char 2)
(ignore-errors
(forward-char 1)))
;; 1C. \[foo] is replaced with the keybinding.
((and (= (following-char) ?\[)
(save-excursion
(prog1 (search-forward "]" nil t)
(setq end-point (- (point) 2)))))
(goto-char orig-point)
(delete-char 2)
(let* ((fun (intern (buffer-substring (point) (1- end-point))))
(key (with-current-buffer orig-buf
(where-is-internal fun keymap t))))
;; If this a command remap, we need to follow it.
(when (and (vectorp key)
(> (length key) 1)
(eq (aref key 0) 'remap)
(symbolp (aref key 1)))
(setq fun (aref key 1))
(setq key (with-current-buffer orig-buf
(where-is-internal fun keymap t))))
(if (not key)
;; Function is not on any key.
(progn (insert "M-x ")
(goto-char (+ end-point 3))
(delete-char 1))
;; Function is on a key.
(delete-char (- end-point (point)))
(insert (key-description key)))))
;; 1D. \{foo} is replaced with a summary of the keymap
;; (symbol-value foo).
;; \<foo> just sets the keymap used for \[cmd].
((and (or (and (= (following-char) ?{)
(setq close "}")
(setq generate-summary t))
(and (= (following-char) ?<)
(setq close ">")))
(or (save-excursion
(prog1 (search-forward close nil t)
(setq end-point (- (point) 2))))))
(goto-char orig-point)
(delete-char 2)
(let* ((name (intern (buffer-substring (point) (1- end-point))))
this-keymap)
(delete-char (- end-point (point)))
;; Get the value of the keymap in TEM, or nil if
;; undefined. Do this in the user's current buffer
;; in case it is a local variable.
(with-current-buffer orig-buf
;; This is for computing the SHADOWS arg for
;; describe-map-tree.
(setq active-maps (current-active-maps))
(when (boundp name)
(setq this-keymap (and (keymapp (symbol-value name))
(symbol-value name)))))
(cond
((null this-keymap)
(insert "\nUses keymap "
(substitute-command-keys "`")
(symbol-name name)
(substitute-command-keys "'")
", which is not currently defined.\n")
(unless generate-summary
(setq keymap nil)))
((not generate-summary)
(setq keymap this-keymap))
(t
;; Get the list of active keymaps that precede this one.
;; If this one's not active, get nil.
(let ((earlier-maps (cdr (memq this-keymap (reverse active-maps)))))
(describe-map-tree this-keymap t (nreverse earlier-maps)
nil nil t nil nil t))))))))
;; 2. Handle quotes.
((and (eq (get-quoting-style) 'curve)
(or (and (= (following-char) ?\`)
(prog1 t (insert "")))
(and (= (following-char) ?')
(prog1 t (insert "")))))
(delete-char 1))
((and (eq (get-quoting-style) 'straight)
(= (following-char) ?\`))
(insert "'")
(delete-char 1))
;; 3. Nothing to do -- next character.
(t (forward-char 1)))))
(buffer-string)))))
(defvar help--keymaps-seen nil)
(defun describe-map-tree (startmap partial shadow prefix title no-menu
transl always-title mention-shadow)
"Insert a description of the key bindings in STARTMAP.
This is followed by the key bindings of all maps reachable
through STARTMAP.
If PARTIAL is non-nil, omit certain uninteresting commands
\(such as `undefined').
If SHADOW is non-nil, it is a list of maps; don't mention keys
which would be shadowed by any of them.
If PREFIX is non-nil, mention only keys that start with PREFIX.
If TITLE is non-nil, is a string to insert at the beginning.
TITLE should not end with a colon or a newline; we supply that.
If NOMENU is non-nil, then omit menu-bar commands.
If TRANSL is non-nil, the definitions are actually key
translations so print strings and vectors differently.
If ALWAYS_TITLE is non-nil, print the title even if there are no
maps to look through.
If MENTION_SHADOW is non-nil, then when something is shadowed by
SHADOW, don't omit it; instead, mention it but say it is
shadowed.
Any inserted text ends in two newlines (used by
`help-make-xrefs')."
(let* ((amaps (accessible-keymaps startmap prefix))
(orig-maps (if no-menu
(progn
;; Delete from MAPS each element that is for
;; the menu bar.
(let* ((tail amaps)
result)
(while tail
(let ((elem (car tail)))
(when (not (and (>= (length (car elem)) 1)
(eq (elt (car elem) 0) 'menu-bar)))
(setq result (append result (list elem)))))
(setq tail (cdr tail)))
result))
amaps))
(maps orig-maps)
(print-title (or maps always-title)))
;; Print title.
(when print-title
(princ (concat (if title
(concat title
(if prefix
(concat " Starting With "
(key-description prefix)))
":\n"))
"key binding\n"
"--- -------\n")))
;; Describe key bindings.
(setq help--keymaps-seen nil)
(while (consp maps)
(let* ((elt (car maps))
(elt-prefix (car elt))
(sub-shadows (lookup-key shadow elt-prefix t)))
(when (if (natnump sub-shadows)
(prog1 t (setq sub-shadows nil))
;; Describe this map iff elt_prefix is bound to a
;; keymap, since otherwise it completely shadows this
;; map.
(or (keymapp sub-shadows)
(null sub-shadows)
(consp sub-shadows)
(not (keymapp (car sub-shadows)))))
;; Maps we have already listed in this loop shadow this map.
(let ((tail orig-maps))
(while (not (equal tail maps))
(when (equal (car (car tail)) elt-prefix)
(setq sub-shadows (cons (cdr (car tail)) sub-shadows)))
(setq tail (cdr tail))))
(describe-map (cdr elt) elt-prefix transl partial
sub-shadows no-menu mention-shadow)))
(setq maps (cdr maps)))
(when print-title
(princ "\n"))))
(defun help--shadow-lookup (keymap key accept-default remap)
"Like `lookup-key', but with command remapping.
Return nil if the key sequence is too long."
;; Converted from shadow_lookup in keymap.c.
(let ((value (lookup-key keymap key accept-default)))
(cond ((and (fixnump value) (<= 0 value)))
((and value remap (symbolp value))
(or (command-remapping value nil keymap)
value))
(t value))))
(defvar help--previous-description-column 0)
(defun help--describe-command (definition)
;; Converted from describe_command in keymap.c.
;; If column 16 is no good, go to col 32;
;; but don't push beyond that--go to next line instead.
(let* ((column (current-column))
(description-column (cond ((> column 30)
(insert "\n")
32)
((or (> column 14)
(and (> column 10)
(= help--previous-description-column 32)))
32)
(t 16))))
(indent-to description-column 1)
(setq help--previous-description-column description-column)
(cond ((symbolp definition)
(insert (symbol-name definition) "\n"))
((or (stringp definition) (vectorp definition))
(insert "Keyboard Macro\n"))
((keymapp definition)
(insert "Prefix Command\n"))
(t (insert "??\n")))))
(defun help--describe-translation (definition)
;; Converted from describe_translation in keymap.c.
(indent-to 16 1)
(cond ((symbolp definition)
(insert (symbol-name definition) "\n"))
((or (stringp definition) (vectorp definition))
(insert (key-description definition nil) "\n"))
((keymapp definition)
(insert "Prefix Command\n"))
(t (insert "??\n"))))
(defun help--describe-map-compare (a b)
(let ((a (car a))
(b (car b)))
(cond ((and (fixnump a) (fixnump b)) (< a b))
;; ((and (not (fixnump a)) (fixnump b)) nil) ; not needed
((and (fixnump a) (not (fixnump b))) t)
((and (symbolp a) (symbolp b))
;; Sort the keystroke names in the "natural" way, with (for
;; instance) "<f2>" coming between "<f1>" and "<f11>".
(string-version-lessp (symbol-name a) (symbol-name b)))
(t nil))))
(defun describe-map (map prefix transl partial shadow nomenu mention-shadow)
"Describe the contents of keymap MAP.
Assume that this keymap itself is reached by the sequence of
prefix keys PREFIX (a string or vector).
TRANSL, PARTIAL, SHADOW, NOMENU, MENTION-SHADOW are as in
`describe-map-tree'."
;; Converted from describe_map in keymap.c.
(let* ((suppress (and partial 'suppress-keymap))
(map (keymap-canonicalize map))
(tail map)
(first t)
(describer (if transl
#'help--describe-translation
#'help--describe-command))
done vect)
(while (and (consp tail) (not done))
(cond ((or (vectorp (car tail)) (char-table-p (car tail)))
(help--describe-vector (car tail) prefix describer partial
shadow map mention-shadow))
((consp (car tail))
(let ((event (caar tail))
definition this-shadowed)
;; Ignore bindings whose "prefix" are not really
;; valid events. (We get these in the frames and
;; buffers menu.)
(and (or (symbolp event) (fixnump event))
(not (and nomenu (eq event 'menu-bar)))
;; Don't show undefined commands or suppressed
;; commands.
(setq definition (keymap--get-keyelt (cdr (car tail)) nil))
(or (not (symbolp definition))
(null (get definition suppress)))
;; Don't show a command that isn't really
;; visible because a local definition of the
;; same key shadows it.
(or (not shadow)
(let ((tem (help--shadow-lookup shadow (vector event) t nil)))
(cond ((null tem) t)
;; If both bindings are keymaps,
;; this key is a prefix key, so
;; don't say it is shadowed.
((and (keymapp definition) (keymapp tem)) t)
;; Avoid generating duplicate
;; entries if the shadowed binding
;; has the same definition.
((and mention-shadow (not (eq tem definition)))
(setq this-shadowed t))
(t nil))))
(push (list event definition this-shadowed) vect))))
((eq (car tail) 'keymap)
;; The same keymap might be in the structure twice, if
;; we're using an inherited keymap. So skip anything
;; we've already encountered.
(let ((tem (assq tail help--keymaps-seen)))
(if (and (consp tem)
(equal (car tem) prefix))
(setq done t)
(push (cons tail prefix) help--keymaps-seen)))))
(setq tail (cdr tail)))
;; If we found some sparse map events, sort them.
(let ((vect (sort vect 'help--describe-map-compare)))
;; Now output them in sorted order.
(while vect
(let* ((elem (car vect))
(start (car elem))
(definition (cadr elem))
(shadowed (caddr elem))
(end start))
(when first
(setq help--previous-description-column 0)
(insert "\n")
(setq first nil))
;; Find consecutive chars that are identically defined.
(when (fixnump start)
(while (and (cdr vect)
(let ((this-event (caar vect))
(this-definition (cadar vect))
(this-shadowed (caddar vect))
(next-event (caar (cdr vect)))
(next-definition (cadar (cdr vect)))
(next-shadowed (caddar (cdr vect))))
(and (eq next-event (1+ this-event))
(equal next-definition this-definition)
(eq this-shadowed next-shadowed))))
(setq vect (cdr vect))
(setq end (caar vect))))
;; Now START .. END is the range to describe next.
;; Insert the string to describe the event START.
(insert (key-description (vector start) prefix))
(when (not (eq start end))
(insert " .. " (key-description (vector end) prefix)))
;; Print a description of the definition of this character.
;; Called function will take care of spacing out far enough
;; for alignment purposes.
(if transl
(help--describe-translation definition)
(help--describe-command definition))
;; Print a description of the definition of this character.
;; elt_describer will take care of spacing out far enough for
;; alignment purposes.
(when shadowed
(goto-char (max (1- (point)) (point-min)))
(insert "\n (this binding is currently shadowed)")
(goto-char (min (1+ (point)) (point-max)))))
;; Next item in list.
(setq vect (cdr vect))))))
;;;; This Lisp version is 100 times slower than its C equivalent:
;;
;; (defun help--describe-vector
;; (vector prefix transl partial shadow entire-map mention-shadow)
;; "Insert in the current buffer a description of the contents of VECTOR.
;;
;; PREFIX a prefix key which leads to the keymap that this vector is
;; in.
;;
;; If PARTIAL, it means do not mention suppressed commands
;; (that assumes the vector is in a keymap).
;;
;; SHADOW is a list of keymaps that shadow this map. If it is
;; non-nil, look up the key in those maps and don't mention it if it
;; is defined by any of them.
;;
;; ENTIRE-MAP is the vector in which this vector appears.
;; If the definition in effect in the whole map does not match
;; the one in this vector, we ignore this one."
;; ;; Converted from describe_vector in keymap.c.
;; (let* ((first t)
;; (idx 0))
;; (while (< idx (length vector))
;; (let* ((val (aref vector idx))
;; (definition (keymap--get-keyelt val nil))
;; (start-idx idx)
;; this-shadowed
;; found-range)
;; (when (and definition
;; ;; Don't mention suppressed commands.
;; (not (and partial
;; (symbolp definition)
;; (get definition 'suppress-keymap)))
;; ;; If this binding is shadowed by some other map,
;; ;; ignore it.
;; (not (and shadow
;; (help--shadow-lookup shadow (vector start-idx) t nil)
;; (if mention-shadow
;; (prog1 nil (setq this-shadowed t))
;; t)))
;; ;; Ignore this definition if it is shadowed by an earlier
;; ;; one in the same keymap.
;; (not (and entire-map
;; (not (eq (lookup-key entire-map (vector start-idx) t)
;; definition)))))
;; (when first
;; (insert "\n")
;; (setq first nil))
;; (when (and prefix (> (length prefix) 0))
;; (insert (format "%s" prefix)))
;; (insert (key-description (vector start-idx) prefix))
;; ;; Find all consecutive characters or rows that have the
;; ;; same definition.
;; (while (equal (keymap--get-keyelt (aref vector (1+ idx)) nil)
;; definition)
;; (setq found-range t)
;; (setq idx (1+ idx)))
;; ;; If we have a range of more than one character,
;; ;; print where the range reaches to.
;; (when found-range
;; (insert " .. ")
;; (when (and prefix (> (length prefix) 0))
;; (insert (format "%s" prefix)))
;; (insert (key-description (vector idx) prefix)))
;; (if transl
;; (help--describe-translation definition)
;; (help--describe-command definition))
;; (when this-shadowed
;; (goto-char (1- (point)))
;; (insert " (binding currently shadowed)")
;; (goto-char (1+ (point))))))
;; (setq idx (1+ idx)))))
(declare-function x-display-pixel-height "xfns.c" (&optional terminal)) (declare-function x-display-pixel-height "xfns.c" (&optional terminal))
(declare-function x-display-pixel-width "xfns.c" (&optional terminal)) (declare-function x-display-pixel-width "xfns.c" (&optional terminal))

View file

@ -1,4 +1,4 @@
;;; hfy-cmap.el --- Fallback color name -> rgb mapping for `htmlfontify' ;;; hfy-cmap.el --- Fallback color name -> rgb mapping for `htmlfontify' -*- lexical-binding:t -*-
;; Copyright (C) 2002-2003, 2009-2020 Free Software Foundation, Inc. ;; Copyright (C) 2002-2003, 2009-2020 Free Software Foundation, Inc.
@ -809,6 +809,22 @@
(defconst hfy-rgb-regex (defconst hfy-rgb-regex
"^\\s-*\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\(.+\\)\\s-*$") "^\\s-*\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\([0-9]+\\)\\s-+\\(.+\\)\\s-*$")
(defun hfy-cmap--parse-buffer (buffer)
(with-current-buffer buffer
(let ((end-of-rgb 0)
result)
(goto-char (point-min))
(htmlfontify-unload-rgb-file)
(while (/= end-of-rgb 1)
(if (looking-at hfy-rgb-regex)
(push (list (match-string 4)
(string-to-number (match-string 1))
(string-to-number (match-string 2))
(string-to-number (match-string 3)))
result))
(setq end-of-rgb (forward-line)))
result)))
;;;###autoload ;;;###autoload
(defun htmlfontify-load-rgb-file (&optional file) (defun htmlfontify-load-rgb-file (&optional file)
"Load an X11 style rgb.txt FILE. "Load an X11 style rgb.txt FILE.
@ -818,25 +834,14 @@ Loads the variable `hfy-rgb-txt-color-map', which is used by
(interactive (interactive
(list (list
(read-file-name "rgb.txt (equivalent) file: " "" nil t (hfy-rgb-file)))) (read-file-name "rgb.txt (equivalent) file: " "" nil t (hfy-rgb-file))))
(let ((rgb-buffer nil) (let ((rgb-buffer nil)
(end-of-rgb 0) (rgb-txt (or file (hfy-rgb-file))))
(rgb-txt nil)) (when (and rgb-txt
(if (and (setq rgb-txt (or file (hfy-rgb-file))) (file-readable-p rgb-txt))
(file-readable-p rgb-txt)) (setq rgb-buffer (find-file-noselect rgb-txt 'nowarn))
(with-current-buffer (when-let ((result (hfy-cmap--parse-buffer rgb-buffer)))
(setq rgb-buffer (find-file-noselect rgb-txt 'nowarn)) (setq hfy-rgb-txt-color-map result))
(goto-char (point-min)) (kill-buffer rgb-buffer))))
(htmlfontify-unload-rgb-file)
(while (/= end-of-rgb 1)
(if (looking-at hfy-rgb-regex)
(setq hfy-rgb-txt-color-map
(cons (list (match-string 4)
(string-to-number (match-string 1))
(string-to-number (match-string 2))
(string-to-number (match-string 3)))
hfy-rgb-txt-color-map)) )
(setq end-of-rgb (forward-line)))
(kill-buffer rgb-buffer)))))
(defun htmlfontify-unload-rgb-file () (defun htmlfontify-unload-rgb-file ()
"Unload the current color name -> rgb translation map." "Unload the current color name -> rgb translation map."

View file

@ -1,4 +1,4 @@
;;; image-file.el --- support for visiting image files ;;; image-file.el --- support for visiting image files -*- lexical-binding:t -*-
;; ;;
;; Copyright (C) 2000-2020 Free Software Foundation, Inc. ;; Copyright (C) 2000-2020 Free Software Foundation, Inc.
;; ;;
@ -90,7 +90,7 @@ the variable is set using \\[customize]."
t) t)
"\\'")))) "\\'"))))
(mapconcat (mapconcat
'identity #'identity
(delq nil (list exts-regexp (delq nil (list exts-regexp
image-file-name-regexps image-file-name-regexps
(car (rassq 'imagemagick image-type-file-name-regexps)))) (car (rassq 'imagemagick image-type-file-name-regexps))))

View file

@ -67,7 +67,6 @@ Intermediate Info nodes are nodes visited by Info internally in the process of
searching the node to display. Intermediate nodes are not presented searching the node to display. Intermediate nodes are not presented
to the user." to the user."
:type 'boolean :type 'boolean
:group 'info
:version "24.1") :version "24.1")
(defvar Info-enable-active-nodes nil (defvar Info-enable-active-nodes nil
@ -79,8 +78,7 @@ The Lisp code is executed when the node is selected.")
'((((class color) (background light)) :foreground "brown" :weight bold :slant italic) '((((class color) (background light)) :foreground "brown" :weight bold :slant italic)
(((class color) (background dark)) :foreground "white" :weight bold :slant italic) (((class color) (background dark)) :foreground "white" :weight bold :slant italic)
(t :weight bold :slant italic)) (t :weight bold :slant italic))
"Face for Info node names." "Face for Info node names.")
:group 'info)
(defface info-title-1 (defface info-title-1
'((((type tty pc) (class color) (background light)) '((((type tty pc) (class color) (background light))
@ -88,26 +86,22 @@ The Lisp code is executed when the node is selected.")
(((type tty pc) (class color) (background dark)) (((type tty pc) (class color) (background dark))
:foreground "yellow" :weight bold) :foreground "yellow" :weight bold)
(t :height 1.2 :inherit info-title-2)) (t :height 1.2 :inherit info-title-2))
"Face for info titles at level 1." "Face for info titles at level 1.")
:group 'info)
(defface info-title-2 (defface info-title-2
'((((type tty pc) (class color)) :foreground "lightblue" :weight bold) '((((type tty pc) (class color)) :foreground "lightblue" :weight bold)
(t :height 1.2 :inherit info-title-3)) (t :height 1.2 :inherit info-title-3))
"Face for info titles at level 2." "Face for info titles at level 2.")
:group 'info)
(defface info-title-3 (defface info-title-3
'((((type tty pc) (class color)) :weight bold) '((((type tty pc) (class color)) :weight bold)
(t :height 1.2 :inherit info-title-4)) (t :height 1.2 :inherit info-title-4))
"Face for info titles at level 3." "Face for info titles at level 3.")
:group 'info)
(defface info-title-4 (defface info-title-4
'((((type tty pc) (class color)) :weight bold) '((((type tty pc) (class color)) :weight bold)
(t :weight bold :inherit variable-pitch)) (t :weight bold :inherit variable-pitch))
"Face for info titles at level 4." "Face for info titles at level 4.")
:group 'info)
(defface info-menu-header (defface info-menu-header
'((((type tty pc)) '((((type tty pc))
@ -116,31 +110,26 @@ The Lisp code is executed when the node is selected.")
(t (t
:inherit variable-pitch :inherit variable-pitch
:weight bold)) :weight bold))
"Face for headers in Info menus." "Face for headers in Info menus.")
:group 'info)
(defface info-menu-star (defface info-menu-star
'((((class color)) :foreground "red1") '((((class color)) :foreground "red1")
(t :underline t)) (t :underline t))
"Face for every third `*' in an Info menu." "Face for every third `*' in an Info menu.")
:group 'info)
(defface info-xref (defface info-xref
'((t :inherit link)) '((t :inherit link))
"Face for unvisited Info cross-references." "Face for unvisited Info cross-references.")
:group 'info)
(defface info-xref-visited (defface info-xref-visited
'((t :inherit (link-visited info-xref))) '((t :inherit (link-visited info-xref)))
"Face for visited Info cross-references." "Face for visited Info cross-references."
:version "22.1" :version "22.1")
:group 'info)
(defcustom Info-fontify-visited-nodes t (defcustom Info-fontify-visited-nodes t
"Non-nil to fontify references to visited nodes in `info-xref-visited' face." "Non-nil to fontify references to visited nodes in `info-xref-visited' face."
:version "22.1" :version "22.1"
:type 'boolean :type 'boolean)
:group 'info)
;; It's unfortunate that nil means no fontification, as opposed to no limit, ;; It's unfortunate that nil means no fontification, as opposed to no limit,
;; since that differs from font-lock-maximum-size. ;; since that differs from font-lock-maximum-size.
@ -150,29 +139,24 @@ Set to nil to disable node fontification; set to t for no limit."
:type '(choice (const :tag "No fontification" nil) :type '(choice (const :tag "No fontification" nil)
(const :tag "No size limit" t) (const :tag "No size limit" t)
(integer :tag "Up to this many characters")) (integer :tag "Up to this many characters"))
:version "25.1" ; 100k -> 400k :version "25.1") ; 100k -> 400k
:group 'info)
(defcustom Info-use-header-line t (defcustom Info-use-header-line t
"Non-nil means to put the beginning-of-node links in an Emacs header-line. "Non-nil means to put the beginning-of-node links in an Emacs header-line.
A header-line does not scroll with the rest of the buffer." A header-line does not scroll with the rest of the buffer."
:type 'boolean :type 'boolean)
:group 'info)
(defface info-header-xref (defface info-header-xref
'((t :inherit info-xref)) '((t :inherit info-xref))
"Face for Info cross-references in a node header." "Face for Info cross-references in a node header.")
:group 'info)
(defface info-header-node (defface info-header-node
'((t :inherit info-node)) '((t :inherit info-node))
"Face for Info nodes in a node header." "Face for Info nodes in a node header.")
:group 'info)
(defface info-index-match (defface info-index-match
'((t :inherit match)) '((t :inherit match))
"Face used to highlight matches in an index entry." "Face used to highlight matches in an index entry."
:group 'info
:version "24.4") :version "24.4")
;; This is a defcustom largely so that we can get the benefit ;; This is a defcustom largely so that we can get the benefit
@ -249,8 +233,7 @@ Although this is a customizable variable, that is mainly for technical
reasons. Normally, you should either set INFOPATH or customize reasons. Normally, you should either set INFOPATH or customize
`Info-additional-directory-list', rather than changing this variable." `Info-additional-directory-list', rather than changing this variable."
:initialize 'custom-initialize-delay :initialize 'custom-initialize-delay
:type '(repeat directory) :type '(repeat directory)))
:group 'info))
(defvar Info-directory-list nil (defvar Info-directory-list nil
"List of directories to search for Info documentation files. "List of directories to search for Info documentation files.
@ -285,8 +268,7 @@ a version of Emacs without installing it.")
(defcustom Info-additional-directory-list nil (defcustom Info-additional-directory-list nil
"List of additional directories to search for Info documentation files. "List of additional directories to search for Info documentation files.
These directories are searched after those in `Info-directory-list'." These directories are searched after those in `Info-directory-list'."
:type '(repeat directory) :type '(repeat directory))
:group 'info)
(defcustom Info-scroll-prefer-subnodes nil (defcustom Info-scroll-prefer-subnodes nil
"If non-nil, \\<Info-mode-map>\\[Info-scroll-up] in a menu visits subnodes. "If non-nil, \\<Info-mode-map>\\[Info-scroll-up] in a menu visits subnodes.
@ -300,15 +282,15 @@ Setting this option to nil results in behavior similar to the stand-alone
Info reader program, which visits the first subnode from the menu only Info reader program, which visits the first subnode from the menu only
when you hit the end of the current node." when you hit the end of the current node."
:version "22.1" :version "22.1"
:type 'boolean :type 'boolean)
:group 'info)
(defcustom Info-hide-note-references t (defcustom Info-hide-note-references t
"If non-nil, hide the tag and section reference in *note and * menu items. "If non-nil, hide the tag and section reference in *note and * menu items.
If value is non-nil but not `hide', also replaces the \"*note\" with \"see\". If the value is t, the default, replace \"*note\" with \"see\".
If value is non-nil but not t or `hide', the reference section is still shown. If the value is `hide', remove \"*note\" without replacing it with anything.
nil completely disables this feature. If this is non-nil, you might If value is non-nil, but not t or `hide', the reference section is still shown.
want to set `Info-refill-paragraphs'." nil completely disables this feature, leaving the original \"*note\" visible.
If this is non-nil, you may wish setting `Info-refill-paragraphs' non-nil."
:version "22.1" :version "22.1"
:type '(choice (const :tag "No hiding" nil) :type '(choice (const :tag "No hiding" nil)
(const :tag "Replace tag and hide reference" t) (const :tag "Replace tag and hide reference" t)
@ -319,8 +301,7 @@ want to set `Info-refill-paragraphs'."
(dolist (buffer (buffer-list)) (dolist (buffer (buffer-list))
(with-current-buffer buffer (with-current-buffer buffer
(when (derived-mode-p 'Info-mode) (when (derived-mode-p 'Info-mode)
(revert-buffer t t))))) (revert-buffer t t))))))
:group 'info)
(defcustom Info-refill-paragraphs nil (defcustom Info-refill-paragraphs nil
"If non-nil, attempt to refill paragraphs with hidden references. "If non-nil, attempt to refill paragraphs with hidden references.
@ -328,15 +309,13 @@ This refilling may accidentally remove explicit line breaks in the Info
file, so be prepared for a few surprises if you enable this feature. file, so be prepared for a few surprises if you enable this feature.
This only has an effect if `Info-hide-note-references' is non-nil." This only has an effect if `Info-hide-note-references' is non-nil."
:version "22.1" :version "22.1"
:type 'boolean :type 'boolean)
:group 'info)
(defcustom Info-breadcrumbs-depth 4 (defcustom Info-breadcrumbs-depth 4
"Depth of breadcrumbs to display. "Depth of breadcrumbs to display.
0 means do not display breadcrumbs." 0 means do not display breadcrumbs."
:version "23.1" :version "23.1"
:type 'integer :type 'integer)
:group 'info)
(defcustom Info-search-whitespace-regexp "\\s-+" (defcustom Info-search-whitespace-regexp "\\s-+"
"If non-nil, regular expression to match a sequence of whitespace chars. "If non-nil, regular expression to match a sequence of whitespace chars.
@ -346,8 +325,7 @@ In the Customization buffer, that is `[' followed by a space,
a tab, a carriage return (control-M), a newline, and `]+'. Don't a tab, a carriage return (control-M), a newline, and `]+'. Don't
add any capturing groups into this value; that can change the add any capturing groups into this value; that can change the
numbering of existing capture groups in unexpected ways." numbering of existing capture groups in unexpected ways."
:type 'regexp :type 'regexp)
:group 'info)
(defcustom Info-isearch-search t (defcustom Info-isearch-search t
"If non-nil, isearch in Info searches through multiple nodes. "If non-nil, isearch in Info searches through multiple nodes.
@ -362,8 +340,7 @@ node depending on search direction.
Setting this option to nil restores the default isearch behavior Setting this option to nil restores the default isearch behavior
with wrapping around the current Info node." with wrapping around the current Info node."
:version "22.1" :version "22.1"
:type 'boolean :type 'boolean)
:group 'info)
(defvar Info-isearch-initial-node nil) (defvar Info-isearch-initial-node nil)
(defvar Info-isearch-initial-history nil) (defvar Info-isearch-initial-history nil)
@ -374,13 +351,11 @@ with wrapping around the current Info node."
(unless (and (boundp 'Info-fontify) (null Info-fontify)) (unless (and (boundp 'Info-fontify) (null Info-fontify))
'(turn-on-font-lock)) '(turn-on-font-lock))
"Hook run when activating Info Mode." "Hook run when activating Info Mode."
:type 'hook :type 'hook)
:group 'info)
(defcustom Info-selection-hook nil (defcustom Info-selection-hook nil
"Hook run when an Info node is selected as the current node." "Hook run when an Info node is selected as the current node."
:type 'hook :type 'hook)
:group 'info)
(defvar-local Info-current-file nil (defvar-local Info-current-file nil
"Info file that Info is now looking at, or nil. "Info file that Info is now looking at, or nil.
@ -1473,9 +1448,10 @@ is non-nil)."
(defvar Info-streamline-headings (defvar Info-streamline-headings
'(("Emacs" . "Emacs") '(("Emacs" . "Emacs")
("Programming" . "Programming") ("Software development\\|Programming" . "Software development")
("Libraries" . "Libraries") ("Libraries" . "Libraries")
("World Wide Web\\|Net Utilities" . "Net Utilities")) ("Network applications\\|World Wide Web\\|Net Utilities"
. "Network applications"))
"List of elements (RE . NAME) to merge headings matching RE to NAME.") "List of elements (RE . NAME) to merge headings matching RE to NAME.")
(defun Info-dir-remove-duplicates () (defun Info-dir-remove-duplicates ()

View file

@ -1,4 +1,4 @@
;;; iso-ascii.el --- set up char tables for ISO 8859/1 on ASCII terminals ;;; iso-ascii.el --- set up char tables for ISO 8859/1 on ASCII terminals -*- lexical-binding: t -*-
;; Copyright (C) 1987, 1995, 1998, 2001-2020 Free Software Foundation, ;; Copyright (C) 1987, 1995, 1998, 2001-2020 Free Software Foundation,
;; Inc. ;; Inc.
@ -41,8 +41,7 @@
(defcustom iso-ascii-convenient nil (defcustom iso-ascii-convenient nil
"Non-nil means `iso-ascii' should aim for convenience, not precision." "Non-nil means `iso-ascii' should aim for convenience, not precision."
:type 'boolean :type 'boolean)
:group 'iso-ascii)
(defvar iso-ascii-display-table (make-display-table) (defvar iso-ascii-display-table (make-display-table)
"Display table used for ISO-ASCII mode.") "Display table used for ISO-ASCII mode.")

View file

@ -1711,8 +1711,8 @@ in-place."
;; self-extracting exe archives. ;; self-extracting exe archives.
(mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg))) (mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg)))
'(("\\.\\(\ '(("\\.\\(\
arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|7z\\|\ arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|7z\\|squashfs\\|\
ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\|SQUASHFS\\)\\'"
. no-conversion-multibyte) . no-conversion-multibyte)
("\\.\\(exe\\|EXE\\)\\'" . no-conversion) ("\\.\\(exe\\|EXE\\)\\'" . no-conversion)
("\\.\\(sx[dmicw]\\|odt\\|tar\\|t[bg]z\\)\\'" . no-conversion) ("\\.\\(sx[dmicw]\\|odt\\|tar\\|t[bg]z\\)\\'" . no-conversion)

View file

@ -141,6 +141,20 @@ thin (i.e. 1-dot width) space."
(vector "[\u0600-\u074F\u200C\u200D]+" (vector "[\u0600-\u074F\u200C\u200D]+"
0 'arabic-shape-gstring))) 0 'arabic-shape-gstring)))
;; The Egyptian Hieroglyph Format Controls were introduced in Unicode
;; Standard v12.0. Apparently, they are not yet well supported in
;; existing fonts, as of late 2020. But there's no reason for us not
;; to be ready for when they will be!
;; The below is needed to support the arrangement of the Egyptian
;; Hieroglyphs in "quadrats", as directed by the format controls,
;; which specify how the hieroglyphs should be joined horizontally and
;; vertically.
(set-char-table-range
composition-function-table
'(#x13000 . #x1343F)
(list (vector "[\U00013000-\U0001343F]+"
0 'compose-gstring-for-graphic)))
(provide 'misc-lang) (provide 'misc-lang)
;;; misc-lang.el ends here ;;; misc-lang.el ends here

View file

@ -1,4 +1,4 @@
;;; utf-8-lang.el --- generic UTF-8 language environment ;;; utf-8-lang.el --- generic UTF-8 language environment -*- lexical-binding: t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc. ;; Copyright (C) 2001-2020 Free Software Foundation, Inc.

View file

@ -234,11 +234,10 @@ If the feature is required by any other loaded code, and prefix arg FORCE
is nil, raise an error. is nil, raise an error.
Standard unloading activities include restoring old autoloads for Standard unloading activities include restoring old autoloads for
functions defined by the library, undoing any additions that the functions defined by the library, removing such functions from
library has made to hook variables or to `auto-mode-alist', undoing hooks and `auto-mode-alist', undoing their ELP profiling,
ELP profiling of functions in that library, unproviding any features unproviding any features provided by the library, and canceling
provided by the library, and canceling timers held in variables timers held in variables defined by the library.
defined by the library.
If a function `FEATURE-unload-function' is defined, this function If a function `FEATURE-unload-function' is defined, this function
calls it with no arguments, before doing anything else. That function calls it with no arguments, before doing anything else. That function
@ -287,22 +286,32 @@ something strange, such as redefining an Emacs function."
;; functions which the package might just have installed, and ;; functions which the package might just have installed, and
;; there might be other important state, but this tactic ;; there might be other important state, but this tactic
;; normally works. ;; normally works.
(mapatoms (let ((removables (cl-loop for def in unload-function-defs-list
(lambda (x) when (and (eq (car-safe def) 'defun)
(when (and (boundp x) (not (get (cdr def) 'autoload)))
(or (and (consp (symbol-value x)) ; Random hooks. collect (cdr def))))
(string-match "-hooks?\\'" (symbol-name x))) (mapatoms
(memq x unload-feature-special-hooks))) ; Known abnormal hooks etc. (lambda (x)
(dolist (y unload-function-defs-list) (when (and (boundp x)
(when (and (eq (car-safe y) 'defun) (or (and (consp (symbol-value x)) ; Random hooks.
(not (get (cdr y) 'autoload))) (string-match "-hooks?\\'" (symbol-name x)))
(remove-hook x (cdr y))))))) ;; Known abnormal hooks etc.
;; Remove any feature-symbols from auto-mode-alist as well. (memq x unload-feature-special-hooks)))
(dolist (y unload-function-defs-list) (dolist (func removables)
(when (and (eq (car-safe y) 'defun) (remove-hook x func)))))
(not (get (cdr y) 'autoload))) (save-current-buffer
(setq auto-mode-alist (dolist (buffer (buffer-list))
(rassq-delete-all (cdr y) auto-mode-alist))))) (pcase-dolist (`(,sym . ,val) (buffer-local-variables buffer))
(when (or (and (consp val)
(string-match "-hooks?\\'" (symbol-name sym)))
(memq sym unload-feature-special-hooks))
(set-buffer buffer)
(dolist (func removables)
(remove-hook sym func t))))))
;; Remove any feature-symbols from auto-mode-alist as well.
(dolist (func removables)
(setq auto-mode-alist
(rassq-delete-all func auto-mode-alist)))))
;; Change major mode in all buffers using one defined in the feature being unloaded. ;; Change major mode in all buffers using one defined in the feature being unloaded.
(unload--set-major-mode) (unload--set-major-mode)

View file

@ -29,12 +29,6 @@
;;; Code: ;;; Code:
(eval-and-compile
(defalias 'binhex-char-int
(if (fboundp 'char-int)
'char-int
'identity)))
(defgroup binhex nil (defgroup binhex nil
"Decoding of BinHex (binary-to-hexadecimal) data." "Decoding of BinHex (binary-to-hexadecimal) data."
:group 'mail :group 'mail
@ -150,14 +144,14 @@ input and write the converted data to its standard output."
(defun binhex-string-big-endian (string) (defun binhex-string-big-endian (string)
(let ((ret 0) (i 0) (len (length string))) (let ((ret 0) (i 0) (len (length string)))
(while (< i len) (while (< i len)
(setq ret (+ (ash ret 8) (binhex-char-int (aref string i))) (setq ret (+ (ash ret 8) (aref string i))
i (1+ i))) i (1+ i)))
ret)) ret))
(defun binhex-string-little-endian (string) (defun binhex-string-little-endian (string)
(let ((ret 0) (i 0) (shift 0) (len (length string))) (let ((ret 0) (i 0) (shift 0) (len (length string)))
(while (< i len) (while (< i len)
(setq ret (+ ret (ash (binhex-char-int (aref string i)) shift)) (setq ret (+ ret (ash (aref string i) shift))
i (1+ i) i (1+ i)
shift (+ shift 8))) shift (+ shift 8)))
ret)) ret))
@ -167,11 +161,11 @@ input and write the converted data to its standard output."
(let ((pos (point-min)) len) (let ((pos (point-min)) len)
(vector (vector
(prog1 (prog1
(setq len (binhex-char-int (char-after pos))) (setq len (char-after pos))
(setq pos (1+ pos))) (setq pos (1+ pos)))
(buffer-substring pos (setq pos (+ pos len))) (buffer-substring pos (setq pos (+ pos len)))
(prog1 (prog1
(setq len (binhex-char-int (char-after pos))) (setq len (char-after pos))
(setq pos (1+ pos))) (setq pos (1+ pos)))
(buffer-substring pos (setq pos (+ pos 4))) (buffer-substring pos (setq pos (+ pos 4)))
(buffer-substring pos (setq pos (+ pos 4))) (buffer-substring pos (setq pos (+ pos 4)))
@ -323,6 +317,8 @@ If HEADER-ONLY is non-nil only decode header and return filename."
(binhex-decode-region-external start end) (binhex-decode-region-external start end)
(binhex-decode-region-internal start end))) (binhex-decode-region-internal start end)))
(define-obsolete-function-alias 'binhex-char-int #'identity)
(provide 'binhex) (provide 'binhex)
;;; binhex.el ends here ;;; binhex.el ends here

View file

@ -5,7 +5,7 @@
;; Author: Steven L Baur <steve@xemacs.org> (1997-2011) ;; Author: Steven L Baur <steve@xemacs.org> (1997-2011)
;; Boruch Baum <boruch_baum@gmx.com> (2017-) ;; Boruch Baum <boruch_baum@gmx.com> (2017-)
;; Keywords: mail, news ;; Keywords: mail, news
;; Version: 0.19 ;; Old-Version: 0.19
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.

View file

@ -1856,6 +1856,11 @@ place. It affects how `mail-extract-address-components' works."
;; https://www.iana.org/cctld/cctld-whois.htm ;; https://www.iana.org/cctld/cctld-whois.htm
;; Latest change: 2007/11/15 ;; Latest change: 2007/11/15
;; FIXME: There are over 1500 top level domains, the vast majority of
;; which are not in the below list. Should they be?
;; https://data.iana.org/TLD/tlds-alpha-by-domain.txt
;; https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
(defconst mail-extr-all-top-level-domains (defconst mail-extr-all-top-level-domains
(let ((ob (make-vector 739 0))) (let ((ob (make-vector 739 0)))
(mapc (mapc
@ -2145,6 +2150,80 @@ place. It affects how `mail-extract-address-components' works."
("uucp" t "Unix to Unix CoPy") ("uucp" t "Unix to Unix CoPy")
;; Infrastructure Domains: ;; Infrastructure Domains:
("arpa" t "Advanced Research Projects Agency (U.S. DoD)") ("arpa" t "Advanced Research Projects Agency (U.S. DoD)")
;; Geographic Domains:
("abudhabi" "Abu Dhabi")
("africa" "Africa")
("alsace" "Alsace, France")
("amsterdam" "Amsterdam, The Netherlands")
("arab" "League of Arab States")
("asia" "Asia-Pacific region")
("bar" "Bar, Montenegro")
("barcelona" "Barcelona, Spain")
("bayern" "Bavaria, Germany")
("bcn" "Barcelona, Spain")
("berlin" "Berlin, Germany")
("boston" "Boston, Massachusetts")
("brussels" "Brussels, Belgium")
("budapest" "Budapest, Hungary")
("bzh" "Brittany, France")
("capetown" "Cape Town, South Africa")
("cat" "Catalonia, Spain")
("cologne" "Cologne, Germany")
("corsica" "Corsica, France")
("cymru" "Wales, United Kingdom")
("doha" "Doha")
("dubai" "Dubai")
("durban" "Durban, South Africa")
("eus" "Basque, Spain and France")
("frl" "Friesland, Netherlands")
("gal" "Galicia, Spain")
("gent" "Ghent, Belgium")
("hamburg" "Hamburg, Germany")
("helsinki" "Helsinki, Finland")
("irish" "Ireland")
("ist" "İstanbul, Turkey")
("istanbul" "İstanbul, Turkey")
("joburg" "Johannesburg, South Africa")
("kiwi" "New Zealanders")
("koeln" "Cologne, Germany")
("krd" "Kurdistan")
("kyoto" "Kyoto, Japan")
("lat" "Latin America")
("london" "London, United Kingdom")
("madrid" "Madrid, Spain")
("melbourne" "Melbourne, Australia")
("miami" "Miami, Florida")
("nagoya" "Nagoya, Japan")
("nrw" "North Rhine-Westphalia, Germany")
("nyc" "New York City, New York")
("okinawa" "Okinawa, Japan")
("osaka" "Osaka, Japan")
("paris" "Paris, France")
("quebec" "Québec, Canada")
("rio" "Rio de Janeiro, Brazil")
("ruhr" "Ruhr, Germany")
("ryukyu" "Ryukyu Islands, Japan")
("saarland" "Saarland, Germany")
("scot" "Scotland, United Kingdom")
("stockholm" "Stockholm, Sweden")
("swiss" "Switzerland")
("sydney" "Sydney, Australia")
("taipei" "Taipei, Taiwan")
("tatar" "Tatars")
("tirol" "Tyrol, Austria")
("tokyo" "Tokyo, Japan")
("vegas" "Las Vegas, Nevada")
("wales" "Wales, United Kingdom")
("wien" "Vienna, Austria")
("yokohama" "Yokohama, Japan")
("zuerich" "Zurich, Switzerland")
;; Internationalized Geographic Domains:
("xn--1qqw23a" "Foshan, China")
("xn--xhq521b" "Guangdong, China")
("xn--80adxhks" "Moscow, Russia")
("xn--p1acf" "Russia")
("xn--mgbca7dzdo" "Abu Dhabi")
("xn--ngbrx" "Arab")
)) ))
ob)) ob))

View file

@ -215,23 +215,25 @@ These look like:
\"\\='en-us\\='This%20is%20%2A%2A%2Afun%2A%2A%2A\", \"\\='en-us\\='This%20is%20%2A%2A%2Afun%2A%2A%2A\",
\"\\='\\='This%20is%20%2A%2A%2Afun%2A%2A%2A\", or \"\\='\\='This%20is%20%2A%2A%2Afun%2A%2A%2A\", or
\"This is ***fun***\"." \"This is ***fun***\"."
(string-match "\\`\\(?:\\([^']+\\)?'\\([^']+\\)?'\\)?\\(.+\\)" string) (if (not (string-match "\\`\\(?:\\([^']+\\)?'\\([^']+\\)?'\\)?\\(.+\\)\\'"
(let ((coding-system (mm-charset-to-coding-system string))
(match-string 1 string) nil t)) (error "Unrecognized RFC2231 format: %S" string)
;;(language (match-string 2 string)) (let ((value (match-string 3 string))
(value (match-string 3 string))) ;;(language (match-string 2 string))
(mm-with-unibyte-buffer (coding-system (mm-charset-to-coding-system
(insert value) (match-string 1 string) nil t)))
(goto-char (point-min)) (mm-with-unibyte-buffer
(while (re-search-forward "%\\([[:xdigit:]][[:xdigit:]]\\)" nil t) (insert value)
(insert (goto-char (point-min))
(prog1 (while (re-search-forward "%\\([[:xdigit:]][[:xdigit:]]\\)" nil t)
(string-to-number (match-string 1) 16) (insert
(delete-region (match-beginning 0) (match-end 0))))) (prog1
;; Decode using the charset, if any. (string-to-number (match-string 1) 16)
(if (memq coding-system '(nil ascii)) (delete-region (match-beginning 0) (match-end 0)))))
(buffer-string) ;; Decode using the charset, if any.
(decode-coding-string (buffer-string) coding-system))))) (if (memq coding-system '(nil ascii))
(buffer-string)
(decode-coding-string (buffer-string) coding-system))))))
(defun rfc2231-encode-string (param value) (defun rfc2231-encode-string (param value)
"Return a PARAM=VALUE string encoded according to RFC2231. "Return a PARAM=VALUE string encoded according to RFC2231.

View file

@ -24,11 +24,6 @@
;;; Code: ;;; Code:
(defalias 'uudecode-char-int
(if (fboundp 'char-int)
'char-int
'identity))
(defgroup uudecode nil (defgroup uudecode nil
"Decoding of uuencoded data." "Decoding of uuencoded data."
:group 'mail :group 'mail
@ -140,7 +135,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME."
((> (skip-chars-forward uudecode-alphabet end) 0) ((> (skip-chars-forward uudecode-alphabet end) 0)
(setq lim (point)) (setq lim (point))
(setq remain (setq remain
(logand (- (uudecode-char-int (char-after inputpos)) 32) (logand (- (char-after inputpos) 32)
63)) 63))
(setq inputpos (1+ inputpos)) (setq inputpos (1+ inputpos))
(if (= remain 0) (setq done t)) (if (= remain 0) (setq done t))
@ -148,7 +143,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME."
(setq bits (+ bits (setq bits (+ bits
(logand (logand
(- (-
(uudecode-char-int (char-after inputpos)) 32) (char-after inputpos) 32)
63))) 63)))
(if (/= counter 0) (setq remain (1- remain))) (if (/= counter 0) (setq remain (1- remain)))
(setq counter (1+ counter) (setq counter (1+ counter)
@ -201,6 +196,8 @@ If FILE-NAME is non-nil, save the result to FILE-NAME."
(uudecode-decode-region-external start end file-name) (uudecode-decode-region-external start end file-name)
(uudecode-decode-region-internal start end file-name))) (uudecode-decode-region-internal start end file-name)))
(define-obsolete-function-alias 'uudecode-char-int #'identity "28.1")
(provide 'uudecode) (provide 'uudecode)
;;; uudecode.el ends here ;;; uudecode.el ends here

View file

@ -4,7 +4,7 @@
;; Author: Taro Kawagishi <tarok@transpulse.org> ;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: MD4 ;; Keywords: MD4
;; Version: 1.00 ;; Old-Version: 1.00
;; Created: February 2001 ;; Created: February 2001
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.

View file

@ -776,44 +776,50 @@ The text is displayed for `minibuffer-message-clear-timeout' seconds
whichever comes first. whichever comes first.
Unlike `minibuffer-message', this function is called automatically Unlike `minibuffer-message', this function is called automatically
via `set-message-function'." via `set-message-function'."
(when (and (not noninteractive) (let* ((minibuf-window (active-minibuffer-window))
(window-live-p (active-minibuffer-window))) (minibuf-frame (and (window-live-p minibuf-window)
(with-current-buffer (window-buffer (active-minibuffer-window)) (window-frame minibuf-window))))
(setq message (if (string-match-p "\\` *\\[.+\\]\\'" message) (when (and (not noninteractive)
;; Make sure we can put-text-property. (window-live-p minibuf-window)
(copy-sequence message) (or (eq (window-frame) minibuf-frame)
(concat " [" message "]"))) (eq (frame-parameter minibuf-frame 'minibuffer) 'only)))
(unless (or (null minibuffer-message-properties) (with-current-buffer (window-buffer minibuf-window)
;; Don't overwrite the face properties the caller has set (setq message (if (string-match-p "\\` *\\[.+\\]\\'" message)
(text-properties-at 0 message)) ;; Make sure we can put-text-property.
(setq message (apply #'propertize message minibuffer-message-properties))) (copy-sequence message)
(concat " [" message "]")))
(unless (or (null minibuffer-message-properties)
;; Don't overwrite the face properties the caller has set
(text-properties-at 0 message))
(setq message
(apply #'propertize message minibuffer-message-properties)))
(clear-minibuffer-message) (clear-minibuffer-message)
(let ((ovpos (minibuffer--message-overlay-pos))) (let ((ovpos (minibuffer--message-overlay-pos)))
(setq minibuffer-message-overlay (setq minibuffer-message-overlay
(make-overlay ovpos ovpos nil t t))) (make-overlay ovpos ovpos nil t t)))
(unless (zerop (length message)) (unless (zerop (length message))
;; The current C cursor code doesn't know to use the overlay's ;; The current C cursor code doesn't know to use the overlay's
;; marker's stickiness to figure out whether to place the cursor ;; marker's stickiness to figure out whether to place the cursor
;; before or after the string, so let's spoon-feed it the pos. ;; before or after the string, so let's spoon-feed it the pos.
(put-text-property 0 1 'cursor 1 message)) (put-text-property 0 1 'cursor 1 message))
(overlay-put minibuffer-message-overlay 'after-string message) (overlay-put minibuffer-message-overlay 'after-string message)
;; Make sure the overlay with the message is displayed before ;; Make sure the overlay with the message is displayed before
;; any other overlays in that position, in case they have ;; any other overlays in that position, in case they have
;; resize-mini-windows set to nil and the other overlay strings ;; resize-mini-windows set to nil and the other overlay strings
;; are too long for the mini-window width. This makes sure the ;; are too long for the mini-window width. This makes sure the
;; temporary message will always be visible. ;; temporary message will always be visible.
(overlay-put minibuffer-message-overlay 'priority 1100) (overlay-put minibuffer-message-overlay 'priority 1100)
(when (numberp minibuffer-message-clear-timeout) (when (numberp minibuffer-message-clear-timeout)
(setq minibuffer-message-timer (setq minibuffer-message-timer
(run-with-timer minibuffer-message-clear-timeout nil (run-with-timer minibuffer-message-clear-timeout nil
#'clear-minibuffer-message))) #'clear-minibuffer-message)))
;; Return `t' telling the caller that the message ;; Return `t' telling the caller that the message
;; was handled specially by this function. ;; was handled specially by this function.
t))) t))))
(setq set-message-function 'set-minibuffer-message) (setq set-message-function 'set-minibuffer-message)

View file

@ -819,8 +819,8 @@ The songs are returned as alists."
(defun mpc-cmd-status () (defun mpc-cmd-status ()
(mpc-proc-cmd-to-alist "status")) (mpc-proc-cmd-to-alist "status"))
(defun mpc-cmd-play () (defun mpc-cmd-play (&optional sn)
(mpc-proc-cmd "play") (mpc-proc-cmd (if sn (list "play" sn) "play"))
(mpc-status-refresh)) (mpc-status-refresh))
(defun mpc-cmd-seekcur (time) (defun mpc-cmd-seekcur (time)
@ -849,7 +849,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
;; Sort them from last to first, so the renumbering ;; Sort them from last to first, so the renumbering
;; caused by the earlier deletions don't affect ;; caused by the earlier deletions don't affect
;; later ones. ;; later ones.
(sort song-poss '>)))) (sort (copy-sequence song-poss) '>))))
(if (stringp playlist) (if (stringp playlist)
(puthash (cons 'Playlist playlist) nil mpc--find-memoize))) (puthash (cons 'Playlist playlist) nil mpc--find-memoize)))
@ -873,7 +873,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
;; Sort them from last to first, so the renumbering ;; Sort them from last to first, so the renumbering
;; caused by the earlier deletions affect ;; caused by the earlier deletions affect
;; later ones a bit less. ;; later ones a bit less.
(sort song-poss '>)))) (sort (copy-sequence song-poss) '>))))
(if (stringp playlist) (if (stringp playlist)
(puthash (cons 'Playlist playlist) nil mpc--find-memoize)))) (puthash (cons 'Playlist playlist) nil mpc--find-memoize))))
@ -2089,7 +2089,7 @@ This is used so that they can be compared with `eq', which is needed for
((null (with-current-buffer plbuf (re-search-forward re nil t))) ((null (with-current-buffer plbuf (re-search-forward re nil t)))
;; song-file only appears once in the playlist: no ambiguity, ;; song-file only appears once in the playlist: no ambiguity,
;; we're good to go! ;; we're good to go!
(mpc-proc-cmd (list "play" sn))) (mpc-cmd-play sn))
(t (t
;; The song appears multiple times in the playlist. If the current ;; The song appears multiple times in the playlist. If the current
;; buffer holds not only the destination song but also the current ;; buffer holds not only the destination song but also the current
@ -2391,6 +2391,7 @@ This is used so that they can be compared with `eq', which is needed for
(interactive) (interactive)
(mpc-cmd-stop) (mpc-cmd-stop)
(mpc-cmd-clear) (mpc-cmd-clear)
(mpc-songs-refresh)
(mpc-status-refresh)) (mpc-status-refresh))
(defun mpc-pause () (defun mpc-pause ()

View file

@ -134,6 +134,8 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Code: ;;; Code:
(require 'url)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Variables ;; Variables
@ -1374,10 +1376,16 @@ Optional argument SAME-WINDOW non-nil means show the URL in the
currently selected window instead." currently selected window instead."
(interactive (browse-url-interactive-arg "URL: ")) (interactive (browse-url-interactive-arg "URL: "))
(require 'url-handlers) (require 'url-handlers)
(let ((file-name-handler-alist (let ((parsed (url-generic-parse-url url))
(cons (cons url-handler-regexp 'url-file-handler) (func (if same-window 'find-file 'find-file-other-window)))
file-name-handler-alist))) (if (and (equal (url-type parsed) "file")
(if same-window (find-file url) (find-file-other-window url)))) (file-directory-p (url-filename parsed)))
;; It's a directory; just open it.
(funcall func (url-filename parsed))
(let ((file-name-handler-alist
(cons (cons url-handler-regexp 'url-file-handler)
file-name-handler-alist)))
(funcall func url)))))
(function-put 'browse-url-emacs 'browse-url-browser-kind 'internal) (function-put 'browse-url-emacs 'browse-url-browser-kind 'internal)

View file

@ -695,11 +695,12 @@ Currently this means either text/html or application/xhtml+xml."
(eww-handle-link dom) (eww-handle-link dom)
(let ((start (point))) (let ((start (point)))
(shr-tag-a dom) (shr-tag-a dom)
(put-text-property start (point) (if (dom-attr dom 'href)
'keymap (put-text-property start (point)
(if (mm-images-in-region-p start (point)) 'keymap
eww-image-link-keymap (if (mm-images-in-region-p start (point))
eww-link-keymap)))) eww-image-link-keymap
eww-link-keymap)))))
(defun eww--limit-string-pixelwise (string pixels) (defun eww--limit-string-pixelwise (string pixels)
(if (not pixels) (if (not pixels)

View file

@ -4,7 +4,7 @@
;; Author: Taro Kawagishi <tarok@transpulse.org> ;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: SASL, NTLM ;; Keywords: SASL, NTLM
;; Version: 1.00 ;; Old-Version: 1.00
;; Created: February 2001 ;; Created: February 2001
;; Package: sasl ;; Package: sasl

View file

@ -2850,8 +2850,10 @@ implementation will be used."
;; command. ;; command.
(heredoc (and (stringp program) (heredoc (and (stringp program)
(string-match-p "sh$" program) (string-match-p "sh$" program)
(= (length args) 2)
(string-equal "-c" (car args)) (string-equal "-c" (car args))
(= (length args) 2))) ;; Don't if there is a string.
(not (string-match-p "'\\|\"" (cadr args)))))
;; When PROGRAM is nil, we just provide a tty. ;; When PROGRAM is nil, we just provide a tty.
(args (if (not heredoc) args (args (if (not heredoc) args
(let ((i 250)) (let ((i 250))

View file

@ -1235,6 +1235,8 @@ have been gone since last remote command execution. A value of t
would require an immediate reread during filename completion, nil would require an immediate reread during filename completion, nil
means to use always cached values for the directory contents." means to use always cached values for the directory contents."
:type '(choice (const nil) (const t) integer)) :type '(choice (const nil) (const t) integer))
(make-obsolete-variable
'tramp-completion-reread-directory-timeout 'remote-file-name-inhibit-cache "27.2")
;;; Internal Variables: ;;; Internal Variables:

View file

@ -2230,7 +2230,7 @@ ENDP is t in the former case, nil in the latter."
(skip-line-prefix fill-prefix) (skip-line-prefix fill-prefix)
fill-prefix)) fill-prefix))
(defun nxml-newline-and-indent (soft) (defun nxml-newline-and-indent (&optional soft)
(delete-horizontal-space) (delete-horizontal-space)
(if soft (insert-and-inherit ?\n) (newline 1)) (if soft (insert-and-inherit ?\n) (newline 1))
(nxml-indent-line)) (nxml-indent-line))

View file

@ -223,7 +223,8 @@ byte-compiled before it is loaded."
(org-babel-tangle-file file tangled-file "emacs-lisp")) (org-babel-tangle-file file tangled-file "emacs-lisp"))
(if compile (if compile
(progn (progn
(byte-compile-file tangled-file 'load) (byte-compile-file tangled-file)
(load tangled-file)
(message "Compiled and loaded %s" tangled-file)) (message "Compiled and loaded %s" tangled-file))
(load-file tangled-file) (load-file tangled-file)
(message "Loaded %s" tangled-file)))) (message "Loaded %s" tangled-file))))

View file

@ -1,4 +1,4 @@
;;; outline.el --- outline mode commands for Emacs ;;; outline.el --- outline mode commands for Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 1986, 1993-1995, 1997, 2000-2020 Free Software ;; Copyright (C) 1986, 1993-1995, 1997, 2000-2020 Free Software
;; Foundation, Inc. ;; Foundation, Inc.
@ -166,7 +166,7 @@ in the file it applies to.")
;; Remove extra separator ;; Remove extra separator
(cdr (cdr
;; Flatten the major mode's menus into a single menu. ;; Flatten the major mode's menus into a single menu.
(apply 'append (apply #'append
(mapcar (lambda (x) (mapcar (lambda (x)
(if (consp x) (if (consp x)
;; Add a separator between each ;; Add a separator between each
@ -196,47 +196,45 @@ in the file it applies to.")
(defface outline-1 (defface outline-1
'((t :inherit font-lock-function-name-face)) '((t :inherit font-lock-function-name-face))
"Level 1." "Level 1.")
:group 'outlines)
(defface outline-2 (defface outline-2
'((t :inherit font-lock-variable-name-face)) '((t :inherit font-lock-variable-name-face))
"Level 2." "Level 2.")
:group 'outlines)
(defface outline-3 (defface outline-3
'((t :inherit font-lock-keyword-face)) '((t :inherit font-lock-keyword-face))
"Level 3." "Level 3.")
:group 'outlines)
(defface outline-4 (defface outline-4
'((t :inherit font-lock-comment-face)) '((t :inherit font-lock-comment-face))
"Level 4." "Level 4.")
:group 'outlines)
(defface outline-5 (defface outline-5
'((t :inherit font-lock-type-face)) '((t :inherit font-lock-type-face))
"Level 5." "Level 5.")
:group 'outlines)
(defface outline-6 (defface outline-6
'((t :inherit font-lock-constant-face)) '((t :inherit font-lock-constant-face))
"Level 6." "Level 6.")
:group 'outlines)
(defface outline-7 (defface outline-7
'((t :inherit font-lock-builtin-face)) '((t :inherit font-lock-builtin-face))
"Level 7." "Level 7.")
:group 'outlines)
(defface outline-8 (defface outline-8
'((t :inherit font-lock-string-face)) '((t :inherit font-lock-string-face))
"Level 8." "Level 8.")
:group 'outlines)
(defvar outline-font-lock-faces (defvar outline-font-lock-faces
[outline-1 outline-2 outline-3 outline-4 [outline-1 outline-2 outline-3 outline-4
outline-5 outline-6 outline-7 outline-8]) outline-5 outline-6 outline-7 outline-8])
(defvar outline-level #'outline-level
"Function of no args to compute a header's nesting level in an outline.
It can assume point is at the beginning of a header line and that the match
data reflects the `outline-regexp'.")
;;;###autoload(put 'outline-level 'risky-local-variable t)
(defun outline-font-lock-face () (defun outline-font-lock-face ()
"Return one of `outline-font-lock-faces' for current level." "Return one of `outline-font-lock-faces' for current level."
@ -279,21 +277,20 @@ beginning of the line. The longer the match, the deeper the level.
Turning on outline mode calls the value of `text-mode-hook' and then of Turning on outline mode calls the value of `text-mode-hook' and then of
`outline-mode-hook', if they are non-nil." `outline-mode-hook', if they are non-nil."
(make-local-variable 'line-move-ignore-invisible) (setq-local line-move-ignore-invisible t)
(setq line-move-ignore-invisible t)
;; Cause use of ellipses for invisible text. ;; Cause use of ellipses for invisible text.
(add-to-invisibility-spec '(outline . t)) (add-to-invisibility-spec '(outline . t))
(set (make-local-variable 'paragraph-start) (setq-local paragraph-start
(concat paragraph-start "\\|\\(?:" outline-regexp "\\)")) (concat paragraph-start "\\|\\(?:" outline-regexp "\\)"))
;; Inhibit auto-filling of header lines. ;; Inhibit auto-filling of header lines.
(set (make-local-variable 'auto-fill-inhibit-regexp) outline-regexp) (setq-local auto-fill-inhibit-regexp outline-regexp)
(set (make-local-variable 'paragraph-separate) (setq-local paragraph-separate
(concat paragraph-separate "\\|\\(?:" outline-regexp "\\)")) (concat paragraph-separate "\\|\\(?:" outline-regexp "\\)"))
(set (make-local-variable 'font-lock-defaults) (setq-local font-lock-defaults
'(outline-font-lock-keywords t nil nil backward-paragraph)) '(outline-font-lock-keywords t nil nil backward-paragraph))
(setq imenu-generic-expression (setq-local imenu-generic-expression
(list (list nil (concat "^\\(?:" outline-regexp "\\).*$") 0))) (list (list nil (concat "^\\(?:" outline-regexp "\\).*$") 0)))
(add-hook 'change-major-mode-hook 'outline-show-all nil t)) (add-hook 'change-major-mode-hook #'outline-show-all nil t))
(defvar outline-minor-mode-map) (defvar outline-minor-mode-map)
@ -302,7 +299,6 @@ Turning on outline mode calls the value of `text-mode-hook' and then of
The value of this variable is checked as part of loading Outline mode. The value of this variable is checked as part of loading Outline mode.
After that, changing the prefix key requires manipulating keymaps." After that, changing the prefix key requires manipulating keymaps."
:type 'key-sequence :type 'key-sequence
:group 'outlines
:initialize 'custom-initialize-default :initialize 'custom-initialize-default
:set (lambda (sym val) :set (lambda (sym val)
(define-key outline-minor-mode-map outline-minor-mode-prefix nil) (define-key outline-minor-mode-map outline-minor-mode-prefix nil)
@ -316,7 +312,6 @@ After that, changing the prefix key requires manipulating keymaps."
See the command `outline-mode' for more information on this mode." See the command `outline-mode' for more information on this mode."
nil " Outl" (list (cons [menu-bar] outline-minor-mode-menu-bar-map) nil " Outl" (list (cons [menu-bar] outline-minor-mode-menu-bar-map)
(cons outline-minor-mode-prefix outline-mode-prefix-map)) (cons outline-minor-mode-prefix outline-mode-prefix-map))
:group 'outlines
(if outline-minor-mode (if outline-minor-mode
(progn (progn
;; Turn off this mode if we change major modes. ;; Turn off this mode if we change major modes.
@ -331,14 +326,8 @@ See the command `outline-mode' for more information on this mode."
(remove-from-invisibility-spec '(outline . t)) (remove-from-invisibility-spec '(outline . t))
;; When turning off outline mode, get rid of any outline hiding. ;; When turning off outline mode, get rid of any outline hiding.
(outline-show-all))) (outline-show-all)))
(defvar outline-level 'outline-level
"Function of no args to compute a header's nesting level in an outline.
It can assume point is at the beginning of a header line and that the match
data reflects the `outline-regexp'.")
;;;###autoload(put 'outline-level 'risky-local-variable t)
(defvar outline-heading-alist () (defvar-local outline-heading-alist ()
"Alist associating a heading for every possible level. "Alist associating a heading for every possible level.
Each entry is of the form (HEADING . LEVEL). Each entry is of the form (HEADING . LEVEL).
This alist is used two ways: to find the heading corresponding to This alist is used two ways: to find the heading corresponding to
@ -357,7 +346,6 @@ within each set. For example in texinfo mode:
Instead of sorting the entries in each set, you can also separate the Instead of sorting the entries in each set, you can also separate the
sets with nil.") sets with nil.")
(make-variable-buffer-local 'outline-heading-alist)
;; This used to count columns rather than characters, but that made ^L ;; This used to count columns rather than characters, but that made ^L
;; appear to be at level 2 instead of 1. Columns would be better for ;; appear to be at level 2 instead of 1. Columns would be better for
@ -402,6 +390,8 @@ at the end of the buffer."
If POS is nil, use `point' instead." If POS is nil, use `point' instead."
(eq (get-char-property (or pos (point)) 'invisible) 'outline)) (eq (get-char-property (or pos (point)) 'invisible) 'outline))
(define-error 'outline-before-first-heading "Before first heading")
(defun outline-back-to-heading (&optional invisible-ok) (defun outline-back-to-heading (&optional invisible-ok)
"Move to previous heading line, or beg of this line if it's a heading. "Move to previous heading line, or beg of this line if it's a heading.
Only visible heading lines are considered, unless INVISIBLE-OK is non-nil." Only visible heading lines are considered, unless INVISIBLE-OK is non-nil."
@ -412,7 +402,7 @@ Only visible heading lines are considered, unless INVISIBLE-OK is non-nil."
(while (not found) (while (not found)
(or (re-search-backward (concat "^\\(?:" outline-regexp "\\)") (or (re-search-backward (concat "^\\(?:" outline-regexp "\\)")
nil t) nil t)
(error "Before first heading")) (signal 'outline-before-first-heading nil))
(setq found (and (or invisible-ok (not (outline-invisible-p))) (setq found (and (or invisible-ok (not (outline-invisible-p)))
(point))))) (point)))))
(goto-char found) (goto-char found)
@ -477,9 +467,9 @@ nil for WHICH, or do not pass any argument)."
(if current-prefix-arg nil 'subtree)))) (if current-prefix-arg nil 'subtree))))
(cond (cond
((eq which 'region) ((eq which 'region)
(outline-map-region 'outline-promote (region-beginning) (region-end))) (outline-map-region #'outline-promote (region-beginning) (region-end)))
(which (which
(outline-map-region 'outline-promote (outline-map-region #'outline-promote
(point) (point)
(save-excursion (outline-get-next-sibling) (point)))) (save-excursion (outline-get-next-sibling) (point))))
(t (t
@ -516,9 +506,9 @@ nil for WHICH, or do not pass any argument)."
(if current-prefix-arg nil 'subtree)))) (if current-prefix-arg nil 'subtree))))
(cond (cond
((eq which 'region) ((eq which 'region)
(outline-map-region 'outline-demote (region-beginning) (region-end))) (outline-map-region #'outline-demote (region-beginning) (region-end)))
(which (which
(outline-map-region 'outline-demote (outline-map-region #'outline-demote
(point) (point)
(save-excursion (outline-get-next-sibling) (point)))) (save-excursion (outline-get-next-sibling) (point))))
(t (t
@ -698,12 +688,12 @@ This puts point at the start of the current subtree, and mark at the end."
(goto-char beg))) (goto-char beg)))
(defvar outline-isearch-open-invisible-function nil (defvar outline-isearch-open-invisible-function
#'outline-isearch-open-invisible
"Function called if `isearch' finishes in an invisible overlay. "Function called if `isearch' finishes in an invisible overlay.
The function is called with the overlay as its only argument. The function is called with the overlay as its only argument.")
If nil, `outline-show-entry' is called to reveal the invisible text.")
(put 'outline 'reveal-toggle-invisible 'outline-reveal-toggle-invisible) (put 'outline 'reveal-toggle-invisible #'outline-reveal-toggle-invisible)
(defun outline-flag-region (from to flag) (defun outline-flag-region (from to flag)
"Hide or show lines from FROM to TO, according to FLAG. "Hide or show lines from FROM to TO, according to FLAG.
If FLAG is nil then text is shown, while if FLAG is t the text is hidden." If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
@ -717,7 +707,7 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
(overlay-put o 'invisible 'outline) (overlay-put o 'invisible 'outline)
(overlay-put o 'isearch-open-invisible (overlay-put o 'isearch-open-invisible
(or outline-isearch-open-invisible-function (or outline-isearch-open-invisible-function
'outline-isearch-open-invisible)))) #'outline-isearch-open-invisible))))
;; Seems only used by lazy-lock. I.e. obsolete. ;; Seems only used by lazy-lock. I.e. obsolete.
(run-hooks 'outline-view-change-hook)) (run-hooks 'outline-view-change-hook))
@ -777,8 +767,7 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden."
(outline-end-of-heading) (outline-end-of-heading)
(outline-flag-region (point) (progn (outline-next-preface) (point)) t))) (outline-flag-region (point) (progn (outline-next-preface) (point)) t)))
(define-obsolete-function-alias (define-obsolete-function-alias 'hide-entry #'outline-hide-entry "25.1")
'hide-entry 'outline-hide-entry "25.1")
(defun outline-show-entry () (defun outline-show-entry ()
"Show the body directly following this heading. "Show the body directly following this heading.
@ -794,8 +783,7 @@ Show the heading too, if it is currently invisible."
(point))) (point)))
nil))) nil)))
(define-obsolete-function-alias (define-obsolete-function-alias 'show-entry #'outline-show-entry "25.1")
'show-entry 'outline-show-entry "25.1")
(defun outline-hide-body () (defun outline-hide-body ()
"Hide all body lines in buffer, leaving all headings visible. "Hide all body lines in buffer, leaving all headings visible.
@ -803,8 +791,7 @@ Note that this does not hide the lines preceding the first heading line."
(interactive) (interactive)
(outline-hide-region-body (point-min) (point-max))) (outline-hide-region-body (point-min) (point-max)))
(define-obsolete-function-alias (define-obsolete-function-alias 'hide-body #'outline-hide-body "25.1")
'hide-body 'outline-hide-body "25.1")
(defun outline-hide-region-body (start end) (defun outline-hide-region-body (start end)
"Hide all body lines between START and END, but not headings." "Hide all body lines between START and END, but not headings."
@ -828,23 +815,21 @@ Note that this does not hide the lines preceding the first heading line."
(run-hooks 'outline-view-change-hook)) (run-hooks 'outline-view-change-hook))
(define-obsolete-function-alias (define-obsolete-function-alias
'hide-region-body 'outline-hide-region-body "25.1") 'hide-region-body #'outline-hide-region-body "25.1")
(defun outline-show-all () (defun outline-show-all ()
"Show all of the text in the buffer." "Show all of the text in the buffer."
(interactive) (interactive)
(outline-flag-region (point-min) (point-max) nil)) (outline-flag-region (point-min) (point-max) nil))
(define-obsolete-function-alias (define-obsolete-function-alias 'show-all #'outline-show-all "25.1")
'show-all 'outline-show-all "25.1")
(defun outline-hide-subtree () (defun outline-hide-subtree ()
"Hide everything after this heading at deeper levels." "Hide everything after this heading at deeper levels."
(interactive) (interactive)
(outline-flag-subtree t)) (outline-flag-subtree t))
(define-obsolete-function-alias (define-obsolete-function-alias 'hide-subtree #'outline-hide-subtree "25.1")
'hide-subtree 'outline-hide-subtree "25.1")
(defun outline-hide-leaves () (defun outline-hide-leaves ()
"Hide the body after this heading and at deeper levels." "Hide the body after this heading and at deeper levels."
@ -857,16 +842,14 @@ Note that this does not hide the lines preceding the first heading line."
(point) (point)
(progn (outline-end-of-subtree) (point))))) (progn (outline-end-of-subtree) (point)))))
(define-obsolete-function-alias (define-obsolete-function-alias 'hide-leaves #'outline-hide-leaves "25.1")
'hide-leaves 'outline-hide-leaves "25.1")
(defun outline-show-subtree () (defun outline-show-subtree ()
"Show everything after this heading at deeper levels." "Show everything after this heading at deeper levels."
(interactive) (interactive)
(outline-flag-subtree nil)) (outline-flag-subtree nil))
(define-obsolete-function-alias (define-obsolete-function-alias 'show-subtree #'outline-show-subtree "25.1")
'show-subtree 'outline-show-subtree "25.1")
(defun outline-show-heading () (defun outline-show-heading ()
"Show the current heading and move to its end." "Show the current heading and move to its end."
@ -921,8 +904,7 @@ of the current heading, or to 1 if the current line is not a heading."
(outline-flag-region (1- (point)) (point) nil)))) (outline-flag-region (1- (point)) (point) nil))))
(run-hooks 'outline-view-change-hook)) (run-hooks 'outline-view-change-hook))
(define-obsolete-function-alias (define-obsolete-function-alias 'hide-sublevels #'outline-hide-sublevels "25.1")
'hide-sublevels 'outline-hide-sublevels "25.1")
(defun outline-hide-other () (defun outline-hide-other ()
"Hide everything except current body and parent and top-level headings. "Hide everything except current body and parent and top-level headings.
@ -940,8 +922,7 @@ This also unhides the top heading-less body, if any."
nil)))) nil))))
(run-hooks 'outline-view-change-hook)) (run-hooks 'outline-view-change-hook))
(define-obsolete-function-alias (define-obsolete-function-alias 'hide-other #'outline-hide-other "25.1")
'hide-other 'outline-hide-other "25.1")
(defun outline-toggle-children () (defun outline-toggle-children ()
"Show or hide the current subtree depending on its current state." "Show or hide the current subtree depending on its current state."
@ -985,8 +966,7 @@ This also unhides the top heading-less body, if any."
(interactive) (interactive)
(outline-show-children 1000)) (outline-show-children 1000))
(define-obsolete-function-alias (define-obsolete-function-alias 'show-branches #'outline-show-branches "25.1")
'show-branches 'outline-show-branches "25.1")
(defun outline-show-children (&optional level) (defun outline-show-children (&optional level)
"Show all direct subheadings of this heading. "Show all direct subheadings of this heading.
@ -1015,8 +995,7 @@ Default is enough to cause the following heading to appear."
(if (eobp) (point-max) (1+ (point))))))) (if (eobp) (point-max) (1+ (point)))))))
(run-hooks 'outline-view-change-hook)) (run-hooks 'outline-view-change-hook))
(define-obsolete-function-alias (define-obsolete-function-alias 'show-children #'outline-show-children "25.1")
'show-children 'outline-show-children "25.1")
@ -1167,19 +1146,21 @@ Return either 'hide-all, 'headings-only, or 'show-all."
`Headings only' means show sub headings but not their bodies. `Headings only' means show sub headings but not their bodies.
`Show all' means show all subheadings and their bodies." `Show all' means show all subheadings and their bodies."
(interactive) (interactive)
(pcase (outline--cycle-state) (condition-case nil
('hide-all (pcase (outline--cycle-state)
(if (outline-has-subheading-p) ('hide-all
(progn (outline-show-children) (if (outline-has-subheading-p)
(message "Only headings")) (progn (outline-show-children)
(outline-show-subtree) (message "Only headings"))
(message "Show all"))) (outline-show-subtree)
('headings-only (message "Show all")))
(outline-show-subtree) ('headings-only
(message "Show all")) (outline-show-subtree)
('show-all (message "Show all"))
(outline-hide-subtree) ('show-all
(message "Hide all")))) (outline-hide-subtree)
(message "Hide all")))
(outline-before-first-heading nil)))
(defvar-local outline--cycle-buffer-state 'show-all (defvar-local outline--cycle-buffer-state 'show-all
"Internal variable used for tracking buffer cycle state.") "Internal variable used for tracking buffer cycle state.")
@ -1189,13 +1170,7 @@ Return either 'hide-all, 'headings-only, or 'show-all."
(interactive) (interactive)
(pcase outline--cycle-buffer-state (pcase outline--cycle-buffer-state
('show-all ('show-all
(save-excursion (outline-hide-sublevels 1)
(let ((start-point (point)))
(while (not (eq (point) start-point))
(outline-up-heading 1))
(outline-hide-sublevels
(progn (outline-back-to-heading)
(funcall 'outline-level)))))
(setq outline--cycle-buffer-state 'top-level) (setq outline--cycle-buffer-state 'top-level)
(message "Top level headings")) (message "Top level headings"))
('top-level ('top-level

View file

@ -4,7 +4,7 @@
;; Author: Ron Schnell <ronnie@driver-aces.com> ;; Author: Ron Schnell <ronnie@driver-aces.com>
;; Created: 25 Jul 1992 ;; Created: 25 Jul 1992
;; Version: 2.02 ;; Old-Version: 2.02
;; Keywords: games ;; Keywords: games
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
@ -1957,7 +1957,7 @@ to swim.")
(defun dun-help (_args) (defun dun-help (_args)
(dun-mprincl (dun-mprincl
"Welcome to dunnet (2.02), by Ron Schnell (ronnie@driver-aces.com - @RonnieSchnell). "Welcome to dunnet by Ron Schnell (ronnie@driver-aces.com - @RonnieSchnell).
Here is some useful information (read carefully because there are one Here is some useful information (read carefully because there are one
or more clues in here): or more clues in here):
- If you have a key that can open a door, you do not need to explicitly - If you have a key that can open a door, you do not need to explicitly

View file

@ -3,7 +3,7 @@
;; Copyright (C) 1997-1998, 2001-2020 Free Software Foundation, Inc. ;; Copyright (C) 1997-1998, 2001-2020 Free Software Foundation, Inc.
;; Author: Glynn Clements <glynn@sensei.co.uk> ;; Author: Glynn Clements <glynn@sensei.co.uk>
;; Version: 1.02 ;; Old-Version: 1.02
;; Created: 1997-08-13 ;; Created: 1997-08-13
;; Keywords: games ;; Keywords: games

View file

@ -1063,9 +1063,9 @@ from a different message."
(:constructor nil) (:constructor nil)
(:copier nil) (:copier nil)
;; (:type list) ;Old representation. ;; (:type list) ;Old representation.
(:constructor compilation--make-message (loc type end-loc)) (:constructor compilation--make-message (loc type end-loc rule))
(:conc-name compilation--message->)) (:conc-name compilation--message->))
loc type end-loc) loc type end-loc rule)
(defvar compilation--previous-directory-cache nil (defvar compilation--previous-directory-cache nil
"A pair (POS . RES) caching the result of previous directory search. "A pair (POS . RES) caching the result of previous directory search.
@ -1138,7 +1138,7 @@ POS and RES.")
(cons (match-string-no-properties idx) dir)) (cons (match-string-no-properties idx) dir))
;; Place a `compilation-message' everywhere we change text-properties ;; Place a `compilation-message' everywhere we change text-properties
;; so compilation--remove-properties can know what to remove. ;; so compilation--remove-properties can know what to remove.
compilation-message ,(compilation--make-message nil 0 nil) compilation-message ,(compilation--make-message nil 0 nil nil)
mouse-face highlight mouse-face highlight
keymap compilation-button-map keymap compilation-button-map
help-echo "mouse-2: visit destination directory"))) help-echo "mouse-2: visit destination directory")))
@ -1177,7 +1177,8 @@ POS and RES.")
;; all information needed to later jump to corresponding source code. ;; all information needed to later jump to corresponding source code.
;; Return a property list with all meta information on this error location. ;; Return a property list with all meta information on this error location.
(defun compilation-error-properties (file line end-line col end-col type fmt) (defun compilation-error-properties (file line end-line col end-col type fmt
rule)
(unless (text-property-not-all (match-beginning 0) (point) (unless (text-property-not-all (match-beginning 0) (point)
'compilation-message nil) 'compilation-message nil)
(if file (if file
@ -1265,7 +1266,7 @@ POS and RES.")
(current-buffer) (match-beginning 0))) (current-buffer) (match-beginning 0)))
(compilation-internal-error-properties (compilation-internal-error-properties
file line end-line col end-col type fmt)))) file line end-line col end-col type fmt rule))))
(defun compilation-beginning-of-line (&optional n) (defun compilation-beginning-of-line (&optional n)
"Like `beginning-of-line', but accounts for lines hidden by `selective-display'." "Like `beginning-of-line', but accounts for lines hidden by `selective-display'."
@ -1288,13 +1289,15 @@ just char-counts."
(let ((tab-width 8)) (move-to-column (max col 0))) (let ((tab-width 8)) (move-to-column (max col 0)))
(goto-char (min (+ (line-beginning-position) col) (line-end-position))))) (goto-char (min (+ (line-beginning-position) col) (line-end-position)))))
(defun compilation-internal-error-properties (file line end-line col end-col type fmts) (defun compilation-internal-error-properties (file line end-line col end-col
type fmts rule)
"Get the meta-info that will be added as text-properties. "Get the meta-info that will be added as text-properties.
LINE, END-LINE, COL, END-COL are integers or nil. LINE, END-LINE, COL, END-COL are integers or nil.
TYPE can be 0, 1, or 2, meaning error, warning, or just info. TYPE can be 0, 1, or 2, meaning error, warning, or just info.
FILE should be (FILENAME) or (RELATIVE-FILENAME . DIRNAME) or (BUFFER) or FILE should be (FILENAME) or (RELATIVE-FILENAME . DIRNAME) or (BUFFER) or
nil. nil.
FMTS is a list of format specs for transforming the file name. FMTS is a list of format specs for transforming the file name.
RULE is the name (symbol) of the rule used or nil if anonymous.
(See `compilation-error-regexp-alist'.)" (See `compilation-error-regexp-alist'.)"
(unless file (setq file '("*unknown*"))) (unless file (setq file '("*unknown*")))
(let* ((file-struct (compilation-get-file-structure file fmts)) (let* ((file-struct (compilation-get-file-structure file fmts))
@ -1381,7 +1384,7 @@ FMTS is a list of format specs for transforming the file name.
;; Must start with face ;; Must start with face
`(font-lock-face ,compilation-message-face `(font-lock-face ,compilation-message-face
compilation-message ,(compilation--make-message loc type end-loc) compilation-message ,(compilation--make-message loc type end-loc rule)
help-echo ,(if col help-echo ,(if col
"mouse-2: visit this file, line and column" "mouse-2: visit this file, line and column"
(if line (if line
@ -1473,105 +1476,109 @@ This updates the appropriate variable used by the mode-line."
"Parse errors between START and END. "Parse errors between START and END.
The errors recognized are the ones specified in RULES which default The errors recognized are the ones specified in RULES which default
to `compilation-error-regexp-alist' if RULES is nil." to `compilation-error-regexp-alist' if RULES is nil."
(dolist (item (or rules compilation-error-regexp-alist)) (let ((case-fold-search compilation-error-case-fold-search)
(if (symbolp item) (omake-included (memq 'omake compilation-error-regexp-alist)))
(setq item (cdr (assq item (dolist (rule-item (or rules compilation-error-regexp-alist))
compilation-error-regexp-alist-alist)))) (let* ((item
(let ((case-fold-search compilation-error-case-fold-search) (if (symbolp rule-item)
(file (nth 1 item)) (cdr (assq rule-item compilation-error-regexp-alist-alist))
(line (nth 2 item)) rule-item))
(col (nth 3 item)) (pat (car item))
(type (nth 4 item)) (file (nth 1 item))
(pat (car item)) (line (nth 2 item))
end-line end-col fmt (col (nth 3 item))
props) (type (nth 4 item))
(rule (and (symbolp rule-item) rule-item))
end-line end-col fmt
props)
;; omake reports some error indented, so skip the indentation. ;; omake reports some error indented, so skip the indentation.
;; another solution is to modify (some?) regexps in ;; another solution is to modify (some?) regexps in
;; `compilation-error-regexp-alist'. ;; `compilation-error-regexp-alist'.
;; note that omake usage is not limited to ocaml and C (for stubs). ;; note that omake usage is not limited to ocaml and C (for stubs).
;; FIXME-omake: Doing it here seems wrong, at least it should depend on ;; FIXME-omake: Doing it here seems wrong, at least it should depend on
;; whether or not omake's own error messages are recognized. ;; whether or not omake's own error messages are recognized.
(cond (cond
((not (memq 'omake compilation-error-regexp-alist)) nil) ((not omake-included) nil)
((string-match "\\`\\([^^]\\|\\^\\( \\*\\|\\[\\)\\)" pat) ((string-match "\\`\\([^^]\\|\\^\\( \\*\\|\\[\\)\\)" pat)
nil) ;; Not anchored or anchored but already allows empty spaces. nil) ;; Not anchored or anchored but already allows empty spaces.
(t (setq pat (concat "^\\(?: \\)?" (substring pat 1))))) (t (setq pat (concat "^\\(?: \\)?" (substring pat 1)))))
(if (and (consp file) (not (functionp file))) (if (and (consp file) (not (functionp file)))
(setq fmt (cdr file) (setq fmt (cdr file)
file (car file))) file (car file)))
(if (and (consp line) (not (functionp line))) (if (and (consp line) (not (functionp line)))
(setq end-line (cdr line) (setq end-line (cdr line)
line (car line))) line (car line)))
(if (and (consp col) (not (functionp col))) (if (and (consp col) (not (functionp col)))
(setq end-col (cdr col) (setq end-col (cdr col)
col (car col))) col (car col)))
(unless (or (null (nth 5 item)) (integerp (nth 5 item))) (unless (or (null (nth 5 item)) (integerp (nth 5 item)))
(error "HYPERLINK should be an integer: %s" (nth 5 item))) (error "HYPERLINK should be an integer: %s" (nth 5 item)))
(goto-char start) (goto-char start)
(while (re-search-forward pat end t) (while (re-search-forward pat end t)
(when (setq props (compilation-error-properties (when (setq props (compilation-error-properties
file line end-line col end-col (or type 2) fmt)) file line end-line col end-col
(or type 2) fmt rule))
(when (integerp file) (when (integerp file)
(let ((this-type (if (consp type) (let ((this-type (if (consp type)
(compilation-type type) (compilation-type type)
(or type 2)))) (or type 2))))
(compilation--note-type this-type) (compilation--note-type this-type)
(compilation--put-prop (compilation--put-prop
file 'font-lock-face file 'font-lock-face
(symbol-value (aref [compilation-info-face (symbol-value (aref [compilation-info-face
compilation-warning-face compilation-warning-face
compilation-error-face] compilation-error-face]
this-type))))) this-type)))))
(compilation--put-prop (compilation--put-prop
line 'font-lock-face compilation-line-face) line 'font-lock-face compilation-line-face)
(compilation--put-prop (compilation--put-prop
end-line 'font-lock-face compilation-line-face) end-line 'font-lock-face compilation-line-face)
(compilation--put-prop (compilation--put-prop
col 'font-lock-face compilation-column-face) col 'font-lock-face compilation-column-face)
(compilation--put-prop (compilation--put-prop
end-col 'font-lock-face compilation-column-face) end-col 'font-lock-face compilation-column-face)
;; Obey HIGHLIGHT. ;; Obey HIGHLIGHT.
(dolist (extra-item (nthcdr 6 item)) (dolist (extra-item (nthcdr 6 item))
(let ((mn (pop extra-item))) (let ((mn (pop extra-item)))
(when (match-beginning mn) (when (match-beginning mn)
(let ((face (eval (car extra-item)))) (let ((face (eval (car extra-item))))
(cond (cond
((null face)) ((null face))
((or (symbolp face) (stringp face)) ((or (symbolp face) (stringp face))
(put-text-property (put-text-property
(match-beginning mn) (match-end mn) (match-beginning mn) (match-end mn)
'font-lock-face face)) 'font-lock-face face))
((and (listp face) ((and (listp face)
(eq (car face) 'face) (eq (car face) 'face)
(or (symbolp (cadr face)) (or (symbolp (cadr face))
(stringp (cadr face)))) (stringp (cadr face))))
(compilation--put-prop mn 'font-lock-face (cadr face)) (compilation--put-prop mn 'font-lock-face (cadr face))
(add-text-properties (add-text-properties
(match-beginning mn) (match-end mn) (match-beginning mn) (match-end mn)
(nthcdr 2 face))) (nthcdr 2 face)))
(t (t
(error "Don't know how to handle face %S" (error "Don't know how to handle face %S"
face))))))) face)))))))
(let ((mn (or (nth 5 item) 0))) (let ((mn (or (nth 5 item) 0)))
(when compilation-debug (when compilation-debug
(font-lock-append-text-property
(match-beginning 0) (match-end 0)
'compilation-debug (vector 'std item props)))
(add-text-properties
(match-beginning mn) (match-end mn)
(cddr props))
(font-lock-append-text-property (font-lock-append-text-property
(match-beginning 0) (match-end 0) (match-beginning mn) (match-end mn)
'compilation-debug (vector 'std item props))) 'font-lock-face (cadr props)))))))))
(add-text-properties
(match-beginning mn) (match-end mn)
(cddr props))
(font-lock-append-text-property
(match-beginning mn) (match-end mn)
'font-lock-face (cadr props))))))))
(defvar compilation--parsed -1) (defvar compilation--parsed -1)
(make-variable-buffer-local 'compilation--parsed) (make-variable-buffer-local 'compilation--parsed)
@ -3113,7 +3120,7 @@ TRUE-DIRNAME is the `file-truename' of DIRNAME, if given."
;; 'font-lock-face 'font-lock-warning-face) ;; 'font-lock-face 'font-lock-warning-face)
(put-text-property src (line-end-position) (put-text-property src (line-end-position)
'compilation-message 'compilation-message
(compilation--make-message loc 2 nil))))))) (compilation--make-message loc 2 nil nil)))))))
(goto-char limit) (goto-char limit)
nil) nil)

View file

@ -71,13 +71,6 @@
;; (define-key global-map [M-S-down-mouse-3] 'imenu) ;; (define-key global-map [M-S-down-mouse-3] 'imenu)
;;;; Font lock bugs as of v4.32:
;; The following kinds of Perl code erroneously start strings:
;; \$` \$' \$"
;; $opt::s $opt_s $opt{s} (s => ...) /\s+.../
;; likewise with m, tr, y, q, qX instead of s
;;; Code: ;;; Code:
;;; Compatibility with older versions (for publishing on ELPA) ;;; Compatibility with older versions (for publishing on ELPA)

View file

@ -1,4 +1,4 @@
;;; cpp.el --- highlight or hide text according to cpp conditionals ;;; cpp.el --- highlight or hide text according to cpp conditionals -*- lexical-binding: t -*-
;; Copyright (C) 1994-1995, 2001-2020 Free Software Foundation, Inc. ;; Copyright (C) 1994-1995, 2001-2020 Free Software Foundation, Inc.

View file

@ -557,8 +557,7 @@ Variables controlling indentation style and extra features:
dcl-imenu-label-call dcl-imenu-label-call
Change the text that is used as sub-listing labels in imenu. Change the text that is used as sub-listing labels in imenu.
Loading this package calls the value of the variable To run code after DCL mode has loaded, use `with-eval-after-load'.
`dcl-mode-load-hook' with no args, if that value is non-nil.
Turning on DCL mode calls the value of the variable `dcl-mode-hook' Turning on DCL mode calls the value of the variable `dcl-mode-hook'
with no args, if that value is non-nil. with no args, if that value is non-nil.
@ -2192,6 +2191,8 @@ otherwise return nil."
(provide 'dcl-mode) (provide 'dcl-mode)
(make-obsolete-variable 'dcl-mode-load-hook
"use `with-eval-after-load' instead." "28.1")
(run-hooks 'dcl-mode-load-hook) ; for your customizations (run-hooks 'dcl-mode-load-hook) ; for your customizations
;;; dcl-mode.el ends here ;;; dcl-mode.el ends here

View file

@ -196,7 +196,8 @@ All commands in `lisp-mode-shared-map' are inherited by this map.")
(if (and (buffer-modified-p) (if (and (buffer-modified-p)
(y-or-n-p (format "Save buffer %s first? " (buffer-name)))) (y-or-n-p (format "Save buffer %s first? " (buffer-name))))
(save-buffer)) (save-buffer))
(byte-recompile-file buffer-file-name nil 0 t)) (byte-recompile-file buffer-file-name nil 0)
(load buffer-file-name))
(defun emacs-lisp-macroexpand () (defun emacs-lisp-macroexpand ()
"Macroexpand the form after point. "Macroexpand the form after point.

View file

@ -1649,25 +1649,28 @@ Return (TYPE NAME), or nil if not found."
(interactive) (interactive)
(let ((count 1) (case-fold-search t) matching-beg) (let ((count 1) (case-fold-search t) matching-beg)
(beginning-of-line) (beginning-of-line)
(while (and (> count 0) ;; Check whether we're already at the start of a subprogram.
(re-search-backward f90-program-block-re nil 'move)) (or (f90-looking-at-program-block-start)
(beginning-of-line) ;; We're not; search backwards.
(skip-chars-forward " \t0-9") (while (and (> count 0)
;; Check if in string in case using non-standard feature where (re-search-backward f90-program-block-re nil 'move))
;; continued strings do not need "&" at start of continuations. (beginning-of-line)
(cond ((f90-in-string)) (skip-chars-forward " \t0-9")
((setq matching-beg (f90-looking-at-program-block-start)) ;; Check if in string in case using non-standard feature where
(setq count (1- count))) ;; continued strings do not need "&" at start of continuations.
((f90-looking-at-program-block-end) (cond ((f90-in-string))
(setq count (1+ count))))) ((setq matching-beg (f90-looking-at-program-block-start))
(beginning-of-line) (setq count (1- count)))
(if (zerop count) ((f90-looking-at-program-block-end)
matching-beg (setq count (1+ count)))))
;; Note this includes the case of an un-named main program, (beginning-of-line)
;; in which case we go to (point-min). (if (zerop count)
(if (called-interactively-p 'interactive) matching-beg
(message "No beginning found")) ;; Note this includes the case of an un-named main program,
nil))) ;; in which case we go to (point-min).
(if (called-interactively-p 'interactive)
(message "No beginning found"))
nil))))
(defun f90-end-of-subprogram () (defun f90-end-of-subprogram ()
"Move point to the end of the current subprogram. "Move point to the end of the current subprogram.

View file

@ -1,4 +1,4 @@
;;; fortran.el --- Fortran mode for GNU Emacs ;;; fortran.el --- Fortran mode for GNU Emacs -*- lexical-binding: t -*-
;; Copyright (C) 1986, 1993-1995, 1997-2020 Free Software Foundation, ;; Copyright (C) 1986, 1993-1995, 1997-2020 Free Software Foundation,
;; Inc. ;; Inc.
@ -495,14 +495,15 @@ This is used to fontify fixed-format Fortran comments."
;; `byte-compile', but simple benchmarks indicate that it's probably not ;; `byte-compile', but simple benchmarks indicate that it's probably not
;; worth the trouble (about 0.5% of slow down). ;; worth the trouble (about 0.5% of slow down).
(eval ;I hate `eval', but it's hard to avoid it here. (eval ;I hate `eval', but it's hard to avoid it here.
'(syntax-propertize-rules `(syntax-propertize-rules
("^[CcDd\\*]" (0 "<")) ("^[CcDd\\*]" (0 "<"))
;; We mark all chars after line-length as "comment-start", rather than ;; We mark all chars after line-length as "comment-start", rather than
;; just the first one. This is so that a closing ' that's past the ;; just the first one. This is so that a closing ' that's past the
;; line-length will indeed be ignored (and will result in a string that ;; line-length will indeed be ignored (and will result in a string that
;; leaks into subsequent lines). ;; leaks into subsequent lines).
((format "^[^CcDd\\*\t\n].\\{%d\\}\\(.+\\)" (1- line-length)) (,(format "^[^CcDd\\*\t\n].\\{%d\\}\\(.+\\)" (1- line-length))
(1 "<"))))) (1 "<")))
t))
(defvar fortran-font-lock-keywords fortran-font-lock-keywords-1 (defvar fortran-font-lock-keywords fortran-font-lock-keywords-1
"Default expressions to highlight in Fortran mode.") "Default expressions to highlight in Fortran mode.")

View file

@ -1317,7 +1317,7 @@ With arg, enter name of variable to be watched in the minibuffer."
(defun gdb-var-list-children-handler (varnum) (defun gdb-var-list-children-handler (varnum)
(let* ((var-list nil) (let* ((var-list nil)
(output (bindat-get-field (gdb-json-partial-output "child"))) (output (gdb-json-partial-output "child"))
(children (bindat-get-field output 'children))) (children (bindat-get-field output 'children)))
(catch 'child-already-watched (catch 'child-already-watched
(dolist (var gdb-var-list) (dolist (var gdb-var-list)
@ -4395,8 +4395,7 @@ member."
(save-excursion (save-excursion
(if event (posn-set-point (event-end event))) (if event (posn-set-point (event-end event)))
(beginning-of-line) (beginning-of-line)
(let* ((var (bindat-get-field (let* ((var (get-text-property (point) 'gdb-register-name))
(get-text-property (point) 'gdb-register-name)))
(value (read-string (format "New value (%s): " var)))) (value (read-string (format "New value (%s): " var))))
(gud-basic-call (gud-basic-call
(concat "-gdb-set variable $" var " = " value))))) (concat "-gdb-set variable $" var " = " value)))))

View file

@ -53,11 +53,10 @@
;; ;;
;; INSTALLATION ;; INSTALLATION
;; ============ ;; ============
;; Put this file on the emacs load path and load it with the following ;; Load it with the following line in your init file:
;; line in your init file:
;; ;;
;; (add-hook 'idlwave-load-hook ;; (with-eval-after-load 'idlwave
;; (lambda () (require 'idlw-complete-structtag))) ;; (require 'idlw-complete-structtag))
;; ;;
;; DESCRIPTION ;; DESCRIPTION
;; =========== ;; ===========

View file

@ -4656,8 +4656,19 @@ could set `js-jsx-syntax' to t in your init file, or in a
one of the aforementioned options instead of using this mode." one of the aforementioned options instead of using this mode."
:group 'js :group 'js
(js-jsx-enable) (js-jsx-enable)
(setq-local comment-region-function #'js-jsx--comment-region)
(js-use-syntactic-mode-name)) (js-use-syntactic-mode-name))
(defun js-jsx--comment-region (beg end &optional arg)
(if (or (js-jsx--context)
(save-excursion
(skip-chars-forward " \t")
(js-jsx--looking-at-start-tag-p)))
(let ((comment-start "{/* ")
(comment-end " */}"))
(comment-region-default beg end arg))
(comment-region-default beg end arg)))
;;;###autoload (defalias 'javascript-mode 'js-mode) ;;;###autoload (defalias 'javascript-mode 'js-mode)
(eval-after-load 'folding (eval-after-load 'folding

View file

@ -1,4 +1,4 @@
;;; ld-script.el --- GNU linker script editing mode for Emacs ;;; ld-script.el --- GNU linker script editing mode for Emacs -*- lexical-binding:t -*-
;; Copyright (C) 2001-2020 Free Software Foundation, Inc. ;; Copyright (C) 2001-2020 Free Software Foundation, Inc.

View file

@ -1,4 +1,4 @@
;;; m4-mode.el --- m4 code editing commands for Emacs ;;; m4-mode.el --- m4 code editing commands for Emacs -*- lexical-binding:t -*-
;; Copyright (C) 1996-1997, 2001-2020 Free Software Foundation, Inc. ;; Copyright (C) 1996-1997, 2001-2020 Free Software Foundation, Inc.
@ -48,14 +48,12 @@
"File name of the m4 executable. "File name of the m4 executable.
If m4 is not in your PATH, set this to an absolute file name." If m4 is not in your PATH, set this to an absolute file name."
:version "24.4" :version "24.4"
:type 'file :type 'file)
:group 'm4)
;;options to m4 ;;options to m4
(defcustom m4-program-options nil (defcustom m4-program-options nil
"Options to pass to `m4-program'." "Options to pass to `m4-program'."
:type '(repeat string) :type '(repeat string))
:group 'm4)
;;to use --prefix-builtins, you can use ;;to use --prefix-builtins, you can use
;;(defconst m4-program-options '("-P")) ;;(defconst m4-program-options '("-P"))
@ -72,8 +70,7 @@ If m4 is not in your PATH, set this to an absolute file name."
(defcustom m4-mode-hook nil (defcustom m4-mode-hook nil
"Hook called by `m4-mode'." "Hook called by `m4-mode'."
:type 'hook :type 'hook)
:group 'm4)
;;this may still need some work ;;this may still need some work
(defvar m4-mode-syntax-table (defvar m4-mode-syntax-table
@ -125,7 +122,7 @@ If m4 is not in your PATH, set this to an absolute file name."
(interactive) (interactive)
(shell-command-on-region (shell-command-on-region
(point-min) (point-max) (point-min) (point-max)
(mapconcat 'identity (cons m4-program m4-program-options) "\s") (mapconcat #'identity (cons m4-program m4-program-options) "\s")
"*m4-output*" nil) "*m4-output*" nil)
(switch-to-buffer-other-window "*m4-output*")) (switch-to-buffer-other-window "*m4-output*"))
@ -134,7 +131,7 @@ If m4 is not in your PATH, set this to an absolute file name."
(interactive) (interactive)
(shell-command-on-region (shell-command-on-region
(point) (mark) (point) (mark)
(mapconcat 'identity (cons m4-program m4-program-options) "\s") (mapconcat #'identity (cons m4-program m4-program-options) "\s")
"*m4-output*" nil) "*m4-output*" nil)
(switch-to-buffer-other-window "*m4-output*")) (switch-to-buffer-other-window "*m4-output*"))

View file

@ -1,11 +1,11 @@
;;; mixal-mode.el --- Major mode for the mix asm language. ;;; mixal-mode.el --- Major mode for the mix asm language. -*- lexical-binding:t -*-
;; Copyright (C) 2003-2020 Free Software Foundation, Inc. ;; Copyright (C) 2003-2020 Free Software Foundation, Inc.
;; Author: Pieter E.J. Pareit <pieter.pareit@gmail.com> ;; Author: Pieter E.J. Pareit <pieter.pareit@gmail.com>
;; Maintainer: emacs-devel@gnu.org ;; Maintainer: Jose A Ortega Ruiz <jao@gnu.org>
;; Created: 09 Nov 2002 ;; Created: 09 Nov 2002
;; Version: 0.1 ;; Version: 0.4
;; Keywords: languages, Knuth, mix, mixal, asm, mixvm, The Art Of Computer Programming ;; Keywords: languages, Knuth, mix, mixal, asm, mixvm, The Art Of Computer Programming
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
@ -24,6 +24,7 @@
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary: ;;; Commentary:
;; Major mode for the mix asm language. ;; Major mode for the mix asm language.
;; The mix asm language is described in "The Art Of Computer Programming". ;; The mix asm language is described in "The Art Of Computer Programming".
;; ;;
@ -34,8 +35,9 @@
;; ;;
;; To use this mode, place the following in your init file: ;; To use this mode, place the following in your init file:
;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'. ;; `(load-file "/PATH-TO-FILE/mixal-mode.el")'.
;;
;; When you load a file with the extension .mixal the mode will be started ;; When you load a file with the extension .mixal the mode will be started
;; automatic. If you want to start the mode manual, use `M-x mixal-mode'. ;; automatically. If you want to start the mode manually, use `M-x mixal-mode'.
;; Font locking will work, the behavior of tabs is the same as Emacs's ;; Font locking will work, the behavior of tabs is the same as Emacs's
;; default behavior. You can compile a source file with `C-c c' you can ;; default behavior. You can compile a source file with `C-c c' you can
;; run a compiled file with `C-c r' or run it in debug mode with `C-c d'. ;; run a compiled file with `C-c r' or run it in debug mode with `C-c d'.
@ -45,6 +47,9 @@
;; Have fun. ;; Have fun.
;;; History: ;;; History:
;; Version 0.4:
;; 16/10/20: Jose A Ortega Ruiz <jao@gnu.org>
;; Add missed instructions: SLB,SRB,JAE,JAO,JXE,JXO
;; Version 0.3: ;; Version 0.3:
;; 12/10/05: Stefan Monnier <monnier@iro.umontreal.ca> ;; 12/10/05: Stefan Monnier <monnier@iro.umontreal.ca>
;; Use font-lock-syntactic-keywords to detect/mark comments. ;; Use font-lock-syntactic-keywords to detect/mark comments.
@ -683,6 +688,18 @@ Register J is set to the value of the next instruction that would have
been executed when there was no jump." been executed when there was no jump."
1) 1)
(JAE jump "jump A even" 40
"Jump if the content of rA is even.
Register J is set to the value of the next instruction that would have
been executed when there was no jump."
1)
(JAO jump "jump A odd" 40
"Jump if the content of rA is odd.
Register J is set to the value of the next instruction that would have
been executed when there was no jump."
1)
(JXN jump "jump X negative" 47 (JXN jump "jump X negative" 47
"Jump if the content of rX is negative. "Jump if the content of rX is negative.
Register J is set to the value of the next instruction that would have Register J is set to the value of the next instruction that would have
@ -719,12 +736,24 @@ Register J is set to the value of the next instruction that would have
been executed when there was no jump." been executed when there was no jump."
1) 1)
(J1N jump "jump I1 negative" 41 (JXE jump "jump X even" 47
"Jump if the content of rI1 is negative. "Jump if the content of rX is even.
Register J is set to the value of the next instruction that would have Register J is set to the value of the next instruction that would have
been executed when there was no jump." been executed when there was no jump."
1) 1)
(JXO jump "jump X odd" 47
"Jump if the content of rX is odd.
Register J is set to the value of the next instruction that would have
been executed when there was no jump."
1)
(J1N jump "jump I1 negative" 41
"Jump if the content of rI1 is negative.
Register J is set to the value of the next instruction that would have
been executed when there was no jump."
1)
(J1Z jump "jump I1 zero" 41 (J1Z jump "jump I1 zero" 41
"Jump if the content of rI1 is zero. "Jump if the content of rI1 is zero.
Register J is set to the value of the next instruction that would have Register J is set to the value of the next instruction that would have
@ -950,7 +979,6 @@ Zeros will be added to the left."
Zeros will be added to the right." Zeros will be added to the right."
2) 2)
(SRAX miscellaneous "shift right AX" 6 (SRAX miscellaneous "shift right AX" 6
"Shift AX, M bytes right. "Shift AX, M bytes right.
Zeros will be added to the left." Zeros will be added to the left."
@ -966,6 +994,14 @@ The bytes that fall off to the left will be added to the right."
The bytes that fall off to the right will be added to the left." The bytes that fall off to the right will be added to the left."
2) 2)
(SLB miscellaneous "shift left AX binary" 6
"Shift AX, M binary places left."
2)
(SRB miscellaneous "shift right AX binary" 6
"Shift AX, M binary places right."
2)
(MOVE miscellaneous "move" 7 number (MOVE miscellaneous "move" 7 number
"Move MOD words from M to the location stored in rI1." "Move MOD words from M to the location stored in rI1."
(+ 1 (* 2 number))) (+ 1 (* 2 number)))

View file

@ -4,7 +4,7 @@
;; Author: Fabián E. Gallina <fgallina@gnu.org> ;; Author: Fabián E. Gallina <fgallina@gnu.org>
;; URL: https://github.com/fgallina/python.el ;; URL: https://github.com/fgallina/python.el
;; Version: 0.26.1 ;; Version: 0.27
;; Package-Requires: ((emacs "24.1") (cl-lib "1.0")) ;; Package-Requires: ((emacs "24.1") (cl-lib "1.0"))
;; Maintainer: emacs-devel@gnu.org ;; Maintainer: emacs-devel@gnu.org
;; Created: Jul 2010 ;; Created: Jul 2010

View file

@ -4,7 +4,7 @@
;; Inc. ;; Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org> ;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Version: 2.0f ;; Old-Version: 2.0f
;; Maintainer: emacs-devel@gnu.org ;; Maintainer: emacs-devel@gnu.org
;; Keywords: languages, unix ;; Keywords: languages, unix

View file

@ -1555,21 +1555,21 @@ The first line is assumed to look like \"#!.../program ...\"."
(char-to-string char))) (char-to-string char)))
string "")) string ""))
;;
;; Bug reporting.
;;
;; These are relics kept "just in case". ;;
(defalias 'tcl-uncomment-region 'uncomment-region) ;; Obsolete.
(defalias 'tcl-indent-for-comment 'comment-indent) ;;
(defalias 'add-log-tcl-defun 'tcl-add-log-defun)
(defalias 'indent-tcl-exp 'tcl-indent-exp) (define-obsolete-function-alias 'tcl-uncomment-region #'uncomment-region "28.1")
(defalias 'calculate-tcl-indent 'tcl-calculate-indent) (define-obsolete-function-alias 'tcl-indent-for-comment #'comment-indent "28.1")
(defalias 'tcl-beginning-of-defun 'beginning-of-defun) (define-obsolete-function-alias 'add-log-tcl-defun #'tcl-add-log-defun "28.1")
(defalias 'tcl-end-of-defun 'end-of-defun) (define-obsolete-function-alias 'indent-tcl-exp #'tcl-indent-exp "28.1")
(defalias 'tcl-mark-defun 'mark-defun) (define-obsolete-function-alias 'calculate-tcl-indent #'tcl-calculate-indent "28.1")
(defun tcl-mark () (mark t)) (define-obsolete-function-alias 'tcl-beginning-of-defun #'beginning-of-defun "28.1")
(define-obsolete-function-alias 'tcl-end-of-defun #'end-of-defun "28.1")
(define-obsolete-function-alias 'tcl-mark-defun #'mark-defun "28.1")
(defun tcl-mark () (declare (obsolete nil "28.1")) (mark t))
(provide 'tcl) (provide 'tcl)

View file

@ -5,7 +5,7 @@
;; Author: Hrvoje Nikšić <hrvoje.niksic@avl.com> ;; Author: Hrvoje Nikšić <hrvoje.niksic@avl.com>
;; Maintainer: emacs-devel@gnu.org ;; Maintainer: emacs-devel@gnu.org
;; Keywords: convenience, minibuffer ;; Keywords: convenience, minibuffer
;; Version: 24 ;; Old-Version: 24
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.

View file

@ -334,6 +334,7 @@ Thus, this does not include the shell's current directory.")
(define-key map "\t" 'completion-at-point) (define-key map "\t" 'completion-at-point)
(define-key map (kbd "M-RET") 'shell-resync-dirs) (define-key map (kbd "M-RET") 'shell-resync-dirs)
(define-key map "\M-?" 'comint-dynamic-list-filename-completions) (define-key map "\M-?" 'comint-dynamic-list-filename-completions)
(define-key map (kbd "C-x n d") 'shell-narrow-to-prompt)
(define-key map [menu-bar completion] (define-key map [menu-bar completion]
(cons "Complete" (cons "Complete"
(copy-keymap (lookup-key comint-mode-map [menu-bar completion])))) (copy-keymap (lookup-key comint-mode-map [menu-bar completion]))))
@ -1366,6 +1367,48 @@ Returns t if successful."
(let ((f (shell-c-a-p-replace-by-expanded-directory))) (let ((f (shell-c-a-p-replace-by-expanded-directory)))
(if f (funcall f)))) (if f (funcall f))))
(defun shell--prompt-begin-position ()
;; We need this convoluted function because `looking-at-p' does not work on
;; multiline regexps _and_ `re-search-backward' skips the current line.
(save-excursion
(let ((old-point (point)))
(max
(save-excursion
;; Right result if not on prompt.
(call-interactively #'comint-previous-prompt)
(re-search-backward comint-prompt-regexp)
(point))
(save-excursion
;; Right result if on first char after prompt.
(re-search-backward comint-prompt-regexp)
(point))
(save-excursion
;; Right result if on prompt.
(call-interactively #'comint-next-prompt)
(re-search-backward comint-prompt-regexp)
(if (<= (point) old-point)
(point)
(point-min)))))))
(defun shell--prompt-end-position ()
(save-excursion
(goto-char (shell--prompt-begin-position))
(comint-next-prompt 1)
(point)))
(defun shell-narrow-to-prompt ()
"Narrow buffer to the command line (and any following command output) at point."
(interactive)
(let ((begin (shell--prompt-begin-position)))
(narrow-to-region
begin
(save-excursion
(goto-char (shell--prompt-end-position))
(call-interactively #'comint-next-prompt)
(if (= begin (shell--prompt-begin-position))
(point-max)
(shell--prompt-begin-position))))))
(provide 'shell) (provide 'shell)
;;; shell.el ends here ;;; shell.el ends here

View file

@ -119,13 +119,17 @@ If non-nil, the value is passed directly to `recenter'."
:version "23.1") :version "23.1")
(defcustom next-error-message-highlight nil (defcustom next-error-message-highlight nil
"If non-nil, highlight the current error message in the `next-error' buffer." "If non-nil, highlight the current error message in the `next-error' buffer.
:type 'boolean If the value is `keep', highlighting is permanent, so all visited error
messages are highlighted; this helps to see what messages were visited."
:type '(choice (const :tag "Highlight the current error" t)
(const :tag "Highlight all visited errors" keep)
(const :tag "No highlighting" nil))
:group 'next-error :group 'next-error
:version "28.1") :version "28.1")
(defface next-error-message (defface next-error-message
'((t (:inherit highlight))) '((t (:inherit highlight :extend t)))
"Face used to highlight the current error message in the `next-error' buffer." "Face used to highlight the current error message in the `next-error' buffer."
:group 'next-error :group 'next-error
:version "28.1") :version "28.1")
@ -482,9 +486,10 @@ buffer causes automatic display of the corresponding source code location."
"Highlight the current error message in the next-error buffer." "Highlight the current error message in the next-error buffer."
(when next-error-message-highlight (when next-error-message-highlight
(with-current-buffer error-buffer (with-current-buffer error-buffer
(when next-error--message-highlight-overlay (when (and next-error--message-highlight-overlay
(not (eq next-error-message-highlight 'keep)))
(delete-overlay next-error--message-highlight-overlay)) (delete-overlay next-error--message-highlight-overlay))
(let ((ol (make-overlay (line-beginning-position) (line-end-position)))) (let ((ol (make-overlay (line-beginning-position) (1+ (line-end-position)))))
;; do not override region highlighting ;; do not override region highlighting
(overlay-put ol 'priority -50) (overlay-put ol 'priority -50)
(overlay-put ol 'face 'next-error-message) (overlay-put ol 'face 'next-error-message)

View file

@ -1392,7 +1392,7 @@ Argument ARG represents to force a refresh past any caches that may exist."
(if (and (file-exists-p f) (string-match "\\.el\\'" f)) (if (and (file-exists-p f) (string-match "\\.el\\'" f))
(progn (progn
(dframe-select-attached-frame speedbar-frame) (dframe-select-attached-frame speedbar-frame)
(byte-compile-file f nil) (byte-compile-file f)
(select-frame sf) (select-frame sf)
(speedbar-reset-scanners))) (speedbar-reset-scanners)))
)) ))

View file

@ -1,10 +1,10 @@
;;; artist.el --- draw ascii graphics with your mouse ;;; artist.el --- draw ascii graphics with your mouse -*- lexical-binding: t -*-
;; Copyright (C) 2000-2020 Free Software Foundation, Inc. ;; Copyright (C) 2000-2020 Free Software Foundation, Inc.
;; Author: Tomas Abrahamsson <tab@lysator.liu.se> ;; Author: Tomas Abrahamsson <tab@lysator.liu.se>
;; Keywords: mouse ;; Keywords: mouse
;; Version: 1.2.6 ;; Old-Version: 1.2.6
;; Release-date: 6-Aug-2004 ;; Release-date: 6-Aug-2004
;; Location: http://www.lysator.liu.se/~tab/artist/ ;; Location: http://www.lysator.liu.se/~tab/artist/
@ -1844,9 +1844,7 @@ Return a list (RETURN-CODE STDOUT STDERR)."
nil)) nil))
(tmp-stdout-buffer (get-buffer-create (tmp-stdout-buffer (get-buffer-create
(concat "*artist-" program "*"))) (concat "*artist-" program "*")))
(tmp-stderr-file-name (make-temp-file "artist-stdout.")) (tmp-stderr-file-name (make-temp-file "artist-stdout.")))
(binary-process-input nil) ; for msdos
(binary-process-output nil))
;; Prepare stdin ;; Prepare stdin
(if stdin (artist-string-to-file stdin tmp-stdin-file-name)) (if stdin (artist-string-to-file stdin tmp-stdin-file-name))
@ -2721,7 +2719,7 @@ SHAPE-INFO is a list of four straight lines."
;; Filling rectangles and squares ;; Filling rectangles and squares
;; ;;
(defun artist-fill-rect (rect x1 y1 x2 y2) (defun artist-fill-rect (_rect x1 y1 x2 y2)
"Fill rectangle RECT from X1,Y1 to X2,Y2." "Fill rectangle RECT from X1,Y1 to X2,Y2."
(let ((x (1+ (min x1 x2))) (let ((x (1+ (min x1 x2)))
(y (1+ (min y1 y2))) (y (1+ (min y1 y2)))
@ -2733,7 +2731,7 @@ SHAPE-INFO is a list of four straight lines."
(artist-replace-chars artist-fill-char w) (artist-replace-chars artist-fill-char w)
(setq y (1+ y)))))) (setq y (1+ y))))))
(defun artist-fill-square (square x1 y1 x2 y2) (defun artist-fill-square (_square x1 y1 x2 y2)
"Fill a SQUARE from X1,Y1 to X2,Y2." "Fill a SQUARE from X1,Y1 to X2,Y2."
(let* ((square-corners (artist-rect-corners-squarify x1 y1 x2 y2)) (let* ((square-corners (artist-rect-corners-squarify x1 y1 x2 y2))
(new-x1 (elt square-corners 0)) (new-x1 (elt square-corners 0))
@ -2795,7 +2793,7 @@ to append to the end of the list, when doing free-hand drawing)."
(setq artist-key-poly-point-list (list (cons x1 y1)))) (setq artist-key-poly-point-list (list (cons x1 y1))))
(defun artist-pen-set-arrow-points (x1 y1) (defun artist-pen-set-arrow-points (_x1 _y1)
"Set arrow points for pen drawing using X1, Y1. "Set arrow points for pen drawing using X1, Y1.
Also, the `artist-key-poly-point-list' is reversed." Also, the `artist-key-poly-point-list' is reversed."
@ -2996,11 +2994,11 @@ Returns a list of points. Each point is on the form (X1 . Y1)."
;; Step to next spray point ;; Step to next spray point
(setq spray-points (cdr spray-points))))) (setq spray-points (cdr spray-points)))))
(defun artist-spray-clear-circle (circle x1 y1 x2 y2) (defun artist-spray-clear-circle (circle _x1 _y1 _x2 _y2)
"Clear circle CIRCLE at X1, Y1 through X2, Y2." "Clear circle CIRCLE at X1, Y1 through X2, Y2."
(artist-undraw-circle circle)) (artist-undraw-circle circle))
(defun artist-spray-set-radius (circle x1 y1 x2 y2) (defun artist-spray-set-radius (_circle x1 y1 x2 y2)
"Set spray radius from CIRCLE at X1, Y1 through X2, Y2." "Set spray radius from CIRCLE at X1, Y1 through X2, Y2."
(let ((dx (- x2 x1)) (let ((dx (- x2 x1))
(dy (- y2 y1))) (dy (- y2 y1)))
@ -3493,8 +3491,7 @@ POINT-LIST is a list of vectors on the form [X Y SAVED-CHAR NEW-CHAR].
FILL-INFO is a list of vectors on the form [X Y ELLIPSE-WIDTH-ON-THIS-LINE]. FILL-INFO is a list of vectors on the form [X Y ELLIPSE-WIDTH-ON-THIS-LINE].
The Y-RADIUS must be 0, but the X-RADIUS must not be 0." The Y-RADIUS must be 0, but the X-RADIUS must not be 0."
(let ((point-list nil) (let ((width (max (- (abs (* 2 x-radius)) 1)))
(width (max (- (abs (* 2 x-radius)) 1)))
(left-edge (1+ (- x1 (abs x-radius)))) (left-edge (1+ (- x1 (abs x-radius))))
(line-char (if artist-line-char-set artist-line-char ?-)) (line-char (if artist-line-char-set artist-line-char ?-))
(i 0) (i 0)
@ -3602,7 +3599,7 @@ FILL-INFO is a list of vectors on the form [X Y ELLIPSE-WIDTH-ON-THIS-LINE]."
; ;
; Filling ellipses ; Filling ellipses
; ;
(defun artist-fill-ellipse (ellipse x y x-radius y-radius) (defun artist-fill-ellipse (ellipse _x _y _x-radius _y-radius)
"Fill an ELLIPSE centered at X,Y with radius X-RADIUS and Y-RADIUS." "Fill an ELLIPSE centered at X,Y with radius X-RADIUS and Y-RADIUS."
(let ((fill-info (aref (artist-2point-get-shapeinfo ellipse) 1))) (let ((fill-info (aref (artist-2point-get-shapeinfo ellipse) 1)))
(mapcar (mapcar
@ -3722,11 +3719,11 @@ original contents of that area in the buffer."
(setq x (1+ x))) (setq x (1+ x)))
last-x))) last-x)))
(defun artist-ff-is-topmost-line (x y) (defun artist-ff-is-topmost-line (_x y)
"Determine whether the position X,Y is on the topmost line or not." "Determine whether the position X,Y is on the topmost line or not."
(= y 0)) (= y 0))
(defun artist-ff-is-bottommost-line (x y) (defun artist-ff-is-bottommost-line (_x y)
"Determine whether the position X,Y is on the bottommost line or not." "Determine whether the position X,Y is on the bottommost line or not."
(save-excursion (save-excursion
(goto-char (point-max)) (goto-char (point-max))
@ -3742,7 +3739,6 @@ original contents of that area in the buffer."
(defun artist-flood-fill (x1 y1) (defun artist-flood-fill (x1 y1)
"Flood-fill starting at X1, Y1. Fill with the char in `artist-fill-char'." "Flood-fill starting at X1, Y1. Fill with the char in `artist-fill-char'."
(let ((stack nil) (let ((stack nil)
(input-queue nil)
;; We are flood-filling the area that has this character. ;; We are flood-filling the area that has this character.
(c (artist-get-char-at-xy-conv x1 y1)) (c (artist-get-char-at-xy-conv x1 y1))
(artist-fill-char (if artist-fill-char-set (artist-fill-char (if artist-fill-char-set
@ -3884,7 +3880,7 @@ Optional argument STATE can be used to set state (default is nil)."
(setq artist-arrow-point-2 (artist-make-arrow-point xn yn dirn)))) (setq artist-arrow-point-2 (artist-make-arrow-point xn yn dirn))))
(defun artist-set-arrow-points-for-2points (shape x1 y1 x2 y2) (defun artist-set-arrow-points-for-2points (shape _x1 _y1 _x2 _y2)
"Generic function for setting arrow-points for 2-point shapes. "Generic function for setting arrow-points for 2-point shapes.
The 2-point shape SHAPE is drawn from X1, Y1 to X2, Y2." The 2-point shape SHAPE is drawn from X1, Y1 to X2, Y2."
(let* ((endpoint1 (artist-2point-get-endpoint1 shape)) (let* ((endpoint1 (artist-2point-get-endpoint1 shape))
@ -3906,28 +3902,24 @@ The 2-point shape SHAPE is drawn from X1, Y1 to X2, Y2."
;; on the draw-how ;; on the draw-how
;; ;;
(defun artist-key-undraw-continously (x y) (defun artist-key-undraw-continously (_x _y)
"Undraw current continuous shape with point at X, Y." "Undraw current continuous shape with point at X, Y."
;; No undraw-info for continuous shapes ;; No undraw-info for continuous shapes
nil) nil)
(defun artist-key-undraw-poly (x y) (defun artist-key-undraw-poly (_x _y)
"Undraw current poly shape with point at X, Y." "Undraw current poly shape with point at X, Y."
(let ((undraw-fn (artist-go-get-undraw-fn-from-symbol artist-curr-go)) (let ((undraw-fn (artist-go-get-undraw-fn-from-symbol artist-curr-go)))
(x1 (artist-endpoint-get-x artist-key-endpoint1))
(y1 (artist-endpoint-get-y artist-key-endpoint1)))
(artist-funcall undraw-fn artist-key-shape))) (artist-funcall undraw-fn artist-key-shape)))
(defun artist-key-undraw-1point (x y) (defun artist-key-undraw-1point (_x _y)
"Undraw current 1-point shape at X, Y." "Undraw current 1-point shape at X, Y."
;; No undraw-info for 1-point shapes ;; No undraw-info for 1-point shapes
nil) nil)
(defun artist-key-undraw-2points (x y) (defun artist-key-undraw-2points (_x _y)
"Undraw current 2-point shape at X, Y." "Undraw current 2-point shape at X, Y."
(let ((undraw-fn (artist-go-get-undraw-fn-from-symbol artist-curr-go)) (let ((undraw-fn (artist-go-get-undraw-fn-from-symbol artist-curr-go)))
(x1 (artist-endpoint-get-x artist-key-endpoint1))
(y1 (artist-endpoint-get-y artist-key-endpoint1)))
(artist-funcall undraw-fn artist-key-shape))) (artist-funcall undraw-fn artist-key-shape)))
(defun artist-key-undraw-common () (defun artist-key-undraw-common ()
@ -4071,7 +4063,7 @@ Trimming here means removing white space at end of a line."
(setq artist-key-shape (artist-funcall draw-fn x1 y1 x2 y2)))))) (setq artist-key-shape (artist-funcall draw-fn x1 y1 x2 y2))))))
(defun artist-key-do-continously-1point (x y) (defun artist-key-do-continously-1point (_x _y)
"Update current 1-point shape at X,Y." "Update current 1-point shape at X,Y."
;; Nothing to do continuously for operations ;; Nothing to do continuously for operations
;; where we have only one input point ;; where we have only one input point
@ -4271,8 +4263,7 @@ If optional argument THIS-IS-LAST-POINT is non-nil, this point is the last."
(defun artist-key-set-point-1point (x y) (defun artist-key-set-point-1point (x y)
"Set point for current 1-point shape at X,Y." "Set point for current 1-point shape at X,Y."
(let ((draw-fn (artist-go-get-draw-fn-from-symbol artist-curr-go)) (let ((init-fn (artist-go-get-init-fn-from-symbol artist-curr-go))
(init-fn (artist-go-get-init-fn-from-symbol artist-curr-go))
(prep-fill-fn (artist-go-get-prep-fill-fn-from-symbol artist-curr-go)) (prep-fill-fn (artist-go-get-prep-fill-fn-from-symbol artist-curr-go))
(exit-fn (artist-go-get-exit-fn-from-symbol artist-curr-go)) (exit-fn (artist-go-get-exit-fn-from-symbol artist-curr-go))
(draw-fn (artist-go-get-draw-fn-from-symbol artist-curr-go)) (draw-fn (artist-go-get-draw-fn-from-symbol artist-curr-go))
@ -4802,7 +4793,7 @@ If optional argument STATE is positive, turn borders on."
(orig-draw-region-min-y artist-draw-region-min-y) (orig-draw-region-min-y artist-draw-region-min-y)
(orig-draw-region-max-y artist-draw-region-max-y) (orig-draw-region-max-y artist-draw-region-max-y)
(orig-pointer-shape (if (eq window-system 'x) x-pointer-shape nil)) (orig-pointer-shape (if (eq window-system 'x) x-pointer-shape nil))
(echoq-keystrokes 10000) ; a lot of seconds (echo-keystrokes 0) ; Don't echo unfinished commands.
;; Remember original binding for the button-up event to this ;; Remember original binding for the button-up event to this
;; button-down event. ;; button-down event.
(key (artist-compute-up-event-key ev)) (key (artist-compute-up-event-key ev))
@ -4918,7 +4909,7 @@ If optional argument STATE is positive, turn borders on."
;; Mouse routines ;; Mouse routines
;; ;;
(defsubst artist-shift-has-changed (shift-state ev) (defsubst artist-shift-has-changed (_shift-state _ev)
"From the last SHIFT-STATE and EV, determine if the shift-state has changed." "From the last SHIFT-STATE and EV, determine if the shift-state has changed."
;; This one simply doesn't work. ;; This one simply doesn't work.
;; ;;
@ -4972,8 +4963,7 @@ The event, EV, is the mouse event."
(ev-start-pos (artist-coord-win-to-buf (posn-col-row ev-start))) (ev-start-pos (artist-coord-win-to-buf (posn-col-row ev-start)))
(x1 (artist--adjust-x (car ev-start-pos))) (x1 (artist--adjust-x (car ev-start-pos)))
(y1 (cdr ev-start-pos)) (y1 (cdr ev-start-pos))
(shape) (timer nil))
(timer))
(select-window (posn-window ev-start)) (select-window (posn-window ev-start))
(artist-funcall init-fn x1 y1) (artist-funcall init-fn x1 y1)
(if (not artist-rubber-banding) (if (not artist-rubber-banding)
@ -5017,7 +5007,7 @@ The event, EV, is the mouse event."
(setq draw-fn (artist-go-get-draw-fn-from-symbol op)))) (setq draw-fn (artist-go-get-draw-fn-from-symbol op))))
;; Draw the new shape ;; Draw the new shape
(setq shape (artist-funcall draw-fn x1 y1)) (artist-funcall draw-fn x1 y1)
(artist-move-to-xy x1 y1) (artist-move-to-xy x1 y1)
;; Start the timer to call `draw-fn' repeatedly every ;; Start the timer to call `draw-fn' repeatedly every
@ -5262,7 +5252,6 @@ Operation is done once. The event, EV, is the mouse event."
(shifted (artist-go-get-symbol-shift artist-curr-go t)) (shifted (artist-go-get-symbol-shift artist-curr-go t))
(shift-state (artist-event-is-shifted ev)) (shift-state (artist-event-is-shifted ev))
(op (if shift-state shifted unshifted)) (op (if shift-state shifted unshifted))
(draw-how (artist-go-get-draw-how-from-symbol op))
(init-fn (artist-go-get-init-fn-from-symbol op)) (init-fn (artist-go-get-init-fn-from-symbol op))
(prep-fill-fn (artist-go-get-prep-fill-fn-from-symbol op)) (prep-fill-fn (artist-go-get-prep-fill-fn-from-symbol op))
(exit-fn (artist-go-get-exit-fn-from-symbol op)) (exit-fn (artist-go-get-exit-fn-from-symbol op))
@ -5394,8 +5383,7 @@ The event, EV, is the mouse event."
(interactive) (interactive)
(require 'reporter) (require 'reporter)
(if (y-or-n-p "Do you want to submit a bug report on Artist? ") (if (y-or-n-p "Do you want to submit a bug report on Artist? ")
(let ((to artist-maintainer-address) (let ((vars '(window-system
(vars '(window-system
window-system-version window-system-version
;; ;;
artist-rubber-banding artist-rubber-banding

View file

@ -1,4 +1,4 @@
;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model ;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model -*- lexical-binding: t -*-
;; Copyright (C) 1985, 1994, 2001-2020 Free Software Foundation, Inc. ;; Copyright (C) 1985, 1994, 2001-2020 Free Software Foundation, Inc.

View file

@ -3541,6 +3541,8 @@ There might be text before point."
(process-send-region tex-chktex--process (point-min) (point-max)) (process-send-region tex-chktex--process (point-min) (point-max))
(process-send-eof tex-chktex--process)))) (process-send-eof tex-chktex--process))))
(make-obsolete-variable 'tex-mode-load-hook
"use `with-eval-after-load' instead." "28.1")
(run-hooks 'tex-mode-load-hook) (run-hooks 'tex-mode-load-hook)
(provide 'tex-mode) (provide 'tex-mode)

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