mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Merge branch 'master' into feature/igc
This commit is contained in:
commit
8ece02f9f0
228 changed files with 5033 additions and 2310 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -209,7 +209,7 @@ test/infra/android/**/*.zip
|
|||
test/infra/android/**/*.jar
|
||||
test/infra/android/bin/build.sh
|
||||
|
||||
# ctags, etags.
|
||||
# etags.
|
||||
TAGS
|
||||
!admin/notes/tags
|
||||
|
||||
|
|
@ -234,7 +234,6 @@ a.out
|
|||
lib-src/asset-directory-tool
|
||||
lib-src/be-resources
|
||||
lib-src/blessmail
|
||||
lib-src/ctags
|
||||
lib-src/ebrowse
|
||||
lib-src/emacsclient
|
||||
lib-src/etags
|
||||
|
|
|
|||
2
INSTALL
2
INSTALL
|
|
@ -612,7 +612,7 @@ installed locations, with 'make install'. By default, Emacs's files
|
|||
are installed in the following directories:
|
||||
|
||||
'/usr/local/bin' holds the executable programs users normally run -
|
||||
'emacs', 'etags', 'ctags', 'emacsclient'.
|
||||
'emacs', 'etags', 'emacsclient'.
|
||||
|
||||
'/usr/local/share/emacs/VERSION/lisp' holds the Emacs Lisp library;
|
||||
'VERSION' stands for the number of the Emacs version
|
||||
|
|
|
|||
|
|
@ -635,7 +635,9 @@ ifndef NO_BIN_LINK
|
|||
cd "$(DESTDIR)${bindir}" && $(LN_S_FILEONLY) "$(EMACSFULL)" "$(EMACS)"
|
||||
endif
|
||||
else
|
||||
ifeq (${DUMPING},pdumper)
|
||||
${INSTALL_DATA} src/emacs.pdmp "$(DESTDIR)${libexecdir}/Emacs.pdmp"
|
||||
endif
|
||||
subdir=${ns_appresdir}/site-lisp && ${write_subdir}
|
||||
rm -rf ${ns_appresdir}/share
|
||||
endif
|
||||
|
|
@ -810,9 +812,7 @@ install-info: info
|
|||
|
||||
## "gzip || true" is because some gzips exit with non-zero status
|
||||
## if compression would not reduce the file size. Eg, the gzip in
|
||||
## OpenBSD 4.9 seems to do this (2013/03). In Emacs, this can
|
||||
## only happen with the tiny ctags.1 manpage. We don't really care if
|
||||
## ctags.1 is compressed or not. "gzip -f" is another option here,
|
||||
## OpenBSD 4.9 seems to do this (2013/03). "gzip -f" is another option here,
|
||||
## but not sure if portable.
|
||||
install-man:
|
||||
umask 022; ${MKDIR_P} "$(DESTDIR)${man1dir}"
|
||||
|
|
|
|||
|
|
@ -1471,7 +1471,6 @@ in the repository.")
|
|||
("org/COPYRIGHT-AND-LICENSE" . "org/README")
|
||||
("lisp/net/idna.el" . "puny.el")
|
||||
;; Moved to different directories.
|
||||
("ctags.1" . "ctags.1")
|
||||
("etags.1" . "etags.1")
|
||||
("emacs.1" . "emacs.1")
|
||||
("emacsclient.1" . "emacsclient.1")
|
||||
|
|
|
|||
|
|
@ -32,13 +32,6 @@ exit_status=0
|
|||
|
||||
cd "$PD"/../doc/man
|
||||
for page in *.1; do
|
||||
# ctags.1 just includes the man page etags.1, which AFAICT will
|
||||
# default to the one installed on the system (!), instead of the
|
||||
# one in the repository. So checking it is pointless, and we will
|
||||
# in any case already check etags.1 separately.
|
||||
if [ "$page" == "ctags.1" ]; then
|
||||
continue
|
||||
fi
|
||||
log=$(emacs_mktemp)
|
||||
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=80 \
|
||||
man --warnings=all,mac -E UTF-8 -l -Tutf8 -Z "$page" >/dev/null 2> "$log"
|
||||
|
|
|
|||
|
|
@ -452,6 +452,20 @@ on systems where shared object constructors are supported.
|
|||
See http://docs.oracle.com/en/java/javase/19/docs/specs/jni/intro.html
|
||||
for more details.
|
||||
|
||||
Java does not support `goto' statements, which it defines as reserved
|
||||
identifiers but does not assign any syntatic role. If you are in a
|
||||
position where you must exercise `goto' to exit a block prematurely, you
|
||||
may define the block and exit it with a named `break' statement, thus:
|
||||
|
||||
label:
|
||||
{
|
||||
int x, y = foo ();
|
||||
|
||||
if (y)
|
||||
break label;
|
||||
x = something ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
OVERVIEW OF ANDROID
|
||||
|
|
|
|||
|
|
@ -15,3 +15,9 @@ Re "behavior" vs "behaviour", etc.
|
|||
consistency. Leave obsolete aliases, as always.
|
||||
|
||||
- https://lists.gnu.org/r/emacs-devel/2005-06/msg00489.html
|
||||
|
||||
- In comments, docstrings and other documentation that forms part of
|
||||
Emacs itself, prefer not to abbreviate "Emacs Lisp".
|
||||
In docstrings and the Texinfo manuals, say just "Lisp" whenever the
|
||||
context renders it unambiguous that you mean "Emacs Lisp".
|
||||
If you must abbreviate "Emacs Lisp", capitalize it thus: "Elisp".
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
## install emacs very often. See the --help output for more details.
|
||||
|
||||
|
||||
PUBLIC_LIBSRC_BINARIES='emacsclient etags ctags ebrowse'
|
||||
PUBLIC_LIBSRC_BINARIES='emacsclient etags ebrowse'
|
||||
|
||||
AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile"
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ LIB_SRC_TOP_SRCDIR = $(realpath $(top_src))
|
|||
|
||||
# This is a list of binaries to build and install in lib-src.
|
||||
|
||||
LIBSRC_BINARIES = lib-src/etags lib-src/ctags lib-src/emacsclient \
|
||||
LIBSRC_BINARIES = lib-src/etags lib-src/emacsclient \
|
||||
lib-src/ebrowse lib-src/hexl lib-src/movemail
|
||||
|
||||
CLEAN_SUBDIRS = $(wildcard src lib-src lib etc)
|
||||
|
|
|
|||
|
|
@ -1301,8 +1301,9 @@ Tibor @v{S}imko and Milan Zamazal wrote @file{slovak.el}, support for
|
|||
editing text in Slovak language.
|
||||
|
||||
@item
|
||||
Jo@~ao T@'avora wrote many improvements for @file{flymake.el}, an
|
||||
on-the-fly syntax-checking package.
|
||||
João Távora wrote many improvements for @file{flymake.el}, an on-the-fly
|
||||
syntax-checking package. He also wrote @file{eglot.el}, a language
|
||||
server protocol (LSP) client that was added in Emacs 29.
|
||||
|
||||
@item
|
||||
Luc Teirlinck wrote @file{help-at-pt.el}, providing local help through
|
||||
|
|
|
|||
|
|
@ -353,11 +353,11 @@ directories and the app data directories of other applications.
|
|||
The Emacs distribution also incorporates several binaries. While
|
||||
being executable files, they are packaged as libraries in the library
|
||||
directory, because otherwise the system will not unpack them while
|
||||
Emacs is being installed. This means that instead of @code{ctags} or
|
||||
@code{emacsclient}, Lisp code must specify @code{libctags.so} or
|
||||
Emacs is being installed. This means that instead of
|
||||
@code{emacsclient}, Lisp code must specify
|
||||
@code{libemacsclient.so} on the command line when starting either of
|
||||
those programs in a subprocess; to determine which names to use,
|
||||
consult the values of the variables @code{ctags-program-name},
|
||||
consult the values of the variables
|
||||
@code{etags-program-name}, @code{hexl-program-name},
|
||||
@code{emacsclient-program-name}, @code{movemail-program-name},
|
||||
@code{ebrowse-program-name}, and @code{rcs2log-program-name}.
|
||||
|
|
|
|||
|
|
@ -1089,6 +1089,16 @@ local variable specifications; it automatically makes these variables
|
|||
local to the buffer, and sets them to the values specified in the
|
||||
file.
|
||||
|
||||
There are two ways to set file local variables: in the first
|
||||
line, or with a local variables list near the end of the file.
|
||||
|
||||
If a file has local variables in both a local variables list and
|
||||
in line one, Emacs processes @emph{everything} in line one first, and
|
||||
@emph{everything} in the local variables list afterward. The exception
|
||||
to this is a major mode specification. Emacs applies this first,
|
||||
wherever it appears, since most major modes kill all local variables as
|
||||
part of their initialization.
|
||||
|
||||
File local variables override directory local variables
|
||||
(@pxref{Directory Variables}), if any are specified for a file's
|
||||
directory.
|
||||
|
|
@ -1101,9 +1111,7 @@ directory.
|
|||
@node Specifying File Variables
|
||||
@subsubsection Specifying File Variables
|
||||
|
||||
There are two ways to specify file local variable values: in the first
|
||||
line, or with a local variables list. Here's how to specify them in the
|
||||
first line:
|
||||
Here is one way to specify local variables, in the first line:
|
||||
|
||||
@example
|
||||
-*- mode: @var{modename}; @var{var}: @var{value}; @dots{} -*-
|
||||
|
|
@ -1113,21 +1121,9 @@ first line:
|
|||
You can specify any number of variable/value pairs in this way, each
|
||||
pair with a colon and semicolon. The special variable/value pair
|
||||
@code{mode: @var{modename};}, if present, specifies a major mode
|
||||
(without the ``-mode'' suffix). The @var{value}s are used literally,
|
||||
(without the ``-mode'' suffix). The @var{value}s are used literally
|
||||
and not evaluated.
|
||||
|
||||
@findex add-file-local-variable-prop-line
|
||||
@findex delete-file-local-variable-prop-line
|
||||
@findex copy-dir-locals-to-file-locals-prop-line
|
||||
You can use @kbd{M-x add-file-local-variable-prop-line} instead of
|
||||
adding entries by hand. This command prompts for a variable and
|
||||
value, and adds them to the first line in the appropriate way.
|
||||
@kbd{M-x delete-file-local-variable-prop-line} prompts for a variable,
|
||||
and deletes its entry from the line. The command @kbd{M-x
|
||||
copy-dir-locals-to-file-locals-prop-line} copies the current
|
||||
directory-local variables to the first line (@pxref{Directory
|
||||
Variables}).
|
||||
|
||||
Here is an example first line that specifies Lisp mode and sets two
|
||||
variables with numeric values:
|
||||
|
||||
|
|
@ -1135,33 +1131,39 @@ variables with numeric values:
|
|||
;; -*- mode: Lisp; fill-column: 75; comment-column: 50; -*-
|
||||
@end smallexample
|
||||
|
||||
After any change to the @samp{-*-} line, type @kbd{M-x normal-mode}
|
||||
to re-interpret it. @xref{Choosing Modes}.
|
||||
|
||||
@noindent
|
||||
Aside from @code{mode}, other keywords that have special meanings as
|
||||
file variables are @code{coding}, @code{unibyte}, and @code{eval}.
|
||||
These are described below.
|
||||
These keywords are described later.
|
||||
|
||||
@cindex shell scripts, and local file variables
|
||||
@cindex man pages, and local file variables
|
||||
In shell scripts, the first line is used to identify the script
|
||||
interpreter, so you cannot put any local variables there. To
|
||||
accommodate this, Emacs looks for local variable specifications in the
|
||||
accommodate this, Emacs looks for local variables in the
|
||||
@emph{second} line if the first line specifies an interpreter. The
|
||||
same is true for man pages which start with the magic string
|
||||
same is true for man pages that start with the magic string
|
||||
@samp{'\"} to specify a list of troff preprocessors (not all do,
|
||||
however).
|
||||
|
||||
Apart from using a @samp{-*-} line, you can define file local
|
||||
variables using a @dfn{local variables list} near the end of the file.
|
||||
The start of the local variables list should be no more than 3000
|
||||
characters from the end of the file, and must be on the last page if
|
||||
the file is divided into pages.
|
||||
@findex add-file-local-variable-prop-line
|
||||
@findex delete-file-local-variable-prop-line
|
||||
@findex copy-dir-locals-to-file-locals-prop-line
|
||||
You can use @kbd{M-x add-file-local-variable-prop-line} instead of
|
||||
adding entries by hand. This command prompts for a variable and
|
||||
value, and adds them to the first line in the appropriate way.
|
||||
The command
|
||||
@kbd{M-x delete-file-local-variable-prop-line} prompts for a variable,
|
||||
and deletes its entry from the line. If there are any directory-local
|
||||
variables (@pxref{Directory Variables}), the command
|
||||
@kbd{M-x copy-dir-locals-to-file-locals-prop-line} will copy them
|
||||
to the first line.
|
||||
|
||||
If a file has both a local variables list and a @samp{-*-} line,
|
||||
Emacs processes @emph{everything} in the @samp{-*-} line first, and
|
||||
@emph{everything} in the local variables list afterward. The exception
|
||||
to this is a major mode specification. Emacs applies this first,
|
||||
wherever it appears, since most major modes kill all local variables as
|
||||
part of their initialization.
|
||||
You also can define file local
|
||||
variables using a @dfn{local variables list} near the end of the file.
|
||||
|
||||
A local variables list starts with a line containing the string
|
||||
@samp{Local Variables:}, and ends with a line containing the string
|
||||
|
|
@ -1186,25 +1188,18 @@ won't confuse other programs that the file is intended for. The
|
|||
example above is for the C programming language, where comments start
|
||||
with @samp{/*} and end with @samp{*/}.
|
||||
|
||||
If some unrelated text might look to Emacs as a local variables list,
|
||||
The start of the local variables list must be no more than 3000
|
||||
characters from the end of the file, and it must be on the last page if
|
||||
the file is divided into pages.
|
||||
If some unrelated text might look to Emacs like a local variables list,
|
||||
you can countermand that by inserting a form-feed character (a page
|
||||
delimiter, @pxref{Pages}) after that text. Emacs only looks for
|
||||
file-local variables in the last page of a file, after the last page
|
||||
delimiter.
|
||||
delimiter, @pxref{Pages}) after that text.
|
||||
|
||||
@findex add-file-local-variable
|
||||
@findex delete-file-local-variable
|
||||
@findex copy-dir-locals-to-file-locals
|
||||
Instead of typing in the local variables list directly, you can use
|
||||
the command @kbd{M-x add-file-local-variable}. This prompts for a
|
||||
variable and value, and adds them to the list, adding the @samp{Local
|
||||
Variables:} string and start and end markers as necessary. The
|
||||
command @kbd{M-x delete-file-local-variable} deletes a variable from
|
||||
the list. @kbd{M-x copy-dir-locals-to-file-locals} copies
|
||||
directory-local variables to the list (@pxref{Directory Variables}).
|
||||
After any change to the local variables, type @kbd{M-x normal-mode}
|
||||
to re-read them. @xref{Choosing Modes}.
|
||||
|
||||
As with the @samp{-*-} line, the variables in a local variables list
|
||||
are used literally, and are not evaluated first. If you want to split
|
||||
are used literally and are not evaluated first. If you want to split
|
||||
a long string value across multiple lines of the file, you can use
|
||||
backslash-newline, which is ignored in Lisp string constants; you
|
||||
should put the prefix and suffix on each line, even lines that start
|
||||
|
|
@ -1218,6 +1213,17 @@ the list. Here is an example:
|
|||
# End:
|
||||
@end example
|
||||
|
||||
@findex add-file-local-variable
|
||||
@findex delete-file-local-variable
|
||||
@findex copy-dir-locals-to-file-locals
|
||||
Instead of typing in the local variables list directly, you can use
|
||||
the command @kbd{M-x add-file-local-variable}. This prompts for a
|
||||
variable and value, and adds them to the list, adding the @samp{Local
|
||||
Variables:} string and start and end markers as necessary. The
|
||||
command @kbd{M-x delete-file-local-variable} deletes a variable from
|
||||
the list. @kbd{M-x copy-dir-locals-to-file-locals} copies
|
||||
directory-local variables to the list (@pxref{Directory Variables}).
|
||||
|
||||
Some names have special meanings in a local variables
|
||||
list:
|
||||
|
||||
|
|
@ -1260,7 +1266,7 @@ enabling the modes in the first line of the file, can say:
|
|||
Emacs will use the final defined mode it finds, so in older Emacs
|
||||
versions it will ignore @code{my-new-mode}, while in Emacs versions
|
||||
where @code{my-new-mode} is defined, it'll ignore @code{my-old-mode}.
|
||||
Similarly, in a local variable block at the end of the file:
|
||||
Similarly, in a local variables block at the end of the file:
|
||||
|
||||
@example
|
||||
Local variables:
|
||||
|
|
@ -1292,10 +1298,6 @@ edit the file. If you wish to automatically enable or disable a minor
|
|||
mode in a situation-dependent way, it is often better to do it in a
|
||||
major mode hook (@pxref{Hooks}).
|
||||
|
||||
Use the command @kbd{M-x normal-mode} to reset the local variables
|
||||
and major mode of a buffer according to the file name and contents,
|
||||
including the local variables list if any. @xref{Choosing Modes}.
|
||||
|
||||
@node Safe File Variables
|
||||
@subsubsection Safety of File Variables
|
||||
|
||||
|
|
|
|||
|
|
@ -486,6 +486,11 @@ Backup Files
|
|||
* Backup Deletion:: Emacs deletes excess numbered backups.
|
||||
* Backup Copying:: Backups can be made by copying or renaming.
|
||||
|
||||
Updating Time Stamps Automatically
|
||||
|
||||
* Time Stamp Customization:: How to customize with time-stamp-pattern.
|
||||
* Time Stamps for One File:: Ensure automatic time-stamp of a specific file.
|
||||
|
||||
@ifnottex
|
||||
Auto Reverting Non-File Buffers
|
||||
|
||||
|
|
|
|||
|
|
@ -1007,8 +1007,8 @@ was written will be preserved even if the file is copied or transformed
|
|||
in a way that loses the file system's modification time.
|
||||
|
||||
There are two steps to setting up automatic time stamping.
|
||||
First, you need to have a time stamp template
|
||||
somewhere in the first eight lines of the file.
|
||||
First, the file needs a time stamp template
|
||||
somewhere in the first eight lines.
|
||||
The template looks like this:
|
||||
|
||||
@example
|
||||
|
|
@ -1022,59 +1022,81 @@ or (your choice) like this:
|
|||
Time-stamp: " "
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
When time-stamping, Emacs will write the current time, date, and/or
|
||||
other info between the brackets or quotes.
|
||||
|
||||
@findex time-stamp
|
||||
Second, add the function @code{time-stamp}
|
||||
With that template in place, you can update the current buffer's time
|
||||
stamp once immediately with the command @kbd{M-x time-stamp}.
|
||||
Emacs will check for a template; if a template is found,
|
||||
Emacs will write the current date, time, author, and/or
|
||||
other info between the brackets or quotes.
|
||||
(If the buffer has no template, @code{time-stamp} does nothing.)
|
||||
After the first time stamp, the line might look like this:
|
||||
|
||||
@example
|
||||
Time-stamp: <1993-07-06 11:05:14 terryg>
|
||||
@end example
|
||||
|
||||
Second, configure Emacs to run @code{time-stamp} any time it saves a
|
||||
file, by adding @code{time-stamp}
|
||||
to @code{before-save-hook} (@pxref{Hooks}).
|
||||
To do this, either customize the option @code{before-save-hook}
|
||||
(with @kbd{M-x customize-option}, @pxref{Specific Customization})
|
||||
or edit your init file adding this line:
|
||||
You can either customize the option @code{before-save-hook}
|
||||
(with @kbd{M-x customize-option}, @pxref{Specific Customization}),
|
||||
or you can edit your init file adding this line:
|
||||
|
||||
@example
|
||||
(add-hook 'before-save-hook 'time-stamp)
|
||||
@end example
|
||||
|
||||
To enable automatic time-stamping for only a specific file, add the
|
||||
following line to a local variables list
|
||||
(@pxref{Specifying File Variables}) near the end of the file:
|
||||
@menu
|
||||
* Time Stamp Customization:: How to customize with time-stamp-pattern.
|
||||
* Time Stamps for One File:: Ensure automatic time-stamp of a specific file.
|
||||
@end menu
|
||||
|
||||
@example
|
||||
eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
||||
@end example
|
||||
|
||||
To update the current buffer's time stamp once
|
||||
immediately, use the command @kbd{M-x time-stamp}.
|
||||
@node Time Stamp Customization
|
||||
@subsubsection Customizing the Time Stamp
|
||||
|
||||
@vindex time-stamp-pattern
|
||||
To customize the time stamp in a particular file, set the
|
||||
variable @code{time-stamp-pattern} in that file's local variables list.
|
||||
You can change where the time stamp starts and ends and how the dynamic
|
||||
information is to be formatted; see the variable's built-in
|
||||
documentation for details.
|
||||
variable @code{time-stamp-pattern} in that file's local variables
|
||||
list (@pxref{Specifying File Variables}).
|
||||
You can change what pattern @code{time-stamp} will match against to
|
||||
identify a template and where in the file to look for the pattern using
|
||||
@code{time-stamp-pattern}; for details, see the variable's built-in
|
||||
documentation (with @kbd{C-h v}, @pxref{Name Help}).
|
||||
|
||||
As a simple example, if this line occurs near the top of a file:
|
||||
|
||||
@example
|
||||
\newcommand@{\yearpublished@}@{@}
|
||||
publishing_year_and_city = "Published nnnn in Boston, Mass.";
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
then the following at the end of the file tells @code{time-stamp} how to
|
||||
identify and update that custom template:
|
||||
then the following comment at the end of the same file tells
|
||||
@code{time-stamp} how to identify and update that custom template:
|
||||
|
||||
@example
|
||||
@group
|
||||
%% Local variables:
|
||||
%% time-stamp-pattern: "@{.yearpublished@}@{%Y@}"
|
||||
%% End:
|
||||
// Local variables:
|
||||
// time-stamp-pattern: "Published %Y in Boston"
|
||||
// End:
|
||||
@end group
|
||||
@end example
|
||||
|
||||
Here is another example, with the time stamp inserted into the last
|
||||
paragraph of an HTML document. The @code{%%} in the pattern asks for
|
||||
the default format.
|
||||
This pattern says that the text before the start of the time stamp is
|
||||
``Published '', and the text after the end is `` in Boston''.
|
||||
If @code{time-stamp} finds both in one of the first eight lines,
|
||||
what is between will be replaced by the current year, as requested by
|
||||
the @code{%Y} format.
|
||||
|
||||
After any change to file-local variables,
|
||||
type @kbd{M-x normal-mode} to re-read them.
|
||||
|
||||
Here is another example, with the time stamp inserted into
|
||||
the last paragraph of an HTML document.
|
||||
Since this template is at the end of the document, not in the first
|
||||
eight lines, @code{time-stamp-format} starts with @code{-10/} to tell
|
||||
@code{time-stamp} to look at the last 10 lines.
|
||||
The @code{%%} asks for the default format
|
||||
(specified by @code{time-stamp-format}).
|
||||
|
||||
@example
|
||||
@r{@dots{}}
|
||||
|
|
@ -1096,7 +1118,29 @@ Manual}).
|
|||
See the built-in documentation for the variable @code{time-stamp-format}
|
||||
for specifics and other variables that affect the formatting.
|
||||
|
||||
For customizations, see the Custom group @code{time-stamp}.
|
||||
@node Time Stamps for One File
|
||||
@subsubsection Forcing Time Stamps for One File
|
||||
|
||||
If you are working on a file with multiple authors, and you cannot
|
||||
be sure the other authors have enabled time-stamping globally in
|
||||
their Emacs init files, you can force it to be enabled for a
|
||||
particular file by adding @code{time-stamp} to that buffer's
|
||||
@code{before-save-hook} in that file's local variables list.
|
||||
To extend one of the previous examples:
|
||||
|
||||
@example
|
||||
@group
|
||||
// Local variables:
|
||||
// eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
||||
// time-stamp-pattern: "Published %Y in Boston"
|
||||
// End:
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Although this example shows them both set together,
|
||||
you can use @code{eval} without also setting @code{time-stamp-pattern}
|
||||
if you like the default pattern.
|
||||
|
||||
@node Reverting
|
||||
@section Reverting a Buffer
|
||||
|
|
|
|||
|
|
@ -857,9 +857,11 @@ over the active text displays the help text as a @dfn{tooltip}.
|
|||
@kindex C-h .
|
||||
@findex display-local-help
|
||||
@vindex help-at-pt-display-when-idle
|
||||
@vindex eldoc-help-at-pt
|
||||
On terminals that don't support mouse-tracking, you can display the
|
||||
help text for active buffer text at point by typing @kbd{C-h .}
|
||||
(@code{display-local-help}). This shows the help text in the echo
|
||||
area. To display help text automatically whenever it is available at
|
||||
point, set the variable @code{help-at-pt-display-when-idle} to
|
||||
@code{t}.
|
||||
@code{t}. If you use Eldoc, set the variable @code{eldoc-help-at-pt}
|
||||
to @code{t} instead.
|
||||
|
|
|
|||
|
|
@ -2248,6 +2248,7 @@ definitions of symbols. (One disadvantage of this kind of backend is
|
|||
that it only knows about subunits that were loaded into the
|
||||
interpreter.)
|
||||
|
||||
@cindex eglot, for finding definitions of identifiers
|
||||
@item
|
||||
If Eglot is activated for the current buffer's project
|
||||
(@pxref{Projects}) and the current buffer's major mode, Eglot consults
|
||||
|
|
|
|||
|
|
@ -115,6 +115,16 @@ utilize the incremental parsing capabilities provided by
|
|||
@samp{tree-sitter}. These modes have @samp{-ts-} in their names; for
|
||||
example @code{c-ts-mode}, @code{python-ts-mode}, etc.
|
||||
|
||||
@cindex LSP
|
||||
@cindex language server
|
||||
@cindex Eglot
|
||||
Major modes for programming languages can use services of
|
||||
@dfn{language servers} via the facilities provided by the Eglot package.
|
||||
Eglot implements LSP, the @dfn{language server protocol}, which allows
|
||||
Emacs to receive language-specific information and services that enrich
|
||||
and extend source code editing capabilities. @xref{Eglot Features,,,
|
||||
eglot, Eglot: The Emacs LSP Client}.
|
||||
|
||||
@kindex DEL @r{(programming modes)}
|
||||
@findex backward-delete-char-untabify
|
||||
In most programming languages, indentation should vary from line to
|
||||
|
|
@ -404,6 +414,7 @@ define your own comparison function by writing Lisp code.
|
|||
the variable @code{completion-category-overrides} and setting its
|
||||
@code{display-sort-function} for the category @code{imenu}.
|
||||
|
||||
@cindex eglot, for producing Imenu index
|
||||
If Eglot is activated for the current buffer's project
|
||||
(@pxref{Projects}) and the current buffer's major mode, Eglot provides
|
||||
its own facility for producing the buffer's index based on the
|
||||
|
|
@ -1501,6 +1512,7 @@ Global ElDoc mode, which is turned on by default, and turns on the
|
|||
ElDoc mode in buffers whose major mode sets the variables described
|
||||
below. Use @w{@kbd{M-x global-eldoc-mode}} to turn it off globally.
|
||||
|
||||
@cindex eglot, using with ElDoc
|
||||
Various major modes configure the Global ElDoc mode to use their
|
||||
documentation functions. Examples include Emacs Lisp mode, Python
|
||||
mode, and Cfengine mode. In addition, Emacs features that provide
|
||||
|
|
@ -1686,6 +1698,7 @@ but you can also complete symbol names in ordinary Emacs buffers.
|
|||
@findex completion-at-point@r{, in programming language modes}
|
||||
@cindex Lisp symbol completion
|
||||
@cindex completion (Lisp symbols)
|
||||
@cindex code completion
|
||||
In most programming language modes, @kbd{C-M-i} (or
|
||||
@kbd{M-@key{TAB}}@footnote{
|
||||
On graphical displays, the @kbd{M-@key{TAB}} key is usually reserved
|
||||
|
|
@ -1697,6 +1710,7 @@ uses the available support facilities to come up with the completion
|
|||
candidates:
|
||||
|
||||
@itemize @bullet
|
||||
@cindex eglot, using to complete symbol at point
|
||||
@item
|
||||
If Eglot is activated for the current buffer's project
|
||||
(@pxref{Projects}) and the current buffer's major mode, the command
|
||||
|
|
|
|||
|
|
@ -1208,7 +1208,7 @@ If the last event came from a keyboard macro, the value is @code{macro}.
|
|||
@cindex input devices
|
||||
@cindex device names
|
||||
Input events must come from somewhere; sometimes, that is a keyboard
|
||||
macro, a signal, or `unread-command-events', but it is usually a
|
||||
macro, a signal, or @code{unread-command-events}, but it is usually a
|
||||
physical input device connected to a computer that is controlled by
|
||||
the user. Those devices are referred to as @dfn{input devices}, and
|
||||
Emacs associates each input event with the input device from which it
|
||||
|
|
|
|||
|
|
@ -1187,6 +1187,12 @@ Window Frame Parameters
|
|||
* Cursor Parameters:: Controlling the cursor appearance.
|
||||
* Font and Color Parameters:: Fonts and colors for the frame text.
|
||||
|
||||
Child Frames
|
||||
|
||||
* Child Frame Operations:: Making and investigating child frames.
|
||||
* Child Frame Properties:: Special properties of child frames.
|
||||
* Child Frame Peculiarities:: Deviant behaviors of child frames.
|
||||
|
||||
Positions
|
||||
|
||||
* Point:: The special position where editing takes place.
|
||||
|
|
|
|||
|
|
@ -26,22 +26,28 @@ object that represents a terminal. @xref{Terminal Type}.
|
|||
@cindex text terminal
|
||||
@cindex graphical terminal
|
||||
@cindex graphical display
|
||||
@cindex top frame
|
||||
There are two classes of terminals: @dfn{text terminals} and
|
||||
@dfn{graphical terminals}. Text terminals are non-graphics-capable
|
||||
displays, including @command{xterm} and other terminal emulators. On
|
||||
a text terminal, each Emacs frame occupies the terminal's entire
|
||||
screen; although you can create additional frames and switch between
|
||||
them, the terminal only shows one frame at a time. Graphical
|
||||
terminals, on the other hand, are managed by graphical display systems
|
||||
such as the X Window System, which allow Emacs to show multiple frames
|
||||
simultaneously on the same display.
|
||||
displays, including @command{xterm} and other terminal emulators. On a
|
||||
text terminal, each Emacs frame occupies the terminal's entire screen;
|
||||
although you can create additional frames and switch between them, the
|
||||
terminal only shows one non-child frame at a time. This frame is
|
||||
referred to as the @dfn{top frame} of that terminal and can be retrieved
|
||||
with the function @code{tty-top-frame} described below. A top frame may
|
||||
have child frames (@pxref{Child Frames}), which will be shown together
|
||||
with it, but it cannot be a child frame itself.
|
||||
|
||||
Graphical terminals, on the other hand, are managed by graphical display
|
||||
systems such as the X Window System, which allow Emacs to show multiple
|
||||
frames simultaneously on the same display.
|
||||
|
||||
On GNU and Unix systems, you can create additional frames on any
|
||||
available terminal, within a single Emacs session, regardless of
|
||||
whether Emacs was started on a text or graphical terminal. Emacs can
|
||||
display on both graphical and text terminals simultaneously. This
|
||||
comes in handy, for instance, when you connect to the same session
|
||||
from several remote locations. @xref{Multiple Terminals}.
|
||||
available terminal, within a single Emacs session, regardless of whether
|
||||
Emacs was started on a text or graphical terminal. Emacs can display on
|
||||
both, graphical and text terminals, simultaneously. This comes in
|
||||
handy, for instance, when you connect to the same session from several
|
||||
remote locations. @xref{Multiple Terminals}.
|
||||
|
||||
@defun framep object
|
||||
This predicate returns a non-@code{nil} value if @var{object} is a
|
||||
|
|
@ -70,9 +76,9 @@ The frame is displayed on an Android device.
|
|||
@end defun
|
||||
|
||||
@defun frame-terminal &optional frame
|
||||
This function returns the terminal object that displays @var{frame}.
|
||||
If @var{frame} is @code{nil} or unspecified, it defaults to the
|
||||
selected frame.
|
||||
This function returns the terminal object that displays @var{frame}. If
|
||||
@var{frame} is @code{nil} or unspecified, it defaults to the selected
|
||||
frame (@pxref{Input Focus}).
|
||||
@end defun
|
||||
|
||||
@defun terminal-live-p object
|
||||
|
|
@ -90,6 +96,19 @@ of the window-system's root window for that terminal. A child frame is
|
|||
a frame whose window-system window is the child of the window-system
|
||||
window of another Emacs frame. @xref{Child Frames}.
|
||||
|
||||
On a text terminal you can get its top frame with the following
|
||||
function:
|
||||
|
||||
@defun tty-top-frame &optional terminal
|
||||
This function returns the top frame on @var{terminal}. @var{terminal}
|
||||
should be a terminal object, a frame (meaning that frame's terminal), or
|
||||
@code{nil} (meaning the selected frame's terminal). If it does not
|
||||
refer to a text terminal, the return value is @code{nil}. A top frame
|
||||
must be a root frame, which means it cannot be a child frame itself
|
||||
(@pxref{Child Frames}), but may have an arbitrary number of child frames
|
||||
descending from it.
|
||||
@end defun
|
||||
|
||||
@menu
|
||||
* Creating Frames:: Creating additional frames.
|
||||
* Multiple Terminals:: Displaying on several different devices.
|
||||
|
|
@ -595,8 +614,8 @@ normal, top-level frame these parameters usually represent its absolute
|
|||
position (see below) with respect to its display's origin. For a child
|
||||
frame (@pxref{Child Frames}) these parameters represent its position
|
||||
relative to the native position (see below) of its parent frame. For
|
||||
frames on text terminals the values of these parameters are meaningless
|
||||
and always zero.
|
||||
root frames (@pxref{Child Frames}) on text terminals the values of these
|
||||
parameters are meaningless and always zero.
|
||||
|
||||
@item External Border
|
||||
@cindex external border
|
||||
|
|
@ -622,11 +641,14 @@ by the window manager like tooltip frames (@pxref{Tooltips}), child
|
|||
frames (@pxref{Child Frames}) and @code{undecorated} or
|
||||
@code{override-redirect} frames (@pxref{Management Parameters}).
|
||||
|
||||
Outer borders are never shown on text terminal frames and on frames
|
||||
generated by GTK+ routines. On MS-Windows, the outer border is emulated
|
||||
with the help of a one pixel wide external border. Non-toolkit builds
|
||||
on X allow changing the color of the outer border by setting the
|
||||
@code{border-color} frame parameter (@pxref{Layout Parameters}).
|
||||
As a rule, outer borders are never shown on text terminal frames and on
|
||||
frames generated by GTK+ routines. For a child frame on a text terminal
|
||||
you can emulate the outer border by setting the @code{undecorated}
|
||||
parameter of that frame to @code{nil} (@pxref{Layout Parameters}). On
|
||||
MS-Windows, the outer border is emulated with the help of a one pixel
|
||||
wide external border. Non-toolkit builds on X allow changing the color
|
||||
of the outer border by setting the @code{border-color} frame parameter
|
||||
(@pxref{Layout Parameters}).
|
||||
|
||||
@item Title Bar
|
||||
@cindex title bar
|
||||
|
|
@ -1003,7 +1025,8 @@ invisible). However, on systems where the display's origin does not
|
|||
coincide with its top-left corner, the frame may be visible on a
|
||||
secondary monitor.
|
||||
|
||||
On a text terminal frame both values are zero.
|
||||
On a text terminal frame both values are zero for root frames
|
||||
(@pxref{Child Frames}).
|
||||
@end defun
|
||||
|
||||
@defun set-frame-position frame x y
|
||||
|
|
@ -1325,18 +1348,10 @@ unaffected by the setting of this option.
|
|||
@cindex frame parameters
|
||||
|
||||
A frame has many parameters that control its appearance and behavior.
|
||||
Just what parameters a frame has depends on what display mechanism it
|
||||
uses.
|
||||
|
||||
Frame parameters exist mostly for the sake of graphical displays.
|
||||
Most frame parameters have no effect when applied to a frame on a text
|
||||
terminal; only the @code{height}, @code{width}, @code{name},
|
||||
@code{title}, @code{menu-bar-lines}, @code{buffer-list} and
|
||||
@code{buffer-predicate} parameters do something special. If the
|
||||
terminal supports colors, the parameters @code{foreground-color},
|
||||
@code{background-color}, @code{background-mode} and
|
||||
@code{display-type} are also meaningful. If the terminal supports
|
||||
frame transparency, the parameter @code{alpha} is also meaningful.
|
||||
Just what parameters are meaningful for a frame depends on what display
|
||||
mechanism it uses. Many frame parameters exist mostly for the sake of
|
||||
graphical displays and have no effect when applied to the top frame
|
||||
(@pxref{Frames}) of a text terminal.
|
||||
|
||||
By default, frame parameters are saved and restored by the desktop
|
||||
library functions (@pxref{Desktop Save Mode}) when the variable
|
||||
|
|
@ -1490,11 +1505,7 @@ Arguments for Emacs Invocation, emacs, The GNU Emacs Manual}.
|
|||
|
||||
Just what parameters a frame has depends on what display mechanism
|
||||
it uses. This section describes the parameters that have special
|
||||
meanings on some or all kinds of terminals. Of these, @code{name},
|
||||
@code{title}, @code{height}, @code{width}, @code{buffer-list} and
|
||||
@code{buffer-predicate} provide meaningful information in terminal
|
||||
frames, and @code{tty-color-mode} is meaningful only for frames on
|
||||
text terminals.
|
||||
meanings on some or all kinds of terminals.
|
||||
|
||||
@menu
|
||||
* Basic Parameters:: Parameters that are fundamental.
|
||||
|
|
@ -1575,8 +1586,8 @@ measured in pixels. For a normal, non-child frame they specify the
|
|||
frame's outer position (@pxref{Frame Geometry}) relative to its
|
||||
display's origin. For a child frame (@pxref{Child Frames}) they specify
|
||||
the frame's outer position relative to the native position of the
|
||||
frame's parent frame. (Note that none of these parameters is meaningful
|
||||
on TTY frames.)
|
||||
frame's parent frame. On a text terminal these parameters are
|
||||
meaningful for child frames only.
|
||||
|
||||
@table @code
|
||||
@vindex left@r{, a frame parameter}
|
||||
|
|
@ -1628,6 +1639,8 @@ unavailable before a frame has been made visible, it is generally not
|
|||
advisable to use floating-point values when creating decorated frames.
|
||||
Floating-point values are more suited for ensuring that an (undecorated)
|
||||
child frame is positioned nicely within the area of its parent frame.
|
||||
|
||||
Floating-point values are currently not handled on text terminal frames.
|
||||
@end table
|
||||
|
||||
Some window managers ignore program-specified positions. If you want to
|
||||
|
|
@ -1664,15 +1677,17 @@ just like @code{left}, except vertically instead of horizontally.
|
|||
@item icon-left
|
||||
The screen position of the left edge of the frame's icon, in pixels,
|
||||
counting from the left edge of the screen. This takes effect when the
|
||||
frame is iconified, if the window manager supports this feature. If
|
||||
you specify a value for this parameter, then you must also specify a
|
||||
value for @code{icon-top} and vice versa.
|
||||
frame is iconified, if the window manager supports this feature. If you
|
||||
specify a value for this parameter, then you must also specify a value
|
||||
for @code{icon-top} and vice versa. This parameter has no meaning on a
|
||||
text terminal.
|
||||
|
||||
@vindex icon-top@r{, a frame parameter}
|
||||
@item icon-top
|
||||
The screen position of the top edge of the frame's icon, in pixels,
|
||||
counting from the top edge of the screen. This takes effect when the
|
||||
frame is iconified, if the window manager supports this feature.
|
||||
frame is iconified, if the window manager supports this feature. This
|
||||
parameter has no meaning on a text terminal.
|
||||
|
||||
@vindex user-position@r{, a frame parameter}
|
||||
@item user-position
|
||||
|
|
@ -1680,7 +1695,8 @@ When you create a frame and specify its screen position with the
|
|||
@code{left} and @code{top} parameters, use this parameter to say whether
|
||||
the specified position was user-specified (explicitly requested in some
|
||||
way by a human user) or merely program-specified (chosen by a program).
|
||||
A non-@code{nil} value says the position was user-specified.
|
||||
A non-@code{nil} value says the position was user-specified. This
|
||||
parameter has no meaning on a text terminal.
|
||||
|
||||
@cindex window positions and window managers
|
||||
Window managers generally heed user-specified positions, and some heed
|
||||
|
|
@ -1699,6 +1715,7 @@ parameters represent the user's stated preference; otherwise, use
|
|||
@item z-group
|
||||
This parameter specifies a relative position of the frame's
|
||||
window-system window in the stacking (Z-) order of the frame's display.
|
||||
It has not been implemented yet on text terminals.
|
||||
|
||||
If this is @code{above}, the window-system will display the window
|
||||
that corresponds to the frame above all other window-system windows
|
||||
|
|
@ -1720,7 +1737,8 @@ function @code{frame-restack} (@pxref{Raising and Lowering}).
|
|||
|
||||
Frame parameters usually specify frame sizes in character units. On
|
||||
graphical displays, the @code{default} face determines the actual pixel
|
||||
sizes of these character units (@pxref{Face Attributes}).
|
||||
sizes of these character units (@pxref{Face Attributes}). On text
|
||||
terminals size parameters affect child frames only.
|
||||
|
||||
@table @code
|
||||
@vindex width@r{, a frame parameter}
|
||||
|
|
@ -1779,7 +1797,7 @@ This parameter specifies the height of the frame. It works just like
|
|||
This does for the size parameters @code{height} and @code{width} what
|
||||
the @code{user-position} parameter (@pxref{Position Parameters,
|
||||
user-position}) does for the position parameters @code{top} and
|
||||
@code{left}.
|
||||
@code{left}. This parameter has no meaning on a text terminal.
|
||||
|
||||
@vindex min-width@r{, a frame parameter}
|
||||
@item min-width
|
||||
|
|
@ -1810,17 +1828,18 @@ fit will be clipped by the window manager.
|
|||
@vindex fullscreen@r{, a frame parameter}
|
||||
@item fullscreen
|
||||
This parameter specifies whether to maximize the frame's width, height
|
||||
or both. Its value can be @code{fullwidth}, @code{fullheight},
|
||||
@code{fullboth}, or @code{maximized}.@footnote{On PGTK frames, setting
|
||||
the values @code{fullheight} and @code{fullwidth} has no effect.} A
|
||||
or both. It has no meaning on a text terminal. Its value can be
|
||||
@code{fullwidth}, @code{fullheight}, @code{fullboth}, or
|
||||
@code{maximized}.@footnote{On PGTK frames, setting the values
|
||||
@code{fullheight} and @code{fullwidth} has no effect.} A
|
||||
@dfn{fullwidth} frame is as wide as possible, a @dfn{fullheight} frame
|
||||
is as tall as possible, and a @dfn{fullboth} frame is both as wide and
|
||||
as tall as possible. A @dfn{maximized} frame is like a ``fullboth''
|
||||
frame, except that it usually keeps its title bar and the buttons for
|
||||
resizing and closing the frame. Also, maximized frames typically
|
||||
avoid hiding any task bar or panels displayed on the desktop. A
|
||||
``fullboth'' frame, on the other hand, usually omits the title bar and
|
||||
occupies the entire available screen space.
|
||||
resizing and closing the frame. Also, maximized frames typically avoid
|
||||
hiding any task bar or panels displayed on the desktop. A ``fullboth''
|
||||
frame, on the other hand, usually omits the title bar and occupies the
|
||||
entire available screen space.
|
||||
|
||||
Full-height and full-width frames are more similar to maximized
|
||||
frames in this regard. However, these typically display an external
|
||||
|
|
@ -1856,7 +1875,7 @@ file as, for example
|
|||
@end example
|
||||
|
||||
This will give a new frame full height after typing in it @key{F11} for
|
||||
the first time.
|
||||
the first time. This parameter has no meaning on a text terminal.
|
||||
|
||||
@vindex fit-frame-to-buffer-margins@r{, a frame parameter}
|
||||
@item fit-frame-to-buffer-margins
|
||||
|
|
@ -1879,10 +1898,31 @@ Windows}).
|
|||
@cindex layout parameters of frames
|
||||
@cindex frame layout parameters
|
||||
|
||||
These frame parameters enable or disable various parts of the
|
||||
frame, or control their sizes.
|
||||
These frame parameters enable or disable various parts of the frame,
|
||||
or control their sizes. Unless stated otherwise, these parameters have
|
||||
no meaning on text terminals.
|
||||
|
||||
@table @code
|
||||
@vindex undecorated@r{, a frame parameter}
|
||||
@item undecorated
|
||||
If non-@code{nil}, then on a graphical system this frame's window-system
|
||||
window is drawn without decorations, like the title, minimize/maximize
|
||||
boxes and external borders. This usually means that the window cannot
|
||||
be dragged, resized, iconified, maximized or deleted with the mouse. If
|
||||
@code{nil}, the frame's window is usually drawn with all the elements
|
||||
listed above unless their display has been suspended via window manager
|
||||
settings.
|
||||
|
||||
Under X, Emacs uses the Motif window manager hints to turn off
|
||||
decorations. Some window managers may not honor these hints.
|
||||
|
||||
NS builds consider the tool bar to be a decoration, and therefore hide
|
||||
it on an undecorated frame.
|
||||
|
||||
On a text terminal, this parameter, if non-@code{nil}, will make a child
|
||||
frame show an outer border, which allows to resize that frame via mouse
|
||||
dragging (@pxref{Mouse Dragging Parameters}).
|
||||
|
||||
@vindex border-width@r{, a frame parameter}
|
||||
@item border-width
|
||||
The width in pixels of the frame's outer border (@pxref{Frame Geometry}).
|
||||
|
|
@ -1948,13 +1988,15 @@ to not draw bottom dividers.
|
|||
@vindex menu-bar-lines@r{, a frame parameter}
|
||||
@item menu-bar-lines
|
||||
The number of lines to allocate at the top of the frame for a menu bar
|
||||
(@pxref{Menu Bar}). The default is one if Menu Bar mode is enabled
|
||||
and zero otherwise. @xref{Menu Bars,,,emacs, The GNU Emacs Manual}.
|
||||
For an external menu bar (@pxref{Frame Layout}), this value remains
|
||||
unchanged even when the menu bar wraps to two or more lines. In that
|
||||
case, the @code{menu-bar-size} value returned by @code{frame-geometry}
|
||||
(@pxref{Frame Geometry}) enables you to establish whether the menu bar
|
||||
actually occupies one or more lines.
|
||||
(@pxref{Menu Bar}). The default is 1 if Menu Bar mode is enabled and 0
|
||||
otherwise. @xref{Menu Bars,,,emacs, The GNU Emacs Manual}. For an
|
||||
external menu bar (@pxref{Frame Layout}), this value remains unchanged
|
||||
even when the menu bar wraps to two or more lines. In that case, the
|
||||
@code{menu-bar-size} value returned by @code{frame-geometry}
|
||||
(@pxref{Frame Geometry}) can be used to establish whether the menu bar
|
||||
actually occupies one or more lines. This parameter affects the
|
||||
presence of a menu bar on the root frame (@pxref{Child Frames}) of a
|
||||
text terminal too. On a text terminal the value may be only 0 or 1.
|
||||
|
||||
@vindex tool-bar-lines@r{, a frame parameter}
|
||||
@item tool-bar-lines
|
||||
|
|
@ -1976,7 +2018,8 @@ than Nextstep, and @code{left} or @code{right} on builds using GTK+.
|
|||
The number of lines to use for the tab bar (@pxref{Tab Bars,,,emacs, The
|
||||
GNU Emacs Manual}). The default is one if Tab Bar mode is enabled and
|
||||
zero otherwise. This value may change whenever the tab bar wraps
|
||||
(@pxref{Frame Layout}).
|
||||
(@pxref{Frame Layout}). This parameter affects the presence of a tab
|
||||
bar on the root frame (@pxref{Child Frames}) of a text terminal too.
|
||||
|
||||
@vindex line-spacing@r{, a frame parameter}
|
||||
@item line-spacing
|
||||
|
|
@ -1991,11 +2034,11 @@ displayed by this frame. This is useful to eliminate such glyphs when
|
|||
fitting a frame to its buffer via @code{fit-frame-to-buffer}
|
||||
(@pxref{Resizing Windows}). This frame parameter has effect only for
|
||||
GUI frames shown on graphical displays, and only if the fringes are
|
||||
disabled. This parameter is intended as a purely-presentation
|
||||
feature, and in particular should not be used for frames where the
|
||||
user can interactively insert text, or more generally where the cursor
|
||||
is shown. A notable example of frames where this is used is tooltip
|
||||
frames (@pxref{Tooltips}).
|
||||
disabled. This parameter is intended as a purely-presentation feature,
|
||||
and in particular should not be used for frames where the user can
|
||||
interactively insert text, or more generally where the cursor is shown.
|
||||
A notable example of frames where this is used is tooltip frames
|
||||
(@pxref{Tooltips}). This parameter affects text terminals as well.
|
||||
@end table
|
||||
|
||||
|
||||
|
|
@ -2028,7 +2071,9 @@ The special value @code{child-frame} means to make a minibuffer-only
|
|||
child frame (@pxref{Child Frames}) whose parent becomes the frame
|
||||
created. As if specified as @code{nil}, Emacs will set this parameter
|
||||
to the minibuffer window of the child frame but will not select the
|
||||
child frame after its creation.
|
||||
child frame after its creation. The value @code{child-frame} has no
|
||||
effect on text terminals where you have to create a minibuffer-only
|
||||
frame manually (@pxref{Child Frame Peculiarities}).
|
||||
|
||||
@vindex buffer-predicate@r{, a frame parameter}
|
||||
@item buffer-predicate
|
||||
|
|
@ -2058,6 +2103,12 @@ If non-@code{nil}, this frame's window is never split automatically.
|
|||
These parameters supply forms of interactions between different frames.
|
||||
|
||||
@table @code
|
||||
@vindex visibility@r{, a frame parameter}
|
||||
@item visibility
|
||||
The state of visibility of the frame. There are three possibilities:
|
||||
@code{nil} for invisible, @code{t} for visible, and @code{icon} for
|
||||
iconified. @xref{Visibility of Frames}.
|
||||
|
||||
@vindex parent-frame@r{, a frame parameter}
|
||||
@item parent-frame
|
||||
If non-@code{nil}, this means that this frame is a child frame
|
||||
|
|
@ -2075,7 +2126,7 @@ Frames}.
|
|||
If non-@code{nil}, this parameter specifies the frame whose windows will
|
||||
be scrolled whenever the mouse wheel is scrolled with the mouse pointer
|
||||
hovering over this frame, see @ref{Mouse Commands,,, emacs, The GNU
|
||||
Emacs Manual}.
|
||||
Emacs Manual}. This parameter has no meaning on a text terminal.
|
||||
|
||||
@vindex no-other-frame@r{, a frame parameter}
|
||||
@item no-other-frame
|
||||
|
|
@ -2089,7 +2140,8 @@ Commands,,, emacs, The GNU Emacs Manual}.
|
|||
When this parameter specifies a function, that function will be called
|
||||
instead of the function specified by the variable
|
||||
@code{frame-auto-hide-function} when quitting the frame's only window
|
||||
(@pxref{Quitting Windows}) and there are other frames left.
|
||||
(@pxref{Quitting Windows}) and there are other frames left. This
|
||||
parameter has not been yet implemented on text terminals.
|
||||
|
||||
@vindex minibuffer-exit@r{, a frame parameter}
|
||||
@item minibuffer-exit
|
||||
|
|
@ -2098,7 +2150,8 @@ frame invisible whenever the minibuffer (@pxref{Minibuffers}) is exited.
|
|||
Alternatively, it can specify the functions @code{iconify-frame} and
|
||||
@code{delete-frame}. This parameter is useful to make a child frame
|
||||
disappear automatically (similar to how Emacs deals with a window) when
|
||||
exiting the minibuffer.
|
||||
exiting the minibuffer. This parameter has not been yet implemented on
|
||||
text terminals.
|
||||
|
||||
@vindex keep-ratio@r{, a frame parameter}
|
||||
@item keep-ratio
|
||||
|
|
@ -2120,7 +2173,8 @@ either @code{t} or @code{width-only}. The height ratio is preserved if
|
|||
the @sc{car} of the cell is either @code{t} or @code{height-only}. The
|
||||
left position ratio is preserved if the @sc{cdr} of the cell is either
|
||||
@code{t} or @code{left-only}. The top position ratio is preserved if
|
||||
the @sc{cdr} of the cell is either @code{t} or @code{top-only}.
|
||||
the @sc{cdr} of the cell is either @code{t} or @code{top-only}. This
|
||||
parameter has not been yet implemented on text terminals.
|
||||
@end table
|
||||
|
||||
|
||||
|
|
@ -2137,13 +2191,15 @@ or the mode line of its bottommost window.
|
|||
|
||||
These parameters are mostly useful for child frames (@pxref{Child
|
||||
Frames}) that come without window manager decorations. If necessary,
|
||||
they can be used for undecorated top-level frames as well.
|
||||
they can be used for undecorated top-level frames as well. On text
|
||||
terminals these parameters affect child frames only.
|
||||
|
||||
@table @code
|
||||
@vindex drag-internal-border@r{, a frame parameter}
|
||||
@item drag-internal-border
|
||||
If non-@code{nil}, the frame can be resized by dragging its internal
|
||||
borders, if present, with the mouse.
|
||||
borders, if present, with the mouse. On text terminals, the decoration
|
||||
of a child frame must be dragged instead.
|
||||
|
||||
@vindex drag-with-header-line@r{, a frame parameter}
|
||||
@item drag-with-header-line
|
||||
|
|
@ -2200,12 +2256,6 @@ interaction with the window manager or window system. They have no
|
|||
effect on text terminals.
|
||||
|
||||
@table @code
|
||||
@vindex visibility@r{, a frame parameter}
|
||||
@item visibility
|
||||
The state of visibility of the frame. There are three possibilities:
|
||||
@code{nil} for invisible, @code{t} for visible, and @code{icon} for
|
||||
iconified. @xref{Visibility of Frames}.
|
||||
|
||||
@vindex auto-raise@r{, a frame parameter}
|
||||
@item auto-raise
|
||||
If non-@code{nil}, Emacs automatically raises the frame when it is
|
||||
|
|
@ -2304,21 +2354,6 @@ will not be able to receive any keyboard input from the user, not even
|
|||
if the user switches to the frame using the key combination
|
||||
@kbd{Alt-@key{TAB}}.
|
||||
|
||||
@vindex undecorated@r{, a frame parameter}
|
||||
@item undecorated
|
||||
If non-@code{nil}, this frame's window-system window is drawn without
|
||||
decorations, like the title, minimize/maximize boxes and external
|
||||
borders. This usually means that the window cannot be dragged, resized,
|
||||
iconified, maximized or deleted with the mouse. If @code{nil}, the frame's
|
||||
window is usually drawn with all the elements listed above unless their
|
||||
display has been suspended via window manager settings.
|
||||
|
||||
Under X, Emacs uses the Motif window manager hints to turn off
|
||||
decorations. Some window managers may not honor these hints.
|
||||
|
||||
NS builds consider the tool bar to be a decoration, and therefore hide
|
||||
it on an undecorated frame.
|
||||
|
||||
@vindex override-redirect@r{, a frame parameter}
|
||||
@item override-redirect
|
||||
@cindex override redirect frames
|
||||
|
|
@ -3240,33 +3275,50 @@ window managers refer to this state as @dfn{minimized} rather than
|
|||
@dfn{iconified}, but from Emacs's point of view they are the same thing).
|
||||
If a frame is invisible, it is not displayed at all.
|
||||
|
||||
On a text terminal a frame may be only visible or invisible. The top
|
||||
frame (@pxref{Frames}) of a terminal cannot be invisible.
|
||||
|
||||
@cindex mapped frame
|
||||
@cindex unmapped frame
|
||||
The concept of visibility is strongly related to that of (un-)mapped
|
||||
frames. A frame (or, more precisely, its window-system window) is and
|
||||
becomes @dfn{mapped} when it is displayed for the first time and
|
||||
whenever it changes its state of visibility from @code{iconified} or
|
||||
@code{invisible} to @code{visible}. Conversely, a frame is and becomes
|
||||
@dfn{unmapped} whenever it changes its status from @code{visible} to
|
||||
@code{iconified} or @code{invisible}.
|
||||
|
||||
Visibility is meaningless on text terminals, since only the selected
|
||||
frame is actually displayed in any case.
|
||||
On graphical displays the concept of visibility is strongly related to
|
||||
that of (un-)mapped frames. A frame (or, more precisely, its
|
||||
window-system window) is and becomes @dfn{mapped} when it is displayed
|
||||
for the first time and whenever it changes its state of visibility from
|
||||
@code{iconified} or @code{invisible} to @code{visible}. Conversely, a
|
||||
frame is and becomes @dfn{unmapped} whenever it changes its status from
|
||||
@code{visible} to @code{iconified} or @code{invisible}.
|
||||
|
||||
@defun frame-visible-p frame
|
||||
This function returns the visibility status of frame @var{frame}. The
|
||||
value is @code{t} if @var{frame} is visible, @code{nil} if it is
|
||||
invisible, and @code{icon} if it is iconified.
|
||||
|
||||
On a text terminal, all frames are considered visible for the
|
||||
purposes of this function, even though only one frame is displayed.
|
||||
@xref{Raising and Lowering}.
|
||||
Note that the visibility status of a frame as reported by this function
|
||||
(and by the @code{visibility} frame parameter, @pxref{Frame Interaction
|
||||
Parameters}) does not necessarily tell whether the frame is actually
|
||||
seen on display. Any such frame can be partially or completely obscured
|
||||
by other window manager windows on the same graphical terminal. Whether
|
||||
that completely hides the frame may then depend on the transparency of
|
||||
the obscuring window. A frame may also reside on a virtual desktop
|
||||
different from the current one and can be seen only when making that
|
||||
desktop the current one. One notable restriction holds for child frames
|
||||
(@pxref{Child Frames}): A child frame can be seen if and only if this
|
||||
function returns true for all its ancestors including the frame itself
|
||||
and its root frame.
|
||||
|
||||
On a text terminal only that terminal's top frame and its child frames
|
||||
can be actually seen. Other root frames and their child frames cannot
|
||||
be seen even if they are considered visible by this function.
|
||||
@end defun
|
||||
|
||||
@deffn Command iconify-frame &optional frame
|
||||
This function iconifies frame @var{frame}. If you omit @var{frame}, it
|
||||
iconifies the selected frame. This usually makes all child frames of
|
||||
@var{frame} (and their descendants) invisible (@pxref{Child Frames}).
|
||||
iconifies the selected frame. This function also removes any child
|
||||
frames (@pxref{Child Frames}) of @var{frame} and their descendants from
|
||||
display. If @var{frame} is a child frame itself, the behavior depends
|
||||
on the value of the variable @code{iconify-child-frame}. If @var{frame}
|
||||
is the top frame of a text terminal (@pxref{Frames}), this function has
|
||||
no effect.
|
||||
@end deffn
|
||||
|
||||
@deffn Command make-frame-visible &optional frame
|
||||
|
|
@ -3275,8 +3327,8 @@ it makes the selected frame visible. This does not raise the frame, but
|
|||
you can do that with @code{raise-frame} if you wish (@pxref{Raising and
|
||||
Lowering}).
|
||||
|
||||
Making a frame visible usually makes all its child frames (and their
|
||||
descendants) visible as well (@pxref{Child Frames}).
|
||||
Making a frame visible makes all its child frames with visible ancestors
|
||||
appear on display again (@pxref{Child Frames}).
|
||||
@end deffn
|
||||
|
||||
@deffn Command make-frame-invisible &optional frame force
|
||||
|
|
@ -3286,11 +3338,19 @@ all child frames of @var{frame} (and their descendants) invisible too
|
|||
(@pxref{Child Frames}).
|
||||
|
||||
Unless @var{force} is non-@code{nil}, this function refuses to make
|
||||
@var{frame} invisible if all other frames are invisible.
|
||||
@var{frame} invisible if all other frames are invisible. On a text
|
||||
terminal this will make @var{frame} invisible if and only if it is a
|
||||
child frame or at least one other non-child frame (@pxref{Child Frames})
|
||||
on that terminal exists. In the former case, if @var{frame} is
|
||||
selected, it will select the first visible ancestor of @var{frame}
|
||||
instead. In the latter case it will make another non-child frame on
|
||||
that terminal visible and the new top frame (@pxref{Frames}) of that
|
||||
terminal. In either case, it will remove all child frames with
|
||||
@var{frame} as their ancestor from display.
|
||||
@end deffn
|
||||
|
||||
The visibility status of a frame is also available as a frame
|
||||
parameter. You can read or change it as such. @xref{Management
|
||||
parameter. You can read or change it as such. @xref{Frame Interaction
|
||||
Parameters}. The user can also iconify and deiconify frames with the
|
||||
window manager. This happens below the level at which Emacs can exert
|
||||
any control, but Emacs does provide events that you can use to keep
|
||||
|
|
@ -3336,14 +3396,16 @@ This function raises frame @var{frame} (default, the selected frame)
|
|||
above all other frames belonging to the same or a lower z-group as
|
||||
@var{frame}. If @var{frame} is invisible or iconified, this makes it
|
||||
visible. If @var{frame} is a child frame (@pxref{Child Frames}), this
|
||||
raises @var{frame} above all other child frames of its parent.
|
||||
raises @var{frame} above all other child frames of its parent. For
|
||||
non-child frames on a text terminal this function has no effect.
|
||||
@end deffn
|
||||
|
||||
@deffn Command lower-frame &optional frame
|
||||
This function lowers frame @var{frame} (default, the selected frame)
|
||||
below all other frames belonging to the same or a higher z-group as
|
||||
@var{frame}. If @var{frame} is a child frame (@pxref{Child Frames}),
|
||||
this lowers @var{frame} below all other child frames of its parent.
|
||||
this lowers @var{frame} below all other child frames of its parent. For
|
||||
non-child frames on a text terminal this function has no effect.
|
||||
@end deffn
|
||||
|
||||
@defun frame-restack frame1 frame2 &optional above
|
||||
|
|
@ -3363,7 +3425,8 @@ true) that of @var{frame2}. Hence the position of @var{frame2} in its
|
|||
display's Z (stacking) order relative to all other frames excluding
|
||||
@var{frame1} remains unaltered.
|
||||
|
||||
Some window managers may refuse to restack windows.
|
||||
Some window managers may refuse to restack windows. This function has
|
||||
not been implemented on text terminals yet.
|
||||
@end defun
|
||||
|
||||
Note that the effect of restacking will only hold as long as neither of
|
||||
|
|
@ -3378,25 +3441,14 @@ function @code{frame-list-z-order} (@pxref{Finding All Frames}).
|
|||
|
||||
@defopt minibuffer-auto-raise
|
||||
If this is non-@code{nil}, activation of the minibuffer raises the frame
|
||||
that the minibuffer window is in.
|
||||
that the minibuffer window is in. This variable has no effect on text
|
||||
terminals.
|
||||
@end defopt
|
||||
|
||||
On window systems, you can also enable auto-raising (on frame
|
||||
selection) or auto-lowering (on frame deselection) using frame
|
||||
parameters. @xref{Management Parameters}.
|
||||
|
||||
@cindex top frame
|
||||
The concept of raising and lowering frames also applies to text
|
||||
terminal frames. On each text terminal, only the top frame is
|
||||
displayed at any one time.
|
||||
|
||||
@defun tty-top-frame &optional terminal
|
||||
This function returns the top frame on @var{terminal}. @var{terminal}
|
||||
should be a terminal object, a frame (meaning that frame's terminal),
|
||||
or @code{nil} (meaning the selected frame's terminal). If it does not
|
||||
refer to a text terminal, the return value is @code{nil}.
|
||||
@end defun
|
||||
|
||||
|
||||
@node Frame Configurations
|
||||
@section Frame Configurations
|
||||
|
|
@ -3425,7 +3477,6 @@ unwanted frames are iconified instead.
|
|||
@node Child Frames
|
||||
@section Child Frames
|
||||
@cindex child frames
|
||||
@cindex parent frames
|
||||
|
||||
Child frames are objects halfway between windows (@pxref{Windows}) and
|
||||
``normal'' frames. Like windows, they are attached to an owning frame.
|
||||
|
|
@ -3438,26 +3489,39 @@ with the help of frame parameters (@pxref{Frame Parameters}) without any
|
|||
specialized functions or customizable variables. Child frames
|
||||
are meaningful on graphical and text terminals.
|
||||
|
||||
To create a new child frame or to convert a normal frame into a child
|
||||
@menu
|
||||
* Child Frame Operations:: Making and investigating child frames.
|
||||
* Child Frame Properties:: Special properties of child frames.
|
||||
* Child Frame Peculiarities:: Deviant behaviors of child frames.
|
||||
@end menu
|
||||
|
||||
@node Child Frame Operations
|
||||
@subsection Child Frame Operations
|
||||
|
||||
To create a new child frame or to convert a normal frame into a child
|
||||
frame, set that frame's @code{parent-frame} parameter (@pxref{Frame
|
||||
Interaction Parameters}) to that of an already existing frame. The
|
||||
frame specified by that parameter will then be the frame's parent frame
|
||||
as long as the parameter is not changed or reset. Technically, this
|
||||
makes the child frame's window-system window a child window of the
|
||||
parent frame's window-system window.
|
||||
as long as the parameter is not changed or reset. Technically, on a GUI
|
||||
this makes the child frame's window-system window a child window of the
|
||||
parent frame's window-system window. On a text terminal, this makes the
|
||||
frame usually appear on the same terminal as its parent frame, obscuring
|
||||
some part of it.
|
||||
|
||||
@cindex reparent frame
|
||||
@cindex nest frame
|
||||
The @code{parent-frame} parameter can be changed at any time.
|
||||
Setting it to another frame @dfn{reparents} the child frame. Setting
|
||||
it to another child frame makes the frame a @dfn{nested} child frame.
|
||||
Setting it to @code{nil} restores the frame's status as a top-level
|
||||
frame---a frame whose window-system window is a child of its display's
|
||||
root window.@footnote{On Haiku, child frames are only visible when a
|
||||
parent frame is active, owing to a limitation of the Haiku windowing
|
||||
system. Owing to the same limitation, child frames are only
|
||||
guaranteed to appear above their top-level parent; that is to say, the
|
||||
top-most frame in the hierarchy, which does not have a parent frame.}
|
||||
@cindex reparenting frames
|
||||
@cindex nesting frames
|
||||
@cindex top-level frame
|
||||
The @code{parent-frame} parameter can be changed at any time. Setting
|
||||
it to another frame @dfn{reparents} the child frame. Setting it to
|
||||
another child frame makes the frame a @dfn{nested} child frame. Setting
|
||||
it to @code{nil} restores the frame's status as a top-level frame---a
|
||||
frame whose window-system window is a child of its display's root
|
||||
window.@footnote{On Haiku, child frames are only visible when a parent
|
||||
frame is active, owing to a limitation of the Haiku windowing system.
|
||||
Owing to the same limitation, child frames are only guaranteed to appear
|
||||
above their top-level parent; that is to say, the top-most frame in the
|
||||
hierarchy, which does not have a parent frame.} On text terminals,
|
||||
top-level frames are called root frames (see below).
|
||||
|
||||
Since child frames can be arbitrarily nested, a frame can be both a
|
||||
child and a parent frame. Also, the relative roles of child and parent
|
||||
|
|
@ -3466,16 +3530,69 @@ keep the size of a child frame sufficiently smaller than that of its
|
|||
parent). An error will be signaled for the attempt to make a frame an
|
||||
ancestor of itself.
|
||||
|
||||
Most window-systems clip a child frame at the native edges
|
||||
(@pxref{Frame Geometry}) of its parent frame---everything outside these
|
||||
edges is usually invisible. A child frame's @code{left} and @code{top}
|
||||
When a parent frame is about to be deleted (@pxref{Deleting Frames}),
|
||||
its child frames are recursively deleted before it. There is one
|
||||
exception to this rule: When the child frame serves as a surrogate
|
||||
minibuffer frame (@pxref{Minibuffers and Frames}) for another frame, it
|
||||
is retained until the parent frame has been deleted. If, at this time,
|
||||
no remaining frame uses the child frame as its minibuffer frame, Emacs
|
||||
will try to delete the child frame too. If that deletion fails for
|
||||
whatever reason, the child frame is made a top-level frame. Since on
|
||||
text terminals no such conversion is possible, deleting a frame may
|
||||
throw an error if a surrogate minibuffer frame to be deleted is used by
|
||||
a frame that will not be deleted too.
|
||||
|
||||
The following three functions help to understand how parent and child
|
||||
frames related to each other.
|
||||
|
||||
@defun frame-parent &optional frame
|
||||
This function returns the parent frame of @var{frame}. It returns
|
||||
@code{nil} if @var{frame} has no parent frame.
|
||||
@end defun
|
||||
|
||||
@cindex ancestor frame
|
||||
@cindex descendant frame
|
||||
@defun frame-ancestor-p ancestor descendant
|
||||
This functions returns non-@code{nil} if @var{ancestor} is an ancestor
|
||||
of @var{descendant}. @var{ancestor} is an ancestor of @var{descendant}
|
||||
when it is either @var{descendant}'s parent frame or it is an ancestor
|
||||
of @var{descendant}'s parent frame. Both, @var{ancestor} and
|
||||
@var{descendant} must specify live frames.
|
||||
@end defun
|
||||
|
||||
@cindex root frame
|
||||
@defun frame-root-frame &optional frame
|
||||
This function returns the root frame of the specified @var{frame}.
|
||||
@var{frame} must be a live frame and defaults to the selected one. The
|
||||
root frame of @var{frame} is the frame obtained by following the chain
|
||||
of parent frames starting with @var{frame} until a frame is reached that
|
||||
has no parent. If @var{frame} has no parent, its root frame is
|
||||
@var{frame} itself.
|
||||
@end defun
|
||||
|
||||
On a text terminal, a root frame is always positioned at the top left
|
||||
edge of its terminal and always occupies the full size of its terminal.
|
||||
|
||||
|
||||
@node Child Frame Properties
|
||||
@subsection Child Frame Properties
|
||||
|
||||
Most window-systems clip child frames at the native edges (@pxref{Frame
|
||||
Geometry}) of their parent frame---everything outside these edges is
|
||||
usually invisible. A child frame's @code{left} and @code{top}
|
||||
parameters specify a position relative to the top-left corner of its
|
||||
parent's native frame. When the parent frame is resized, this position
|
||||
remains conceptually unaltered.
|
||||
|
||||
NS builds do not clip child frames at the parent frame's edges,
|
||||
allowing them to be positioned so they do not obscure the parent frame
|
||||
while still being visible themselves.
|
||||
NS builds and text terminals do not clip child frames at the parent
|
||||
frame's edges, allowing them to be positioned so they do not obscure the
|
||||
parent frame while still being visible themselves.
|
||||
|
||||
Note also the function @code{window-largest-empty-rectangle}
|
||||
(@pxref{Coordinates and Windows}) which can be used to inscribe a child
|
||||
frame in the largest empty area of an existing window. This can be
|
||||
useful to avoid that a child frame obscures any text shown in that
|
||||
window.
|
||||
|
||||
Usually, moving a parent frame moves along all its child frames and
|
||||
their descendants as well, keeping their relative positions unaltered.
|
||||
|
|
@ -3497,24 +3614,21 @@ obscuring parts of it, except on NS builds where it may be positioned
|
|||
beneath the parent. This is comparable to the window-system window of a
|
||||
top-level frame which also always appears on top of its parent
|
||||
window---the desktop's root window. When a parent frame is iconified or
|
||||
made invisible (@pxref{Visibility of Frames}), its child frames are made
|
||||
invisible. When a parent frame is deiconified or made visible, its
|
||||
child frames are made visible.
|
||||
|
||||
When a parent frame is about to be deleted (@pxref{Deleting
|
||||
Frames}), its child frames are recursively deleted before it. There
|
||||
is one exception to this rule: When the child frame serves as a
|
||||
surrogate minibuffer frame (@pxref{Minibuffers and Frames}) for
|
||||
another frame, it is retained until the parent frame has been deleted.
|
||||
If, at this time, no remaining frame uses the child frame as its
|
||||
minibuffer frame, Emacs will try to delete the child frame too. If
|
||||
that deletion fails for whatever reason, the child frame is made a
|
||||
top-level frame.
|
||||
made invisible (@pxref{Visibility of Frames}), any child frames
|
||||
descending from it will not be shown either even if
|
||||
@code{frame-visible-p} returns @code{t} for them. When a parent frame
|
||||
is deiconified or made visible, any child frames descending from it will
|
||||
be shown again (provided they and all their ancestor frames are visible
|
||||
too). If a child frame is used as surrogate minibuffer frame
|
||||
(@pxref{Minibuffers and Frames}), it's up to the application to
|
||||
guarantee the frame's visibility whenever the minibuffer is activated.
|
||||
|
||||
Whether a child frame can have a menu or tool bar is window-system or
|
||||
window manager dependent. Most window-systems explicitly disallow menu
|
||||
bars for child frames. It seems advisable to disable both, menu and
|
||||
tool bars, via the frame's initial parameters settings.
|
||||
tool bars, via the frame's initial parameters settings. On a text
|
||||
terminal, child frames use the menu bar of their root frame (provided it
|
||||
has one).
|
||||
|
||||
Usually, child frames do not exhibit window manager decorations like a
|
||||
title bar or external borders (@pxref{Frame Geometry}). When the child
|
||||
|
|
@ -3526,15 +3640,18 @@ outer border can be used. On MS-Windows, specifying a non-zero outer
|
|||
border width will show a one-pixel wide external border. Under all
|
||||
window-systems, the internal border can be used. In either case, it's
|
||||
advisable to disable a child frame's window manager decorations with the
|
||||
@code{undecorated} frame parameter (@pxref{Management Parameters}).
|
||||
@code{undecorated} frame parameter (@pxref{Management Parameters}). On
|
||||
a text terminal, on the other hand, it's better to leave that parameter
|
||||
alone so your child frame will be drawn with an outer border.
|
||||
|
||||
To resize or move an undecorated child frame with the mouse, special
|
||||
To resize or move a border-less child frame with the mouse, special
|
||||
frame parameters (@pxref{Mouse Dragging Parameters}) have to be used.
|
||||
The internal border of a child frame, if present, can be used to resize
|
||||
the frame with the mouse, provided that frame has a non-@code{nil}
|
||||
@code{drag-internal-border} parameter. If set, the @code{snap-width}
|
||||
parameter indicates the number of pixels where the frame @dfn{snaps} at
|
||||
the respective edge or corner of its parent frame.
|
||||
the respective edge or corner of its parent frame. On a text terminal,
|
||||
the outer border can used for resizing.
|
||||
|
||||
There are two ways to drag an entire child frame with the mouse: The
|
||||
@code{drag-with-mode-line} parameter, if non-@code{nil}, enables
|
||||
|
|
@ -3578,8 +3695,12 @@ to display completions in a separate window, the @code{minibuffer-exit}
|
|||
parameter (@pxref{Frame Interaction Parameters}) is useful in order to
|
||||
deal with the frame when the minibuffer is exited.
|
||||
|
||||
The behavior of child frames deviates from that of top-level frames in
|
||||
a number of other ways as well. Here we sketch a few of them:
|
||||
|
||||
@node Child Frame Peculiarities
|
||||
@subsection Child Frame Peculiarities
|
||||
|
||||
The behavior of child frames deviates from that of normal frames in a
|
||||
number of peculiar ways. Here we sketch a few of them:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
|
|
@ -3595,7 +3716,7 @@ described below.
|
|||
Raising, lowering and restacking child frames (@pxref{Raising and
|
||||
Lowering}) or changing the @code{z-group} (@pxref{Position Parameters})
|
||||
of a child frame changes only the stacking order of child frames with
|
||||
the same parent.
|
||||
the same parent. Restacking has not been implemented on text terminals.
|
||||
|
||||
@item
|
||||
Many window-systems are not able to change the opacity (@pxref{Font and
|
||||
|
|
@ -3618,43 +3739,6 @@ work on all window-systems. Some will drop the object on the parent
|
|||
frame or on some ancestor instead.
|
||||
@end itemize
|
||||
|
||||
The following three functions can be useful when working with child and
|
||||
parent frames:
|
||||
|
||||
@defun frame-parent &optional frame
|
||||
This function returns the parent frame of @var{frame}. The parent frame
|
||||
of @var{frame} is the Emacs frame whose window-system window is the
|
||||
parent window of @var{frame}'s window-system window. If such a frame
|
||||
exists, @var{frame} is considered a child frame of that frame.
|
||||
|
||||
This function returns @code{nil} if @var{frame} has no parent frame.
|
||||
@end defun
|
||||
|
||||
@cindex ancestor frame
|
||||
@defun frame-ancestor-p ancestor descendant
|
||||
This functions returns non-@code{nil} if @var{ancestor} is an ancestor
|
||||
of @var{descendant}. @var{ancestor} is an ancestor of @var{descendant}
|
||||
when it is either @var{descendant}'s parent frame or it is an ancestor
|
||||
of @var{descendant}'s parent frame. Both, @var{ancestor} and
|
||||
@var{descendant} must specify live frames.
|
||||
@end defun
|
||||
|
||||
@cindex root frame
|
||||
@defun frame-root-frame &optional frame
|
||||
This function returns the root frame of the specified @var{frame}.
|
||||
@var{frame} must be a live frame and defaults to the selected one. The
|
||||
root frame of @var{frame} is the frame obtained by following the chain
|
||||
of parent frames starting with @var{frame} until a frame is reached that
|
||||
has no parent. If @var{frame} has no parent, its root frame is
|
||||
@var{frame} itself.
|
||||
@end defun
|
||||
|
||||
Note also the function @code{window-largest-empty-rectangle}
|
||||
(@pxref{Coordinates and Windows}) which can be used to inscribe a child
|
||||
frame in the largest empty area of an existing window. This can be
|
||||
useful to avoid that a child frame obscures any text shown in that
|
||||
window.
|
||||
|
||||
Customizing the following option can be useful to tweak the behavior of
|
||||
@code{iconify-frame} for child frames.
|
||||
|
||||
|
|
@ -3662,16 +3746,81 @@ Customizing the following option can be useful to tweak the behavior of
|
|||
This option tells Emacs how to proceed when it is asked to iconify a
|
||||
child frame. If it is @code{nil}, @code{iconify-frame} will do nothing
|
||||
when invoked on a child frame. If it is @code{iconify-top-level}, Emacs
|
||||
will try to iconify the top-level frame that is the ancestor of this
|
||||
child frame instead. If it is @code{make-invisible}, Emacs will try to
|
||||
make this child frame invisible instead of iconifying it.
|
||||
will try to iconify the root frame of this child frame instead. If it
|
||||
is @code{make-invisible}, Emacs will try to make this child frame
|
||||
invisible instead of iconifying it.
|
||||
|
||||
Any other value means to try iconifying the child frame. Since such an
|
||||
attempt may not be honored by all window managers and can even lead to
|
||||
making the child frame unresponsive to user actions, the default is to
|
||||
iconify the top level frame instead.
|
||||
iconify the root frame instead.
|
||||
|
||||
On a text terminal the only feasible values are @code{nil} and
|
||||
@code{make-invisible}.
|
||||
@end defopt
|
||||
|
||||
On text terminals exist a few restrictions with respect to reparenting:
|
||||
One is that a top frame (@pxref{Frames}) cannot be directly made a child
|
||||
frame---you first have to make another root frame the new top frame of
|
||||
its terminal. If, on the other hand, you want a child frame to become
|
||||
the new top frame of its terminal, you have to make it a root frame
|
||||
first.
|
||||
|
||||
Also, the surrogate minibuffer window of any frame on a text terminal
|
||||
must reside on a frame with the same root frame. Reparenting will throw
|
||||
an error whenever it violates this restriction. It also means that it's
|
||||
more tricky to make a minibuffer-less frame whose minibuffer window
|
||||
resides on a minibuffer-only child frame. On a GUI, Emacs proceeds as
|
||||
follows when a user has specified the value @code{child-frame} for the
|
||||
@code{minibuffer} parameter in @code{initial-frame-alist}
|
||||
(@pxref{Initial Parameters}):
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Create a minibuffer-only frame.
|
||||
|
||||
@item
|
||||
Create a minibuffer-less frame with its @code{minibuffer} parameter set
|
||||
to the window of the minibuffer-only frame.
|
||||
|
||||
@item
|
||||
Make the minibuffer-less frame the parent frame of the minibuffer-only
|
||||
frame.
|
||||
|
||||
@item
|
||||
Delete the originally selected frame.
|
||||
@end enumerate
|
||||
|
||||
On a text terminal you have to perform these operations manually as
|
||||
sketched in the following snippet:
|
||||
|
||||
@example
|
||||
@group
|
||||
(let* ((selected (selected-frame))
|
||||
(mini-only
|
||||
(make-frame
|
||||
`((parent-frame . ,selected)
|
||||
(minibuffer . only)
|
||||
(left . 1) (top . -1) (width . 20) (height . 1))))
|
||||
(mini-less
|
||||
(make-frame
|
||||
(append `((parent-frame . ,selected)
|
||||
(minibuffer . ,(minibuffer-window mini-only)))))))
|
||||
(set-frame-parameter mini-only 'parent-frame mini-less)
|
||||
(set-frame-parameter mini-less 'parent-frame nil)
|
||||
(select-frame mini-less)
|
||||
(delete-frame selected))
|
||||
@end group
|
||||
@end example
|
||||
|
||||
This means that you first have to install the minibuffer-less and the
|
||||
minibuffer-only frames both as child frames of the selected frame with
|
||||
the @code{minibuffer} parameter of the minibuffer-less frame set to the
|
||||
minibuffer window of the minibuffer-only frame. Then make the
|
||||
minibuffer-only frame a child frame of the minibuffer-less frame and
|
||||
make the minibuffer-less frame a new root frame. Finally, select the
|
||||
minibuffer-less frame and delete the originally selected frame.
|
||||
|
||||
|
||||
@node Mouse Tracking
|
||||
@section Mouse Tracking
|
||||
|
|
|
|||
|
|
@ -846,12 +846,21 @@ variable @code{find-function-regexp-alist}.
|
|||
|
||||
@vindex @code{find-function-regexp-alist}
|
||||
The alist @code{find-function-regexp-alist} associates object types with
|
||||
a regexp or function that finds the definition of that object in its
|
||||
source file. Each element's car is a symbol the describes the type of
|
||||
object, or @code{nil} to identify functions defined with @code{defun}.
|
||||
Each element's cdr is a symbol: either the value of that symbol is a
|
||||
string interpreted as a regexp, or that symbol names a function that can
|
||||
find the definition.
|
||||
a regexp or a function that finds the definition of that object in its
|
||||
source file. Each element's @code{car} is a symbol that describes the
|
||||
type of object, or @code{nil}, which means a function defined with
|
||||
@code{defun}. Each element's @code{cdr} can be one of the following:
|
||||
|
||||
@itemize
|
||||
@item
|
||||
A symbol whose value is a string interpreted as a regexp.
|
||||
@item
|
||||
A symbol naming a function that can find the definition.
|
||||
@item
|
||||
A cons cell where the @code{car} is a regexp (or function that returns
|
||||
one) and the @code{cdr} is @dfn{form-matcher}: a function that creates a
|
||||
matcher for macro-expanded forms.
|
||||
@end itemize
|
||||
|
||||
A regexp string is actually a format string, and @code{%s} will be
|
||||
substituted with the name of the symbol we are looking for.
|
||||
|
|
@ -859,6 +868,12 @@ substituted with the name of the symbol we are looking for.
|
|||
A function will be called with one argument, the (symbol for) the object
|
||||
we are searching for.
|
||||
|
||||
The form-matcher function in a cons cell value is called with one
|
||||
argument (the symbol being sought) and should return a function; that
|
||||
function should take a form and return non-@code{nil} if the form
|
||||
defines the sought symbol. This is useful for finding definitions that
|
||||
are created by expansion of macros.
|
||||
|
||||
@cindex @code{definition-name} (symbol property)
|
||||
If the function to be found is defined by a macro, it may be hard for
|
||||
Emacs to find the definition site in the source code. A macro call may
|
||||
|
|
@ -2828,24 +2843,27 @@ for the code emitted for the function (@pxref{Native-Compilation
|
|||
Variables}).
|
||||
|
||||
@cindex function type declaration
|
||||
@cindex inferred type of function
|
||||
@item (ftype @var{type} &optional @var{function})
|
||||
Declare @var{type} to be the type of this function. This is used for
|
||||
documentation by @code{describe-function}. Also it can be used by the
|
||||
native compiler (@pxref{Native Compilation}) for improving code
|
||||
generation and for deriving more precisely the type of other functions
|
||||
without type declaration.
|
||||
Declare @var{type} to be the type of this function. This type is used
|
||||
by @code{describe-function} for documentation, and by the native
|
||||
compiler (@pxref{Native Compilation}) for optimizing code generation and
|
||||
inferring types. Incorrect type declarations may cause crashes in
|
||||
natively compiled code (see below). Functions with type declarations
|
||||
are shown by @kbd{C-h C-f} as having a @dfn{declared type}, as opposed
|
||||
to an @dfn{inferred type} for functions without them.
|
||||
|
||||
@var{type} is a @dfn{type specifier} (@pxref{Type Specifiers}) in the
|
||||
@var{type} is a @dfn{type specifier} (@pxref{Type Specifiers}) of the
|
||||
form @w{@code{(function (@var{arg-1-type} @dots{} @var{arg-n-type})
|
||||
RETURN-TYPE)}}. Argument types can be interleaved with symbols
|
||||
@code{&optional} and @code{&rest} to match the function's arguments
|
||||
RETURN-TYPE)}}. Argument types can be interleaved with @code{&optional}
|
||||
and @code{&rest} to reflect the function's calling convention
|
||||
(@pxref{Argument List}).
|
||||
|
||||
@var{function} if present should be the name of function being defined.
|
||||
|
||||
Here's an example of using @code{ftype} inside @code{declare} to declare
|
||||
a function @code{positive-p} that takes an argument of type @var{number}
|
||||
and return a @var{boolean}:
|
||||
Here's an example of using @code{ftype} inside @code{declare} to define
|
||||
a function @code{positive-p}, which takes an argument of type
|
||||
@var{number} and returns a @var{boolean}:
|
||||
|
||||
@lisp
|
||||
@group
|
||||
|
|
@ -2856,9 +2874,9 @@ and return a @var{boolean}:
|
|||
@end group
|
||||
@end lisp
|
||||
|
||||
Similarly this declares a function @code{cons-or-number} that: expects a
|
||||
first argument being a @var{cons} or a @var{number}, a second optional
|
||||
argument of type @var{string} and return one of the symbols
|
||||
Similarly, this defines a function @code{cons-or-number} that takes a
|
||||
first argument of type @var{cons} or a @var{number}, a second optional
|
||||
argument of type @var{string}, and returns one of the symbols
|
||||
@code{is-cons} or @code{is-number}:
|
||||
|
||||
@lisp
|
||||
|
|
@ -2876,13 +2894,12 @@ argument of type @var{string} and return one of the symbols
|
|||
|
||||
For description of additional types, see @ref{Lisp Data Types}).
|
||||
|
||||
Declaring a function with an incorrect type produces undefined behavior
|
||||
and could lead to unexpected results or might even crash Emacs when
|
||||
native-compiled code is loaded, if it was compiled with
|
||||
@code{compilation-safety} level of zero (@pxref{compilation-safety}).
|
||||
Note also that when redefining (or advising) a type-declared function,
|
||||
the replacement should respect the original signature to avoid such
|
||||
undefined behavior.
|
||||
Declaring a function with an incorrect type causes undefined behavior.
|
||||
If such a function is natively compiled with @code{compilation-safety}
|
||||
set to zero (@pxref{compilation-safety}), this may result in incorrect
|
||||
execution or even Emacs crashing when the compiled code is loaded.
|
||||
Redefining or advising a type-declared function must preserve the
|
||||
original signature to avoid these issues.
|
||||
|
||||
@item no-font-lock-keyword
|
||||
This is valid for macros only. Macros with this declaration are
|
||||
|
|
|
|||
|
|
@ -347,6 +347,11 @@ itself is copied---the keys and values are shared.
|
|||
This function returns the actual number of entries in @var{table}.
|
||||
@end defun
|
||||
|
||||
@defun hash-table-contains-p key table
|
||||
This returns non-@code{nil} if there is an association for @var{key} in
|
||||
@var{table}.
|
||||
@end defun
|
||||
|
||||
@defun hash-table-test table
|
||||
This returns the @var{test} value that was given when @var{table} was
|
||||
created, to specify how to hash and compare keys. See
|
||||
|
|
|
|||
|
|
@ -1508,12 +1508,14 @@ A type specifier is an expression that denotes a type. A type
|
|||
represents a set of possible values. Type specifiers can be classified
|
||||
into primitive types and compound types.
|
||||
|
||||
Type specifiers are in use for several purposes, including: documenting
|
||||
function interfaces through declaration (@pxref{Declare Form}),
|
||||
specifying structure slot values (@pxref{Structures,,, cl, Common Lisp
|
||||
Extensions for GNU Emacs Lisp}), type-checking through @code{cl-the}
|
||||
(@pxref{Declarations,,, cl, Common Lisp Extensions for GNU Emacs Lisp}),
|
||||
and others.
|
||||
Type specifiers are used for several purposes, including: documenting
|
||||
function interfaces through declarations (@pxref{Declare Form}),
|
||||
specifying structure slot types (@pxref{Structures,,, cl, Common Lisp
|
||||
Extensions for GNU Emacs Lisp}), performing type checks with
|
||||
@code{cl-the} (@pxref{Declarations,,, cl, Common Lisp Extensions for GNU
|
||||
Emacs Lisp}), and aiding the native compiler (@pxref{Native
|
||||
Compilation}) in optimizing code generation and inferring function
|
||||
signatures.
|
||||
|
||||
@table @asis
|
||||
@item Primitive type specifiers
|
||||
|
|
@ -1552,9 +1554,9 @@ types and the return type of a function. Argument types can be interleaved
|
|||
with symbols @code{&optional} and @code{&rest} to match the function's
|
||||
arguments (@pxref{Argument List}).
|
||||
|
||||
The type specifier represent a function whose first parameter is of type
|
||||
@code{symbol}, the second optional parameter is of type @code{float},
|
||||
and which returns an @code{integer}:
|
||||
The following type specifier represents a function whose first parameter
|
||||
is of type @code{symbol}, the second optional parameter is of type
|
||||
@code{float}, and which returns an @code{integer}:
|
||||
|
||||
@example
|
||||
(function (symbol &optional float) integer)
|
||||
|
|
|
|||
|
|
@ -141,9 +141,9 @@ Define @var{name} as an identifier for @var{rules}.
|
|||
@example
|
||||
@group
|
||||
(define-peg-ruleset number-grammar
|
||||
'((number sign digit (* digit))
|
||||
digit ;; A reference to the definition above.
|
||||
(sign (or "+" "-" ""))))
|
||||
;; `digit' here references the definition above.
|
||||
(number () sign digit (* digit))
|
||||
(sign () (or "+" "-" "")))
|
||||
@end group
|
||||
@end example
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,6 @@ the function returns just the value of the variable @code{exec-path}.
|
|||
@end defun
|
||||
|
||||
@cindex programs distributed with Emacs, starting
|
||||
@vindex ctags-program-name
|
||||
@vindex etags-program-name
|
||||
@vindex hexl-program-name
|
||||
@vindex emacsclient-program-name
|
||||
|
|
@ -197,11 +196,11 @@ the function returns just the value of the variable @code{exec-path}.
|
|||
must take into account that the program may have been renamed in order
|
||||
to comply with executable naming restrictions present on the system.
|
||||
|
||||
Instead of starting @command{ctags}, for example, you should specify
|
||||
the value of @code{ctags-program-name} instead. Likewise, instead of
|
||||
Instead of starting @command{emacsclient}, for example, you should specify
|
||||
the value of @code{emacsclient-program-name} instead. Likewise, instead of
|
||||
starting @command{movemail}, you must start
|
||||
@code{movemail-program-name}, and the same goes for @command{etags},
|
||||
@command{hexl}, @command{emacsclient}, @code{rcs2log}, and
|
||||
@command{hexl}, @code{rcs2log}, and
|
||||
@command{ebrowse}.
|
||||
|
||||
@node Shell Arguments
|
||||
|
|
|
|||
|
|
@ -4776,30 +4776,42 @@ all markers unrelocated.
|
|||
@node Replacing
|
||||
@section Replacing Buffer Text
|
||||
|
||||
You can use the following function to replace the text of one buffer
|
||||
with the text of another buffer:
|
||||
You can use the following function to replace some the text of the
|
||||
current buffer:
|
||||
|
||||
@deffn Command replace-buffer-contents source &optional max-secs max-costs
|
||||
This function replaces the accessible portion of the current buffer
|
||||
with the accessible portion of the buffer @var{source}. @var{source}
|
||||
may either be a buffer object or the name of a buffer. When
|
||||
@code{replace-buffer-contents} succeeds, the text of the accessible
|
||||
portion of the current buffer will be equal to the text of the
|
||||
accessible portion of the @var{source} buffer.
|
||||
@defun replace-region-contents beg end source &optional max-secs max-costs inherit
|
||||
This function replaces the region between @var{beg} and @var{end}
|
||||
of the current buffer with the text found in @var{source} which
|
||||
is usually a string or a buffer, in which case it will use the
|
||||
accessible portion of that buffer.
|
||||
|
||||
This function attempts to keep point, markers, text properties, and
|
||||
overlays in the current buffer intact. One potential case where this
|
||||
behavior is useful is external code formatting programs: they
|
||||
typically write the reformatted text into a temporary buffer or file,
|
||||
and using @code{delete-region} and @code{insert-buffer-substring}
|
||||
would destroy these properties. However, the latter combination is
|
||||
typically faster (@xref{Deletion}, and @ref{Insertion}).
|
||||
behavior is useful is external code formatting programs: they typically
|
||||
write the reformatted text into a temporary buffer or file, and using
|
||||
@code{insert} and @code{delete-region} would destroy these properties.
|
||||
|
||||
For its working, @code{replace-buffer-contents} needs to compare the
|
||||
contents of the original buffer with that of @var{source} which is a
|
||||
costly operation if the buffers are huge and there is a high number of
|
||||
differences between them. In order to keep
|
||||
@code{replace-buffer-contents}'s runtime in bounds, it has two
|
||||
However, in order to do that, @code{replace-region-contents} needs to
|
||||
compare the contents of the original buffer with that of @var{source},
|
||||
using a costly algorithm which makes the operation much slower than
|
||||
a simple @code{insert} and @code{delete-region}. In many cases, you may
|
||||
not need that refinement, and you will then want to pass 0 as
|
||||
@var{max-secs} argument, so as to short-circuit that costly algorithm:
|
||||
It will then be just as fast as @code{insert} and @code{delete-region}
|
||||
while still preserving point and markers marginally better.
|
||||
|
||||
Beyond that basic usage, if you need to use as source a subset of the
|
||||
accessible portion of a buffer, @var{source} can also be a vector
|
||||
@code{[@var{sbuf} @var{sbeg} @var{send}]} where the region between
|
||||
@var{sbeg} and @var{send} in buffer @var{sbuf} is the text
|
||||
you want to use as source.
|
||||
|
||||
If you need the inserted text to inherit text-properties
|
||||
from the adjoining text, you can pass a non-@code{nil} value as
|
||||
@var{inherit} argument.
|
||||
|
||||
When you do want the costly refined replacement, in order to keep
|
||||
@code{replace-region-contents}'s runtime in bounds, it has two
|
||||
optional arguments.
|
||||
|
||||
@var{max-secs} defines a hard boundary in terms of seconds. If given
|
||||
|
|
@ -4810,26 +4822,14 @@ and exceeded, it will fall back to @code{delete-region} and
|
|||
the actual costs exceed this limit, heuristics are used to provide a
|
||||
faster but suboptimal solution. The default value is 1000000.
|
||||
|
||||
@code{replace-buffer-contents} returns @code{t} if a non-destructive
|
||||
@code{replace-region-contents} returns @code{t} if a non-destructive
|
||||
replacement could be performed. Otherwise, i.e., if @var{max-secs}
|
||||
was exceeded, it returns @code{nil}.
|
||||
@end deffn
|
||||
|
||||
@defun replace-region-contents beg end replace-fn &optional max-secs max-costs
|
||||
This function replaces the region between @var{beg} and @var{end}
|
||||
using the given @var{replace-fn}. The function @var{replace-fn} is
|
||||
run in the current buffer narrowed to the specified region and it
|
||||
should return either a string or a buffer replacing the region.
|
||||
|
||||
The replacement is performed using @code{replace-buffer-contents} (see
|
||||
above) which also describes the @var{max-secs} and @var{max-costs}
|
||||
arguments and the return value.
|
||||
|
||||
Note: If the replacement is a string, it will be placed in a temporary
|
||||
buffer so that @code{replace-buffer-contents} can operate on it.
|
||||
Therefore, if you already have the replacement in a buffer, it makes
|
||||
no sense to convert it to a string using @code{buffer-substring} or
|
||||
similar.
|
||||
Note: When using the refined replacement algorithm, if the replacement
|
||||
is a string, it will be internally copied to a temporary buffer.
|
||||
Therefore, all else being equal, it is preferable to pass a buffer than
|
||||
a string as @var{source} argument.
|
||||
@end defun
|
||||
|
||||
@node Decompression
|
||||
|
|
|
|||
|
|
@ -2920,6 +2920,10 @@ the list stored in @var{place}. It is analogous to @code{(setf
|
|||
subforms. Note that @code{push} and @code{pop} on an @code{nthcdr}
|
||||
place can be used to insert or delete at any position in a list.
|
||||
|
||||
Similarly, the macros @code{incf} and @code{decf} (@pxref{Arithmetic
|
||||
Operations}) can be used to increment or decrement generalized
|
||||
variables that are numbers.
|
||||
|
||||
The @file{cl-lib} library defines various extensions for generalized
|
||||
variables, including additional @code{setf} places.
|
||||
@xref{Generalized Variables,,, cl, Common Lisp Extensions}.
|
||||
|
|
|
|||
|
|
@ -7000,6 +7000,12 @@ state will be written to disk and read back in another session.
|
|||
Together, the argument @var{writable} and the variable
|
||||
@code{window-persistent-parameters} specify which window parameters are
|
||||
saved by this function. @xref{Window Parameters}.
|
||||
|
||||
@vindex window-state-normalize-buffer-name
|
||||
Bind @code{window-state-normalize-buffer-name} to non-@code{nil} to
|
||||
normalize buffer names under @file{uniquify} management by removing its
|
||||
prefixes and suffixes. This helps restore window buffers across Emacs
|
||||
sessions. @xref{Uniquify,,, emacs, The GNU Emacs Manual}.
|
||||
@end defun
|
||||
|
||||
The value returned by @code{window-state-get} can be used in the same
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
.so man1/etags.1
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
.\" See section COPYING for copyright and redistribution information.
|
||||
.TH ETAGS 1 "2024-12-21" "GNU Tools" "GNU"
|
||||
.TH ETAGS 1 "2025-03-22" "GNU Tools" "GNU"
|
||||
.de BP
|
||||
.sp
|
||||
.ti -.2i
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
..
|
||||
|
||||
.SH NAME
|
||||
etags, ctags \- generate tag file for Emacs, vi
|
||||
etags \- generate tag file for Emacs, vi
|
||||
.SH SYNOPSIS
|
||||
.hy 0
|
||||
.na
|
||||
|
|
@ -27,7 +27,7 @@ etags, ctags \- generate tag file for Emacs, vi
|
|||
[\|\-\-help\|] [\|\-\-version\|]
|
||||
\fIfile\fP .\|.\|.
|
||||
|
||||
\fBctags\fP [\|\-aCdgIQRVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|]
|
||||
\fBetags \-\-ctags\fP [\|\-aCdgIQRVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|]
|
||||
.if n .br
|
||||
[\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|]
|
||||
[\|\-\-parse\-stdin=\fIfile\fP\|]
|
||||
|
|
@ -47,17 +47,18 @@ etags, ctags \- generate tag file for Emacs, vi
|
|||
The \|\fBetags\fP\| program is used to create a tag table file, in a format
|
||||
understood by
|
||||
.BR emacs ( 1 )\c
|
||||
\&; the \|\fBctags\fP\| program is used to create a similar table in a
|
||||
\&; if the first argument is the obsolescent option \|\fB\-\-ctags\fP\|
|
||||
the program instead creates a similar table in a
|
||||
format understood by
|
||||
.BR vi ( 1 )\c
|
||||
\&. Both forms of the program understand
|
||||
\&. The program understands
|
||||
the syntax of C, Objective C, C++, Java, Fortran, Ada, Cobol, Erlang,
|
||||
Forth, Go, HTML, LaTeX, Emacs Lisp/Common Lisp, Lua, Makefile, Mercury, Pascal,
|
||||
Perl, Ruby, Rust, PHP, PostScript, Python, Prolog, Scheme and most
|
||||
assembler\-like syntaxes.
|
||||
Both forms read the files specified on the command line, and write a tag
|
||||
table (defaults: \fBTAGS\fP for \fBetags\fP, \fBtags\fP for
|
||||
\fBctags\fP) in the current working directory.
|
||||
It reads the files specified on the command line, and write a tag
|
||||
table (default: \fBTAGS\fP, or \fBtags\fP if
|
||||
\fB\-\-ctags\fP is used) in the current working directory.
|
||||
Files specified with relative file names will be recorded in the tag
|
||||
table with file names relative to the directory where the tag table
|
||||
resides. If the tag table is in /dev or is the standard output,
|
||||
|
|
@ -73,8 +74,7 @@ parsing of the file names following the switch according to the given
|
|||
language, overriding guesses based on filename extensions.
|
||||
.SH OPTIONS
|
||||
Some options make sense only for the \fBvi\fP style tag files produced
|
||||
by ctags;
|
||||
\fBetags\fP does not recognize them.
|
||||
with the \fB\-\-ctags\fP option; they are ignored otherwise.
|
||||
The programs accept unambiguous abbreviations for long option names.
|
||||
.TP
|
||||
.B \-a, \-\-append
|
||||
|
|
@ -87,7 +87,7 @@ expression search instructions; the \fB\-B\fP option writes them using
|
|||
the delimiter "\|\fB?\fP\|", to search \fIbackwards\fP through files.
|
||||
The default is to use the delimiter "\|\fB/\fP\|", to search \fIforwards\fP
|
||||
through files.
|
||||
Only \fBctags\fP accepts this option.
|
||||
This option makes sense only if \fB\-\-ctags\fP is used.
|
||||
.TP
|
||||
.B \-\-declarations
|
||||
In C and derived languages, create tags for function declarations,
|
||||
|
|
@ -185,7 +185,7 @@ the previous ones. The regexps are of one of the forms:
|
|||
where \fItagregexp\fP is used to match the tag. It should not match
|
||||
useless characters. If the match is such that more characters than
|
||||
needed are unavoidably matched by \fItagregexp\fP, it may be useful to
|
||||
add a \fInameregexp\fP, to narrow down the tag scope. \fBctags\fP
|
||||
add a \fInameregexp\fP, to narrow down the tag scope. \fB\-\-ctags\fP
|
||||
ignores regexps without a \fInameregexp\fP. The syntax of regexps is
|
||||
the same as in Emacs, except that backslash escapes are the same
|
||||
as GNU grep (which means, for example, that shy groups are not supported),
|
||||
|
|
@ -281,15 +281,17 @@ tag entries for other files in place. Currently, this is implemented
|
|||
by deleting the existing entries for the given files and then
|
||||
rewriting the new entries at the end of the tags file. It is often
|
||||
faster to simply rebuild the entire tag file than to use this.
|
||||
Only \fBctags\fP accepts this option.
|
||||
This option makes sense only if \fB\-\-ctags\fP is used.
|
||||
.TP
|
||||
.B \-v, \-\-vgrind
|
||||
Instead of generating a tag file, write index (in \fBvgrind\fP format)
|
||||
to standard output. Only \fBctags\fP accepts this option.
|
||||
to standard output.
|
||||
This option makes sense only if \fB\-\-ctags\fP is used.
|
||||
.TP
|
||||
.B \-x, \-\-cxref
|
||||
Instead of generating a tag file, write a cross reference (in
|
||||
\fBcxref\fP format) to standard output. Only \fBctags\fP accepts this option.
|
||||
\fBcxref\fP format) to standard output.
|
||||
This option makes sense only if \fB\-\-ctags\fP is used.
|
||||
.TP
|
||||
.B \-h, \-H, \-\-help
|
||||
Print usage information. Followed by one or more \-\-language=LANG
|
||||
|
|
|
|||
|
|
@ -4316,6 +4316,9 @@ annotations. @ref{Java Symbols}.
|
|||
First line in a member initialization list. @ref{Class Symbols}.
|
||||
@item member-init-cont
|
||||
Subsequent member initialization list lines. @ref{Class Symbols}.
|
||||
@item class-field-cont
|
||||
Lines continuing the first line inside a class/struct etc. definition.
|
||||
@ref{Class Symbols}.
|
||||
@item inher-intro
|
||||
First line of a multiple inheritance list. @ref{Class Symbols}.
|
||||
@item inher-cont
|
||||
|
|
@ -4669,6 +4672,25 @@ elements:
|
|||
The @code{friend} and @code{inline-open} syntactic symbols are
|
||||
modifiers that do not have anchor positions.
|
||||
|
||||
@ssindex class-field-cont
|
||||
In the following example, line 1 gets the syntax @code{topmost-intro},
|
||||
and line 2 @code{((inclass 1) (topmost-intro 1))} as expected. Lines
|
||||
3, 4, and 5 are given the syntax @code{(class-field-cont 18 12)}
|
||||
rather than @code{topmost-intro-cont}. This makes it easier to indent
|
||||
several comma separated fields with respect to their defining type,
|
||||
when @code{topmost-intro-cont} would tend to leave elements directly
|
||||
underneath their type. @xref{Function Symbols}. The anchor points are
|
||||
the positions of the type and the enclosing class's brace.
|
||||
|
||||
@example
|
||||
1. struct foo @{
|
||||
2. long
|
||||
3. a,
|
||||
4. b,
|
||||
5. c;
|
||||
6. @};
|
||||
@end example
|
||||
|
||||
@ssindex template-args-cont
|
||||
Template definitions introduce yet another syntactic symbol:
|
||||
|
||||
|
|
|
|||
132
doc/misc/cl.texi
132
doc/misc/cl.texi
|
|
@ -97,7 +97,7 @@ As Emacs Lisp programmers have grown in number, and the applications
|
|||
they write have grown more ambitious, it has become clear that Emacs
|
||||
Lisp could benefit from many of the conveniences of Common Lisp.
|
||||
|
||||
The @dfn{CL} package adds a number of Common Lisp functions and
|
||||
The @dfn{CL-Lib} package adds a number of Common Lisp functions and
|
||||
control structures to Emacs Lisp. While not a 100% complete
|
||||
implementation of Common Lisp, it adds enough functionality
|
||||
to make Emacs Lisp programming significantly more convenient.
|
||||
|
|
@ -3928,45 +3928,74 @@ This is equivalent to @code{(nconc (cl-mapcar 'cons @var{keys} @var{values})
|
|||
The Common Lisp @dfn{structure} mechanism provides a general way
|
||||
to define data types similar to C's @code{struct} types. A
|
||||
structure is a Lisp object containing some number of @dfn{slots},
|
||||
each of which can hold any Lisp data object. Functions are
|
||||
provided for accessing and setting the slots, creating or copying
|
||||
structure objects, and recognizing objects of a particular structure
|
||||
type.
|
||||
each of which can hold any Lisp data object.
|
||||
|
||||
In true Common Lisp, each structure type is a new type distinct
|
||||
from all existing Lisp types. Since the underlying Emacs Lisp
|
||||
system provides no way to create new distinct types, this package
|
||||
implements structures as vectors (or lists upon request) with a
|
||||
special ``tag'' symbol to identify them.
|
||||
You can create a new structure with the @code{cl-defstruct} macro. This
|
||||
macro automatically generates functions to access and modify its slots,
|
||||
create or copy structure objects, and to test whether an object belongs
|
||||
to the defined structure type.
|
||||
|
||||
In standard Common Lisp, each structure type is a new type distinct from
|
||||
all existing Lisp types. However, because Emacs Lisp lacks native
|
||||
support for defining new distinct types, this package implements
|
||||
structures using vectors (or lists upon request) with a special ``tag''
|
||||
symbol that to identify them.
|
||||
|
||||
@defmac cl-defstruct name slots@dots{}
|
||||
The @code{cl-defstruct} form defines a new structure type called
|
||||
@var{name}, with the specified @var{slots}. (The @var{slots}
|
||||
may begin with a string which documents the structure type.)
|
||||
In the simplest case, @var{name} and each of the @var{slots}
|
||||
are symbols. For example,
|
||||
are symbols. For example, this is how you define a struct type called
|
||||
@code{person} that contains three slots:
|
||||
|
||||
@example
|
||||
@lisp
|
||||
(cl-defstruct person first-name age sex)
|
||||
@end example
|
||||
@end lisp
|
||||
|
||||
The @code{cl-defstruct} macro creates a new constructor function, such
|
||||
as @code{make-person} in this example, which returns a new struct
|
||||
instance. This constructor accepts keyword arguments that correspond to
|
||||
the specified slots, such as @code{:first-name}, @code{:age}, and
|
||||
@code{:sex}. These keyword arguments specify the initial values for the
|
||||
respective slots in the new object. If a keyword argument is not
|
||||
provided, the slot is initialized to @code{nil}.@footnote{This behavior
|
||||
differs from Common Lisp, where an unitialized slot would be left as
|
||||
``undefined''.}
|
||||
|
||||
In the example below, we create a new instance of the @code{person}
|
||||
struct, and store it in the variable @code{birthday-boy} for later use:
|
||||
|
||||
@lisp
|
||||
(setq birthday-boy
|
||||
(make-person :first-name "Peter" :age 23 :sex "male"))
|
||||
@result{} #s(person "Peter" 23 "male")
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
defines a struct type called @code{person} that contains three slots.
|
||||
Given a @code{person} object @var{p}, you can access those slots by
|
||||
calling @code{(person-first-name @var{p})}, @code{(person-age
|
||||
@var{p})}, and @code{(person-sex @var{p})}. You can also change these
|
||||
slots by using @code{setf} on any of these place forms, for example:
|
||||
calling @code{(person-first-name @var{p})}, @code{(person-age @var{p})},
|
||||
and @code{(person-sex @var{p})}.
|
||||
|
||||
@example
|
||||
You can also update the values of these slots using @code{setf} on any
|
||||
of these place forms, for example:
|
||||
|
||||
@lisp
|
||||
(setf (person-first-name birthday-boy) "Old Peter")
|
||||
@result{} "Old Peter"
|
||||
birthday-boy
|
||||
@result{} #s(person "Old Peter" 23 "male")
|
||||
@end lisp
|
||||
|
||||
Any macro that accepts a generalized variable can be used to modify
|
||||
struct fields (@pxref{Generalized Variables,,,elisp,GNU Emacs Lisp
|
||||
Reference Manual}). Here is an example using @code{incf}:
|
||||
|
||||
@lisp
|
||||
(incf (person-age birthday-boy))
|
||||
@end example
|
||||
|
||||
You can create a new @code{person} by calling @code{make-person},
|
||||
which takes keyword arguments @code{:first-name}, @code{:age}, and
|
||||
@code{:sex} to specify the initial values of these slots in the
|
||||
new object. (Omitting any of these arguments leaves the corresponding
|
||||
slot ``undefined'', according to the Common Lisp standard; in Emacs
|
||||
Lisp, such uninitialized slots are filled with @code{nil}.)
|
||||
@result{} 24
|
||||
birthday-boy
|
||||
@result{} #s(person "Old Peter" 24 "male")
|
||||
@end lisp
|
||||
|
||||
Given a @code{person}, @code{(copy-person @var{p})} makes a new
|
||||
object of the same type whose slots are @code{eq} to those of @var{p}.
|
||||
|
|
@ -4037,6 +4066,55 @@ A documentation string describing the slot.
|
|||
|
||||
Other slot options are currently ignored.
|
||||
|
||||
@defmac cl-with-accessors name bindings body@dots{}
|
||||
You can use @code{cl-with-accessors} to lexically define symbols as
|
||||
expressions calling the given accessor functions on a single instance of
|
||||
a structure or class defined by @code{cl-defstruct} or @code{defclass}
|
||||
(@pxref{Building Classes,,,eieio,EIEIO}). This can simplify code that
|
||||
repeatedly accesses slots. With it, you can use @code{setf} and
|
||||
@code{setq} on the symbols like normal variables, modifying the values
|
||||
in the structure. Unlike the macro @code{with-slots} (@pxref{Accessing
|
||||
Slots,,,eieio,EIEIO}), because the symbol expands to a function call,
|
||||
@code{cl-with-accessors} can be used with any generalized variable that
|
||||
can take a single argument, such as @code{cl-first} and @code{cl-rest}.
|
||||
@end defmac
|
||||
|
||||
@example
|
||||
;; Using accessors with long, clear names without the macro:
|
||||
(defun internal-normalization (person)
|
||||
"Correct the values of the slots in PERSON to be as expected."
|
||||
;; Check the values of the structure:
|
||||
(when (equal (person-optional-secondary-data person) "")
|
||||
(setf (person-optional-secondary-data person) nil))
|
||||
(when (null (person-access-settings person))
|
||||
(setf (person-access-settings person) 'default))
|
||||
(when (< (long-accessor-name-that-can-become-unreadable-when-repeated
|
||||
person)
|
||||
9)
|
||||
(cl-incf (long-accessor-name-that-can-become-unreadable-when-repeated
|
||||
person)
|
||||
100))
|
||||
;; And so on before returning the structure:
|
||||
person)
|
||||
|
||||
;; Using accessors with long, clear names with the macro:
|
||||
(defun internal-normalization (person)
|
||||
"Correct the values of the slots in PERSON to be as expected."
|
||||
(cl-with-accessors ((secondary-data person-optional-secondary-data)
|
||||
(access-settings person-access-settings)
|
||||
(short-name person-much-longer-accessor-name))
|
||||
person
|
||||
;; Check the values of the structure:
|
||||
(when (equal secondary-data "")
|
||||
(setf secondary-data nil))
|
||||
(when (null access-settings)
|
||||
(setf access-settings 'default))
|
||||
(when (< short-name 9)
|
||||
(cl-incf short-name 100))
|
||||
;; And so on before returning the structure:
|
||||
person))
|
||||
@end example
|
||||
|
||||
For obscure historical reasons, structure options take a different
|
||||
form than slot options. A structure option is either a keyword
|
||||
symbol, or a list beginning with a keyword symbol possibly followed
|
||||
|
|
|
|||
|
|
@ -2399,10 +2399,12 @@ The window displaying buffer A@. If buffer A is not visible, this variable
|
|||
is @code{nil} or it may be a dead window.
|
||||
|
||||
@item ediff-window-B
|
||||
The window displaying buffer B.
|
||||
The window displaying buffer B. If buffer B is not visible, this variable
|
||||
is @code{nil} or it may be a dead window.
|
||||
|
||||
@item ediff-window-C
|
||||
The window displaying buffer C, if any.
|
||||
The window displaying buffer C, if any. If buffer C is not visible,
|
||||
this variable is @code{nil} or it may be a dead window.
|
||||
|
||||
@item ediff-control-frame
|
||||
A dedicated frame displaying the control buffer, if it exists. It is
|
||||
|
|
|
|||
|
|
@ -1653,7 +1653,7 @@ This should create an unqualified method to access a slot, but
|
|||
instead pre-builds a method that gets the slot's value.
|
||||
|
||||
@item :type
|
||||
Specifier uses the @code{typep} function from the @file{cl}
|
||||
Specifier uses the @code{cl-typep} function from the @file{cl-lib}
|
||||
package. @xref{Type Predicates,,,cl,Common Lisp Extensions}.
|
||||
It therefore has the same issues as that package. Extensions include
|
||||
the ability to provide object names.
|
||||
|
|
@ -1702,7 +1702,7 @@ Some important compatibility features that would be good to add are:
|
|||
@item
|
||||
Support for metaclasses.
|
||||
@item
|
||||
Improve integration with the @file{cl} package.
|
||||
Improve integration with the @file{cl-lib} package.
|
||||
@end enumerate
|
||||
|
||||
There are also improvements to be made to allow @eieio{} to operate
|
||||
|
|
|
|||
|
|
@ -49,19 +49,18 @@ modify this GNU manual.''
|
|||
@node Top
|
||||
@top use-package User Manual
|
||||
|
||||
The @code{use-package} macro allows you to set up package
|
||||
customization in your init file in a declarative way. It takes care
|
||||
of many things for you that would otherwise require a lot of
|
||||
repetitive boilerplate code. It can help with common customization,
|
||||
such as binding keys, setting up hooks, customizing user options and
|
||||
faces, autoloading, and more. It also helps you keep Emacs startup
|
||||
fast, even when you use many (even hundreds) of packages.
|
||||
The @code{use-package} macro allows you to set up package customization
|
||||
in your init file in a declarative way. It reduces the need for
|
||||
repetitive boilerplate code by handling many common customization tasks
|
||||
for you. These include binding keys, setting hooks, customizing user
|
||||
options and faces, setting up autoloading, and more. It also helps you
|
||||
keep Emacs startup fast, even when you use many (even hundreds) of
|
||||
packages.
|
||||
|
||||
Note that use-package is not a package manager. Although use-package
|
||||
does have the useful capability to interface with the Emacs package
|
||||
manager, its primary purpose is help with the configuration and
|
||||
loading of packages, not with managing their download, upgrades, and
|
||||
installation.
|
||||
Note that use-package is not a package manager. While it provides
|
||||
convenient integration with Emacs's built-in package manager, its
|
||||
primary purpose is to help with configuring and loading packages, not
|
||||
with downloading, upgrading, or installing them.
|
||||
|
||||
@insertcopying
|
||||
|
||||
|
|
|
|||
126
etc/NEWS
126
etc/NEWS
|
|
@ -29,6 +29,12 @@ applies, and please also update docstrings as needed.
|
|||
The traditional unexec dumper, deprecated since Emacs 27, has been
|
||||
removed.
|
||||
|
||||
---
|
||||
** Emacs's old ctags program is no longer built or installed.
|
||||
You are encouraged to use Universal Ctags <https://ctags.io/> instead.
|
||||
For now, to get the old ctags behavior you can can run 'etags --ctags'
|
||||
or use a shell script named 'ctags' that runs 'etags --ctags "$@"'.
|
||||
|
||||
---
|
||||
** Changed GCC default options on 32-bit x86 systems.
|
||||
When using GCC 4 or later to build Emacs on 32-bit x86 systems,
|
||||
|
|
@ -69,14 +75,10 @@ the 'standard-display-table's extra slots with Unicode characters.
|
|||
Please see the documentation of that function to see which slots of the
|
||||
display table it changes.
|
||||
|
||||
+++
|
||||
** Child frames are now supported on TTY frames.
|
||||
This supports use-cases like Posframe, Corfu, and child frames acting
|
||||
like tooltips. Other use-cases of child frames are not supported yet.
|
||||
In particular:
|
||||
|
||||
- trying to create minibuffer-only child frames on a TTY frame will
|
||||
signal an error; and
|
||||
- a TTY child frame cannot be converted to a root frame or vice-versa.
|
||||
like tooltips.
|
||||
|
||||
To enable tooltips on TTY frames, call 'tty-tip-mode'.
|
||||
|
||||
|
|
@ -144,6 +146,9 @@ The new minor mode defines the keys at a higher precedence level than
|
|||
the old function, one more usual for a minor mode. To restore the old
|
||||
behavior, customize 'find-function-mode-lower-precedence' to non-nil.
|
||||
|
||||
---
|
||||
** 'find-function' can now find 'cl-defmethod' invocations inside macros.
|
||||
|
||||
** Minibuffer and Completions
|
||||
|
||||
+++
|
||||
|
|
@ -185,6 +190,16 @@ will still be on that candidate after "*Completions*" is updated with a
|
|||
new list of completions. The candidate is automatically deselected when
|
||||
the "*Completions*" buffer is hidden.
|
||||
|
||||
---
|
||||
*** "*Completions*" is now displayed faster when there are many candidates.
|
||||
As before, if there are more completion candidates than can be displayed
|
||||
in the current frame, only a subset of the candidates is displayed.
|
||||
This process is now faster: only that subset of the candidates is
|
||||
actually inserted into "*Completions*" until you run a command which
|
||||
interacts with the text of the "*Completions*" buffer. This
|
||||
optimization only applies when 'completions-format' is 'horizontal' or
|
||||
'one-column'.
|
||||
|
||||
---
|
||||
*** New user option 'crm-prompt' for 'completing-read-multiple'.
|
||||
This option configures the prompt format of 'completing-read-multiple'.
|
||||
|
|
@ -285,6 +300,12 @@ return value windows whose buffers share their text with BUFFER-OR-NAME.
|
|||
With such an entry, 'display-buffer-reuse-window' may also choose a
|
||||
window whose buffer shares text with the buffer to display.
|
||||
|
||||
+++
|
||||
*** New variable 'window-state-normalize-buffer-name'.
|
||||
When bound to non-nil, 'window-state-get' will normalize 'uniquify'
|
||||
managed buffer names by removing 'uniquify' prefixes and suffixes. This
|
||||
helps restore window buffers across Emacs sessions.
|
||||
|
||||
** Frames
|
||||
|
||||
+++
|
||||
|
|
@ -341,6 +362,11 @@ docstring for arguments passed to a help-text function.
|
|||
*** New command 'project-root-find-file'.
|
||||
It is equivalent to running ‘project-any-command’ with ‘find-file’.
|
||||
|
||||
---
|
||||
*** New command 'project-customize-dirlocals'.
|
||||
It is equivalent to running ‘project-any-command’ with
|
||||
‘customize-dirlocals’.
|
||||
|
||||
---
|
||||
*** Improved prompt for 'project-switch-project'.
|
||||
The prompt now displays the chosen project on which to invoke a command.
|
||||
|
|
@ -408,6 +434,11 @@ need to set it with 'setopt' for it to take an effect. If the docstring
|
|||
doesn't already mention 'setopt', the 'describe-variable' command will
|
||||
now add a note about this automatically.
|
||||
|
||||
+++
|
||||
** New user option 'eldoc-help-at-pt' to show help at point via Eldoc.
|
||||
When enabled, display the 'help-at-pt-kbd-string' via Eldoc. This
|
||||
setting is an alternative to 'help-at-pt-display-when-idle'.
|
||||
|
||||
|
||||
* Editing Changes in Emacs 31.1
|
||||
|
||||
|
|
@ -1005,6 +1036,11 @@ those versions can't install packages where that line is missing.
|
|||
This change affects both 'M-x checkdoc' and the corresponding flymake
|
||||
backend.
|
||||
|
||||
---
|
||||
*** Checkdoc no longer warns about wide docstrings.
|
||||
The Checkdoc warning for wide docstrings duplicates the byte-compiler
|
||||
warning added in Emacs 28.1. This redundancy is now removed.
|
||||
|
||||
---
|
||||
*** New user option 'checkdoc-arguments-missing-flag'.
|
||||
Set this to nil to disable warnings for function arguments that are not
|
||||
|
|
@ -1192,6 +1228,14 @@ changes when supplied with a universal prefix argument via 'C-u':
|
|||
- 'C-u c a' copies all changes from buffer C to buffer A.
|
||||
- 'C-u c b' copies all changes from buffer C to buffer B.
|
||||
|
||||
+++
|
||||
*** Ediff now supports more flexible custom window layouts
|
||||
Custom implementations of 'ediff-window-setup-function' no
|
||||
longer need to display *all* ediff windows. Any of the A, B, C,
|
||||
and control windows can be left undisplayed and the corresponding
|
||||
variable set to nil. This change enables custom layouts without
|
||||
a control panel window.
|
||||
|
||||
** Dired
|
||||
|
||||
+++
|
||||
|
|
@ -1303,6 +1347,12 @@ mode. Now, one needs to say '(midnight-mode +1)' instead.
|
|||
|
||||
** Python mode
|
||||
|
||||
*** New repeat-map for Python indentation commands.
|
||||
The commands 'python-indent-shift-left' and 'python-indent-shift-right'
|
||||
can now be repeated using 'repeat-mode'. With 'repeat-mode' enabled,
|
||||
after invoking one of these commands via 'C-c <' or 'C-c >', you can
|
||||
press '<' or '>' to repeat the command.
|
||||
|
||||
---
|
||||
*** Prefer "python" for 'python-interpreter' and 'python-shell-interpreter'.
|
||||
On recent versions of mainstream GNU/Linux distributions, "python"
|
||||
|
|
@ -1552,6 +1602,36 @@ width of the 'speedbar-window' when it is closed and then restored.
|
|||
---
|
||||
*** 'speedbar-easymenu-definition-trailer' is now a function.
|
||||
|
||||
** Icomplete
|
||||
|
||||
*** New user options for 'icomplete-vertical-mode'.
|
||||
New user options have been added to enhance 'icomplete-vertical-mode':
|
||||
- 'icomplete-vertical-in-buffer-adjust-list' aligns in-buffer
|
||||
completion to the original cursor column.
|
||||
- 'icomplete-vertical-render-prefix-indicator' adds a prefix indicator
|
||||
to completion candidates.
|
||||
- 'icomplete-vertical-selected-prefix-indicator' specifies the prefix
|
||||
string for the selected candidate.
|
||||
- 'icomplete-vertical-unselected-prefix-indicator' specifies the prefix
|
||||
string for unselected candidates.
|
||||
|
||||
*** New faces for 'icomplete-vertical-mode'.
|
||||
New faces have been added to 'icomplete-vertical-mode':
|
||||
- 'icomplete-vertical-selected-prefix-indicator-face' controls the
|
||||
appearance of the selected candidate prefix.
|
||||
- 'icomplete-vertical-unselected-prefix-indicator-face' controls the
|
||||
appearance of unselected candidate prefixes.
|
||||
|
||||
** CL-Lib
|
||||
|
||||
+++
|
||||
*** New macro 'cl-with-accessors'.
|
||||
This macro is similar to 'with-slots', but uses accessor functions
|
||||
instead of slot names. It is useful when slots' accessor functions are
|
||||
used repeatedly, such as reading from a slot and then writing to that
|
||||
slot. Symbol macros are created for the accessor functions using
|
||||
'cl-symbol-macrolet', so that they can be used with 'setq' and 'setf'.
|
||||
|
||||
** Miscellaneous
|
||||
|
||||
---
|
||||
|
|
@ -1587,6 +1667,12 @@ commands. When nil, clicking on an inactive Emacs frame will only
|
|||
activate it. When t (the default), the click will both activate the
|
||||
frame and be interpreted as a command.
|
||||
|
||||
---
|
||||
*** New user option 'global-hl-line-modes'.
|
||||
This specifies in which major modes should the 'global-hl-line-mode' be
|
||||
switched on. The default is t, which means enable it in all major
|
||||
modes.
|
||||
|
||||
---
|
||||
*** New user option 'display-fill-column-indicator-warning'.
|
||||
Customize it to a non-nil value to have the fill-column indicators
|
||||
|
|
@ -1597,6 +1683,9 @@ highlight the fill-column indicators. By default this is disabled.
|
|||
|
||||
* New Modes and Packages in Emacs 31.1
|
||||
|
||||
** New major mode 'conf-npmrc-mode'.
|
||||
A major mode based on 'conf-mode' for editing ".npmrc" files.
|
||||
|
||||
** New major modes based on the tree-sitter library
|
||||
|
||||
*** New major mode 'markdown-ts-mode'.
|
||||
|
|
@ -1613,6 +1702,21 @@ A major mode based on the tree-sitter library for editing "go.work"
|
|||
files. If tree-sitter is properly set-up by the user, it can be
|
||||
enabled for files named "go.work".
|
||||
|
||||
** The file treesit-x.el defines a number of simple treesit modes.
|
||||
Using the new macro 'define-treesit-generic-mode' generic modes are
|
||||
defined including, but not limited to, 'gitattributes-generic-ts-mode'.
|
||||
Visiting a file in such mode ask for confirmation before installing
|
||||
its tree-sitter grammar. Then it highlights the visited file
|
||||
according to syntax defined by the grammar.
|
||||
|
||||
** New minor mode 'electric-block-comment-mode'.
|
||||
This mode automatically close block comment, typing
|
||||
`block-comment-start' closes it inserting their corresponding
|
||||
`block-comment-end'. Thus, allows closing block comments for major
|
||||
modes that support it, such as: c-mode, c++-mode, java-mode, js-mode,
|
||||
css-mode, and derived: html-mode, mhtml-mode, xml-mode and nxml-mode,
|
||||
pascal-mode, lua-ts-mode, lisp-mode and common-lisp-mode
|
||||
|
||||
|
||||
* Incompatible Lisp Changes in Emacs 31.1
|
||||
|
||||
|
|
@ -1669,6 +1773,12 @@ Previously, its argument was always evaluated using dynamic binding.
|
|||
|
||||
* Lisp Changes in Emacs 31.1
|
||||
|
||||
+++
|
||||
** Improve 'replace-region-contents' to accept more forms of sources.
|
||||
It has been promoted from 'subr-x' to the C code.
|
||||
You can now directly pass it a string or a buffer rather than a function.
|
||||
Actually passing it a function is now deprecated.
|
||||
|
||||
+++
|
||||
** New macros 'static-when' and 'static-unless'.
|
||||
Like 'static-if', these macros evaluate their condition at
|
||||
|
|
@ -1723,6 +1833,10 @@ Optional arguments are provided to produce human-readable time-duration
|
|||
strings in a variety of formats, for example "6 months 3 weeks" or "5m
|
||||
52.5s".
|
||||
|
||||
+++
|
||||
** New function 'hash-table-contains-p'.
|
||||
This function returns non-nil if a given key is present in a hash table.
|
||||
|
||||
+++
|
||||
** The function 'purecopy' is now an obsolete alias for 'identity'.
|
||||
|
||||
|
|
|
|||
43
etc/NEWS.19
43
etc/NEWS.19
|
|
@ -2108,6 +2108,11 @@ mailabbrev.el used to have its own variable for this purpose
|
|||
** In Buffer-Menu mode, the d and C-d commands (which mark buffers for
|
||||
deletion) now accept a prefix argument which serves as a repeat count.
|
||||
|
||||
** 'time-stamp' can be disabled interactively with 'time-stamp-toggle-active'
|
||||
This new function works by toggling existing variable 'time-stamp-active'.
|
||||
When inactive, 'time-stamp' generates a warning message unless
|
||||
new variable 'time-stamp-warn-inactive' is nil.
|
||||
|
||||
** Changes in BibTeX mode.
|
||||
|
||||
*** Reference keys can now be entered with TAB completion. All
|
||||
|
|
@ -3149,7 +3154,7 @@ tempo.el Template insertion with hotspots.
|
|||
|
||||
|
||||
|
||||
* User Editing Changes in 19.23.
|
||||
* User Editing Changes in Emacs 19.23
|
||||
|
||||
** Emacs 19.23 uses Ispell version 3.
|
||||
|
||||
|
|
@ -4021,7 +4026,7 @@ by building Emacs.
|
|||
** New macro 'easy-menu-define'
|
||||
|
||||
|
||||
* Changes in 19.22.
|
||||
* Changes in Emacs 19.22
|
||||
|
||||
** The mouse click M-mouse-2 now inserts the current secondary
|
||||
selection (from Emacs or any other X client) where you click.
|
||||
|
|
@ -4085,7 +4090,7 @@ different properties.
|
|||
|
||||
|
||||
|
||||
* User editing changes in version 19.21.
|
||||
* User editing changes in Emacs 19.21
|
||||
|
||||
** ISO Accents mode supports four additional characters:
|
||||
A-with-ring (entered as /A), AE ligature (entered as /E),
|
||||
|
|
@ -4093,7 +4098,7 @@ and their lower-case equivalents.
|
|||
|
||||
|
||||
|
||||
* User editing changes in version 19.20.
|
||||
* User editing changes in Emacs 19.20
|
||||
(See following page for Lisp programming changes.)
|
||||
|
||||
Note that some of these changes were made subsequent to the Emacs 19.20
|
||||
|
|
@ -4493,7 +4498,7 @@ Emacs command history.
|
|||
|
||||
|
||||
|
||||
* Changes in version 19.19.
|
||||
* Changes in Emacs 19.19
|
||||
|
||||
** The new package bookmark.el records named bookmarks: positions that
|
||||
you can jump to. Bookmarks are saved automatically between Emacs
|
||||
|
|
@ -4527,7 +4532,7 @@ inconsistent with integer `%'.
|
|||
|
||||
|
||||
|
||||
* Changes in version 19.18.
|
||||
* Changes in Emacs 19.18
|
||||
|
||||
** Typing C-z in an iconified Emacs frame now deiconifies it.
|
||||
|
||||
|
|
@ -4669,7 +4674,7 @@ minibuffer window, and returns t if the window is currently active.
|
|||
|
||||
|
||||
|
||||
* Changes in version 19.17.
|
||||
* Changes in Emacs 19.17
|
||||
|
||||
** When Emacs displays a list of completions in a buffer,
|
||||
you can select a completion by clicking mouse button 2
|
||||
|
|
@ -4857,7 +4862,7 @@ argument FRAME, which specifies which frames it should affect.
|
|||
|
||||
|
||||
|
||||
* Changes in version 19.16.
|
||||
* Changes in Emacs 19.16
|
||||
|
||||
** When dragging the mouse to select a region, Emacs now highlights the
|
||||
region as you drag (if Transient Mark mode is enabled). If you
|
||||
|
|
@ -4982,9 +4987,15 @@ in a singleton list when it first inserts the prefix, but doesn't
|
|||
insert the prefix when processing events whose PLACE-SYMBOLs are
|
||||
already thus enclosed.
|
||||
|
||||
** New function 'time-stamp' updates a template with the current time.
|
||||
This is intended to be used on 'write-file-hooks'. The template details
|
||||
are controlled by file-local variables 'time-stamp-start', 'time-stamp-end',
|
||||
'time-stamp-line-limit', and 'time-stamp-format'.
|
||||
Disabled by turning off 'time-stamp-active'.
|
||||
|
||||
|
||||
|
||||
* Changes in version 19.15.
|
||||
* Changes in Emacs 19.15
|
||||
|
||||
** 'make-frame-visible', which uniconified frames, is now a command,
|
||||
and thus may be bound to a key. This makes sense because frames
|
||||
|
|
@ -5032,7 +5043,7 @@ and thus didn't document it.)
|
|||
|
||||
|
||||
|
||||
* Changes in version 19.14.
|
||||
* Changes in Emacs 19.14
|
||||
|
||||
** To modify read-only text, bind the variable 'inhibit-read-only'
|
||||
to a non-nil value. If the value is t, then all reasons that might
|
||||
|
|
@ -5078,7 +5089,7 @@ If you specify BEG or END, then the argument VISIT must be nil.
|
|||
|
||||
|
||||
|
||||
* Changes in version 19.13.
|
||||
* Changes in Emacs 19.13
|
||||
|
||||
** Magic file names can now handle the 'load' operation.
|
||||
|
||||
|
|
@ -5098,14 +5109,14 @@ We may move them again for greater consistency with other modes.
|
|||
|
||||
|
||||
|
||||
* Changes in version 19.12.
|
||||
* Changes in Emacs 19.12
|
||||
|
||||
** You can now make many of the sort commands ignore case by setting
|
||||
'sort-fold-case' to a non-nil value.
|
||||
|
||||
|
||||
|
||||
* Changes in version 19.11.
|
||||
* Changes in Emacs 19.11
|
||||
|
||||
** Supercite is installed.
|
||||
|
||||
|
|
@ -5124,7 +5135,7 @@ it writes a file in the usual way.
|
|||
|
||||
|
||||
|
||||
* Changes in version 19.10.
|
||||
* Changes in Emacs 19.10
|
||||
|
||||
** The command 'repeat-complex-command' is now on C-x ESC ESC.
|
||||
It used to be bound to C-x ESC.
|
||||
|
|
@ -5138,7 +5149,7 @@ using X).
|
|||
|
||||
|
||||
|
||||
* Changes in version 19.8.
|
||||
* Changes in Emacs 19.8
|
||||
|
||||
** It is now simpler to tell Emacs to display accented characters under
|
||||
X windows. M-x standard-display-european toggles the display of
|
||||
|
|
@ -5184,7 +5195,7 @@ If the optional arguments FACE and FRAME are specified, then
|
|||
|
||||
|
||||
|
||||
* Changes in version 19.
|
||||
* Changes in Emacs 19.1
|
||||
|
||||
** When you kill buffers, Emacs now returns memory to the operating system,
|
||||
thus reducing the size of the Emacs process. All the space that you free
|
||||
|
|
|
|||
|
|
@ -925,6 +925,10 @@ reminder about upcoming diary entries. See the documentation string
|
|||
for a sample shell script for calling this function automatically
|
||||
every night.
|
||||
|
||||
** New convenience variable 'time-stamp-pattern'
|
||||
Using 'time-stamp-pattern', a file can specify several 'time-stamp'
|
||||
parameters with just one variable.
|
||||
|
||||
** Desktop changes
|
||||
|
||||
*** All you need to do to enable use of the Desktop package, is to set
|
||||
|
|
|
|||
10
etc/NEWS.21
10
etc/NEWS.21
|
|
@ -1488,13 +1488,13 @@ has the following new features:
|
|||
*** The patterns for finding the time stamp and for updating a pattern
|
||||
may match text spanning multiple lines. For example, some people like
|
||||
to have the filename and date on separate lines. The new variable
|
||||
time-stamp-inserts-lines controls the matching for multi-line patterns.
|
||||
'time-stamp-inserts-lines' controls the matching for multi-line patterns.
|
||||
|
||||
*** More than one time stamp can be updated in the same file. This
|
||||
feature is useful if you need separate time stamps in a program source
|
||||
file to both include in formatted documentation and insert in the
|
||||
*** More than one time stamp can be updated in the same file.
|
||||
This feature is useful if you need separate time stamps in a program
|
||||
source file to both include in formatted documentation and insert in the
|
||||
compiled binary. The same time-stamp will be written at each matching
|
||||
pattern. The variable time-stamp-count enables this new feature; it
|
||||
pattern. The variable 'time-stamp-count' enables this new feature; it
|
||||
defaults to 1.
|
||||
|
||||
** Partial Completion mode now completes environment variables in
|
||||
|
|
|
|||
|
|
@ -3973,7 +3973,7 @@ There are several known workarounds:
|
|||
|
||||
The linker error messages look like this:
|
||||
|
||||
oo-spd/i386/ctags.o:ctags.c:(.text+0x156e): undefined reference to `_imp__re_set_syntax'
|
||||
oo-spd/i386/etags.o:etags.c:(.text+0x156e): undefined reference to `_imp__re_set_syntax'
|
||||
collect2: ld returned 1 exit status
|
||||
|
||||
This happens because GCC finds an incompatible regex.h header
|
||||
|
|
@ -4004,7 +4004,7 @@ Some versions of mingw32 make on some versions of Windows do not seem
|
|||
to detect the shell correctly. Try "make SHELL=cmd.exe", or if that
|
||||
fails, try running make from Cygwin bash instead.
|
||||
|
||||
*** Building 'ctags' for MS-Windows with the MinGW port of GCC fails.
|
||||
*** Building 'etags' for MS-Windows with the MinGW port of GCC fails.
|
||||
|
||||
This might happen due to a bug in the MinGW header assert.h, which
|
||||
defines the 'assert' macro with a trailing semi-colon. The following
|
||||
|
|
|
|||
|
|
@ -128,7 +128,6 @@ IS_D8_R8 := @IS_D8_R8@
|
|||
# containing the following files:
|
||||
# lib/$(ANDROID_ABI)/libemacs.so
|
||||
# lib/$(ANDROID_ABI)/libandroid-emacs.so
|
||||
# lib/$(ANDROID_ABI)/libctags.so
|
||||
# lib/$(ANDROID_ABI)/libetags.so
|
||||
# lib/$(ANDROID_ABI)/libhexl.so
|
||||
# lib/$(ANDROID_ABI)/libmovemail.so
|
||||
|
|
@ -143,8 +142,7 @@ all: $(APK_NAME)
|
|||
|
||||
# Binaries to cross-compile.
|
||||
CROSS_SRC_BINS := $(top_builddir)/cross/src/android-emacs
|
||||
CROSS_LIBSRC_BINS := $(top_builddir)/cross/lib-src/ctags \
|
||||
$(top_builddir)/cross/lib-src/hexl \
|
||||
CROSS_LIBSRC_BINS := $(top_builddir)/cross/lib-src/hexl \
|
||||
$(top_builddir)/cross/lib-src/ebrowse \
|
||||
$(top_builddir)/cross/lib-src/emacsclient \
|
||||
$(top_builddir)/cross/lib-src/etags
|
||||
|
|
|
|||
|
|
@ -83,9 +83,9 @@ public final class EmacsInputConnection implements InputConnection
|
|||
extractAbsoluteOffsets = syncAfterCommit = true;
|
||||
|
||||
/* The Samsung and Vivo keyboards take `selectionStart' at face
|
||||
value if some text is returned, and also searches for words
|
||||
solely within that text. However, when no text is returned, it
|
||||
falls back to getTextAfterCursor and getTextBeforeCursor. */
|
||||
value if some text is returned, and also search for words solely
|
||||
within that text. However, when no text is returned, it falls
|
||||
back to getTextAfterCursor and getTextBeforeCursor. */
|
||||
if (Build.MANUFACTURER.equalsIgnoreCase ("Samsung")
|
||||
|| Build.MANUFACTURER.equalsIgnoreCase ("Vivo"))
|
||||
extractAbsoluteOffsets = true;
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ ANDROID=@ANDROID@
|
|||
CLIENTW = @CLIENTW@
|
||||
|
||||
# Things that a user might actually run, which should be installed in bindir.
|
||||
INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} $(CLIENTW) \
|
||||
INSTALLABLES = etags${EXEEXT} emacsclient${EXEEXT} $(CLIENTW) \
|
||||
ebrowse${EXEEXT}
|
||||
|
||||
# Things that Emacs runs internally, or during the build process,
|
||||
|
|
@ -415,13 +415,6 @@ etags_libs = $(NTLIB) $(LOADLIBES) $(LIBS_ETAGS)
|
|||
etags${EXEEXT}: ${etags_deps}
|
||||
$(AM_V_CCLD)$(CC) ${ALL_CFLAGS} -o $@ $< $(etags_libs)
|
||||
|
||||
## ctags.c is distinct from etags.c so that parallel makes do not write two
|
||||
## etags.o files on top of each other.
|
||||
## FIXME?
|
||||
## Can't we use a wrapper that calls 'etags --ctags'?
|
||||
ctags${EXEEXT}: ${srcdir}/ctags.c ${etags_deps}
|
||||
$(AM_V_CCLD)$(CC) ${ALL_CFLAGS} -o $@ $< $(etags_libs)
|
||||
|
||||
asset-directory-tool${EXEEXT}: ${srcdir}/asset-directory-tool.c $(config_h)
|
||||
$(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< $(LOADLIBES) -o $@
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
#define CTAGS 1
|
||||
#include "etags.c"
|
||||
128
lib-src/etags.c
128
lib-src/etags.c
|
|
@ -126,16 +126,6 @@ University of California, as described above. */
|
|||
#include <getopt.h>
|
||||
#include <regex.h>
|
||||
|
||||
/* Define CTAGS to make the program "ctags" compatible with the usual one.
|
||||
Leave it undefined to make the program "etags", which makes emacs-style
|
||||
tag tables and tags typedefs, #defines and struct/union/enum by default. */
|
||||
#ifdef CTAGS
|
||||
# undef CTAGS
|
||||
# define CTAGS true
|
||||
#else
|
||||
# define CTAGS false
|
||||
#endif
|
||||
|
||||
/* Define MERCURY_HEURISTICS_RATIO as it was necessary to disambiguate
|
||||
Mercury from Objective C, which have same file extensions .m
|
||||
See comments before function test_objc_is_mercury for details. */
|
||||
|
|
@ -465,12 +455,12 @@ static bool typedefs_or_cplusplus; /* -T: create tags for C typedefs, level */
|
|||
/* member functions. */
|
||||
static bool constantypedefs; /* -d: create tags for C #define, enum */
|
||||
/* constants and variables. */
|
||||
/* -D: opposite of -d. Default under ctags. */
|
||||
/* -D: opposite of -d. Default if ctags. */
|
||||
static int globals; /* create tags for global variables */
|
||||
static int members; /* create tags for C member variables */
|
||||
static int declarations; /* --declarations: tag them and extern in C&Co*/
|
||||
static int no_line_directive; /* ignore #line directives (undocumented) */
|
||||
static int no_duplicates; /* no duplicate tags for ctags (undocumented) */
|
||||
static int no_duplicates; /* no duplicate tags if ctags (undocumented) */
|
||||
static bool update; /* -u: update tags */
|
||||
static bool vgrind_style; /* -v: create vgrind style index output */
|
||||
static bool no_warnings; /* -w: suppress warnings (undocumented) */
|
||||
|
|
@ -479,18 +469,20 @@ static bool cplusplus; /* .[hc] means C++, not C (undocumented) */
|
|||
static bool ignoreindent; /* -I: ignore indentation in C */
|
||||
static int packages_only; /* --packages-only: in Ada, only tag packages*/
|
||||
static int class_qualify; /* -Q: produce class-qualified tags in C++/Java */
|
||||
static bool ctags; /* --ctags */
|
||||
static int debug; /* --debug */
|
||||
static int fallback_lang; /* --(no-)fallback-lang: Fortran/C fallbacks */
|
||||
static int empty_files; /* --(no-)empty-file-entries */
|
||||
|
||||
/* STDIN is defined in LynxOS system headers */
|
||||
#ifdef STDIN
|
||||
# undef STDIN
|
||||
#endif
|
||||
|
||||
#define STDIN 0x1001 /* returned by getopt_long on --parse-stdin */
|
||||
static bool parsing_stdin; /* --parse-stdin used */
|
||||
|
||||
/* For long options that have no equivalent short option, use a
|
||||
non-character as a pseudo short option, starting with CHAR_MAX + 1. */
|
||||
enum
|
||||
{
|
||||
CTAGS_OPTION = CHAR_MAX + 1,
|
||||
STDIN_OPTION
|
||||
};
|
||||
|
||||
static regexp *p_head; /* list of all regexps */
|
||||
static bool need_filebuf; /* some regexes are multi-line */
|
||||
|
||||
|
|
@ -499,6 +491,7 @@ static struct option longopts[] =
|
|||
{ "append", no_argument, NULL, 'a' },
|
||||
{ "packages-only", no_argument, &packages_only, 1 },
|
||||
{ "c++", no_argument, NULL, 'C' },
|
||||
{ "ctags", no_argument, NULL, CTAGS_OPTION },
|
||||
{ "debug", no_argument, &debug, 1 },
|
||||
{ "declarations", no_argument, &declarations, 1 },
|
||||
{ "no-line-directive", no_argument, &no_line_directive, 1 },
|
||||
|
|
@ -514,10 +507,10 @@ static struct option longopts[] =
|
|||
{ "regex", required_argument, NULL, 'r' },
|
||||
{ "no-regex", no_argument, NULL, 'R' },
|
||||
{ "ignore-case-regex", required_argument, NULL, 'c' },
|
||||
{ "parse-stdin", required_argument, NULL, STDIN },
|
||||
{ "parse-stdin", required_argument, NULL, STDIN_OPTION },
|
||||
{ "version", no_argument, NULL, 'V' },
|
||||
|
||||
#if CTAGS /* Ctags options */
|
||||
/* ctags options */
|
||||
{ "backward-search", no_argument, NULL, 'B' },
|
||||
{ "cxref", no_argument, NULL, 'x' },
|
||||
{ "defines", no_argument, NULL, 'd' },
|
||||
|
|
@ -528,7 +521,7 @@ static struct option longopts[] =
|
|||
{ "vgrind", no_argument, NULL, 'v' },
|
||||
{ "no-warn", no_argument, NULL, 'w' },
|
||||
|
||||
#else /* Etags options */
|
||||
/* etags options */
|
||||
{ "no-defines", no_argument, NULL, 'D' },
|
||||
{ "no-globals", no_argument, &globals, 0 },
|
||||
{ "include", required_argument, NULL, 'i' },
|
||||
|
|
@ -536,7 +529,7 @@ static struct option longopts[] =
|
|||
{ "fallback-lang", no_argument, &fallback_lang, 1 },
|
||||
{ "no-empty-file-entries", no_argument, &empty_files, 0 },
|
||||
{ "empty-file-entries", no_argument, &empty_files, 1 },
|
||||
#endif
|
||||
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
|
@ -598,15 +591,17 @@ followed by a colon, are tags.";
|
|||
That is why default_C_entries is called for these. */
|
||||
static const char *default_C_suffixes [] =
|
||||
{ "c", "h", NULL };
|
||||
#if CTAGS /* C help for Ctags */
|
||||
static const char default_C_help [] =
|
||||
|
||||
/* C help for ctags */
|
||||
static const char ctags_default_C_help[] =
|
||||
"In C code, any C function is a tag. Use -t to tag typedefs.\n\
|
||||
Use -T to tag definitions of 'struct', 'union' and 'enum'.\n\
|
||||
Use -d to tag '#define' macro definitions and 'enum' constants.\n\
|
||||
Use --globals to tag global variables.\n\
|
||||
You can tag function declarations and external variables by\n\
|
||||
using '--declarations', and struct members by using '--members'.";
|
||||
#else /* C help for Etags */
|
||||
|
||||
/* C help for etags */
|
||||
static const char default_C_help [] =
|
||||
"In C code, any C function or typedef is a tag, and so are\n\
|
||||
definitions of 'struct', 'union' and 'enum'. '#define' macro\n\
|
||||
|
|
@ -617,7 +612,6 @@ definitions and 'enum' constants are tags unless you specify\n\
|
|||
'--no-members' can make the tags table file much smaller.\n\
|
||||
You can tag function declarations and external variables by\n\
|
||||
using '--declarations'.";
|
||||
#endif /* C help for Ctags and Etags */
|
||||
|
||||
static const char *Cplusplus_suffixes [] =
|
||||
{ "C", "c++", "cc", "cpp", "cxx", "H", "h++", "hh", "hpp", "hxx",
|
||||
|
|
@ -862,6 +856,7 @@ static language lang_names [] =
|
|||
{
|
||||
{ "ada", Ada_help, Ada_funcs, Ada_suffixes },
|
||||
{ "asm", Asm_help, Asm_labels, Asm_suffixes },
|
||||
#define C_LANG_NAMES_INDEX 2
|
||||
{ "c", default_C_help, default_C_entries, default_C_suffixes },
|
||||
{ "c++", Cplusplus_help, Cplusplus_entries, Cplusplus_suffixes },
|
||||
{ "c*", no_lang_help, Cstar_entries, Cstar_suffixes },
|
||||
|
|
@ -934,15 +929,10 @@ For detailed help on a given language use, for example,\n\
|
|||
etags --help --lang=ada.");
|
||||
}
|
||||
|
||||
#if CTAGS
|
||||
# define PROGRAM_NAME "ctags"
|
||||
#else
|
||||
# define PROGRAM_NAME "etags"
|
||||
#endif
|
||||
static _Noreturn void
|
||||
print_version (void)
|
||||
{
|
||||
fputs ((PROGRAM_NAME " (" PACKAGE_NAME " " PACKAGE_VERSION ")\n"
|
||||
fputs (("etags (" PACKAGE_NAME " " PACKAGE_VERSION ")\n"
|
||||
COPYRIGHT "\n"
|
||||
"This program is distributed under the terms in ETAGS.README\n"),
|
||||
stdout);
|
||||
|
|
@ -984,7 +974,7 @@ Relative ones are stored relative to the output file's directory.\n");
|
|||
puts ("--packages-only\n\
|
||||
For Ada files, only generate tags for packages.");
|
||||
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
puts ("-B, --backward-search\n\
|
||||
Write the search commands for the tag entries using '?', the\n\
|
||||
backward-search command instead of '/', the forward-search command.");
|
||||
|
|
@ -997,9 +987,13 @@ Relative ones are stored relative to the output file's directory.\n");
|
|||
Treat files whose name suffix defaults to C language as C++ files.");
|
||||
*/
|
||||
|
||||
if (PRINT_UNDOCUMENTED_OPTIONS_HELP && !ctags)
|
||||
puts ("--ctags\n\
|
||||
Implement ctags behavior.");
|
||||
|
||||
puts ("--declarations\n\
|
||||
In C and derived languages, create tags for function declarations,");
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
puts ("\tand create tags for extern variables if --globals is used.");
|
||||
else
|
||||
puts
|
||||
|
|
@ -1008,7 +1002,7 @@ Relative ones are stored relative to the output file's directory.\n");
|
|||
puts ("\tIn Mercury, tag both declarations starting a line with ':-' and\n\
|
||||
first predicates or functions in clauses.");
|
||||
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
puts ("-d, --defines\n\
|
||||
Create tag entries for C #define constants and enum constants, too.");
|
||||
else
|
||||
|
|
@ -1016,7 +1010,7 @@ Relative ones are stored relative to the output file's directory.\n");
|
|||
Don't create tag entries for C #define constants and enum constants.\n\
|
||||
This makes the tags file smaller.");
|
||||
|
||||
if (!CTAGS)
|
||||
if (!ctags)
|
||||
puts ("-i FILE, --include=FILE\n\
|
||||
Include a note in tag file indicating that, when searching for\n\
|
||||
a tag, one should also consult the tags file FILE after\n\
|
||||
|
|
@ -1026,7 +1020,7 @@ Relative ones are stored relative to the output file's directory.\n");
|
|||
Force the following files to be considered as written in the\n\
|
||||
named language up to the next --language=LANG option.");
|
||||
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
puts ("--globals\n\
|
||||
Create tag entries for global variables in some languages.");
|
||||
else
|
||||
|
|
@ -1037,7 +1031,7 @@ Relative ones are stored relative to the output file's directory.\n");
|
|||
puts ("--no-line-directive\n\
|
||||
Ignore #line preprocessor directives in C and derived languages.");
|
||||
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
puts ("--members\n\
|
||||
Create tag entries for members of structures in some languages.");
|
||||
else
|
||||
|
|
@ -1045,7 +1039,7 @@ Relative ones are stored relative to the output file's directory.\n");
|
|||
Do not create tag entries for members of structures\n\
|
||||
in some languages.");
|
||||
|
||||
if (!CTAGS)
|
||||
if (!ctags)
|
||||
{
|
||||
puts ("--fallback-lang\n\
|
||||
If a file's language could not be determined, try to parse\n\
|
||||
|
|
@ -1092,7 +1086,7 @@ Relative ones are stored relative to the output file's directory.\n");
|
|||
puts ("--parse-stdin=NAME\n\
|
||||
Read from standard input and record tags as belonging to file NAME.");
|
||||
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
{
|
||||
puts ("-t, --typedefs\n\
|
||||
Generate tag entries for C and Ada typedefs.");
|
||||
|
|
@ -1101,7 +1095,7 @@ Relative ones are stored relative to the output file's directory.\n");
|
|||
and C++ member functions.");
|
||||
}
|
||||
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
puts ("-u, --update\n\
|
||||
Update the tag entries for the given files, leaving tag\n\
|
||||
entries for other files in place. Currently, this is\n\
|
||||
|
|
@ -1110,7 +1104,7 @@ Relative ones are stored relative to the output file's directory.\n");
|
|||
tags file. It is often faster to simply rebuild the entire\n\
|
||||
tag file than to use this.");
|
||||
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
{
|
||||
puts ("-v, --vgrind\n\
|
||||
Print on the standard output an index of items intended for\n\
|
||||
|
|
@ -1160,7 +1154,6 @@ main (int argc, char **argv)
|
|||
linebuffer filename_lb;
|
||||
bool help_asked = false;
|
||||
ptrdiff_t len;
|
||||
char *optstring;
|
||||
int opt;
|
||||
|
||||
progname = argv[0];
|
||||
|
|
@ -1192,9 +1185,7 @@ main (int argc, char **argv)
|
|||
|
||||
/* When the optstring begins with a '-' getopt_long does not rearrange the
|
||||
non-options arguments to be at the end, but leaves them alone. */
|
||||
optstring = concat ("-ac:Cf:Il:o:Qr:RSVhH",
|
||||
(CTAGS) ? "BxdtTuvw" : "Di:",
|
||||
"");
|
||||
static char const optstring[] = "-aBc:CdDf:hHi:Il:o:Qr:RStTuvVwx";
|
||||
|
||||
while ((opt = getopt_long (argc, argv, optstring, longopts, NULL)) != EOF)
|
||||
switch (opt)
|
||||
|
|
@ -1215,7 +1206,13 @@ main (int argc, char **argv)
|
|||
++file_count;
|
||||
break;
|
||||
|
||||
case STDIN:
|
||||
case CTAGS_OPTION:
|
||||
/* Operate as ctags, not etags. */
|
||||
ctags = true;
|
||||
lang_names[C_LANG_NAMES_INDEX].help = ctags_default_C_help;
|
||||
break;
|
||||
|
||||
case STDIN_OPTION:
|
||||
/* Parse standard input. Idea by Vivek <vivek@etla.org>. */
|
||||
argbuffer[current_arg].arg_type = at_stdin;
|
||||
argbuffer[current_arg].what = optarg;
|
||||
|
|
@ -1325,7 +1322,7 @@ main (int argc, char **argv)
|
|||
}
|
||||
|
||||
if (tagfile == NULL)
|
||||
tagfile = savestr (CTAGS ? "tags" : "TAGS");
|
||||
tagfile = savestr (ctags ? "tags" : "TAGS");
|
||||
cwd = etags_getcwd (); /* the current working directory */
|
||||
if (cwd[strlen (cwd) - 1] != '/')
|
||||
{
|
||||
|
|
@ -1349,7 +1346,7 @@ main (int argc, char **argv)
|
|||
linebuffer_init (&filebuf);
|
||||
linebuffer_init (&token_name);
|
||||
|
||||
if (!CTAGS)
|
||||
if (!ctags)
|
||||
{
|
||||
if (streq (tagfile, "-"))
|
||||
{
|
||||
|
|
@ -1407,13 +1404,13 @@ main (int argc, char **argv)
|
|||
free (filebuf.buffer);
|
||||
free (token_name.buffer);
|
||||
|
||||
if (!CTAGS || cxref_style)
|
||||
if (!ctags || cxref_style)
|
||||
{
|
||||
/* Write the remaining tags to tagf (ETAGS) or stdout (CXREF). */
|
||||
put_entries (nodehead);
|
||||
free_tree (nodehead);
|
||||
nodehead = NULL;
|
||||
if (!CTAGS)
|
||||
if (!ctags)
|
||||
{
|
||||
fdesc *fdp;
|
||||
|
||||
|
|
@ -1462,7 +1459,7 @@ main (int argc, char **argv)
|
|||
if (fclose (tagf) == EOF)
|
||||
pfatal (tagfile);
|
||||
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
if (append_to_tagfile || update)
|
||||
{
|
||||
/* Maybe these should be used:
|
||||
|
|
@ -1860,7 +1857,7 @@ process_file (FILE *fh, char *fn, language *lang)
|
|||
/* If not Ctags, and if this is not metasource and if it contained no #line
|
||||
directives, we can write the tags and free all nodes pointing to
|
||||
curfdp. */
|
||||
if (!CTAGS
|
||||
if (!ctags
|
||||
&& curfdp->usecharno /* no #line directives in this file */
|
||||
&& !curfdp->lang->metasource)
|
||||
{
|
||||
|
|
@ -2092,7 +2089,7 @@ make_tag (const char *name, /* tag name, or NULL if unnamed */
|
|||
fprintf (stderr, "%s on %s:%"PRIdMAX": %s\n",
|
||||
named ? name : "(unnamed)", curfdp->taggedfname, lno, linestart);
|
||||
|
||||
if (!CTAGS && named) /* maybe set named to false */
|
||||
if (!ctags && named) /* maybe set named to false */
|
||||
/* Let's try to make an implicit tag name, that is, create an unnamed tag
|
||||
such that etags.el can guess a name from it. */
|
||||
{
|
||||
|
|
@ -2133,17 +2130,17 @@ pfnote (char *name, /* tag name, or NULL if unnamed */
|
|||
{
|
||||
register node *np;
|
||||
|
||||
if ((CTAGS && name == NULL)
|
||||
if ((ctags && name == NULL)
|
||||
/* We used to have an assertion here for the case below, but if we hit
|
||||
that case, it just means our parser got confused, and there's nothing
|
||||
to do about such empty "tags". */
|
||||
|| (!CTAGS && name && name[0] == '\0'))
|
||||
|| (!ctags && name && name[0] == '\0'))
|
||||
return;
|
||||
|
||||
np = xmalloc (sizeof *np);
|
||||
|
||||
/* If ctags mode, change name "main" to M<thisfilename>. */
|
||||
if (CTAGS && !cxref_style && streq (name, "main"))
|
||||
if (ctags && !cxref_style && streq (name, "main"))
|
||||
{
|
||||
char *fp = strrchr (curfdp->taggedfname, '/');
|
||||
np->name = concat ("M", fp == NULL ? curfdp->taggedfname : fp + 1, "");
|
||||
|
|
@ -2168,7 +2165,7 @@ pfnote (char *name, /* tag name, or NULL if unnamed */
|
|||
else
|
||||
np->cno = invalidcharno;
|
||||
np->left = np->right = NULL;
|
||||
if (CTAGS && !cxref_style)
|
||||
if (ctags && !cxref_style)
|
||||
{
|
||||
if (strnlen (linestart, 50) < 50)
|
||||
np->regex = concat (linestart, "$", "");
|
||||
|
|
@ -2295,7 +2292,7 @@ add_node (node *np, node **cur_node_p)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!CTAGS)
|
||||
if (!ctags)
|
||||
/* Etags Mode */
|
||||
{
|
||||
/* For each file name, tags are in a linked sublist on the right
|
||||
|
|
@ -2394,7 +2391,7 @@ invalidate_nodes (fdesc *badfdp, node **npp)
|
|||
node *np = *npp;
|
||||
stkentry *stack = NULL;
|
||||
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
{
|
||||
while (np)
|
||||
{
|
||||
|
|
@ -2504,7 +2501,7 @@ put_entry (node *np)
|
|||
/* Output this entry */
|
||||
if (np->valid)
|
||||
{
|
||||
if (!CTAGS)
|
||||
if (!ctags)
|
||||
{
|
||||
/* Etags mode */
|
||||
if (fdp != np->fdp)
|
||||
|
|
@ -2576,7 +2573,7 @@ put_entries (node *np)
|
|||
if (np == NULL)
|
||||
return;
|
||||
|
||||
if (CTAGS)
|
||||
if (ctags)
|
||||
{
|
||||
while (np)
|
||||
{
|
||||
|
|
@ -5072,7 +5069,10 @@ Ruby_functions (FILE *inf)
|
|||
/* Ruby method names can end in a '='. Also, operator overloading can
|
||||
define operators whose names include '='. */
|
||||
while (!notinname (*cp) || *cp == '=')
|
||||
cp++;
|
||||
{
|
||||
cp++;
|
||||
if (*(cp - 1) == ':') name = cp;
|
||||
}
|
||||
|
||||
/* Remove "self." from the method name. */
|
||||
if (cp - name > self_size1
|
||||
|
|
|
|||
|
|
@ -98,8 +98,7 @@ This file defaults to `bookmark-default-file'. But during an Emacs session,
|
|||
:version "27.1"
|
||||
:type '(choice (const :tag "Suggest to reload bookmark file if changed" t)
|
||||
(const :tag "Silently reload bookmark file if changed" silent)
|
||||
(const :tag "Ignore changes of bookmark file" nil))
|
||||
:group 'bookmark)
|
||||
(const :tag "Ignore changes of bookmark file" nil)))
|
||||
|
||||
(defcustom bookmark-version-control 'nospecial
|
||||
"Whether or not to make numbered backups of the bookmark file.
|
||||
|
|
@ -386,7 +385,7 @@ type is read from the symbol property named
|
|||
(defun bookmark-all-names ()
|
||||
"Return a list of all current bookmark names."
|
||||
(bookmark-maybe-load-default-file)
|
||||
(mapcar 'bookmark-name-from-full-record bookmark-alist))
|
||||
(mapcar #'bookmark-name-from-full-record bookmark-alist))
|
||||
|
||||
|
||||
(defun bookmark-get-bookmark (bookmark-name-or-record &optional noerror)
|
||||
|
|
@ -587,7 +586,7 @@ If DEFAULT is nil then return empty string for empty input."
|
|||
(bookmark-maybe-load-default-file) ; paranoia
|
||||
(if (listp last-nonmenu-event)
|
||||
(bookmark-menu-popup-paned-menu t prompt
|
||||
(mapcar 'bookmark-name-from-full-record
|
||||
(mapcar #'bookmark-name-from-full-record
|
||||
(bookmark-maybe-sort-alist)))
|
||||
(let* ((completion-ignore-case bookmark-completion-ignore-case)
|
||||
(default (unless (equal "" default) default)))
|
||||
|
|
@ -606,7 +605,7 @@ from other commands that pass in the bookmark name, so
|
|||
(called-interactively-p 'interactive)
|
||||
(add-to-history 'bookmark-history ,string)))
|
||||
|
||||
(defvar bookmark-make-record-function 'bookmark-make-record-default
|
||||
(defvar bookmark-make-record-function #'bookmark-make-record-default
|
||||
"A function that should be called to create a bookmark record.
|
||||
Modes may set this variable buffer-locally to enable bookmarking of
|
||||
locations that should be treated specially, such as Info nodes,
|
||||
|
|
@ -916,7 +915,7 @@ CODING is the symbol of the coding-system in which the file is encoded."
|
|||
|
||||
;;; Core code:
|
||||
|
||||
(define-obsolete-function-alias 'bookmark-maybe-message 'message "27.1")
|
||||
(define-obsolete-function-alias 'bookmark-maybe-message #'message "27.1")
|
||||
|
||||
(defvar-keymap bookmark-minibuffer-read-name-map
|
||||
:parent minibuffer-local-map
|
||||
|
|
@ -1319,7 +1318,7 @@ DISPLAY-FUNC would be `switch-to-buffer-other-window'."
|
|||
;; Don't use `switch-to-buffer' because it would let the
|
||||
;; window-point override the bookmark's point when
|
||||
;; `switch-to-buffer-preserve-window-point' is non-nil.
|
||||
(bookmark--jump-via bookmark (or display-func 'pop-to-buffer-same-window)))
|
||||
(bookmark--jump-via bookmark (or display-func #'pop-to-buffer-same-window)))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
|
|
@ -1349,7 +1348,7 @@ BOOKMARK-NAME-OR-RECORD has a file, but that file no longer exists,
|
|||
then offer interactively to relocate BOOKMARK-NAME-OR-RECORD."
|
||||
(condition-case err
|
||||
(funcall (or (bookmark-get-handler bookmark-name-or-record)
|
||||
'bookmark-default-handler)
|
||||
#'bookmark-default-handler)
|
||||
(bookmark-get-bookmark bookmark-name-or-record))
|
||||
(bookmark-error-no-filename ;file-error
|
||||
;; We were unable to find the marked file, so ask if user wants to
|
||||
|
|
@ -1377,7 +1376,7 @@ then offer interactively to relocate BOOKMARK-NAME-OR-RECORD."
|
|||
(bookmark-relocate bookmark-name-or-record)
|
||||
;; Try again.
|
||||
(funcall (or (bookmark-get-handler bookmark-name-or-record)
|
||||
'bookmark-default-handler)
|
||||
#'bookmark-default-handler)
|
||||
(bookmark-get-bookmark bookmark-name-or-record)))
|
||||
(message
|
||||
"Bookmark not relocated; consider removing it (%s)."
|
||||
|
|
@ -1466,7 +1465,7 @@ minibuffer history list `bookmark-history'."
|
|||
(insert (bookmark-location bookmark-name)))
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'bookmark-locate 'bookmark-insert-location)
|
||||
(defalias 'bookmark-locate #'bookmark-insert-location)
|
||||
|
||||
(defun bookmark-location (bookmark-name-or-record)
|
||||
"Return a description of the location of BOOKMARK-NAME-OR-RECORD."
|
||||
|
|
@ -1523,8 +1522,8 @@ name."
|
|||
(defun bookmark-insert (bookmark-name)
|
||||
"Insert the text of the file pointed to by bookmark BOOKMARK-NAME.
|
||||
BOOKMARK-NAME is a bookmark name (a string), not a bookmark record.
|
||||
Refuse to insert bookmarks whose handlers have the property
|
||||
`bookmark-inhibit' eq `insert'.
|
||||
Refuse to insert bookmarks if its handler's property `bookmark-inhibit',
|
||||
which is a list, contains `insert'.
|
||||
|
||||
You may have a problem using this function if the value of variable
|
||||
`bookmark-alist' is nil. If that happens, you need to load in some
|
||||
|
|
@ -1533,9 +1532,9 @@ this."
|
|||
(interactive (list (bookmark-completing-read "Insert bookmark contents")))
|
||||
(bookmark-maybe-historicize-string bookmark-name)
|
||||
(bookmark-maybe-load-default-file)
|
||||
(if (eq 'insert (get (or (bookmark-get-handler bookmark-name)
|
||||
#'bookmark-default-handler)
|
||||
'bookmark-inhibit))
|
||||
(if (memq 'insert (get (or (bookmark-get-handler bookmark-name)
|
||||
#'bookmark-default-handler)
|
||||
'bookmark-inhibit))
|
||||
(error "Insert not supported for bookmark %s" bookmark-name)
|
||||
(let ((orig-point (point))
|
||||
(str-to-insert
|
||||
|
|
@ -1904,11 +1903,6 @@ unique numeric suffixes \"<2>\", \"<3>\", etc."
|
|||
["Save Bookmarks" bookmark-bmenu-save t]
|
||||
["Load Bookmarks" bookmark-bmenu-load t]))
|
||||
|
||||
;; Bookmark Buffer Menu mode is suitable only for specially formatted
|
||||
;; data.
|
||||
(put 'bookmark-bmenu-mode 'mode-class 'special)
|
||||
|
||||
|
||||
;; todo: need to display whether or not bookmark exists as a buffer in
|
||||
;; flag column.
|
||||
|
||||
|
|
@ -2007,9 +2001,9 @@ deletion, or > if it is flagged for displaying."
|
|||
(bookmark-bmenu--revert))
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'list-bookmarks 'bookmark-bmenu-list)
|
||||
(defalias 'list-bookmarks #'bookmark-bmenu-list)
|
||||
;;;###autoload
|
||||
(defalias 'edit-bookmarks 'bookmark-bmenu-list)
|
||||
(defalias 'edit-bookmarks #'bookmark-bmenu-list)
|
||||
|
||||
(define-obsolete-function-alias 'bookmark-bmenu-set-header
|
||||
#'tabulated-list-init-header "28.1")
|
||||
|
|
@ -2303,7 +2297,7 @@ the related behaviors of `bookmark-save' and `bookmark-bmenu-save'."
|
|||
(pop-up-windows t))
|
||||
(delete-other-windows)
|
||||
(switch-to-buffer (other-buffer) nil t)
|
||||
(bookmark--jump-via bmrk 'pop-to-buffer)
|
||||
(bookmark--jump-via bmrk #'pop-to-buffer)
|
||||
(bury-buffer menu)))
|
||||
|
||||
|
||||
|
|
@ -2317,7 +2311,7 @@ the related behaviors of `bookmark-save' and `bookmark-bmenu-save'."
|
|||
"Select this line's bookmark in other window, leaving bookmark menu visible."
|
||||
(interactive nil bookmark-bmenu-mode)
|
||||
(let ((bookmark (bookmark-bmenu-bookmark)))
|
||||
(bookmark--jump-via bookmark 'switch-to-buffer-other-window)))
|
||||
(bookmark--jump-via bookmark #'switch-to-buffer-other-window)))
|
||||
|
||||
|
||||
(defun bookmark-bmenu-other-frame ()
|
||||
|
|
@ -2638,7 +2632,7 @@ This also runs `bookmark-exit-hook'."
|
|||
(bookmark-save)))
|
||||
|
||||
(unless noninteractive
|
||||
(add-hook 'kill-emacs-hook 'bookmark-exit-hook-internal))
|
||||
(add-hook 'kill-emacs-hook #'bookmark-exit-hook-internal))
|
||||
|
||||
(defun bookmark-unload-function ()
|
||||
"Unload the Bookmark library."
|
||||
|
|
|
|||
80
lisp/bs.el
80
lisp/bs.el
|
|
@ -180,15 +180,14 @@ must return a string representing the column's value."
|
|||
|
||||
;; Font-Lock-Settings
|
||||
(defvar bs-mode-font-lock-keywords
|
||||
(list ;; header in font-lock-type-face
|
||||
(list (bs--make-header-match-string)
|
||||
'(1 font-lock-type-face append) '(1 'bold append))
|
||||
;; Buffername embedded by *
|
||||
(list "^\\(.*\\*.*\\*.*\\)$" 1 'font-lock-constant-face)
|
||||
;; Dired-Buffers
|
||||
'("^..\\(.*Dired .*\\)$" 1 font-lock-function-name-face)
|
||||
;; the star for modified buffers
|
||||
'("^.\\(\\*\\) +[^\\*]" 1 font-lock-comment-face))
|
||||
`(;; header in bold font-lock-type-face
|
||||
(,(bs--make-header-match-string) (1 '(font-lock-type-face bold)))
|
||||
;; Buffername embedded by *
|
||||
("^\\(.*\\*.*\\*.*\\)$" (1 'font-lock-constant-face))
|
||||
;; Dired-Buffers
|
||||
("^..\\(.*Dired .*\\)$" (1 'font-lock-function-name-face))
|
||||
;; the star for modified buffers
|
||||
("^.\\(\\*\\) +[^\\*]" (1 'font-lock-comment-face)))
|
||||
"Default font lock expressions for Buffer Selection Menu.")
|
||||
|
||||
(defcustom bs-max-window-height 20
|
||||
|
|
@ -255,7 +254,7 @@ See also `bs-maximal-buffer-name-column'."
|
|||
(defcustom bs-configurations
|
||||
'(("all" nil nil nil nil nil)
|
||||
("files" nil nil nil bs-visits-non-file bs-sort-buffer-interns-are-last)
|
||||
("files-and-scratch" "^\\*scratch\\*$" nil nil bs-visits-non-file
|
||||
("files-and-scratch" "\\`\\*scratch\\*\\'" nil nil bs-visits-non-file
|
||||
bs-sort-buffer-interns-are-last)
|
||||
("all-intern-last" nil nil nil nil bs-sort-buffer-interns-are-last))
|
||||
"List of all configurations you can use in the Buffer Selection Menu.
|
||||
|
|
@ -420,7 +419,7 @@ naming a sort behavior. Default is \"by nothing\" which means no sorting."
|
|||
Non-nil means to show all buffers. Otherwise show buffers
|
||||
defined by current configuration `bs-current-configuration'.")
|
||||
|
||||
(defvar bs--intern-show-never "^ \\|\\*buffer-selection\\*"
|
||||
(defvar bs--intern-show-never "\\` \\|\\*buffer-selection\\*"
|
||||
"Regular expression specifying which buffers never to show.
|
||||
A buffer whose name matches this regular expression will never be
|
||||
included in the buffer list.")
|
||||
|
|
@ -439,17 +438,6 @@ Used internally, only.")
|
|||
"v" #'bs-view
|
||||
"!" #'bs-select-in-one-window
|
||||
"F" #'bs-select-other-frame
|
||||
"1" #'digit-argument
|
||||
"2" #'digit-argument
|
||||
"3" #'digit-argument
|
||||
"4" #'digit-argument
|
||||
"5" #'digit-argument
|
||||
"6" #'digit-argument
|
||||
"7" #'digit-argument
|
||||
"8" #'digit-argument
|
||||
"9" #'digit-argument
|
||||
"-" #'negative-argument
|
||||
"ESC -" #'negative-argument
|
||||
"o" #'bs-select-other-window
|
||||
"C-o" #'bs-tmp-select-other-window
|
||||
"<up>" #'bs-up
|
||||
|
|
@ -464,7 +452,6 @@ Used internally, only.")
|
|||
"d" #'bs-delete
|
||||
"C-d" #'bs-delete-backward
|
||||
"k" #'bs-delete
|
||||
"g" #'bs-refresh
|
||||
"C" #'bs-set-configuration-and-refresh
|
||||
"c" #'bs-select-next-configuration
|
||||
"q" #'bs-kill
|
||||
|
|
@ -574,21 +561,20 @@ function. SORT-DESCRIPTION is an element of `bs-sort-functions'."
|
|||
"Redisplay whole Buffer Selection Menu.
|
||||
If KEEP-LINE-P is non-nil the point will stay on current line.
|
||||
SORT-DESCRIPTION is an element of `bs-sort-functions'."
|
||||
(let ((line (count-lines 1 (point))))
|
||||
(let ((line (line-number-at-pos)))
|
||||
(bs-show-in-buffer (bs-buffer-list nil sort-description))
|
||||
(when keep-line-p
|
||||
(goto-char (point-min))
|
||||
(forward-line line))
|
||||
(forward-line (1- line)))
|
||||
(beginning-of-line)))
|
||||
|
||||
(defun bs--goto-current-buffer ()
|
||||
"Go to line which represents the current buffer.
|
||||
Actually, it goes to the line which begins with the character
|
||||
in `bs-string-current' or `bs-string-current-marked'."
|
||||
(let ((regexp (concat "^"
|
||||
(regexp-quote bs-string-current)
|
||||
"\\|^"
|
||||
(regexp-quote bs-string-current-marked)))
|
||||
(let ((regexp (concat "\\`"
|
||||
(regexp-opt (list bs-string-current
|
||||
bs-string-current-marked))))
|
||||
point)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
|
|
@ -604,9 +590,7 @@ in `bs-string-current' or `bs-string-current-marked'."
|
|||
(format "Show buffer by configuration %S"
|
||||
bs-current-configuration)))
|
||||
|
||||
(put 'bs-mode 'mode-class 'special)
|
||||
|
||||
(define-derived-mode bs-mode nil "Buffer-Selection-Menu"
|
||||
(define-derived-mode bs-mode special-mode "Buffer-Selection-Menu"
|
||||
"Major mode for editing a subset of Emacs's buffers.
|
||||
\\<bs-mode-map>
|
||||
Aside from two header lines each line describes one buffer.
|
||||
|
|
@ -653,16 +637,15 @@ apply it.
|
|||
\\[bs-show-sorted] -- display buffer list sorted by next sort aspect.
|
||||
|
||||
\\[bs-kill] -- leave Buffer Selection Menu without a selection.
|
||||
\\[bs-refresh] -- refresh Buffer Selection Menu.
|
||||
\\[revert-buffer] -- refresh Buffer Selection Menu.
|
||||
\\[describe-mode] -- display this help text."
|
||||
(buffer-disable-undo)
|
||||
(setq buffer-read-only t
|
||||
truncate-lines t
|
||||
(setq truncate-lines t
|
||||
show-trailing-whitespace nil)
|
||||
(setq-local font-lock-defaults '(bs-mode-font-lock-keywords t))
|
||||
(setq-local font-lock-verbose nil)
|
||||
(setq-local font-lock-global-modes '(not bs-mode))
|
||||
(setq-local revert-buffer-function 'bs-refresh))
|
||||
(setq-local revert-buffer-function #'bs-refresh))
|
||||
|
||||
(defun bs-kill ()
|
||||
"Let buffer disappear and reset window configuration."
|
||||
|
|
@ -701,7 +684,7 @@ Arguments are IGNORED (for `revert-buffer')."
|
|||
Raise an error if not on a buffer line."
|
||||
(beginning-of-line)
|
||||
(let ((line (+ (- bs-header-lines-length)
|
||||
(count-lines 1 (point)))))
|
||||
(count-lines (point-min) (point)))))
|
||||
(when (< line 0)
|
||||
(error "You are on a header row"))
|
||||
(nth line bs-current-list)))
|
||||
|
|
@ -1011,7 +994,7 @@ Uses function `read-only-mode'."
|
|||
(defun bs--up ()
|
||||
"Move point vertically up one line.
|
||||
If on top of buffer list go to last line."
|
||||
(if (> (count-lines 1 (point)) bs-header-lines-length)
|
||||
(if (> (count-lines (point-min) (point)) bs-header-lines-length)
|
||||
(forward-line -1)
|
||||
(goto-char (point-max))
|
||||
(beginning-of-line)
|
||||
|
|
@ -1041,7 +1024,7 @@ A value of nil means BUFFER belongs to a file."
|
|||
|
||||
(defun bs-sort-buffer-interns-are-last (_b1 b2)
|
||||
"Function for sorting internal buffers at the end of all buffers."
|
||||
(string-match-p "^\\*" (buffer-name b2)))
|
||||
(string-match-p "\\`\\*" (buffer-name b2)))
|
||||
|
||||
;; ----------------------------------------------------------------------
|
||||
;; Configurations:
|
||||
|
|
@ -1062,19 +1045,19 @@ These variables are `bs-dont-show-regexp', `bs-must-show-regexp',
|
|||
"Define a configuration for showing only buffers visiting a file."
|
||||
(bs-config-clear)
|
||||
(setq ;; I want to see *-buffers at the end
|
||||
bs-buffer-sort-function 'bs-sort-buffer-interns-are-last
|
||||
bs-buffer-sort-function #'bs-sort-buffer-interns-are-last
|
||||
;; Don't show files who don't belong to a file
|
||||
bs-dont-show-function 'bs-visits-non-file))
|
||||
bs-dont-show-function #'bs-visits-non-file))
|
||||
|
||||
(defun bs-config--files-and-scratch ()
|
||||
"Define a configuration for showing buffer *scratch* and file buffers."
|
||||
(bs-config-clear)
|
||||
(setq ;; I want to see *-buffers at the end
|
||||
bs-buffer-sort-function 'bs-sort-buffer-interns-are-last
|
||||
bs-buffer-sort-function #'bs-sort-buffer-interns-are-last
|
||||
;; Don't show files who don't belong to a file
|
||||
bs-dont-show-function 'bs-visits-non-file
|
||||
bs-dont-show-function #'bs-visits-non-file
|
||||
;; Show *scratch* buffer.
|
||||
bs-must-show-regexp "^\\*scratch\\*$"))
|
||||
bs-must-show-regexp "\\`\\*scratch\\*\\'"))
|
||||
|
||||
(defun bs-config--all ()
|
||||
"Define a configuration for showing all buffers.
|
||||
|
|
@ -1086,7 +1069,7 @@ Reset all according variables by `bs-config-clear'."
|
|||
Internal buffers appear at end of all buffers."
|
||||
(bs-config-clear)
|
||||
;; I want to see *-buffers at the end
|
||||
(setq bs-buffer-sort-function 'bs-sort-buffer-interns-are-last))
|
||||
(setq bs-buffer-sort-function #'bs-sort-buffer-interns-are-last))
|
||||
|
||||
(defun bs-set-configuration (name)
|
||||
"Set configuration to the one saved under string NAME in `bs-configurations'.
|
||||
|
|
@ -1170,7 +1153,7 @@ and move point to current buffer."
|
|||
(let* ((inhibit-read-only t)
|
||||
(map-fun (lambda (entry)
|
||||
(string-width (buffer-name entry))))
|
||||
(max-length-of-names (apply 'max
|
||||
(max-length-of-names (apply #'max
|
||||
(cons 0 (mapcar map-fun list))))
|
||||
(name-entry-length (min bs-maximal-buffer-name-column
|
||||
(max bs-minimal-buffer-name-column
|
||||
|
|
@ -1219,7 +1202,7 @@ buffer list used for buffer cycling."
|
|||
"Like `message' but don't log it on the message log.
|
||||
All arguments ARGS are transferred to function `message'."
|
||||
(let ((message-log-max nil))
|
||||
(apply 'message args)))
|
||||
(apply #'message args)))
|
||||
|
||||
(defvar bs--cycle-list nil
|
||||
"Current buffer list used for cycling.")
|
||||
|
|
@ -1415,8 +1398,7 @@ function of one argument, the string heading for the column."
|
|||
(bs--format-aux (funcall col (bs--get-value (car column)))
|
||||
(nth 3 column) ; align
|
||||
(bs--get-value (nth 1 column))))
|
||||
bs-attributes-list
|
||||
""))
|
||||
bs-attributes-list))
|
||||
|
||||
(defun bs--show-with-configuration (name &optional arg)
|
||||
"Display buffer list of configuration with name NAME.
|
||||
|
|
|
|||
|
|
@ -172,13 +172,13 @@
|
|||
;; |PACK|UNPK|INDX|BLD |LEN |... |
|
||||
|
||||
(defvar calc-keypad-vector-menu
|
||||
'( ( ( "SUM" calc-vector-sum calc-vector-alt-sum calc-vector-mean )
|
||||
`( ( ( "SUM" calc-vector-sum calc-vector-alt-sum calc-vector-mean )
|
||||
( "PROD" calc-vector-product nil calc-vector-sdev )
|
||||
( "MAX" calc-vector-max calc-vector-min calc-vector-median )
|
||||
( "MAP*" (lambda () (interactive)
|
||||
(calc-map '(2 calcFunc-mul "*"))) )
|
||||
( "MAP^" (lambda () (interactive)
|
||||
(calc-map '(2 calcFunc-pow "^"))) )
|
||||
( "MAP*" ,(lambda () (interactive)
|
||||
(calc-map '(2 calcFunc-mul "*"))) )
|
||||
( "MAP^" ,(lambda () (interactive)
|
||||
(calc-map '(2 calcFunc-pow "^"))) )
|
||||
( "MAP$" calc-map-stack ) )
|
||||
( ( "MINV" calc-inv )
|
||||
( "MDET" calc-mdet )
|
||||
|
|
|
|||
|
|
@ -298,38 +298,7 @@ Gregorian year Y-1 to the Chinese month of the solstice of Gregorian year Y."
|
|||
(defvar calendar-chinese-year-cache
|
||||
;; Maintainers: delete existing value, position point at start of
|
||||
;; empty line, then call M-: (calendar-chinese-year-cache-init N)
|
||||
'((2005 (12 731956) (1 731986) (2 732015) (3 732045) (4 732074) (5 732104)
|
||||
(6 732133) (7 732163) (8 732193) (9 732222) (10 732252) (11 732281))
|
||||
(2006 (12 732311) (1 732340) (2 732370) (3 732399) (4 732429) (5 732458)
|
||||
(6 732488) (7 732517) (7.5 732547) (8 732576) (9 732606) (10 732636)
|
||||
(11 732665))
|
||||
(2007 (12 732695) (1 732725) (2 732754) (3 732783) (4 732813) (5 732842)
|
||||
(6 732871) (7 732901) (8 732930) (9 732960) (10 732990) (11 733020))
|
||||
(2008 (12 733049) (1 733079) (2 733109) (3 733138) (4 733167) (5 733197)
|
||||
(6 733226) (7 733255) (8 733285) (9 733314) (10 733344) (11 733374))
|
||||
(2009 (12 733403) (1 733433) (2 733463) (3 733493) (4 733522) (5 733551)
|
||||
(5.5 733581) (6 733610) (7 733639) (8 733669) (9 733698) (10 733728)
|
||||
(11 733757))
|
||||
(2010 (12 733787) (1 733817) (2 733847) (3 733876) (4 733906) (5 733935)
|
||||
(6 733965) (7 733994) (8 734023) (9 734053) (10 734082) (11 734112))
|
||||
(2011 (12 734141) (1 734171) (2 734201) (3 734230) (4 734260) (5 734290)
|
||||
(6 734319) (7 734349) (8 734378) (9 734407) (10 734437) (11 734466))
|
||||
(2012 (12 734496) (1 734525) (2 734555) (3 734584) (4 734614) (4.5 734644)
|
||||
(5 734673) (6 734703) (7 734732) (8 734762) (9 734791) (10 734821)
|
||||
(11 734850))
|
||||
(2013 (12 734880) (1 734909) (2 734939) (3 734968) (4 734998) (5 735027)
|
||||
(6 735057) (7 735087) (8 735116) (9 735146) (10 735175) (11 735205))
|
||||
(2014 (12 735234) (1 735264) (2 735293) (3 735323) (4 735352) (5 735382)
|
||||
(6 735411) (7 735441) (8 735470) (9 735500) (9.5 735530) (10 735559)
|
||||
(11 735589))
|
||||
(2015 (12 735618) (1 735648) (2 735677) (3 735707) (4 735736) (5 735765)
|
||||
(6 735795) (7 735824) (8 735854) (9 735884) (10 735914) (11 735943))
|
||||
(2016 (12 735973) (1 736002) (2 736032) (3 736061) (4 736091) (5 736120)
|
||||
(6 736149) (7 736179) (8 736208) (9 736238) (10 736268) (11 736297))
|
||||
(2017 (12 736327) (1 736357) (2 736386) (3 736416) (4 736445) (5 736475)
|
||||
(6 736504) (6.5 736533) (7 736563) (8 736592) (9 736622) (10 736651)
|
||||
(11 736681))
|
||||
(2018 (12 736711) (1 736741) (2 736770) (3 736800) (4 736829) (5 736859)
|
||||
'((2018 (12 736711) (1 736741) (2 736770) (3 736800) (4 736829) (5 736859)
|
||||
(6 736888) (7 736917) (8 736947) (9 736976) (10 737006) (11 737035))
|
||||
(2019 (12 737065) (1 737095) (2 737125) (3 737154) (4 737184) (5 737213)
|
||||
(6 737243) (7 737272) (8 737301) (9 737331) (10 737360) (11 737389))
|
||||
|
|
@ -347,7 +316,37 @@ Gregorian year Y-1 to the Chinese month of the solstice of Gregorian year Y."
|
|||
(6 739073) (7 739102) (8 739132) (9 739162) (10 739191) (11 739221))
|
||||
(2025 (12 739251) (1 739280) (2 739310) (3 739339) (4 739369) (5 739398)
|
||||
(6 739427) (6.5 739457) (7 739486) (8 739516) (9 739545) (10 739575)
|
||||
(11 739605)))
|
||||
(11 739605))
|
||||
(2026 (12 739635) (1 739664) (2 739694) (3 739723) (4 739753) (5 739782)
|
||||
(6 739811) (7 739841) (8 739870) (9 739899) (10 739929) (11 739959))
|
||||
(2027 (12 739989) (1 740018) (2 740048) (3 740078) (4 740107) (5 740137)
|
||||
(6 740166) (7 740195) (8 740225) (9 740254) (10 740283) (11 740313))
|
||||
(2028 (12 740343) (1 740372) (2 740402) (3 740432) (4 740462) (5 740491)
|
||||
(5.5 740521) (6 740550) (7 740579) (8 740609) (9 740638) (10 740667)
|
||||
(11 740697))
|
||||
(2029 (12 740727) (1 740756) (2 740786) (3 740816) (4 740845) (5 740875)
|
||||
(6 740904) (7 740934) (8 740963) (9 740993) (10 741022) (11 741051))
|
||||
(2030 (12 741081) (1 741111) (2 741140) (3 741170) (4 741199) (5 741229)
|
||||
(6 741259) (7 741288) (8 741318) (9 741347) (10 741377) (11 741406))
|
||||
(2031 (12 741436) (1 741465) (2 741494) (3 741524) (3.5 741554) (4 741583)
|
||||
(5 741613) (6 741642) (7 741672) (8 741702) (9 741731) (10 741761)
|
||||
(11 741790))
|
||||
(2032 (12 741820) (1 741849) (2 741879) (3 741908) (4 741937) (5 741967)
|
||||
(6 741996) (7 742026) (8 742056) (9 742085) (10 742115) (11 742145))
|
||||
(2033 (12 742174) (1 742204) (2 742233) (3 742263) (4 742292) (5 742321)
|
||||
(6 742351) (7 742380) (8 742410) (9 742439) (10 742469) (11 742499))
|
||||
(2034 (11.5 742529) (12 742558) (1 742588) (2 742617) (3 742647) (4 742676)
|
||||
(5 742705) (6 742735) (7 742764) (8 742794) (9 742823) (10 742853)
|
||||
(11 742883))
|
||||
(2035 (12 742912) (1 742942) (2 742972) (3 743001) (4 743031) (5 743060)
|
||||
(6 743089) (7 743119) (8 743148) (9 743177) (10 743207) (11 743237))
|
||||
(2036 (12 743266) (1 743296) (2 743326) (3 743356) (4 743385) (5 743415)
|
||||
(6 743444) (6.5 743473) (7 743503) (8 743532) (9 743561) (10 743591)
|
||||
(11 743620))
|
||||
(2037 (12 743650) (1 743680) (2 743710) (3 743740) (4 743769) (5 743799)
|
||||
(6 743828) (7 743857) (8 743887) (9 743916) (10 743945) (11 743975))
|
||||
(2038 (12 744004) (1 744034) (2 744064) (3 744094) (4 744123) (5 744153)
|
||||
(6 744182) (7 744212) (8 744241) (9 744271) (10 744300) (11 744329)))
|
||||
"Alist of Chinese year structures as determined by `chinese-year'.
|
||||
The default can be nil, but some values are precomputed for efficiency.")
|
||||
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ Do this whenever a new project is created, as opposed to loaded."
|
|||
(defun ede--directory-project-from-hash (dir)
|
||||
"If there is an already loaded project for DIR, return it from the hash."
|
||||
(setq dir (expand-file-name dir))
|
||||
(gethash dir ede-project-directory-hash nil))
|
||||
(gethash dir ede-project-directory-hash))
|
||||
|
||||
(defun ede--directory-project-add-description-to-hash (dir desc)
|
||||
"Add to the EDE project hash DIR associated with DESC."
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ Value should be a ... what?")
|
|||
(define-key km "\C-g" #'abort-recursive-edit)
|
||||
(define-key km "\M-n" #'next-history-element)
|
||||
(define-key km "\M-p" #'previous-history-element)
|
||||
(define-key km "\M-v" #'switch-to-completions)
|
||||
(define-key km "\C-n" #'next-history-element)
|
||||
(define-key km "\C-p" #'previous-history-element)
|
||||
;; Add history navigation
|
||||
|
|
|
|||
|
|
@ -493,6 +493,24 @@ by `find-composition'."
|
|||
(setq idx (1+ idx)))))
|
||||
(or found endpos)))
|
||||
|
||||
(defun composition-find-pos-glyph (composition pos)
|
||||
"Find in COMPOSITION a glyph that corresponds to character at position POS.
|
||||
COMPOSITION is as returned by `find-composition'."
|
||||
(let* ((from-pos (car composition))
|
||||
(to-pos (nth 1 composition))
|
||||
(gstring (nth 2 composition))
|
||||
(nglyphs (lgstring-glyph-len gstring))
|
||||
(idx 0)
|
||||
glyph found)
|
||||
(if (and (>= pos from-pos) (< pos to-pos))
|
||||
(while (and (not found) (< idx nglyphs))
|
||||
(setq glyph (lgstring-glyph gstring idx))
|
||||
(if (and (>= pos (+ from-pos (lglyph-from glyph)))
|
||||
(<= pos (+ from-pos (lglyph-to glyph))))
|
||||
(setq found (lglyph-code glyph)))
|
||||
(setq idx (1+ idx))))
|
||||
found))
|
||||
|
||||
(defun compose-glyph-string (gstring from to)
|
||||
(let ((glyph (lgstring-glyph gstring from))
|
||||
from-pos to-pos)
|
||||
|
|
|
|||
|
|
@ -448,11 +448,13 @@
|
|||
|
||||
(defvar custom-field-keymap
|
||||
(let ((map (copy-keymap widget-field-keymap)))
|
||||
(define-key map "\C-c\C-c" 'Custom-set)
|
||||
(define-key map "\C-x\C-s" 'Custom-save)
|
||||
(define-key map "\C-c\C-c" #'Custom-set)
|
||||
(define-key map "\C-x\C-s" #'Custom-save)
|
||||
map)
|
||||
"Keymap used inside editable fields in customization buffers.")
|
||||
|
||||
;; FIXME: Doesn't this affect all `editable-field's ever? Why not set
|
||||
;; the right keymap right away when we (define-widget 'editable-field ...)?
|
||||
(widget-put (get 'editable-field 'widget-type) :keymap custom-field-keymap)
|
||||
|
||||
;;; Utilities.
|
||||
|
|
@ -3004,7 +3006,7 @@ Possible return values are `standard', `saved', `set', `themed',
|
|||
(and (equal value (eval (car tmp)))
|
||||
(equal comment temp))
|
||||
(error nil))
|
||||
(if (equal value (eval (car (get symbol 'standard-value))))
|
||||
(if (custom--standard-value-p symbol value)
|
||||
'standard
|
||||
'set)
|
||||
'changed))
|
||||
|
|
@ -3348,8 +3350,8 @@ If `custom-reset-standard-variables-list' is nil, save, reset and
|
|||
redraw the widget immediately."
|
||||
(let* ((symbol (widget-value widget)))
|
||||
(if (get symbol 'standard-value)
|
||||
(unless (equal (custom-variable-current-value widget)
|
||||
(eval (car (get symbol 'standard-value))))
|
||||
(unless (custom--standard-value-p
|
||||
symbol (custom-variable-current-value widget))
|
||||
(custom-variable-backup-value widget))
|
||||
(user-error "No standard setting known for %S" symbol))
|
||||
(put symbol 'variable-comment nil)
|
||||
|
|
@ -5176,7 +5178,7 @@ This function does not save the buffer."
|
|||
(defun custom-save-faces ()
|
||||
"Save all customized faces in `custom-file'."
|
||||
(save-excursion
|
||||
(custom-save-delete 'custom-reset-faces)
|
||||
(custom-save-delete 'custom-reset-faces) ;FIXME: Never written!?
|
||||
(custom-save-delete 'custom-set-faces)
|
||||
(let ((standard-output (current-buffer))
|
||||
(saved-list (make-list 1 0)))
|
||||
|
|
@ -5336,9 +5338,9 @@ The format is suitable for use with `easy-menu-define'."
|
|||
|
||||
(defvar tool-bar-map)
|
||||
|
||||
;;; `custom-tool-bar-map' used to be set up here. This will fail to
|
||||
;;; DTRT when `display-graphic-p' returns nil during compilation. Hence
|
||||
;;; we set this up lazily in `Custom-mode'.
|
||||
;; `custom-tool-bar-map' used to be set up here. This will fail to
|
||||
;; DTRT when `display-graphic-p' returns nil during compilation. Hence
|
||||
;; we set this up lazily in `Custom-mode'.
|
||||
(defvar custom-tool-bar-map nil
|
||||
"Keymap for toolbar in Custom mode.")
|
||||
|
||||
|
|
@ -5464,7 +5466,7 @@ if that value is non-nil."
|
|||
(make-local-variable 'custom-options)
|
||||
(make-local-variable 'custom-local-buffer)
|
||||
(custom--initialize-widget-variables)
|
||||
(add-hook 'widget-edit-functions 'custom-state-buffer-message nil t))
|
||||
(add-hook 'widget-edit-functions #'custom-state-buffer-message nil t))
|
||||
|
||||
(defun custom--revert-buffer (_ignore-auto _noconfirm)
|
||||
(unless custom--invocation-options
|
||||
|
|
|
|||
|
|
@ -102,9 +102,9 @@
|
|||
(word-wrap display boolean)
|
||||
(word-wrap-by-category
|
||||
display boolean "28.1"
|
||||
:set (lambda (symbol value)
|
||||
(set-default symbol value)
|
||||
(when value (require 'kinsoku))))
|
||||
:set ,(lambda (symbol value)
|
||||
(set-default symbol value)
|
||||
(when value (require 'kinsoku))))
|
||||
(selective-display-ellipses display boolean)
|
||||
(indicate-empty-lines fringe boolean)
|
||||
(indicate-buffer-boundaries
|
||||
|
|
@ -157,9 +157,9 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
|
|||
(cursor-in-non-selected-windows
|
||||
cursor ,cursor-type-types nil
|
||||
:tag "Cursor In Non-selected Windows"
|
||||
:set (lambda (symbol value)
|
||||
(set-default symbol value)
|
||||
(force-mode-line-update t)))
|
||||
:set ,(lambda (symbol value)
|
||||
(set-default symbol value)
|
||||
(force-mode-line-update t)))
|
||||
(transient-mark-mode editing-basics boolean nil
|
||||
:standard (not noninteractive)
|
||||
:initialize custom-initialize-delay
|
||||
|
|
@ -220,8 +220,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
|
|||
(coding-system
|
||||
:tag "Single coding system"
|
||||
:value undecided
|
||||
:match (lambda (widget value)
|
||||
(and value (not (functionp value)))))
|
||||
:match ,(lambda (_widget value)
|
||||
(and value (not (functionp value)))))
|
||||
(function :value ignore))))
|
||||
;; dired.c
|
||||
(completion-ignored-extensions dired
|
||||
|
|
@ -310,7 +310,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
|
|||
frames (choice
|
||||
(const :tag "Off" :value nil)
|
||||
(const :tag "On" :value t)
|
||||
(const :tag "Auto-raise" :value auto-raise)) "26.1")
|
||||
(const :tag "Auto-raise" :value auto-raise))
|
||||
"26.1")
|
||||
(yes-or-no-prompt menu string "30.1")
|
||||
;; fontset.c
|
||||
;; FIXME nil is the initial value, fontset.el setqs it.
|
||||
|
|
@ -703,7 +704,8 @@ since it could result in memory overflow and make Emacs crash."
|
|||
display (choice
|
||||
(const :tag "Off" :value nil)
|
||||
(const :tag "Immediate" :value t)
|
||||
(number :tag "Delay by secs" :value 0.5)) "22.1")
|
||||
(number :tag "Delay by secs" :value 0.5))
|
||||
"22.1")
|
||||
(tool-bar-style
|
||||
frames (choice
|
||||
(const :tag "Images" :value image)
|
||||
|
|
@ -711,18 +713,19 @@ since it could result in memory overflow and make Emacs crash."
|
|||
(const :tag "Both, text below image" :value both)
|
||||
(const :tag "Both, text to right of image" :value both-horiz)
|
||||
(const :tag "Both, text to left of image" :value text-image-horiz)
|
||||
(const :tag "System default" :value nil)) "24.1")
|
||||
(const :tag "System default" :value nil))
|
||||
"24.1")
|
||||
(tool-bar-max-label-size frames integer "24.1")
|
||||
(tab-bar-position
|
||||
tab-bar (choice
|
||||
(const :tag "Tab bar above tool bar" nil)
|
||||
(const :tag "Tab bar below tool bar" t))
|
||||
"27.1"
|
||||
:set (lambda (sym val)
|
||||
(set-default sym val)
|
||||
;; Redraw the bars:
|
||||
(tab-bar-mode -1)
|
||||
(tab-bar-mode 1)))
|
||||
:set ,(lambda (sym val)
|
||||
(set-default sym val)
|
||||
;; Redraw the bars:
|
||||
(tab-bar-mode -1)
|
||||
(tab-bar-mode 1)))
|
||||
(auto-hscroll-mode scrolling
|
||||
(choice
|
||||
(const :tag "Don't scroll automatically"
|
||||
|
|
@ -817,7 +820,7 @@ since it could result in memory overflow and make Emacs crash."
|
|||
:format "%v")
|
||||
integer)
|
||||
"27.1"
|
||||
:safe (lambda (value) (or (booleanp value) (integerp value))))
|
||||
:safe ,(lambda (value) (or (booleanp value) (integerp value))))
|
||||
(display-fill-column-indicator-character
|
||||
display-fill-column-indicator
|
||||
(choice
|
||||
|
|
@ -829,7 +832,7 @@ since it could result in memory overflow and make Emacs crash."
|
|||
:value nil)
|
||||
character)
|
||||
"27.1"
|
||||
:safe (lambda (value) (or (characterp value) (null value))))
|
||||
:safe ,(lambda (value) (or (characterp value) (null value))))
|
||||
(composition-break-at-point display boolean "29.1")
|
||||
;; xfaces.c
|
||||
(scalable-fonts-allowed
|
||||
|
|
|
|||
|
|
@ -654,12 +654,13 @@ Theme files are named *-theme.el in `"))
|
|||
:help-echo help-echo
|
||||
:action #'custom-theme-checkbox-toggle))
|
||||
(push (cons theme widget) custom--listed-themes)
|
||||
(widget-create-child-and-convert widget 'push-button
|
||||
:button-face-get 'ignore
|
||||
:mouse-face-get 'ignore
|
||||
:value (format " %s" theme)
|
||||
:action #'widget-parent-action
|
||||
:help-echo help-echo)
|
||||
(widget-create 'push-button
|
||||
:button-face-get 'ignore
|
||||
:mouse-face-get 'ignore
|
||||
:value (format " %s" theme)
|
||||
:action (lambda (_w &optional event)
|
||||
(custom-theme-checkbox-toggle widget event))
|
||||
:help-echo help-echo)
|
||||
(widget-insert " -- "
|
||||
(propertize (custom-theme-summary theme)
|
||||
'face 'shadow)
|
||||
|
|
|
|||
|
|
@ -390,9 +390,6 @@ See Info node `(elisp) Customization' in the Emacs Lisp manual
|
|||
for more information."
|
||||
(declare (doc-string 3) (debug (name body))
|
||||
(indent defun))
|
||||
;; It is better not to use backquote in this file,
|
||||
;; because that makes a bootstrapping problem
|
||||
;; if you need to recompile all the Lisp files using interpreted code.
|
||||
`(custom-declare-variable
|
||||
',symbol
|
||||
,(if lexical-binding
|
||||
|
|
@ -635,7 +632,7 @@ For other custom types, this has no effect."
|
|||
(let ((options (get symbol 'custom-options)))
|
||||
(unless (member option options)
|
||||
(put symbol 'custom-options (cons option options)))))
|
||||
(defalias 'custom-add-frequent-value 'custom-add-option)
|
||||
(defalias 'custom-add-frequent-value #'custom-add-option)
|
||||
|
||||
(defun custom-add-link (symbol widget)
|
||||
"To the custom option SYMBOL add the link WIDGET."
|
||||
|
|
@ -680,6 +677,11 @@ property, or (ii) an alias for another customizable variable."
|
|||
"Return the standard value of VARIABLE."
|
||||
(eval (car (get variable 'standard-value)) t))
|
||||
|
||||
(defun custom--standard-value-p (variable value)
|
||||
"Return non-nil if VALUE is `equal' to the standard value of VARIABLE."
|
||||
(let ((sv (get variable 'standard-value)))
|
||||
(and sv (equal value (eval (with-demoted-errors "%S" (car sv)) t)))))
|
||||
|
||||
(defun custom-note-var-changed (variable)
|
||||
"Inform Custom that VARIABLE has been set (changed).
|
||||
VARIABLE is a symbol that names a user option.
|
||||
|
|
@ -777,12 +779,10 @@ Return non-nil if the `saved-value' property actually changed."
|
|||
(let* ((get (or (get symbol 'custom-get) #'default-value))
|
||||
(value (funcall get symbol))
|
||||
(saved (get symbol 'saved-value))
|
||||
(standard (get symbol 'standard-value))
|
||||
(comment (get symbol 'customized-variable-comment)))
|
||||
;; Save default value if different from standard value.
|
||||
(put symbol 'saved-value
|
||||
(unless (and standard
|
||||
(equal value (ignore-errors (eval (car standard)))))
|
||||
(unless (custom--standard-value-p symbol value)
|
||||
(list (custom-quote value))))
|
||||
;; Clear customized information (set, but not saved).
|
||||
(put symbol 'customized-value nil)
|
||||
|
|
@ -965,12 +965,11 @@ See `custom-known-themes' for a list of known themes."
|
|||
;; recompute when the theme is disabled.
|
||||
(when (and (eq prop 'theme-value)
|
||||
(boundp symbol))
|
||||
(let ((sv (get symbol 'standard-value))
|
||||
(val (symbol-value symbol)))
|
||||
(let ((val (symbol-value symbol)))
|
||||
(unless (or
|
||||
;; We only do this trick if the current value
|
||||
;; is different from the standard value.
|
||||
(and sv (equal (eval (car sv)) val))
|
||||
(custom--standard-value-p symbol val)
|
||||
;; And we don't do it if we would end up recording
|
||||
;; the same value for the user theme. This way we avoid
|
||||
;; having ((user VALUE) (changed VALUE)). That would be
|
||||
|
|
@ -1560,7 +1559,6 @@ After THEME has been enabled, runs `enable-theme-functions'."
|
|||
(let* ((prop (car s))
|
||||
(symbol (cadr s))
|
||||
(spec-list (get symbol prop))
|
||||
(sv (get symbol 'standard-value))
|
||||
(val (and (boundp symbol) (symbol-value symbol))))
|
||||
;; We can't call `custom-push-theme' when enabling the theme: it's not
|
||||
;; that the theme settings have changed, it's just that we want to
|
||||
|
|
@ -1575,7 +1573,7 @@ After THEME has been enabled, runs `enable-theme-functions'."
|
|||
(not (or spec-list
|
||||
;; Only if the current value is different from
|
||||
;; the standard value.
|
||||
(and sv (equal (eval (car sv)) val))
|
||||
(custom--standard-value-p symbol val)
|
||||
;; And only if the changed value is different
|
||||
;; from the new value under the user theme.
|
||||
(and (eq theme 'user)
|
||||
|
|
|
|||
|
|
@ -318,13 +318,13 @@ This function is semi-obsolete. Use `get-char-code-property'."
|
|||
;; GLYPH-CODE is a hexadigit string representing the glyph-ID.
|
||||
;; Otherwise, return a string describing the terminal codes for the
|
||||
;; character.
|
||||
(defun describe-char-display (pos char)
|
||||
(defun describe-char-display (pos char &optional glyph-code)
|
||||
(if (display-graphic-p (selected-frame))
|
||||
(let ((char-font-info (internal-char-font pos char)))
|
||||
(if char-font-info
|
||||
(let ((type (font-get (car char-font-info) :type))
|
||||
(name (font-xlfd-name (car char-font-info)))
|
||||
(code (cdr char-font-info)))
|
||||
(code (or glyph-code (cdr char-font-info))))
|
||||
(if (integerp code)
|
||||
(format "%s:%s (#x%02X)" type name code)
|
||||
(format "%s:%s (#x%04X%04X)"
|
||||
|
|
@ -420,7 +420,7 @@ The character information includes:
|
|||
(describe-text-properties pos tmp-buf)
|
||||
(with-current-buffer tmp-buf (buffer-string)))
|
||||
(kill-buffer tmp-buf))))
|
||||
item-list max-width code)
|
||||
item-list max-width code glyph-code trivial-p)
|
||||
|
||||
(if multibyte-p
|
||||
(or (setq code (encode-char char charset))
|
||||
|
|
@ -489,7 +489,8 @@ The character information includes:
|
|||
(if (and (= to (1+ from))
|
||||
(= i (1- j))
|
||||
(setq glyph (lgstring-glyph components i))
|
||||
(= char (lglyph-char glyph)))
|
||||
(= char (lglyph-char glyph))
|
||||
(setq trivial-p t))
|
||||
;; The composition is trivial.
|
||||
(throw 'tag nil))
|
||||
(nconc composition (list i (1- j))))
|
||||
|
|
@ -527,7 +528,13 @@ The character information includes:
|
|||
(format "composed to form \"%s\" (see below)"
|
||||
(setq composition-string
|
||||
(buffer-substring from to))))))
|
||||
(setq composition nil)))
|
||||
;; For "trivial" compositions, such as ligatures of ASCII
|
||||
;; characters, at least show the correct font glyph number.
|
||||
(setq glyph-code (if (and composition
|
||||
trivial-p
|
||||
(display-graphic-p (selected-frame)))
|
||||
(composition-find-pos-glyph composition pos))
|
||||
composition nil)))
|
||||
|
||||
(setq item-list
|
||||
`(("position"
|
||||
|
|
@ -664,7 +671,7 @@ The character information includes:
|
|||
(composition
|
||||
(cadr composition))
|
||||
(t
|
||||
(let ((display (describe-char-display pos char)))
|
||||
(let ((display (describe-char-display pos char glyph-code)))
|
||||
(if (display-graphic-p (selected-frame))
|
||||
(if display
|
||||
(concat "by this font (glyph code):\n " display)
|
||||
|
|
|
|||
|
|
@ -518,10 +518,14 @@ Possible non-nil values:
|
|||
to the first/last visible line.
|
||||
* `bounded': don't move up/down if the current line is the
|
||||
first/last visible line.
|
||||
* `cycle-files': like `cycle' but moves only over file lines.
|
||||
* `bounded-files': like `bounded' but moves only over file lines.
|
||||
Any other non-nil value is treated as `bounded'."
|
||||
:type '(choice (const :tag "Move to any line" nil)
|
||||
(const :tag "Cycle through non-empty lines" cycle)
|
||||
(const :tag "Stop on last/first non-empty line" bounded))
|
||||
(const :tag "Cycle through file lines" cycle-files)
|
||||
(const :tag "Stop on last/first non-empty line" bounded)
|
||||
(const :tag "Stop on last/first file line" bounded-files))
|
||||
:group 'dired
|
||||
:version "30.1")
|
||||
|
||||
|
|
@ -1185,7 +1189,7 @@ If a directory or nothing is found at point, return nil."
|
|||
(not (file-directory-p file-name)))
|
||||
file-name)))
|
||||
|
||||
;;;###autoload (define-key ctl-x-map "d" 'dired)
|
||||
;;;###autoload (keymap-set ctl-x-map "d" #'dired)
|
||||
;;;###autoload
|
||||
(defun dired (dirname &optional switches)
|
||||
"\"Edit\" directory DIRNAME--delete, rename, print, etc. some files in it.
|
||||
|
|
@ -1214,21 +1218,21 @@ If DIRNAME is already in a Dired buffer, that buffer is used without refresh."
|
|||
(interactive (dired-read-dir-and-switches ""))
|
||||
(pop-to-buffer-same-window (dired-noselect dirname switches)))
|
||||
|
||||
;;;###autoload (define-key ctl-x-4-map "d" 'dired-other-window)
|
||||
;;;###autoload (keymap-set ctl-x-4-map "d" #'dired-other-window)
|
||||
;;;###autoload
|
||||
(defun dired-other-window (dirname &optional switches)
|
||||
"\"Edit\" directory DIRNAME. Like `dired' but select in another window."
|
||||
(interactive (dired-read-dir-and-switches "in other window "))
|
||||
(switch-to-buffer-other-window (dired-noselect dirname switches)))
|
||||
|
||||
;;;###autoload (define-key ctl-x-5-map "d" 'dired-other-frame)
|
||||
;;;###autoload (keymap-set ctl-x-5-map "d" #'dired-other-frame)
|
||||
;;;###autoload
|
||||
(defun dired-other-frame (dirname &optional switches)
|
||||
"\"Edit\" directory DIRNAME. Like `dired' but make a new frame."
|
||||
(interactive (dired-read-dir-and-switches "in other frame "))
|
||||
(switch-to-buffer-other-frame (dired-noselect dirname switches)))
|
||||
|
||||
;;;###autoload (define-key tab-prefix-map "d" 'dired-other-tab)
|
||||
;;;###autoload (keymap-set tab-prefix-map "d" #'dired-other-tab)
|
||||
;;;###autoload
|
||||
(defun dired-other-tab (dirname &optional switches)
|
||||
"\"Edit\" directory DIRNAME. Like `dired' but make a new tab."
|
||||
|
|
@ -2681,7 +2685,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
|
|||
(defun dired-context-menu (menu click)
|
||||
"Populate MENU with Dired mode commands at CLICK."
|
||||
(when (mouse-posn-property (event-start click) 'dired-filename)
|
||||
(define-key menu [dired-separator] menu-bar-separator)
|
||||
(keymap-set menu "<dired-separator>" menu-bar-separator)
|
||||
(let* ((filename (save-excursion
|
||||
(mouse-set-point click)
|
||||
(dired-get-filename nil t)))
|
||||
|
|
@ -2925,7 +2929,7 @@ is controlled by `dired-movement-style'."
|
|||
;; but it still wants to move farther.
|
||||
(cond
|
||||
;; `cycle': go to the other end.
|
||||
((eq dired-movement-style 'cycle)
|
||||
((memq dired-movement-style '(cycle cycle-files))
|
||||
;; Argument not changing on the second wrap
|
||||
;; means infinite loop with no files found.
|
||||
(if (and wrapped (eq old-arg arg))
|
||||
|
|
@ -2937,7 +2941,8 @@ is controlled by `dired-movement-style'."
|
|||
;; `bounded': go back to the last non-empty line.
|
||||
(dired-movement-style ; Either 'bounded or anything else non-nil.
|
||||
(while (and (dired-between-files)
|
||||
(not (dired-get-subdir))
|
||||
(or (eq dired-movement-style 'bounded-files)
|
||||
(not (dired-get-subdir)))
|
||||
(not (zerop arg)))
|
||||
(funcall jumpfun (- moving-down))
|
||||
;; Point not moving means infinite loop.
|
||||
|
|
@ -2946,9 +2951,12 @@ is controlled by `dired-movement-style'."
|
|||
(setq old-position (point))))
|
||||
;; Encountered a boundary, so let's stop movement.
|
||||
(setq arg (if (and (dired-between-files)
|
||||
(not (dired-get-subdir)))
|
||||
(or (eq dired-movement-style 'bounded-files)
|
||||
(not (dired-get-subdir))))
|
||||
0 moving-down)))))
|
||||
(unless (and (dired-between-files) (not (dired-get-subdir)))
|
||||
(unless (and (dired-between-files)
|
||||
(or (memq dired-movement-style '(cycle-files bounded-files))
|
||||
(not (dired-get-subdir))))
|
||||
;; Has moved to a non-empty line. This movement does
|
||||
;; make sense.
|
||||
(decf arg moving-down))
|
||||
|
|
@ -5306,10 +5314,8 @@ Interactively with prefix argument, read FILE-NAME."
|
|||
;;; Click-To-Select mode
|
||||
|
||||
(defvar-keymap dired-click-to-select-map
|
||||
:doc "Keymap placed on files under `dired-click-to-select' mode.")
|
||||
|
||||
(define-key dired-click-to-select-map [mouse-2]
|
||||
#'dired-mark-for-click)
|
||||
:doc "Keymap placed on files under `dired-click-to-select' mode."
|
||||
"<mouse-2>" #'dired-mark-for-click)
|
||||
|
||||
(defun dired-mark-for-click (event)
|
||||
"Mark or unmark the file underneath the mouse click at EVENT.
|
||||
|
|
|
|||
|
|
@ -321,9 +321,6 @@ stylesheet is switched, or its contents modified."
|
|||
:version "29.1"
|
||||
:set #'doc-view-custom-set-epub-user-stylesheet)
|
||||
|
||||
(defvar-local doc-view--current-cache-dir nil
|
||||
"Only used internally.")
|
||||
|
||||
(defun doc-view-custom-set-epub-font-size (option-name new-value)
|
||||
(set-default option-name new-value)
|
||||
(doc-view--epub-reconvert))
|
||||
|
|
|
|||
|
|
@ -731,6 +731,38 @@ use `electric-quote-local-mode'."
|
|||
(setq-default electric-quote-mode nil) ; But keep it globally disabled.
|
||||
)))
|
||||
|
||||
;;; Electric comment block
|
||||
|
||||
(defun electric-block-comment-post-self-insert-function ()
|
||||
"Function that `electric-block-comment' adds to `post-self-insert-hook'.
|
||||
This closes block comment with `block-comment-end' when `block-comment-start'
|
||||
is typed."
|
||||
(when (and block-comment-start block-comment-end
|
||||
;; Check if we are exactly behind a `block-comment-start'
|
||||
(save-excursion
|
||||
(save-match-data
|
||||
(re-search-backward (regexp-quote block-comment-start)
|
||||
(- (point) (length block-comment-start))
|
||||
t)))
|
||||
;; And if there is not anything front us
|
||||
(looking-at-p (concat "[^[:space:]]")))
|
||||
(insert " ")
|
||||
(save-excursion
|
||||
(insert (concat " " block-comment-end)))))
|
||||
|
||||
(define-minor-mode electric-block-comment-mode
|
||||
"Toggle automatic closing of block comments (Electric Block Comment mode).
|
||||
|
||||
When enabled, typing `block-comment-start' closes it inserting their
|
||||
corresponding `block-comment-end'."
|
||||
:group 'electricity
|
||||
:version "31.1"
|
||||
(if electric-block-comment-mode
|
||||
(add-hook 'post-self-insert-hook
|
||||
#'electric-block-comment-post-self-insert-function 10 t)
|
||||
(remove-hook 'post-self-insert-hook
|
||||
#'electric-block-comment-post-self-insert-function t)))
|
||||
|
||||
(provide 'electric)
|
||||
|
||||
;;; electric.el ends here
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
Set to nil to disable fontification, which may be necessary in
|
||||
order to debug the code that does fontification."
|
||||
:type 'boolean
|
||||
:group 'backtrace
|
||||
:version "27.1")
|
||||
|
||||
(defcustom backtrace-line-length 5000
|
||||
|
|
@ -59,7 +58,6 @@ shorter than this, but success is not guaranteed. If set to nil
|
|||
or zero, backtrace mode will not abbreviate the forms it prints."
|
||||
:type '(choice natnum
|
||||
(const :value nil :tag "Don't abbreviate"))
|
||||
:group 'backtrace
|
||||
:version "27.1")
|
||||
|
||||
;;; Backtrace frame data structure
|
||||
|
|
@ -877,14 +875,12 @@ followed by `backtrace-print-frame', once for each stack frame."
|
|||
;; (set-buffer-multibyte t)
|
||||
(setq-local revert-buffer-function #'backtrace-revert)
|
||||
(setq-local filter-buffer-substring-function #'backtrace--filter-visible)
|
||||
(setq-local indent-line-function 'lisp-indent-line)
|
||||
(setq-local indent-region-function 'lisp-indent-region)
|
||||
(setq-local indent-line-function #'lisp-indent-line)
|
||||
(setq-local indent-region-function #'lisp-indent-region)
|
||||
(add-function :around (local 'cl-print-expand-ellipsis-function)
|
||||
#'backtrace--expand-ellipsis)
|
||||
(add-hook 'xref-backend-functions #'backtrace--xref-backend nil t))
|
||||
|
||||
(put 'backtrace-mode 'mode-class 'special)
|
||||
|
||||
;;; Backtrace printing
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
|
|
@ -2947,9 +2947,8 @@ FUN should be an interpreted closure."
|
|||
(push `(,(car binding) ',(cdr binding)) renv))
|
||||
((eq binding t))
|
||||
(t (push `(defvar ,binding) body))))
|
||||
(if (null renv)
|
||||
`(lambda ,args ,@preamble ,@body)
|
||||
`(let ,renv (lambda ,args ,@preamble ,@body)))))
|
||||
(let ((fun `(lambda ,args ,@preamble ,@body)))
|
||||
(if renv `(let ,renv ,fun) fun))))
|
||||
|
||||
;;;###autoload
|
||||
(defun byte-compile (form)
|
||||
|
|
@ -4230,7 +4229,7 @@ This function is never called when `lexical-binding' is nil."
|
|||
(pcase (length form)
|
||||
(1
|
||||
;; No args: use the identity value for the operation.
|
||||
(byte-compile-constant (eval form)))
|
||||
(byte-compile-constant (eval form lexical-binding)))
|
||||
(2
|
||||
;; One arg: compile (OP x) as (* x 1). This is identity for
|
||||
;; all numerical values including -0.0, infinities and NaNs.
|
||||
|
|
@ -4488,39 +4487,42 @@ being undefined (or obsolete) will be suppressed.
|
|||
If CONDITION's value is (not (featurep \\='emacs)) or (featurep \\='xemacs),
|
||||
that suppresses all warnings during execution of BODY."
|
||||
(declare (indent 1) (debug t))
|
||||
`(let* ((fbound-list (byte-compile-find-bound-condition
|
||||
,condition '(fboundp functionp)
|
||||
byte-compile-unresolved-functions))
|
||||
(bound-list (byte-compile-find-bound-condition
|
||||
,condition '(boundp default-boundp local-variable-p)))
|
||||
(new-bound-list
|
||||
;; (seq-difference byte-compile-bound-variables))
|
||||
(delq nil (mapcar (lambda (s)
|
||||
(if (memq s byte-compile-bound-variables) nil s))
|
||||
bound-list)))
|
||||
;; Maybe add to the bound list.
|
||||
(byte-compile-bound-variables
|
||||
(append new-bound-list byte-compile-bound-variables)))
|
||||
(mapc #'byte-compile--check-prefixed-var new-bound-list)
|
||||
(unwind-protect
|
||||
;; If things not being bound at all is ok, so must them being
|
||||
;; obsolete. Note that we add to the existing lists since Tramp
|
||||
;; (ab)uses this feature.
|
||||
;; FIXME: If `foo' is obsoleted by `bar', the code below
|
||||
;; correctly arranges to silence the warnings after testing
|
||||
;; existence of `foo', but the warning should also be
|
||||
;; silenced after testing the existence of `bar'.
|
||||
(let ((byte-compile-not-obsolete-vars
|
||||
(append byte-compile-not-obsolete-vars bound-list))
|
||||
(byte-compile-not-obsolete-funcs
|
||||
(append byte-compile-not-obsolete-funcs fbound-list)))
|
||||
,@body)
|
||||
;; Maybe remove the function symbol from the unresolved list.
|
||||
(dolist (fbound fbound-list)
|
||||
(when fbound
|
||||
(setq byte-compile-unresolved-functions
|
||||
(delq (assq fbound byte-compile-unresolved-functions)
|
||||
byte-compile-unresolved-functions)))))))
|
||||
`(byte-compile--maybe-guarded ,condition (lambda () ,@body)))
|
||||
|
||||
(defun byte-compile--maybe-guarded (condition body-fun)
|
||||
(let* ((fbound-list (byte-compile-find-bound-condition
|
||||
condition '(fboundp functionp)
|
||||
byte-compile-unresolved-functions))
|
||||
(bound-list (byte-compile-find-bound-condition
|
||||
condition '(boundp default-boundp local-variable-p)))
|
||||
(new-bound-list
|
||||
;; (seq-difference byte-compile-bound-variables))
|
||||
(delq nil (mapcar (lambda (s)
|
||||
(if (memq s byte-compile-bound-variables) nil s))
|
||||
bound-list)))
|
||||
;; Maybe add to the bound list.
|
||||
(byte-compile-bound-variables
|
||||
(append new-bound-list byte-compile-bound-variables)))
|
||||
(mapc #'byte-compile--check-prefixed-var new-bound-list)
|
||||
(unwind-protect
|
||||
;; If things not being bound at all is ok, so must them being
|
||||
;; obsolete. Note that we add to the existing lists since Tramp
|
||||
;; (ab)uses this feature.
|
||||
;; FIXME: If `foo' is obsoleted by `bar', the code below
|
||||
;; correctly arranges to silence the warnings after testing
|
||||
;; existence of `foo', but the warning should also be
|
||||
;; silenced after testing the existence of `bar'.
|
||||
(let ((byte-compile-not-obsolete-vars
|
||||
(append byte-compile-not-obsolete-vars bound-list))
|
||||
(byte-compile-not-obsolete-funcs
|
||||
(append byte-compile-not-obsolete-funcs fbound-list)))
|
||||
(funcall body-fun))
|
||||
;; Maybe remove the function symbol from the unresolved list.
|
||||
(dolist (fbound fbound-list)
|
||||
(when fbound
|
||||
(setq byte-compile-unresolved-functions
|
||||
(delq (assq fbound byte-compile-unresolved-functions)
|
||||
byte-compile-unresolved-functions)))))))
|
||||
|
||||
(defun byte-compile-if (form)
|
||||
(byte-compile-form (car (cdr form)))
|
||||
|
|
@ -4551,8 +4553,10 @@ that suppresses all warnings during execution of BODY."
|
|||
;; and the other is a constant expression whose value can be
|
||||
;; compared with `eq' (with `macroexp-const-p').
|
||||
(or
|
||||
(and (symbolp obj1) (macroexp-const-p obj2) (cons obj1 (eval obj2)))
|
||||
(and (symbolp obj2) (macroexp-const-p obj1) (cons obj2 (eval obj1)))))
|
||||
(and (symbolp obj1) (macroexp-const-p obj2)
|
||||
(cons obj1 (eval obj2 lexical-binding)))
|
||||
(and (symbolp obj2) (macroexp-const-p obj1)
|
||||
(cons obj2 (eval obj1 lexical-binding)))))
|
||||
|
||||
(defun byte-compile--common-test (test-1 test-2)
|
||||
"Most specific common test of `eq', `eql' and `equal'."
|
||||
|
|
@ -4605,7 +4609,7 @@ Return (TAIL VAR TEST CASES), where:
|
|||
;; Require a non-empty body, since the member
|
||||
;; function value depends on the switch argument.
|
||||
body
|
||||
(let ((value (eval expr)))
|
||||
(let ((value (eval expr lexical-binding)))
|
||||
(and (proper-list-p value)
|
||||
(progn
|
||||
(setq switch-var var)
|
||||
|
|
@ -5175,7 +5179,7 @@ binding slots have been popped."
|
|||
(if (null fun)
|
||||
(message "Macro %s unrecognized, won't work in file" name)
|
||||
(message "Macro %s partly recognized, trying our luck" name)
|
||||
(push (cons name (eval fun))
|
||||
(push (cons name (eval fun lexical-binding))
|
||||
byte-compile-macro-environment)))
|
||||
(byte-compile-keep-pending form))))
|
||||
|
||||
|
|
|
|||
|
|
@ -1694,35 +1694,6 @@ function,command,variable,option or symbol." ms1))))))
|
|||
(if ret
|
||||
(checkdoc-create-error ret mb me)
|
||||
nil)))
|
||||
;; * Format the documentation string so that it fits in an
|
||||
;; Emacs window on an 80-column screen. It is a good idea
|
||||
;; for most lines to be no wider than 60 characters. The
|
||||
;; first line can be wider if necessary to fit the
|
||||
;; information that ought to be there.
|
||||
(save-excursion
|
||||
(let* ((start (point))
|
||||
(eol nil)
|
||||
;; Respect this file local variable.
|
||||
(max-column (max 80 byte-compile-docstring-max-column))
|
||||
;; Allow the first line to be three characters longer, to
|
||||
;; fit the leading ` "' while still having a docstring
|
||||
;; shorter than e.g. 80 characters.
|
||||
(first t)
|
||||
(get-max-column (lambda () (+ max-column (if first 3 0)))))
|
||||
(while (and (< (point) e)
|
||||
(or (progn (end-of-line) (setq eol (point))
|
||||
(< (current-column) (funcall get-max-column)))
|
||||
(progn (beginning-of-line)
|
||||
(re-search-forward "\\\\\\\\[[<{]"
|
||||
eol t))
|
||||
(checkdoc-in-sample-code-p start e)))
|
||||
(setq first nil)
|
||||
(forward-line 1))
|
||||
(end-of-line)
|
||||
(if (and (< (point) e) (> (current-column) (funcall get-max-column)))
|
||||
(checkdoc-create-error
|
||||
(format "Some lines are over %d columns wide" max-column)
|
||||
s (save-excursion (goto-char s) (line-end-position))))))
|
||||
;; Here we deviate to tests based on a variable or function.
|
||||
;; We must do this before checking for symbols in quotes because there
|
||||
;; is a chance that just such a symbol might really be an argument.
|
||||
|
|
|
|||
|
|
@ -1082,13 +1082,36 @@ MET-NAME is as returned by `cl--generic-load-hist-format'."
|
|||
nil t)
|
||||
(re-search-forward base-re nil t))))
|
||||
|
||||
;; WORKAROUND: This can't be a defconst due to bug#21237.
|
||||
(defvar cl--generic-find-defgeneric-regexp "(\\(?:cl-\\)?defgeneric[ \t]+%s\\_>")
|
||||
(defun cl--generic-search-method-make-form-matcher (met-name)
|
||||
(let ((name (car met-name))
|
||||
(qualifiers (cadr met-name))
|
||||
(specializers (cddr met-name)))
|
||||
(lambda (form)
|
||||
(pcase form
|
||||
(`(cl-generic-define-method
|
||||
(function ,(pred (eq name)))
|
||||
(quote ,(and (pred listp) m-qualifiers))
|
||||
(quote ,(and (pred listp) m-args))
|
||||
,_call-con
|
||||
,_function)
|
||||
(ignore-errors
|
||||
(let* ((m-spec-args (car (cl--generic-split-args m-args)))
|
||||
(m-specializers
|
||||
(mapcar (lambda (spec-arg)
|
||||
(if (eq '&context (car-safe (car spec-arg)))
|
||||
spec-arg (cdr spec-arg)))
|
||||
m-spec-args)))
|
||||
(and (equal qualifiers m-qualifiers)
|
||||
(equal specializers m-specializers)))))))))
|
||||
|
||||
(defconst cl--generic-find-defgeneric-regexp "(\\(?:cl-\\)?defgeneric[ \t]+%s\\_>")
|
||||
|
||||
(with-eval-after-load 'find-func
|
||||
(defvar find-function-regexp-alist)
|
||||
(add-to-list 'find-function-regexp-alist
|
||||
`(cl-defmethod . ,#'cl--generic-search-method))
|
||||
`(cl-defmethod
|
||||
. (,#'cl--generic-search-method
|
||||
. ,#'cl--generic-search-method-make-form-matcher)))
|
||||
(add-to-list 'find-function-regexp-alist
|
||||
'(cl-defgeneric . cl--generic-find-defgeneric-regexp)))
|
||||
|
||||
|
|
|
|||
|
|
@ -154,12 +154,10 @@ to an element already in the list stored in PLACE.
|
|||
`(setq ,place (cl-adjoin ,x ,place ,@keys)))
|
||||
`(cl-callf2 cl-adjoin ,x ,place ,@keys)))
|
||||
|
||||
(defun cl--set-buffer-substring (start end val)
|
||||
(defun cl--set-buffer-substring (start end val &optional inherit)
|
||||
"Delete region from START to END and insert VAL."
|
||||
(save-excursion (delete-region start end)
|
||||
(goto-char start)
|
||||
(insert val)
|
||||
val))
|
||||
(replace-region-contents start end val 0 nil inherit)
|
||||
val)
|
||||
|
||||
(defun cl--set-substring (str start end val)
|
||||
(if end (if (< end 0) (incf end (length str)))
|
||||
|
|
|
|||
|
|
@ -2072,7 +2072,8 @@ a `let' form, except that the list of symbols can be computed at run-time."
|
|||
Each definition can take the form (FUNC EXP) where FUNC is the function
|
||||
name, and EXP is an expression that returns the function value to which
|
||||
it should be bound, or it can take the more common form (FUNC ARGLIST
|
||||
BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY)).
|
||||
BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY))
|
||||
where BODY is wrapped in a `cl-block' named FUNC.
|
||||
|
||||
FUNC is defined only within FORM, not BODY, so you can't write recursive
|
||||
function definitions. Use `cl-labels' for that. See Info node
|
||||
|
|
@ -2276,13 +2277,17 @@ Like `cl-flet' but the definitions can refer to previous ones.
|
|||
(defmacro cl-labels (bindings &rest body)
|
||||
"Make local (recursive) function definitions.
|
||||
|
||||
BINDINGS is a list of definitions of the form (FUNC ARGLIST BODY...)
|
||||
where FUNC is the function name, ARGLIST its arguments, and BODY the
|
||||
forms of the function body.
|
||||
Each definition can take the form (FUNC EXP) where FUNC is the function
|
||||
name, and EXP is an expression that returns the function value to which
|
||||
it should be bound, or it can take the more common form (FUNC ARGLIST
|
||||
BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY))
|
||||
where BODY is wrapped in a `cl-block' named FUNC.
|
||||
|
||||
FUNC is defined in any BODY, as well as FORM, so you can write recursive
|
||||
and mutually recursive function definitions. See Info node
|
||||
`(cl) Function Bindings' for details.
|
||||
FUNC is in scope in any BODY or EXP, as well as in FORM, so you can write
|
||||
recursive and mutually recursive function definitions, with the caveat
|
||||
that EXPs are evaluated in sequence and you cannot call a FUNC before its
|
||||
EXP has been evaluated.
|
||||
See Info node `(cl) Function Bindings' for details.
|
||||
|
||||
\(fn ((FUNC ARGLIST BODY...) ...) FORM...)"
|
||||
(declare (indent 1) (debug cl-flet))
|
||||
|
|
@ -2575,6 +2580,50 @@ See also `macroexp-let2'."
|
|||
collect `(,(car name) ,gensym))
|
||||
,@body)))))
|
||||
|
||||
;;;###autoload
|
||||
(defmacro cl-with-accessors (bindings instance &rest body)
|
||||
"Use BINDINGS as function calls on INSTANCE inside BODY.
|
||||
|
||||
This macro helps when writing code that makes repeated use of the
|
||||
accessor functions of a structure or object instance, such as those
|
||||
created by `cl-defstruct' and `defclass'.
|
||||
|
||||
BINDINGS is a list of (NAME ACCESSOR) pairs. Inside BODY, NAME is
|
||||
treated as the function call (ACCESSOR INSTANCE) using
|
||||
`cl-symbol-macrolet'. NAME can be used with `setf' and `setq' as a
|
||||
generalized variable. Because of how the accessor is used,
|
||||
`cl-with-accessors' can be used with any generalized variable that can
|
||||
take a single argument, such as `car' and `cdr'.
|
||||
|
||||
See also the macro `with-slots' described in the Info
|
||||
node `(eieio)Accessing Slots', which is similar, but uses slot names
|
||||
instead of accessor functions.
|
||||
|
||||
\(fn ((NAME ACCESSOR) ...) INSTANCE &rest BODY)"
|
||||
(declare (debug [(&rest (symbolp symbolp)) form body])
|
||||
(indent 2))
|
||||
(cond ((null body)
|
||||
(macroexp-warn-and-return "`cl-with-accessors' used with empty body"
|
||||
nil 'empty-body))
|
||||
((null bindings)
|
||||
(macroexp-warn-and-return "`cl-with-accessors' used without accessors"
|
||||
(macroexp-progn body)
|
||||
'suspicious))
|
||||
(t
|
||||
(cl-once-only (instance)
|
||||
(let ((symbol-macros))
|
||||
(dolist (b bindings)
|
||||
(pcase b
|
||||
(`(,(and (pred symbolp) var)
|
||||
,(and (pred symbolp) accessor))
|
||||
(push `(,var (,accessor ,instance))
|
||||
symbol-macros))
|
||||
(_
|
||||
(error "Malformed `cl-with-accessors' binding: %S" b))))
|
||||
`(cl-symbol-macrolet
|
||||
,symbol-macros
|
||||
,@body))))))
|
||||
|
||||
;;; Multiple values.
|
||||
|
||||
;;;###autoload
|
||||
|
|
@ -3229,7 +3278,8 @@ To see the documentation for a defined struct type, use
|
|||
;; and pred-check, so changing it is not straightforward.
|
||||
(push `(,defsym ,accessor (cl-x)
|
||||
,(let ((long-docstring
|
||||
(format "Access slot \"%s\" of `%s' struct CL-X." slot name)))
|
||||
(format "Access slot \"%s\" of `%s' struct X."
|
||||
slot name)))
|
||||
(concat
|
||||
;; NB. This will produce incorrect results
|
||||
;; in some cases, as our coding conventions
|
||||
|
|
@ -3246,15 +3296,22 @@ To see the documentation for a defined struct type, use
|
|||
80))
|
||||
(concat
|
||||
(internal--format-docstring-line
|
||||
"Access slot \"%s\" of CL-X." slot)
|
||||
"Access slot \"%s\" of X." slot)
|
||||
"\n"
|
||||
(internal--format-docstring-line
|
||||
"Struct CL-X is a `%s'." name))
|
||||
"Struct X is a `%s'." name))
|
||||
(internal--format-docstring-line long-docstring))
|
||||
(if doc (concat "\n" doc) "")))
|
||||
(if doc (concat "\n" doc) "")
|
||||
"\n"
|
||||
(format "\n\n(fn %s X)" accessor)))
|
||||
(declare (side-effect-free t))
|
||||
,access-body)
|
||||
forms)
|
||||
;; FIXME: This hack is to document this as a generalized
|
||||
;; variable, despite it not having the `gv-expander'
|
||||
;; property. See `help-fns--generalized-variable'.
|
||||
(push `(function-put ',accessor 'document-generalized-variable t)
|
||||
forms)
|
||||
(when (oddp (length desc))
|
||||
(push
|
||||
(macroexp-warn-and-return
|
||||
|
|
|
|||
|
|
@ -292,7 +292,13 @@
|
|||
(:include cl--class)
|
||||
(:noinline t)
|
||||
(:constructor nil)
|
||||
(:constructor built-in-class--make (name docstring parents))
|
||||
(:constructor built-in-class--make
|
||||
(name docstring parent-types
|
||||
&aux (parents
|
||||
(mapcar (lambda (type)
|
||||
(or (get type 'cl--class)
|
||||
(error "Unknown type: %S" type)))
|
||||
parent-types))))
|
||||
(:copier nil))
|
||||
"Type descriptors for built-in types.
|
||||
The `slots' (and hence `index-table') are currently unused."
|
||||
|
|
@ -322,13 +328,7 @@ The `slots' (and hence `index-table') are currently unused."
|
|||
;; (message "Missing predicate for: %S" name)
|
||||
nil)
|
||||
(put ',name 'cl--class
|
||||
(built-in-class--make ',name ,docstring
|
||||
(mapcar (lambda (type)
|
||||
(let ((class (get type 'cl--class)))
|
||||
(unless class
|
||||
(error "Unknown type: %S" type))
|
||||
class))
|
||||
',parents))))))
|
||||
(built-in-class--make ',name ,docstring ',parents)))))
|
||||
|
||||
;; FIXME: Our type DAG has various quirks:
|
||||
;; - Some `keyword's are also `symbol-with-pos' but that's not reflected
|
||||
|
|
|
|||
|
|
@ -2027,15 +2027,11 @@ TARGET-BB-SYM is the symbol name of the target block."
|
|||
(call symbol-value ,(and (pred comp-cstr-cl-tag-p) mvar-tag)))
|
||||
(set ,(and (pred comp-mvar-p) mvar-3)
|
||||
(call memq ,(and (pred comp-mvar-p) mvar-1) ,(and (pred comp-mvar-p) mvar-2)))
|
||||
(cond-jump ,(and (pred comp-mvar-p) mvar-3) ,(pred comp-mvar-p) ,bb1 ,bb2))
|
||||
(cond-jump ,(and (pred comp-mvar-p) mvar-3) ,(pred comp-mvar-p) ,_bb1 ,bb2))
|
||||
(comp--emit-assume 'and mvar-tested
|
||||
(make--comp-mvar :type (comp-cstr-cl-tag mvar-tag))
|
||||
(comp--add-cond-cstrs-target-block b bb2)
|
||||
nil)
|
||||
(comp--emit-assume 'and mvar-tested
|
||||
(make--comp-mvar :type (comp-cstr-cl-tag mvar-tag))
|
||||
(comp--add-cond-cstrs-target-block b bb1)
|
||||
t))
|
||||
(make--comp-mvar :type (comp-cstr-cl-tag mvar-tag))
|
||||
(comp--add-cond-cstrs-target-block b bb2)
|
||||
nil))
|
||||
(`((set ,(and (pred comp-mvar-p) cmp-res)
|
||||
(,(pred comp--call-op-p)
|
||||
,(and (or (pred comp--equality-fun-p)
|
||||
|
|
|
|||
|
|
@ -1288,7 +1288,7 @@ infinite loops when the code/environment contains a circular object.")
|
|||
(while (not (eq sexp (setq sexp (edebug-unwrap sexp)))))
|
||||
(cond
|
||||
((consp sexp)
|
||||
(or (gethash sexp edebug--unwrap-cache nil)
|
||||
(or (gethash sexp edebug--unwrap-cache)
|
||||
(let ((remainder sexp)
|
||||
(current (cons nil nil)))
|
||||
(prog1 current
|
||||
|
|
@ -1303,8 +1303,8 @@ infinite loops when the code/environment contains a circular object.")
|
|||
(setf (cdr current)
|
||||
(edebug-unwrap* remainder))
|
||||
nil)
|
||||
((gethash remainder edebug--unwrap-cache nil)
|
||||
(setf (cdr current) (gethash remainder edebug--unwrap-cache nil))
|
||||
((gethash remainder edebug--unwrap-cache)
|
||||
(setf (cdr current) (gethash remainder edebug--unwrap-cache))
|
||||
nil)
|
||||
(t (setq current
|
||||
(setf (cdr current) (cons nil nil)))))))))))
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
;;; eieio.el --- Enhanced Implementation of Emacs Interpreted Objects -*- lexical-binding:t -*-
|
||||
;;; or maybe Eric's Implementation of Emacs Interpreted Objects
|
||||
|
||||
;; Copyright (C) 1995-1996, 1998-2025 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||
;; Version: 1.4
|
||||
;; Old-Version: 1.4
|
||||
;; Keywords: OO, lisp
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
|
@ -44,14 +44,6 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(defvar eieio-version "1.4"
|
||||
"Current version of EIEIO.")
|
||||
|
||||
(defun eieio-version ()
|
||||
"Display the current version of EIEIO."
|
||||
(interactive)
|
||||
(message eieio-version))
|
||||
|
||||
(require 'eieio-core)
|
||||
(eval-when-compile (require 'subr-x))
|
||||
|
||||
|
|
@ -297,20 +289,22 @@ and reference them using the function `class-option'."
|
|||
`(defun ,name (&rest slots)
|
||||
,(internal--format-docstring-line
|
||||
"Create a new object of class type `%S'." name)
|
||||
(declare (compiler-macro
|
||||
(lambda (whole)
|
||||
(if (not (stringp (car slots)))
|
||||
whole
|
||||
(macroexp-warn-and-return
|
||||
(format "Obsolete name arg %S to constructor %S"
|
||||
(car slots) (car whole))
|
||||
;; Keep the name arg, for backward compatibility,
|
||||
;; but hide it so we don't trigger indefinitely.
|
||||
`(,(car whole) (identity ,(car slots))
|
||||
,@(cdr slots))
|
||||
nil nil (car slots))))))
|
||||
(declare (compiler-macro eieio--constructor-macro))
|
||||
(apply #'make-instance ',name slots))))))
|
||||
|
||||
(defun eieio--constructor-macro (whole &rest slots)
|
||||
(if (or (null slots) (keywordp (car slots))
|
||||
;; Detect the second pass!
|
||||
(eq 'identity (car-safe (car slots))))
|
||||
whole
|
||||
(macroexp-warn-and-return
|
||||
(format "Obsolete name arg %S to constructor %S"
|
||||
(car slots) (car whole))
|
||||
;; Keep the name arg, for backward compatibility,
|
||||
;; but hide it so we don't trigger indefinitely.
|
||||
`(,(car whole) (identity ,(car slots))
|
||||
,@(cdr slots))
|
||||
nil nil (car slots))))
|
||||
|
||||
;;; Get/Set slots in an object.
|
||||
;;
|
||||
|
|
@ -1004,6 +998,19 @@ of `eq'."
|
|||
(error "EIEIO: `change-class' is unimplemented"))
|
||||
(define-obsolete-function-alias 'change-class #'eieio-change-class "26.1")
|
||||
|
||||
|
||||
;;; Obsolete
|
||||
;;
|
||||
(make-obsolete-variable 'eieio-version 'emacs-version "31.1")
|
||||
(defvar eieio-version "1.4"
|
||||
"Current version of EIEIO.")
|
||||
|
||||
(defun eieio-version ()
|
||||
"Display the current version of EIEIO."
|
||||
(declare (obsolete emacs-version "31.1"))
|
||||
(interactive)
|
||||
(message eieio-version))
|
||||
|
||||
(provide 'eieio)
|
||||
|
||||
;;; eieio.el ends here
|
||||
|
|
|
|||
|
|
@ -138,6 +138,14 @@ is only skipped if the documentation needs to be truncated there."
|
|||
(const :tag "Skip echo area if truncating" maybe))
|
||||
:version "28.1")
|
||||
|
||||
(defcustom eldoc-help-at-pt nil
|
||||
"If non-nil, show `help-at-pt-kbd-string' at point via Eldoc.
|
||||
This setting is an alternative to `help-at-pt-display-when-idle'. If
|
||||
the value is non-nil, `eldoc-show-help-at-pt' will show help-at-point
|
||||
via Eldoc."
|
||||
:type 'boolean
|
||||
:version "31.1")
|
||||
|
||||
(defface eldoc-highlight-function-argument
|
||||
'((t (:inherit bold)))
|
||||
"Face used for the argument at point in a function's argument list.
|
||||
|
|
@ -410,7 +418,7 @@ Also store it in `eldoc-last-message' and return that value."
|
|||
(overlay-end show-paren--overlay)))))))
|
||||
|
||||
|
||||
(defvar eldoc-documentation-functions nil
|
||||
(defvar eldoc-documentation-functions (list #'eldoc-show-help-at-pt)
|
||||
"Hook of functions that produce doc strings.
|
||||
|
||||
A doc string is typically relevant if point is on a function-like
|
||||
|
|
@ -957,6 +965,12 @@ the docstrings eventually produced, using
|
|||
(setq eldoc--last-request-state token)
|
||||
(eldoc--invoke-strategy nil))))))
|
||||
|
||||
(defun eldoc-show-help-at-pt (&rest _)
|
||||
"Show help at point via Eldoc if `eldoc-help-at-pt' is non-nil.
|
||||
Intended for `eldoc-documentation-functions' (which see)."
|
||||
(when-let* ((help (and eldoc-help-at-pt (help-at-pt-kbd-string))))
|
||||
(format "Help: %s" (substitute-command-keys help))))
|
||||
|
||||
|
||||
;; This section only affects ElDoc output to the echo area, as in
|
||||
;; `eldoc-display-in-echo-area'.
|
||||
|
|
@ -994,7 +1008,7 @@ the docstrings eventually produced, using
|
|||
|
||||
;; Prime the command list.
|
||||
(eldoc-add-command-completions
|
||||
"back-to-indentation"
|
||||
"comment-indent-new-line" "delete-char" "back-to-indentation"
|
||||
"backward-" "beginning-of-" "delete-other-windows" "delete-window"
|
||||
"down-list" "end-of-" "exchange-point-and-mark" "forward-" "goto-"
|
||||
"handle-select-window" "indent-for-tab-command" "left-" "mark-page"
|
||||
|
|
|
|||
|
|
@ -422,16 +422,23 @@ and aborts the current test as failed if it doesn't."
|
|||
(cl-defmacro should-error (form &rest keys &key type exclude-subtypes)
|
||||
"Evaluate FORM and check that it signals an error.
|
||||
|
||||
The error signaled needs to match TYPE. TYPE should be a list
|
||||
of condition names. (It can also be a non-nil symbol, which is
|
||||
equivalent to a singleton list containing that symbol.) If
|
||||
EXCLUDE-SUBTYPES is nil, the error matches TYPE if one of its
|
||||
condition names is an element of TYPE. If EXCLUDE-SUBTYPES is
|
||||
non-nil, the error matches TYPE if it is an element of TYPE.
|
||||
If no error was signaled, abort the test as failed and
|
||||
return (ERROR-SYMBOL . DATA) from the error.
|
||||
|
||||
If the error matches, returns (ERROR-SYMBOL . DATA) from the
|
||||
error. If not, or if no error was signaled, abort the test as
|
||||
failed."
|
||||
You can also match specific errors using the KEYWORD-ARGS arguments,
|
||||
which is specified as keyword/argument pairs. The following arguments
|
||||
are defined:
|
||||
|
||||
:type TYPE -- If TYPE is non-nil, the error signaled needs to match
|
||||
TYPE. TYPE should be a list of condition names. It can also be a
|
||||
symbol, which is equivalent to a one-element list containing that
|
||||
symbol.
|
||||
|
||||
:exclude-subtypes EXCLUDED -- If EXCLUDED is non-nil, the error matches
|
||||
TYPE only if it is an element of TYPE. If nil (the default), the error
|
||||
matches TYPE if one of its condition names is an element of TYPE.
|
||||
|
||||
\(fn FORM &rest KEYWORD-ARGS)"
|
||||
(declare (debug t))
|
||||
(unless type (setq type ''error))
|
||||
(ert--expand-should
|
||||
|
|
@ -662,6 +669,19 @@ Return nil if they are."
|
|||
(put 'equal-including-properties 'ert-explainer
|
||||
'ert--explain-equal-including-properties)
|
||||
|
||||
(defun ert--explain-time-equal-p (a b)
|
||||
"Explainer function for `time-equal-p'.
|
||||
A and B are the time values to compare."
|
||||
(declare (ftype (function (t t) list))
|
||||
(side-effect-free t))
|
||||
(unless (time-equal-p a b)
|
||||
`(different-time-values
|
||||
,(format-time-string "%F %T.%N%z" a t)
|
||||
,(format-time-string "%F %T.%N%z" b t)
|
||||
difference
|
||||
,(format-time-string "%s.%N" (time-subtract a b) t))))
|
||||
(function-put #'time-equal-p 'ert-explainer #'ert--explain-time-equal-p)
|
||||
|
||||
;;; Implementation of `ert-info'.
|
||||
|
||||
;; TODO(ohler): The name `info' clashes with
|
||||
|
|
|
|||
|
|
@ -144,6 +144,16 @@ Instead of regexp variable, types can be mapped to functions as well,
|
|||
in which case the function is called with one argument (the object
|
||||
we're looking for) and it should search for it.
|
||||
|
||||
A value can also be a cons (REGEX . EXPANDED-FORM-MATCHER-FACTORY).
|
||||
REGEX is as above; EXPANDED-FORM-MATCHER-FACTORY is a function of one
|
||||
argument, the same object we'd pass to a REGEX function; it should return
|
||||
another function of one argument that returns non-nil if we're looking at
|
||||
a macroexpanded form that defines the object we're looking for.
|
||||
If you want to use EXPANDED-FORM-MATCHER-FACTORY exclusively, you can
|
||||
set REGEX to a never-match regexp, and force the fallback to
|
||||
EXPANDED-FORM-MATCHER-FACTORY. EXPANDED-FORM-MATCHER-FACTORY is
|
||||
called with the buffer to search the current one.
|
||||
|
||||
Symbols can have their own version of this alist on
|
||||
the property `find-function-type-alist'.
|
||||
See the function `find-function-update-type-alist'.")
|
||||
|
|
@ -434,7 +444,13 @@ The search is done in the source for library LIBRARY."
|
|||
(regexp-symbol
|
||||
(or (and (symbolp symbol)
|
||||
(alist-get type (get symbol 'find-function-type-alist)))
|
||||
(alist-get type find-function-regexp-alist))))
|
||||
(alist-get type find-function-regexp-alist)))
|
||||
(form-matcher-factory
|
||||
(and (functionp (cdr-safe regexp-symbol))
|
||||
(cdr regexp-symbol)))
|
||||
(regexp-symbol (if form-matcher-factory
|
||||
(car regexp-symbol)
|
||||
regexp-symbol)))
|
||||
(with-current-buffer (find-file-noselect filename)
|
||||
(let ((regexp (if (functionp regexp-symbol) regexp-symbol
|
||||
(format (symbol-value regexp-symbol)
|
||||
|
|
@ -474,7 +490,8 @@ The search is done in the source for library LIBRARY."
|
|||
;; expands macros until it finds the symbol.
|
||||
(cons (current-buffer)
|
||||
(find-function--search-by-expanding-macros
|
||||
(current-buffer) symbol type))))))))))
|
||||
(current-buffer) symbol type
|
||||
form-matcher-factory))))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun find-function-update-type-alist (symbol type variable)
|
||||
|
|
@ -506,19 +523,13 @@ Return t if any PRED returns t."
|
|||
(find-function--any-subform-p left-child pred)
|
||||
(find-function--any-subform-p right-child pred))))))
|
||||
|
||||
(defun find-function--search-by-expanding-macros (buf symbol type)
|
||||
(defun find-function--search-by-expanding-macros
|
||||
(buf symbol type matcher-factory)
|
||||
"Expand macros in BUF to search for the definition of SYMBOL of TYPE."
|
||||
(catch 'found
|
||||
(with-current-buffer buf
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(condition-case nil
|
||||
(while t
|
||||
(let ((form (read (current-buffer)))
|
||||
(expected-symbol-p
|
||||
(lambda (form)
|
||||
(cond
|
||||
((null type)
|
||||
(with-current-buffer buf
|
||||
(when-let* ((expected-symbol-p
|
||||
(cond ((null type)
|
||||
(lambda (form)
|
||||
;; Check if a given form is a `defalias' to
|
||||
;; SYM, the function name we are searching
|
||||
;; for. All functions in Emacs Lisp
|
||||
|
|
@ -526,20 +537,28 @@ Return t if any PRED returns t."
|
|||
;; after several steps of macroexpansion.
|
||||
(and (eq (car-safe form) 'defalias)
|
||||
(equal (car-safe (cdr form))
|
||||
`(quote ,symbol))))
|
||||
((eq type 'defvar)
|
||||
`(quote ,symbol)))))
|
||||
((eq type 'defvar)
|
||||
(lambda (form)
|
||||
;; Variables generated by macros ultimately
|
||||
;; expand to `defvar'.
|
||||
(and (eq (car-safe form) 'defvar)
|
||||
(eq (car-safe (cdr form)) symbol)))
|
||||
(t nil)))))
|
||||
(eq (car-safe (cdr form)) symbol))))
|
||||
(matcher-factory
|
||||
(funcall matcher-factory symbol)))))
|
||||
(catch 'found
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(condition-case nil
|
||||
(while t
|
||||
(when (find-function--any-subform-p
|
||||
(find-function--try-macroexpand form)
|
||||
(find-function--try-macroexpand
|
||||
(read (current-buffer)))
|
||||
expected-symbol-p)
|
||||
;; We want to return the location at the beginning
|
||||
;; of the macro, so move back one sexp.
|
||||
(throw 'found (progn (backward-sexp) (point))))))
|
||||
(end-of-file nil))))))
|
||||
(throw 'found (progn (backward-sexp) (point)))))
|
||||
(end-of-file nil)))))))
|
||||
|
||||
(defun find-function-library (function &optional lisp-only verbose)
|
||||
"Return the pair (ORIG-FUNCTION . LIBRARY) for FUNCTION.
|
||||
|
|
|
|||
|
|
@ -317,11 +317,14 @@ The return value is the last VAL in the list.
|
|||
|
||||
;;;###autoload
|
||||
(defmacro incf (place &optional delta)
|
||||
"Increment PLACE by DELTA (default to 1).
|
||||
"Increment generalized variable PLACE by DELTA (default to 1).
|
||||
|
||||
The DELTA is first added to PLACE, and then stored in PLACE.
|
||||
Return the incremented value of PLACE.
|
||||
|
||||
For more information about generalized variables, see Info node
|
||||
`(elisp) Generalized Variables'.
|
||||
|
||||
See also `decf'."
|
||||
(declare (debug (gv-place &optional form)))
|
||||
(gv-letplace (getter setter) place
|
||||
|
|
@ -329,11 +332,14 @@ See also `decf'."
|
|||
|
||||
;;;###autoload
|
||||
(defmacro decf (place &optional delta)
|
||||
"Decrement PLACE by DELTA (default to 1).
|
||||
"Decrement generalized variable PLACE by DELTA (default to 1).
|
||||
|
||||
The DELTA is first subtracted from PLACE, and then stored in PLACE.
|
||||
Return the decremented value of PLACE.
|
||||
|
||||
For more information about generalized variables, see Info node
|
||||
`(elisp) Generalized Variables'.
|
||||
|
||||
See also `incf'."
|
||||
(declare (debug (gv-place &optional form)))
|
||||
(gv-letplace (getter setter) place
|
||||
|
|
@ -678,6 +684,8 @@ REF must have been previously obtained with `gv-ref'."
|
|||
`(insert (prog1 ,store (erase-buffer))))
|
||||
(make-obsolete-generalized-variable 'buffer-string nil "29.1")
|
||||
|
||||
;; FIXME: Can't use `replace-region-contents' because it's not
|
||||
;; expected to be costly, so we need to pass MAX-SECS==0.
|
||||
(gv-define-simple-setter buffer-substring cl--set-buffer-substring)
|
||||
(make-obsolete-generalized-variable 'buffer-substring nil "29.1")
|
||||
|
||||
|
|
|
|||
|
|
@ -403,8 +403,7 @@ If MAP is a plist, TESTFN defaults to `eq'."
|
|||
|
||||
(cl-defmethod map-contains-key ((map hash-table) key &optional _testfn)
|
||||
"Return non-nil if MAP contains KEY, ignoring TESTFN."
|
||||
(let ((v '(nil)))
|
||||
(not (eq v (gethash key map v)))))
|
||||
(hash-table-contains-p key map))
|
||||
|
||||
(cl-defgeneric map-some (pred map)
|
||||
"Return the first non-nil value from applying PRED to elements of MAP.
|
||||
|
|
|
|||
|
|
@ -710,6 +710,8 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
|
|||
"Other Hash Table Functions"
|
||||
(hash-table-p
|
||||
:eval (hash-table-p 123))
|
||||
(hash-table-contains-p
|
||||
:no-eval (hash-table-contains-p 'key table))
|
||||
(copy-hash-table
|
||||
:no-eval (copy-hash-table table)
|
||||
:result-string "#s(hash-table ...)")
|
||||
|
|
|
|||
|
|
@ -2063,7 +2063,7 @@ position corresponding to each rule."
|
|||
(interactive "P")
|
||||
(let ((trace (cdr (smie-config--get-trace))))
|
||||
(cond
|
||||
((null trace) (message "No SMIE rules involved"))
|
||||
((null trace) (message "No SMIE rules involved at this position"))
|
||||
((not arg)
|
||||
(message "Rules used: %s"
|
||||
(mapconcat (lambda (elem)
|
||||
|
|
|
|||
|
|
@ -281,35 +281,6 @@ the string."
|
|||
(declare (pure t) (side-effect-free t))
|
||||
(string-remove-suffix "\n" string))
|
||||
|
||||
(defun replace-region-contents (beg end replace-fn
|
||||
&optional max-secs max-costs)
|
||||
"Replace the region between BEG and END using REPLACE-FN.
|
||||
REPLACE-FN runs on the current buffer narrowed to the region. It
|
||||
should return either a string or a buffer replacing the region.
|
||||
|
||||
The replacement is performed using `replace-buffer-contents'
|
||||
which also describes the MAX-SECS and MAX-COSTS arguments and the
|
||||
return value.
|
||||
|
||||
Note: If the replacement is a string, it'll be placed in a
|
||||
temporary buffer so that `replace-buffer-contents' can operate on
|
||||
it. Therefore, if you already have the replacement in a buffer,
|
||||
it makes no sense to convert it to a string using
|
||||
`buffer-substring' or similar."
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(narrow-to-region beg end)
|
||||
(goto-char (point-min))
|
||||
(let ((repl (funcall replace-fn)))
|
||||
(if (bufferp repl)
|
||||
(replace-buffer-contents repl max-secs max-costs)
|
||||
(let ((source-buffer (current-buffer)))
|
||||
(with-temp-buffer
|
||||
(insert repl)
|
||||
(let ((tmp-buffer (current-buffer)))
|
||||
(set-buffer source-buffer)
|
||||
(replace-buffer-contents tmp-buffer max-secs max-costs)))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defmacro named-let (name bindings &rest body)
|
||||
"Looping construct taken from Scheme.
|
||||
|
|
@ -389,8 +360,8 @@ buffer when possible, instead of creating a new one on each call."
|
|||
;;;###autoload
|
||||
(defun string-pixel-width (string &optional buffer)
|
||||
"Return the width of STRING in pixels.
|
||||
If BUFFER is non-nil, use the face remappings from that buffer when
|
||||
determining the width.
|
||||
If BUFFER is non-nil, use the face remappings, alternative and default
|
||||
properties from that buffer when determining the width.
|
||||
If you call this function to measure pixel width of a string
|
||||
with embedded newlines, it returns the width of the widest
|
||||
substring that does not include newlines."
|
||||
|
|
@ -400,11 +371,14 @@ substring that does not include newlines."
|
|||
;; Keeping a work buffer around is more efficient than creating a
|
||||
;; new temporary buffer.
|
||||
(with-work-buffer
|
||||
(if buffer
|
||||
(setq-local face-remapping-alist
|
||||
(with-current-buffer buffer
|
||||
face-remapping-alist))
|
||||
(kill-local-variable 'face-remapping-alist))
|
||||
;; Setup current buffer to correctly compute pixel width.
|
||||
(when buffer
|
||||
(dolist (v '(face-remapping-alist
|
||||
char-property-alias-alist
|
||||
default-text-properties))
|
||||
(if (local-variable-p v buffer)
|
||||
(set (make-local-variable v)
|
||||
(buffer-local-value v buffer)))))
|
||||
;; Avoid deactivating the region as side effect.
|
||||
(let (deactivate-mark)
|
||||
(insert string))
|
||||
|
|
@ -413,12 +387,8 @@ substring that does not include newlines."
|
|||
;; (bug#59311). Disable `line-prefix' and `wrap-prefix',
|
||||
;; for the same reason.
|
||||
(add-text-properties
|
||||
(point-min) (point-max) '(display-line-numbers-disable t))
|
||||
;; Prefer `remove-text-properties' to `propertize' to avoid
|
||||
;; creating a new string on each call.
|
||||
(remove-text-properties
|
||||
(point-min) (point-max) '(line-prefix nil wrap-prefix nil))
|
||||
(setq line-prefix nil wrap-prefix nil)
|
||||
(point-min) (point-max)
|
||||
'(display-line-numbers-disable t line-prefix "" wrap-prefix ""))
|
||||
(car (buffer-text-pixel-size nil nil t)))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ iteratively copies its cdr. When VECP is non-nil, copy
|
|||
vectors as well as conses."
|
||||
(if (and (atom obj) (or (not vecp) (not (vectorp obj))))
|
||||
obj
|
||||
(let ((copy (gethash obj hash-table nil)))
|
||||
(let ((copy (gethash obj hash-table)))
|
||||
(unless copy
|
||||
(cond
|
||||
((consp obj)
|
||||
|
|
@ -315,7 +315,7 @@ vectors as well as conses."
|
|||
(testcover--copy-object1 rest vecp hash-table))
|
||||
nil)
|
||||
((gethash rest hash-table nil)
|
||||
(setf (cdr current) (gethash rest hash-table nil))
|
||||
(setf (cdr current) (gethash rest hash-table))
|
||||
nil)
|
||||
(t (setq current
|
||||
(setf (cdr current) (cons nil nil)))))))))
|
||||
|
|
|
|||
|
|
@ -373,9 +373,10 @@ entirely by setting `warning-suppress-types' or
|
|||
(let ((window (display-buffer
|
||||
buffer
|
||||
(when warning-display-at-bottom
|
||||
'(display-buffer--maybe-at-bottom
|
||||
(window-height . (lambda (window)
|
||||
(fit-window-to-buffer window 10)))
|
||||
`(display-buffer--maybe-at-bottom
|
||||
(window-height
|
||||
. ,(lambda (window)
|
||||
(fit-window-to-buffer window 10)))
|
||||
(category . warning))))))
|
||||
(when (and window (markerp warning-series)
|
||||
(eq (marker-buffer warning-series) buffer))
|
||||
|
|
|
|||
|
|
@ -117,11 +117,10 @@ EXPANDED-PATTERN."
|
|||
completion-category-defaults)))
|
||||
(let ((cache (make-hash-table :test #'equal)))
|
||||
(cl-flet ((lookup-internal (string point)
|
||||
(let* ((key (cons string point))
|
||||
(probe (gethash key cache 'external--notfound)))
|
||||
(if (eq probe 'external--notfound)
|
||||
(puthash key (funcall lookup string point) cache)
|
||||
probe))))
|
||||
(let ((key (cons string point)))
|
||||
(if (hash-table-contains-p key cache)
|
||||
(gethash key cache)
|
||||
(puthash key (funcall lookup string point) cache)))))
|
||||
(lambda (string pred action)
|
||||
(pcase action
|
||||
(`metadata
|
||||
|
|
|
|||
|
|
@ -3207,6 +3207,9 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\|SQUASHFS\\)\\'" .
|
|||
("\\.properties\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-javaprop-mode)
|
||||
("\\.toml\\'" . conf-toml-mode)
|
||||
("\\.desktop\\'" . conf-desktop-mode)
|
||||
;; Dot is excluded from npmrc, because global configs may lack it,
|
||||
;; e.g. in /etc/npmrc files.
|
||||
("npmrc\\'" . conf-npmrc-mode)
|
||||
("/\\.redshift\\.conf\\'" . conf-windows-mode)
|
||||
("\\`/etc/\\(?:DIR_COLORS\\|ethers\\|.?fstab\\|.*hosts\\|lesskey\\|login\\.?de\\(?:fs\\|vperm\\)\\|magic\\|mtab\\|pam\\.d/.*\\|permissions\\(?:\\.d/.+\\)?\\|protocols\\|rpc\\|services\\)\\'" . conf-space-mode)
|
||||
("\\`/etc/\\(?:acpid?/.+\\|aliases\\(?:\\.d/.+\\)?\\|default/.+\\|group-?\\|hosts\\..+\\|inittab\\|ksysguarddrc\\|opera6rc\\|passwd-?\\|shadow-?\\|sysconfig/.+\\)\\'" . conf-mode)
|
||||
|
|
@ -4713,21 +4716,22 @@ the \".dir-locals.el\".
|
|||
|
||||
See Info node `(elisp)Directory Local Variables' for details.")
|
||||
|
||||
(defun dir-locals--all-files (directory)
|
||||
(defun dir-locals--all-files (directory &optional base-el-only)
|
||||
"Return a list of all readable dir-locals files in DIRECTORY.
|
||||
The returned list is sorted by increasing priority. That is,
|
||||
values specified in the last file should take precedence over
|
||||
those in the first."
|
||||
(when (file-readable-p directory)
|
||||
(let* ((file-1 (expand-file-name (if (eq system-type 'ms-dos)
|
||||
(dosified-file-name dir-locals-file)
|
||||
dir-locals-file)
|
||||
directory))
|
||||
(dosified-file-name dir-locals-file)
|
||||
dir-locals-file)
|
||||
directory))
|
||||
(file-2 (when (string-match "\\.el\\'" file-1)
|
||||
(replace-match "-2.el" t nil file-1)))
|
||||
(out nil))
|
||||
;; The order here is important.
|
||||
(dolist (f (list file-2 file-1))
|
||||
out)
|
||||
(dolist (f (or (and base-el-only (list file-1))
|
||||
;; The order here is important.
|
||||
(list file-2 file-1)))
|
||||
(when (and f
|
||||
(file-readable-p f)
|
||||
;; FIXME: Aren't file-regular-p and
|
||||
|
|
@ -4737,6 +4741,10 @@ those in the first."
|
|||
(push f out)))
|
||||
out)))
|
||||
|
||||
(defun dir-locals--base-file (directory)
|
||||
"Return readable `dir-locals-file' in DIRECTORY, or nil."
|
||||
(dir-locals--all-files directory 'base-el-only))
|
||||
|
||||
(defun dir-locals-find-file (file)
|
||||
"Find the directory-local variables for FILE.
|
||||
This searches upward in the directory tree from FILE.
|
||||
|
|
@ -4758,7 +4766,7 @@ This function returns either:
|
|||
entry."
|
||||
(setq file (expand-file-name file))
|
||||
(let* ((locals-dir (locate-dominating-file (file-name-directory file)
|
||||
#'dir-locals--all-files))
|
||||
#'dir-locals--base-file))
|
||||
dir-elt)
|
||||
;; `locate-dominating-file' may have abbreviated the name.
|
||||
(when locals-dir
|
||||
|
|
@ -6288,7 +6296,10 @@ Before and after saving the buffer, this function runs
|
|||
(if (not enable-recursive-minibuffers)
|
||||
(progn (display-buffer buf)
|
||||
(setq other-window-scroll-buffer buf))
|
||||
(view-buffer buf (lambda (_) (exit-recursive-edit)))
|
||||
;; Like 'view-buffer' but ignore 'special' mode-class
|
||||
;; because 'q' should call 'exit-action' in any case:
|
||||
(switch-to-buffer buf)
|
||||
(view-mode-enter nil (lambda (_) (exit-recursive-edit)))
|
||||
(recursive-edit))
|
||||
;; Return nil to ask about BUF again.
|
||||
nil)
|
||||
|
|
@ -6307,7 +6318,10 @@ Before and after saving the buffer, this function runs
|
|||
(if (not enable-recursive-minibuffers)
|
||||
(progn (display-buffer diffbuf)
|
||||
(setq other-window-scroll-buffer diffbuf))
|
||||
(view-buffer diffbuf (lambda (_) (exit-recursive-edit)))
|
||||
;; Like 'view-buffer' but ignore 'special' mode-class
|
||||
;; because 'q' should call 'exit-action' in any case:
|
||||
(switch-to-buffer diffbuf)
|
||||
(view-mode-enter nil (lambda (_) (exit-recursive-edit)))
|
||||
(recursive-edit))))
|
||||
;; Return nil to ask about BUF again.
|
||||
nil)
|
||||
|
|
@ -7250,9 +7264,9 @@ an auto-save file."
|
|||
The command tries to preserve markers, properties and overlays.
|
||||
If the operation takes more than this time, a single
|
||||
delete+insert is performed. Actually, this value is passed as
|
||||
the MAX-SECS argument to the function `replace-buffer-contents',
|
||||
the MAX-SECS argument to the function `replace-region-contents',
|
||||
so it is not ensured that the whole execution won't take longer.
|
||||
See `replace-buffer-contents' for more details.")
|
||||
See `replace-region-contents' for more details.")
|
||||
|
||||
(defun revert-buffer-insert-file-contents-delicately (file-name _auto-save-p)
|
||||
"Optional function for `revert-buffer-insert-file-contents-function'.
|
||||
|
|
@ -7261,11 +7275,11 @@ The function `revert-buffer-with-fine-grain' uses this function by binding
|
|||
|
||||
As with `revert-buffer-insert-file-contents--default-function', FILE-NAME is
|
||||
the name of the file and AUTO-SAVE-P is non-nil if this is an auto-save file.
|
||||
Since calling `replace-buffer-contents' can take a long time, depending of
|
||||
Since calling `replace-region-contents' can take a long time, depending of
|
||||
the number of changes made to the buffer, it uses the value of the variable
|
||||
`revert-buffer-with-fine-grain-max-seconds' as a maximum time to try delicately
|
||||
reverting the buffer. If it fails, it does a delete+insert. For more details,
|
||||
see `replace-buffer-contents'."
|
||||
see `replace-region-contents'."
|
||||
(cond
|
||||
((not (file-exists-p file-name))
|
||||
(error (if buffer-file-number
|
||||
|
|
@ -7288,7 +7302,8 @@ see `replace-buffer-contents'."
|
|||
(let ((temp-buf (current-buffer)))
|
||||
(set-buffer buf)
|
||||
(let ((buffer-file-name nil))
|
||||
(replace-buffer-contents
|
||||
(replace-region-contents
|
||||
(point-min) (point-max)
|
||||
temp-buf
|
||||
revert-buffer-with-fine-grain-max-seconds))))))))
|
||||
;; See comments in revert-buffer-with-fine-grain for an explanation.
|
||||
|
|
|
|||
|
|
@ -2402,16 +2402,16 @@ This should be an integer. Used in `cpp-font-lock-keywords'.")
|
|||
1 font-lock-string-face prepend)
|
||||
;;
|
||||
;; Fontify function macro names.
|
||||
'("^#[ \t]*define[ \t]+\\([[:alpha:]_][[:alnum:]_$]*\\)("
|
||||
`("^#[ \t]*define[ \t]+\\([[:alpha:]_][[:alnum:]_$]*\\)("
|
||||
(1 font-lock-function-name-face prepend)
|
||||
;;
|
||||
;; Macro arguments.
|
||||
((lambda (limit)
|
||||
(re-search-forward
|
||||
"\\(?:\\([[:alpha:]_][[:alnum:]_]*\\)[,]?\\)"
|
||||
(or (save-excursion (re-search-forward ")" limit t))
|
||||
limit)
|
||||
t))
|
||||
(,(lambda (limit)
|
||||
(re-search-forward
|
||||
"\\(?:\\([[:alpha:]_][[:alnum:]_]*\\)[,]?\\)"
|
||||
(or (save-excursion (re-search-forward ")" limit t))
|
||||
limit)
|
||||
t))
|
||||
nil nil (1 font-lock-variable-name-face prepend)))
|
||||
;;
|
||||
;; Fontify symbol names in #elif or #if ... defined preprocessor directives.
|
||||
|
|
|
|||
|
|
@ -107,6 +107,13 @@ This variable should never be set directly, but bound before a call to
|
|||
"application/octet-stream"
|
||||
(mailcap-extension-to-mime (match-string 0 file))))
|
||||
|
||||
(defun mm-default-buffer-type (buffer)
|
||||
"Return a default content type for BUFFER, a buffer name."
|
||||
(if-let* ((buf (get-buffer buffer))
|
||||
((provided-mode-derived-p (buffer-local-value 'major-mode buf)
|
||||
'diff-mode)))
|
||||
"text/x-patch" "text/plain"))
|
||||
|
||||
(defun mm-safer-encoding (encoding &optional type)
|
||||
"Return an encoding similar to ENCODING but safer than it."
|
||||
(cond
|
||||
|
|
|
|||
|
|
@ -1508,7 +1508,8 @@ FILENAME is a suggested file name for the attachment should a
|
|||
recipient wish to save a copy separate from the message."
|
||||
(interactive
|
||||
(let* ((buffer (read-buffer "Attach buffer: "))
|
||||
(type (mml-minibuffer-read-type buffer "text/plain"))
|
||||
(type (mml-minibuffer-read-type
|
||||
buffer (mm-default-buffer-type buffer)))
|
||||
(description (mml-minibuffer-read-description))
|
||||
(disposition (mml-minibuffer-read-disposition type nil)))
|
||||
(list buffer type description disposition)))
|
||||
|
|
|
|||
|
|
@ -191,7 +191,12 @@ list of properties through Custom will set the timer, thus
|
|||
enabling buffer local values. It sets the actual value to nil.
|
||||
Thus, Custom distinguishes between a nil value and other values
|
||||
that disable the feature, which Custom identifies with `never'.
|
||||
The default is `never'."
|
||||
The default is `never'.
|
||||
|
||||
Eldoc uses the echo area to display documentation. As such it
|
||||
conflicts with `help-at-pt-display-when-idle' due to the use of
|
||||
the echo area. If you use Eldoc, consider setting
|
||||
`eldoc-help-at-pt' instead."
|
||||
:group 'help-at-pt
|
||||
:type '(choice (const :tag "Always"
|
||||
:format "%t\n%h"
|
||||
|
|
|
|||
|
|
@ -760,17 +760,24 @@ the C sources, too."
|
|||
(high-doc (cdr high)))
|
||||
(unless (and (symbolp function)
|
||||
(get function 'reader-construct))
|
||||
(insert high-usage "\n")
|
||||
(when-let* ((gate help-display-function-type)
|
||||
(res (comp-function-type-spec function))
|
||||
(type-spec (car res))
|
||||
(kind (cdr res)))
|
||||
(insert (format
|
||||
(if (eq kind 'inferred)
|
||||
"\nInferred type: %s\n"
|
||||
"\nDeclared type: %s\n")
|
||||
type-spec))))
|
||||
(insert high-usage "\n"))
|
||||
(fill-region fill-begin (point))
|
||||
(when-let* (help-display-function-type
|
||||
(res (comp-function-type-spec function))
|
||||
(type-spec (car res))
|
||||
(kind (cdr res)))
|
||||
(insert (if (eq kind 'inferred)
|
||||
"\nInferred type:\n "
|
||||
"\nDeclared type:\n "))
|
||||
(with-demoted-errors "%S"
|
||||
(let ((beg (point)))
|
||||
(pp type-spec (current-buffer))
|
||||
;; Put it on a single line if it fits.
|
||||
(and (eql beg (+ 2 (line-beginning-position 0)))
|
||||
(save-excursion
|
||||
(forward-char -1)
|
||||
(<= (current-column) (- fill-column 12)))
|
||||
(replace-region-contents (- beg 3) beg " " 0)))))
|
||||
high-doc)))))
|
||||
|
||||
(defun help-fns--parent-mode (function)
|
||||
|
|
@ -1262,7 +1269,9 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
|
|||
|
||||
(defun help-fns--generalized-variable (function)
|
||||
(when (and (symbolp function)
|
||||
(get function 'gv-expander)
|
||||
(or (get function 'gv-expander)
|
||||
;; This is a hack, see cl-macs.el:
|
||||
(get function 'document-generalized-variable))
|
||||
;; Don't mention obsolete generalized variables.
|
||||
(not (get function 'byte-obsolete-generalized-variable)))
|
||||
(insert (format-message " `%s' is also a " function)
|
||||
|
|
@ -1446,7 +1455,7 @@ it is displayed along with the global value."
|
|||
(let* ((sv (get variable 'standard-value))
|
||||
(origval (and (consp sv)
|
||||
(condition-case nil
|
||||
(eval (car sv) t)
|
||||
(custom--standard-value variable)
|
||||
(error :help-eval-error))))
|
||||
from)
|
||||
(when (and (consp sv)
|
||||
|
|
|
|||
|
|
@ -122,6 +122,33 @@ the command `global-hl-line-mode' to turn Global Hl-Line mode on."
|
|||
:version "24.1"
|
||||
:group 'hl-line)
|
||||
|
||||
(defcustom global-hl-line-modes t
|
||||
"Which major modes `hl-line-mode' is switched on in.
|
||||
This variable can be either t (all major modes), nil (no major modes),
|
||||
or a list of modes and (not modes) to switch use this minor mode or
|
||||
not. For instance
|
||||
|
||||
(c-mode (not message-mode mail-mode) text-mode)
|
||||
|
||||
means \"use this mode in all modes derived from `c-mode', don't use in
|
||||
modes derived from `message-mode' or `mail-mode', but do use in other
|
||||
modes derived from `text-mode'\". An element with value t means \"use\"
|
||||
and nil means \"don't use\". There's an implicit nil at the end of the
|
||||
list."
|
||||
:type
|
||||
'(choice (const :tag "Enable in all major modes" t)
|
||||
(repeat :tag "Rules (earlier takes precedence)..."
|
||||
(choice
|
||||
(const :tag "Enable in all (other) modes" t)
|
||||
(symbol :value fundamental-mode :tag
|
||||
"Enable in major mode")
|
||||
(cons :tag "Don't enable in major modes"
|
||||
(const :tag "Don't enable in..." not)
|
||||
(repeat
|
||||
(symbol :value fundamental-mode :tag
|
||||
"Major mode"))))))
|
||||
:version "31.1")
|
||||
|
||||
(defvar hl-line-range-function nil
|
||||
"If non-nil, function to call to return highlight range.
|
||||
The function of no args should return a cons cell; its car value
|
||||
|
|
@ -236,7 +263,9 @@ on `post-command-hook'."
|
|||
|
||||
(defun global-hl-line-highlight ()
|
||||
"Highlight the current line in the current window."
|
||||
(when global-hl-line-mode ; Might be changed outside the mode function.
|
||||
(require 'easy-mmode)
|
||||
(when (and global-hl-line-mode ; Might be changed outside the mode function.
|
||||
(easy-mmode--globalized-predicate-p global-hl-line-modes))
|
||||
(unless (window-minibuffer-p)
|
||||
(unless (overlayp global-hl-line-overlay)
|
||||
(setq global-hl-line-overlay (hl-line-make-overlay))) ; To be moved.
|
||||
|
|
|
|||
|
|
@ -115,6 +115,18 @@ Otherwise this should be a list of the completion tables (e.g.,
|
|||
"Face used by `icomplete-vertical-mode' for the section title."
|
||||
:version "28.1")
|
||||
|
||||
(defface icomplete-vertical-selected-prefix-indicator-face
|
||||
'((t :inherit font-lock-keyword-face :weight bold :foreground "slate blue"))
|
||||
"Face used by `icomplete-vertical-selected-prefix-indicator'."
|
||||
:group 'icomplete
|
||||
:version "31.1")
|
||||
|
||||
(defface icomplete-vertical-unselected-prefix-indicator-face
|
||||
'((t :inherit font-lock-keyword-face :weight normal :foreground "gray"))
|
||||
"Face used by `icomplete-vertical-unselected-prefix-indicator'."
|
||||
:group 'icomplete
|
||||
:version "31.1")
|
||||
|
||||
;;;_* User Customization variables
|
||||
(defcustom icomplete-prospects-height 2
|
||||
;; We used to compute how many lines 100 characters would take in
|
||||
|
|
@ -166,6 +178,50 @@ will constrain Emacs to a maximum minibuffer height of 3 lines when
|
|||
icompletion is occurring."
|
||||
:type 'hook)
|
||||
|
||||
(defcustom icomplete-vertical-in-buffer-adjust-list nil
|
||||
"Control whether in-buffer completion should align the cursor position.
|
||||
If this is t and `icomplete-in-buffer' is t, and `icomplete-vertical-mode'
|
||||
is activated, the in-buffer vertical completions are shown aligned to the
|
||||
cursor position when the completion started, not on the first column, as
|
||||
the default behavior."
|
||||
:type 'boolean
|
||||
:group 'icomplete
|
||||
:version "31.1")
|
||||
|
||||
(defcustom icomplete-vertical-render-prefix-indicator nil
|
||||
"Control whether an indicator is added as a prefix to each candidate.
|
||||
If this is t and `icomplete-vertical-mode' is activated, an indicator,
|
||||
controlled by `icomplete-vertical-selected-prefix-indicator' is shown
|
||||
as a prefix to the current under selection candidate, while the
|
||||
remaining of the candidates will receive the indicator controlled
|
||||
by `icomplete-vertical-unselected-prefix-indicator'."
|
||||
:type 'boolean
|
||||
:group 'icomplete
|
||||
:version "31.1")
|
||||
|
||||
(defcustom icomplete-vertical-selected-prefix-indicator
|
||||
(if (char-displayable-p ?») "» " "> ")
|
||||
"Prefix string used to mark the selected completion candidate.
|
||||
If `icomplete-vertical-render-prefix-indicator' is t, this string
|
||||
is used as a prefix of the currently selected entry in the list.
|
||||
It can be further customized by the face
|
||||
`icomplete-vertical-selected-prefix-indicator-face'.
|
||||
|
||||
By default, this is set to \"» \" if the character is displayable,
|
||||
otherwise, it falls back to \"> \"."
|
||||
:type 'string
|
||||
:group 'icomplete
|
||||
:version "31.1")
|
||||
|
||||
(defcustom icomplete-vertical-unselected-prefix-indicator " "
|
||||
"Prefix string used on the unselected completion candidates.
|
||||
If `icomplete-vertical-render-prefix-indicator' is t, the string
|
||||
defined here is used as a prefix for all unselected entries in the list.
|
||||
list. It can be further customized by the face
|
||||
`icomplete-vertical-unselected-prefix-indicator-face'."
|
||||
:type 'string
|
||||
:group 'icomplete
|
||||
:version "31.1")
|
||||
|
||||
;;;_* Initialization
|
||||
|
||||
|
|
@ -828,6 +884,58 @@ by `group-function''s second \"transformation\" protocol."
|
|||
else collect (list tr prefix suffix ))
|
||||
annotated)))
|
||||
|
||||
(defun icomplete-vertical--adjust-lines-for-column (lines buffer data)
|
||||
"Adjust the LINES to align with the column in BUFFER based on DATA."
|
||||
(if icomplete-vertical-in-buffer-adjust-list
|
||||
(let* ((column (current-column))
|
||||
(prefix-indicator-width
|
||||
(if icomplete-vertical-render-prefix-indicator
|
||||
(max (length icomplete-vertical-selected-prefix-indicator)
|
||||
(length icomplete-vertical-unselected-prefix-indicator))
|
||||
0))
|
||||
(wrapped-line (with-current-buffer buffer
|
||||
(save-excursion
|
||||
(goto-char (car data))
|
||||
(beginning-of-line)
|
||||
(count-screen-lines (point) (car data)))))
|
||||
(window-width (+ (window-hscroll) (window-body-width)))
|
||||
(longest-line-width (apply #'max (mapcar #'length lines)))
|
||||
(spaces-to-add
|
||||
(if (> wrapped-line 1)
|
||||
(- column (* (- wrapped-line 1) (- window-width 5)))
|
||||
column))
|
||||
(spaces-to-add-avoiding-scrolling
|
||||
(if (>= (+ spaces-to-add longest-line-width prefix-indicator-width) window-width)
|
||||
(- spaces-to-add longest-line-width)
|
||||
spaces-to-add)))
|
||||
|
||||
(mapcar (lambda (line)
|
||||
(concat (make-string spaces-to-add-avoiding-scrolling ?\s) line))
|
||||
lines))
|
||||
lines))
|
||||
|
||||
(defun icomplete-vertical--ensure-visible-lines-inside-buffer ()
|
||||
"Ensure the completion list is visible in regular buffers only.
|
||||
Scrolls the screen to be at least `icomplete-prospects-height' real lines
|
||||
away from the bottom. Counts wrapped lines as real lines."
|
||||
(unless (minibufferp)
|
||||
(let* ((window-height (window-body-height))
|
||||
(current-line (count-screen-lines (window-start) (point)))
|
||||
(lines-to-bottom (- window-height current-line)))
|
||||
(when (< lines-to-bottom icomplete-prospects-height)
|
||||
(scroll-up (- icomplete-prospects-height lines-to-bottom))))))
|
||||
|
||||
(defun icomplete-vertical--add-indicator-to-selected (comp)
|
||||
"Add indicators to the selected/unselected COMP completions."
|
||||
(if (and icomplete-vertical-render-prefix-indicator
|
||||
(get-text-property 0 'icomplete-selected comp))
|
||||
(concat (propertize icomplete-vertical-selected-prefix-indicator
|
||||
'face 'icomplete-vertical-selected-prefix-indicator-face)
|
||||
comp)
|
||||
(concat (propertize icomplete-vertical-unselected-prefix-indicator
|
||||
'face 'icomplete-vertical-unselected-prefix-indicator-face)
|
||||
comp)))
|
||||
|
||||
(cl-defun icomplete--render-vertical
|
||||
(comps md &aux scroll-above scroll-below
|
||||
(total-space ; number of mini-window lines available
|
||||
|
|
@ -843,12 +951,17 @@ by `group-function''s second \"transformation\" protocol."
|
|||
;; - both nil, there is no manual scroll;
|
||||
;; - both non-nil, there is a healthy manual scroll that doesn't need
|
||||
;; to be readjusted (user just moved around the minibuffer, for
|
||||
;; example)l
|
||||
;; example);
|
||||
;; - non-nil and nil, respectively, a refiltering took place and we
|
||||
;; may need to readjust them to the new filtered `comps'.
|
||||
(when (and icomplete-scroll
|
||||
(not icomplete--scrolled-completions)
|
||||
(not icomplete--scrolled-past))
|
||||
(icomplete-vertical--ensure-visible-lines-inside-buffer))
|
||||
(when (and icomplete-scroll
|
||||
icomplete--scrolled-completions
|
||||
(null icomplete--scrolled-past))
|
||||
(icomplete-vertical--ensure-visible-lines-inside-buffer)
|
||||
(cl-loop with preds
|
||||
for (comp . rest) on comps
|
||||
when (equal comp (car icomplete--scrolled-completions))
|
||||
|
|
@ -900,6 +1013,7 @@ by `group-function''s second \"transformation\" protocol."
|
|||
;; of lines to render
|
||||
(cl-loop
|
||||
for (comp prefix suffix section) in tuples
|
||||
do (setq comp (icomplete-vertical--add-indicator-to-selected comp))
|
||||
when section
|
||||
collect (propertize section 'face 'icomplete-section) into lines-aux
|
||||
and count 1 into nsections-aux
|
||||
|
|
@ -907,9 +1021,9 @@ by `group-function''s second \"transformation\" protocol."
|
|||
do (add-face-text-property 0 (length comp)
|
||||
'icomplete-selected-match 'append comp)
|
||||
collect (concat prefix
|
||||
(make-string (- max-prefix-len (length prefix)) ? )
|
||||
(make-string (max 0 (- max-prefix-len (length prefix))) ? )
|
||||
(completion-lazy-hilit comp)
|
||||
(make-string (- max-comp-len (length comp)) ? )
|
||||
(make-string (max 0 (- max-comp-len (length comp))) ? )
|
||||
suffix)
|
||||
into lines-aux
|
||||
finally (setq lines lines-aux
|
||||
|
|
@ -924,6 +1038,9 @@ by `group-function''s second \"transformation\" protocol."
|
|||
((> (length scroll-above) (length scroll-below)) nsections)
|
||||
(t (min (ceiling nsections 2) (length scroll-above))))
|
||||
lines))
|
||||
(when icomplete--in-region-buffer
|
||||
(setq lines (icomplete-vertical--adjust-lines-for-column
|
||||
lines icomplete--in-region-buffer completion-in-region--data)))
|
||||
;; At long last, render final string return value. This may still
|
||||
;; kick out lines at the end.
|
||||
(concat " \n"
|
||||
|
|
|
|||
|
|
@ -3475,9 +3475,9 @@ If FILE is nil, check the current Info file."
|
|||
(defun info--ensure-not-in-directory-node ()
|
||||
(if (equal (downcase (file-name-nondirectory Info-current-file))
|
||||
"dir")
|
||||
(error (substitute-command-keys
|
||||
(concat "The Info directory node has no index; "
|
||||
"type \\[Info-menu] to select a manual")))))
|
||||
(user-error (substitute-command-keys
|
||||
(concat "The Info directory node has no index; "
|
||||
"type `\\[Info-menu]' to select a manual")))))
|
||||
|
||||
;;;###autoload
|
||||
(defun Info-index (topic)
|
||||
|
|
|
|||
|
|
@ -2022,13 +2022,13 @@ See `set-language-info-alist' for use in programs."
|
|||
(set-language-info-alist (car elt) (cdr elt)))
|
||||
;; re-set the environment in case its parameters changed
|
||||
(set-language-environment current-language-environment)))
|
||||
:type '(alist
|
||||
:type `(alist
|
||||
:key-type (string :tag "Language environment"
|
||||
:completions
|
||||
(lambda (string pred action)
|
||||
(let ((completion-ignore-case t))
|
||||
(complete-with-action
|
||||
action language-info-alist string pred))))
|
||||
,(lambda (string pred action)
|
||||
(let ((completion-ignore-case t))
|
||||
(complete-with-action
|
||||
action language-info-alist string pred))))
|
||||
:value-type
|
||||
(alist :key-type symbol
|
||||
:options ((documentation string)
|
||||
|
|
|
|||
|
|
@ -2614,6 +2614,7 @@ KEY BINDINGS FOR TRANSLATION
|
|||
KEY BINDINGS FOR CONVERSION
|
||||
---------------------------\n"))
|
||||
(setq quail-current-package nil)
|
||||
(set-buffer-modified-p nil)
|
||||
;; Resize the help window again, now that it has all its contents.
|
||||
(save-selected-window
|
||||
(select-window (get-buffer-window (current-buffer) t))
|
||||
|
|
|
|||
|
|
@ -685,10 +685,10 @@ This is like `describe-bindings', but displays only Isearch keys."
|
|||
|
||||
(easy-menu-define isearch-menu-bar-map isearch-mode-map
|
||||
"Menu for `isearch-mode'."
|
||||
'("Isearch"
|
||||
`("Isearch"
|
||||
["Cancel search" isearch-cancel
|
||||
:help "Cancel current search and return to starting point"
|
||||
:filter (lambda (binding)
|
||||
:filter ,(lambda (binding)
|
||||
(if isearch-success 'isearch-abort binding))]
|
||||
["Remove characters not found" isearch-abort
|
||||
:help "Quit current search"
|
||||
|
|
@ -4265,7 +4265,7 @@ Attempt to do the search exactly the way the pending Isearch would."
|
|||
(and (eq isearch-lazy-highlight-invisible 'open)
|
||||
'can-be-opened)))
|
||||
(funcall isearch-filter-predicate mb me)))
|
||||
(let ((ov (make-overlay mb me)))
|
||||
(let ((ov (make-overlay mb me nil t nil)))
|
||||
(push ov isearch-lazy-highlight-overlays)
|
||||
;; 1000 is higher than ediff's 100+,
|
||||
;; but lower than isearch main overlay's 1001
|
||||
|
|
|
|||
20
lisp/json.el
20
lisp/json.el
|
|
@ -803,7 +803,7 @@ With prefix argument MINIMIZE, minimize it instead."
|
|||
(orig-buf (current-buffer)))
|
||||
;; Strategy: Repeatedly `json-read' from the original buffer and
|
||||
;; write the pretty-printed snippet to a temporary buffer.
|
||||
;; Use `replace-buffer-contents' to swap the original
|
||||
;; Use `replace-region-contents' to swap the original
|
||||
;; region with the contents of the temporary buffer so that point,
|
||||
;; marks, etc. are kept.
|
||||
;; Stop as soon as we get an error from `json-read'.
|
||||
|
|
@ -825,16 +825,14 @@ With prefix argument MINIMIZE, minimize it instead."
|
|||
(standard-output tmp-buf))
|
||||
(with-current-buffer tmp-buf
|
||||
(erase-buffer) (json--print json))
|
||||
(save-restriction
|
||||
(narrow-to-region beg (point))
|
||||
(replace-buffer-contents
|
||||
tmp-buf
|
||||
json-pretty-print-max-secs
|
||||
;; FIXME: What's a good value here? Can we use
|
||||
;; something better, e.g., by deriving a value
|
||||
;; from the size of the region?
|
||||
64)
|
||||
'keep-going))
|
||||
(replace-region-contents
|
||||
beg (point) tmp-buf
|
||||
json-pretty-print-max-secs
|
||||
;; FIXME: What's a good value here? Can we use
|
||||
;; something better, e.g., by deriving a value
|
||||
;; from the size of the region?
|
||||
64)
|
||||
'keep-going)
|
||||
;; EOF is expected because we json-read until we hit
|
||||
;; the end of the narrow region.
|
||||
(json-end-of-file nil))))))))))
|
||||
|
|
|
|||
|
|
@ -109,11 +109,11 @@
|
|||
(coding-system-put 'chinese-hz :ascii-compatible-p nil)
|
||||
|
||||
(set-language-info-alist
|
||||
"Chinese-GB" '((charset chinese-gb2312 chinese-sisheng)
|
||||
"Chinese-GB" `((charset chinese-gb2312 chinese-sisheng)
|
||||
(iso639-language . zh)
|
||||
(cjk-locale-symbol . zh_CN)
|
||||
(setup-function . (lambda ()
|
||||
(use-cjk-char-width-table 'zh_CN)))
|
||||
(setup-function . ,(lambda ()
|
||||
(use-cjk-char-width-table 'zh_CN)))
|
||||
(exit-function . use-default-char-width-table)
|
||||
(coding-system chinese-iso-8bit iso-2022-cn chinese-hz)
|
||||
(coding-priority chinese-iso-8bit chinese-gbk chinese-big5
|
||||
|
|
@ -141,11 +141,11 @@
|
|||
(define-coding-system-alias 'cp950 'chinese-big5)
|
||||
|
||||
(set-language-info-alist
|
||||
"Chinese-BIG5" '((charset chinese-big5-1 chinese-big5-2)
|
||||
"Chinese-BIG5" `((charset chinese-big5-1 chinese-big5-2)
|
||||
(iso639-language . zh)
|
||||
(cjk-locale-symbol . zh_HK)
|
||||
(setup-function . (lambda ()
|
||||
(use-cjk-char-width-table 'zh_HK)))
|
||||
(setup-function . ,(lambda ()
|
||||
(use-cjk-char-width-table 'zh_HK)))
|
||||
(exit-function . use-default-char-width-table)
|
||||
(coding-system chinese-big5 chinese-iso-7bit)
|
||||
(coding-priority chinese-big5 iso-2022-cn chinese-iso-8bit
|
||||
|
|
@ -195,14 +195,14 @@
|
|||
(define-coding-system-alias 'euc-taiwan 'euc-tw)
|
||||
|
||||
(set-language-info-alist
|
||||
"Chinese-CNS" '((charset chinese-cns11643-1 chinese-cns11643-2
|
||||
"Chinese-CNS" `((charset chinese-cns11643-1 chinese-cns11643-2
|
||||
chinese-cns11643-3 chinese-cns11643-4
|
||||
chinese-cns11643-5 chinese-cns11643-6
|
||||
chinese-cns11643-7)
|
||||
(iso639-language . zh)
|
||||
(cjk-locale-symbol . zh_TW)
|
||||
(setup-function . (lambda ()
|
||||
(use-cjk-char-width-table 'zh_TW)))
|
||||
(setup-function . ,(lambda ()
|
||||
(use-cjk-char-width-table 'zh_TW)))
|
||||
(exit-function . use-default-char-width-table)
|
||||
(coding-system iso-2022-cn euc-tw)
|
||||
(coding-priority iso-2022-cn euc-tw chinese-big5
|
||||
|
|
@ -216,14 +216,14 @@ accepts Big5 for input also (which is then converted to CNS)."))
|
|||
'("Chinese"))
|
||||
|
||||
(set-language-info-alist
|
||||
"Chinese-EUC-TW" '((charset chinese-cns11643-1 chinese-cns11643-2
|
||||
"Chinese-EUC-TW" `((charset chinese-cns11643-1 chinese-cns11643-2
|
||||
chinese-cns11643-3 chinese-cns11643-4
|
||||
chinese-cns11643-5 chinese-cns11643-6
|
||||
chinese-cns11643-7 chinese-big5-1 chinese-big5-2)
|
||||
(iso639-language . zh)
|
||||
(cjk-locale-symbol . zh_TW)
|
||||
(setup-function . (lambda ()
|
||||
(use-cjk-char-width-table 'zh_TW)))
|
||||
(setup-function . ,(lambda ()
|
||||
(use-cjk-char-width-table 'zh_TW)))
|
||||
(exit-function . use-default-char-width-table)
|
||||
(coding-system euc-tw iso-2022-cn)
|
||||
(coding-priority euc-tw chinese-big5 iso-2022-cn
|
||||
|
|
@ -250,11 +250,11 @@ converted to CNS)."))
|
|||
(define-coding-system-alias 'windows-936 'chinese-gbk)
|
||||
|
||||
(set-language-info-alist
|
||||
"Chinese-GBK" '((charset chinese-gbk)
|
||||
"Chinese-GBK" `((charset chinese-gbk)
|
||||
(iso639-language . zh)
|
||||
(cjk-locale-symbol . zh_CN)
|
||||
(setup-function . (lambda ()
|
||||
(use-cjk-char-width-table 'zh_CN)))
|
||||
(setup-function . ,(lambda ()
|
||||
(use-cjk-char-width-table 'zh_CN)))
|
||||
(exit-function . use-default-char-width-table)
|
||||
(coding-system chinese-gbk)
|
||||
(coding-priority gbk iso-2022-cn chinese-big5
|
||||
|
|
|
|||
|
|
@ -64,36 +64,30 @@ HANKAKU-KATAKANA belongs to `japanese-jisx0201-kana'.")
|
|||
|
||||
;; Put properties 'katakana, 'hiragana, and 'jix0201 to each Japanese
|
||||
;; kana characters for conversion among them.
|
||||
(let ((l japanese-kana-table)
|
||||
slot hiragana katakana jisx0201)
|
||||
(while l
|
||||
(setq slot (car l)
|
||||
hiragana (car slot) katakana (nth 1 slot) jisx0201 (nth 2 slot)
|
||||
l (cdr l))
|
||||
(if hiragana
|
||||
(if (stringp hiragana)
|
||||
(if (> (length hiragana) 1)
|
||||
(let ((hira (aref hiragana 0)))
|
||||
(put-char-code-property
|
||||
hira 'kana-composition
|
||||
(cons (cons (aref hiragana 1) katakana)
|
||||
(get-char-code-property hira 'kana-composition)))))
|
||||
(put-char-code-property hiragana 'katakana katakana)
|
||||
(put-char-code-property hiragana 'jisx0201 jisx0201)))
|
||||
(when (integerp katakana)
|
||||
(put-char-code-property katakana 'hiragana hiragana)
|
||||
(put-char-code-property katakana 'jisx0201 jisx0201))
|
||||
(if jisx0201
|
||||
(if (stringp jisx0201)
|
||||
(if (> (length jisx0201) 1)
|
||||
(let ((kana (aref jisx0201 0)))
|
||||
(put-char-code-property
|
||||
kana 'kana-composition
|
||||
(cons (cons (aref jisx0201 1) katakana)
|
||||
(get-char-code-property kana 'kana-composition)))))
|
||||
(put-char-code-property jisx0201 'hiragana hiragana)
|
||||
(put-char-code-property jisx0201 'katakana katakana)
|
||||
(put-char-code-property jisx0201 'jisx0208 katakana)))))
|
||||
(pcase-dolist (`(,hiragana ,katakana ,jisx0201) japanese-kana-table)
|
||||
(if hiragana
|
||||
(if (stringp hiragana)
|
||||
(if (length> hiragana 1)
|
||||
(let ((hira (aref hiragana 0)))
|
||||
(put-char-code-property
|
||||
hira 'kana-composition
|
||||
(cons (cons (aref hiragana 1) katakana)
|
||||
(get-char-code-property hira 'kana-composition)))))
|
||||
(put-char-code-property hiragana 'katakana katakana)
|
||||
(put-char-code-property hiragana 'jisx0201 jisx0201)))
|
||||
(put-char-code-property katakana 'hiragana hiragana)
|
||||
(put-char-code-property katakana 'jisx0201 jisx0201)
|
||||
(if jisx0201
|
||||
(if (stringp jisx0201)
|
||||
(if (length> jisx0201 1)
|
||||
(let ((kana (aref jisx0201 0)))
|
||||
(put-char-code-property
|
||||
kana 'kana-composition
|
||||
(cons (cons (aref jisx0201 1) katakana)
|
||||
(get-char-code-property kana 'kana-composition)))))
|
||||
(put-char-code-property jisx0201 'hiragana hiragana)
|
||||
(put-char-code-property jisx0201 'katakana katakana)
|
||||
(put-char-code-property jisx0201 'jisx0208 katakana))))
|
||||
|
||||
(defconst japanese-symbol-table
|
||||
'((?\ ?\ ) (?, ?,) (?. ?.) (?、 nil ?、) (?。 nil ?。) (?・ nil ?・)
|
||||
|
|
@ -114,22 +108,15 @@ and HANKAKU belongs to `japanese-jisx0201-kana'.")
|
|||
|
||||
;; Put properties 'jisx0208, 'jisx0201, and 'ascii to each Japanese
|
||||
;; symbol and ASCII characters for conversion among them.
|
||||
(let ((l japanese-symbol-table)
|
||||
slot jisx0208 ascii jisx0201)
|
||||
(while l
|
||||
(setq slot (car l)
|
||||
jisx0208 (car slot) ascii (nth 1 slot) jisx0201 (nth 2 slot)
|
||||
l (cdr l))
|
||||
(if ascii
|
||||
(progn
|
||||
(put-char-code-property jisx0208 'ascii ascii)
|
||||
(if (encode-char jisx0208 'japanese-jisx0208)
|
||||
(put-char-code-property ascii 'jisx0208 jisx0208))))
|
||||
(if jisx0201
|
||||
(progn
|
||||
(put-char-code-property jisx0208 'jisx0201 jisx0201)
|
||||
(if (encode-char jisx0208 'japanese-jisx0208)
|
||||
(put-char-code-property jisx0201 'jisx0208 jisx0208))))))
|
||||
(pcase-dolist (`(,jisx0208 ,ascii ,jisx0201) japanese-symbol-table)
|
||||
(when ascii
|
||||
(put-char-code-property jisx0208 'ascii ascii)
|
||||
(if (encode-char jisx0208 'japanese-jisx0208)
|
||||
(put-char-code-property ascii 'jisx0208 jisx0208)))
|
||||
(when jisx0201
|
||||
(put-char-code-property jisx0208 'jisx0201 jisx0201)
|
||||
(if (encode-char jisx0208 'japanese-jisx0208)
|
||||
(put-char-code-property jisx0201 'jisx0208 jisx0208))))
|
||||
|
||||
(defconst japanese-alpha-numeric-table
|
||||
'((?0 . ?0) (?1 . ?1) (?2 . ?2) (?3 . ?3) (?4 . ?4)
|
||||
|
|
@ -150,14 +137,9 @@ belongs to `japanese-jisx0208', ASCII belongs to `ascii'.")
|
|||
|
||||
;; Put properties 'jisx0208 and 'ascii to each Japanese alpha numeric
|
||||
;; and ASCII characters for conversion between them.
|
||||
(let ((l japanese-alpha-numeric-table)
|
||||
slot jisx0208 ascii)
|
||||
(while l
|
||||
(setq slot (car l)
|
||||
jisx0208 (car slot) ascii (cdr slot)
|
||||
l (cdr l))
|
||||
(put-char-code-property jisx0208 'ascii ascii)
|
||||
(put-char-code-property ascii 'jisx0208 jisx0208)))
|
||||
(pcase-dolist (`(,jisx0208 . ,ascii) japanese-alpha-numeric-table)
|
||||
(put-char-code-property jisx0208 'ascii ascii)
|
||||
(put-char-code-property ascii 'jisx0208 jisx0208))
|
||||
|
||||
;; Convert string STR by FUNC and return a resulting string.
|
||||
(defun japanese-string-conversion (str func &rest args)
|
||||
|
|
@ -165,7 +147,7 @@ belongs to `japanese-jisx0208', ASCII belongs to `ascii'.")
|
|||
(with-current-buffer buf
|
||||
(erase-buffer)
|
||||
(insert str)
|
||||
(apply func 1 (point) args)
|
||||
(apply func (point-min) (point) args)
|
||||
(buffer-string))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
@ -217,9 +199,12 @@ The argument object is not altered--the value is a copy."
|
|||
|
||||
(defun japanese-replace-region (from to string)
|
||||
"Replace the region specified by FROM and TO to STRING."
|
||||
(goto-char from)
|
||||
(insert string)
|
||||
(delete-char (- to from)))
|
||||
(goto-char to)
|
||||
(replace-region-contents from to
|
||||
(if (stringp string)
|
||||
string
|
||||
(string string))
|
||||
0))
|
||||
|
||||
;;;###autoload
|
||||
(defun japanese-katakana-region (from to &optional hankaku)
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@
|
|||
;; During bootstrapping the byte-compiler is run interpreted
|
||||
;; when compiling itself, which uses a lot more stack
|
||||
;; than usual.
|
||||
(setq max-lisp-eval-depth (max max-lisp-eval-depth 3400))))
|
||||
(setq max-lisp-eval-depth (max max-lisp-eval-depth 4000))))
|
||||
|
||||
(message "Using load-path %s" load-path)
|
||||
|
||||
|
|
|
|||
|
|
@ -66,48 +66,30 @@ use this command, and then save the file."
|
|||
#'kmacro-keyboard-macro-p
|
||||
t))
|
||||
current-prefix-arg))
|
||||
(let (definition)
|
||||
(if (string= (symbol-name macroname) "")
|
||||
(progn
|
||||
(setq macroname 'last-kbd-macro definition last-kbd-macro)
|
||||
(insert "(setq "))
|
||||
(setq definition (symbol-function macroname))
|
||||
(if (string= (symbol-name macroname) "")
|
||||
(pp `(setq last-kbd-macro
|
||||
(key-parse ,(key-description last-kbd-macro)))
|
||||
(current-buffer))
|
||||
(let ((definition (symbol-function macroname)))
|
||||
(when (or (stringp definition) (vectorp definition))
|
||||
(setq definition (kmacro (kmacro--to-vector definition))))
|
||||
;; Prefer `defalias' over `fset' since it additionally keeps
|
||||
;; track of the file where the users added it, and it interacts
|
||||
;; better with `advice-add' (and hence things like ELP).
|
||||
(insert "(defalias '"))
|
||||
(prin1 macroname (current-buffer))
|
||||
(insert "\n ")
|
||||
(when (or (stringp definition) (vectorp definition))
|
||||
(setq definition (kmacro (kmacro--to-vector definition))))
|
||||
(if (kmacro-p definition)
|
||||
(let ((vecdef (kmacro--keys definition))
|
||||
(counter (kmacro--counter definition))
|
||||
(format (kmacro--format definition)))
|
||||
(insert "(kmacro ")
|
||||
(prin1 (key-description vecdef) (current-buffer))
|
||||
;; FIXME: Do we really want to store the counter?
|
||||
(unless (and (equal counter 0) (equal format "%d"))
|
||||
(insert " ")
|
||||
(prin1 counter (current-buffer))
|
||||
(insert " ")
|
||||
(prin1 format (current-buffer)))
|
||||
(insert ")"))
|
||||
;; FIXME: Shouldn't this signal an error?
|
||||
(prin1 definition (current-buffer)))
|
||||
(insert ")\n")
|
||||
(if keys
|
||||
(let ((keys (or (and (symbol-function macroname)
|
||||
(where-is-internal (symbol-function macroname)
|
||||
'(keymap)))
|
||||
(let ((counter (kmacro--counter definition))
|
||||
(format (kmacro--format definition)))
|
||||
(pp `(defalias ',macroname
|
||||
(kmacro ,(key-description (kmacro--keys definition))
|
||||
;; FIXME: Do we really want to store the counter?
|
||||
. ,(unless (and (equal counter 0) (equal format "%d"))
|
||||
`(,counter ,format))))
|
||||
(current-buffer)))
|
||||
(when keys
|
||||
(let ((keys (or (where-is-internal definition '(keymap))
|
||||
(where-is-internal macroname '(keymap)))))
|
||||
(while keys
|
||||
(insert "(global-set-key ")
|
||||
(prin1 (car keys) (current-buffer))
|
||||
(insert " '")
|
||||
(prin1 macroname (current-buffer))
|
||||
(insert ")\n")
|
||||
(setq keys (cdr keys)))))))
|
||||
(dolist (key keys)
|
||||
(pp `(keymap-global-set ,(key-description key) #',macroname)
|
||||
(current-buffer))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun kbd-macro-query (flag)
|
||||
|
|
|
|||
|
|
@ -543,10 +543,11 @@ Message buffer where you can explain more about the patch."
|
|||
(with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(while (search-forward-regexp "^\\+\\{3\\} ./\\(.*\\)" nil t)
|
||||
(push (expand-file-name
|
||||
(match-string-no-properties 1)
|
||||
source-directory)
|
||||
files)))
|
||||
(let ((file (expand-file-name
|
||||
(match-string-no-properties 1)
|
||||
source-directory)))
|
||||
(when (file-readable-p file)
|
||||
(push file files)))))
|
||||
(mapcan
|
||||
(lambda (patch)
|
||||
(seq-remove
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue