1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-17 17:58:46 +00:00

Merge remote-tracking branch 'savannah/master' into native-comp

This commit is contained in:
Andrea Corallo 2021-03-12 16:42:51 +01:00
commit 82bd6d57d5
247 changed files with 3751 additions and 3019 deletions

1
.gitignore vendored
View File

@ -76,6 +76,7 @@ lib/unistd.h
src/buildobj.h
src/globals.h
src/lisp.mk
src/verbose.mk
# Lisp-level sources built by 'make'.
*cus-load.el

View File

@ -95,18 +95,8 @@ configuration=@configuration@
### The nt/ subdirectory gets built only for MinGW
NTDIR=@NTDIR@
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
top_builddir = @top_builddir@
-include ${top_builddir}/src/verbose.mk
HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@
@ -969,6 +959,10 @@ extraclean: $(extraclean_dirs:=_extraclean)
# I removed it because it causes `make tags` to build Emacs.
TAGS tags: lib lib-src # src
$(MAKE) -C src tags
$(MAKE) -C doc/emacs tags
$(MAKE) -C doc/lispintro tags
$(MAKE) -C doc/lispref tags
$(MAKE) -C doc/misc tags
CHECK_TARGETS = check check-maybe check-expensive check-all
.PHONY: $(CHECK_TARGETS)

View File

@ -665,7 +665,7 @@ style=\"text-align:left\">")
(defconst make-manuals-dist-output-variables
'(("@\\(top_\\)?srcdir@" . ".") ; top_srcdir is wrong, but not used
("@abs_top_builddir@" . ".") ; wrong but unused
("@\\(abs_\\)?top_builddir@" . ".") ; wrong but unused
("^\\(EMACS *=\\).*" . "\\1 emacs")
("^\\(\\(?:texinfo\\|buildinfo\\|emacs\\)dir *=\\).*" . "\\1 .")
("^\\(clean:.*\\)" . "\\1 infoclean")
@ -684,9 +684,7 @@ style=\"text-align:left\">")
("@INSTALL@" . "install -c")
("@INSTALL_DATA@" . "${INSTALL} -m 644")
("@configure_input@" . "")
("@AM_DEFAULT_VERBOSITY@" . "0")
("@AM_V@" . "${V}")
("@AM_DEFAULT_V@" . "${AM_DEFAULT_VERBOSITY}"))
("@AM_DEFAULT_VERBOSITY@" . "0"))
"Alist of (REGEXP . REPLACEMENT) pairs for `make-manuals-dist'.")
(defun make-manuals-dist--1 (root type)

View File

@ -31,6 +31,7 @@ AWK = @AWK@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
charsetdir = ${top_srcdir}/etc/charsets
lispintdir = ${top_srcdir}/lisp/international
@ -38,16 +39,7 @@ mapfiledir = ${srcdir}/mapfiles
GLIBC_CHARMAPS = ${srcdir}/glibc
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-include ${top_builddir}/src/verbose.mk
# Note: We can not prepend "ISO-" to these map files because of file
# name limits on DOS.

View File

@ -63,8 +63,8 @@ to "JIS X 0213:2004".
* MULE-*.map
Created by using ../mule-charsets.el in Emacs 22 as this:
% emacs-22 -batch -l ../mule-charsets.el
Created by using ../mule-charsets.el in Emacs as this:
% emacs -batch -l ../mule-charsets.el
This file is part of GNU Emacs.

View File

@ -28,18 +28,7 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-include ${top_builddir}/src/verbose.mk
# Prevent any settings in the user environment causing problems.
unexport EMACSDATA EMACSDOC EMACSPATH

View File

@ -128,7 +128,7 @@ epilogue:
;;
declaration:
decl
(eval $1)
(eval $1 t)
;
decl:
@ -206,7 +206,7 @@ put_decl:
put_name_list:
BRACE_BLOCK
(mapcar 'semantic-tag-name (EXPANDFULL $1 put_names))
(mapcar #'semantic-tag-name (EXPANDFULL $1 put_names))
;
put_names:
@ -226,7 +226,7 @@ put_name:
put_value_list:
BRACE_BLOCK
(mapcar 'semantic-tag-code-detail (EXPANDFULL $1 put_values))
(mapcar #'semantic-tag-code-detail (EXPANDFULL $1 put_values))
;
put_values:
@ -300,7 +300,7 @@ plist:
use_name_list:
BRACE_BLOCK
(mapcar 'semantic-tag-name (EXPANDFULL $1 use_names))
(mapcar #'semantic-tag-name (EXPANDFULL $1 use_names))
;
use_names:
@ -356,7 +356,7 @@ nonterminal:
rules:
lifo_rules
(apply 'nconc (nreverse $1))
(apply #'nconc (nreverse $1))
;
lifo_rules:

View File

@ -91,12 +91,14 @@
%expectedconflicts 5
%{
(require 'semantic/tag)
(declare-function wisent-python-reconstitute-function-tag
"semantic/wisent/python" (tag suite))
(declare-function wisent-python-reconstitute-class-tag "semantic/wisent/python"
(tag))
(declare-function semantic-parse-region "semantic"
(start end &optional nonterminal depth returnonerror))
(defvar wisent-python-EXPANDING-block)
}
%languagemode python-mode
@ -871,7 +873,7 @@ paren_class_list_opt
paren_class_list
: PAREN_BLOCK
(let ((wisent-python-EXPANDING-block t))
(mapcar 'semantic-tag-name (EXPANDFULL $1 paren_classes)))
(mapcar #'semantic-tag-name (EXPANDFULL $1 paren_classes)))
;
;; parameters: '(' [varargslist] ')'

View File

@ -36,23 +36,7 @@ emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
lparen = (
unifiles = $(addprefix ${unidir}/,$(sort $(shell sed -n 's/^[ \t][ \t]*${lparen}"\(uni-[^"]*\)"$$/\1/p' ${srcdir}/unidata-gen.el)))
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_ELC = $(am__v_ELC_@AM_V@)
am__v_ELC_ = $(am__v_ELC_@AM_DEFAULT_V@)
am__v_ELC_0 = @echo " ELC " $@;
am__v_ELC_1 =
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-include ${top_builddir}/src/verbose.mk
.PHONY: all

View File

@ -1186,9 +1186,6 @@ AC_DEFUN([AM_CONDITIONAL],
dnl Prefer silent make output. For verbose output, use
dnl 'configure --disable-silent-rules' or 'make V=1' .
dnl This code is adapted from Automake.
dnl Although it can be simplified now that GNU Make is assumed,
dnl the simplification hasn't been done yet.
AC_ARG_ENABLE([silent-rules],
[AS_HELP_STRING(
[--disable-silent-rules],
@ -1198,11 +1195,8 @@ if test "$enable_silent_rules" = no; then
else
AM_DEFAULT_VERBOSITY=0
fi
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AC_SUBST([AM_V])
AC_SUBST([AM_DEFAULT_V])
AC_SUBST([AM_DEFAULT_VERBOSITY])
AC_CONFIG_FILES([src/verbose.mk])
dnl Some other nice autoconf tests.
AC_PROG_INSTALL

View File

@ -28,6 +28,8 @@ srcdir=@srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
version = @version@
## Where the output files go.
@ -73,13 +75,7 @@ TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf
DVIPS = dvips
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
-include ${top_builddir}/src/verbose.mk
ENVADD = $(AM_V_GEN)TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
@ -224,7 +220,7 @@ infoclean:
$(buildinfodir)/emacs.info-[1-9][0-9]
bootstrap-clean maintainer-clean: distclean infoclean
rm -f ${srcdir}/emacsver.texi
rm -f ${srcdir}/emacsver.texi TAGS
.PHONY: install-dvi install-html install-pdf install-ps install-doc
@ -273,4 +269,20 @@ uninstall-pdf:
uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
ETAGS = ../../lib-src/etags${EXEEXT}
${ETAGS}: FORCE
$(MAKE) -C $(dir $@) $(notdir $@)
texifiles = $(wildcard ${srcdir}/*.texi)
TAGS: ${ETAGS} $(texifiles)
$(AM_V_GEN)${ETAGS} --include=../lispref/TAGS --include=../misc/TAGS $(texifiles)
tags: TAGS
.PHONY: tags
FORCE:
.PHONY: FORCE
### Makefile ends here

View File

@ -388,15 +388,15 @@ file. For example:
Emacs versions, like this:
@example
(cond ((< emacs-major-version 22)
;; @r{Emacs 21 customization.}
(setq custom-file "~/.config/custom-21.el"))
((and (= emacs-major-version 22)
(cond ((< emacs-major-version 28)
;; @r{Emacs 27 customization.}
(setq custom-file "~/.config/custom-27.el"))
((and (= emacs-major-version 26)
(< emacs-minor-version 3))
;; @r{Emacs 22 customization, before version 22.3.}
(setq custom-file "~/.config/custom-22.el"))
;; @r{Emacs 26 customization, before version 26.3.}
(setq custom-file "~/.config/custom-26.el"))
(t
;; @r{Emacs version 22.3 or later.}
;; @r{Emacs version 28.1 or later.}
(setq custom-file "~/.config/emacs-custom.el")))
(load custom-file)

View File

@ -1611,6 +1611,10 @@ branch ID for a branch starting at the current revision. For example,
if the current revision is 2.5, the branch ID should be 2.5.1, 2.5.2,
and so on, depending on the number of existing branches at that point.
This procedure will not work for distributed version control systems
like git or Mercurial. For those systems you should use the prefix
argument to @code{vc-create-tag} (@kbd{C-u C-x v s}) instead.
To create a new branch at an older revision (one that is no longer
the head of a branch), first select that revision (@pxref{Switching
Branches}). Your procedure will then differ depending on whether you

View File

@ -20,6 +20,7 @@
SHELL = @SHELL@
srcdir = @srcdir@
top_builddir = @top_builddir@
buildinfodir = $(srcdir)/../../info
# Directory with the (customized) texinfo.tex file.
@ -55,13 +56,7 @@ TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf
DVIPS = dvips
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
-include ${top_builddir}/src/verbose.mk
ENVADD = \
$(AM_V_GEN)TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \
@ -124,6 +119,7 @@ infoclean:
$(buildinfodir)/eintr.info-[1-9]
bootstrap-clean maintainer-clean: distclean infoclean
rm -f TAGS
.PHONY: install-dvi install-html install-pdf install-ps install-doc
@ -171,5 +167,20 @@ uninstall-pdf:
uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
ETAGS = ../../lib-src/etags${EXEEXT}
${ETAGS}: FORCE
$(MAKE) -C $(dir $@) $(notdir $@)
texifiles = $(wildcard ${srcdir}/*.texi)
TAGS: ${ETAGS} $(texifiles)
$(AM_V_GEN)${ETAGS} $(texifiles)
tags: TAGS
.PHONY: tags
FORCE:
.PHONY: FORCE
### Makefile ends here

View File

@ -17532,10 +17532,9 @@ Here is the definition:
@need 1250
Now for the keybinding.
Nowadays, function keys as well as mouse button events and
non-@sc{ascii} characters are written within square brackets, without
quotation marks. (In Emacs version 18 and before, you had to write
different function key bindings for each different make of terminal.)
Function keys as well as mouse button events and non-@sc{ascii}
characters are written within square brackets, without quotation
marks.
I bind @code{line-to-top-of-window} to my @key{F6} function key like
this:
@ -17550,18 +17549,18 @@ Your Init File, emacs, The GNU Emacs Manual}.
@cindex Conditional 'twixt two versions of Emacs
@cindex Version of Emacs, choosing
@cindex Emacs version, choosing
If you run two versions of GNU Emacs, such as versions 22 and 23, and
If you run two versions of GNU Emacs, such as versions 27 and 28, and
use one @file{.emacs} file, you can select which code to evaluate with
the following conditional:
@smallexample
@group
(cond
((= 22 emacs-major-version)
;; evaluate version 22 code
((= 27 emacs-major-version)
;; evaluate version 27 code
( @dots{} ))
((= 23 emacs-major-version)
;; evaluate version 23 code
((= 28 emacs-major-version)
;; evaluate version 28 code
( @dots{} )))
@end group
@end smallexample

View File

@ -24,6 +24,7 @@ SHELL = @SHELL@
# Standard configure variables.
srcdir = @srcdir@
top_builddir = @top_builddir@
buildinfodir = $(srcdir)/../../info
# Directory with the (customized) texinfo.tex file.
@ -59,13 +60,7 @@ TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf
DVIPS = dvips
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
-include ${top_builddir}/src/verbose.mk
ENVADD = \
$(AM_V_GEN)TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \
@ -185,6 +180,7 @@ infoclean:
$(buildinfodir)/elisp.info-[1-9][0-9]
bootstrap-clean maintainer-clean: distclean infoclean
rm -f TAGS
.PHONY: install-dvi install-html install-pdf install-ps install-doc
@ -232,5 +228,20 @@ uninstall-pdf:
uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
ETAGS = ../../lib-src/etags${EXEEXT}
${ETAGS}: FORCE
$(MAKE) -C $(dir $@) $(notdir $@)
texifiles = $(wildcard ${srcdir}/*.texi)
TAGS: ${ETAGS} $(texifiles)
$(AM_V_GEN)${ETAGS} $(texifiles)
tags: TAGS
.PHONY: tags
FORCE:
.PHONY: FORCE
### Makefile ends here

View File

@ -309,7 +309,6 @@ foo
This function renames the current buffer to @var{newname}. An error
is signaled if @var{newname} is not a string.
@c Emacs 19 feature
Ordinarily, @code{rename-buffer} signals an error if @var{newname} is
already in use. However, if @var{unique} is non-@code{nil}, it modifies
@var{newname} to make a name that is not in use. Interactively, you can
@ -344,7 +343,6 @@ a name. For example:
See also the function @code{get-buffer-create} in @ref{Creating Buffers}.
@end defun
@c Emacs 19 feature
@defun generate-new-buffer-name starting-name &optional ignore
This function returns a name that would be unique for a new buffer---but
does not create the buffer. It starts with @var{starting-name}, and
@ -879,7 +877,6 @@ then @code{other-buffer} uses that predicate to decide which buffers to
consider. It calls the predicate once for each buffer, and if the value
is @code{nil}, that buffer is ignored. @xref{Buffer Parameters}.
@c Emacs 19 feature
If @var{visible-ok} is @code{nil}, @code{other-buffer} avoids returning
a buffer visible in any window on any visible frame, except as a last
resort. If @var{visible-ok} is non-@code{nil}, then it does not matter

View File

@ -5392,6 +5392,21 @@ are supported, unless the image type is @code{imagemagick}. Positive
values rotate clockwise, negative values counter-clockwise. Rotation
is performed after scaling and cropping.
@item :transform-smoothing @var{smooth}
If this is @code{t}, any image transform will have smoothing applied;
if @code{nil}, no smoothing will be applied. The exact algorithm used
is platform dependent, but should be equivalent to bilinear
filtering. Disabling smoothing will use the nearest neighbor
algorithm.
If this property is not specified, @code{create-image} will use the
@code{image-transform-smoothing} user option to say whether scaling
should be done or not. This option can be @code{nil} (no smoothing),
@code{t} (use smoothing) or a predicate function that's called with
the image object as the only parameter, and should return either
@code{nil} or @code{t}. The default is for down-scaling to apply
smoothing, and for large up-scaling to not apply smoothing.
@item :index @var{frame}
@xref{Multi-Frame Images}.

View File

@ -332,7 +332,6 @@ or just
The built-in function @code{indirect-function} provides an easy way to
perform symbol function indirection explicitly.
@c Emacs 19 feature
@defun indirect-function function &optional noerror
@anchor{Definition of indirect-function}
This function returns the meaning of @var{function} as a function. If

View File

@ -455,7 +455,6 @@ Even though this is not a normal hook, you can use @code{add-hook} and
@code{remove-hook} to manipulate the list. @xref{Hooks}.
@end defvar
@c Emacs 19 feature
@defvar write-contents-functions
This works just like @code{write-file-functions}, but it is intended
for hooks that pertain to the buffer's contents, not to the particular
@ -486,7 +485,6 @@ this hook to make sure the file you are saving has the current year in
its copyright notice.
@end defopt
@c Emacs 19 feature
@defopt after-save-hook
This normal hook runs after a buffer has been saved in its visited file.
@end defopt
@ -622,7 +620,6 @@ If @var{start} is @code{nil}, then the command writes the entire buffer
contents (@emph{not} just the accessible portion) to the file and
ignores @var{end}.
@c Emacs 19 feature
If @var{start} is a string, then @code{write-region} writes or appends
that string, rather than text from the buffer. @var{end} is ignored in
this case.
@ -653,7 +650,6 @@ It also sets the last file modification time for the current buffer to
feature is used by @code{save-buffer}, but you probably should not use
it yourself.
@c Emacs 19 feature
If @var{visit} is a string, it specifies the file name to visit. This
way, you can write the data to one file (@var{filename}) while recording
the buffer as visiting another file (@var{visit}). The argument
@ -3094,7 +3090,6 @@ which generate the listing with Lisp code.
@node Create/Delete Dirs
@section Creating, Copying and Deleting Directories
@cindex creating, copying and deleting directories
@c Emacs 19 features
Most Emacs Lisp file-manipulation functions get errors when used on
files that are directories. For example, you cannot delete a directory

View File

@ -369,7 +369,6 @@ appear directly as bindings in @var{keymap} are also copied recursively,
and so on to any number of levels. However, recursive copying does not
take place when the definition of a character is a symbol whose function
definition is a keymap; the same symbol appears in the new copy.
@c Emacs 19 feature
@example
@group
@ -1140,7 +1139,6 @@ and have extra events at the end that do not fit into a single key
sequence. Then the value is a number, the number of events at the front
of @var{key} that compose a complete key.
@c Emacs 19 feature
If @var{accept-defaults} is non-@code{nil}, then @code{lookup-key}
considers default bindings as well as bindings for the specific events
in @var{key}. Otherwise, @code{lookup-key} reports only bindings for
@ -1182,7 +1180,6 @@ not cause an error.
This function returns the binding for @var{key} in the current
local keymap, or @code{nil} if it is undefined there.
@c Emacs 19 feature
The argument @var{accept-defaults} controls checking for default bindings,
as in @code{lookup-key} (above).
@end defun
@ -1191,12 +1188,10 @@ as in @code{lookup-key} (above).
This function returns the binding for command @var{key} in the
current global keymap, or @code{nil} if it is undefined there.
@c Emacs 19 feature
The argument @var{accept-defaults} controls checking for default bindings,
as in @code{lookup-key} (above).
@end defun
@c Emacs 19 feature
@defun minor-mode-key-binding key &optional accept-defaults
This function returns a list of all the active minor mode bindings of
@var{key}. More precisely, it returns an alist of pairs
@ -1414,7 +1409,6 @@ standard bindings:
@end group
@end smallexample
@c Emacs 19 feature
If @var{oldmap} is non-@code{nil}, that changes the behavior of
@code{substitute-key-definition}: the bindings in @var{oldmap} determine
which keys to rebind. The rebindings still happen in @var{keymap}, not

View File

@ -1052,7 +1052,6 @@ rather than replacing that element. @xref{Eval}.
@section Unloading
@cindex unloading packages
@c Emacs 19 feature
You can discard the functions and variables loaded by a library to
reclaim memory for other Lisp objects. To do this, use the function
@code{unload-feature}:

View File

@ -379,8 +379,6 @@ default, it makes the following bindings:
@end table
@end defvar
@c In version 18, initial is required
@c Emacs 19 feature
@defun read-no-blanks-input prompt &optional initial inherit-input-method
This function reads a string from the minibuffer, but does not allow
whitespace characters as part of the input: instead, those characters
@ -2475,7 +2473,6 @@ usual minibuffer input functions because they all start by choosing the
minibuffer window according to the selected frame.
@end defun
@c Emacs 19 feature
@defun window-minibuffer-p &optional window
This function returns @code{t} if @var{window} is a minibuffer window.
@var{window} defaults to the selected window.
@ -2619,7 +2616,6 @@ when the minibuffer is active, not even if you switch to another window
to do it.
@end defopt
@c Emacs 19 feature
If a command name has a property @code{enable-recursive-minibuffers}
that is non-@code{nil}, then the command can use the minibuffer to read
arguments even if it is invoked from the minibuffer. A command can

View File

@ -232,7 +232,6 @@ backward until encountering the front of a word, rather than forward.
@end deffn
@defopt words-include-escapes
@c Emacs 19 feature
This variable affects the behavior of @code{forward-word} and
@code{backward-word}, and everything that uses them. If it is
non-@code{nil}, then characters in the escape and character-quote

View File

@ -1696,7 +1696,6 @@ buffer has a buffer-local binding. For example, you could use
you are in a C or Lisp mode buffer that has a buffer-local value for
this variable.
@c Emacs 19 feature
The special forms @code{defvar} and @code{defconst} also set the
default value (if they set the variable at all), rather than any
buffer-local value.
@ -1708,7 +1707,6 @@ this variable. If @var{symbol} is not buffer-local, this is equivalent
to @code{symbol-value} (@pxref{Accessing Variables}).
@end defun
@c Emacs 19 feature
@defun default-boundp symbol
The function @code{default-boundp} tells you whether @var{symbol}'s
default value is nonvoid. If @code{(default-boundp 'foo)} returns

View File

@ -23,6 +23,8 @@ SHELL = @SHELL@
# of the source tree. This is set by configure's '--srcdir' option.
srcdir=@srcdir@
top_builddir = @top_builddir@
## Where the output files go.
## Note that all the Info targets build the Info files in srcdir.
## There is no provision for Info files to exist in the build directory.
@ -112,13 +114,7 @@ TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf
DVIPS = dvips
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
-include ${top_builddir}/src/verbose.mk
ENVADD = $(AM_V_GEN)TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \
MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
@ -291,6 +287,7 @@ orgclean:
rm -f ${TEXI_FROM_ORG}
bootstrap-clean maintainer-clean: distclean infoclean orgclean
rm -f TAGS
.PHONY: install-dvi install-html install-pdf install-ps install-doc
@ -340,4 +337,20 @@ uninstall-pdf:
uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
ETAGS = ../../lib-src/etags${EXEEXT}
${ETAGS}: FORCE
$(MAKE) -C $(dir $@) $(notdir $@)
texifiles = $(wildcard ${srcdir}/*.texi)
TAGS: ${ETAGS} $(texifiles)
$(AM_V_GEN)${ETAGS} $(texifiles)
tags: TAGS
.PHONY: tags
FORCE:
.PHONY: FORCE
### Makefile ends here

View File

@ -370,11 +370,10 @@ On Windows, the @file{.emacs} file may be called @file{_emacs} for
backward compatibility with DOS and FAT filesystems where filenames
could not start with a dot. Some users prefer to continue using such
a name due to historical problems various Windows tools had in the
past with file names that begin with a dot. In Emacs 22 and later,
the init file may also be called @file{.emacs.d/init.el}. Many of the
other files that are created by lisp packages are now stored in the
@file{.emacs.d} directory too, so this keeps all your Emacs related
files in one place.
past with file names that begin with a dot. The init file may also be
called @file{.emacs.d/init.el}. Many of the other files that are
created by Lisp packages are stored in the @file{.emacs.d} directory
too, which keeps all your Emacs related files in one place.
All the files mentioned above should go in your @env{HOME} directory.
The @env{HOME} directory is determined by following the steps below:

View File

@ -160,13 +160,7 @@ Where and how to get Gnus?
@subsubheading Answer
Gnus is released independent from releases of Emacs. Therefore, the
version bundled with Emacs might not be up to date (e.g., Gnus 5.9
bundled with Emacs 21 is outdated).
You can get the latest released version of Gnus from
@uref{https://www.gnus.org/dist/gnus.tar.gz}
or from
@uref{https://ftp.gnus.org/pub/gnus/gnus.tar.gz}.
Gnus is bundled with Emacs.
@node FAQ 1-4
@subsubheading Question 1.4

View File

@ -815,7 +815,7 @@ Various
* Undo:: Some actions can be undone.
* Predicate Specifiers:: Specifying predicates.
* Moderation:: What to do if you're a moderator.
* Image Enhancements:: Modern versions of Emacs can display images.
* Image Enhancements:: Emacs can display images.
* Fuzzy Matching:: What's the big fuzz?
* Thwarting Email Spam:: Simple ways to avoid unsolicited commercial email.
* Spam Package:: A package for filtering and processing spam.
@ -16269,7 +16269,6 @@ Translate all @samp{@key{TAB}} characters into @samp{@key{SPC}} characters.
@item nnmail-ignore-broken-references
@findex nnmail-ignore-broken-references
@c @findex nnmail-fix-eudora-headers
@cindex Eudora
@cindex Pegasus
Some mail user agents (e.g., Eudora and Pegasus) produce broken
@ -16359,9 +16358,8 @@ If you start using any of the mail back ends, they have the annoying
habit of assuming that you want to read mail with them. This might not
be unreasonable, but it might not be what you want.
If you set @code{mail-sources} and @code{nnmail-spool-file} to
@code{nil}, none of the back ends will ever attempt to read incoming
mail, which should help.
If you set @code{mail-sources} to @code{nil}, none of the back ends
will ever attempt to read incoming mail, which should help.
@vindex nnbabyl-get-new-mail
@vindex nnmbox-get-new-mail
@ -22507,7 +22505,7 @@ to you, using @kbd{G b u} and updating the group will usually fix this.
* Predicate Specifiers:: Specifying predicates.
* Moderation:: What to do if you're a moderator.
* Fetching a Group:: Starting Gnus just to read a group.
* Image Enhancements:: Modern versions of Emacs can display images.
* Image Enhancements:: Emacs can display images.
* Fuzzy Matching:: What's the big fuzz?
* Thwarting Email Spam:: Simple ways to avoid unsolicited commercial email.
* Spam Package:: A package for filtering and processing spam.
@ -23670,9 +23668,8 @@ It takes the group name as a parameter.
@node Image Enhancements
@section Image Enhancements
Emacs 21@footnote{Emacs 21 on MS Windows doesn't
support images, Emacs 22 does.} and up are able to display pictures and
stuff, so Gnus has taken advantage of that.
Emacs is able to display pictures and stuff, so Gnus has taken
advantage of that.
@menu
* X-Face:: Display a funky, teensy black-and-white image.

View File

@ -126,6 +126,7 @@ Configuring @value{tramp} for use
* Inline methods:: Inline methods.
* External methods:: External methods.
* GVFS-based methods:: @acronym{GVFS}-based external methods.
* FUSE-based methods:: @acronym{FUSE}-based external methods.
* Default Method:: Selecting a default method.
* Default User:: Selecting a default user.
* Default Host:: Selecting a default host.
@ -139,6 +140,7 @@ Configuring @value{tramp} for use
Setting own connection related information.
* Remote programs:: How @value{tramp} finds and uses programs on the remote host.
* Remote shell setup:: Remote shell setup hints.
* FUSE setup:: @acronym{FUSE} setup hints.
* Android shell setup:: Android shell setup hints.
* Auto-save and Backup:: Auto-save and Backup.
* Keeping files encrypted:: Protect remote files by encryption.
@ -433,7 +435,7 @@ remote host, when the buffer you call the process from has a remote
@code{default-directory}.
@anchor{Quick Start Guide: File name syntax}
@anchor{Quick Start Guide File name syntax}
@section File name syntax
@cindex file name syntax
@ -459,7 +461,7 @@ connection methods also support a notation for the port to be used, in
which case it is written as @code{host#port}.
@anchor{Quick Start Guide: @option{ssh} and @option{plink} methods}
@anchor{Quick Start Guide ssh and plink methods}
@section Using @option{ssh} and @option{plink}
@cindex method @option{ssh}
@cindex @option{ssh} method
@ -478,28 +480,31 @@ an @command{ssh} server:
@file{@trampfn{plink,user@@host,/path/to/file}}.
@anchor{Quick Start Guide: @option{su}, @option{sudo} and @option{sg} methods}
@section Using @option{su}, @option{sudo} and @option{sg}
@anchor{Quick Start Guide su, sudo, doas and sg methods}
@section Using @option{su}, @option{sudo}, @option{doas} and @option{sg}
@cindex method @option{su}
@cindex @option{su} method
@cindex method @option{sudo}
@cindex @option{sudo} method
@cindex method @option{doas}
@cindex @option{doas} method
@cindex method @option{sg}
@cindex @option{sg} method
Sometimes, it is necessary to work on your local host under different
permissions. For this, you can use the @option{su} or @option{sudo}
connection method. Both methods use @samp{root} as default user name
and the return value of @code{(system-name)} as default host name.
Therefore, it is convenient to open a file as
connection method. On OpenBSD systems, the @option{doas} connection
method offers the same functionality. These methods use @samp{root}
as default user name and the return value of @code{(system-name)} as
default host name. Therefore, it is convenient to open a file as
@file{@trampfn{sudo,,/path/to/file}}.
The method @option{sg} stands for ``switch group''; here the user name
is used as the group to change to. The default host name is the same.
@anchor{Quick Start Guide: @option{ssh}, @option{plink}, @option{su}, @option{sudo} and @option{sg} methods}
@section Combining @option{ssh} or @option{plink} with @option{su} or @option{sudo}
@anchor{Quick Start Guide Combining ssh, plink, su, sudo and doas methods}
@section Combining @option{ssh} or @option{plink} with @option{su}, @option{sudo} or @option{doas}
@cindex method @option{ssh}
@cindex @option{ssh} method
@cindex method @option{plink}
@ -508,18 +513,20 @@ is used as the group to change to. The default host name is the same.
@cindex @option{su} method
@cindex method @option{sudo}
@cindex @option{sudo} method
@cindex method @option{doas}
@cindex @option{doas} method
If the @option{su} or @option{sudo} option should be performed on
another host, it can be comnbined with a leading @option{ssh} or
@option{plink} option. That means that @value{tramp} connects first to
the other host with non-administrative credentials, and changes to
administrative credentials on that host afterwards. In a simple case,
the syntax looks like
If the @option{su}, @option{sudo} or @option{doas} option should be
performed on another host, it can be comnbined with a leading
@option{ssh} or @option{plink} option. That means that @value{tramp}
connects first to the other host with non-administrative credentials,
and changes to administrative credentials on that host afterwards. In
a simple case, the syntax looks like
@file{@value{prefix}ssh@value{postfixhop}user@@host|sudo@value{postfixhop}@value{postfix}/path/to/file}.
@xref{Ad-hoc multi-hops}.
@anchor{Quick Start Guide: @option{sudoedit} method}
@anchor{Quick Start Guide sudoedit method}
@section Using @command{sudoedit}
@cindex method @option{sudoedit}
@cindex @option{sudoedit} method
@ -532,7 +539,7 @@ method, it is restricted to @samp{localhost} only, and it does not
support external processes.
@anchor{Quick Start Guide: @option{smb} method}
@anchor{Quick Start Guide smb method}
@section Using @command{smbclient}
@cindex method @option{smb}
@cindex @option{smb} method
@ -546,7 +553,7 @@ of the local file name is the share exported by the remote host,
@samp{path} in this example.
@anchor{Quick Start Guide: GVFS-based methods}
@anchor{Quick Start Guide GVFS-based methods}
@section Using @acronym{GVFS}-based methods
@cindex methods, gvfs
@cindex gvfs-based methods
@ -570,7 +577,7 @@ file system), @file{@trampfn{dav,user@@host,/path/to/file}},
@file{@trampfn{mtp,device,/path/to/file}} (for media devices).
@anchor{Quick Start Guide: GNOME Online Accounts based methods}
@anchor{Quick Start Guide GNOME Online Accounts based methods}
@section Using @acronym{GNOME} Online Accounts based methods
@cindex @acronym{GNOME} Online Accounts
@cindex method @option{gdrive}
@ -590,7 +597,34 @@ account), or @file{@trampfn{nextcloud,user@@host#8081,/path/to/file}}
(@samp{8081} stands for the port number) for OwnCloud/NextCloud files.
@anchor{Quick Start Guide: Android}
@anchor{Quick Start Guide FUSE-based methods}
@section Using @acronym{FUSE}-based methods
@cindex methods, fuse
@cindex fuse-based methods
@cindex method @option{rclone}
@cindex @option{rclone} method
@cindex method @option{sshfs}
@cindex @option{sshfs} method
@acronym{FUSE, Filesystem in Userspace} allows users to mount a
virtual file system. It is also used by @acronym{GVFS} internally,
but here we discuss methods which do not use the @acronym{GVFS} API.
A convenient way to access system storages is the @command{rclone}
program. If you have configured a storage in @command{rclone} under a
name @samp{storage} (for example), you can access it via the remote
file name syntax @file{@trampfn{rclone,storage,/path/to/file}}. User
names are not needed.
On local hosts which have installed the @command{sshfs} client for
mounting a file system based on @command{sftp}, this method can be
used. All remote files are available via the local mount point.
@value{tramp} aids in mounting the file system if it isn't mounted
yet, and it supports the access with the usual file name syntax
@file{@trampfn{sshfs,user@@host,/path/to/file}}.
@anchor{Quick Start Guide Android}
@section Using Android
@cindex method @option{adb}
@cindex @option{adb} method
@ -601,18 +635,6 @@ be accessed via the @command{adb} command. No user or host name is
needed. The file name syntax is @file{@trampfn{adb,,/path/to/file}}.
@anchor{Quick Start Guide: @option{rclone} method}
@section Using @command{rclone}
@cindex method @option{rclone}
@cindex @option{rclone} method
A convenient way to access system storages is the @command{rclone}
program. If you have configured a storage in @command{rclone} under a
name @samp{storage} (for example), you can access it via the remote
file name syntax @file{@trampfn{rclone,storage,/path/to/file}}. User
names are not needed.
@node Configuration
@chapter Configuring @value{tramp}
@cindex configuration
@ -650,6 +672,7 @@ may be used in your init file:
* Inline methods:: Inline methods.
* External methods:: External methods.
* GVFS-based methods:: @acronym{GVFS}-based external methods.
* FUSE-based methods:: @acronym{FUSE}-based external methods.
* Default Method:: Selecting a default method.
Here we also try to help those who
don't have the foggiest which method
@ -666,6 +689,7 @@ may be used in your init file:
Setting own connection related information.
* Remote programs:: How @value{tramp} finds and uses programs on the remote host.
* Remote shell setup:: Remote shell setup hints.
* FUSE setup:: @acronym{FUSE} setup hints.
* Android shell setup:: Android shell setup hints.
* Auto-save and Backup:: Auto-save and Backup.
* Keeping files encrypted:: Protect remote files by encryption.
@ -1110,7 +1134,6 @@ UNC file name specification does not allow the specification of a
different user name for authentication like the @command{smbclient}
can.
@item @option{adb}
@cindex method @option{adb}
@cindex @option{adb} method
@ -1150,45 +1173,6 @@ specified using @file{device#42} host name syntax or @value{tramp} can
use the default value as declared in @command{adb} command. Port
numbers are not applicable to Android devices connected through USB@.
@item @option{rclone}
@cindex method @option{rclone}
@cindex @option{rclone} method
@vindex tramp-rclone-program
The program @command{rclone} allows to access different system
storages in the cloud, see @url{https://rclone.org/} for a list of
supported systems. If the @command{rclone} program isn't found in
your @env{PATH} environment variable, you can tell @value{tramp} its
absolute path via the user option @code{tramp-rclone-program}.
A system storage must be configured via the @command{rclone config}
command, outside Emacs. If you have configured a storage in
@command{rclone} under a name @samp{storage} (for example), you could
access it via the remote file name
@example
@trampfn{rclone,storage,/path/to/file}
@end example
User names are part of the @command{rclone} configuration, and not
needed in the remote file name. If a user name is contained in the
remote file name, it is ignored.
Internally, @value{tramp} mounts the remote system storage at location
@file{/tmp/tramp.rclone.storage}, with @file{storage} being the name
of the configured system storage.
Optional flags to the different @option{rclone} operations could be
passed as connection property, @xref{Predefined connection
information}. Supported properties are @t{"mount-args"},
@t{"copyto-args"}, @t{"moveto-args"} and @t{"about-args"}.
Access via @option{rclone} is slow. If you have an alternative method
for accessing the system storage, you should use it.
@ref{GVFS-based methods} for example, methods @option{gdrive} and
@option{nextcloud}.
@end table
@ -1200,8 +1184,8 @@ for accessing the system storage, you should use it.
@acronym{GVFS} is the virtual file system for the @acronym{GNOME}
Desktop, @uref{https://en.wikipedia.org/wiki/GVFS}. Remote files on
@acronym{GVFS} are mounted locally through FUSE and @value{tramp} uses
this locally mounted directory internally.
@acronym{GVFS} are mounted locally through @acronym{FUSE} and
@value{tramp} uses this locally mounted directory internally.
Emacs uses the D-Bus mechanism to communicate with @acronym{GVFS}@.
Emacs must have the message bus system, D-Bus integration active,
@ -1317,6 +1301,88 @@ respectively:
@end defopt
@node FUSE-based methods
@section @acronym{FUSE}-based external methods
@cindex methods, fuse
@cindex fuse-based methods
Besides @acronym{GVFS}, there are other virtual file systems using the
@acronym{FUSE} interface. Remote files are mounted locally through
@acronym{FUSE} and @value{tramp} uses this locally mounted directory
internally. When possible, @value{tramp} maps the remote file names
to their respective local file name, and applies the file name
operation on them. For some of the file name operations this is not
possible, @value{tramp} emulates those operations otherwise.
@table @asis
@item @option{rclone}
@cindex method @option{rclone}
@cindex @option{rclone} method
@vindex tramp-rclone-program
The program @command{rclone} allows to access different system
storages in the cloud, see @url{https://rclone.org/} for a list of
supported systems. If the @command{rclone} program isn't found in
your @env{PATH} environment variable, you can tell @value{tramp} its
absolute path via the user option @code{tramp-rclone-program}.
A system storage must be configured via the @command{rclone config}
command, outside Emacs. If you have configured a storage in
@command{rclone} under a name @samp{storage} (for example), you could
access it via the remote file name
@example
@trampfn{rclone,storage,/path/to/file}
@end example
User names are part of the @command{rclone} configuration, and not
needed in the remote file name. If a user name is contained in the
remote file name, it is ignored.
Internally, @value{tramp} mounts the remote system storage at location
@file{/tmp/tramp.rclone.storage}, with @file{storage} being the name
of the configured system storage.
The mount point and optional flags to the different @option{rclone}
operations could be passed as connection properties, @xref{Setup of
rclone method}.
Access via @option{rclone} is slow. If you have an alternative method
for accessing the system storage, you should use it.
@ref{GVFS-based methods} for example, methods @option{gdrive} and
@option{nextcloud}.
@item @option{sshfs}
@cindex method @option{sshfs}
@cindex @option{sshfs} method
@vindex tramp-sshfs-program
On local hosts which have installed the @command{sshfs} client for
mounting a file system based on @command{sftp}, this method can be
used, see
@url{https://github.com/libfuse/sshfs/blob/master/README.rst/}. If
the @command{sshfs} program isn't found in your @env{PATH} environment
variable, you can tell @value{tramp} its absolute path via the user
option @code{tramp-sshfs-program}.
All remote files are available via the local mount point.
@value{tramp} aids in mounting the file system if it isn't mounted
yet. The remote file name syntax is
@example
@trampfn{sshfs,user@@host#port,/path/to/file}
@end example
User name and port number are optional. This method does not support
password handling, the file system must either be mounted already, or
the connection must be established passwordless via ssh keys.
The mount point and mount arguments could be passed as connection
properties, @xref{Setup of sshfs method}.
@end table
@node Default Method
@section Selecting a default method
@cindex default method
@ -2102,6 +2168,13 @@ The default value of this property is @code{t} (not specified in
@code{tramp-methods}). If the remote host runs native MS Windows,
this propery has no effect.
@item @t{"mount-point"}
The directory file name an @acronym{FUSE}-based file system is mounted
on. The default value of this property is
@t{"/tmp/tramp.method.user@@host#port"} (not specified in
@code{tramp-methods}).
@item @t{"mount-args"}@*
@t{"copyto-args"}@*
@t{"moveto-args"}@*
@ -2430,7 +2503,6 @@ match the end of the connection buffer. Due to performance reasons,
this search starts at the end of the buffer, and it is limited to 256
characters backwards.
@item Conflicting names for users and variables in @file{.profile}
When a user name is the same as a variable name in a local file, such
@ -2440,7 +2512,6 @@ variable name to something different from the user name. For example,
if the user name is @env{FRUMPLE}, then change the variable name to
@env{FRUMPLE_DIR}.
@item Non-Bourne commands in @file{.profile}
When the remote host's @file{.profile} is also used for shells other
@ -2465,7 +2536,6 @@ To accommodate using non-Bourne shells on that remote, use other
shell-specific config files. For example, bash can use
@file{~/.bash_profile} and ignore @file{.profile}.
@item Interactive shell prompt
@vindex INSIDE_EMACS@r{, environment variable}
@ -2533,6 +2603,60 @@ where @samp{192.168.0.1} is the remote host IP address
@end table
@node FUSE setup
@section @acronym{FUSE} setup hints
The @acronym{FUSE} file systems are mounted per default at
@file{/tmp/tramp.method.user@@host#port}. The user name and port
number are optional. If the file system is already mounted, it will
be used as it is. If the mount point does not exist yet,
@value{tramp} creates this directory.
The mount point can be overwritten by the connection property
@t{"mount-point"}, @ref{Predefined connection information}.
Example:
@lisp
@group
(add-to-list 'tramp-connection-properties
`(,(regexp-quote "@trampfn{sshfs,user@@host,}")
"mount-point"
,(expand-file-name "sshfs.user@@host" user-emacs-directory)))
@end group
@end lisp
@anchor{Setup of rclone method}
@subsection @option{rclone} setup
@cindex rclone setup
The default arguments of the @command{rclone} operations
@command{mount}, @command{coopyto}, @command{moveto} and
@command{about} are declared in the variable @code{tramp-methods} as
method specific parameters. Usually, they don't need to be overwritten.
If needed, these parameters can be overwritten as connection
properties @t{"mount-args"}, @t{"copyto-args"}, @t{"moveto-args"} and
@t{"about-args"}, @xref{Predefined connection information}. All of
them are list of strings.
Be careful changing @t{"--dir-cache-time"}, this could delay
visibility of files.
@anchor{Setup of sshfs method}
@subsection @option{sshfs} setup
@cindex sshfs setup
The method @option{sshfs} declares the mount arguments in the variable
@code{tramp-methods}, passed to the @command{sshfs} command. This is
a list of list of strings, and can be overwritten by the connection
property @t{"mount-args"}, @xref{Predefined connection information}.
Additionally. it declares also the arguments for running remote
processes, using the @command{ssh} command. These don't need to be
changed.
@node Android shell setup
@section Android shell setup hints
@cindex android shell setup for ssh
@ -4197,6 +4321,7 @@ Disable excessive traces. Set @code{tramp-verbose} to 3 or lower,
default being 3. Increase trace levels temporarily when hunting for
bugs.
@item
@value{tramp} does not connect to the remote host
@ -4448,6 +4573,7 @@ disable @samp{--color=yes} or @samp{--color=auto} in the remote host's
@file{.bashrc} or @file{.profile}. Turn this alias on and off to see
if file name completion works.
@item
File name completion does not work in directories with large number of
files
@ -4846,6 +4972,7 @@ In BBDB buffer, access an entry by pressing the key @kbd{F}.
Thanks to @value{tramp} users for contributing to these recipes.
@item
Why saved multi-hop file names do not work in a new Emacs session?

123
etc/NEWS
View File

@ -29,7 +29,7 @@ To enable, configure Emacs with the '--with-native-compilation' option
to the 'configure' script. This requires to have the libgccjit
library to be installed and functional.
--
---
** Support for building with Motif has been removed.
** Cairo graphics library is now used by default if found.
@ -74,8 +74,7 @@ It was declared obsolete in Emacs 27.1.
---
** The configure option '--without-makeinfo' has been removed.
This was only ever relevant when building from a repository checkout.
Please install makeinfo, or if all else fails run 'make lisp' instead
of 'make [all]'.
This now requires makeinfo, which is part of the texinfo package.
---
** Support for building with '-fcheck-pointer-bounds' has been removed.
@ -271,8 +270,8 @@ current mode.
+++
** New user option 'read-extended-command-predicate'.
This option controls how 'M-x' performs completion of commands when
you type TAB. By default, any command that matches what you have
This user option controls how 'M-x' performs completion of commands when
you type 'TAB'. By default, any command that matches what you have
typed is considered a completion candidate, but you can customize this
option to exclude commands that are not applicable to the current
buffer's major and minor modes, and respect the command's completion
@ -374,16 +373,16 @@ Typing 'TAB' on a heading line cycles the current section between
anywhere in the buffer cycles the whole buffer between "only top-level
headings", "all headings and subheadings", and "show all" states.
*** New minor mode 'outline-cycle-minor-mode'.
This mode is a variant of 'outline-minor-mode', with the difference
*** New user option 'outline-minor-mode-cycle'.
This user option customizes 'outline-minor-mode', with the difference
that 'TAB' and 'S-TAB' on heading lines cycle heading visibility.
Typing 'TAB' on a heading line cycles the current section between
"hide all", "subheadings", and "show all" states. Typing 'S-TAB' on a
heading line cycles the whole buffer between "only top-level
headings", "all headings and subheadings", and "show all" states.
*** New minor mode 'outline-cycle-highlight-minor-mode'.
This mode is a variant of 'outline-cycle-minor-mode'. It puts
*** New user option 'outline-minor-mode-highlight'.
This user option customizes 'outline-minor-mode'. It puts
highlighting on heading lines using standard outline faces. This
works well only when there are no conflicts with faces used by the
major mode.
@ -393,7 +392,7 @@ major mode.
** Macroexp
---
*** New function 'macroexp-file-name' to know the name of the current file
*** New function 'macroexp-file-name' to know the name of the current file.
---
*** New function 'macroexp-compiling-p' to know if we're compiling.
---
@ -406,17 +405,18 @@ It used to be enabled when Emacs is started in GUI mode but not when started
in text mode. The cursor still only actually blinks in GUI frames.
** Bindat
+++
*** New 'Bindat type expression' description language.
This new system is provided by the new macro 'bindat-type' and
obsoletes the old data layout specifications. It supports
arbitrary-size integers, recursive types, and more. See the Info node
'Byte Packing' in the ELisp manual for more details.
"(elisp) Byte Packing" in the ELisp manual for more details.
** pcase
+++
*** The 'or' pattern now binds the union of the vars of its sub-patterns
*** The 'or' pattern now binds the union of the vars of its sub-patterns.
If a variable is not bound by the subpattern that matched, it gets bound
to nil. This was already sometimes the case, but it is now guaranteed.
@ -545,6 +545,10 @@ It also supports a negative argument.
*** 'C-x t M' moves the current tab to the specified absolute position.
It also supports a negative argument.
---
*** 'C-x t G' assigns a group name to the tab.
'tab-close-group' can close all tabs that belong to the selected group.
---
*** New user option 'tab-bar-tab-name-format-function'.
@ -925,6 +929,15 @@ skipped.
** Help
---
*** Keybindings in 'help-mode' use the new 'help-key-binding' face.
This face is added by 'substitute-command-keys' to any "\[command]"
substitution. The return value of that function should consequently
be assumed to be a propertized string.
Note that the new face will also be used in tooltips. When using the
GTK toolkit, this is only true if 'x-gtk-use-system-tooltips' is t.
---
*** 'g' ('revert-buffer') in 'help-mode' no longer requires confirmation.
@ -1028,10 +1041,9 @@ To customize obsolete user options, use 'customize-option' or
** Edebug
---
*** Obsoletions
---
**** 'get-edebug-spec' is obsolete, replaced by 'edebug-get-spec'.
+++
**** The spec operator ':name NAME' is obsolete, use '&name' instead.
+++
@ -1063,7 +1075,7 @@ use) and HEAD is the code that matched SPEC.
+++
*** New user option 'eldoc-echo-area-display-truncation-message'.
If non-nil (the default), eldoc will display a message saying
something like "(Documentation truncated. Use `M-x eldoc-doc-buffer'
something like "(Documentation truncated. Use `M-x eldoc-doc-buffer'
to see rest)" when a message has been truncated. If nil, truncated
messages will be marked with just "..." at the end.
@ -1131,6 +1143,10 @@ preferred over the eudcb-mab.el backend.
*** New connection method "mtp", which allows accessing media devices
like cell phones, tablets or cameras.
+++
*** New connection method "sshfs", which allows accessing remote files
via a file system mounted with 'sshfs'.
+++
*** Trashed remote files are moved to the local trash directory.
All remote files, which are trashed, are moved to the local trash
@ -1438,9 +1454,9 @@ decaying average of delays, and if this number gets too high, the
animation is stopped.
+++
*** The 'n' and 'p' commands (next/previous image) now respects dired order.
*** The 'n' and 'p' commands (next/previous image) now respect Dired order.
These commands would previously display the next/previous image in
alphabetical order, but will now find the "parent" dired buffer and
lexicographic order, but will now find the "parent" Dired buffer and
select the next/previous image file according to how the files are
sorted there. The commands have also been extended to work when the
"parent" buffer is an archive mode (i.e., zip file or the like) or tar
@ -1470,6 +1486,22 @@ To load images with the default frame colors use the ':foreground' and
This change only affects image types that support foreground and
background colors or transparency, such as xbm, pbm, svg, png and gif.
+++
*** Image smoothing can now be explicitly enabled or disabled.
Smoothing applies a bilinear filter while scaling or rotating an image
to prevent aliasing and other unwanted effects. The new image
property ':transform-smoothing' can be set to t to force smoothing
and nil to disable smoothing.
The default behaviour of smoothing on down-scaling and not smoothing
on up-scaling remains unchanged.
+++
*** New user option 'image-transform-smoothing'.
This controls whether to use smoothing or not for an image. Values
include nil (no smoothing), t (do smoothing) or a predicate function
that's called with the image object and should return nil/t.
** EWW
+++
@ -1560,7 +1592,7 @@ have been renamed to have "proper" public names and documented
'xref-show-definitions-buffer-at-bottom').
*** New command 'xref-quit-and-pop-marker-stack' and a binding for it
in "*xref*" buffers ('M-,'). This combination is easy to press
in "*xref*" buffers ('M-,'). This combination is easy to press
semi-accidentally if the user wants to go back in the middle of
choosing the exact definition to go to, and this should do TRT.
@ -2143,7 +2175,7 @@ messages, contain the error name of that message now.
+++
*** D-Bus events have changed their internal structure.
They carry now the destination and the error-name of an event. They
also keep the type information of their arguments. Use the
also keep the type information of their arguments. Use the
'dbus-event-*' accessor functions.
** CPerl Mode
@ -2185,7 +2217,7 @@ You can type 'C-x u u' instead of 'C-x u C-x u' to undo many changes,
'C-x { { } } ^ ^ v v' to resize the selected window interactively,
'M-g n n p p' to navigate next-error matches. Any other key exits
transient mode and then is executed normally. 'repeat-exit-key'
defines an additional key to exit mode like 'isearch-exit' (RET).
defines an additional key to exit mode like 'isearch-exit' ('RET').
* New Modes and Packages in Emacs 28.1
@ -2301,7 +2333,7 @@ by mistake and were not useful to Lisp code.
---
** Loading 'generic-x' unconditionally loads all modes.
The user option `generic-extras-enable-list' is now obsolete, and
The user option 'generic-extras-enable-list' is now obsolete, and
setting it has no effect.
---
@ -2348,18 +2380,21 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el.
'dirtrack-debug-toggle', 'dynamic-completion-table',
'easy-menu-precalculate-equivalent-keybindings',
'epa-display-verify-result', 'epg-passphrase-callback-function',
'eshell-report-bug', 'eval-next-after-load', 'exchange-dot-and-mark',
'ffap-bug', 'ffap-submit-bug', 'ffap-version',
'file-cache-choose-completion', 'forward-point', 'generic-char-p',
'global-highlight-changes', 'hi-lock-face-history',
'hi-lock-regexp-history', 'highlight-changes-active-string',
'highlight-changes-initial-state', 'highlight-changes-passive-string',
'image-mode-maybe', 'imenu-example--name-and-position',
'ispell-aspell-supports-utf8', 'lisp-mode-auto-fill',
'locate-file-completion', 'make-coding-system',
'erc-announced-server-name', 'erc-default-coding-system',
'erc-process', 'erc-send-command', 'eshell-report-bug',
'eval-next-after-load', 'exchange-dot-and-mark', 'ffap-bug',
'ffap-submit-bug', 'ffap-version', 'file-cache-choose-completion',
'forward-point', 'generic-char-p', 'global-highlight-changes',
'hi-lock-face-history', 'hi-lock-regexp-history',
'highlight-changes-active-string', 'highlight-changes-initial-state',
'highlight-changes-passive-string',
'icalendar--datetime-to-noneuropean-date', 'image-mode-maybe',
'imenu-example--name-and-position', 'ispell-aspell-supports-utf8',
'lisp-mode-auto-fill', 'locate-file-completion', 'make-coding-system',
'minibuffer-local-must-match-filename-map', 'mouse-choose-completion',
'mouse-major-mode-menu', 'mouse-popup-menubar',
'mouse-popup-menubar-stuff', 'newsticker-groups-filename',
'nnir-swish-e-index-file', 'nnmail-fix-eudora-headers',
'non-iso-charset-alist', 'nonascii-insert-offset',
'nonascii-translation-table', 'password-read-and-add',
'pre-abbrev-expand-hook', 'princ-list', 'print-help-return-message',
@ -2392,7 +2427,8 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el.
'semantic-token-type-parent', 'semantic-toplevel-bovine-cache',
'semantic-toplevel-bovine-table', 'semanticdb-mode-hooks',
'set-coding-priority', 'set-process-filter-multibyte',
'shadows-compare-text-p', 'shell-dirtrack-toggle', 't-mouse-mode',
'shadows-compare-text-p', 'shell-dirtrack-toggle',
'speedbar-navigating-speed', 'speedbar-update-speed', 't-mouse-mode',
'term-dynamic-simple-complete', 'tooltip-hook', 'tpu-have-ispell',
'url-generate-unique-filename', 'url-temporary-directory',
'vc-arch-command', 'vc-default-working-revision' (variable),
@ -2400,6 +2436,12 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el.
'vcursor-toggle-vcursor-map', 'w32-focus-frame', 'w32-select-font',
'wisent-lex-make-token-table'.
---
** Some functions and variables obsolete since Emacs 22 have been removed:
'gnus-article-hide-pgp-hook', 'gnus-inews-mark-gcc-as-read',
'gnus-treat-display-xface', 'gnus-treat-strip-pgp',
'nnmail-spool-file'.
** The WHEN argument of 'make-obsolete' and related functions is mandatory.
The use of those functions without a WHEN argument was marked obsolete
back in Emacs 23.1. The affected functions are: 'make-obsolete',
@ -2408,6 +2450,8 @@ back in Emacs 23.1. The affected functions are: 'make-obsolete',
** The variable 'keyboard-type' is obsolete and not dynamically scoped any more.
** The 'values' variable is now obsolete.
* Lisp Changes in Emacs 28.1
@ -2444,13 +2488,13 @@ This variable holds a list of currently enabled global minor modes (as
a list of symbols).
+++
** 'define-minor-mode' now takes an :interactive argument.
** 'define-minor-mode' now takes an ':interactive' argument.
This can be used for specifying which modes this minor mode is meant
for, or to make the new minor mode non-interactive. The default value
is t.
+++
** 'define-derived-mode' now takes an :interactive argument.
** 'define-derived-mode' now takes an ':interactive' argument.
This can be used to control whether the defined mode is a command
or not, and is useful when defining commands that aren't meant to be
used by users directly.
@ -2458,8 +2502,6 @@ used by users directly.
---
** The 'easymenu' library is now preloaded.
** The 'values' variable is now obsolete.
---
** New variable 'indent-line-ignored-functions'.
This allows modes to cycle through a set of indentation functions
@ -2490,10 +2532,11 @@ When non-nil, then functions 'read-char-choice' and 'y-or-n-p' (respectively)
use the function 'read-key' to read a character instead of using the minibuffer.
---
** New variable 'use-short-answers' to use 'y-or-n-p' instead of 'yes-or-no-p'.
This eliminates the need to define an alias that maps one to another
in the init file. The same variable also controls whether the
function 'read-answer' accepts short answers.
** New user option 'use-short-answers'.
When non-nil, the function 'y-or-n-p' is used instead of
'yes-or-no-p'. This eliminates the need to define an alias that maps
one to another in the init file. The same user option also controls
whether the function 'read-answer' accepts short answers.
+++
** 'set-window-configuration' now takes an optional 'dont-set-frame'
@ -2695,7 +2738,7 @@ menu handling.
It is meant as an (experimental) aid for converting Emacs Lisp code
to lexical binding, where dynamic (special) variables bound in one
file can affect code in another. For details, see the manual section
"(Elisp) Converting to Lexical Binding".
"(elisp) Converting to Lexical Binding".
+++
*** 'byte-recompile-directory' can now compile symlinked ".el" files.

View File

@ -696,5 +696,7 @@ COPYING PERMISSIONS:
;;; Local Variables:
;;; outline-regexp: "\\*\\_>"
;;; eval: (outline-cycle-highlight-minor-mode)
;;; outline-minor-mode-cycle: t
;;; outline-minor-mode-highlight: t
;;; eval: (outline-minor-mode 1)
;;; End:

View File

@ -125,5 +125,7 @@ COPYING PERMISSIONS:
;;; Local Variables:
;;; eval: (let ((inhibit-read-only t) (compilation-filter-start (point-min))) (save-excursion (goto-char (point-max)) (grep-filter) (set-buffer-modified-p nil)))
;;; buffer-read-only: t
;;; eval: (outline-cycle-highlight-minor-mode)
;;; outline-minor-mode-cycle: t
;;; outline-minor-mode-highlight: t
;;; eval: (outline-minor-mode 1)
;;; End:

View File

@ -25,24 +25,14 @@ SHELL = @SHELL@
# Here are the things that we expect ../configure to edit.
srcdir=@srcdir@
top_builddir = @top_builddir@
# Where the generated files go.
leimdir = ${srcdir}/../lisp/leim
EXEEXT = @EXEEXT@
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-include ${top_builddir}/src/verbose.mk
# Prevent any settings in the user environment causing problems.
unexport EMACSDATA EMACSDOC EMACSPATH

View File

@ -44,33 +44,8 @@ WERROR_CFLAGS = @WERROR_CFLAGS@
# Program name transformation.
TRANSFORM = @program_transform_name@
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_RC = $(am__v_RC_@AM_V@)
am__v_RC_ = $(am__v_RC_@AM_DEFAULT_V@)
am__v_RC_0 = @echo " RC " $@;
am__v_RC_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
top_builddir = @top_builddir@
-include ${top_builddir}/src/verbose.mk
# ==================== Where To Install Things ====================

View File

@ -29,26 +29,7 @@ top_srcdir = @top_srcdir@
all:
.PHONY: all
# 'make' verbosity.
AM_V_AR = $(am__v_AR_@AM_V@)
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-include ${top_builddir}/src/verbose.mk
HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@

View File

@ -21,6 +21,7 @@ SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
lisp = $(srcdir)
VPATH = $(srcdir)
EXEEXT = @EXEEXT@
@ -29,37 +30,14 @@ EXEEXT = @EXEEXT@
# limitation.
XARGS_LIMIT = @XARGS_LIMIT@
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@
AM_V_ELC = $(am__v_ELC_@AM_V@)
am__v_ELC_ = $(am__v_ELC_@AM_DEFAULT_V@)
ifeq ($(HAVE_NATIVE_COMP),yes)
ifeq ($(NATIVE_DISABLED),1)
am__v_ELC_0 = @echo " ELC " $@;
else
am__v_ELC_0 = @echo " ELC+ELN " $@;
endif
ifndef NATIVE_FULL_AOT
NATIVE_SKIP_NONDUMP = 1
endif
else
am__v_ELC_0 = @echo " ELC " $@;
endif
am__v_ELC_1 =
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-include ${top_builddir}/src/verbose.mk
FIND_DELETE = @FIND_DELETE@

View File

@ -1310,7 +1310,7 @@ aligner would have dealt with are."
(thissep (if rulesep (cdr rulesep) separate))
same (eol 0)
search-start
groups group-c
groups ;; group-c
spacing spacing-c
tab-stop tab-stop-c
repeat repeat-c
@ -1434,7 +1434,7 @@ aligner would have dealt with are."
;; lookup the `group' attribute the first time
;; that we need it
(unless group-c
(unless nil ;; group-c
(setq groups (or (cdr (assq 'group rule)) 1))
(unless (listp groups)
(setq groups (list groups)))

View File

@ -660,11 +660,11 @@ Does not signal an error if optional argument NOERROR is non-nil."
(defun archive-mode (&optional force)
"Major mode for viewing an archive file in a dired-like way.
You can move around using the usual cursor motion commands.
Letters no longer insert themselves.
Type `e' to pull a file out of the archive and into its own buffer;
Letters no longer insert themselves.\\<archive-mode-map>
Type \\[archive-extract] to pull a file out of the archive and into its own buffer;
or click mouse-2 on the file's line in the archive mode buffer.
If you edit a sub-file of this archive (as with the `e' command) and
If you edit a sub-file of this archive (as with the \\[archive-extract] command) and
save it, the contents of that buffer will be saved back into the
archive.

View File

@ -162,7 +162,7 @@ let-binding."
(defvar auth-source-creation-prompts nil
"Default prompts for token values. Usually let-bound.")
(make-obsolete 'auth-source-hide-passwords nil "Emacs 24.1")
(make-obsolete 'auth-source-hide-passwords nil "24.1")
(defcustom auth-source-save-behavior 'ask
"If set, auth-source will respect it for save behavior."
@ -2307,9 +2307,9 @@ See `auth-source-search' for details on SPEC."
;; deprecate the old interface
(make-obsolete 'auth-source-user-or-password
'auth-source-search "Emacs 24.1")
'auth-source-search "24.1")
(make-obsolete 'auth-source-forget-user-or-password
'auth-source-forget "Emacs 24.1")
'auth-source-forget "24.1")
(defun auth-source-user-or-password
(mode host port &optional username create-missing delete-existing)

View File

@ -472,8 +472,8 @@ mouse event is used.
If there's no button at POS, do nothing and return nil, otherwise
return t.
To get a description of what function will called when pushing a
butting, use the `button-describe' command."
To get a description of the function that will be invoked when
pushing a button, use the `button-describe' command."
(interactive
(list (if (integerp last-command-event) (point) last-command-event)))
(if (and (not (integerp pos)) (eventp pos))

View File

@ -639,7 +639,7 @@ Interactively, reads the register using `register-read-with-preview'."
(calc-slow-wrapper
(when (eq n 0)
(setq n (calc-stack-size)))
(let* ((flag nil)
(let* (;; (flag nil)
(allow-ret (> n 1))
(list (math-showing-full-precision
(mapcar (if (> n 1)
@ -651,7 +651,8 @@ Interactively, reads the register using `register-read-with-preview'."
(if (> n 0)
(calc-top-list n)
(calc-top-list 1 (- n)))))))
(calc--edit-mode (lambda () (calc-finish-stack-edit (or flag n))) allow-ret)
(calc--edit-mode (lambda () (calc-finish-stack-edit n)) ;; (or flag n)
allow-ret)
(while list
(insert (car list) "\n")
(setq list (cdr list)))))

View File

@ -291,7 +291,7 @@ user-defined operators, use `calculator-user-operators' instead.")
5. The function's precedence -- should be in the range of 1 (lowest) to
9 (highest) (optional, defaults to 1);
It it possible have a unary prefix version of a binary operator if it
It is possible have a unary prefix version of a binary operator if it
comes later in this list. If the list begins with the symbol `nobind',
then no key binding will take place -- this is only used for predefined
keys.

View File

@ -773,9 +773,6 @@ American format: \"month day year\"."
;; datetime == nil
nil))
(define-obsolete-function-alias 'icalendar--datetime-to-noneuropean-date
'icalendar--datetime-to-american-date "icalendar 0.19")
(defun icalendar--datetime-to-european-date (datetime &optional separator)
"Convert the decoded DATETIME to European format.
Optional argument SEPARATOR gives the separator between month,

View File

@ -2279,7 +2279,7 @@ made in the number or names of categories."
(inc (prefix-numeric-value inc))
(buffer-read-only nil)
ndate ntime
year monthname month day dayname)
year monthname month day) ;; dayname
(when marked (todo--user-error-if-marked-done-item))
(save-excursion
(or (and marked (goto-char (point-min))) (todo-item-start))
@ -2437,7 +2437,7 @@ made in the number or names of categories."
(monthname monthname)
(month month)
(day day)
(dayname dayname))
(dayname nil)) ;; dayname
(mapconcat #'eval calendar-date-display-form "")))))
(when ndate (replace-match ndate nil nil nil 1))
;; Add new time string to the header, if it was supplied.
@ -3450,8 +3450,8 @@ containing only archived items, provided user option
are shown in `todo-archived-only' face."
(interactive)
(todo-display-categories)
(let (sortkey)
(todo-update-categories-display sortkey)))
;; (let (sortkey)
(todo-update-categories-display nil)) ;; sortkey
(defun todo-next-button (n)
"Move point to the Nth next button in the table of categories."

View File

@ -428,11 +428,11 @@ sources variable."
(let* ((proj (ede-target-parent this))
(conf-table (ede-proj-makefile-configuration-variables
this (oref proj configuration-default)))
(conf-done nil)
;; (conf-done nil)
)
;; Add in all variables from the configuration not already covered.
(mapc (lambda (c)
(if (member (car c) conf-done)
(if nil ;; (member (car c) conf-done)
nil
(insert (car c) "=" (cdr c) "\n")))
conf-table))

View File

@ -596,10 +596,8 @@ Strip out duplicates, and recurse on variables."
(project-am-expand-subdirlist
place (makefile-macro-file-list var))
;; Else, add SP in if it isn't a dup.
(if (member sp (symbol-value place))
nil ; don't do it twice.
(set place (cons sp (symbol-value place))) ;; add
))))
(cl-pushnew sp (gv-deref place) :test #'equal) ;; add
)))
subdirs)
)
@ -645,7 +643,7 @@ Strip out duplicates, and recurse on variables."
;; We still have a list of targets. For all buffers, make sure
;; their object still exists!
;; FIGURE THIS OUT
(project-am-expand-subdirlist 'csubprojexpanded csubproj)
(project-am-expand-subdirlist (gv-ref csubprojexpanded) csubproj)
;; Ok, now let's look at all our sub-projects.
(mapc (lambda (sp)
(let* ((subdir (file-name-as-directory

View File

@ -41,7 +41,7 @@
;;; Variables
;;
(defvar-local semantic-bovinate-nonterminal-check-obarray nil
(defvar-local semantic-bovinate-nonterminal-check-map nil
"Obarray of streams already parsed for nonterminal symbols.
Use this to detect infinite recursion during a parse.")
@ -79,21 +79,18 @@ environment of `semantic-bovinate-stream'."
(defun semantic-bovinate-nonterminal-check (stream nonterminal)
"Check if STREAM not already parsed for NONTERMINAL.
If so abort because an infinite recursive parse is suspected."
(or (vectorp semantic-bovinate-nonterminal-check-obarray)
(setq semantic-bovinate-nonterminal-check-obarray
(make-vector 13 nil)))
(let* ((nt (symbol-name nonterminal))
(vs (symbol-value
(intern-soft
nt semantic-bovinate-nonterminal-check-obarray))))
(or (hash-table-p semantic-bovinate-nonterminal-check-map)
(setq semantic-bovinate-nonterminal-check-map
(make-hash-table :test #'eq)))
(let* ((vs (gethash nonterminal semantic-bovinate-nonterminal-check-map)))
(if (memq stream vs)
;; Always enter debugger to see the backtrace
(let ((debug-on-signal t)
(debug-on-error t))
(setq semantic-bovinate-nonterminal-check-obarray nil)
(error "Infinite recursive parse suspected on %s" nt))
(set (intern nt semantic-bovinate-nonterminal-check-obarray)
(cons stream vs)))))
(setq semantic-bovinate-nonterminal-check-map nil)
(error "Infinite recursive parse suspected on %s" nonterminal))
(push stream
(gethash nonterminal semantic-bovinate-nonterminal-check-map)))))
;;;###autoload
(defun semantic-bovinate-stream (stream &optional nonterminal)
@ -110,6 +107,9 @@ list of semantic tokens found."
(or semantic--buffer-cache
(semantic-bovinate-nonterminal-check stream nonterminal))
;; FIXME: `semantic-parse-region-c-mode' inspects `lse' to try and
;; detect a recursive call (used with macroexpansion, to avoid inf-loops).
(with-suppressed-warnings ((lexical lse)) (defvar lse))
(let* ((table semantic--parse-table)
(matchlist (cdr (assq nonterminal table)))
(starting-stream stream)
@ -216,7 +216,8 @@ list of semantic tokens found."
(setq cvl (cons
(if (memq (semantic-lex-token-class lse)
'(comment semantic-list))
valdot val) cvl))) ;append unchecked value.
valdot val)
cvl))) ;append unchecked value.
(setq end (semantic-lex-token-end lse))
)
(setq lte nil cvl nil)) ;No more matches, exit

View File

@ -1,4 +1,4 @@
;;; semantic/bovine/c.el --- Semantic details for C
;;; semantic/bovine/c.el --- Semantic details for C -*- lexical-binding: t; -*-
;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
@ -114,7 +114,8 @@ part of the preprocessor map.")
"Reset the C preprocessor symbol map based on all input variables."
(when (and semantic-mode
(featurep 'semantic/bovine/c))
(remove-hook 'mode-local-init-hook 'semantic-c-reset-preprocessor-symbol-map)
(remove-hook 'mode-local-init-hook
#'semantic-c-reset-preprocessor-symbol-map)
;; Initialize semantic-lex-spp-macro-symbol-obarray with symbols.
(setq-mode-local c-mode
semantic-lex-spp-macro-symbol-obarray
@ -154,7 +155,7 @@ part of the preprocessor map.")
;; Make sure the preprocessor symbols are set up when mode-local kicks
;; in.
(add-hook 'mode-local-init-hook 'semantic-c-reset-preprocessor-symbol-map)
(add-hook 'mode-local-init-hook #'semantic-c-reset-preprocessor-symbol-map)
(defcustom semantic-lex-c-preprocessor-symbol-map nil
"Table of C Preprocessor keywords used by the Semantic C lexer.
@ -237,8 +238,8 @@ Return the defined symbol as a special spp lex token."
(skip-chars-forward " \t")
(if (eolp)
nil
(let* ((name (buffer-substring-no-properties
(match-beginning 1) (match-end 1)))
(let* (;; (name (buffer-substring-no-properties
;; (match-beginning 1) (match-end 1)))
(beginning-of-define (match-end 1))
(with-args (save-excursion
(goto-char (match-end 0))
@ -488,7 +489,7 @@ code to parse."
(error nil))))
(let ((eval-form (condition-case err
(eval parsedtokelist)
(eval parsedtokelist t)
(error
(semantic-push-parser-warning
(format "Hideif forms produced an error. Assuming false.\n%S" err)
@ -499,11 +500,11 @@ code to parse."
(equal eval-form 0)));; ifdef line resulted in false
;; The if indicates to skip this preprocessor section
(let ((pt nil))
(let () ;; (pt nil)
(semantic-push-parser-warning (format "Skip %s" (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
(point-at-bol) (point-at-eol))
(beginning-of-line)
(setq pt (point))
;; (setq pt (point))
;; This skips only a section of a conditional. Once that section
;; is opened, encountering any new #else or related conditional
;; should be skipped.
@ -818,7 +819,9 @@ MACRO expansion mode is handled through the nature of Emacs's non-lexical
binding of variables.
START, END, NONTERMINAL, DEPTH, and RETURNONERRORS are the same
as for the parent."
(if (and (boundp 'lse) (or (/= start 1) (/= end (point-max))))
;; FIXME: We shouldn't depend on the internals of `semantic-bovinate-stream'.
(with-suppressed-warnings ((lexical lse)) (defvar lse))
(if (and (boundp 'lse) (or (/= start (point-min)) (/= end (point-max))))
(let* ((last-lexical-token lse)
(llt-class (semantic-lex-token-class last-lexical-token))
(llt-fakebits (car (cdr last-lexical-token)))
@ -926,7 +929,7 @@ the regular parser."
(semantic-lex-init)
(semantic-clear-toplevel-cache)
(remove-hook 'semantic-lex-reset-functions
'semantic-lex-spp-reset-hook t)
#'semantic-lex-spp-reset-hook t)
)
;; Get the macro symbol table right.
(setq semantic-lex-spp-dynamic-macro-symbol-obarray spp-syms)
@ -970,7 +973,7 @@ the regular parser."
;; Notify about the debug
(setq semantic-c-debug-mode-init-last-mode mm)
(add-hook 'post-command-hook 'semantic-c-debug-mode-init-pch)))
(add-hook 'post-command-hook #'semantic-c-debug-mode-init-pch)))
(defun semantic-c-debug-mode-init-pch ()
"Notify user about needing to debug their major mode hooks."
@ -987,7 +990,7 @@ M-x semantic-c-debug-mode-init
now.
")
(remove-hook 'post-command-hook 'semantic-c-debug-mode-init-pch)))
(remove-hook 'post-command-hook #'semantic-c-debug-mode-init-pch)))
(defun semantic-expand-c-tag (tag)
"Expand TAG into a list of equivalent tags, or nil."
@ -1228,7 +1231,7 @@ Use `semantic-analyze-current-tag' to debug this fcn."
(when (not (semantic-tag-p tag)) (signal 'wrong-type-argument (list 'semantic-tag-p tag)))
(let ((allhits nil)
(scope nil)
(refs nil))
) ;; (refs nil)
(save-excursion
(semantic-go-to-tag tag db)
(setq scope (semantic-calculate-scope))
@ -1250,11 +1253,12 @@ Use `semantic-analyze-current-tag' to debug this fcn."
(reverse newparents)))
(setq allhits (semantic--analyze-refs-full-lookup tag scope t)))
(setq refs (semantic-analyze-references (semantic-tag-name tag)
:tag tag
:tagdb db
:scope scope
:rawsearchdata allhits)))))
;; (setq refs
(semantic-analyze-references (semantic-tag-name tag)
:tag tag
:tagdb db
:scope scope
:rawsearchdata allhits)))) ;;)
(defun semantic-c-reconstitute-token (tokenpart declmods typedecl)
"Reconstitute a token TOKENPART with DECLMODS and TYPEDECL.
@ -1540,9 +1544,9 @@ This might be a string, or a list of tokens."
((semantic-tag-p templatespec)
(semantic-format-tag-abbreviate templatespec))
((listp templatespec)
(mapconcat 'semantic-format-tag-abbreviate templatespec ", "))))
(mapconcat #'semantic-format-tag-abbreviate templatespec ", "))))
(defun semantic-c-template-string (token &optional parent color)
(defun semantic-c-template-string (token &optional parent _color)
"Return a string representing the TEMPLATE attribute of TOKEN.
This string is prefixed with a space, or is the empty string.
Argument PARENT specifies a parent type.
@ -1550,8 +1554,8 @@ Argument COLOR specifies that the string should be colorized."
(let ((t2 (semantic-c-tag-template-specifier token))
(t1 (semantic-c-tag-template token))
;; @todo - Need to account for a parent that is a template
(pt1 (if parent (semantic-c-tag-template parent)))
(pt2 (if parent (semantic-c-tag-template-specifier parent)))
(_pt1 (if parent (semantic-c-tag-template parent)))
(_pt2 (if parent (semantic-c-tag-template-specifier parent)))
)
(cond (t2 ;; we have a template with specifier
(concat " <"
@ -1610,7 +1614,7 @@ handled. A class is abstract only if its destructor is virtual."
(member "virtual" (semantic-tag-modifiers tag))))
(t (semantic-tag-abstract-p-default tag parent))))
(defun semantic-c-dereference-typedef (type scope &optional type-declaration)
(defun semantic-c-dereference-typedef (type _scope &optional type-declaration)
"If TYPE is a typedef, get TYPE's type by name or tag, and return.
SCOPE is not used, and TYPE-DECLARATION is used only if TYPE is not a typedef."
(if (and (eq (semantic-tag-class type) 'type)
@ -1655,7 +1659,7 @@ return `ref<Foo,Bar>'."
(concat (semantic-tag-name type)
"<" (semantic-c--template-name-1 (cdr spec-list)) ">"))
(defun semantic-c-dereference-template (type scope &optional type-declaration)
(defun semantic-c-dereference-template (type _scope &optional type-declaration)
"Dereference any template specifiers in TYPE within SCOPE.
If TYPE is a template, return a TYPE copy with the templates types
instantiated as specified in TYPE-DECLARATION."
@ -1677,7 +1681,7 @@ instantiated as specified in TYPE-DECLARATION."
(list type type-declaration))
;;; Patch here by "Raf" for instantiating templates.
(defun semantic-c-dereference-member-of (type scope &optional type-declaration)
(defun semantic-c-dereference-member-of (type _scope &optional type-declaration)
"Dereference through the `->' operator of TYPE.
Uses the return type of the `->' operator if it is contained in TYPE.
SCOPE is the current local scope to perform searches in.
@ -1700,7 +1704,7 @@ Such an alias can be created through `using' statements in a
namespace declaration. This function checks the namespaces in
SCOPE for such statements."
(let ((scopetypes (oref scope scopetypes))
typename currentns tmp usingname result namespaces)
typename currentns result namespaces) ;; usingname tmp
(when (and (semantic-tag-p type-declaration)
(or (null type) (semantic-tag-prototype-p type)))
(setq typename (semantic-analyze-split-name (semantic-tag-name type-declaration)))
@ -1739,11 +1743,11 @@ with a fully qualified name in the original namespace. Returns
nil if NAMESPACE is not an alias."
(when (eq (semantic-tag-get-attribute namespace :kind) 'alias)
(let ((typename (semantic-analyze-split-name (semantic-tag-name type)))
ns nstype originaltype newtype)
ns nstype originaltype) ;; newtype
;; Make typename unqualified
(if (listp typename)
(setq typename (last typename))
(setq typename (list typename)))
(setq typename (if (listp typename)
(last typename)
(list typename)))
(when
(and
;; Get original namespace and make sure TYPE exists there.
@ -1755,13 +1759,13 @@ nil if NAMESPACE is not an alias."
(semantic-tag-get-attribute nstype :members))))
;; Construct new type with name in original namespace.
(setq ns (semantic-analyze-split-name ns))
(setq newtype
(semantic-tag-clone
(car originaltype)
(semantic-analyze-unsplit-name
(if (listp ns)
(append ns typename)
(append (list ns) typename)))))))))
;; (setq newtype
(semantic-tag-clone
(car originaltype)
(semantic-analyze-unsplit-name
(if (listp ns)
(append ns typename)
(append (list ns) typename)))))))) ;; )
;; This searches a type in a namespace, following through all using
;; statements.
@ -1769,7 +1773,7 @@ nil if NAMESPACE is not an alias."
"Check if TYPE is accessible in NAMESPACE through a using statement.
Returns the original type from the namespace where it is defined,
or nil if it cannot be found."
(let (usings result usingname usingtype unqualifiedname members shortname tmp)
(let (usings result usingname usingtype unqualifiedname members) ;; shortname tmp
;; Get all using statements from NAMESPACE.
(when (and (setq usings (semantic-tag-get-attribute namespace :members))
(setq usings (semantic-find-tags-by-class 'using usings)))
@ -1842,7 +1846,7 @@ These are constants which are of type TYPE."
(define-mode-local-override semantic-analyze-unsplit-name c-mode (namelist)
"Assemble the list of names NAMELIST into a namespace name."
(mapconcat 'identity namelist "::"))
(mapconcat #'identity namelist "::"))
(define-mode-local-override semantic-ctxt-scoped-types c++-mode (&optional point)
"Return a list of tags of CLASS type based on POINT.
@ -1885,7 +1889,7 @@ DO NOT return the list of tags encompassing point."
(semantic-get-local-variables))))
(setq tagreturn
(append tagreturn
(mapcar 'semantic-tag-type tmp))))))
(mapcar #'semantic-tag-type tmp))))))
;; Return the stuff
tagreturn))
@ -1943,7 +1947,7 @@ namespace, since this means all tags inside this include will
have to be wrapped in that namespace."
(let ((inctable (semanticdb-find-table-for-include-default includetag table))
(inside-ns (semantic-tag-get-attribute includetag :inside-ns))
tags newtags namespaces prefix parenttable newtable)
tags newtags namespaces parenttable newtable) ;; prefix
(if (or (null inside-ns)
(not inctable)
(not (slot-boundp inctable 'tags)))
@ -2111,13 +2115,11 @@ actually in their parent which is not accessible.")
"Set up a buffer for semantic parsing of the C language."
(semantic-c-by--install-parser)
(setq semantic-lex-syntax-modifications '((?> ".")
(?< ".")
)
)
(?< ".")))
(setq semantic-lex-analyzer #'semantic-c-lexer)
(add-hook 'semantic-lex-reset-functions 'semantic-lex-spp-reset-hook nil t)
(when (eq major-mode 'c++-mode)
(add-hook 'semantic-lex-reset-functions #'semantic-lex-spp-reset-hook nil t)
(when (derived-mode-p 'c++-mode)
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("__cplusplus" . "")))
)
@ -2142,7 +2144,7 @@ actually in their parent which is not accessible.")
(defun semantic-c-describe-environment ()
"Describe the Semantic features of the current C environment."
(interactive)
(if (not (member 'c-mode (mode-local-equivalent-mode-p major-mode)))
(if (not (derived-mode-p 'c-mode))
(error "Not useful to query C mode in %s mode" major-mode))
(let ((gcc (when (boundp 'semantic-gcc-setup-data)
semantic-gcc-setup-data))

View File

@ -1,4 +1,4 @@
;;; semantic/bovine/debug.el --- Debugger support for bovinator
;;; semantic/bovine/debug.el --- Debugger support for bovinator -*- lexical-binding: t; -*-
;; Copyright (C) 2003, 2009-2021 Free Software Foundation, Inc.
@ -123,7 +123,7 @@ Argument CONDITION is the thrown error condition."
frame)
frame))
(cl-defmethod semantic-debug-frame-highlight ((frame semantic-bovine-debug-error-frame))
(cl-defmethod semantic-debug-frame-highlight ((_frame semantic-bovine-debug-error-frame))
"Highlight a frame from an action."
;; How do I get the location of the action in the source buffer?
)

View File

@ -940,7 +940,7 @@ ELisp variables can be pretty long, so track this one too.")
;; loaded into Emacs.
)
(add-hook 'emacs-lisp-mode-hook 'semantic-default-elisp-setup)
(add-hook 'emacs-lisp-mode-hook #'semantic-default-elisp-setup)
;;; LISP MODE
;;
@ -950,7 +950,7 @@ ELisp variables can be pretty long, so track this one too.")
;; See this syntax:
;; (defun foo () /#A)
;;
(add-hook 'lisp-mode-hook 'semantic-default-elisp-setup)
(add-hook 'lisp-mode-hook #'semantic-default-elisp-setup)
(eval-after-load "semantic/db"
'(require 'semantic/db-el)

View File

@ -47,11 +47,11 @@ to give to the program."
(erase-buffer)
(setenv "LC_ALL" "C")
(condition-case nil
(setq err (apply 'call-process gcc-cmd options))
(setq err (apply #'call-process gcc-cmd options))
(error ;; Some bogus directory for the first time perhaps?
(let ((default-directory (expand-file-name "~/")))
(condition-case nil
(setq err (apply 'call-process gcc-cmd options))
(setq err (apply #'call-process gcc-cmd options))
(error ;; gcc doesn't exist???
nil)))))
(setenv "LC_ALL" old-lc-messages)
@ -151,12 +151,12 @@ It should also include other symbols GCC was compiled with.")
(let* ((fields (or semantic-gcc-setup-data
(semantic-gcc-fields (semantic-gcc-query "gcc" "-v"))))
(cpp-options `("-E" "-dM" "-x" "c++" ,null-device))
(query (let ((q (apply 'semantic-gcc-query "cpp" cpp-options)))
(query (let ((q (apply #'semantic-gcc-query "cpp" cpp-options)))
(if (stringp q)
q
;; `cpp' command in `semantic-gcc-setup' doesn't work on
;; Mac, try `gcc'.
(apply 'semantic-gcc-query "gcc" cpp-options))))
(apply #'semantic-gcc-query "gcc" cpp-options))))
(defines (if (stringp query)
(semantic-cpp-defs query)
(message (concat "Could not query gcc for defines. "

View File

@ -1,4 +1,4 @@
;;; semantic/bovine/make.el --- Makefile parsing rules.
;;; semantic/bovine/make.el --- Makefile parsing rules. -*- lexical-binding: t; -*-
;; Copyright (C) 2000-2004, 2008-2021 Free Software Foundation, Inc.
@ -103,13 +103,13 @@ Ignore them."
xpand))
(define-mode-local-override semantic-get-local-variables
makefile-mode (&optional point)
makefile-mode (&optional _point)
"Override `semantic-get-local-variables' so it does not throw an error.
We never have local variables in Makefiles."
nil)
(define-mode-local-override semantic-ctxt-current-class-list
makefile-mode (&optional point)
makefile-mode (&optional _point)
"List of classes that are valid to place at point."
(let ((tag (semantic-current-tag)))
(when tag
@ -176,7 +176,7 @@ This is the same as a regular prototype."
(semantic-format-tag-prototype tag parent color))
(define-mode-local-override semantic-analyze-possible-completions
makefile-mode (context &rest flags)
makefile-mode (context &rest _flags)
"Return a list of possible completions in a Makefile.
Uses default implementation, and also gets a list of filenames."
(require 'semantic/analyze/complete)

View File

@ -1,4 +1,4 @@
;;; semantic/bovine/scm.el --- Semantic details for Scheme (guile)
;;; semantic/bovine/scm.el --- Semantic details for Scheme (guile) -*- lexical-binding: t; -*-
;;; Copyright (C) 2001-2004, 2008-2021 Free Software Foundation, Inc.
@ -49,7 +49,7 @@ actually on the local machine.")
")")
(semantic-format-tag-prototype-default tag parent color))))
(define-mode-local-override semantic-documentation-for-tag scheme-mode (tag &optional nosnarf)
(define-mode-local-override semantic-documentation-for-tag scheme-mode (tag &optional _nosnarf)
"Return the documentation string for TAG.
Optional argument NOSNARF is ignored."
(let ((d (semantic-tag-docstring tag)))
@ -57,7 +57,7 @@ Optional argument NOSNARF is ignored."
(substring d 1)
d)))
(define-mode-local-override semantic-insert-foreign-tag scheme-mode (tag tagfile)
(define-mode-local-override semantic-insert-foreign-tag scheme-mode (tag _tagfile)
"Insert TAG from TAGFILE at point.
Attempts a simple prototype for calling or using TAG."
(cond ((eq (semantic-tag-class tag) 'function)

View File

@ -195,9 +195,6 @@ If Emacs cannot resolve this symbol to a particular file, then return nil."
(when tab (cons tab match))))))
(autoload 'help-function-arglist "help-fns")
(defalias 'semanticdb-elisp-sym-function-arglist 'help-function-arglist)
(make-obsolete 'semanticdb-elisp-sym-function-arglist
'help-function-arglist "CEDET 1.1")
(defun semanticdb-elisp-sym->tag (sym &optional toktype)
"Convert SYM into a semantic tag.
@ -347,6 +344,9 @@ Return a list of tags."
)
taglst))))
(define-obsolete-function-alias 'semanticdb-elisp-sym-function-arglist
#'help-function-arglist "24.3")
(provide 'semantic/db-el)
;;; semantic/db-el.el ends here

View File

@ -322,17 +322,7 @@ calling this one."
"Call `find-file-noselect' with various features turned off.
Use this when referencing a file that will be soon deleted.
FILE, NOWARN, RAWFILE, and WILDCARDS are passed into `find-file-noselect'."
;; Hack -
;; Check if we are in set-auto-mode, and if so, warn about this.
(when (boundp 'keep-mode-if-same)
(let ((filename (or (and (boundp 'filename) filename)
"(unknown)")))
(message "WARNING: semantic-find-file-noselect called for \
%s while in set-auto-mode for %s. You should call the responsible function \
into `mode-local-init-hook'." file filename)
(sit-for 1)))
(let* ((recentf-exclude '( (lambda (f) t) ))
(let* ((recentf-exclude #'always)
;; This is a brave statement. Don't waste time loading in
;; lots of modes. Especially decoration mode can waste a lot
;; of time for a buffer we intend to kill.

View File

@ -24,7 +24,7 @@
;;; Code:
(require 'semantic/lex)
(eval-when-compile (require 'semantic/bovine))
(require 'semantic/wisent)
;;; Prologue
;;
@ -112,315 +112,312 @@
"Table of lexical tokens.")
(defconst semantic-grammar-wy--parse-table
(progn
(eval-when-compile
(require 'semantic/wisent/comp))
(wisent-compile-grammar
'((DEFAULT-PREC NO-DEFAULT-PREC KEYWORD LANGUAGEMODE LEFT NONASSOC PACKAGE EXPECTEDCONFLICTS PROVIDE PREC PUT QUOTEMODE RIGHT SCOPESTART START TOKEN TYPE USE-MACROS STRING SYMBOL PERCENT_PERCENT CHARACTER PREFIXED_LIST SEXP PROLOGUE EPILOGUE PAREN_BLOCK BRACE_BLOCK LPAREN RPAREN LBRACE RBRACE COLON SEMI OR LT GT)
nil
(grammar
((prologue))
((epilogue))
((declaration))
((nonterminal))
((PERCENT_PERCENT)))
(prologue
((PROLOGUE)
(wisent-compiled-grammar
((DEFAULT-PREC NO-DEFAULT-PREC KEYWORD LANGUAGEMODE LEFT NONASSOC PACKAGE EXPECTEDCONFLICTS PROVIDE PREC PUT QUOTEMODE RIGHT SCOPESTART START TOKEN TYPE USE-MACROS STRING SYMBOL PERCENT_PERCENT CHARACTER PREFIXED_LIST SEXP PROLOGUE EPILOGUE PAREN_BLOCK BRACE_BLOCK LPAREN RPAREN LBRACE RBRACE COLON SEMI OR LT GT)
nil
(grammar
((prologue))
((epilogue))
((declaration))
((nonterminal))
((PERCENT_PERCENT)))
(prologue
((PROLOGUE)
(wisent-raw-tag
(semantic-tag-new-code "prologue" nil))))
(epilogue
((EPILOGUE)
(wisent-raw-tag
(semantic-tag-new-code "epilogue" nil))))
(declaration
((decl)
(eval $1 t)))
(decl
((default_prec_decl))
((no_default_prec_decl))
((languagemode_decl))
((package_decl))
((expectedconflicts_decl))
((provide_decl))
((precedence_decl))
((put_decl))
((quotemode_decl))
((scopestart_decl))
((start_decl))
((keyword_decl))
((token_decl))
((type_decl))
((use_macros_decl)))
(default_prec_decl
((DEFAULT-PREC)
`(wisent-raw-tag
(semantic-tag "default-prec" 'assoc :value
'("t")))))
(no_default_prec_decl
((NO-DEFAULT-PREC)
`(wisent-raw-tag
(semantic-tag "default-prec" 'assoc :value
'("nil")))))
(languagemode_decl
((LANGUAGEMODE symbols)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'languagemode :rest ',(cdr $2)))))
(package_decl
((PACKAGE SYMBOL)
`(wisent-raw-tag
(semantic-tag-new-package ',$2 nil))))
(expectedconflicts_decl
((EXPECTEDCONFLICTS symbols)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'expectedconflicts :rest ',(cdr $2)))))
(provide_decl
((PROVIDE SYMBOL)
`(wisent-raw-tag
(semantic-tag ',$2 'provide))))
(precedence_decl
((associativity token_type_opt items)
`(wisent-raw-tag
(semantic-tag ',$1 'assoc :type ',$2 :value ',$3))))
(associativity
((LEFT)
(progn "left"))
((RIGHT)
(progn "right"))
((NONASSOC)
(progn "nonassoc")))
(put_decl
((PUT put_name put_value)
`(wisent-raw-tag
(semantic-tag ',$2 'put :value ',(list $3))))
((PUT put_name put_value_list)
`(wisent-raw-tag
(semantic-tag ',$2 'put :value ',$3)))
((PUT put_name_list put_value)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'put :rest ',(cdr $2)
:value ',(list $3))))
((PUT put_name_list put_value_list)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'put :rest ',(cdr $2)
:value ',$3))))
(put_name_list
((BRACE_BLOCK)
(mapcar #'semantic-tag-name
(semantic-parse-region
(car $region1)
(cdr $region1)
'put_names 1))))
(put_names
((LBRACE)
nil)
((RBRACE)
nil)
((put_name)
(wisent-raw-tag
(semantic-tag $1 'put-name))))
(put_name
((SYMBOL))
((token_type)))
(put_value_list
((BRACE_BLOCK)
(mapcar #'semantic-tag-code-detail
(semantic-parse-region
(car $region1)
(cdr $region1)
'put_values 1))))
(put_values
((LBRACE)
nil)
((RBRACE)
nil)
((put_value)
(wisent-raw-tag
(semantic-tag-new-code "put-value" $1))))
(put_value
((SYMBOL any_value)
(cons $1 $2)))
(scopestart_decl
((SCOPESTART SYMBOL)
`(wisent-raw-tag
(semantic-tag ',$2 'scopestart))))
(quotemode_decl
((QUOTEMODE SYMBOL)
`(wisent-raw-tag
(semantic-tag ',$2 'quotemode))))
(start_decl
((START symbols)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'start :rest ',(cdr $2)))))
(keyword_decl
((KEYWORD SYMBOL string_value)
`(wisent-raw-tag
(semantic-tag ',$2 'keyword :value ',$3))))
(token_decl
((TOKEN token_type_opt SYMBOL string_value)
`(wisent-raw-tag
(semantic-tag ',$3 ',(if $2 'token 'keyword)
:type ',$2 :value ',$4)))
((TOKEN token_type_opt symbols)
`(wisent-raw-tag
(semantic-tag ',(car $3)
'token :type ',$2 :rest ',(cdr $3)))))
(token_type_opt
(nil)
((token_type)))
(token_type
((LT SYMBOL GT)
(progn $2)))
(type_decl
((TYPE token_type plist_opt)
`(wisent-raw-tag
(semantic-tag ',$2 'type :value ',$3))))
(plist_opt
(nil)
((plist)))
(plist
((plist put_value)
(append
(list $2)
$1))
((put_value)
(list $1)))
(use_name_list
((BRACE_BLOCK)
(mapcar #'semantic-tag-name
(semantic-parse-region
(car $region1)
(cdr $region1)
'use_names 1))))
(use_names
((LBRACE)
nil)
((RBRACE)
nil)
((SYMBOL)
(wisent-raw-tag
(semantic-tag $1 'use-name))))
(use_macros_decl
((USE-MACROS SYMBOL use_name_list)
`(wisent-raw-tag
(semantic-tag "macro" 'macro :type ',$2 :value ',$3))))
(string_value
((STRING)
(read $1)))
(any_value
((SYMBOL))
((STRING))
((PAREN_BLOCK))
((PREFIXED_LIST))
((SEXP)))
(symbols
((lifo_symbols)
(nreverse $1)))
(lifo_symbols
((lifo_symbols SYMBOL)
(cons $2 $1))
((SYMBOL)
(list $1)))
(nonterminal
((SYMBOL
(setq semantic-grammar-wy--nterm $1 semantic-grammar-wy--rindx 0)
COLON rules SEMI)
(wisent-raw-tag
(semantic-tag $1 'nonterminal :children $4))))
(rules
((lifo_rules)
(apply #'nconc
(nreverse $1))))
(lifo_rules
((lifo_rules OR rule)
(cons $3 $1))
((rule)
(list $1)))
(rule
((rhs)
(let*
((nterm semantic-grammar-wy--nterm)
(rindx semantic-grammar-wy--rindx)
(rhs $1)
comps prec action elt)
(setq semantic-grammar-wy--rindx
(1+ semantic-grammar-wy--rindx))
(while rhs
(setq elt
(car rhs)
rhs
(cdr rhs))
(cond
((vectorp elt)
(if prec
(error "Duplicate %%prec in `%s:%d' rule" nterm rindx))
(setq prec
(aref elt 0)))
((consp elt)
(if
(or action comps)
(setq comps
(cons elt comps)
semantic-grammar-wy--rindx
(1+ semantic-grammar-wy--rindx))
(setq action
(car elt))))
(t
(setq comps
(cons elt comps)))))
(wisent-cook-tag
(wisent-raw-tag
(semantic-tag-new-code "prologue" nil))))
(epilogue
((EPILOGUE)
(wisent-raw-tag
(semantic-tag-new-code "epilogue" nil))))
(declaration
((decl)
(eval $1)))
(decl
((default_prec_decl))
((no_default_prec_decl))
((languagemode_decl))
((package_decl))
((expectedconflicts_decl))
((provide_decl))
((precedence_decl))
((put_decl))
((quotemode_decl))
((scopestart_decl))
((start_decl))
((keyword_decl))
((token_decl))
((type_decl))
((use_macros_decl)))
(default_prec_decl
((DEFAULT-PREC)
`(wisent-raw-tag
(semantic-tag "default-prec" 'assoc :value
'("t")))))
(no_default_prec_decl
((NO-DEFAULT-PREC)
`(wisent-raw-tag
(semantic-tag "default-prec" 'assoc :value
'("nil")))))
(languagemode_decl
((LANGUAGEMODE symbols)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'languagemode :rest ',(cdr $2)))))
(package_decl
((PACKAGE SYMBOL)
`(wisent-raw-tag
(semantic-tag-new-package ',$2 nil))))
(expectedconflicts_decl
((EXPECTEDCONFLICTS symbols)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'expectedconflicts :rest ',(cdr $2)))))
(provide_decl
((PROVIDE SYMBOL)
`(wisent-raw-tag
(semantic-tag ',$2 'provide))))
(precedence_decl
((associativity token_type_opt items)
`(wisent-raw-tag
(semantic-tag ',$1 'assoc :type ',$2 :value ',$3))))
(associativity
((LEFT)
(progn "left"))
((RIGHT)
(progn "right"))
((NONASSOC)
(progn "nonassoc")))
(put_decl
((PUT put_name put_value)
`(wisent-raw-tag
(semantic-tag ',$2 'put :value ',(list $3))))
((PUT put_name put_value_list)
`(wisent-raw-tag
(semantic-tag ',$2 'put :value ',$3)))
((PUT put_name_list put_value)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'put :rest ',(cdr $2)
:value ',(list $3))))
((PUT put_name_list put_value_list)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'put :rest ',(cdr $2)
:value ',$3))))
(put_name_list
((BRACE_BLOCK)
(mapcar 'semantic-tag-name
(semantic-parse-region
(car $region1)
(cdr $region1)
'put_names 1))))
(put_names
((LBRACE)
nil)
((RBRACE)
nil)
((put_name)
(wisent-raw-tag
(semantic-tag $1 'put-name))))
(put_name
((SYMBOL))
((token_type)))
(put_value_list
((BRACE_BLOCK)
(mapcar 'semantic-tag-code-detail
(semantic-parse-region
(car $region1)
(cdr $region1)
'put_values 1))))
(put_values
((LBRACE)
nil)
((RBRACE)
nil)
((put_value)
(wisent-raw-tag
(semantic-tag-new-code "put-value" $1))))
(put_value
((SYMBOL any_value)
(cons $1 $2)))
(scopestart_decl
((SCOPESTART SYMBOL)
`(wisent-raw-tag
(semantic-tag ',$2 'scopestart))))
(quotemode_decl
((QUOTEMODE SYMBOL)
`(wisent-raw-tag
(semantic-tag ',$2 'quotemode))))
(start_decl
((START symbols)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'start :rest ',(cdr $2)))))
(keyword_decl
((KEYWORD SYMBOL string_value)
`(wisent-raw-tag
(semantic-tag ',$2 'keyword :value ',$3))))
(token_decl
((TOKEN token_type_opt SYMBOL string_value)
`(wisent-raw-tag
(semantic-tag ',$3 ',(if $2 'token 'keyword)
:type ',$2 :value ',$4)))
((TOKEN token_type_opt symbols)
`(wisent-raw-tag
(semantic-tag ',(car $3)
'token :type ',$2 :rest ',(cdr $3)))))
(token_type_opt
(nil)
((token_type)))
(token_type
((LT SYMBOL GT)
(progn $2)))
(type_decl
((TYPE token_type plist_opt)
`(wisent-raw-tag
(semantic-tag ',$2 'type :value ',$3))))
(plist_opt
(nil)
((plist)))
(plist
((plist put_value)
(append
(list $2)
$1))
((put_value)
(list $1)))
(use_name_list
((BRACE_BLOCK)
(mapcar 'semantic-tag-name
(semantic-parse-region
(car $region1)
(cdr $region1)
'use_names 1))))
(use_names
((LBRACE)
nil)
((RBRACE)
nil)
((SYMBOL)
(wisent-raw-tag
(semantic-tag $1 'use-name))))
(use_macros_decl
((USE-MACROS SYMBOL use_name_list)
`(wisent-raw-tag
(semantic-tag "macro" 'macro :type ',$2 :value ',$3))))
(string_value
((STRING)
(read $1)))
(any_value
((SYMBOL))
((STRING))
((PAREN_BLOCK))
((PREFIXED_LIST))
((SEXP)))
(symbols
((lifo_symbols)
(nreverse $1)))
(lifo_symbols
((lifo_symbols SYMBOL)
(cons $2 $1))
((SYMBOL)
(list $1)))
(nonterminal
((SYMBOL
(setq semantic-grammar-wy--nterm $1 semantic-grammar-wy--rindx 0)
COLON rules SEMI)
(wisent-raw-tag
(semantic-tag $1 'nonterminal :children $4))))
(rules
((lifo_rules)
(apply 'nconc
(nreverse $1))))
(lifo_rules
((lifo_rules OR rule)
(cons $3 $1))
((rule)
(list $1)))
(rule
((rhs)
(let*
((nterm semantic-grammar-wy--nterm)
(rindx semantic-grammar-wy--rindx)
(rhs $1)
comps prec action elt)
(setq semantic-grammar-wy--rindx
(1+ semantic-grammar-wy--rindx))
(while rhs
(setq elt
(car rhs)
rhs
(cdr rhs))
(cond
((vectorp elt)
(if prec
(error "Duplicate %%prec in `%s:%d' rule" nterm rindx))
(setq prec
(aref elt 0)))
((consp elt)
(if
(or action comps)
(setq comps
(cons elt comps)
semantic-grammar-wy--rindx
(1+ semantic-grammar-wy--rindx))
(setq action
(car elt))))
(t
(setq comps
(cons elt comps)))))
(wisent-cook-tag
(wisent-raw-tag
(semantic-tag
(format "%s:%d" nterm rindx)
'rule :type
(if comps "group" "empty")
:value comps :prec prec :expr action))))))
(rhs
(nil)
((rhs item)
(cons $2 $1))
((rhs action)
(cons
(list $2)
$1))
((rhs PREC item)
(cons
(vector $3)
$1)))
(action
((PAREN_BLOCK))
((PREFIXED_LIST))
((BRACE_BLOCK)
(format "(progn\n%s)"
(let
((s $1))
(if
(string-match "^{[ \n ]*" s)
(setq s
(substring s
(match-end 0))))
(if
(string-match "[ \n ]*}$" s)
(setq s
(substring s 0
(match-beginning 0))))
s))))
(items
((lifo_items)
(nreverse $1)))
(lifo_items
((lifo_items item)
(cons $2 $1))
((item)
(list $1)))
(item
((SYMBOL))
((CHARACTER))))
'(grammar prologue epilogue declaration nonterminal rule put_names put_values use_names)))
(semantic-tag
(format "%s:%d" nterm rindx)
'rule :type
(if comps "group" "empty")
:value comps :prec prec :expr action))))))
(rhs
(nil)
((rhs item)
(cons $2 $1))
((rhs action)
(cons
(list $2)
$1))
((rhs PREC item)
(cons
(vector $3)
$1)))
(action
((PAREN_BLOCK))
((PREFIXED_LIST))
((BRACE_BLOCK)
(format "(progn\n%s)"
(let
((s $1))
(if
(string-match "^{[ \n ]*" s)
(setq s
(substring s
(match-end 0))))
(if
(string-match "[ \n ]*}$" s)
(setq s
(substring s 0
(match-beginning 0))))
s))))
(items
((lifo_items)
(nreverse $1)))
(lifo_items
((lifo_items item)
(cons $2 $1))
((item)
(list $1)))
(item
((SYMBOL))
((CHARACTER))))
(grammar prologue epilogue declaration nonterminal rule put_names put_values use_names))
"Parser table.")
(defun semantic-grammar-wy--install-parser ()
@ -434,7 +431,7 @@
semantic-lex-types-obarray semantic-grammar-wy--token-table)
;; Collect unmatched syntax lexical tokens
(add-hook 'wisent-discarding-token-functions
'wisent-collect-unmatched-syntax nil t))
#'wisent-collect-unmatched-syntax nil t))
;;; Analyzers

View File

@ -1,4 +1,4 @@
;;; semantic/grammar.el --- Major mode framework for Semantic grammars
;;; semantic/grammar.el --- Major mode framework for Semantic grammars -*- lexical-binding: t; -*-
;; Copyright (C) 2002-2005, 2007-2021 Free Software Foundation, Inc.
@ -191,11 +191,11 @@ Warn if other tags of class CLASS exist."
That is tag names plus names defined in tag attribute `:rest'."
(let* ((tags (semantic-find-tags-by-class
class (current-buffer))))
(apply 'append
(apply #'append
(mapcar
#'(lambda (tag)
(mapcar
'intern
#'intern
(cons (semantic-tag-name tag)
(semantic-tag-get-attribute tag :rest))))
tags))))
@ -312,7 +312,7 @@ the keyword and TOKEN is the terminal symbol identifying the keyword."
(setq put (car puts)
puts (cdr puts)
keys (mapcar
'intern
#'intern
(cons (semantic-tag-name put)
(semantic-tag-get-attribute put :rest))))
(while keys
@ -565,6 +565,10 @@ Typically a DEFINE expression should look like this:
(goto-char start)
(indent-sexp))))
(defvar semantic-grammar-require-form
'(eval-when-compile (require 'semantic/bovine))
"The form to use to load the parser engine.")
(defconst semantic-grammar-header-template
'("\
;;; " file " --- Generated parser support file
@ -602,7 +606,7 @@ Typically a DEFINE expression should look like this:
;;; Code:
(require 'semantic/lex)
(eval-when-compile (require 'semantic/bovine))
" require-form "
")
"Generated header template.
The symbols in the template are local variables in
@ -651,6 +655,7 @@ The symbols in the list are local variables in
semantic--grammar-output-buffer))
(gram . ,(semantic-grammar-buffer-file))
(date . ,(format-time-string "%Y-%m-%d %T%z"))
(require-form . ,(format "%S" semantic-grammar-require-form))
(vcid . ,(concat "$" "Id" "$")) ;; Avoid expansion
;; Try to get the copyright from the input grammar, or
;; generate a new one if not found.
@ -818,7 +823,7 @@ Block definitions are read from the current table of lexical types."
(let ((semantic-lex-types-obarray
(semantic-lex-make-type-table tokens props))
semantic-grammar--lex-block-specs)
(mapatoms 'semantic-grammar-insert-defanalyzer
(mapatoms #'semantic-grammar-insert-defanalyzer
semantic-lex-types-obarray))))
;;; Generation of the grammar support file.
@ -846,7 +851,8 @@ Lisp code."
(semantic--grammar-package (semantic-grammar-package))
(semantic--grammar-provide (semantic-grammar-first-tag-name 'provide))
(output (concat (or semantic--grammar-provide
semantic--grammar-package) ".el"))
semantic--grammar-package)
".el"))
(semantic--grammar-input-buffer (current-buffer))
(semantic--grammar-output-buffer
(find-file-noselect
@ -1197,20 +1203,20 @@ END is the limit of the search."
(defvar semantic-grammar-mode-map
(let ((km (make-sparse-keymap)))
(define-key km "|" 'semantic-grammar-electric-punctuation)
(define-key km ";" 'semantic-grammar-electric-punctuation)
(define-key km "%" 'semantic-grammar-electric-punctuation)
(define-key km "(" 'semantic-grammar-electric-punctuation)
(define-key km ")" 'semantic-grammar-electric-punctuation)
(define-key km ":" 'semantic-grammar-electric-punctuation)
(define-key km "|" #'semantic-grammar-electric-punctuation)
(define-key km ";" #'semantic-grammar-electric-punctuation)
(define-key km "%" #'semantic-grammar-electric-punctuation)
(define-key km "(" #'semantic-grammar-electric-punctuation)
(define-key km ")" #'semantic-grammar-electric-punctuation)
(define-key km ":" #'semantic-grammar-electric-punctuation)
(define-key km "\t" 'semantic-grammar-indent)
(define-key km "\M-\t" 'semantic-grammar-complete)
(define-key km "\C-c\C-c" 'semantic-grammar-create-package)
(define-key km "\C-cm" 'semantic-grammar-find-macro-expander)
(define-key km "\C-cik" 'semantic-grammar-insert-keyword)
;; (define-key km "\C-cc" 'semantic-grammar-generate-and-load)
;; (define-key km "\C-cr" 'semantic-grammar-generate-one-rule)
(define-key km "\t" #'semantic-grammar-indent)
(define-key km "\M-\t" #'semantic-grammar-complete)
(define-key km "\C-c\C-c" #'semantic-grammar-create-package)
(define-key km "\C-cm" #'semantic-grammar-find-macro-expander)
(define-key km "\C-cik" #'semantic-grammar-insert-keyword)
;; (define-key km "\C-cc" #'semantic-grammar-generate-and-load)
;; (define-key km "\C-cr" #'semantic-grammar-generate-one-rule)
km)
"Keymap used in `semantic-grammar-mode'.")
@ -1322,7 +1328,7 @@ the change bounds to encompass the whole nonterminal tag."
;; Setup Semantic to parse grammar
(semantic-grammar-wy--install-parser)
(setq semantic-lex-comment-regex ";;"
semantic-lex-analyzer 'semantic-grammar-lexer
semantic-lex-analyzer #'semantic-grammar-lexer
semantic-type-relation-separator-character '(":")
semantic-symbol->name-assoc-list
'(
@ -1343,10 +1349,10 @@ the change bounds to encompass the whole nonterminal tag."
;; Before each change, clear the cached regexp used to highlight
;; macros local in this grammar.
(add-hook 'before-change-functions
'semantic--grammar-clear-macros-regexp-2 nil t)
#'semantic--grammar-clear-macros-regexp-2 nil t)
;; Handle safe re-parse of grammar rules.
(add-hook 'semantic-edits-new-change-functions
'semantic-grammar-edits-new-change-hook-fcn
#'semantic-grammar-edits-new-change-hook-fcn
nil t))
;;;;
@ -1734,7 +1740,7 @@ If it is a macro name, return a description of the associated expander
function parameter list.
If it is a function name, return a description of this function
parameter list.
It it is a variable name, return a brief (one-line) documentation
If it is a variable name, return a brief (one-line) documentation
string for the variable.
If a default description of the current context can be obtained,
return it.
@ -1876,7 +1882,7 @@ Optional argument COLOR determines if color is added to the text."
(names (semantic-tag-get-attribute tag :rest))
(type (semantic-tag-type tag)))
(if names
(setq name (mapconcat 'identity (cons name names) " ")))
(setq name (mapconcat #'identity (cons name names) " ")))
(setq desc (concat
(if type
(format " <%s>" type)
@ -1893,7 +1899,7 @@ Optional argument COLOR determines if color is added to the text."
(format " <%s>" type)
"")
(if val
(concat " " (mapconcat 'identity val " "))
(concat " " (mapconcat #'identity val " "))
"")))))
(t
(setq desc (semantic-format-tag-abbreviate tag parent color))))
@ -1944,7 +1950,7 @@ Optional argument COLOR determines if color is added to the text."
context-return)))
(define-mode-local-override semantic-analyze-possible-completions
semantic-grammar-mode (context &rest flags)
semantic-grammar-mode (context &rest _flags)
"Return a list of possible completions based on CONTEXT."
(require 'semantic/analyze/complete)
(if (semantic-grammar-in-lisp-p)

View File

@ -348,54 +348,56 @@ Returns t if all processing succeeded."
Visits Semantic controlled buffers, and makes sure all needed
include files have been parsed, and that the typecache is up to date.
Uses `semantic-idle-work-for-on-buffer' to do the work."
(let ((errbuf nil)
(interrupted
(semantic-exit-on-input 'idle-work-timer
(let* ((inhibit-quit nil)
(cb (current-buffer))
(buffers (delq (current-buffer)
(delq nil
(mapcar #'(lambda (b)
(and (buffer-file-name b)
b))
(buffer-list)))))
safe errbuf)
;; First, handle long tasks in the current buffer.
(when (semantic-idle-scheduler-enabled-p)
(save-excursion
(setq safe (semantic-idle-work-for-one-buffer (current-buffer))
)))
(when (not safe) (push (current-buffer) errbuf))
(let*
((errbuf nil)
(interrupted
(semantic-exit-on-input 'idle-work-timer
(let* ((inhibit-quit nil)
(cb (current-buffer))
(buffers (delq (current-buffer)
(delq nil
(mapcar #'(lambda (b)
(and (buffer-file-name b)
b))
(buffer-list)))))
safe) ;; errbuf
;; First, handle long tasks in the current buffer.
(when (semantic-idle-scheduler-enabled-p)
(save-excursion
(setq safe (semantic-idle-work-for-one-buffer (current-buffer))
)))
(when (not safe) (push (current-buffer) errbuf))
;; Now loop over other buffers with same major mode, trying to
;; update them as well. Stop on keypress.
(dolist (b buffers)
(semantic-throw-on-input 'parsing-mode-buffers)
(with-current-buffer b
(when (semantic-idle-scheduler-enabled-p)
(and (semantic-idle-scheduler-enabled-p)
(unless (semantic-idle-work-for-one-buffer (current-buffer))
(push (current-buffer) errbuf)))
))
)
;; Now loop over other buffers with same major mode, trying to
;; update them as well. Stop on keypress.
(dolist (b buffers)
(semantic-throw-on-input 'parsing-mode-buffers)
(with-current-buffer b
(when (semantic-idle-scheduler-enabled-p)
(and (semantic-idle-scheduler-enabled-p)
(unless (semantic-idle-work-for-one-buffer
(current-buffer))
(push (current-buffer) errbuf)))
))
)
(when (and (featurep 'semantic/db) (semanticdb-minor-mode-p))
;; Save everything.
(semanticdb-save-all-db-idle)
(when (and (featurep 'semantic/db) (semanticdb-minor-mode-p))
;; Save everything.
(semanticdb-save-all-db-idle)
;; Parse up files near our active buffer
(when semantic-idle-work-parse-neighboring-files-flag
(semantic-safe "Idle Work Parse Neighboring Files: %S"
(set-buffer cb)
(semantic-idle-scheduler-work-parse-neighboring-files))
t)
;; Parse up files near our active buffer
(when semantic-idle-work-parse-neighboring-files-flag
(semantic-safe "Idle Work Parse Neighboring Files: %S"
(set-buffer cb)
(semantic-idle-scheduler-work-parse-neighboring-files))
t)
;; Save everything... again
(semanticdb-save-all-db-idle)
)
;; Save everything... again
(semanticdb-save-all-db-idle)
)
;; Done w/ processing
nil))))
;; Done w/ processing
nil))))
;; Done
(if interrupted
@ -734,7 +736,8 @@ Call `semantic-idle-summary-current-symbol-info' for getting the
current tag to display information."
(or (eq major-mode 'emacs-lisp-mode)
(not (semantic-idle-summary-useful-context-p))
(let* ((found (semantic-idle-summary-current-symbol-info))
(let* ((found (save-excursion
(semantic-idle-summary-current-symbol-info)))
(str (cond ((stringp found) found)
((semantic-tag-p found)
(funcall semantic-idle-summary-function

View File

@ -1098,26 +1098,21 @@ at the beginning of `semantic-lex-token-stream'.
This can be done by using `semantic-lex-push-token'."
(declare (debug (&define name stringp form def-body)))
`(eval-and-compile
(defvar ,name nil ,doc)
(defun ,name nil)
;; Do this part separately so that re-evaluation rebuilds this code.
(setq ,name '(,condition ,@forms))
;; This is the real info used by `define-lex' (via semantic-lex-one-token).
(defconst ,name '(,condition ,@forms) ,doc)
;; Build a single lexical analyzer function, so the doc for
;; function help is automatically provided, and perhaps the
;; function could be useful for testing and debugging one
;; analyzer.
(fset ',name (lambda () ,doc
(let ((semantic-lex-token-stream nil)
(semantic-lex-end-point (point))
(semantic-lex-analysis-bounds
(cons (point) (point-max)))
(semantic-lex-current-depth 0)
(semantic-lex-maximum-depth
semantic-lex-depth)
)
(when ,condition ,@forms)
semantic-lex-token-stream)))
))
(defun ,name ()
,doc
(let ((semantic-lex-token-stream nil)
(semantic-lex-end-point (point))
(semantic-lex-analysis-bounds (cons (point) (point-max)))
(semantic-lex-current-depth 0)
(semantic-lex-maximum-depth semantic-lex-depth))
(when ,condition ,@forms)
semantic-lex-token-stream))))
(defmacro define-lex-regex-analyzer (name doc regexp &rest forms)
"Create a lexical analyzer with NAME and DOC that will match REGEXP.

View File

@ -562,7 +562,7 @@ such as `public' or `private'."
;; @TODO - is this line needed?? Try w/out for a while
;; @note - I think C++ says no. elisp might, but methods
;; look like defuns, so it makes no difference.
(extmeth nil) ; (semantic-tag-external-member-children type t))
;;(extmeth nil) ; (semantic-tag-external-member-children type t))
;; INHERITED are tags found in classes that our TYPE tag
;; inherits from. Do not do this if it was not requested.
@ -584,7 +584,7 @@ such as `public' or `private'."
(setq slots (nreverse copyslots))
))
;; Flatten the database output.
(append slots extmeth inherited)
(append slots nil inherited) ;; extmeth
)))
(defun semantic-analyze-scoped-inherited-tags (type scope access)

View File

@ -224,7 +224,7 @@ the standard function `semantic-parse-stream'."
(error-message-string error-to-filter))
(message "wisent-parse-max-stack-size \
might need to be increased"))
(apply 'signal error-to-filter))))))
(apply #'signal error-to-filter))))))
;; Manage returned lookahead token
(if wisent-lookahead
(if (eq (caar la-elt) wisent-lookahead)
@ -252,6 +252,17 @@ might need to be increased"))
(if (consp cache) cache '(nil))
)))
(defmacro wisent-compiled-grammar (grammar &optional start-list)
"Return a compiled form of the LALR(1) Wisent GRAMMAR.
See `wisent--compile-grammar' for a description of the arguments
and return value."
;; Ensure that the grammar compiler is available.
(require 'semantic/wisent/comp)
(declare-function wisent-automaton-lisp-form "semantic/wisent/comp" (x))
(declare-function wisent--compile-grammar "semantic/wisent/comp" (grm st))
(wisent-automaton-lisp-form
(wisent--compile-grammar grammar start-list)))
(defun wisent-parse-region (start end &optional goal depth returnonerror)
"Parse the area between START and END using the Wisent LALR parser.
Return the list of semantic tags found.

View File

@ -1,4 +1,4 @@
;;; semantic/wisent/comp.el --- GNU Bison for Emacs - Grammar compiler
;;; semantic/wisent/comp.el --- GNU Bison for Emacs - Grammar compiler -*- lexical-binding: t; -*-
;; Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000-2007, 2009-2021 Free
;; Software Foundation, Inc.
@ -54,15 +54,16 @@
;; bound locally, without all these "reference to free variable"
;; compiler warnings!
(defmacro wisent-context-name (name)
"Return the context name from NAME."
`(if (and ,name (symbolp ,name))
(intern (format "wisent-context-%s" ,name))
(error "Invalid context name: %S" ,name)))
(eval-when-compile
(defun wisent-context-name (name)
"Return the context name from NAME."
(if (and name (symbolp name))
(intern (format "wisent-context-%s" name))
(error "Invalid context name: %S" name)))
(defmacro wisent-context-bindings (name)
"Return the variables in context NAME."
`(symbol-value (wisent-context-name ,name)))
(defun wisent-context-bindings (name)
"Return the variables in context NAME."
(symbol-value (wisent-context-name name))))
(defmacro wisent-defcontext (name &rest vars)
"Define a context NAME that will bind variables VARS."
@ -77,12 +78,8 @@
(defmacro wisent-with-context (name &rest body)
"Bind variables in context NAME then eval BODY."
(declare (indent 1))
(let ((bindings (wisent-context-bindings name)))
`(progn
,@(mapcar (lambda (binding) `(defvar ,(or (car-safe binding) binding)))
bindings)
(let* ,bindings
,@body))))
`(dlet ,(wisent-context-bindings name)
,@body))
;; Other utilities
@ -101,6 +98,8 @@ If optional LEFT is non-nil insert spaces on left."
;;;; Environment dependencies
;;;; ------------------------
;; FIXME: Use bignums or bool-vectors?
(defconst wisent-BITS-PER-WORD (logcount most-positive-fixnum))
(defsubst wisent-WORDSIZE (n)
@ -2774,7 +2773,7 @@ that likes a token gets to handle it."
"Figure out the actions for every state.
Return the action table."
;; Store the semantic action obarray in (unused) RCODE[0].
(aset rcode 0 (make-vector 13 0))
(aset rcode 0 (obarray-make 13))
(let (i j action-table actrow action)
(setq action-table (make-vector nstates nil)
actrow (make-vector ntokens nil)
@ -3388,7 +3387,7 @@ NONTERMS is the list of non terminal definitions (see function
;;;; Compile input grammar
;;;; ---------------------
(defun wisent-compile-grammar (grammar &optional start-list)
(defun wisent--compile-grammar (grammar start-list)
"Compile the LALR(1) GRAMMAR.
GRAMMAR is a list (TOKENS ASSOCS . NONTERMS) where:
@ -3440,7 +3439,7 @@ where:
(wisent-parser-automaton)))))
;;;; --------------------------
;;;; Byte compile input grammar
;;;; Obsolete byte compile support
;;;; --------------------------
(require 'bytecomp)
@ -3449,25 +3448,32 @@ where:
"Byte compile the `wisent-compile-grammar' FORM.
Automatically called by the Emacs Lisp byte compiler as a
`byte-compile' handler."
;; Eval the `wisent-compile-grammar' form to obtain an LALR
;; automaton internal data structure. Then, because the internal
;; data structure contains an obarray, convert it to a lisp form so
;; it can be byte-compiled.
(byte-compile-form
;; FIXME: we macroexpand here since `byte-compile-form' expects
;; macroexpanded code, but that's just a workaround: for lexical-binding
;; the lisp form should have to pass through closure-conversion and
;; `wisent-byte-compile-grammar' is called much too late for that.
;; Why isn't this `wisent-automaton-lisp-form' performed at
;; macroexpansion time? --Stef
(macroexpand-all
(wisent-automaton-lisp-form (eval form)))))
;; FIXME: We shouldn't use a `byte-compile' handler. Maybe using a hash-table
;; instead of an obarray would work around the problem that obarrays
;; aren't printable. Then (put 'wisent-compile-grammar 'side-effect-free t).
(put 'wisent-compile-grammar 'byte-compile 'wisent-byte-compile-grammar)
(defun wisent-compile-grammar (grammar &optional start-list)
;; This is kept for compatibility with FOO-wy.el files generated
;; with older Emacsen.
(declare (obsolete wisent-compiled-grammar "Mar 2021"))
(wisent--compile-grammar grammar start-list))
(put 'wisent-compile-grammar 'byte-compile #'wisent-byte-compile-grammar)
;;;; --------------------------
;;;; Byte compile input grammar
;;;; --------------------------
;; `wisent--compile-grammar' generates the actual parse table
;; we need at run-time, but in order to be able to compile the code it
;; contains, we need to "reify" it back into a piece of ELisp code
;; which (re)builds it.
;; This is needed for 2 reasons:
;; - The parse tables include an obarray and these don't survive the print+read
;; steps involved in generating a `.elc' file and reading it back in.
;; - Within the parse table vectors/obarrays we have ELisp functions which
;; we want to byte-compile, but if we were to just `quote' the table
;; we'd get them with the same non-compiled functions.
(defun wisent-automaton-lisp-form (automaton)
"Return a Lisp form that produces AUTOMATON.
See also `wisent-compile-grammar' for more details on AUTOMATON."
@ -3477,7 +3483,7 @@ See also `wisent-compile-grammar' for more details on AUTOMATON."
(let ((obn (make-symbol "ob")) ; Generated obarray name
(obv (aref automaton 3)) ; Semantic actions obarray
)
`(let ((,obn (make-vector 13 0)))
`(let ((,obn (obarray-make 13)))
;; Generate code to initialize the semantic actions obarray,
;; in local variable OBN.
,@(let (obcode)
@ -3496,7 +3502,9 @@ See also `wisent-compile-grammar' for more details on AUTOMATON."
;; obarray.
(vector
,@(mapcar
#'(lambda (state) ;; for each state
;; Use name `st' rather than `state' since `state' is
;; defined as dynbound in `semantic-actions' context above :-( !
#'(lambda (st) ;; for each state
`(list
,@(mapcar
#'(lambda (tr) ;; for each transition
@ -3507,7 +3515,7 @@ See also `wisent-compile-grammar' for more details on AUTOMATON."
`(cons ,(if (symbolp k) `(quote ,k) k)
(intern-soft ,(symbol-name a) ,obn))
`(quote ,tr))))
state)))
st)))
(aref automaton 0)))
;; The code of the goto table is unchanged.
,(aref automaton 1)

View File

@ -286,12 +286,9 @@ Return the expanded expression."
(defun wisent-grammar-parsetable-builder ()
"Return the value of the parser table."
`(progn
;; Ensure that the grammar [byte-]compiler is available.
(eval-when-compile (require 'semantic/wisent/comp))
(wisent-compile-grammar
',(wisent-grammar-grammar)
',(semantic-grammar-start))))
`(wisent-compiled-grammar
,(wisent-grammar-grammar)
,(semantic-grammar-start)))
(defun wisent-grammar-setupcode-builder ()
"Return the parser setup code."
@ -305,7 +302,7 @@ Return the expanded expression."
semantic-lex-types-obarray %s)\n\
;; Collect unmatched syntax lexical tokens\n\
(add-hook 'wisent-discarding-token-functions\n\
'wisent-collect-unmatched-syntax nil t)"
#'wisent-collect-unmatched-syntax nil t)"
(semantic-grammar-parsetable)
(buffer-name)
(semantic-grammar-keywordtable)
@ -325,6 +322,7 @@ Menu items are appended to the common grammar menu.")
(define-derived-mode wisent-grammar-mode semantic-grammar-mode "WY"
"Major mode for editing Wisent grammars."
(semantic-grammar-setup-menu wisent-grammar-menu)
(setq-local semantic-grammar-require-form '(require 'semantic/wisent))
(semantic-install-function-overrides
'((semantic-grammar-parsetable-builder . wisent-grammar-parsetable-builder)
(semantic-grammar-setupcode-builder . wisent-grammar-setupcode-builder))))

View File

@ -1,4 +1,4 @@
;;; semantic/wisent/java-tags.el --- Java LALR parser for Emacs
;;; semantic/wisent/java-tags.el --- Java LALR parser for Emacs -*- lexical-binding: t; -*-
;; Copyright (C) 2001-2006, 2009-2021 Free Software Foundation, Inc.
@ -92,7 +92,7 @@ This function override `get-local-variables'."
(define-mode-local-override semantic-analyze-unsplit-name java-mode (namelist)
"Assemble the list of names NAMELIST into a namespace name."
(mapconcat 'identity namelist "."))
(mapconcat #'identity namelist "."))

View File

@ -1,4 +1,4 @@
;;; semantic/wisent/javascript.el --- javascript parser support
;;; semantic/wisent/javascript.el --- javascript parser support -*- lexical-binding: t; -*-
;; Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
@ -70,7 +70,7 @@ This function overrides `get-local-variables'."
;; Does javascript have identifiable local variables?
nil)
(define-mode-local-override semantic-tag-protection js-mode (tag &optional parent)
(define-mode-local-override semantic-tag-protection js-mode (_tag &optional _parent)
"Return protection information about TAG with optional PARENT.
This function returns on of the following symbols:
nil - No special protection. Language dependent.
@ -85,7 +85,7 @@ The default behavior (if not overridden with `tag-protection'
is to return a symbol based on type modifiers."
nil)
(define-mode-local-override semantic-analyze-scope-calculate-access js-mode (type scope)
(define-mode-local-override semantic-analyze-scope-calculate-access js-mode (_type _scope)
"Calculate the access class for TYPE as defined by the current SCOPE.
Access is related to the :parents in SCOPE. If type is a member of SCOPE
then access would be `private'. If TYPE is inherited by a member of SCOPE,
@ -101,7 +101,7 @@ This is currently needed for the mozrepl omniscient database."
(save-excursion
(if point (goto-char point))
(let* ((case-fold-search semantic-case-fold)
symlist tmp end)
tmp end) ;; symlist
(with-syntax-table semantic-lex-syntax-table
(save-excursion
(when (looking-at "\\w\\|\\s_")
@ -110,10 +110,11 @@ This is currently needed for the mozrepl omniscient database."
(unless (re-search-backward "\\s-" (point-at-bol) t)
(beginning-of-line))
(setq tmp (buffer-substring-no-properties (point) end))
;; (setq symlist
(if (string-match "\\(.+\\)\\." tmp)
(setq symlist (list (match-string 1 tmp)
(substring tmp (1+ (match-end 1)) (length tmp))))
(setq symlist (list tmp))))))))
(list (match-string 1 tmp)
(substring tmp (1+ (match-end 1)) (length tmp)))
(list tmp)))))));; )
;;; Setup Function
;;

View File

@ -1,4 +1,4 @@
;;; wisent-python.el --- Semantic support for Python
;;; wisent-python.el --- Semantic support for Python -*- lexical-binding: t; -*-
;; Copyright (C) 2002, 2004, 2006-2021 Free Software Foundation, Inc.
@ -464,19 +464,19 @@ To be implemented for Python! For now just return nil."
(define-mode-local-override semantic-tag-include-filename python-mode (tag)
"Return a suitable path for (some) Python imports."
(let ((name (semantic-tag-name tag)))
(concat (mapconcat 'identity (split-string name "\\.") "/") ".py")))
(concat (mapconcat #'identity (split-string name "\\.") "/") ".py")))
;; Override ctxt-current-function/assignment defaults, since they do
;; not work properly with Python code, even leading to endless loops
;; (see bug #xxxxx).
(define-mode-local-override semantic-ctxt-current-function python-mode (&optional point)
(define-mode-local-override semantic-ctxt-current-function python-mode (&optional _point)
"Return the current function call the cursor is in at POINT.
The function returned is the one accepting the arguments that
the cursor is currently in. It will not return function symbol if the
cursor is on the text representing that function."
nil)
(define-mode-local-override semantic-ctxt-current-assignment python-mode (&optional point)
(define-mode-local-override semantic-ctxt-current-assignment python-mode (&optional _point)
"Return the current assignment near the cursor at POINT.
Return a list as per `semantic-ctxt-current-symbol'.
Return nil if there is nothing relevant."

View File

@ -1,4 +1,4 @@
;;; semantic/wisent/wisent.el --- GNU Bison for Emacs - Runtime
;;; semantic/wisent/wisent.el --- GNU Bison for Emacs - Runtime -*- lexical-binding: t; -*-
;;; Copyright (C) 2002-2007, 2009-2021 Free Software Foundation, Inc.
@ -139,7 +139,7 @@ POSITIONS are available."
"Print a one-line message if `wisent-parse-verbose-flag' is set.
Pass STRING and ARGS arguments to `message'."
(and wisent-parse-verbose-flag
(apply 'message string args)))
(apply #'message string args)))
;;;; --------------------
;;;; The LR parser engine
@ -147,13 +147,11 @@ Pass STRING and ARGS arguments to `message'."
(defcustom wisent-parse-max-stack-size 500
"The parser stack size."
:type 'integer
:group 'wisent)
:type 'integer)
(defcustom wisent-parse-max-recover 3
"Number of tokens to shift before turning off error status."
:type 'integer
:group 'wisent)
:type 'integer)
(defvar wisent-discarding-token-functions nil
"List of functions to be called when discarding a lexical token.
@ -397,9 +395,9 @@ automaton has only one entry point."
(wisent-error
(format "Syntax error, unexpected %s, expecting %s"
(wisent-token-to-string wisent-input)
(mapconcat 'wisent-item-to-string
(mapconcat #'wisent-item-to-string
(delq wisent-error-term
(mapcar 'car (cdr choices)))
(mapcar #'car (cdr choices)))
", "))))
;; Increment the error counter
(setq wisent-nerrs (1+ wisent-nerrs))

View File

@ -1439,6 +1439,8 @@ ARGS is a list of image descriptors."
(apply #'create-image file doc-view--image-type nil args)
(unless (member :width args)
(setq args `(,@args :width ,doc-view-image-width)))
(unless (member :transform-smoothing args)
(setq args `(,@args :transform-smoothing t)))
(apply #'create-image file doc-view--image-type nil args))))
(slice (doc-view-current-slice))
(img-width (and image (car (image-size image))))

View File

@ -62,7 +62,8 @@ See also `benchmark-run-compiled'."
;; Take account of the loop overhead.
`(- (benchmark-elapse (dotimes (,i ,repetitions)
,@forms))
(benchmark-elapse (dotimes (,i ,repetitions))))
(benchmark-elapse (dotimes (,i ,repetitions)
nil)))
`(benchmark-elapse ,@forms))
(- gcs-done ,gcs)
(- gc-elapsed ,gc)))))

View File

@ -1327,6 +1327,8 @@ Same format as `byte-optimize--lexvars', with shared structure and contents.")
radians-to-degrees rassq rassoc read-from-string regexp-opt
regexp-quote region-beginning region-end reverse round
sin sqrt string string< string= string-equal string-lessp
string> string-greaterp string-empty-p
string-prefix-p string-suffix-p string-blank-p
string-search string-to-char
string-to-number string-to-syntax substring
sxhash sxhash-equal sxhash-eq sxhash-eql

View File

@ -2575,12 +2575,14 @@ list that represents a doc string reference.
(put 'defvar 'byte-hunk-handler 'byte-compile-file-form-defvar)
(put 'defconst 'byte-hunk-handler 'byte-compile-file-form-defvar)
(defun byte-compile--declare-var (sym)
(defun byte-compile--check-prefixed-var (sym)
(when (and (symbolp sym)
(not (string-match "[-*/:$]" (symbol-name sym)))
(byte-compile-warning-enabled-p 'lexical sym))
(byte-compile-warn "global/dynamic var `%s' lacks a prefix"
sym))
(byte-compile-warn "global/dynamic var `%s' lacks a prefix" sym)))
(defun byte-compile--declare-var (sym)
(byte-compile--check-prefixed-var sym)
(when (memq sym byte-compile-lexical-variables)
(setq byte-compile-lexical-variables
(delq sym byte-compile-lexical-variables))
@ -4278,9 +4280,15 @@ that suppresses all warnings during execution of BODY."
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 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

View File

@ -295,8 +295,9 @@ of converted forms."
(if wrappers
(let ((special-forms '()))
;; Keep special forms at the beginning of the body.
(while (or (stringp (car funcbody)) ;docstring.
(memq (car-safe (car funcbody)) '(interactive declare)))
(while (or (and (cdr funcbody) (stringp (car funcbody))) ;docstring.
(memq (car-safe (car funcbody))
'(interactive declare :documentation)))
(push (pop funcbody) special-forms))
(let ((body (macroexp-progn funcbody)))
(dolist (wrapper wrappers) (setq body (funcall wrapper body)))
@ -584,9 +585,6 @@ places where they originally did not directly appear."
(_ (or (cdr (assq form env)) form))))
(unless (fboundp 'byte-compile-not-lexical-var-p)
;; Only used to test the code in non-lexbind Emacs.
(defalias 'byte-compile-not-lexical-var-p 'boundp))
(defvar byte-compile-lexical-variables)
(defun cconv--analyze-use (vardata form varkind)
@ -602,7 +600,14 @@ FORM is the parent form that binds this var."
;; FIXME: Convert this warning to use `macroexp--warn-wrap'
;; so as to give better position information.
(byte-compile-warn
"%s `%S' not left unused" varkind var)))
"%s `%S' not left unused" varkind var))
((and (let (or 'let* 'let) (car form))
`((,var) ;; (or `(,var nil) : Too many false positives: bug#47080
t nil ,_ ,_))
;; FIXME: Convert this warning to use `macroexp--warn-wrap'
;; so as to give better position information.
(unless (not (intern-soft var))
(byte-compile-warn "Variable `%S' left uninitialized" var))))
(pcase vardata
(`(,binder nil ,_ ,_ nil)
(push (cons (cons binder form) :unused) cconv-var-classification))
@ -783,7 +788,7 @@ This function does not return anything but instead fills the
(let ((dv (assq form env))) ; dv = declared and visible
(when dv
(setf (nth 1 dv) t))))))
(define-obsolete-function-alias 'cconv-analyse-form 'cconv-analyze-form "25.1")
(define-obsolete-function-alias 'cconv-analyse-form #'cconv-analyze-form "25.1")
(provide 'cconv)
;;; cconv.el ends here

View File

@ -931,35 +931,20 @@ don't move point."
;; Don't bug out if the file is empty (or a
;; definition ends prematurely.
(end-of-file)))
(`(,(or 'defun 'defvar 'defcustom 'defmacro 'defconst 'defsubst 'defadvice
'cl-defun 'cl-defgeneric 'cl-defmacro)
(`(,(and (pred symbolp) def
(let (and doc (guard doc)) (function-get def 'doc-string-elt)))
,(pred symbolp)
;; Require an initializer, i.e. ignore single-argument `defvar'
;; forms, which never have a doc string.
,_ . ,_)
(down-list)
;; Skip over function or macro name, symbol to be defined, and
;; initializer or argument list.
(forward-sexp 3)
(skip-chars-forward " \n\t")
t)
(`(,'cl-defmethod
,(pred symbolp)
. ,rest)
(down-list)
(forward-sexp (pcase (car rest)
;; No qualifier, so skip like we would have skipped in
;; the first clause of the outer `pcase'.
((pred listp) 3)
(':extra
;; Skip the :extra qualifier together with its string too.
;; Skip any additional qualifier.
(if (memq (nth 2 rest) '(:around :before :after))
6
5))
;; Skip :before, :after or :around qualifier too.
((or ':around ':before ':after)
4)))
;; Skip over function or macro name.
(forward-sexp 1)
;; And now skip until the docstring.
(forward-sexp (1- ; We already skipped the function or macro name.
(cond
((numberp doc) doc)
((functionp doc) (funcall doc)))))
(skip-chars-forward " \n\t")
t)))
@ -2149,8 +2134,8 @@ buffer, otherwise stop after the first error."
(user-error "No spellchecker installed: check the variable `ispell-program-name'"))
(save-excursion
(skip-chars-forward "^a-zA-Z")
(let (word sym case-fold-search err word-beginning word-end)
(while (and (not err) (< (point) end))
(let (word sym case-fold-search word-beginning word-end) ;; err
(while (and (< (point) end)) ;; (not err)
(if (save-excursion (forward-char -1) (looking-at "[('`]"))
;; Skip lists describing meta-syntax, or bound variables
(forward-sexp 1)
@ -2182,7 +2167,7 @@ buffer, otherwise stop after the first error."
(sit-for 0)
(message "Continuing..."))))))))
(skip-chars-forward "^a-zA-Z"))
err))))
nil)))) ;; err
;;; Rogue space checking engine
;;

View File

@ -321,7 +321,7 @@ the debugger will not be entered."
(make-obsolete 'debugger-insert-backtrace
"use a `backtrace-mode' buffer or `backtrace-to-string'."
"Emacs 27.1")
"27.1")
(defun debugger-insert-backtrace (frames do-xrefs)
"Format and insert the backtrace FRAMES at point.

View File

@ -332,12 +332,20 @@ or call the function `%s'."))))
t)))
;; Keep minor modes list up to date.
,@(if globalp
`((setq global-minor-modes (delq ',modefun global-minor-modes))
;; When running this byte-compiled code in earlier
;; Emacs versions, these variables may not be defined
;; there. So check defensively, even if they're
;; always defined in Emacs 28 and up.
`((when (boundp 'global-minor-modes)
(setq global-minor-modes
(delq ',modefun global-minor-modes))
(when ,getter
(push ',modefun global-minor-modes))))
;; Ditto check.
`((when (boundp 'local-minor-modes)
(setq local-minor-modes (delq ',modefun local-minor-modes))
(when ,getter
(push ',modefun global-minor-modes)))
`((setq local-minor-modes (delq ',modefun local-minor-modes))
(when ,getter
(push ',modefun local-minor-modes))))
(push ',modefun local-minor-modes)))))
,@body
;; The on/off hooks are here for backward compatibility only.
(run-hooks ',hook (if ,getter ',hook-on ',hook-off))

View File

@ -3508,7 +3508,7 @@ canceled the first time the function is entered."
(defun edebug-cancel-on-entry (function)
"Cause Edebug to not stop when FUNCTION is called.
The removes the effect of `edebug-on-entry'. If FUNCTION is is
The removes the effect of `edebug-on-entry'. If FUNCTION is
nil, remove `edebug-on-entry' on all functions."
(interactive
(list (let ((name (completing-read

View File

@ -261,7 +261,7 @@ DATA is displayed to the user and should state the reason for skipping."
It should only be stopped when ran from inside ert--run-test-internal."
(when (and (not (symbolp debugger)) ; only run on anonymous debugger
(memq error-symbol '(ert-test-failed ert-test-skipped)))
(funcall debugger 'error (list error-symbol data))))
(funcall debugger 'error (cons error-symbol data))))
(defun ert--special-operator-p (thing)
"Return non-nil if THING is a symbol naming a special operator."
@ -1633,7 +1633,7 @@ default (if any)."
(defun ert-find-test-other-window (test-name)
"Find, in another window, the definition of TEST-NAME."
(interactive (list (ert-read-test-name-at-point "Find test definition: ")))
(interactive (list (ert-read-test-name-at-point "Find test definition")))
(find-function-do-it test-name 'ert--test 'switch-to-buffer-other-window))
(defun ert-delete-test (test-name)
@ -2083,6 +2083,7 @@ and how to display message."
(define-derived-mode ert-results-mode special-mode "ERT-Results"
"Major mode for viewing results of ERT test runs."
:interactive nil
(setq-local revert-buffer-function
(lambda (&rest _) (ert-results-rerun-all-tests))))
@ -2178,7 +2179,7 @@ To be used in the ERT results buffer."
"Move point to the next test.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(ert--results-move (ewoc-locate ert--results-ewoc) 'ewoc-next
"No tests below"))
@ -2186,7 +2187,7 @@ To be used in the ERT results buffer."
"Move point to the previous test.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(ert--results-move (ewoc-locate ert--results-ewoc) 'ewoc-prev
"No tests above"))
@ -2219,7 +2220,7 @@ user-error is signaled with the message ERROR-MESSAGE."
"Find the definition of the test at point in another window.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(let ((name (ert-test-at-point)))
(unless name
(user-error "No test at point"))
@ -2253,7 +2254,7 @@ To be used in the ERT results buffer."
;; the summary apparently needs to be easily accessible from the
;; error log, and perhaps it would be better to have it in a
;; separate buffer to keep it visible.
(interactive)
(interactive nil ert-results-mode)
(let ((ewoc ert--results-ewoc)
(progress-bar-begin ert--results-progress-bar-button-begin))
(cond ((ert--results-test-node-or-null-at-point)
@ -2370,7 +2371,7 @@ definition."
"Re-run all tests, using the same selector.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(cl-assert (eql major-mode 'ert-results-mode))
(let ((selector (ert--stats-selector ert--results-stats)))
(ert-run-tests-interactively selector (buffer-name))))
@ -2379,7 +2380,7 @@ To be used in the ERT results buffer."
"Re-run the test at point.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(cl-destructuring-bind (test redefinition-state)
(ert--results-test-at-point-allow-redefinition)
(when (null test)
@ -2414,7 +2415,7 @@ To be used in the ERT results buffer."
"Re-run the test at point with `ert-debug-on-error' bound to t.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(let ((ert-debug-on-error t))
(ert-results-rerun-test-at-point)))
@ -2422,7 +2423,7 @@ To be used in the ERT results buffer."
"Display the backtrace for the test at point.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(let* ((test (ert--results-test-at-point-no-redefinition t))
(stats ert--results-stats)
(pos (ert--stats-test-pos stats test))
@ -2449,7 +2450,7 @@ To be used in the ERT results buffer."
"Display the part of the *Messages* buffer generated during the test at point.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(let* ((test (ert--results-test-at-point-no-redefinition t))
(stats ert--results-stats)
(pos (ert--stats-test-pos stats test))
@ -2470,7 +2471,7 @@ To be used in the ERT results buffer."
"Display the list of `should' forms executed during the test at point.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(let* ((test (ert--results-test-at-point-no-redefinition t))
(stats ert--results-stats)
(pos (ert--stats-test-pos stats test))
@ -2506,7 +2507,7 @@ To be used in the ERT results buffer."
"Toggle how much of the condition to print for the test at point.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(let* ((ewoc ert--results-ewoc)
(node (ert--results-test-node-at-point))
(entry (ewoc-data node)))
@ -2518,7 +2519,7 @@ To be used in the ERT results buffer."
"Display test timings for the last run.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(let* ((stats ert--results-stats)
(buffer (get-buffer-create "*ERT timings*"))
(data (cl-loop for test across (ert--stats-tests stats)
@ -2597,7 +2598,7 @@ To be used in the ERT results buffer."
"Display the documentation of the test at point.
To be used in the ERT results buffer."
(interactive)
(interactive nil ert-results-mode)
(ert-describe-test (ert--results-test-at-point-no-redefinition t)))

View File

@ -290,12 +290,13 @@ all RULES in total."
',(string-to-syntax (nth 1 action)))
,@(nthcdr 2 action))
`((let ((mb (match-beginning ,gn))
(me (match-end ,gn))
(syntax ,(nth 1 action)))
(if syntax
(put-text-property
mb me 'syntax-table syntax))
,@(nthcdr 2 action)))))
(me (match-end ,gn)))
,(macroexp-let2 nil syntax (nth 1 action)
`(progn
(if ,syntax
(put-text-property
mb me 'syntax-table ,syntax))
,@(nthcdr 2 action)))))))
(t
`((let ((mb (match-beginning ,gn))
(me (match-end ,gn))

View File

@ -32,8 +32,8 @@
;;;Here are some macros that exercise SES. Set `pause' to t if you want the
;;;macros to pause after each step.
(let* ((pause nil)
(x (if pause "\^Xq" ""))
(let* (;; (pause nil)
(x (if nil "\^Xq" "")) ;; pause
(y "\^X\^Fses-test.ses\r\^[<"))
;;Fiddle with the existing spreadsheet
(fset 'ses-exercise-example

View File

@ -46,7 +46,7 @@ A cua-rectangle definition is a vector used for all actions in
TOP is the upper-left corner point.
BOTTOM is the point at the end of line after the the lower-right
BOTTOM is the point at the end of line after the lower-right
corner point.
LEFT and RIGHT are column numbers.

View File

@ -635,8 +635,7 @@ Argument NUM is the number of lines to move."
(defmacro edt-with-position (&rest body)
"Execute BODY with some position-related variables bound."
`(let* ((left nil)
(beg (edt-current-line))
`(let* ((beg (edt-current-line))
(height (window-height))
(top-percent
(if (zerop edt-top-scroll-margin) 10 edt-top-scroll-margin))
@ -650,7 +649,7 @@ Argument NUM is the number of lines to move."
(far (save-excursion
(goto-char bottom)
(point-at-bol (1- height)))))
(ignore top left far)
(ignore top far)
,@body))
;;;
@ -668,9 +667,10 @@ Optional argument FIND is t is this function is called from `edt-find'."
(search-backward edt-find-last-text)
(edt-set-match)
(if (> (point) far)
(if (zerop (setq left (save-excursion (forward-line height))))
(recenter top-margin)
(recenter (- left bottom-up-margin)))
(let ((left (save-excursion (forward-line height))))
(recenter (if (zerop left)
top-margin
(- left bottom-up-margin))))
(and (> (point) bottom) (recenter bottom-margin))))))
(defun edt-find-backward (&optional find)
@ -707,9 +707,9 @@ Optional argument FIND is t if this function is called from `edt-find'."
(search-backward edt-find-last-text)
(edt-set-match)
(if (> (point) far)
(if (zerop (setq left (save-excursion (forward-line height))))
(recenter top-margin)
(recenter (- left bottom-up-margin)))
(let ((left (save-excursion (forward-line height))))
(recenter (if (zerop left) top-margin
(- left bottom-up-margin))))
(and (> (point) bottom) (recenter bottom-margin))))
(backward-char 1)
(error "Search failed: \"%s\"" edt-find-last-text))))
@ -1241,9 +1241,8 @@ Argument NUM is the positive number of sentences to move."
(forward-word 1)
(backward-sentence))
(if (> (point) far)
(if (zerop (setq left (save-excursion (forward-line height))))
(recenter top-margin)
(recenter (- left bottom-up-margin)))
(let ((left (save-excursion (forward-line height))))
(recenter (if (zerop left) top-margin (- left bottom-up-margin))))
(and (> (point) bottom) (recenter bottom-margin)))))
(defun edt-sentence-backward (num)
@ -1282,9 +1281,8 @@ Argument NUM is the positive number of paragraphs to move."
(forward-line 1))
(setq num (1- num)))
(if (> (point) far)
(if (zerop (setq left (save-excursion (forward-line height))))
(recenter top-margin)
(recenter (- left bottom-up-margin)))
(let ((left (save-excursion (forward-line height))))
(recenter (if (zerop left) top-margin (- left bottom-up-margin))))
(and (> (point) bottom) (recenter bottom-margin)))))
(defun edt-paragraph-backward (num)

View File

@ -110,11 +110,11 @@ ERC menu yet.")
(define-erc-module menu nil
"Enable a menu in ERC buffers."
((unless erc-menu-defined
;; make sure the menu only gets defined once, since Emacs 22
;; make sure the menu only gets defined once, since Emacs
;; activates it immediately
(easy-menu-define erc-menu erc-mode-map "ERC menu" erc-menu-definition)
(setq erc-menu-defined t)))
(;; `easy-menu-remove' is a no-op in Emacs 22
(;; `easy-menu-remove' is a no-op in Emacs
(message "You might have to restart Emacs to remove the ERC menu")))
(defun erc-menu-add ()

View File

@ -244,8 +244,6 @@ The effect may be disabled by setting this variable to nil."
(defcustom erc-track-position-in-mode-line 'before-modes
"Where to show modified channel information in the mode-line.
Setting this variable only has effect in GNU Emacs versions above 21.3.
Choices are:
`before-modes' - add to the beginning of `mode-line-modes',
`after-modes' - add to the end of `mode-line-modes',

View File

@ -114,17 +114,6 @@
"Running scripts at startup and with /LOAD"
:group 'erc)
;; compatibility with older ERC releases
(define-obsolete-variable-alias 'erc-announced-server-name
'erc-server-announced-name "ERC 5.1")
(define-obsolete-variable-alias 'erc-process 'erc-server-process "ERC 5.1")
(define-obsolete-variable-alias 'erc-default-coding-system
'erc-server-coding-system "ERC 5.1")
(define-obsolete-function-alias 'erc-send-command
'erc-server-send "ERC 5.1")
(require 'erc-backend)
;; tunable connection and authentication parameters
@ -2155,15 +2144,15 @@ parameters SERVER and NICK."
(defun erc-select-read-args ()
"Prompt the user for values of nick, server, port, and password."
(let (user-input server port nick passwd)
(setq user-input (read-from-minibuffer
(setq user-input (read-string
"IRC server: "
(erc-compute-server) nil nil 'erc-server-history-list))
(erc-compute-server) 'erc-server-history-list))
(if (string-match "\\(.*\\):\\(.*\\)\\'" user-input)
(setq port (erc-string-to-port (match-string 2 user-input))
user-input (match-string 1 user-input))
(setq port
(erc-string-to-port (read-from-minibuffer
(erc-string-to-port (read-string
"IRC port: " (erc-port-to-string
(erc-compute-port))))))
@ -2172,13 +2161,12 @@ parameters SERVER and NICK."
user-input (match-string 2 user-input))
(setq nick
(if (erc-already-logged-in server port nick)
(read-from-minibuffer
(read-string
(erc-format-message 'nick-in-use ?n nick)
nick
nil nil 'erc-nick-history-list)
(read-from-minibuffer
nick 'erc-nick-history-list)
(read-string
"Nickname: " (erc-compute-nick nick)
nil nil 'erc-nick-history-list))))
'erc-nick-history-list))))
(setq server user-input)
@ -2197,10 +2185,9 @@ parameters SERVER and NICK."
;; bnc with the same nick. actually it would be nice to have
;; bncs transparent, so that erc-compute-buffer-name displays
;; the server one is connected to.
(setq nick (read-from-minibuffer
(setq nick (read-string
(erc-format-message 'nick-in-use ?n nick)
nick
nil nil 'erc-nick-history-list)))
nick 'erc-nick-history-list)))
(list :server server :port port :nick nick :password passwd)))
;;;###autoload
@ -3522,7 +3509,7 @@ The type of query window/frame/etc will depend on the value of
If USER is omitted, close the current query buffer if one exists
- except this is broken now ;-)"
(interactive
(list (read-from-minibuffer "Start a query with: " nil)))
(list (read-string "Start a query with: ")))
(let ((session-buffer (erc-server-buffer))
(erc-join-buffer erc-query-display))
(if user
@ -4034,8 +4021,7 @@ If FACE is non-nil, it will be used to propertize the prompt. If it is nil,
"Interactively input a user action and send it to IRC."
(interactive "")
(erc-set-active-buffer (current-buffer))
(let ((action (read-from-minibuffer
"Action: " nil nil nil 'erc-action-history-list)))
(let ((action (read-string "Action: " nil 'erc-action-history-list)))
(if (not (string-match "^\\s-*$" action))
(erc-send-action (erc-default-target) action))))
@ -4052,24 +4038,25 @@ If `point' is at the beginning of a channel name, use that as default."
(completing-read (format-prompt "Join channel" chnl)
table nil nil nil nil chnl))
(when (or current-prefix-arg erc-prompt-for-channel-key)
(read-from-minibuffer "Channel key (RET for none): " nil))))
(read-string "Channel key (RET for none): "))))
(erc-cmd-JOIN channel (when (>= (length key) 1) key)))
(defun erc-part-from-channel (reason)
"Part from the current channel and prompt for a REASON."
(interactive
;; FIXME: Has this ever worked? We're in the interactive-spec, so the
;; argument `reason' can't be in scope yet!
;;(if (and (boundp 'reason) (stringp reason) (not (string= reason "")))
;; reason
(list
(if (and (boundp 'reason) (stringp reason) (not (string= reason "")))
reason
(read-from-minibuffer (concat "Reason for leaving " (erc-default-target)
": ")))))
(read-string (concat "Reason for leaving " (erc-default-target) ": "))))
(erc-cmd-PART (concat (erc-default-target)" " reason)))
(defun erc-set-topic (topic)
"Prompt for a TOPIC for the current channel."
(interactive
(list
(read-from-minibuffer
(read-string
(concat "Set topic of " (erc-default-target) ": ")
(when erc-channel-topic
(let ((ss (split-string erc-channel-topic "\C-o")))
@ -4081,7 +4068,7 @@ If `point' is at the beginning of a channel name, use that as default."
(defun erc-set-channel-limit (&optional limit)
"Set a LIMIT for the current channel. Remove limit if nil.
Prompt for one if called interactively."
(interactive (list (read-from-minibuffer
(interactive (list (read-string
(format "Limit for %s (RET to remove limit): "
(erc-default-target)))))
(let ((tgt (erc-default-target)))
@ -4092,7 +4079,7 @@ Prompt for one if called interactively."
(defun erc-set-channel-key (&optional key)
"Set a KEY for the current channel. Remove key if nil.
Prompt for one if called interactively."
(interactive (list (read-from-minibuffer
(interactive (list (read-string
(format "Key for %s (RET to remove key): "
(erc-default-target)))))
(let ((tgt (erc-default-target)))
@ -4103,7 +4090,7 @@ Prompt for one if called interactively."
(defun erc-quit-server (reason)
"Disconnect from current server after prompting for REASON.
`erc-quit-reason' works with this just like with `erc-cmd-QUIT'."
(interactive (list (read-from-minibuffer
(interactive (list (read-string
(format "Reason for quitting %s: "
(or erc-server-announced-name
erc-session-server)))))
@ -6290,7 +6277,6 @@ The following characters are replaced:
(defcustom erc-header-line-format "%n on %t (%m,%l) %o"
"A string to be formatted and shown in the header-line in `erc-mode'.
Only used starting in Emacs 21.
Set this to nil if you do not want the header line to be
displayed.

View File

@ -680,12 +680,12 @@ Each member of FILES is either a string or a cons cell of the form
(let ((f files)
last-f
display-files
ignore)
) ;; ignore
(while f
(if (cdar f)
(setq last-f f
f (cdr f))
(unless ignore
(unless nil ;; ignore
(funcall error-func
(format "%s: No such file or directory\n" (caar f))))
(if (eq f files)
@ -698,7 +698,7 @@ Each member of FILES is either a string or a cons cell of the form
(setcar f (cadr f))
(setcdr f (cddr f))))))
(if (not show-size)
(setq display-files (mapcar 'eshell-ls-annotate files))
(setq display-files (mapcar #'eshell-ls-annotate files))
(dolist (file files)
(let* ((str (eshell-ls-printable-size (file-attribute-size (cdr file)) t))
(len (length str)))

View File

@ -2815,6 +2815,23 @@ Note: Other faces cannot inherit from the cursor face."
"Face to highlight argument names in *Help* buffers."
:group 'help)
(defface help-key-binding
'((((class color) (min-colors 88) (background light)) :background "grey90")
(((class color) (min-colors 88) (background dark)) :background "grey25")
(((class color grayscale) (background light)) :background "grey90")
(((class color grayscale) (background dark)) :background "grey25")
(t :background "grey90"))
"Face for keybindings in *Help* buffers.
This face is added by `substitute-command-keys', which see.
Note that this face will also be used for key bindings in
tooltips. This means that, for example, changing the :height of
this face will increase the height of any tooltip containing key
bindings. See also the face `tooltip'."
:version "28.1"
:group 'help)
(defface glyphless-char
'((((type tty)) :inherit underline)
(((type pc)) :inherit escape-glyph)

View File

@ -823,7 +823,9 @@ The path separator is colon in GNU and GNU-like systems."
(expand-file-name dir))
(locate-file dir cd-path nil
(lambda (f) (and (file-directory-p f) 'dir-ok)))
(error "No such directory found via CDPATH environment variable"))))
(if (getenv "CDPATH")
(error "No such directory found via CDPATH environment variable: %s" dir)
(error "No such directory: %s" dir)))))
(defun directory-files-recursively (dir regexp
&optional include-directories predicate

View File

@ -728,9 +728,6 @@ Each element is a regular expression."
:type '(repeat regexp)
:group 'gnus-article-various)
(make-obsolete-variable 'gnus-article-hide-pgp-hook nil
"Gnus 5.10 (Emacs 22.1)")
(defface gnus-button
'((t (:weight bold)))
"Face used for highlighting a button in the article buffer."
@ -1264,9 +1261,6 @@ Any symbol is used to look up a regular expression to match the
banner in `gnus-list-identifiers'. A string is used as a regular
expression to match the identifier directly.")
(make-obsolete-variable 'gnus-treat-strip-pgp nil
"Gnus 5.10 (Emacs 22.1)")
(defcustom gnus-treat-strip-pem nil
"Strip PEM signatures.
Valid values are nil, t, `head', `first', `last', an integer or a
@ -1396,9 +1390,6 @@ predicate. See Info node `(gnus)Customizing Articles'."
:link '(custom-manual "(gnus)Customizing Articles")
:type gnus-article-treat-custom)
(make-obsolete-variable 'gnus-treat-display-xface
'gnus-treat-display-x-face "Emacs 22.1")
(defcustom gnus-treat-display-x-face
(and (not noninteractive)
(gnus-image-type-available-p 'xbm)
@ -1423,17 +1414,7 @@ See Info node `(gnus)Customizing Articles' and Info node
symbol
(cond ((or (boundp symbol) (get symbol 'saved-value))
value)
((boundp 'gnus-treat-display-xface)
(message "\
** gnus-treat-display-xface is an obsolete variable;\
use gnus-treat-display-x-face instead")
(default-value 'gnus-treat-display-xface))
((get 'gnus-treat-display-xface 'saved-value)
(message "\
** gnus-treat-display-xface is an obsolete variable;\
use gnus-treat-display-x-face instead")
(eval (car (get 'gnus-treat-display-xface 'saved-value)) t))
(t
(t
value)))))
(put 'gnus-treat-display-x-face 'highlight t)

View File

@ -337,7 +337,7 @@ Returns the number of articles marked as read."
(gnus-newsgroup-kill-file gnus-newsgroup-name)))
(unreads (length gnus-newsgroup-unreads))
(gnus-summary-inhibit-highlight t)
beg)
) ;; beg
(setq gnus-newsgroup-kill-headers nil)
;; If there are any previously scored articles, we remove these
;; from the `gnus-newsgroup-headers' list that the score functions
@ -381,7 +381,7 @@ Returns the number of articles marked as read."
(gnus-set-mode-line 'summary)
(if beg
(if nil ;; beg
(let ((nunreads (- unreads (length gnus-newsgroup-unreads))))
(or (eq nunreads 0)
(gnus-message 6 "Marked %d articles as read" nunreads))

View File

@ -143,9 +143,6 @@ See Info node `(gnus)Posting Styles'."
:group 'gnus-message
:type 'boolean)
(make-obsolete-variable 'gnus-inews-mark-gcc-as-read
'gnus-gcc-mark-as-read "Emacs 22.1")
(defcustom gnus-gcc-externalize-attachments nil
"Should local-file attachments be included as external parts in Gcc copies?
If it is `all', attach files as external parts;
@ -1659,9 +1656,7 @@ this is a reply."
;; FIXME: Should gcc-mark-as-read work when
;; Gnus is not running?
(gnus-alive-p))
(if (or gnus-gcc-mark-as-read
(and (boundp 'gnus-inews-mark-gcc-as-read)
(symbol-value 'gnus-inews-mark-gcc-as-read)))
(if gnus-gcc-mark-as-read
(gnus-group-mark-article-read group (cdr group-art))
(with-current-buffer gnus-group-buffer
(let ((gnus-group-marked (list group))

View File

@ -549,7 +549,7 @@ structure.
In the simplest case, they are simply consed together. String
KEY is converted to a symbol."
(let (return)
(let () ;; return
(cond
((member key gnus-search-date-keys)
(when (string= "after" key)
@ -559,7 +559,7 @@ KEY is converted to a symbol."
(setq value (gnus-search-query-parse-mark value)))
((string= "message-id" key)
(setq key "id")))
(or return
(or nil ;; return
(cons (intern key) value))))
(defun gnus-search-query-parse-date (value &optional rel-date)

View File

@ -663,7 +663,6 @@ the first newsgroup."
(defvar mail-sources)
(defvar nnmail-scan-directory-mail-source-once)
(defvar nnmail-split-history)
(defvar nnmail-spool-file)
(defun gnus-close-all-servers ()
"Close all servers."
@ -1173,7 +1172,7 @@ for new groups, and subscribe the new groups as zombies."
gnus-check-new-newsgroups)
gnus-secondary-select-methods))))
(groups 0)
group new-newsgroups got-new method hashtb
new-newsgroups got-new method hashtb ;; group
gnus-override-subscribe-method)
(unless gnus-killed-hashtb
(gnus-make-hashtable-from-killed))
@ -1204,14 +1203,14 @@ for new groups, and subscribe the new groups as zombies."
(cond
((eq do-sub 'subscribe)
(cl-incf groups)
(puthash g-name group gnus-killed-hashtb)
(puthash g-name nil gnus-killed-hashtb) ;; group
(gnus-call-subscribe-functions
gnus-subscribe-options-newsgroup-method g-name))
((eq do-sub 'ignore)
nil)
(t
(cl-incf groups)
(puthash g-name group gnus-killed-hashtb)
(puthash g-name nil gnus-killed-hashtb) ;; group
(if gnus-subscribe-hierarchical-interactive
(push g-name new-newsgroups)
(gnus-call-subscribe-functions
@ -2379,6 +2378,11 @@ If FORCE is non-nil, the .newsrc file is read."
(unless (gnus-yes-or-no-p (concat errmsg "; continue? "))
(error "%s" errmsg)))))))))
;; IIUC these 3 vars were used in older .newsrc files.
(defvar gnus-killed-assoc)
(defvar gnus-marked-assoc)
(defvar gnus-newsrc-assoc)
(defun gnus-read-newsrc-el-file (file)
(let ((ding-file (concat file "d")))
(when (file-exists-p ding-file)

View File

@ -6354,9 +6354,9 @@ The resulting hash table is returned, or nil if no Xrefs were found."
;; First peel off all invalid article numbers.
(when active
(let ((ids articles)
id first)
id) ;; first
(while (setq id (pop ids))
(when (and first (> id (cdr active)))
(when nil ;; (and first (> id (cdr active)))
;; We'll end up in this situation in one particular
;; obscure situation. If you re-scan a group and get
;; a new article that is cross-posted to a different
@ -12741,7 +12741,7 @@ If REVERSE, save parts that do not match TYPE."
;; so we highlight the entire line instead.
(when (= (+ to 2) from)
(setq from beg)
(setq to end))
(setq to (1+ end)))
(if gnus-newsgroup-selected-overlay
;; Move old overlay.
(move-overlay
@ -12796,7 +12796,7 @@ If REVERSE, save parts that do not match TYPE."
(let ((face (funcall (gnus-summary-highlight-line-0))))
(unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face))
(gnus-put-text-property-excluding-characters-with-faces
beg (point-at-eol) 'face
beg (1+ (point-at-eol)) 'face
(setq face (if (boundp face) (symbol-value face) face)))
(when gnus-summary-highlight-line-function
(funcall gnus-summary-highlight-line-function article face))))))

View File

@ -1138,7 +1138,7 @@ no need to set this variable."
:group 'gnus-message
:type '(choice (const :tag "default" nil)
string))
(make-obsolete-variable 'gnus-local-domain nil "Emacs 24.1")
(make-obsolete-variable 'gnus-local-domain nil "24.1")
;; Customization variables
@ -2310,7 +2310,7 @@ automatically cache the article in the agent cache."
;; The carpal mode has been removed, but define the variable for
;; backwards compatibility.
(defvar gnus-carpal nil)
(make-obsolete-variable 'gnus-carpal nil "Emacs 24.1")
(make-obsolete-variable 'gnus-carpal nil "24.1")
(defvar gnus-agent-fetching nil
"Whether Gnus agent is in fetching mode.")

View File

@ -323,7 +323,7 @@
(nnbabyl-possibly-change-newsgroup group server)
(nnmail-check-syntax)
(let ((buf (current-buffer))
result beg)
result) ;; beg
(and
(nnmail-activate 'nnbabyl)
(save-excursion
@ -331,7 +331,7 @@
(search-forward "\n\n" nil t)
(forward-line -1)
(save-excursion
(while (re-search-backward "^X-Gnus-Newsgroup: " beg t)
(while (re-search-backward "^X-Gnus-Newsgroup: " nil t) ;; beg
(delete-region (point) (progn (forward-line 1) (point)))))
(when nnmail-cache-accepted-message-ids
(nnmail-cache-insert (nnmail-fetch-field "message-id")

View File

@ -706,7 +706,7 @@ deleted. Point is left where the deleted region was."
(if dont-check
(setq nnfolder-current-group group
nnfolder-current-buffer nil)
(let (inf file)
(let (file) ;; inf
;; If we have to change groups, see if we don't already have
;; the folder in memory. If we do, verify the modtime and
;; destroy the folder if needed so we can rescan it.
@ -718,7 +718,7 @@ deleted. Point is left where the deleted region was."
;; touched the file since last time.
(when (and nnfolder-current-buffer
(not (gnus-buffer-live-p nnfolder-current-buffer)))
(setq nnfolder-buffer-alist (delq inf nnfolder-buffer-alist)
(setq nnfolder-buffer-alist (delq nil nnfolder-buffer-alist) ;; inf
nnfolder-current-buffer nil))
(setq nnfolder-current-group group)

View File

@ -95,7 +95,7 @@ Uses the same syntax as `nnmail-split-methods'.")
"Articles with the flags in the list will not be considered when splitting.")
(make-obsolete-variable 'nnimap-split-rule "see `nnimap-split-methods'."
"Emacs 24.1")
"24.1")
(defvoo nnimap-authenticator nil
"How nnimap authenticate itself to the server.

View File

@ -240,11 +240,6 @@ If non-nil, also update the cache when copy or move articles."
:group 'nnmail
:type 'boolean)
(make-obsolete-variable 'nnmail-spool-file 'mail-sources
"Gnus 5.9 (Emacs 22.1)")
;; revision 5.29 / p0-85 / Gnus 5.9
;; Variable removed in No Gnus v0.7
(defcustom nnmail-resplit-incoming nil
"If non-nil, re-split incoming procmail sorted mail."
:group 'nnmail-procmail
@ -1321,9 +1316,6 @@ Eudora has a broken References line, but an OK In-Reply-To."
(when (re-search-forward "^\\(In-Reply-To:[^\n]+\\)\n[ \t]+" nil t)
(replace-match "\\1" t))))
(defalias 'nnmail-fix-eudora-headers #'nnmail-ignore-broken-references)
(make-obsolete 'nnmail-fix-eudora-headers #'nnmail-ignore-broken-references "Emacs 23.1")
(custom-add-option 'nnmail-prepare-incoming-header-hook
'nnmail-ignore-broken-references)

View File

@ -503,6 +503,8 @@ as unread by Gnus.")
(setcdr active (1+ (cdr active))))
(cdr active)))
(defvar nnmh-newsgroup-articles)
(defun nnmh-update-gnus-unreads (group)
;; Go through the .nnmh-articles file and compare with the actual
;; articles in this folder. The articles that are "new" will be

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