mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Merge branch 'master' into scratch/correct-warning-pos
Merge branch:
commit d29291d665 (HEAD -> master,
origin/master, origin/HEAD)
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Fri Jan 14 12:26:30 2022 -0500
(macroexp--expand-all): Fix bug#53227 and bug#46636
This commit is contained in:
commit
d87a34597c
73 changed files with 3248 additions and 311 deletions
27
INSTALL
27
INSTALL
|
|
@ -226,6 +226,33 @@ e.g. 'emacs25'). On Red Hat-based systems, the corresponding command is
|
|||
|
||||
On FreeBSD, the command is 'pkg install -y `pkg rquery %dn emacs-devel`'.
|
||||
|
||||
* Alternative window systems
|
||||
|
||||
If you want to use Emacs on one of the alternative window systems
|
||||
available on GNU/Linux and some Unix systems, such as Wayland or
|
||||
Broadway, you can build the PGTK ("Pure GTK") port of Emacs, which
|
||||
utilizes the GTK+ toolkit to support those window systems. To this
|
||||
end, invoke the configure script with the '--with-pgtk' option, like
|
||||
this:
|
||||
|
||||
./configure --with-pgtk
|
||||
|
||||
This build is only supported with GTK+ version 3, and it is an error
|
||||
to specify any other X-specific configuration option when PGTK is
|
||||
enabled.
|
||||
|
||||
With the PGTK build, you will be able to switch between running Emacs
|
||||
on X, Wayland and Broadway using the 'GDK_BACKEND' environment
|
||||
variable. GTK+ should automatically detect and use the correct value
|
||||
for your system, but you can also specify it manually. For example,
|
||||
to force GTK+ to run under Broadway, start Emacs like this:
|
||||
|
||||
GDK_BACKEND=broadway emacs ...
|
||||
|
||||
(where '...' denotes any further options you may want to pass to Emacs).
|
||||
|
||||
The GNUstep build also supports the Wayland window system. If that is
|
||||
what you want, see nextstep/INSTALL.
|
||||
|
||||
DETAILED BUILDING AND INSTALLATION:
|
||||
|
||||
|
|
|
|||
|
|
@ -319,6 +319,9 @@ GLIB_COMPILE_SCHEMAS = glib-compile-schemas
|
|||
# Program name transformation.
|
||||
TRANSFORM = @program_transform_name@
|
||||
|
||||
# Prevent any settings in the user environment causing problems.
|
||||
unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
|
||||
|
||||
# What emacs should be called when installed.
|
||||
EMACS_NAME = `echo emacs | sed '$(TRANSFORM)'`
|
||||
EMACS = ${EMACS_NAME}${EXEEXT}
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ top_builddir = @top_builddir@
|
|||
-include ${top_builddir}/src/verbose.mk
|
||||
|
||||
# Prevent any settings in the user environment causing problems.
|
||||
unexport EMACSDATA EMACSDOC EMACSPATH
|
||||
unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
|
||||
|
||||
EMACS = ${top_builddir}/src/emacs
|
||||
emacs = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)'
|
||||
emacs = "${EMACS}" -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)'
|
||||
|
||||
make_bovine = ${emacs} -l semantic/bovine/grammar -f bovine-batch-make-parser
|
||||
make_wisent = ${emacs} -l semantic/wisent/grammar -f wisent-batch-make-parser
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ srcdir = @srcdir@
|
|||
top_srcdir = @top_srcdir@
|
||||
top_builddir = @top_builddir@
|
||||
|
||||
# Prevent any settings in the user environment causing problems.
|
||||
unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
|
||||
|
||||
EMACS = ${top_builddir}/src/emacs
|
||||
unidir = ${top_srcdir}/lisp/international
|
||||
emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
|
||||
|
|
|
|||
|
|
@ -512,6 +512,16 @@ frames by specifying @dfn{frame parameters}. @xref{Frame Parameters}.
|
|||
Delete the selected frame (@code{delete-frame}). This signals an
|
||||
error if there is only one frame.
|
||||
|
||||
@item C-x 5 u
|
||||
@kindex C-x 5 u
|
||||
@findex undelete-frame
|
||||
@findex undelete-frame-mode
|
||||
When @code{undelete-frame-mode} is enabled, undelete one of the 16
|
||||
most recently deleted frames. Without a prefix argument, undelete the
|
||||
most recently deleted frame. With a numerical prefix argument between
|
||||
1 and 16, where 1 is the most recently deleted frame, undelete the
|
||||
corresponding deleted frame.
|
||||
|
||||
@item C-z
|
||||
@kindex C-z @r{(X windows)}
|
||||
Minimize (or iconify) the selected Emacs frame
|
||||
|
|
|
|||
|
|
@ -2317,10 +2317,15 @@ them.
|
|||
@item M-?
|
||||
Find all the references for the identifier at point.
|
||||
|
||||
@item M-x xref-query-replace-in-results @key{RET} @var{regexp} @key{RET} @var{replacement} @key{RET}
|
||||
@item M-x xref-query-replace-in-results @key{RET} @var{replacement} @key{RET}
|
||||
@itemx C-u M-x xref-query-replace-in-results @key{RET} @var{regexp} @key{RET} @var{replacement} @key{RET}
|
||||
Interactively replace @var{regexp} with @var{replacement} in the names
|
||||
of all the identifiers shown in the @file{*xref*} buffer.
|
||||
|
||||
@item M-x xref-find-references-and-replace @key{RET} @var{from} @key{RET} @var{to} @key{RET}
|
||||
Interactively rename all instances of the identifier @var{from} to the
|
||||
new name @var{to}.
|
||||
|
||||
@item M-x tags-search @key{RET} @var{regexp} @key{RET}
|
||||
Search for @var{regexp} through the files in the selected tags
|
||||
table.
|
||||
|
|
@ -2358,13 +2363,21 @@ shown. The default value is @code{nil}, which just shows the results
|
|||
in the @file{*xref*} buffer, but doesn't select any of them.
|
||||
|
||||
@findex xref-query-replace-in-results
|
||||
@kbd{M-x xref-query-replace-in-results} reads a regexp to match identifier
|
||||
names and a replacement string, just like ordinary @kbd{M-x
|
||||
query-replace-regexp}. It then performs the specified replacement in
|
||||
the names of the matching identifiers in all the places in all the
|
||||
files where these identifiers are referenced. This is useful when you
|
||||
@kbd{M-x xref-query-replace-in-results} reads a @var{replacement}
|
||||
string, just like ordinary @kbd{M-x query-replace-regexp}. It then
|
||||
renames the identifiers shown in the @file{*xref*} buffer in all the
|
||||
places in all the files where these identifiers are referenced, such
|
||||
that their new name is @var{replacement}. This is useful when you
|
||||
rename your identifiers as part of refactoring. This command should
|
||||
be invoked in the @file{*xref*} buffer generated by @kbd{M-?}.
|
||||
be invoked in the @file{*xref*} buffer generated by @kbd{M-?}. With a
|
||||
prefix argument, the command also prompts for a regexp to match
|
||||
identifier names, and renames that regexp in the names of the matching
|
||||
identifiers with @var{replacement}.
|
||||
|
||||
@findex xref-find-references-and-replace
|
||||
@kbd{M-x xref-find-references-and-replace} works similarly to
|
||||
@code{xref-query-replace-in-results}, but is more convenient when you
|
||||
want to rename a single identifier specified by its name @var{from}.
|
||||
|
||||
@findex tags-search
|
||||
@kbd{M-x tags-search} reads a regexp using the minibuffer, then
|
||||
|
|
|
|||
|
|
@ -435,14 +435,6 @@ search string, similar to inserting into a buffer using @kbd{C-q}
|
|||
incremental search adds the @samp{control-S} character to the search
|
||||
string.
|
||||
|
||||
@item
|
||||
@findex isearch-char-by-name
|
||||
@kindex C-x 8 RET @r{(Incremental Search)}
|
||||
Type @kbd{C-x 8 @key{RET}} (@code{isearch-char-by-name}), followed by
|
||||
a Unicode name or code-point in hex. This adds the specified
|
||||
character into the search string, similar to the usual
|
||||
@code{insert-char} command (@pxref{Inserting Text}).
|
||||
|
||||
@item
|
||||
@kindex C-^ @r{(Incremental Search)}
|
||||
@findex isearch-toggle-input-method
|
||||
|
|
@ -473,6 +465,23 @@ character to the search string using an input method, and
|
|||
automatically disable the input method afterwards.
|
||||
@end itemize
|
||||
|
||||
@findex isearch-char-by-name
|
||||
@kindex C-x 8 RET @r{(Incremental Search)}
|
||||
Type @kbd{C-x 8 @key{RET}} (@code{isearch-char-by-name}), followed by
|
||||
a Unicode name or code-point in hex. This adds the specified
|
||||
character into the search string, similar to the usual
|
||||
@code{insert-char} command (@pxref{Inserting Text}).
|
||||
|
||||
@findex isearch-emoji-by-name
|
||||
@kindex C-x 8 e RET @r{(Incremental Search)}
|
||||
You can also include Emoji sequences in the search string. Type
|
||||
@w{@kbd{C-x 8 e @key{RET}}} (@code{isearch-emoji-by-name}), followed
|
||||
by the Unicode name of an Emoji (for example, @kbd{smiling face} or
|
||||
@kbd{heart with arrow}). This adds the specified Emoji to the search
|
||||
string. If you don't know the name of the Emoji you want to search
|
||||
for, you can use @kbd{C-x 8 e l} (@code{emoji-list}) and @kbd{C-x 8 e
|
||||
d} (@code{emoji-describe}) (@pxref{Input Methods}).
|
||||
|
||||
@kindex M-s o @r{(Incremental Search)}
|
||||
@findex isearch-occur
|
||||
Typing @kbd{M-s o} in incremental search invokes
|
||||
|
|
|
|||
|
|
@ -667,6 +667,22 @@ which file defined the function, just like @code{defun}
|
|||
By contrast, in programs that manipulate function definitions for other
|
||||
purposes, it is better to use @code{fset}, which does not keep such
|
||||
records. @xref{Function Cells}.
|
||||
@end defun
|
||||
|
||||
@defun function-alias-p object &optional noerror
|
||||
Checks whether @var{object} is a function alias. If it is, it returns
|
||||
a list of symbols representing the function alias chain, else
|
||||
@code{nil}. For instance, if @code{a} is an alias for @code{b}, and
|
||||
@code{b} is an alias for @code{c}:
|
||||
|
||||
@example
|
||||
(function-alias-p 'a)
|
||||
@result{} (b c)
|
||||
@end example
|
||||
|
||||
If there's a loop in the definitions, an error will be signalled. If
|
||||
@var{noerror} is non-@code{nil}, the non-looping parts of the chain is
|
||||
returned instead.
|
||||
@end defun
|
||||
|
||||
You cannot create a new primitive function with @code{defun} or
|
||||
|
|
|
|||
|
|
@ -762,6 +762,9 @@ uncompression packages: an entry of the form @code{("\\.gz\\'"
|
|||
@var{function} t)} can uncompress the file and then put the uncompressed
|
||||
file in the proper mode according to the name sans @samp{.gz}.
|
||||
|
||||
If @code{auto-mode-alist} has more than one element whose @var{regexp}
|
||||
matches the file name, Emacs will use the first match.
|
||||
|
||||
Here is an example of how to prepend several pattern pairs to
|
||||
@code{auto-mode-alist}. (You might use this sort of expression in your
|
||||
init file.)
|
||||
|
|
|
|||
|
|
@ -5281,13 +5281,6 @@ other window is selected. When it is non-@code{nil} and the
|
|||
minibuffer is selected, it takes precedence over
|
||||
@code{other-window-scroll-buffer}. @xref{Definition of
|
||||
minibuffer-scroll-window}.
|
||||
|
||||
When the minibuffer is active, it is the next window if the selected
|
||||
window is the one at the bottom right corner. In this case,
|
||||
@code{scroll-other-window} attempts to scroll the minibuffer. If the
|
||||
minibuffer contains just one line, it has nowhere to scroll to, so the
|
||||
line reappears after the echo area momentarily displays the message
|
||||
@samp{End of buffer}.
|
||||
@end deffn
|
||||
|
||||
@deffn Command scroll-other-window-down &optional count
|
||||
|
|
|
|||
|
|
@ -234,6 +234,10 @@ ${buildinfodir}/tramp.info tramp.html: ${srcdir}/trampver.texi
|
|||
|
||||
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
|
||||
# Prevent any settings in the user environment causing problems.
|
||||
unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
|
||||
|
||||
EMACS = ${abs_top_builddir}/src/emacs
|
||||
emacs = "${EMACS}" -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)'
|
||||
|
||||
|
|
|
|||
|
|
@ -694,6 +694,126 @@ Print the current user. This Eshell version of @command{whoami}
|
|||
supports Tramp.
|
||||
@end table
|
||||
|
||||
@subsection Defining new built-in commands
|
||||
While Eshell can run Lisp functions directly as commands, it may be
|
||||
more convenient to provide a special built-in command for
|
||||
Eshell. Built-in commands are just ordinary Lisp functions designed
|
||||
to be called from Eshell. When defining an Eshell-specific version of
|
||||
an existing function, you can give that function a name starting with
|
||||
@code{eshell/} so that Eshell knows to use it.
|
||||
|
||||
@defmac eshell-eval-using-options name macro-args options body@dots{}
|
||||
This macro processes a list of @var{macro-args} for the command
|
||||
@var{name} using a set of command line @var{options}. If the
|
||||
arguments are parsed successfully, it will store the resulting values
|
||||
in local symbols and execute @var{body}; any remaining arguments will
|
||||
be available in the locally let-bound variable @code{args}. The
|
||||
return value is the value of the last form in @var{body}.
|
||||
|
||||
If an unknown option was passed in @var{macro-args} and an external
|
||||
command was specified (see below), this macro will start a process for
|
||||
that command and throw the tag @code{eshell-external} with the new
|
||||
process as its value.
|
||||
|
||||
@var{options} should be a list beginning with one or more elements of
|
||||
the following form, with each element representing a particular
|
||||
command-line switch:
|
||||
|
||||
@example
|
||||
(@var{short} @var{long} @var{value} @var{symbol} @var{help-string})
|
||||
@end example
|
||||
|
||||
@table @var
|
||||
@item short
|
||||
This element, if non-nil, should be a character to be used as a short
|
||||
switch, like @code{-@var{short}}. At least one of this element and
|
||||
@var{long} must be non-nil.
|
||||
|
||||
@item long
|
||||
This element, if non-nil, should be a string to be used as a long
|
||||
switch, like @code{--@var{long}}.
|
||||
|
||||
@item value
|
||||
This element is the value associated with the option. It can be
|
||||
either:
|
||||
|
||||
@table @asis
|
||||
@item @code{t}
|
||||
The option needs a value to be specified after the switch.
|
||||
|
||||
@item @code{nil}
|
||||
The option is given the value @code{t}.
|
||||
|
||||
@item anything else
|
||||
The option is given the specified value.
|
||||
@end table
|
||||
|
||||
@item symbol
|
||||
This element is the Lisp symbol that will be bound to @var{value}. If
|
||||
@var{symbol} is @code{nil}, specifying this switch will instead call
|
||||
@code{eshell-show-usage}, and so is appropriate for an option like
|
||||
@code{--help}.
|
||||
|
||||
@item help-string
|
||||
This element is a documentation string for the option, which will be
|
||||
displayed when @code{eshell-show-usage} is invoked.
|
||||
@end table
|
||||
|
||||
After the list of command-line switch elements, @var{options} can
|
||||
include additional keyword arguments to control how
|
||||
@code{eshell-eval-using-options} behaves. Some of these take
|
||||
arguments, while others don't. The recognized keywords are:
|
||||
|
||||
@table @code
|
||||
@item :external @var{string}
|
||||
Specify @var{string} as an external command to run if there are
|
||||
unknown switches in @var{macro-args}.
|
||||
|
||||
@item :usage @var{string}
|
||||
Set @var{string} as the initial part of the command's documentation
|
||||
string. It appears before the options are listed.
|
||||
|
||||
@item :post-usage @var{string}
|
||||
Set @var{string} to be the (optional) trailing part of the command's
|
||||
documentation string. It appears after the list of options, but
|
||||
before the final part of the documentation about the associated
|
||||
external command, if there is one.
|
||||
|
||||
@item :show-usage
|
||||
If present, then show the usage message if the command is called with
|
||||
no arguments.
|
||||
|
||||
@item :preserve-args
|
||||
Normally, @code{eshell-eval-using-options} flattens the list of
|
||||
arguments in @var{macro-args} and converts each to a string. If this
|
||||
keyword is present, avoid doing that, instead preserving the original
|
||||
arguments. This is useful for commands which want to accept arbitrary
|
||||
Lisp objects.
|
||||
|
||||
@item :parse-leading-options-only
|
||||
If present, do not parse dash or switch arguments after the first
|
||||
positional argument. Instead, treat them as positional arguments
|
||||
themselves.
|
||||
@end table
|
||||
|
||||
For example, you could handle a subset of the options for the
|
||||
@code{ls} command like this:
|
||||
|
||||
@example
|
||||
(eshell-eval-using-options
|
||||
"ls" macro-args
|
||||
'((?a nil nil show-all "show all files")
|
||||
(?I "ignore" t ignore-pattern "ignore files matching pattern")
|
||||
(nil "help" nil nil "show this help message")
|
||||
:external "ls"
|
||||
:usage "[OPTION]... [FILE]...
|
||||
List information about FILEs (the current directory by default).")
|
||||
;; List the files in ARGS somehow...
|
||||
)
|
||||
@end example
|
||||
|
||||
@end defmac
|
||||
|
||||
@subsection Built-in variables
|
||||
Eshell knows a few built-in variables:
|
||||
|
||||
|
|
|
|||
|
|
@ -12223,7 +12223,6 @@ controlling variable is a predicate list, as described above.
|
|||
@vindex gnus-treat-highlight-citation
|
||||
@vindex gnus-treat-highlight-headers
|
||||
@vindex gnus-treat-highlight-signature
|
||||
@vindex gnus-treat-play-sounds
|
||||
@vindex gnus-treat-x-pgp-sig
|
||||
@vindex gnus-treat-unfold-headers
|
||||
@vindex gnus-treat-fold-headers
|
||||
|
|
@ -12359,8 +12358,6 @@ is controlled by @code{gnus-body-boundary-delimiter}.
|
|||
|
||||
@xref{Article Highlighting}.
|
||||
|
||||
@vindex gnus-treat-play-sounds
|
||||
@item gnus-treat-play-sounds
|
||||
@item gnus-treat-ansi-sequences (t)
|
||||
@vindex gnus-treat-x-pgp-sig
|
||||
@item gnus-treat-x-pgp-sig (head)
|
||||
|
|
|
|||
|
|
@ -2857,7 +2857,7 @@ similar user option as auto-save files, called
|
|||
original file.
|
||||
|
||||
If you change @code{lock-file-name-transforms} in order to keep file
|
||||
locks for remote files somewhere else, you will loose Emacs' feature
|
||||
locks for remote files somewhere else, you will lose Emacs's feature
|
||||
to warn you, if a file is changed in parallel from different Emacs
|
||||
sessions, or via different remote connections. Be careful with such
|
||||
settings.
|
||||
|
|
@ -2926,7 +2926,7 @@ you, for example, mark the remote directory
|
|||
@file{@trampfn{nextcloud,user@@host,/path/to/dir}} for encryption, the
|
||||
configuration file is saved as
|
||||
@file{tramp-%2Fnextcloud%3Auser%40host%3A%2Fpath%2Fto%2Fdir%2F.encfs6.xml}
|
||||
in @code{user-emacs-directory}. Do not loose this file and the
|
||||
in @code{user-emacs-directory}. Do not lose this file and the
|
||||
corresponding password; otherwise there is no way to decrypt your
|
||||
encrypted files.
|
||||
|
||||
|
|
|
|||
40
etc/NEWS
40
etc/NEWS
|
|
@ -223,6 +223,8 @@ inserted.
|
|||
This command will tell you the name of the Emoji at point. (This
|
||||
command also works for non-Emoji characters.)
|
||||
|
||||
*** New input method 'emoji'.
|
||||
|
||||
** Help
|
||||
|
||||
---
|
||||
|
|
@ -271,10 +273,15 @@ height use 'window-height' in combination with 'body-lines'.
|
|||
|
||||
*** 'other-window-scroll-default' can define the other window to scroll.
|
||||
|
||||
** Rcirc
|
||||
** Frames
|
||||
|
||||
+++
|
||||
*** New command 'rcirc-when'.
|
||||
*** Deleted frames can now be undeleted.
|
||||
The 16 most recently deleted frames can be undeleted with 'C-x 5 u' when
|
||||
'undelete-frame-mode' is enabled. Without a prefix argument, undelete
|
||||
the most recently deleted frame. With a numerical prefix argument
|
||||
between 1 and 16, where 1 is the most recently deleted frame, undelete
|
||||
the corresponding deleted frame.
|
||||
|
||||
** Tab Bars and Tab Lines
|
||||
|
||||
|
|
@ -307,6 +314,11 @@ The Emacs server will be automatically stopped when certain conditions
|
|||
are met. The conditions are given by the argument, which can be
|
||||
'empty', 'delete-frame' or 'kill-terminal'.
|
||||
|
||||
** Rcirc
|
||||
|
||||
+++
|
||||
*** New command 'rcirc-when'.
|
||||
|
||||
* Editing Changes in Emacs 29.1
|
||||
|
||||
---
|
||||
|
|
@ -392,6 +404,13 @@ the *Completions* buffer.
|
|||
+++
|
||||
*** New user option 'char-fold-override' disables default character equivalences.
|
||||
|
||||
+++
|
||||
*** New command 'isearch-emoji-by-name'.
|
||||
It is bound to 'C-x 8 e RET' during an incremental search. The
|
||||
command accepts the Unicode name of an Emoji (for example, "smiling
|
||||
face" or "heart with arrow"), like 'C-x 8 e e', with minibuffer
|
||||
completion, and adds the Emoji into the search string.
|
||||
|
||||
** New minor mode 'glyphless-display-mode'.
|
||||
This allows an easy way to toggle seeing all glyphless characters in
|
||||
the current buffer.
|
||||
|
|
@ -575,6 +594,12 @@ to enable the display of the buffer list.
|
|||
It is bound to 'C-M-,' and jumps to the location where 'xref-go-back'
|
||||
('M-,', also known as 'xref-pop-marker-stack') was invoked previously.
|
||||
|
||||
*** 'xref-query-replace-in-results' does not prompt for FROM when
|
||||
called without prefix argument, to make the most common case faster:
|
||||
replacing entire matches.
|
||||
|
||||
*** New command 'xref-find-references-and-replace' to rename one identifier.
|
||||
|
||||
** File notifications
|
||||
|
||||
+++
|
||||
|
|
@ -916,6 +941,11 @@ The input must be encoded text.
|
|||
|
||||
* Lisp Changes in Emacs 29.1
|
||||
|
||||
+++
|
||||
** New function 'function-alias-p'.
|
||||
This predicate says whether an object is a function alias, and if it
|
||||
is, the alias chain is returned.
|
||||
|
||||
+++
|
||||
** New variable 'lisp-directory' holds the directory of Emacs's own Lisp files.
|
||||
|
||||
|
|
@ -1090,6 +1120,12 @@ dimensions.
|
|||
Specifying a cons as the from argument allows to start measuring text
|
||||
from a specified amount of pixels above or below a position.
|
||||
|
||||
---
|
||||
** 'eshell-eval-using-options' now follows POSIX/GNU argument syntax conventions.
|
||||
Built-in commands in Eshell now accept command-line options with
|
||||
values passed as a single token, such as '-oVALUE' or
|
||||
'--option=VALUE'.
|
||||
|
||||
** XDG support
|
||||
|
||||
*** New function 'xdg-state-home' returns 'XDG_STATE_HOME' environment variable.
|
||||
|
|
|
|||
|
|
@ -35,15 +35,14 @@ EXEEXT = @EXEEXT@
|
|||
-include ${top_builddir}/src/verbose.mk
|
||||
|
||||
# Prevent any settings in the user environment causing problems.
|
||||
unexport EMACSDATA EMACSDOC EMACSPATH
|
||||
unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
|
||||
|
||||
# Which Emacs to use to convert TIT files to Emacs Lisp files,
|
||||
# and generate the file leim-list.el.
|
||||
EMACS = ../src/emacs${EXEEXT}
|
||||
|
||||
# How to run Emacs.
|
||||
# Prevent any setting of EMACSLOADPATH in user environment causing problems.
|
||||
RUN_EMACS = EMACSLOADPATH= '$(EMACS)' -batch --no-site-file --no-site-lisp
|
||||
RUN_EMACS = '$(EMACS)' -batch --no-site-file --no-site-lisp
|
||||
|
||||
MKDIR_P = @MKDIR_P@
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
|
||||
SHELL = @SHELL@
|
||||
|
||||
# Prevent any settings in the user environment causing problems.
|
||||
unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
|
||||
|
||||
# Following ../lisp/Makefile.in.
|
||||
EMACS = ../src/emacs${EXEEXT}
|
||||
EMACSOPT = -batch --no-site-file --no-site-lisp
|
||||
|
|
|
|||
|
|
@ -101,11 +101,10 @@ MAIN_FIRST = ./emacs-lisp/eieio.el ./emacs-lisp/eieio-base.el \
|
|||
./cedet/semantic/db.el ./emacs-lisp/cconv.el
|
||||
|
||||
# Prevent any settings in the user environment causing problems.
|
||||
unexport EMACSDATA EMACSDOC EMACSPATH
|
||||
unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH
|
||||
|
||||
# The actual Emacs command run in the targets below.
|
||||
# Prevent any setting of EMACSLOADPATH in user environment causing problems.
|
||||
emacs = EMACSLOADPATH= '$(EMACS)' $(EMACSOPT)
|
||||
emacs = '$(EMACS)' $(EMACSOPT)
|
||||
|
||||
## Subdirectories, relative to builddir.
|
||||
SUBDIRS = $(sort $(shell find ${srcdir} -type d -print))
|
||||
|
|
|
|||
|
|
@ -861,7 +861,7 @@ while \(:host t) would find all host entries."
|
|||
secret)))
|
||||
|
||||
(defun auth-source-pick-first-password (&rest spec)
|
||||
"Pick the first secret found from applying SPEC to `auth-source-search'."
|
||||
"Pick the first secret found by applying 'auth-source-search' to SPEC."
|
||||
(auth-info-password (car (apply #'auth-source-search (plist-put spec :max 1)))))
|
||||
|
||||
(defun auth-source-format-prompt (prompt alist)
|
||||
|
|
|
|||
|
|
@ -96,12 +96,14 @@ Value does not include \".\" or \"..\"."
|
|||
(cond ((member battery-upower-service (dbus-list-activatable-names))
|
||||
#'battery-upower)
|
||||
((and (eq system-type 'gnu/linux)
|
||||
(file-readable-p "/sys/")
|
||||
(battery--find-linux-sysfs-batteries))
|
||||
#'battery-linux-sysfs)
|
||||
((and (eq system-type 'gnu/linux)
|
||||
(file-directory-p "/proc/acpi/battery"))
|
||||
#'battery-linux-proc-acpi)
|
||||
((and (eq system-type 'gnu/linux)
|
||||
(file-readable-p "/proc/")
|
||||
(file-readable-p "/proc/apm"))
|
||||
#'battery-linux-proc-apm)
|
||||
((and (eq system-type 'berkeley-unix)
|
||||
|
|
|
|||
|
|
@ -191,8 +191,9 @@ other meta-variable based on this name.")
|
|||
"Encode one makefile.")
|
||||
|
||||
;;; Code:
|
||||
(cl-defmethod project-add-file ((ot project-am-target))
|
||||
(cl-defmethod project-add-file ((ot project-am-target) &optional _file)
|
||||
"Add the current buffer into a project.
|
||||
_FILE is ignored.
|
||||
OT is the object target. DIR is the directory to start in."
|
||||
(let* ((target (if ede-object (error "Already associated w/ a target")
|
||||
(let ((amf (project-am-load default-directory)))
|
||||
|
|
|
|||
|
|
@ -697,7 +697,11 @@ Valid keywords and arguments are:
|
|||
(defmacro easy-mmode-defmap (m bs doc &rest args)
|
||||
"Define a constant M whose value is the result of `easy-mmode-define-keymap'.
|
||||
The M, BS, and ARGS arguments are as per that function. DOC is
|
||||
the constant's documentation."
|
||||
the constant's documentation.
|
||||
|
||||
This macro is deprecated; use `defvar-keymap' instead."
|
||||
;; FIXME: Declare obsolete in favor of `defvar-keymap'. It is still
|
||||
;; used for `gud-menu-map' and `gud-minor-mode-map', so fix that first.
|
||||
(declare (doc-string 3) (indent 1))
|
||||
`(defconst ,m
|
||||
(easy-mmode-define-keymap ,bs nil (if (boundp ',m) ,m) ,(cons 'list args))
|
||||
|
|
|
|||
|
|
@ -335,15 +335,20 @@ It should only be stopped when ran from inside `ert--run-test-internal'."
|
|||
(unless (eql ,value ',default-value)
|
||||
(list :value ,value))
|
||||
(unless (eql ,value ',default-value)
|
||||
(let ((-explainer-
|
||||
(and (symbolp ',fn-name)
|
||||
(get ',fn-name 'ert-explainer))))
|
||||
(when -explainer-
|
||||
(when-let ((-explainer-
|
||||
(ert--get-explainer ',fn-name)))
|
||||
(list :explanation
|
||||
(apply -explainer- ,args))))))
|
||||
(apply -explainer- ,args)))))
|
||||
value)
|
||||
,value))))))))
|
||||
|
||||
(defun ert--get-explainer (fn-name)
|
||||
(when (symbolp fn-name)
|
||||
(cl-loop for fn in (cons fn-name (function-alias-p fn-name))
|
||||
for explainer = (get fn 'ert-explainer)
|
||||
when explainer
|
||||
return explainer)))
|
||||
|
||||
(defun ert--expand-should (whole form inner-expander)
|
||||
"Helper function for the `should' macro and its variants.
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
(defmacro inline-quote (_exp)
|
||||
"Similar to backquote, but quotes code and only accepts , and not ,@."
|
||||
(declare (debug backquote-form))
|
||||
(declare (debug (backquote-form)))
|
||||
(error "inline-quote can only be used within define-inline"))
|
||||
|
||||
(defmacro inline-const-p (_exp)
|
||||
|
|
|
|||
|
|
@ -382,14 +382,17 @@ Assumes the caller has bound `macroexpand-all-environment'."
|
|||
(macroexp--all-forms args)
|
||||
form)
|
||||
(macroexp--expand-all newform))))
|
||||
(`(funcall . ,(or `(,exp . ,args) pcase--dontcare))
|
||||
(`(funcall ,exp . ,args)
|
||||
(let ((eexp (macroexp--expand-all exp))
|
||||
(eargs (macroexp--all-forms args)))
|
||||
;; Rewrite (funcall #'foo bar) to (foo bar), in case `foo'
|
||||
;; has a compiler-macro, or to unfold it.
|
||||
(pcase eexp
|
||||
(`#',f (macroexp--expand-all `(,f . ,eargs)))
|
||||
((and `#',f
|
||||
(guard (not (or (special-form-p f) (macrop f))))) ;; bug#46636
|
||||
(macroexp--expand-all `(,f . ,eargs)))
|
||||
(_ `(funcall ,eexp . ,eargs)))))
|
||||
(`(funcall . ,_) form) ;bug#53227
|
||||
(`(,func . ,_)
|
||||
(let ((handler (function-get func 'compiler-macro))
|
||||
(funargs (function-get func 'funarg-positions)))
|
||||
|
|
@ -430,7 +433,6 @@ Assumes the caller has bound `macroexpand-all-environment'."
|
|||
newform
|
||||
(macroexp--expand-all newform)))
|
||||
(macroexp--expand-all newform))))))
|
||||
|
||||
(_ form)))
|
||||
(pop byte-compile-form-stack)))
|
||||
|
||||
|
|
|
|||
|
|
@ -1299,6 +1299,9 @@ If FUNCTION is non-nil, place point on the entry for FUNCTION (if any)."
|
|||
(text-property-search-forward 'shortdoc-function function t)
|
||||
(beginning-of-line)))
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'shortdoc #'shortdoc-display-group)
|
||||
|
||||
(defun shortdoc--display-function (data)
|
||||
(let ((function (pop data))
|
||||
(start-section (point))
|
||||
|
|
|
|||
|
|
@ -187,49 +187,82 @@ passed to this command, the external version `%s'
|
|||
will be called instead." extcmd)))))
|
||||
(throw 'eshell-usage usage)))
|
||||
|
||||
(defun eshell--set-option (name ai opt options opt-vals)
|
||||
(defun eshell--split-switch (switch kind)
|
||||
"Split SWITCH into its option name and potential value, if any.
|
||||
KIND should be the integer 0 if SWITCH is a short option, or 1 if it's
|
||||
a long option."
|
||||
(if (eq kind 0)
|
||||
;; Short option
|
||||
(cons (aref switch 0)
|
||||
(and (> (length switch) 1) (substring switch 1)))
|
||||
;; Long option
|
||||
(save-match-data
|
||||
(string-match "\\([^=]*\\)\\(?:=\\(.*\\)\\)?" switch)
|
||||
(cons (match-string 1 switch) (match-string 2 switch)))))
|
||||
|
||||
(defun eshell--set-option (name ai opt value options opt-vals)
|
||||
"Using NAME's remaining args (index AI), set the OPT within OPTIONS.
|
||||
If the option consumes an argument for its value, the argument list
|
||||
will be modified."
|
||||
VALUE is the potential value of the OPT, coming from args like
|
||||
\"-fVALUE\" or \"--foo=VALUE\", or nil if no value was supplied. If
|
||||
OPT doesn't consume a value, return VALUE unchanged so that it can be
|
||||
processed later; otherwsie, return nil.
|
||||
|
||||
If the OPT consumes an argument for its value and VALUE is nil, the
|
||||
argument list will be modified."
|
||||
(if (not (nth 3 opt))
|
||||
(eshell-show-usage name options)
|
||||
(setcdr (assq (nth 3 opt) opt-vals)
|
||||
(if (eq (nth 2 opt) t)
|
||||
(progn
|
||||
(setcdr (assq (nth 3 opt) opt-vals)
|
||||
(or value
|
||||
(if (> ai (length eshell--args))
|
||||
(error "%s: missing option argument" name)
|
||||
(pop (nthcdr ai eshell--args)))
|
||||
(or (nth 2 opt) t)))))
|
||||
(pop (nthcdr ai eshell--args)))))
|
||||
nil)
|
||||
(setcdr (assq (nth 3 opt) opt-vals)
|
||||
(or (nth 2 opt) t))
|
||||
value)))
|
||||
|
||||
(defun eshell--process-option (name switch kind ai options opt-vals)
|
||||
"For NAME, process SWITCH (of type KIND), from args at index AI.
|
||||
The SWITCH will be looked up in the set of OPTIONS.
|
||||
|
||||
SWITCH should be either a string or character. KIND should be the
|
||||
integer 0 if it's a character, or 1 if it's a string.
|
||||
SWITCH should be a string starting with the option to process,
|
||||
possibly followed by its value, e.g. \"u\" or \"uUSER\". KIND should
|
||||
be the integer 0 if it's a short option, or 1 if it's a long option.
|
||||
|
||||
The SWITCH is then be matched against OPTIONS. If no matching handler
|
||||
is found, and an :external command is defined (and available), it will
|
||||
be called; otherwise, an error will be triggered to say that the
|
||||
switch is unrecognized."
|
||||
(let* ((opts options)
|
||||
found)
|
||||
The SWITCH is then be matched against OPTIONS. If KIND is 0 and the
|
||||
SWITCH matches an option that doesn't take a value, return the
|
||||
remaining characters in SWITCH to be processed later as further short
|
||||
options.
|
||||
|
||||
If no matching handler is found, and an :external command is defined
|
||||
(and available), it will be called; otherwise, an error will be
|
||||
triggered to say that the switch is unrecognized."
|
||||
(let ((switch (eshell--split-switch switch kind))
|
||||
(opts options)
|
||||
found remaining)
|
||||
(while opts
|
||||
(if (and (listp (car opts))
|
||||
(nth kind (car opts))
|
||||
(equal switch (nth kind (car opts))))
|
||||
(equal (car switch) (nth kind (car opts))))
|
||||
(progn
|
||||
(eshell--set-option name ai (car opts) options opt-vals)
|
||||
(setq remaining (eshell--set-option name ai (car opts)
|
||||
(cdr switch) options opt-vals))
|
||||
(when (and remaining (eq kind 1))
|
||||
(error "%s: option --%s doesn't allow an argument"
|
||||
name (car switch)))
|
||||
(setq found t opts nil))
|
||||
(setq opts (cdr opts))))
|
||||
(unless found
|
||||
(if found
|
||||
remaining
|
||||
(let ((extcmd (memq ':external options)))
|
||||
(when extcmd
|
||||
(setq extcmd (eshell-search-path (cadr extcmd)))
|
||||
(if extcmd
|
||||
(throw 'eshell-ext-command extcmd)
|
||||
(error (if (characterp switch) "%s: unrecognized option -%c"
|
||||
(error (if (characterp (car switch)) "%s: unrecognized option -%c"
|
||||
"%s: unrecognized option --%s")
|
||||
name switch)))))))
|
||||
name (car switch))))))))
|
||||
|
||||
(defun eshell--process-args (name args options)
|
||||
"Process the given ARGS using OPTIONS."
|
||||
|
|
@ -262,12 +295,9 @@ switch is unrecognized."
|
|||
(if (> (length switch) 0)
|
||||
(eshell--process-option name switch 1 ai options opt-vals)
|
||||
(setq ai (length eshell--args)))
|
||||
(let ((len (length switch))
|
||||
(index 0))
|
||||
(while (< index len)
|
||||
(eshell--process-option name (aref switch index)
|
||||
0 ai options opt-vals)
|
||||
(setq index (1+ index))))))))
|
||||
(while (> (length switch) 0)
|
||||
(setq switch (eshell--process-option name switch 0
|
||||
ai options opt-vals)))))))
|
||||
(nconc (mapcar #'cdr opt-vals) eshell--args)))
|
||||
|
||||
(provide 'esh-opt)
|
||||
|
|
|
|||
|
|
@ -1449,9 +1449,12 @@ which may actually result in an URL rather than a filename."
|
|||
(ffap-file-exists-string (substring name 0 (match-beginning 0)))))
|
||||
;; If it contains a colon, get rid of it (and return if exists)
|
||||
((and (string-match path-separator name)
|
||||
(setq name (ffap-string-at-point 'nocolon))
|
||||
(> (length name) 0)
|
||||
(ffap-file-exists-string name)))
|
||||
(let ((this-name (ffap-string-at-point 'nocolon)))
|
||||
;; But don't interpret the first part if ":/bin" as
|
||||
;; the empty string.
|
||||
(when (> (length this-name) 0)
|
||||
(setq name this-name)
|
||||
(ffap-file-exists-string name)))))
|
||||
;; File does not exist, try the alist:
|
||||
((let ((alist ffap-alist) tem try case-fold-search)
|
||||
(while (and alist (not try))
|
||||
|
|
|
|||
|
|
@ -483,12 +483,16 @@ If `silently', don't ask the user before saving."
|
|||
|
||||
(defcustom lock-file-name-transforms nil
|
||||
"Transforms to apply to buffer file name before making a lock file name.
|
||||
This has the same syntax as
|
||||
`auto-save-file-name-transforms' (which see), but instead of
|
||||
applying to auto-save file names, it's applied to lock file names.
|
||||
This has the same syntax as `auto-save-file-name-transforms',
|
||||
but applies to lock file names instead of auto-save file names.
|
||||
|
||||
By default, a lock file is put into the same directory as the
|
||||
file it's locking, and it has the same name, but with \".#\" prepended."
|
||||
By default, Emacs puts each lock file into the same directory as the
|
||||
file it locks, prepending \".#\" to the base file name.
|
||||
|
||||
Note that changing this could break lock file functionality, e.g.:
|
||||
if different users access the same file, using different lock file settings;
|
||||
if accessing files on a shared file system from different hosts,
|
||||
using a transform that puts the lock files on a local file system."
|
||||
:group 'files
|
||||
:type '(repeat (list (regexp :tag "Regexp")
|
||||
(string :tag "Replacement")
|
||||
|
|
|
|||
|
|
@ -2529,6 +2529,80 @@ deleting them."
|
|||
(if iconify (iconify-frame this) (delete-frame this)))
|
||||
(setq this next))))
|
||||
|
||||
(eval-when-compile (require 'frameset))
|
||||
|
||||
(defvar undelete-frame--deleted-frames nil
|
||||
"Internal variable used by `undelete-frame--handle-delete-frame'.")
|
||||
|
||||
(defun undelete-frame--handle-delete-frame (frame)
|
||||
"Save the configuration of frames deleted with `delete-frame'.
|
||||
Only the 16 most recently deleted frames are saved."
|
||||
(when (frame-live-p frame)
|
||||
(setq undelete-frame--deleted-frames
|
||||
(cons
|
||||
(cons
|
||||
(display-graphic-p)
|
||||
(frameset-save
|
||||
(list frame)
|
||||
;; When the daemon is started from a graphical
|
||||
;; environment, TTY frames have a 'display' parameter set
|
||||
;; to the value of $DISPLAY (see the note in
|
||||
;; `server--on-display-p'). Do not store that parameter
|
||||
;; in the frameset, otherwise `frameset-restore' attempts
|
||||
;; to restore a graphical frame.
|
||||
:filters (if (display-graphic-p)
|
||||
frameset-filter-alist
|
||||
(cons '(display . :never)
|
||||
frameset-filter-alist))))
|
||||
undelete-frame--deleted-frames))
|
||||
(if (> (length undelete-frame--deleted-frames) 16)
|
||||
(setq undelete-frame--deleted-frames
|
||||
(butlast undelete-frame--deleted-frames)))))
|
||||
|
||||
(define-minor-mode undelete-frame-mode
|
||||
"Enable the `undelete-frame' command."
|
||||
:group 'frames
|
||||
:global t
|
||||
(if undelete-frame-mode
|
||||
(add-hook 'delete-frame-functions
|
||||
#'undelete-frame--handle-delete-frame -75)
|
||||
(remove-hook 'delete-frame-functions
|
||||
#'undelete-frame--handle-delete-frame)
|
||||
(setq undelete-frame--deleted-frames nil)))
|
||||
|
||||
(defun undelete-frame (&optional arg)
|
||||
"Undelete a frame deleted with `delete-frame'.
|
||||
Without a prefix argument, undelete the most recently deleted
|
||||
frame.
|
||||
With a numerical prefix argument ARG between 1 and 16, where 1 is
|
||||
most recently deleted frame, undelete the ARGth deleted frame.
|
||||
When called from Lisp, returns the new frame."
|
||||
(interactive "P")
|
||||
(if (not undelete-frame-mode)
|
||||
(user-error "Undelete-Frame mode is disabled")
|
||||
(if (consp arg)
|
||||
(user-error "Missing deleted frame number argument")
|
||||
(let* ((number (pcase arg ('nil 1) ('- -1) (_ arg)))
|
||||
(frames (frame-list))
|
||||
(frameset (nth (1- number) undelete-frame--deleted-frames))
|
||||
(graphic (display-graphic-p)))
|
||||
(if (not (<= 1 number 16))
|
||||
(user-error "%d is not a valid deleted frame number argument"
|
||||
number)
|
||||
(if (not frameset)
|
||||
(user-error "No deleted frame with number %d" number)
|
||||
(if (not (eq graphic (car frameset)))
|
||||
(user-error
|
||||
"Cannot undelete a %s display frame on a %s display"
|
||||
(if graphic "non-graphic" "graphic")
|
||||
(if graphic "graphic" "non-graphic"))
|
||||
(setq undelete-frame--deleted-frames
|
||||
(delq frameset undelete-frame--deleted-frames))
|
||||
(frameset-restore (cdr frameset))
|
||||
(let ((frame (car (seq-difference (frame-list) frames))))
|
||||
(when frame
|
||||
(select-frame-set-input-focus frame)
|
||||
frame)))))))))
|
||||
|
||||
;;; Window dividers.
|
||||
(defgroup window-divider nil
|
||||
|
|
@ -2873,6 +2947,7 @@ See also `toggle-frame-maximized'."
|
|||
(define-key ctl-x-5-map "o" #'other-frame)
|
||||
(define-key ctl-x-5-map "5" #'other-frame-prefix)
|
||||
(define-key ctl-x-5-map "c" #'clone-frame)
|
||||
(define-key ctl-x-5-map "u" #'undelete-frame)
|
||||
(define-key global-map [f11] #'toggle-frame-fullscreen)
|
||||
(define-key global-map [(meta f10)] #'toggle-frame-maximized)
|
||||
(define-key esc-map [f10] #'toggle-frame-maximized)
|
||||
|
|
|
|||
|
|
@ -1159,13 +1159,15 @@ predicate. See Info node `(gnus)Customizing Articles'."
|
|||
:link '(custom-manual "(gnus)Customizing Articles")
|
||||
:type gnus-article-treat-head-custom)
|
||||
|
||||
(defcustom gnus-treat-emphasize 50000
|
||||
(defcustom gnus-treat-emphasize '(and 50000
|
||||
(not (typep "text/html")))
|
||||
"Emphasize text.
|
||||
Valid values are nil, t, `head', `first', `last', an integer or a
|
||||
predicate. See Info node `(gnus)Customizing Articles'."
|
||||
:group 'gnus-article-treat
|
||||
:link '(custom-manual "(gnus)Customizing Articles")
|
||||
:type gnus-article-treat-custom)
|
||||
:type gnus-article-treat-custom
|
||||
:version "29.1")
|
||||
(put 'gnus-treat-emphasize 'highlight t)
|
||||
|
||||
(defcustom gnus-treat-strip-cr nil
|
||||
|
|
|
|||
|
|
@ -355,8 +355,13 @@ This is not required after changing `gnus-registry-cache-file'."
|
|||
"Load the registry from the cache file."
|
||||
(interactive)
|
||||
(let ((file gnus-registry-cache-file))
|
||||
(gnus-message 5 "Initializing the registry")
|
||||
(condition-case nil
|
||||
(progn
|
||||
(gnus-registry-read file)
|
||||
(gnus-registry-install-hooks)
|
||||
(gnus-registry-install-shortcuts)
|
||||
(setq gnus-registry-enabled t))
|
||||
(file-error
|
||||
;; Fix previous mis-naming of the registry file.
|
||||
(let ((old-file-name
|
||||
|
|
@ -846,9 +851,9 @@ Overrides existing keywords with FORCE set non-nil."
|
|||
|
||||
(defun gnus-registry-register-message-ids ()
|
||||
"Register the Message-ID of every article in the group."
|
||||
(unless (or (gnus-parameter-registry-ignore gnus-newsgroup-name)
|
||||
(unless (or (null gnus-registry-enabled)
|
||||
(null gnus-registry-register-all)
|
||||
(null (eieio-object-p gnus-registry-db)))
|
||||
(gnus-parameter-registry-ignore gnus-newsgroup-name))
|
||||
(dolist (article gnus-newsgroup-articles)
|
||||
(let* ((id (gnus-registry-fetch-message-id-fast article))
|
||||
(groups (gnus-registry-get-id-key id 'group)))
|
||||
|
|
@ -1175,7 +1180,8 @@ non-nil."
|
|||
(defun gnus-registry-clear ()
|
||||
"Clear the registry."
|
||||
(gnus-registry-unload-hook)
|
||||
(setq gnus-registry-db nil))
|
||||
(setq gnus-registry-db nil
|
||||
gnus-registry-enabled nil))
|
||||
|
||||
(gnus-add-shutdown 'gnus-registry-clear 'gnus)
|
||||
|
||||
|
|
@ -1183,16 +1189,12 @@ non-nil."
|
|||
(defun gnus-registry-initialize ()
|
||||
"Initialize the Gnus registry."
|
||||
(interactive)
|
||||
(gnus-message 5 "Initializing the registry")
|
||||
(gnus-registry-install-hooks)
|
||||
(gnus-registry-install-shortcuts)
|
||||
(if (gnus-alive-p)
|
||||
(gnus-registry-load)
|
||||
(add-hook 'gnus-read-newsrc-el-hook #'gnus-registry-load)))
|
||||
|
||||
(defun gnus-registry-install-hooks ()
|
||||
"Install the registry hooks."
|
||||
(setq gnus-registry-enabled t)
|
||||
(add-hook 'gnus-summary-article-move-hook #'gnus-registry-action)
|
||||
(add-hook 'gnus-summary-article-delete-hook #'gnus-registry-action)
|
||||
(add-hook 'gnus-summary-article-expire-hook #'gnus-registry-action)
|
||||
|
|
@ -1212,10 +1214,9 @@ non-nil."
|
|||
(remove-hook 'gnus-save-newsrc-hook #'gnus-registry-save)
|
||||
(remove-hook 'gnus-read-newsrc-el-hook #'gnus-registry-load)
|
||||
|
||||
(remove-hook 'gnus-summary-prepare-hook #'gnus-registry-register-message-ids)
|
||||
(setq gnus-registry-enabled nil))
|
||||
(remove-hook 'gnus-summary-prepare-hook #'gnus-registry-register-message-ids))
|
||||
|
||||
(add-hook 'gnus-registry-unload-hook #'gnus-registry-unload-hook)
|
||||
(add-hook 'gnus-registry-unload-hook #'gnus-registry-clear)
|
||||
|
||||
(defun gnus-registry-install-p ()
|
||||
"Return non-nil if the registry is enabled (and maybe enable it first).
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ during splitting, which may be slow."
|
|||
(nnimap-header-parameters))
|
||||
t)
|
||||
(unless (process-live-p (get-buffer-process (current-buffer)))
|
||||
(error "Server closed connection"))
|
||||
(error "IMAP server %S closed connection" nnimap-address))
|
||||
(nnimap-transform-headers)
|
||||
(nnheader-remove-cr-followed-by-lf))
|
||||
(insert-buffer-substring
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ backend doesn't catch this error.")
|
|||
(nntp-record-command string))
|
||||
(process-send-string process (concat string nntp-end-of-line))
|
||||
(or (memq (process-status process) '(open run))
|
||||
(nntp-report "Server closed connection")))
|
||||
(nntp-report "NNTP server %S closed connection" nntp-address)))
|
||||
|
||||
(defun nntp-record-command (string)
|
||||
"Record the command STRING."
|
||||
|
|
@ -369,7 +369,7 @@ retried once before actually displaying the error report."
|
|||
(nntp-snarf-error-message)
|
||||
nil))
|
||||
((not (memq (process-status process) '(open run)))
|
||||
(nntp-report "Server closed connection"))
|
||||
(nntp-report "NNTP server %S closed connection" nntp-address))
|
||||
(t
|
||||
(goto-char (point-max))
|
||||
(let ((limit (point-min))
|
||||
|
|
@ -1431,7 +1431,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the
|
|||
;; be the process's former output buffer (i.e. now killed)
|
||||
(or (and process
|
||||
(memq (process-status process) '(open run)))
|
||||
(nntp-report "Server closed connection")))))
|
||||
(nntp-report "NNTP server %S closed connection" nntp-address)))))
|
||||
|
||||
(defun nntp-accept-response ()
|
||||
"Wait for output from the process that outputs to BUFFER."
|
||||
|
|
@ -1450,7 +1450,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the
|
|||
(when group
|
||||
(let ((entry (nntp-find-connection-entry nntp-server-buffer)))
|
||||
(cond ((not entry)
|
||||
(nntp-report "Server closed connection"))
|
||||
(nntp-report "NNTP server %S closed connection" nntp-address))
|
||||
((not (equal group (caddr entry)))
|
||||
(with-current-buffer (process-buffer (car entry))
|
||||
(erase-buffer)
|
||||
|
|
|
|||
|
|
@ -829,11 +829,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
|
|||
(symbol-name function)))))))
|
||||
(real-def (cond
|
||||
((and aliased (not (subrp def)))
|
||||
(let ((f real-function))
|
||||
(while (and (fboundp f)
|
||||
(symbolp (symbol-function f)))
|
||||
(setq f (symbol-function f)))
|
||||
f))
|
||||
(car (function-alias-p real-function t)))
|
||||
((subrp def) (intern (subr-name def)))
|
||||
(t def))))
|
||||
|
||||
|
|
|
|||
|
|
@ -854,6 +854,26 @@ SPACES-REGEXP is a regexp to substitute spaces in font-lock search."
|
|||
;; continue standard unloading
|
||||
nil)
|
||||
|
||||
;;; Mouse support
|
||||
(defun hi-lock-symbol-at-mouse (event)
|
||||
"Highlight symbol at mouse click EVENT."
|
||||
(interactive "e")
|
||||
(save-excursion
|
||||
(mouse-set-point event)
|
||||
(highlight-symbol-at-point)))
|
||||
|
||||
;;;###autoload
|
||||
(defun hi-lock-context-menu (menu click)
|
||||
"Populate MENU with a menu item to highlight symbol at CLICK."
|
||||
(save-excursion
|
||||
(mouse-set-point click)
|
||||
(when (symbol-at-point)
|
||||
(define-key-after menu [highlight-search-separator] menu-bar-separator)
|
||||
(define-key-after menu [highlight-search-mouse]
|
||||
'(menu-item "Highlight Symbol" highlight-symbol-at-mouse
|
||||
:help "Highlight symbol at point"))))
|
||||
menu)
|
||||
|
||||
(provide 'hi-lock)
|
||||
|
||||
;;; hi-lock.el ends here
|
||||
|
|
|
|||
|
|
@ -609,9 +609,7 @@ See also `image-dired-thumbnail-storage'."
|
|||
((eq 'use-image-dired-dir image-dired-thumbnail-storage)
|
||||
(let* ((f (expand-file-name file))
|
||||
(hash
|
||||
;; SHA1 is slightly faster than MD5, so let's use it.
|
||||
;; (We don't need anything crytographically strong.)
|
||||
(sha1 (file-name-as-directory (file-name-directory f)))))
|
||||
(md5 (file-name-as-directory (file-name-directory f)))))
|
||||
(format "%s%s%s.thumb.%s"
|
||||
(file-name-as-directory (expand-file-name (image-dired-dir)))
|
||||
(file-name-base f)
|
||||
|
|
|
|||
|
|
@ -668,6 +668,7 @@ This is like `describe-bindings', but displays only Isearch keys."
|
|||
;; The key translations defined in the C-x 8 prefix should add
|
||||
;; characters to the search string. See iso-transl.el.
|
||||
(define-key map "\C-x8\r" 'isearch-char-by-name)
|
||||
(define-key map "\C-x8e\r" 'isearch-emoji-by-name)
|
||||
map)
|
||||
"Keymap for `isearch-mode'.")
|
||||
|
||||
|
|
@ -758,6 +759,8 @@ This is like `describe-bindings', but displays only Isearch keys."
|
|||
:help "Search for literal char"]
|
||||
["Search for char by name" isearch-char-by-name
|
||||
:help "Search for character by name"]
|
||||
["Search for Emoji by name" isearch-emoji-by-name
|
||||
:help "Search for Emoji by its Unicode name"]
|
||||
"---"
|
||||
["Toggle input method" isearch-toggle-input-method
|
||||
:help "Toggle input method for search"]
|
||||
|
|
@ -2747,6 +2750,24 @@ With argument, add COUNT copies of the character."
|
|||
(mapconcat 'isearch-text-char-description
|
||||
string ""))))))))
|
||||
|
||||
(defun isearch-emoji-by-name (&optional count)
|
||||
"Read an Emoji name and add it to the search string COUNT times.
|
||||
COUNT (interactively, the prefix argument) defaults to 1.
|
||||
The command accepts Unicode names like \"smiling face\" or
|
||||
\"heart with arrow\", and completion is available."
|
||||
(interactive "p")
|
||||
(with-isearch-suspended
|
||||
(let ((emoji (with-temp-buffer
|
||||
(emoji-search)
|
||||
(if (and (integerp count) (> count 1))
|
||||
(apply 'concat (make-list count (buffer-string)))
|
||||
(buffer-string)))))
|
||||
(when emoji
|
||||
(setq isearch-new-string (concat isearch-string emoji)
|
||||
isearch-new-message (concat isearch-message
|
||||
(mapconcat 'isearch-text-char-description
|
||||
emoji "")))))))
|
||||
|
||||
(defun isearch-search-and-update ()
|
||||
"Do the search and update the display."
|
||||
(when (or isearch-success
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: João Távora <joaotavora@gmail.com>
|
||||
;; Keywords: processes, languages, extensions
|
||||
;; Version: 1.0.14
|
||||
;; Version: 1.0.15
|
||||
;; Package-Requires: ((emacs "25.2"))
|
||||
|
||||
;; This is a GNU ELPA :core package. Avoid functionality that is not
|
||||
|
|
@ -698,7 +698,9 @@ TIMEOUT is nil)."
|
|||
(defun jsonrpc--debug (server format &rest args)
|
||||
"Debug message for SERVER with FORMAT and ARGS."
|
||||
(jsonrpc--log-event
|
||||
server (if (stringp format)`(:message ,(format format args)) format)))
|
||||
server (if (stringp format)
|
||||
`(:message ,(apply #'format format args))
|
||||
format)))
|
||||
|
||||
(defun jsonrpc--warn (format &rest args)
|
||||
"Warning message with FORMAT and ARGS."
|
||||
|
|
|
|||
|
|
@ -8861,8 +8861,12 @@ Define a constant M whose value is the result of `easy-mmode-define-keymap'.
|
|||
The M, BS, and ARGS arguments are as per that function. DOC is
|
||||
the constant's documentation.
|
||||
|
||||
This macro is deprecated; use `defvar-keymap' instead.
|
||||
|
||||
\(fn M BS DOC &rest ARGS)" nil t)
|
||||
|
||||
(function-put 'easy-mmode-defmap 'doc-string-elt '3)
|
||||
|
||||
(function-put 'easy-mmode-defmap 'lisp-indent-function '1)
|
||||
|
||||
(autoload 'easy-mmode-defsyntax "easy-mmode" "\
|
||||
|
|
@ -8871,6 +8875,8 @@ CSS contains a list of syntax specifications of the form (CHAR . SYNTAX).
|
|||
|
||||
\(fn ST CSS DOC &rest ARGS)" nil t)
|
||||
|
||||
(function-put 'easy-mmode-defsyntax 'doc-string-elt '3)
|
||||
|
||||
(function-put 'easy-mmode-defsyntax 'lisp-indent-function '1)
|
||||
|
||||
(register-definition-prefixes "easy-mmode" '("easy-mmode-"))
|
||||
|
|
@ -10291,6 +10297,31 @@ disabled.
|
|||
;;;### (autoloads nil "elide-head" "elide-head.el" (0 0 0 0))
|
||||
;;; Generated autoloads from elide-head.el
|
||||
|
||||
(autoload 'elide-head-mode "elide-head" "\
|
||||
Toggle eliding (hiding) header material in the current buffer.
|
||||
|
||||
This is a minor mode. If called interactively, toggle the `Elide-Head
|
||||
mode' mode. If the prefix argument is positive, enable the mode, and
|
||||
if it is zero or negative, disable the mode.
|
||||
|
||||
If called from Lisp, toggle the mode if ARG is `toggle'. Enable the
|
||||
mode if ARG is nil, omitted, or is a positive number. Disable the
|
||||
mode if ARG is a negative number.
|
||||
|
||||
To check whether the minor mode is enabled in the current buffer,
|
||||
evaluate `elide-head-mode'.
|
||||
|
||||
The mode's hook is called both when the mode is enabled and when it is
|
||||
disabled.
|
||||
|
||||
When Elide Header mode is enabled, headers are hidden according
|
||||
to `elide-head-headers-to-hide'.
|
||||
|
||||
This is suitable as an entry on `find-file-hook' or appropriate
|
||||
mode hooks.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(autoload 'elide-head "elide-head" "\
|
||||
Hide header material in buffer according to `elide-head-headers-to-hide'.
|
||||
|
||||
|
|
@ -10301,6 +10332,8 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks.
|
|||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(make-obsolete 'elide-head 'elide-head-mode '"29.1")
|
||||
|
||||
(register-definition-prefixes "elide-head" '("elide-head-"))
|
||||
|
||||
;;;***
|
||||
|
|
@ -16764,6 +16797,11 @@ be found in variable `hi-lock-interactive-patterns'." t nil)
|
|||
(autoload 'hi-lock-find-patterns "hi-lock" "\
|
||||
Add patterns from the current buffer to the list of hi-lock patterns." t nil)
|
||||
|
||||
(autoload 'hi-lock-context-menu "hi-lock" "\
|
||||
Populate MENU with a menu item to highlight symbol at CLICK.
|
||||
|
||||
\(fn MENU CLICK)" nil nil)
|
||||
|
||||
(register-definition-prefixes "hi-lock" '("hi-lock-" "turn-on-hi-lock-if-enabled"))
|
||||
|
||||
;;;***
|
||||
|
|
@ -19155,25 +19193,37 @@ system." t nil)
|
|||
(put 'info-lookup-symbol 'info-file "emacs")
|
||||
|
||||
(autoload 'info-lookup-symbol "info-look" "\
|
||||
Display the definition of SYMBOL, as found in the relevant manual.
|
||||
When this command is called interactively, it reads SYMBOL from the
|
||||
minibuffer. In the minibuffer, use \\<minibuffer-local-completion-map>\\[next-history-element] to yank the default argument
|
||||
value into the minibuffer so you can edit it. The default symbol is the
|
||||
one found at point.
|
||||
Look up and display documentation of SYMBOL in the relevant Info manual.
|
||||
SYMBOL should be an identifier: a function or method, a macro, a variable,
|
||||
a data type, a class, etc.
|
||||
|
||||
With prefix arg MODE a query for the symbol help mode is offered.
|
||||
Interactively, prompt for SYMBOL; you can use \\<minibuffer-local-completion-map>\\[next-history-element] in the minibuffer
|
||||
to yank the default argument value into the minibuffer so you can edit it.
|
||||
The default symbol is the one found at point.
|
||||
|
||||
MODE is the major mode whose Info manuals to search for the documentation
|
||||
of SYMBOL. It defaults to the current buffer's `major-mode'; if that
|
||||
mode doesn't have any Info manuals known to Emacs, the command will
|
||||
prompt for MODE to use, with completion. With prefix arg, the command
|
||||
always prompts for MODE.
|
||||
|
||||
\(fn SYMBOL &optional MODE)" t nil)
|
||||
(put 'info-lookup-file 'info-file "emacs")
|
||||
|
||||
(autoload 'info-lookup-file "info-look" "\
|
||||
Display the documentation of a file.
|
||||
When this command is called interactively, it reads FILE from the minibuffer.
|
||||
In the minibuffer, use \\<minibuffer-local-completion-map>\\[next-history-element] to yank the default file name
|
||||
into the minibuffer so you can edit it.
|
||||
Look up and display documentation of FILE in the relevant Info manual.
|
||||
FILE should be the name of a file; a notable example is a standard header
|
||||
file that is part of the C or C++ standard library.
|
||||
|
||||
Interactively, prompt for FILE; you can use \\<minibuffer-local-completion-map>\\[next-history-element] in the minibuffer
|
||||
to yank the default argument value into the minibuffer so you can edit it.
|
||||
The default file name is the one found at point.
|
||||
|
||||
With prefix arg MODE a query for the file help mode is offered.
|
||||
MODE is the major mode whose Info manuals to search for the documentation
|
||||
of FILE. It defaults to the current buffer's `major-mode'; if that
|
||||
mode doesn't have any Info manuals known to Emacs, the command will
|
||||
prompt for MODE to use, with completion. With prefix arg, the command
|
||||
always prompts for MODE.
|
||||
|
||||
\(fn FILE &optional MODE)" t nil)
|
||||
|
||||
|
|
@ -19859,7 +19909,7 @@ one of the aforementioned options instead of using this mode.
|
|||
|
||||
;;;### (autoloads nil "jsonrpc" "jsonrpc.el" (0 0 0 0))
|
||||
;;; Generated autoloads from jsonrpc.el
|
||||
(push (purecopy '(jsonrpc 1 0 14)) package--builtin-versions)
|
||||
(push (purecopy '(jsonrpc 1 0 15)) package--builtin-versions)
|
||||
|
||||
(register-definition-prefixes "jsonrpc" '("jsonrpc-"))
|
||||
|
||||
|
|
@ -21311,6 +21361,11 @@ Default bookmark handler for Man buffers.
|
|||
|
||||
\(fn BOOKMARK)" nil nil)
|
||||
|
||||
(autoload 'Man-context-menu "man" "\
|
||||
Populate MENU with commands that open a man page at point.
|
||||
|
||||
\(fn MENU CLICK)" nil nil)
|
||||
|
||||
(register-definition-prefixes "man" '("Man-" "man"))
|
||||
|
||||
;;;***
|
||||
|
|
@ -31067,6 +31122,8 @@ If FUNCTION is non-nil, place point on the entry for FUNCTION (if any).
|
|||
|
||||
\(fn GROUP &optional FUNCTION)" t nil)
|
||||
|
||||
(defalias 'shortdoc #'shortdoc-display-group)
|
||||
|
||||
(register-definition-prefixes "shortdoc" '("alist" "buffer" "define-short-documentation-group" "file" "hash-table" "keymaps" "list" "number" "overlay" "process" "regexp" "sequence" "shortdoc-" "string" "text-properties" "vector"))
|
||||
|
||||
;;;***
|
||||
|
|
@ -39394,6 +39451,32 @@ unless `windmove-create-window' is non-nil and a new window is created.
|
|||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(defvar windmove-mode t "\
|
||||
Non-nil if Windmove mode is enabled.
|
||||
See the `windmove-mode' command
|
||||
for a description of this minor mode.")
|
||||
|
||||
(custom-autoload 'windmove-mode "windmove" nil)
|
||||
|
||||
(autoload 'windmove-mode "windmove" "\
|
||||
Global minor mode for default windmove commands.
|
||||
|
||||
This is a minor mode. If called interactively, toggle the `Windmove
|
||||
mode' mode. If the prefix argument is positive, enable the mode, and
|
||||
if it is zero or negative, disable the mode.
|
||||
|
||||
If called from Lisp, toggle the mode if ARG is `toggle'. Enable the
|
||||
mode if ARG is nil, omitted, or is a positive number. Disable the
|
||||
mode if ARG is a negative number.
|
||||
|
||||
To check whether the minor mode is enabled in the current buffer,
|
||||
evaluate `(default-value \\='windmove-mode)'.
|
||||
|
||||
The mode's hook is called both when the mode is enabled and when it is
|
||||
disabled.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(autoload 'windmove-default-keybindings "windmove" "\
|
||||
Set up keybindings for `windmove'.
|
||||
Keybindings are of the form MODIFIERS-{left,right,up,down},
|
||||
|
|
@ -39969,24 +40052,23 @@ Zone out, completely." t nil)
|
|||
|
||||
;;;### (autoloads nil nil ("abbrev.el" "bindings.el" "buff-menu.el"
|
||||
;;;;;; "button.el" "calc/calc-aent.el" "calc/calc-embed.el" "calc/calc-misc.el"
|
||||
;;;;;; "calc/calc-yank.el" "case-table.el" "cedet/ede/base.el" "cedet/ede/config.el"
|
||||
;;;;;; "cedet/ede/cpp-root.el" "cedet/ede/custom.el" "cedet/ede/dired.el"
|
||||
;;;;;; "cedet/ede/emacs.el" "cedet/ede/files.el" "cedet/ede/generic.el"
|
||||
;;;;;; "cedet/ede/linux.el" "cedet/ede/locate.el" "cedet/ede/make.el"
|
||||
;;;;;; "cedet/ede/shell.el" "cedet/ede/speedbar.el" "cedet/ede/system.el"
|
||||
;;;;;; "cedet/ede/util.el" "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el"
|
||||
;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el"
|
||||
;;;;;; "cedet/semantic/bovine/c-by.el" "cedet/semantic/bovine/c.el"
|
||||
;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el"
|
||||
;;;;;; "cedet/semantic/bovine/make-by.el" "cedet/semantic/bovine/make.el"
|
||||
;;;;;; "cedet/semantic/bovine/scm-by.el" "cedet/semantic/bovine/scm.el"
|
||||
;;;;;; "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" "cedet/semantic/db-file.el"
|
||||
;;;;;; "cedet/semantic/db-find.el" "cedet/semantic/db-global.el"
|
||||
;;;;;; "cedet/semantic/db-mode.el" "cedet/semantic/db-typecache.el"
|
||||
;;;;;; "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate/include.el"
|
||||
;;;;;; "cedet/semantic/decorate/mode.el" "cedet/semantic/dep.el"
|
||||
;;;;;; "cedet/semantic/doc.el" "cedet/semantic/edit.el" "cedet/semantic/find.el"
|
||||
;;;;;; "cedet/semantic/format.el" "cedet/semantic/grammar-wy.el"
|
||||
;;;;;; "calc/calc-yank.el" "case-table.el" "cedet/ede/cpp-root.el"
|
||||
;;;;;; "cedet/ede/custom.el" "cedet/ede/dired.el" "cedet/ede/emacs.el"
|
||||
;;;;;; "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el"
|
||||
;;;;;; "cedet/ede/locate.el" "cedet/ede/make.el" "cedet/ede/speedbar.el"
|
||||
;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/semantic/analyze.el"
|
||||
;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/refs.el"
|
||||
;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c-by.el"
|
||||
;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/el.el"
|
||||
;;;;;; "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make-by.el"
|
||||
;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm-by.el"
|
||||
;;;;;; "cedet/semantic/bovine/scm.el" "cedet/semantic/complete.el"
|
||||
;;;;;; "cedet/semantic/ctxt.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el"
|
||||
;;;;;; "cedet/semantic/db-global.el" "cedet/semantic/db-mode.el"
|
||||
;;;;;; "cedet/semantic/db-typecache.el" "cedet/semantic/db.el" "cedet/semantic/debug.el"
|
||||
;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el"
|
||||
;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/edit.el"
|
||||
;;;;;; "cedet/semantic/find.el" "cedet/semantic/format.el" "cedet/semantic/grammar-wy.el"
|
||||
;;;;;; "cedet/semantic/grm-wy-boot.el" "cedet/semantic/html.el"
|
||||
;;;;;; "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el" "cedet/semantic/idle.el"
|
||||
;;;;;; "cedet/semantic/imenu.el" "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el"
|
||||
|
|
@ -40005,8 +40087,8 @@ Zone out, completely." t nil)
|
|||
;;;;;; "cedet/srecode/insert.el" "cedet/srecode/java.el" "cedet/srecode/map.el"
|
||||
;;;;;; "cedet/srecode/mode.el" "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el"
|
||||
;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "composite.el"
|
||||
;;;;;; "cus-face.el" "cus-start.el" "custom.el" "dired-aux.el" "dired-x.el"
|
||||
;;;;;; "electric.el" "emacs-lisp/backquote.el" "emacs-lisp/byte-run.el"
|
||||
;;;;;; "cus-face.el" "cus-load.el" "cus-start.el" "custom.el" "dired-aux.el"
|
||||
;;;;;; "dired-x.el" "electric.el" "emacs-lisp/backquote.el" "emacs-lisp/byte-run.el"
|
||||
;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-preloaded.el"
|
||||
;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/easymenu.el" "emacs-lisp/eieio-custom.el"
|
||||
;;;;;; "emacs-lisp/eieio-opt.el" "emacs-lisp/float-sup.el" "emacs-lisp/lisp-mode.el"
|
||||
|
|
@ -40028,30 +40110,41 @@ Zone out, completely." t nil)
|
|||
;;;;;; "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el"
|
||||
;;;;;; "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el"
|
||||
;;;;;; "eshell/em-tramp.el" "eshell/em-unix.el" "eshell/em-xtra.el"
|
||||
;;;;;; "faces.el" "files.el" "font-core.el" "font-lock.el" "format.el"
|
||||
;;;;;; "frame.el" "help.el" "hfy-cmap.el" "ibuf-ext.el" "indent.el"
|
||||
;;;;;; "international/characters.el" "international/charscript.el"
|
||||
;;;;;; "international/cp51932.el" "international/emoji-zwj.el" "international/eucjp-ms.el"
|
||||
;;;;;; "eshell/esh-groups.el" "faces.el" "files.el" "finder-inf.el"
|
||||
;;;;;; "font-core.el" "font-lock.el" "format.el" "frame.el" "help.el"
|
||||
;;;;;; "hfy-cmap.el" "ibuf-ext.el" "indent.el" "international/characters.el"
|
||||
;;;;;; "international/charprop.el" "international/charscript.el"
|
||||
;;;;;; "international/cp51932.el" "international/emoji-labels.el"
|
||||
;;;;;; "international/emoji-zwj.el" "international/eucjp-ms.el"
|
||||
;;;;;; "international/iso-transl.el" "international/mule-cmds.el"
|
||||
;;;;;; "international/mule-conf.el" "international/mule.el" "isearch.el"
|
||||
;;;;;; "jit-lock.el" "jka-cmpr-hook.el" "keymap.el" "language/burmese.el"
|
||||
;;;;;; "language/cham.el" "language/chinese.el" "language/cyrillic.el"
|
||||
;;;;;; "language/czech.el" "language/english.el" "language/ethiopic.el"
|
||||
;;;;;; "language/european.el" "language/georgian.el" "language/greek.el"
|
||||
;;;;;; "language/hebrew.el" "language/indian.el" "language/japanese.el"
|
||||
;;;;;; "language/khmer.el" "language/korean.el" "language/lao.el"
|
||||
;;;;;; "language/misc-lang.el" "language/romanian.el" "language/sinhala.el"
|
||||
;;;;;; "language/slovak.el" "language/tai-viet.el" "language/thai.el"
|
||||
;;;;;; "language/tibetan.el" "language/utf-8-lang.el" "language/vietnamese.el"
|
||||
;;;;;; "ldefs-boot.el" "leim/ja-dic/ja-dic.el" "leim/leim-list.el"
|
||||
;;;;;; "leim/quail/4Corner.el" "leim/quail/ARRAY30.el" "leim/quail/CCDOSPY.el"
|
||||
;;;;;; "leim/quail/CTLau-b5.el" "leim/quail/CTLau.el" "leim/quail/ECDICT.el"
|
||||
;;;;;; "leim/quail/ETZY.el" "leim/quail/PY-b5.el" "leim/quail/PY.el"
|
||||
;;;;;; "leim/quail/Punct-b5.el" "leim/quail/Punct.el" "leim/quail/QJ-b5.el"
|
||||
;;;;;; "leim/quail/QJ.el" "leim/quail/SW.el" "leim/quail/TONEPY.el"
|
||||
;;;;;; "leim/quail/ZIRANMA.el" "leim/quail/ZOZY.el" "leim/quail/arabic.el"
|
||||
;;;;;; "leim/quail/cham.el" "leim/quail/compose.el" "leim/quail/croatian.el"
|
||||
;;;;;; "leim/quail/cyril-jis.el" "leim/quail/cyrillic.el" "leim/quail/czech.el"
|
||||
;;;;;; "international/mule-conf.el" "international/mule.el" "international/uni-bidi.el"
|
||||
;;;;;; "international/uni-brackets.el" "international/uni-category.el"
|
||||
;;;;;; "international/uni-combining.el" "international/uni-comment.el"
|
||||
;;;;;; "international/uni-decimal.el" "international/uni-decomposition.el"
|
||||
;;;;;; "international/uni-digit.el" "international/uni-lowercase.el"
|
||||
;;;;;; "international/uni-mirrored.el" "international/uni-name.el"
|
||||
;;;;;; "international/uni-numeric.el" "international/uni-old-name.el"
|
||||
;;;;;; "international/uni-special-lowercase.el" "international/uni-special-titlecase.el"
|
||||
;;;;;; "international/uni-special-uppercase.el" "international/uni-titlecase.el"
|
||||
;;;;;; "international/uni-uppercase.el" "isearch.el" "jit-lock.el"
|
||||
;;;;;; "jka-cmpr-hook.el" "keymap.el" "language/burmese.el" "language/cham.el"
|
||||
;;;;;; "language/chinese.el" "language/cyrillic.el" "language/czech.el"
|
||||
;;;;;; "language/english.el" "language/ethiopic.el" "language/european.el"
|
||||
;;;;;; "language/georgian.el" "language/greek.el" "language/hebrew.el"
|
||||
;;;;;; "language/indian.el" "language/japanese.el" "language/khmer.el"
|
||||
;;;;;; "language/korean.el" "language/lao.el" "language/misc-lang.el"
|
||||
;;;;;; "language/romanian.el" "language/sinhala.el" "language/slovak.el"
|
||||
;;;;;; "language/tai-viet.el" "language/thai.el" "language/tibetan.el"
|
||||
;;;;;; "language/utf-8-lang.el" "language/vietnamese.el" "ldefs-boot.el"
|
||||
;;;;;; "leim/ja-dic/ja-dic.el" "leim/leim-list.el" "leim/quail/4Corner.el"
|
||||
;;;;;; "leim/quail/ARRAY30.el" "leim/quail/CCDOSPY.el" "leim/quail/CTLau-b5.el"
|
||||
;;;;;; "leim/quail/CTLau.el" "leim/quail/ECDICT.el" "leim/quail/ETZY.el"
|
||||
;;;;;; "leim/quail/PY-b5.el" "leim/quail/PY.el" "leim/quail/Punct-b5.el"
|
||||
;;;;;; "leim/quail/Punct.el" "leim/quail/QJ-b5.el" "leim/quail/QJ.el"
|
||||
;;;;;; "leim/quail/SW.el" "leim/quail/TONEPY.el" "leim/quail/ZIRANMA.el"
|
||||
;;;;;; "leim/quail/ZOZY.el" "leim/quail/arabic.el" "leim/quail/cham.el"
|
||||
;;;;;; "leim/quail/compose.el" "leim/quail/croatian.el" "leim/quail/cyril-jis.el"
|
||||
;;;;;; "leim/quail/cyrillic.el" "leim/quail/czech.el" "leim/quail/emoji.el"
|
||||
;;;;;; "leim/quail/georgian.el" "leim/quail/greek.el" "leim/quail/hanja-jis.el"
|
||||
;;;;;; "leim/quail/hanja.el" "leim/quail/hanja3.el" "leim/quail/hebrew.el"
|
||||
;;;;;; "leim/quail/ipa-praat.el" "leim/quail/latin-alt.el" "leim/quail/latin-ltx.el"
|
||||
|
|
|
|||
2003
lisp/leim/quail/emoji.el
Normal file
2003
lisp/leim/quail/emoji.el
Normal file
File diff suppressed because it is too large
Load diff
24
lisp/man.el
24
lisp/man.el
|
|
@ -1976,6 +1976,30 @@ Uses `Man-name-local-regexp'."
|
|||
(bookmark-default-handler
|
||||
`("" (buffer . ,buf) . ,(bookmark-get-bookmark-record bookmark)))))
|
||||
|
||||
;;; Mouse support
|
||||
(defun Man-at-mouse (e)
|
||||
"Open man manual at point."
|
||||
(interactive "e")
|
||||
(save-excursion
|
||||
(mouse-set-point e)
|
||||
(man (Man-default-man-entry))))
|
||||
|
||||
;;;###autoload
|
||||
(defun Man-context-menu (menu click)
|
||||
"Populate MENU with commands that open a man page at point."
|
||||
(save-excursion
|
||||
(mouse-set-point click)
|
||||
(when (save-excursion
|
||||
(skip-syntax-backward "^ ")
|
||||
(and (looking-at
|
||||
"[[:space:]]*\\([[:alnum:]_-]+([[:alnum:]]+)\\)")
|
||||
(match-string 1)))
|
||||
(define-key-after menu [man-separator] menu-bar-separator)
|
||||
(define-key-after menu [man-at-mouse]
|
||||
'(menu-item "Open man page" man-at-mouse
|
||||
:help "Open man page around mouse click"))))
|
||||
menu)
|
||||
|
||||
|
||||
;; Init the man package variables, if not already done.
|
||||
(Man-init-defvars)
|
||||
|
|
|
|||
|
|
@ -109,6 +109,16 @@
|
|||
(bindings--define-key menu [separator-tab]
|
||||
menu-bar-separator))
|
||||
|
||||
(bindings--define-key menu [enable-undelete-frame-mode]
|
||||
'(menu-item "Enable Undeleting Frames" undelete-frame-mode
|
||||
:visible (null undelete-frame-mode)
|
||||
:help "Enable undeleting frames in this session"))
|
||||
(bindings--define-key menu [undelete-last-deleted-frame]
|
||||
'(menu-item "Undelete Frame" undelete-frame
|
||||
:visible (and undelete-frame-mode
|
||||
(car undelete-frame--deleted-frames))
|
||||
:help "Undelete the most recently deleted frame"))
|
||||
|
||||
;; Don't use delete-frame as event name because that is a special
|
||||
;; event.
|
||||
(bindings--define-key menu [delete-this-frame]
|
||||
|
|
|
|||
|
|
@ -298,6 +298,9 @@ and should return the same menu with changes such as added new menu items."
|
|||
(function-item context-menu-buffers)
|
||||
(function-item context-menu-vc)
|
||||
(function-item context-menu-ffap)
|
||||
(function-item Man-context-menu)
|
||||
(function-item hi-lock-context-menu)
|
||||
(function-item context-menu-online-search)
|
||||
(function :tag "Custom function")))
|
||||
:version "28.1")
|
||||
|
||||
|
|
@ -531,6 +534,16 @@ Some context functions add menu items below the separator."
|
|||
:help "Find file or URL from text around mouse click"))))
|
||||
menu)
|
||||
|
||||
(defun context-menu-online-search (menu click)
|
||||
"Populate MENU with command to search online."
|
||||
(save-excursion
|
||||
(mouse-set-point click)
|
||||
(define-key-after menu [online-search-separator] menu-bar-separator)
|
||||
(define-key-after menu [online-search-at-mouse]
|
||||
'(menu-item "Online search" mouse-online-search-at-point
|
||||
:help "Search for region or word online")))
|
||||
menu)
|
||||
|
||||
(defvar context-menu-entry
|
||||
`(menu-item ,(purecopy "Context Menu") ,(make-sparse-keymap)
|
||||
:filter ,(lambda (_) (context-menu-map)))
|
||||
|
|
@ -3217,6 +3230,26 @@ is copied instead of being cut."
|
|||
(with-current-buffer (window-buffer window)
|
||||
(setq cursor-type (nth 3 state)))))))
|
||||
|
||||
(defvar eww-search-prefix)
|
||||
(defun mouse-online-search-at-point (event)
|
||||
"Query an online search engine at EVENT.
|
||||
If a region is active, the entire region will be sent, otherwise
|
||||
the symbol at point will be used. This command uses EWW's
|
||||
default search engine, as configured by `eww-search-prefix'."
|
||||
(interactive "e")
|
||||
(require 'eww)
|
||||
(let ((query (if (use-region-p)
|
||||
(buffer-substring (region-beginning)
|
||||
(region-end))
|
||||
(save-excursion
|
||||
(mouse-set-point event)
|
||||
(thing-at-point 'symbol)))))
|
||||
(unless query
|
||||
(user-error "Nothing to search for"))
|
||||
(browse-url (concat
|
||||
eww-search-prefix
|
||||
(mapconcat #'url-hexify-string (split-string query) "+")))))
|
||||
|
||||
|
||||
;;; Bindings for mouse commands.
|
||||
|
||||
|
|
|
|||
|
|
@ -439,9 +439,10 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus
|
|||
("/usr/local/etc/mailcap" system)))))
|
||||
(when (stringp path)
|
||||
(setq path (mapcar #'list (split-string path path-separator t))))
|
||||
(when (seq-some (lambda (f)
|
||||
(when (or (null mailcap--computed-mime-data)
|
||||
(seq-some (lambda (f)
|
||||
(file-has-changed-p (car f) 'mail-parse-mailcaps))
|
||||
path)
|
||||
path))
|
||||
;; Clear out all old data.
|
||||
(setq mailcap--computed-mime-data nil)
|
||||
;; Add the Emacs-distributed defaults (which will be used as
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
;; first time you access a crypted remote directory. It is kept in
|
||||
;; your user directory "~/.emacs.d/" with the url-encoded directory
|
||||
;; name as part of the basename, and ".encfs6.xml" as suffix. Do not
|
||||
;; loose this file and the corresponding password; otherwise there is
|
||||
;; lose this file and the corresponding password; otherwise there is
|
||||
;; no way to decrypt your crypted files.
|
||||
|
||||
;; If the user option `tramp-crypt-save-encfs-config-remote' is
|
||||
|
|
|
|||
|
|
@ -744,10 +744,10 @@ The option \"--fullname\" must be included in this value."
|
|||
|
||||
output))
|
||||
|
||||
(easy-mmode-defmap gud-minibuffer-local-map
|
||||
'(("\C-i" . comint-dynamic-complete-filename))
|
||||
"Keymap for minibuffer prompting of gud startup command."
|
||||
:inherit minibuffer-local-map)
|
||||
(defvar-keymap gud-minibuffer-local-map
|
||||
:doc "Keymap for minibuffer prompting of gud startup command."
|
||||
:parent minibuffer-local-map
|
||||
"C-i" #'comint-dynamic-complete-filename)
|
||||
|
||||
(defun gud-query-cmdline (minor-mode &optional init)
|
||||
(let* ((hist-sym (gud-symbol 'history nil minor-mode))
|
||||
|
|
|
|||
|
|
@ -3216,9 +3216,11 @@ detecting a prompt at the end of the buffer."
|
|||
(defun python-shell-send-string-no-output (string &optional process)
|
||||
"Send STRING to PROCESS and inhibit output.
|
||||
Return the output."
|
||||
(let ((process (or process (python-shell-get-process-or-error)))
|
||||
(comint-preoutput-filter-functions
|
||||
'(python-shell-output-filter))
|
||||
(or process (setq process (python-shell-get-process-or-error)))
|
||||
(cl-letf (((process-filter process)
|
||||
(lambda (_proc str)
|
||||
(with-current-buffer (process-buffer process)
|
||||
(python-shell-output-filter str))))
|
||||
(python-shell-output-filter-in-progress t)
|
||||
(inhibit-quit t))
|
||||
(or
|
||||
|
|
|
|||
|
|
@ -738,11 +738,20 @@ quit the *xref* buffer."
|
|||
"Perform interactive replacement of FROM with TO in all displayed xrefs.
|
||||
|
||||
This command interactively replaces FROM with TO in the names of the
|
||||
references displayed in the current *xref* buffer."
|
||||
references displayed in the current *xref* buffer.
|
||||
|
||||
When called interactively, it uses '.*' as FROM, which means
|
||||
replace the whole name. Unless called with prefix argument, in
|
||||
which case the user is prompted for both FROM and TO."
|
||||
(interactive
|
||||
(let ((fr (read-regexp "Xref query-replace (regexp)" ".*")))
|
||||
(list fr
|
||||
(read-regexp (format "Xref query-replace (regexp) %s with: " fr)))))
|
||||
(let* ((fr
|
||||
(if current-prefix-arg
|
||||
(read-regexp "Query-replace (regexp)" ".*")
|
||||
".*"))
|
||||
(prompt (if current-prefix-arg
|
||||
(format "Query-replace (regexp) %s with: " fr)
|
||||
"Query-replace all matches with: ")))
|
||||
(list fr (read-regexp prompt))))
|
||||
(let* (item xrefs iter)
|
||||
(save-excursion
|
||||
(while (setq item (xref--search-property 'xref-item))
|
||||
|
|
@ -1469,6 +1478,22 @@ is nil, prompt only if there's no usable symbol at point."
|
|||
(interactive (list (xref--read-identifier "Find references of: ")))
|
||||
(xref--find-xrefs identifier 'references identifier nil))
|
||||
|
||||
(defun xref-find-references-and-replace (from to)
|
||||
"Replace all references to identifier FROM with TO."
|
||||
(interactive
|
||||
(let ((common
|
||||
(query-replace-read-args "Query replace identifier" nil)))
|
||||
(list (nth 0 common) (nth 1 common))))
|
||||
(require 'xref)
|
||||
(with-current-buffer
|
||||
(let ((xref-show-xrefs-function
|
||||
;; Some future-proofing (bug#44905).
|
||||
(custom--standard-value 'xref-show-xrefs-function))
|
||||
;; Disable auto-jumping, it will mess up replacement logic.
|
||||
xref-auto-jump-to-first-xref)
|
||||
(xref-find-references from))
|
||||
(xref-query-replace-in-results ".*" to)))
|
||||
|
||||
;;;###autoload
|
||||
(defun xref-find-definitions-at-mouse (event)
|
||||
"Find the definition of identifier at or around mouse click.
|
||||
|
|
|
|||
24
lisp/subr.el
24
lisp/subr.el
|
|
@ -1971,7 +1971,7 @@ one will be removed."
|
|||
(format "%s hook to remove: "
|
||||
(if local "Buffer-local" "Global"))
|
||||
fn-alist
|
||||
nil t)
|
||||
nil t nil 'set-variable-value-history)
|
||||
fn-alist nil nil #'string=)))
|
||||
(list hook function local)))
|
||||
(or (boundp hook) (set hook nil))
|
||||
|
|
@ -6537,4 +6537,26 @@ string will be displayed only if BODY takes longer than TIMEOUT seconds.
|
|||
(lambda ()
|
||||
,@body)))
|
||||
|
||||
(defun function-alias-p (func &optional noerror)
|
||||
"Return nil if FUNC is not a function alias.
|
||||
If FUNC is a function alias, return the function alias chain.
|
||||
|
||||
If the function alias chain contains loops, an error will be
|
||||
signalled. If NOERROR, the non-loop parts of the chain is returned."
|
||||
(declare (side-effect-free t))
|
||||
(let ((chain nil)
|
||||
(orig-func func))
|
||||
(nreverse
|
||||
(catch 'loop
|
||||
(while (and (symbolp func)
|
||||
(setq func (symbol-function func))
|
||||
(symbolp func))
|
||||
(when (or (memq func chain)
|
||||
(eq func orig-func))
|
||||
(if noerror
|
||||
(throw 'loop chain)
|
||||
(signal 'cyclic-function-indirection (list orig-func))))
|
||||
(push func chain))
|
||||
chain))))
|
||||
|
||||
;;; subr.el ends here
|
||||
|
|
|
|||
|
|
@ -130,9 +130,11 @@ to confuse some users sometimes."
|
|||
(defvar cvs-bakprefix ".#"
|
||||
"The prefix that CVS prepends to files when rcsmerge'ing.")
|
||||
|
||||
(easy-mmode-defmap cvs-status-map
|
||||
'(([(mouse-2)] . cvs-mode-toggle-mark))
|
||||
"Local keymap for text properties of status.")
|
||||
(autoload 'cvs-mode-toggle-mark "pcvs")
|
||||
|
||||
(defvar-keymap cvs-status-map
|
||||
:doc "Local keymap for text properties of status."
|
||||
"<mouse-2>" #'cvs-mode-toggle-mark)
|
||||
|
||||
;; Constructor:
|
||||
|
||||
|
|
|
|||
|
|
@ -1247,7 +1247,7 @@ buffer_local_value (Lisp_Object variable, Lisp_Object buffer)
|
|||
{ /* Look in local_var_alist. */
|
||||
struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym);
|
||||
XSETSYMBOL (variable, sym); /* Update In case of aliasing. */
|
||||
result = Fassoc (variable, BVAR (buf, local_var_alist), Qnil);
|
||||
result = assq_no_quit (variable, BVAR (buf, local_var_alist));
|
||||
if (!NILP (result))
|
||||
{
|
||||
if (blv->fwd.fwdptr)
|
||||
|
|
|
|||
16
src/data.c
16
src/data.c
|
|
@ -2180,7 +2180,7 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */)
|
|||
|
||||
/* Make sure this buffer has its own value of symbol. */
|
||||
XSETSYMBOL (variable, sym); /* Update in case of aliasing. */
|
||||
tem = Fassq (variable, BVAR (current_buffer, local_var_alist));
|
||||
tem = assq_no_quit (variable, BVAR (current_buffer, local_var_alist));
|
||||
if (NILP (tem))
|
||||
{
|
||||
if (let_shadows_buffer_binding_p (sym))
|
||||
|
|
@ -2260,7 +2260,7 @@ From now on the default value will apply in this buffer. Return VARIABLE. */)
|
|||
|
||||
/* Get rid of this buffer's alist element, if any. */
|
||||
XSETSYMBOL (variable, sym); /* Propagate variable indirection. */
|
||||
tem = Fassq (variable, BVAR (current_buffer, local_var_alist));
|
||||
tem = assq_no_quit (variable, BVAR (current_buffer, local_var_alist));
|
||||
if (!NILP (tem))
|
||||
bset_local_var_alist
|
||||
(current_buffer,
|
||||
|
|
@ -2301,7 +2301,7 @@ Also see `buffer-local-boundp'.*/)
|
|||
case SYMBOL_PLAINVAL: return Qnil;
|
||||
case SYMBOL_LOCALIZED:
|
||||
{
|
||||
Lisp_Object tail, elt, tmp;
|
||||
Lisp_Object tmp;
|
||||
struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym);
|
||||
XSETBUFFER (tmp, buf);
|
||||
XSETSYMBOL (variable, sym); /* Update in case of aliasing. */
|
||||
|
|
@ -2309,13 +2309,9 @@ Also see `buffer-local-boundp'.*/)
|
|||
if (EQ (blv->where, tmp)) /* The binding is already loaded. */
|
||||
return blv_found (blv) ? Qt : Qnil;
|
||||
else
|
||||
for (tail = BVAR (buf, local_var_alist); CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
elt = XCAR (tail);
|
||||
if (EQ (variable, XCAR (elt)))
|
||||
return Qt;
|
||||
}
|
||||
return Qnil;
|
||||
return NILP (assq_no_quit (variable, BVAR (buf, local_var_alist)))
|
||||
? Qnil
|
||||
: Qt;
|
||||
}
|
||||
case SYMBOL_FORWARDED:
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2183,7 +2183,9 @@ font_score (Lisp_Object entity, Lisp_Object *spec_prop)
|
|||
|
||||
/* Score three style numeric fields. Maximum difference is 127. */
|
||||
for (i = FONT_WEIGHT_INDEX; i <= FONT_WIDTH_INDEX; i++)
|
||||
if (! NILP (spec_prop[i]) && ! EQ (AREF (entity, i), spec_prop[i]))
|
||||
if (! NILP (spec_prop[i])
|
||||
&& ! EQ (AREF (entity, i), spec_prop[i])
|
||||
&& FIXNUMP (AREF (entity, i)))
|
||||
{
|
||||
EMACS_INT diff = ((XFIXNUM (AREF (entity, i)) >> 8)
|
||||
- (XFIXNUM (spec_prop[i]) >> 8));
|
||||
|
|
@ -2763,6 +2765,10 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size)
|
|||
for (prop = FONT_WEIGHT_INDEX; prop < FONT_SIZE_INDEX; prop++)
|
||||
{
|
||||
if (FIXNUMP (AREF (spec, prop)))
|
||||
{
|
||||
if (!FIXNUMP (AREF (entity, prop)))
|
||||
prop = FONT_SPEC_MAX;
|
||||
else
|
||||
{
|
||||
int required = XFIXNUM (AREF (spec, prop)) >> 8;
|
||||
int candidate = XFIXNUM (AREF (entity, prop)) >> 8;
|
||||
|
|
@ -2786,6 +2792,7 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size)
|
|||
prop = FONT_SPEC_MAX;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (prop < FONT_SPEC_MAX
|
||||
&& size
|
||||
&& XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) > 0)
|
||||
|
|
|
|||
|
|
@ -2382,9 +2382,12 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
|
|||
}
|
||||
|
||||
DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "",
|
||||
doc: /* Delete FRAME, permanently eliminating it from use.
|
||||
doc: /* Delete FRAME, eliminating it from use.
|
||||
FRAME must be a live frame and defaults to the selected one.
|
||||
|
||||
When `undelete-frame-mode' is enabled, the 16 most recently deleted
|
||||
frames can be undeleted with `undelete-frame', which see.
|
||||
|
||||
A frame may not be deleted if its minibuffer serves as surrogate
|
||||
minibuffer for another frame. Normally, you may not delete a frame if
|
||||
all other frames are invisible, but if the second optional argument
|
||||
|
|
|
|||
21
src/ftfont.c
21
src/ftfont.c
|
|
@ -189,6 +189,24 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra)
|
|||
return Qnil;
|
||||
if (FcPatternGetInteger (p, FC_INDEX, 0, &idx) != FcResultMatch)
|
||||
return Qnil;
|
||||
#ifdef FC_VARIABLE
|
||||
/* This is a virtual/meta FcPattern for a variable weight font, from
|
||||
which it is possible to extract an FcRange value specifying the
|
||||
minimum and maximum weights available in this file. We don't
|
||||
need to know that information explicitly, so skip it. We will be
|
||||
called with an FcPattern for each actually available, non-virtual
|
||||
weight.
|
||||
|
||||
Fontconfig started generating virtual/meta patterns for variable
|
||||
weight fonts in the same release that FC_VARIABLE was added, so
|
||||
we conditionalize on that constant. This also ensures that
|
||||
FcPatternGetRange is available. */
|
||||
FcRange *range;
|
||||
if (FcPatternGetRange (p, FC_WEIGHT, 0, &range) == FcResultMatch
|
||||
&& FcPatternGetBool (p, FC_VARIABLE, 0, &b) == FcResultMatch
|
||||
&& b == FcTrue)
|
||||
return Qnil;
|
||||
#endif /* FC_VARIABLE */
|
||||
|
||||
file = (char *) str;
|
||||
key = Fcons (build_unibyte_string (file), make_fixnum (idx));
|
||||
|
|
@ -863,6 +881,9 @@ ftfont_list (struct frame *f, Lisp_Object spec)
|
|||
#if defined HAVE_XFT && defined FC_COLOR
|
||||
FC_COLOR,
|
||||
#endif
|
||||
#ifdef FC_VARIABLE
|
||||
FC_VARIABLE,
|
||||
#endif /* FC_VARIABLE */
|
||||
NULL);
|
||||
if (! objset)
|
||||
goto err;
|
||||
|
|
|
|||
|
|
@ -6255,16 +6255,19 @@ xg_widget_key_press_event_cb (GtkWidget *widget, GdkEvent *event,
|
|||
kbd_buffer_store_buffered_event (&inev, &xg_pending_quit_event);
|
||||
}
|
||||
|
||||
#ifdef USABLE_SIGIO
|
||||
raise (SIGIO);
|
||||
#endif
|
||||
XNoOp (FRAME_X_DISPLAY (f));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
xg_filter_key (struct frame *frame, XEvent *xkey)
|
||||
{
|
||||
GdkEvent *xg_event = gdk_event_new (GDK_KEY_PRESS);
|
||||
GdkEvent *xg_event = gdk_event_new ((xkey->type == ButtonPress
|
||||
#ifdef HAVE_XINPUT2
|
||||
|| (xkey->type == GenericEvent
|
||||
&& xkey->xgeneric.evtype == XI_KeyPress)
|
||||
#endif
|
||||
) ? GDK_KEY_PRESS : GDK_KEY_RELEASE);
|
||||
GdkDisplay *dpy = gtk_widget_get_display (FRAME_GTK_WIDGET (frame));
|
||||
GdkKeymap *keymap = gdk_keymap_get_for_display (dpy);
|
||||
GdkModifierType consumed;
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ BView_DrawBitmapWithEraseOp (void *view, void *bitmap, int x,
|
|||
BRect bounds = bc.Bounds ();
|
||||
for (int y = 0; y < BE_RECT_HEIGHT (bounds); ++y)
|
||||
{
|
||||
for (int x = 0; x <= BE_RECT_WIDTH (bounds); ++x)
|
||||
for (int x = 0; x < BE_RECT_WIDTH (bounds); ++x)
|
||||
{
|
||||
if (bits[y * (stride / 4) + x] == 0xFF000000)
|
||||
bits[y * (stride / 4) + x] = RGB_COLOR_UINT32 (low_color);
|
||||
|
|
|
|||
|
|
@ -136,6 +136,15 @@ gui_abort (const char *msg)
|
|||
emacs_abort ();
|
||||
}
|
||||
|
||||
/* Convert a raw character RAW produced by the keycode KEY into a key
|
||||
symbol and place it in KEYSYM.
|
||||
|
||||
If RAW cannot be converted into a keysym, value is 0. If RAW can
|
||||
be converted into a keysym, but it should be ignored, value is -1.
|
||||
|
||||
Any other value means success, and that the keysym should be used
|
||||
instead of mapping the keycode into a character. */
|
||||
|
||||
static int
|
||||
keysym_from_raw_char (int32 raw, int32 key, unsigned *code)
|
||||
{
|
||||
|
|
@ -186,6 +195,19 @@ keysym_from_raw_char (int32 raw, int32 key, unsigned *code)
|
|||
|
||||
case B_FUNCTION_KEY:
|
||||
*code = XK_F1 + key - 2;
|
||||
|
||||
if (*code - XK_F1 == 12)
|
||||
*code = XK_Print;
|
||||
else if (*code - XK_F1 == 13)
|
||||
/* Okay, Scroll Lock is a bit too much: keyboard.c doesn't
|
||||
know about it yet, and it shouldn't, since that's a
|
||||
modifier key.
|
||||
|
||||
*code = XK_Scroll_Lock; */
|
||||
return -1;
|
||||
else if (*code - XK_F1 == 14)
|
||||
*code = XK_Pause;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -693,6 +715,7 @@ public:
|
|||
rq.window = this;
|
||||
|
||||
int32 raw, key;
|
||||
int ret;
|
||||
msg->FindInt32 ("raw_char", &raw);
|
||||
msg->FindInt32 ("key", &key);
|
||||
|
||||
|
|
@ -711,9 +734,14 @@ public:
|
|||
if (mods & B_OPTION_KEY)
|
||||
rq.modifiers |= HAIKU_MODIFIER_SUPER;
|
||||
|
||||
if (!keysym_from_raw_char (raw, key, &rq.keysym))
|
||||
ret = keysym_from_raw_char (raw, key, &rq.keysym);
|
||||
|
||||
if (!ret)
|
||||
rq.keysym = 0;
|
||||
|
||||
if (ret < 0)
|
||||
return;
|
||||
|
||||
rq.multibyte_char = 0;
|
||||
|
||||
if (!rq.keysym)
|
||||
|
|
|
|||
|
|
@ -2222,6 +2222,7 @@ haiku_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
|
|||
void *view = FRAME_HAIKU_VIEW (XFRAME (WINDOW_FRAME (w)));
|
||||
struct face *face = p->face;
|
||||
|
||||
block_input ();
|
||||
BView_draw_lock (view);
|
||||
BView_StartClip (view);
|
||||
|
||||
|
|
@ -2256,6 +2257,7 @@ haiku_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
|
|||
}
|
||||
BView_EndClip (view);
|
||||
BView_draw_unlock (view);
|
||||
unblock_input ();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -3233,7 +3235,10 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
|
|||
struct frame *f = haiku_window_to_frame (b->window);
|
||||
|
||||
if (!f)
|
||||
{
|
||||
free (b->ref);
|
||||
continue;
|
||||
}
|
||||
|
||||
inev.kind = DRAG_N_DROP_EVENT;
|
||||
inev.arg = build_string_from_utf8 (b->ref);
|
||||
|
|
|
|||
|
|
@ -5861,6 +5861,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
|
|||
|
||||
/* We moved the window start towards ZV, so PT may be now
|
||||
in the scroll margin at the top. */
|
||||
if (IT_CHARPOS (it) < PT)
|
||||
move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
|
||||
if (IT_CHARPOS (it) == PT
|
||||
&& it.current_y >= this_scroll_margin
|
||||
|
|
|
|||
14
src/xdisp.c
14
src/xdisp.c
|
|
@ -18557,6 +18557,20 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp,
|
|||
|| (NILP (g->object)
|
||||
&& (g->charpos == PT
|
||||
|| (g->charpos == 0 && endpos - 1 == PT)));
|
||||
/* Perhaps the point position is inside
|
||||
invisible text? In that case, we trust
|
||||
'set_cursor_from_row' to do its job and
|
||||
find the best position for the cursor. */
|
||||
if (!exact_match_p)
|
||||
{
|
||||
Lisp_Object val =
|
||||
get_char_property_and_overlay (make_fixnum (PT),
|
||||
Qinvisible,
|
||||
Qnil, NULL);
|
||||
|
||||
if (TEXT_PROP_MEANS_INVISIBLE (val) != 0)
|
||||
exact_match_p = true;
|
||||
}
|
||||
}
|
||||
if (at_zv_p || exact_match_p)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3347,6 +3347,8 @@ setup_xi_event_mask (struct frame *f)
|
|||
XISetMask (m, XI_Motion);
|
||||
XISetMask (m, XI_Enter);
|
||||
XISetMask (m, XI_Leave);
|
||||
XISetMask (m, XI_FocusIn);
|
||||
XISetMask (m, XI_FocusOut);
|
||||
XISetMask (m, XI_KeyPress);
|
||||
XISetMask (m, XI_KeyRelease);
|
||||
XISelectEvents (FRAME_X_DISPLAY (f),
|
||||
|
|
@ -3359,6 +3361,8 @@ setup_xi_event_mask (struct frame *f)
|
|||
#ifdef USE_X_TOOLKIT
|
||||
XISetMask (m, XI_KeyPress);
|
||||
XISetMask (m, XI_KeyRelease);
|
||||
XISetMask (m, XI_FocusIn);
|
||||
XISetMask (m, XI_FocusOut);
|
||||
|
||||
XISelectEvents (FRAME_X_DISPLAY (f),
|
||||
FRAME_OUTER_WINDOW (f),
|
||||
|
|
|
|||
139
src/xterm.c
139
src/xterm.c
|
|
@ -20,6 +20,72 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
|||
/* New display code by Gerd Moellmann <gerd@gnu.org>. */
|
||||
/* Xt features made by Fred Pierresteguy. */
|
||||
|
||||
/* X window system support for GNU Emacs
|
||||
|
||||
This file is part of the X window system support for GNU Emacs. It
|
||||
contains subroutines comprising the redisplay interface, setting up
|
||||
scroll bars and widgets, and handling input.
|
||||
|
||||
INPUT
|
||||
|
||||
Emacs handles input by running pselect in a loop, which returns
|
||||
whenever there is input available on the connection to the X
|
||||
server. On some systems, Emacs also arranges for any new input on
|
||||
that connection to send an asynchronous signal. Whenever pselect
|
||||
returns, or such a signal is received and input is not blocked,
|
||||
XTread_socket is called and translates X11 events read by Xlib into
|
||||
struct input_events, which are then stored in the keyboard buffer,
|
||||
to be processed and acted upon at some later time. The function
|
||||
handle_one_xevent is responsible for handling core events after
|
||||
they are filtered, and filtering X Input Extension events. It also
|
||||
performs actions on some special events, such as updating the
|
||||
dimensions of a frame after a ConfigureNotify is sent by the X
|
||||
server to inform us that it changed.
|
||||
|
||||
Before such events are translated, an Emacs build with
|
||||
internationalization enabled (the default since X11R6) will filter
|
||||
events through an X Input Method (XIM) or GTK, which might decide
|
||||
to intercept the event and send a different one in its place, for
|
||||
reasons such as enabling the user to insert international
|
||||
characters that aren't on his keyboard by typing a sequence of
|
||||
characters which are. See the function x_filter_event and its
|
||||
callers for more details.
|
||||
|
||||
Events that cause Emacs to quit are treated specially by the code
|
||||
that stores them in the keyboard buffer and generally cause an
|
||||
immediate interrupt. Such an interrupt can lead to a longjmp from
|
||||
the code that stored the keyboard event, which isn't safe inside
|
||||
XTread_socket. To avoid this problem, XTread_socket is provided a
|
||||
special event buffer named hold_quit. When a quit event is
|
||||
encountered, it is stored inside this special buffer, which will
|
||||
cause the keyboard code that called XTread_socket to store it at a
|
||||
later time when it is safe to do so.
|
||||
|
||||
handle_one_xevent will generally have to determine which frame an
|
||||
event should be attributed to. This is not easy, because events
|
||||
can come from multiple X windows, and a frame can also have
|
||||
multiple windows. handle_one_xevent usually calls the function
|
||||
x_any_window_to_frame, which searches for a frame by toplevel
|
||||
window and widget windows. There are also some other functions for
|
||||
searching by specific types of window, such as
|
||||
x_top_window_to_frame (which only searches for frames by toplevel
|
||||
window), and x_menubar_window_to_frame (which will only search
|
||||
through frame menu bars).
|
||||
|
||||
INPUT FOCUS
|
||||
|
||||
Under X, the window where keyboard input is sent is not always
|
||||
explictly defined. When there is a focus window, it receives what
|
||||
is referred to as "explicit focus", but when there is none, it
|
||||
receives "implicit focus" whenever the pointer enters it, and loses
|
||||
that focus when the pointer leaves. When the toplevel window of a
|
||||
frame receives an explicit focus event (FocusIn or FocusOut), we
|
||||
treat that frame as having the current input focus, but when there
|
||||
is no focus window, we treat each frame as having the input focus
|
||||
whenever the pointer enters it, and undo that treatment when the
|
||||
pointer leaves it. See the callers of x_detect_focus_change for
|
||||
more details. */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
|
@ -4126,7 +4192,9 @@ x_draw_glyph_string (struct glyph_string *s)
|
|||
area_max_x = area_x + area_width - 1;
|
||||
|
||||
decoration_width = s->width;
|
||||
if (area_max_x < (s->x + decoration_width - 1))
|
||||
if (!s->row->mode_line_p
|
||||
&& !s->row->tab_line_p
|
||||
&& area_max_x < (s->x + decoration_width - 1))
|
||||
decoration_width -= (s->x + decoration_width - 1) - area_max_x;
|
||||
|
||||
/* Draw relief if not yet drawn. */
|
||||
|
|
@ -5252,16 +5320,13 @@ x_detect_focus_change (struct x_display_info *dpyinfo, struct frame *frame,
|
|||
int focus_state
|
||||
= focus_frame ? focus_frame->output_data.x->focus_state : 0;
|
||||
|
||||
#ifdef USE_GTK
|
||||
if (xi_event->evtype == XI_FocusIn
|
||||
|| xi_event->evtype == XI_FocusOut)
|
||||
x_focus_changed ((xi_event->evtype == XI_FocusIn
|
||||
? FocusIn : FocusOut),
|
||||
FOCUS_EXPLICIT,
|
||||
dpyinfo, frame, bufp);
|
||||
else
|
||||
#endif
|
||||
if ((xi_event->evtype == XI_Enter
|
||||
else if ((xi_event->evtype == XI_Enter
|
||||
|| xi_event->evtype == XI_Leave)
|
||||
&& (((XIEnterEvent *) xi_event)->detail
|
||||
!= XINotifyInferior)
|
||||
|
|
@ -5386,8 +5451,6 @@ x_find_modifier_meanings (struct x_display_info *dpyinfo)
|
|||
dpyinfo->super_mod_mask = 0;
|
||||
dpyinfo->hyper_mod_mask = 0;
|
||||
|
||||
XDisplayKeycodes (dpyinfo->display, &min_code, &max_code);
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
if (dpyinfo->xkb_desc)
|
||||
{
|
||||
|
|
@ -5432,6 +5495,8 @@ x_find_modifier_meanings (struct x_display_info *dpyinfo)
|
|||
}
|
||||
#endif
|
||||
|
||||
XDisplayKeycodes (dpyinfo->display, &min_code, &max_code);
|
||||
|
||||
syms = XGetKeyboardMapping (dpyinfo->display,
|
||||
min_code, max_code - min_code + 1,
|
||||
&syms_per_code);
|
||||
|
|
@ -5924,7 +5989,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
|
|||
if (!f1 && insist > 0)
|
||||
f1 = SELECTED_FRAME ();
|
||||
|
||||
if (f1)
|
||||
if (f1 && FRAME_X_P (f1))
|
||||
{
|
||||
/* Ok, we found a frame. Store all the values.
|
||||
last_mouse_glyph is a rectangle used to reduce the
|
||||
|
|
@ -5934,7 +5999,6 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
|
|||
on it, i.e. into the same rectangles that matrices on
|
||||
the frame are divided into. */
|
||||
|
||||
/* FIXME: what if F1 is not an X frame? */
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f1);
|
||||
remember_mouse_glyph (f1, win_x, win_y, &dpyinfo->last_mouse_glyph);
|
||||
dpyinfo->last_mouse_glyph_frame = f1;
|
||||
|
|
@ -8285,8 +8349,10 @@ x_filter_event (struct x_display_info *dpyinfo, XEvent *event)
|
|||
&& event->type == GenericEvent
|
||||
&& (event->xgeneric.extension
|
||||
== dpyinfo->xi2_opcode)
|
||||
&& (event->xgeneric.evtype
|
||||
== XI_KeyPress))
|
||||
&& ((event->xgeneric.evtype
|
||||
== XI_KeyPress)
|
||||
|| (event->xgeneric.evtype
|
||||
== XI_KeyRelease)))
|
||||
{
|
||||
f1 = x_any_window_to_frame (dpyinfo,
|
||||
((XIDeviceEvent *)
|
||||
|
|
@ -9458,6 +9524,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
|
||||
case EnterNotify:
|
||||
x_display_set_last_user_time (dpyinfo, event->xcrossing.time);
|
||||
|
||||
if (x_top_window_to_frame (dpyinfo, event->xcrossing.window))
|
||||
x_detect_focus_change (dpyinfo, any, event, &inev.ie);
|
||||
|
||||
#ifdef HAVE_XWIDGETS
|
||||
|
|
@ -9540,6 +9608,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
}
|
||||
#endif
|
||||
x_display_set_last_user_time (dpyinfo, event->xcrossing.time);
|
||||
|
||||
if (x_top_window_to_frame (dpyinfo, event->xcrossing.window))
|
||||
x_detect_focus_change (dpyinfo, any, event, &inev.ie);
|
||||
|
||||
f = x_top_window_to_frame (dpyinfo, event->xcrossing.window);
|
||||
|
|
@ -10151,13 +10221,23 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
x_detect_focus_change (dpyinfo, any, event, &inev.ie);
|
||||
goto XI_OTHER;
|
||||
case XI_Enter:
|
||||
any = x_any_window_to_frame (dpyinfo, enter->event);
|
||||
|
||||
any = x_top_window_to_frame (dpyinfo, enter->event);
|
||||
ev.x = lrint (enter->event_x);
|
||||
ev.y = lrint (enter->event_y);
|
||||
ev.window = leave->event;
|
||||
|
||||
ev.window = enter->event;
|
||||
x_display_set_last_user_time (dpyinfo, xi_event->time);
|
||||
|
||||
/* There is no need to handle entry/exit events for
|
||||
passive focus from non-top windows at all, since they
|
||||
are an inferiors of the frame's top window, which will
|
||||
get virtual events. */
|
||||
if (any)
|
||||
x_detect_focus_change (dpyinfo, any, event, &inev.ie);
|
||||
|
||||
if (!any)
|
||||
any = x_any_window_to_frame (dpyinfo, enter->event);
|
||||
|
||||
{
|
||||
#ifdef HAVE_XWIDGETS
|
||||
struct xwidget_view *xwidget_view = xwidget_view_from_window (enter->event);
|
||||
|
|
@ -10221,11 +10301,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
x_note_mouse_movement (dpyinfo->last_mouse_glyph_frame, &ev);
|
||||
#endif
|
||||
goto XI_OTHER;
|
||||
|
||||
case XI_Leave:
|
||||
ev.x = lrint (leave->event_x);
|
||||
ev.y = lrint (leave->event_y);
|
||||
ev.window = leave->event;
|
||||
any = x_any_window_to_frame (dpyinfo, leave->event);
|
||||
any = x_top_window_to_frame (dpyinfo, leave->event);
|
||||
|
||||
#ifdef HAVE_XWIDGETS
|
||||
{
|
||||
|
|
@ -10243,8 +10324,13 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
#endif
|
||||
|
||||
x_display_set_last_user_time (dpyinfo, xi_event->time);
|
||||
|
||||
if (any)
|
||||
x_detect_focus_change (dpyinfo, any, event, &inev.ie);
|
||||
|
||||
if (!any)
|
||||
any = x_any_window_to_frame (dpyinfo, leave->event);
|
||||
|
||||
#ifndef USE_X_TOOLKIT
|
||||
f = x_top_window_to_frame (dpyinfo, leave->event);
|
||||
#else
|
||||
|
|
@ -11167,6 +11253,13 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
case XI_PropertyEvent:
|
||||
case XI_HierarchyChanged:
|
||||
case XI_DeviceChanged:
|
||||
|
||||
#ifdef XISlaveSwitch
|
||||
if (xi_event->evtype == XI_DeviceChanged
|
||||
&& (((XIDeviceChangedEvent *) xi_event)->reason
|
||||
== XISlaveSwitch))
|
||||
goto XI_OTHER;
|
||||
#endif
|
||||
x_init_master_valuators (dpyinfo);
|
||||
goto XI_OTHER;
|
||||
#ifdef XI_TouchBegin
|
||||
|
|
@ -11433,6 +11526,22 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
|
||||
x_find_modifier_meanings (dpyinfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
dpyinfo->xkb_desc = XkbGetMap (dpyinfo->display,
|
||||
(XkbKeySymsMask
|
||||
| XkbKeyTypesMask
|
||||
| XkbModifierMapMask
|
||||
| XkbVirtualModsMask),
|
||||
XkbUseCoreKbd);
|
||||
|
||||
if (dpyinfo->xkb_desc)
|
||||
XkbGetNames (dpyinfo->display,
|
||||
XkbGroupNamesMask | XkbVirtualModNamesMask,
|
||||
dpyinfo->xkb_desc);
|
||||
}
|
||||
|
||||
XkbRefreshKeyboardMapping (&xkbevent->map);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1447,8 +1447,8 @@ xwidget_motion_or_crossing (struct xwidget_view *view, const XEvent *event)
|
|||
#ifdef HAVE_XINPUT2
|
||||
else if (event->type == GenericEvent)
|
||||
{
|
||||
xg_event->crossing.x = (gdouble) xev->event_x;
|
||||
xg_event->crossing.y = (gdouble) xev->event_y;
|
||||
xg_event->crossing.x = x;
|
||||
xg_event->crossing.y = y;
|
||||
xg_event->crossing.x_root = (gdouble) xev->root_x;
|
||||
xg_event->crossing.y_root = (gdouble) xev->root_y;
|
||||
xg_event->crossing.time = xev->time;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ EMACS_EXTRAOPT =
|
|||
EMACSOPT = --no-init-file --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)" $(elpa_opts) $(EMACS_EXTRAOPT)
|
||||
|
||||
# Prevent any settings in the user environment causing problems.
|
||||
unexport EMACSDATA EMACSDOC EMACSPATH GREP_OPTIONS XDG_CONFIG_HOME
|
||||
unexport EMACSDATA EMACSDOC EMACSLOADPATH EMACSPATH GREP_OPTIONS XDG_CONFIG_HOME
|
||||
|
||||
# To run tests under a debugger, set this to eg: "gdb --args".
|
||||
GDB =
|
||||
|
|
@ -118,10 +118,8 @@ MODULES_EMACSOPT :=
|
|||
endif
|
||||
|
||||
# The actual Emacs command run in the targets below.
|
||||
# Prevent any setting of EMACSLOADPATH in user environment causing problems,
|
||||
# and prevent locals to influence the text of the errors we expect to receive.
|
||||
emacs = LANG=C EMACSLOADPATH= \
|
||||
EMACS_TEST_DIRECTORY=$(abspath $(srcdir)) \
|
||||
# Prevent locales influencing the text of the errors we expect to receive.
|
||||
emacs = LANG=C EMACS_TEST_DIRECTORY=$(abspath $(srcdir)) \
|
||||
$(GDB) $(TEST_TIMEOUT) "$(EMACS)" $(MODULES_EMACSOPT) $(EMACSOPT)
|
||||
|
||||
# Set HOME to a nonexistent directory to prevent tests from accessing
|
||||
|
|
|
|||
|
|
@ -1094,5 +1094,15 @@ This avoids potential duplicate definitions (Bug#41988)."
|
|||
(edebug-new-definition name))))
|
||||
(should-error (eval-buffer) :type 'invalid-read-syntax))))
|
||||
|
||||
(ert-deftest edebug-tests-inline ()
|
||||
"Check that Edebug can instrument inline functions (Bug#53068)."
|
||||
(with-temp-buffer
|
||||
(print '(define-inline edebug-tests-inline (arg)
|
||||
(inline-quote ,arg))
|
||||
(current-buffer))
|
||||
(let ((edebug-all-defs t)
|
||||
(edebug-initial-mode 'Go-nonstop))
|
||||
(eval-buffer))))
|
||||
|
||||
(provide 'edebug-tests)
|
||||
;;; edebug-tests.el ends here
|
||||
|
|
|
|||
|
|
@ -881,6 +881,9 @@ This macro is used to test if macroexpansion in `should' works."
|
|||
"Check that `lexical-binding' in `ert-deftest' has the file value."
|
||||
(should (equal lexical-binding t)))
|
||||
|
||||
(ert-deftest ert-test-get-explainer ()
|
||||
(should (eq (ert--get-explainer 'string-equal) 'ert--explain-string-equal))
|
||||
(should (eq (ert--get-explainer 'string=) 'ert--explain-string-equal)))
|
||||
|
||||
(provide 'ert-tests)
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
'((?u "user" t user "execute a command as another USER")
|
||||
:parse-leading-options-only))))
|
||||
(should
|
||||
(equal '("world" "emerge")
|
||||
(equal '("DN" "emerge" "world")
|
||||
(eshell--process-args
|
||||
"sudo"
|
||||
'("-u" "root" "emerge" "-uDN" "world")
|
||||
|
|
@ -65,59 +65,132 @@
|
|||
|
||||
(ert-deftest test-eshell-eval-using-options ()
|
||||
"Tests for `eshell-eval-using-options'."
|
||||
;; Test short options.
|
||||
(eshell-eval-using-options
|
||||
"ls" '("-a" "/some/path")
|
||||
'((?a "all" nil show-all
|
||||
"do not ignore entries starting with ."))
|
||||
(should (eq show-all t))
|
||||
(should (equal args '("/some/path"))))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("/some/path")
|
||||
'((?a "all" nil show-all
|
||||
"do not ignore entries starting with ."))
|
||||
(should (eq show-all nil))
|
||||
(should (equal args '("/some/path"))))
|
||||
|
||||
;; Test long options.
|
||||
(eshell-eval-using-options
|
||||
"ls" '("--all" "/some/path")
|
||||
'((?a "all" nil show-all
|
||||
"do not ignore entries starting with ."))
|
||||
(should (eq show-all t))
|
||||
(should (equal args '("/some/path"))))
|
||||
|
||||
;; Test options with constant values.
|
||||
(eshell-eval-using-options
|
||||
"ls" '("/some/path" "-h")
|
||||
'((?h "human-readable" 1024 human-readable
|
||||
"print sizes in human readable format"))
|
||||
(should (eql human-readable 1024))
|
||||
(should (equal args '("/some/path"))))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("/some/path" "--human-readable")
|
||||
'((?h "human-readable" 1024 human-readable
|
||||
"print sizes in human readable format"))
|
||||
(should (eql human-readable 1024))
|
||||
(should (equal args '("/some/path"))))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("/some/path")
|
||||
'((?h "human-readable" 1024 human-readable
|
||||
"print sizes in human readable format"))
|
||||
(should (eq human-readable nil))
|
||||
(should (equal args '("/some/path"))))
|
||||
|
||||
;; Test options with user-specified values.
|
||||
(eshell-eval-using-options
|
||||
"ls" '("-I" "*.txt" "/some/path")
|
||||
'((?I "ignore" t ignore-pattern
|
||||
"do not list implied entries matching pattern"))
|
||||
(should (equal ignore-pattern "*.txt"))
|
||||
(should (equal args '("/some/path"))))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("-I*.txt" "/some/path")
|
||||
'((?I "ignore" t ignore-pattern
|
||||
"do not list implied entries matching pattern"))
|
||||
(should (equal ignore-pattern "*.txt"))
|
||||
(should (equal args '("/some/path"))))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("--ignore" "*.txt" "/some/path")
|
||||
'((?I "ignore" t ignore-pattern
|
||||
"do not list implied entries matching pattern"))
|
||||
(should (equal ignore-pattern "*.txt"))
|
||||
(should (equal args '("/some/path"))))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("--ignore=*.txt" "/some/path")
|
||||
'((?I "ignore" t ignore-pattern
|
||||
"do not list implied entries matching pattern"))
|
||||
(should (equal ignore-pattern "*.txt"))
|
||||
(should (equal args '("/some/path"))))
|
||||
|
||||
;; Test multiple short options in a single token.
|
||||
(eshell-eval-using-options
|
||||
"ls" '("-al" "/some/path")
|
||||
'((?a "all" nil show-all
|
||||
"do not ignore entries starting with .")
|
||||
(?l nil long-listing listing-style
|
||||
"use a long listing format"))
|
||||
(should (eq t show-all))
|
||||
(should (eql listing-style 'long-listing))
|
||||
(should (equal args '("/some/path"))))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("-aI*.txt" "/some/path")
|
||||
'((?a "all" nil show-all
|
||||
"do not ignore entries starting with .")
|
||||
(?I "ignore" t ignore-pattern
|
||||
"do not list implied entries matching pattern"))
|
||||
(should (eq t show-all))
|
||||
(should (equal ignore-pattern "*.txt"))
|
||||
(should (equal args '("/some/path"))))
|
||||
|
||||
;; Test that "--" terminates options.
|
||||
(eshell-eval-using-options
|
||||
"ls" '("--" "-a")
|
||||
'((?a "all" nil show-all
|
||||
"do not ignore entries starting with ."))
|
||||
(should (eq show-all nil))
|
||||
(should (equal args '("-a"))))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("--" "--all")
|
||||
'((?a "all" nil show-all
|
||||
"do not ignore entries starting with ."))
|
||||
(should (eq show-all nil))
|
||||
(should (equal args '("--all"))))
|
||||
|
||||
;; Test :parse-leading-options-only.
|
||||
(eshell-eval-using-options
|
||||
"sudo" '("-u" "root" "whoami")
|
||||
'((?u "user" t user "execute a command as another USER")
|
||||
:parse-leading-options-only)
|
||||
(should (equal user "root")))
|
||||
(should (equal user "root"))
|
||||
(should (equal args '("whoami"))))
|
||||
(eshell-eval-using-options
|
||||
"sudo" '("--user" "root" "whoami")
|
||||
'((?u "user" t user "execute a command as another USER")
|
||||
:parse-leading-options-only)
|
||||
(should (equal user "root")))
|
||||
|
||||
(should (equal user "root"))
|
||||
(should (equal args '("whoami"))))
|
||||
(eshell-eval-using-options
|
||||
"sudo" '("emerge" "-uDN" "world")
|
||||
'((?u "user" t user "execute a command as another USER"))
|
||||
(should (equal user "world")))
|
||||
(should (equal user "DN"))
|
||||
(should (equal args '("emerge" "world"))))
|
||||
(eshell-eval-using-options
|
||||
"sudo" '("emerge" "-uDN" "world")
|
||||
'((?u "user" t user "execute a command as another USER")
|
||||
:parse-leading-options-only)
|
||||
(should (eq user nil)))
|
||||
|
||||
(eshell-eval-using-options
|
||||
"ls" '("-I" "*.txt" "/dev/null")
|
||||
'((?I "ignore" t ignore-pattern
|
||||
"do not list implied entries matching pattern"))
|
||||
(should (equal ignore-pattern "*.txt")))
|
||||
|
||||
(eshell-eval-using-options
|
||||
"ls" '("-l" "/dev/null")
|
||||
'((?l nil long-listing listing-style
|
||||
"use a long listing format"))
|
||||
(should (eql listing-style 'long-listing)))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("/dev/null")
|
||||
'((?l nil long-listing listing-style
|
||||
"use a long listing format"))
|
||||
(should (eq listing-style nil)))
|
||||
|
||||
(eshell-eval-using-options
|
||||
"ls" '("/dev/null" "-h")
|
||||
'((?h "human-readable" 1024 human-readable
|
||||
"print sizes in human readable format"))
|
||||
(should (eql human-readable 1024)))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("/dev/null" "--human-readable")
|
||||
'((?h "human-readable" 1024 human-readable
|
||||
"print sizes in human readable format"))
|
||||
(should (eql human-readable 1024)))
|
||||
(eshell-eval-using-options
|
||||
"ls" '("/dev/null")
|
||||
'((?h "human-readable" 1024 human-readable
|
||||
"print sizes in human readable format"))
|
||||
(should (eq human-readable nil))))
|
||||
(should (eq user nil))
|
||||
(should (equal args '("emerge" "-uDN" "world")))))
|
||||
|
||||
(provide 'esh-opt-tests)
|
||||
|
||||
|
|
|
|||
|
|
@ -141,6 +141,23 @@ left alone when opening a URL in an external browser."
|
|||
(let (kill-buffer-query-functions)
|
||||
(kill-buffer (call-interactively #'find-file-at-point)))))))
|
||||
|
||||
(ert-deftest ffap-test-path ()
|
||||
(skip-unless (file-exists-p "/bin"))
|
||||
(skip-unless (file-exists-p "/usr/bin"))
|
||||
(with-temp-buffer
|
||||
(insert "/usr/bin:/bin")
|
||||
(goto-char (point-min))
|
||||
(should (equal (ffap-file-at-point) "/usr/bin")))
|
||||
(with-temp-buffer
|
||||
(insert "/usr/bin:/bin")
|
||||
(goto-char (point-min))
|
||||
(search-forward ":")
|
||||
(should (equal (ffap-file-at-point) "/bin")))
|
||||
(with-temp-buffer
|
||||
(insert ":/bin")
|
||||
(goto-char (point-min))
|
||||
(should (equal (ffap-file-at-point) nil))))
|
||||
|
||||
(provide 'ffap-tests)
|
||||
|
||||
;;; ffap-tests.el ends here
|
||||
|
|
|
|||
|
|
@ -177,4 +177,13 @@ Return first line of the output of (describe-function-1 FUNC)."
|
|||
(should-not (find-lisp-object-file-name help-fns--test-var 'defface))
|
||||
(should-not (find-lisp-object-file-name help-fns--test-var 1))))
|
||||
|
||||
(ert-deftest help-fns--analyze-function-recursive ()
|
||||
(defalias 'help-fns--a 'help-fns--b)
|
||||
(should (equal (help-fns--analyze-function 'help-fns--a)
|
||||
'(help-fns--a help-fns--b t help-fns--b)))
|
||||
;; Make a loop and see that it doesn't infloop.
|
||||
(defalias 'help-fns--b 'help-fns--a)
|
||||
(should (equal (help-fns--analyze-function 'help-fns--a)
|
||||
'(help-fns--a help-fns--b t help-fns--b))))
|
||||
|
||||
;;; help-fns-tests.el ends here
|
||||
|
|
|
|||
|
|
@ -36,12 +36,11 @@
|
|||
;; make lisp/so-long-tests/spelling-tests SELECTOR=t
|
||||
|
||||
;; Only define the test if spell-checking is possible.
|
||||
(when (and ispell-program-name
|
||||
(when (ignore-errors
|
||||
(and ispell-program-name
|
||||
(executable-find ispell-program-name)
|
||||
(condition-case ()
|
||||
(progn (ispell-check-version) t)
|
||||
(error nil))
|
||||
(member "british" (ispell-valid-dictionary-list)))
|
||||
(member "british" (ispell-valid-dictionary-list))))
|
||||
(ert-deftest so-long-spelling ()
|
||||
"Check the spelling in the source code."
|
||||
:tags '(:unstable) ;; It works for me, but I'm not sure about others.
|
||||
|
|
@ -51,8 +50,9 @@
|
|||
;; The Emacs test Makefile's use of HOME=/nonexistent triggers an error
|
||||
;; when starting the inferior ispell process, so we set HOME to a valid
|
||||
;; (but empty) temporary directory for this test.
|
||||
(ert-with-temp-file tmpdir
|
||||
:suffix "so-long.ispell"
|
||||
(ert-with-temp-directory tmpdir
|
||||
:prefix "so-long."
|
||||
:suffix ".ispell"
|
||||
(let* ((process-environment (cons (format "HOME=%s" tmpdir)
|
||||
process-environment))
|
||||
(find-spelling-mistake
|
||||
|
|
|
|||
|
|
@ -1007,5 +1007,22 @@ final or penultimate step during initialization."))
|
|||
(should (equal (ensure-list :foo) '(:foo)))
|
||||
(should (equal (ensure-list '(1 2 3)) '(1 2 3))))
|
||||
|
||||
(ert-deftest test-alias-p ()
|
||||
(should-not (function-alias-p 1))
|
||||
|
||||
(defun subr-tests--fun ())
|
||||
(should-not (function-alias-p 'subr-tests--fun))
|
||||
|
||||
(defalias 'subr-tests--a 'subr-tests--b)
|
||||
(defalias 'subr-tests--b 'subr-tests--c)
|
||||
(should (equal (function-alias-p 'subr-tests--a)
|
||||
'(subr-tests--b subr-tests--c)))
|
||||
|
||||
(defalias 'subr-tests--d 'subr-tests--e)
|
||||
(defalias 'subr-tests--e 'subr-tests--d)
|
||||
(should-error (function-alias-p 'subr-tests--d))
|
||||
(should (equal (function-alias-p 'subr-tests--d t)
|
||||
'(subr-tests--e))))
|
||||
|
||||
(provide 'subr-tests)
|
||||
;;; subr-tests.el ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue