Merge remote-tracking branch 'savannah/master' into HEAD
This commit is contained in:
commit
886377fefd
248 changed files with 2920 additions and 2239 deletions
100
ChangeLog.3
100
ChangeLog.3
|
@ -1,3 +1,99 @@
|
|||
2020-08-03 Phil Sainty <psainty@orcon.net.nz>
|
||||
|
||||
lisp/so-long.el: Improve support for major mode hooks
|
||||
|
||||
* lisp/so-long.el (so-long-remember-all, so-long-disable-minor-modes)
|
||||
(so-long-override-variables): Store and use the `so-long-minor-modes'
|
||||
and `so-long-variable-overrides' values seen by the original major
|
||||
mode, so that buffer-local changes made in the major mode hook will be
|
||||
respected.
|
||||
|
||||
Add documentation of this and other major mode hook usage.
|
||||
|
||||
2020-08-02 Grégory Mounié <Gregory.Mounie@imag.fr> (tiny change)
|
||||
|
||||
Avoid segfaults if XIM is set but not xim_styles
|
||||
|
||||
Emacs segfaults at the X11 initialization if XIM is set
|
||||
and xim_styles is NULL. This patch avoids the crash.
|
||||
* src/xfns.c: Check also if FRAME_X_XIM_STYLES(f) is NULL.
|
||||
(Bug#42676) (Bug#42673) (Bug#42677)
|
||||
|
||||
2020-07-31 Philipp Stephani <phst@google.com>
|
||||
|
||||
Backport: Make checking for liveness of global values more precise.
|
||||
|
||||
We can't just use a hash lookup because a global and a local reference
|
||||
might refer to the same Lisp object.
|
||||
|
||||
* src/emacs-module.c (module_free_global_ref): More precise check for
|
||||
global liveness.
|
||||
|
||||
(cherry picked from commit 9f01ce6327af886f26399924a9aadf16cdd4fd9f)
|
||||
|
||||
2020-07-31 Philipp Stephani <phst@google.com>
|
||||
|
||||
Backport: Fix subtle bug when checking liveness of module values.
|
||||
|
||||
We can't simply look up the Lisp object in the global reference table
|
||||
because an invalid local and a valid global reference might refer to
|
||||
the same object. Instead, we have to test the address of the global
|
||||
reference against the stored references.
|
||||
|
||||
* src/emacs-module.c (module_global_reference_p): New helper function.
|
||||
(value_to_lisp): Use it.
|
||||
|
||||
(cherry picked from commit 6355a3ec62f43c9b99d483982ff851d32dd78891)
|
||||
|
||||
2020-07-31 Philipp Stephani <phst@google.com>
|
||||
|
||||
Backport: Fix memory leak for global module objects (Bug#42482).
|
||||
|
||||
Instead of storing the global values in a global 'emacs_value_storage'
|
||||
object, store them as hash values alongside the reference counts.
|
||||
That way the garbage collector takes care of cleaning them up.
|
||||
|
||||
* src/emacs-module.c (global_storage): Remove.
|
||||
(struct module_global_reference): New pseudovector type.
|
||||
(XMODULE_GLOBAL_REFERENCE): New helper function.
|
||||
(module_make_global_ref, module_free_global_ref): Use
|
||||
'module_global_reference' struct for global reference values.
|
||||
(value_to_lisp, module_handle_nonlocal_exit): Adapt to deletion of
|
||||
'global_storage'.
|
||||
|
||||
(cherry picked from commit 5c5eb9790898e4ab10bcbbdb6871947ed3018569)
|
||||
|
||||
2020-07-30 Nicolas Petton <nicolas@petton.fr>
|
||||
|
||||
* admin/authors.el (authors-aliases): Remove a faulty regexp.
|
||||
|
||||
2020-07-29 Stefan Kangas <stefankangas@gmail.com>
|
||||
|
||||
* doc/lispref/symbols.texi (Definitions): Fix typo.
|
||||
|
||||
2020-07-28 Nicolas Petton <nicolas@petton.fr>
|
||||
|
||||
* etc/HISTORY: Add Emacs 27.1 release date.
|
||||
|
||||
2020-07-28 Nicolas Petton <nicolas@petton.fr>
|
||||
|
||||
Bump Emacs version to 27.1
|
||||
|
||||
* README:
|
||||
* configure.ac:
|
||||
* msdos/sed2v2.inp:
|
||||
* nt/README.W32: Bump Emacs version.
|
||||
|
||||
2020-07-28 Nicolas Petton <nicolas@petton.fr>
|
||||
|
||||
* etc/AUTHORS: Update.
|
||||
|
||||
2020-07-28 Nicolas Petton <nicolas@petton.fr>
|
||||
|
||||
Update authors.el
|
||||
|
||||
* admin/authors.el (authors-aliases): Add author aliases.
|
||||
|
||||
2020-07-28 Nicolas Petton <nicolas@petton.fr>
|
||||
|
||||
* etc/NEWS: Remove temporary markup.
|
||||
|
@ -2862,7 +2958,7 @@
|
|||
* doc/lispref/searching.texi (Rx Constructs): Document.
|
||||
* lisp/emacs-lisp/rx.el (rx--normalise-or-arg)
|
||||
(rx--all-string-or-args): New.
|
||||
(rx--translate-or): Normalise arguments first, and check for strings
|
||||
(rx--translate-or): Normalize arguments first, and check for strings
|
||||
in subforms.
|
||||
(rx--expand-eval): Extracted from rx--translate-eval.
|
||||
(rx--translate-eval): Call rx--expand-eval.
|
||||
|
@ -142382,7 +142478,7 @@
|
|||
|
||||
This file records repository revisions from
|
||||
commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to
|
||||
commit 56f958807c0b8ea8f45e3c088157ca144a1b1fac (inclusive).
|
||||
commit 1ca4da054be7eb340c511d817f3ec89c8b819db7 (inclusive).
|
||||
See ChangeLog.2 for earlier changes.
|
||||
|
||||
;; Local Variables:
|
||||
|
|
|
@ -192,16 +192,14 @@ sk Miroslav Vaško
|
|||
** Check for modes which bind M-s that conflicts with a new global binding M-s
|
||||
and change key bindings where necessary. The current list of modes:
|
||||
|
||||
1. Gnus binds 'M-s' to 'gnus-summary-search-article-forward'.
|
||||
|
||||
2. Minibuffer binds 'M-s' to 'next-matching-history-element'
|
||||
1. Minibuffer binds 'M-s' to 'next-matching-history-element'
|
||||
(not useful any more since C-s can now search in the history).
|
||||
|
||||
3. PCL-CVS binds 'M-s' to 'cvs-status', and log-edit-mode binds it to
|
||||
2. PCL-CVS binds 'M-s' to 'cvs-status', and log-edit-mode binds it to
|
||||
'log-edit-comment-search-forward'. Perhaps search commands
|
||||
on the global key binding 'M-s' are useless in these modes.
|
||||
|
||||
4. Rmail binds '\es' to 'rmail-search'/'rmail-summary-search'.
|
||||
3. Rmail binds '\es' to 'rmail-search'/'rmail-summary-search'.
|
||||
|
||||
|
||||
* DOCUMENTATION
|
||||
|
|
31
configure.ac
31
configure.ac
|
@ -219,6 +219,21 @@ AC_DEFUN([OPTION_DEFAULT_OFF], [dnl
|
|||
m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=no])dnl
|
||||
])dnl
|
||||
|
||||
dnl OPTION_DEFAULT_IFAVAILABLE(NAME, HELP-STRING)
|
||||
dnl Create a new --with option that defaults to 'ifavailable'.
|
||||
dnl NAME is the base name of the option. The shell variable with_NAME
|
||||
dnl will be set to either the user's value (if the option is
|
||||
dnl specified; 'yes' for a plain --with-NAME) or to 'ifavailable' (if the
|
||||
dnl option is not specified). Note that the shell variable name is
|
||||
dnl constructed as autoconf does, by replacing non-alphanumeric
|
||||
dnl characters with "_".
|
||||
dnl HELP-STRING is the help text for the option.
|
||||
AC_DEFUN([OPTION_DEFAULT_IFAVAILABLE], [dnl
|
||||
AC_ARG_WITH([$1],[AS_HELP_STRING([--with-$1],[$2])],[],[dnl
|
||||
m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=ifavailable])dnl
|
||||
])dnl
|
||||
|
||||
|
||||
dnl OPTION_DEFAULT_ON(NAME, HELP-STRING)
|
||||
dnl Create a new --with option that defaults to $with_features.
|
||||
dnl NAME is the base name of the option. The shell variable with_NAME
|
||||
|
@ -438,7 +453,7 @@ OPTION_DEFAULT_ON([cairo],[don't compile with Cairo drawing])
|
|||
OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
|
||||
OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support])
|
||||
OPTION_DEFAULT_ON([native-image-api], [don't use native image APIs (GDI+ on Windows)])
|
||||
OPTION_DEFAULT_ON([json], [don't compile with native JSON support])
|
||||
OPTION_DEFAULT_IFAVAILABLE([json], [don't compile with native JSON support])
|
||||
|
||||
OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts])
|
||||
OPTION_DEFAULT_ON([harfbuzz],[don't use HarfBuzz for text shaping])
|
||||
|
@ -709,7 +724,7 @@ case "${canonical}" in
|
|||
*-apple-darwin* )
|
||||
case "${canonical}" in
|
||||
*-apple-darwin[0-9].*) unported=yes ;;
|
||||
i[3456]86-* | x86_64-* ) ;;
|
||||
i[3456]86-* | x86_64-* | arm-* ) ;;
|
||||
* ) unported=yes ;;
|
||||
esac
|
||||
opsys=darwin
|
||||
|
@ -1012,7 +1027,10 @@ AS_IF([test $gl_gcc_warnings = no],
|
|||
[# Use -fanalyzer and related options only if --enable-gcc-warnings,
|
||||
# as they slow GCC considerably.
|
||||
nw="$nw -fanalyzer -Wno-analyzer-double-free -Wno-analyzer-malloc-leak"
|
||||
nw="$nw -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free"])
|
||||
nw="$nw -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free"
|
||||
# Use -Wsuggest-attribute=malloc only if --enable-gcc-warnings,
|
||||
# as it doesn't flag code that is wrong in any way.
|
||||
nw="$nw -Wsuggest-attribute=malloc"])
|
||||
|
||||
nw="$nw -Wcast-align=strict" # Emacs is tricky with pointers.
|
||||
nw="$nw -Wduplicated-branches" # Too many false alarms
|
||||
|
@ -2927,7 +2945,7 @@ AC_SUBST(LIBSYSTEMD_CFLAGS)
|
|||
HAVE_JSON=no
|
||||
JSON_OBJ=
|
||||
|
||||
if test "${with_json}" = yes; then
|
||||
if test "${with_json}" != no; then
|
||||
EMACS_CHECK_MODULES([JSON], [jansson >= 2.7],
|
||||
[HAVE_JSON=yes], [HAVE_JSON=no])
|
||||
if test "${HAVE_JSON}" = yes; then
|
||||
|
@ -3965,6 +3983,11 @@ case $with_gnutls,$HAVE_GNUTLS in
|
|||
*) MISSING="$MISSING gnutls"
|
||||
WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gnutls=ifavailable";;
|
||||
esac
|
||||
case $with_json,$HAVE_JSON in
|
||||
no,* | ifavailable,* | *,yes) ;;
|
||||
*) MISSING="$MISSING json"
|
||||
WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-json=ifavailable";;
|
||||
esac
|
||||
if test "X${MISSING}" != X; then
|
||||
AC_MSG_ERROR([The following required libraries were not found:
|
||||
$MISSING
|
||||
|
|
|
@ -115,7 +115,7 @@ just like digits. Case is ignored.
|
|||
starting with @kbd{C-x 8}. For example, @kbd{C-x 8 [} inserts @t{‘}
|
||||
which is Unicode code-point U+2018 @sc{left single quotation mark},
|
||||
sometimes called a left single ``curved quote'' or ``curly quote''.
|
||||
Similarly, @kbd{C-x 8 ]}, @kbd{C-x 8 @{} and @kbd{C-x 8 @}} insert the
|
||||
Similarly, @w{@kbd{C-x 8 ]}}, @kbd{C-x 8 @{} and @kbd{C-x 8 @}} insert the
|
||||
curved quotes @t{’}, @t{“} and @t{”}, respectively. Also, a working
|
||||
@key{Alt} key acts like @kbd{C-x 8} (unless followed by @key{RET});
|
||||
e.g., @kbd{A-[} acts like @kbd{C-x 8 [} and inserts @t{‘}. To see
|
||||
|
|
|
@ -2605,6 +2605,7 @@ the function or facility is available, like this:
|
|||
(if (fboundp 'blink-cursor-mode)
|
||||
(blink-cursor-mode 0))
|
||||
|
||||
@c FIXME: Find better example since `set-coding-priority' is removed.
|
||||
(if (boundp 'coding-category-utf-8)
|
||||
(set-coding-priority '(coding-category-utf-8)))
|
||||
@end example
|
||||
|
|
|
@ -445,12 +445,14 @@ use @code{flyspell-region} or @code{flyspell-buffer} for that.
|
|||
@findex flyspell-correct-word-before-point
|
||||
When Flyspell mode highlights a word as misspelled, you can click on
|
||||
it with @kbd{mouse-2} (@code{flyspell-correct-word}) to display a menu
|
||||
of possible corrections and actions. In addition, @kbd{C-.} or
|
||||
of possible corrections and actions. If you want this menu on
|
||||
@kbd{mouse-3} instead, customize the variable
|
||||
@code{flyspell-use-mouse-3-for-menu}. In addition, @kbd{C-.} or
|
||||
@kbd{@key{ESC}-@key{TAB}} (@code{flyspell-auto-correct-word}) will
|
||||
propose various successive corrections for the word at point, and
|
||||
@w{@kbd{C-c $}} (@code{flyspell-correct-word-before-point}) will pop up a
|
||||
menu of possible corrections. Of course, you can always correct the
|
||||
misspelled word by editing it manually in any way you like.
|
||||
@w{@kbd{C-c $}} (@code{flyspell-correct-word-before-point}) will pop
|
||||
up a menu of possible corrections. Of course, you can always correct
|
||||
the misspelled word by editing it manually in any way you like.
|
||||
|
||||
@findex flyspell-prog-mode
|
||||
Flyspell Prog mode works just like ordinary Flyspell mode, except
|
||||
|
|
|
@ -366,9 +366,13 @@ instead of running the @code{mouse-save-then-kill} command, rebind
|
|||
@kbd{mouse-3} by adding the following line to your init file
|
||||
(@pxref{Init Rebinding}):
|
||||
|
||||
@c FIXME: `mouse-popup-menubar-stuff' is obsolete since 23.1.
|
||||
@smallexample
|
||||
(global-set-key [mouse-3] 'mouse-popup-menubar-stuff)
|
||||
(global-set-key [mouse-3]
|
||||
'(menu-item "Menu Bar" ignore
|
||||
:filter (lambda (_)
|
||||
(if (zerop (or (frame-parameter nil 'menu-bar-lines) 0))
|
||||
(mouse-menu-bar-map)
|
||||
(mouse-menu-major-mode-map)))))
|
||||
@end smallexample
|
||||
|
||||
@node Mode Line Mouse
|
||||
|
|
|
@ -1793,13 +1793,12 @@ for a buffer to switch and considering only the current project's
|
|||
buffers as candidates for completion.
|
||||
|
||||
@findex project-kill-buffers
|
||||
@vindex project-kill-buffers-ignores
|
||||
@vindex project-kill-buffer-conditions
|
||||
When you finish working on the project, you may wish to kill all the
|
||||
buffers that belong to the project, to keep your Emacs session
|
||||
smaller. The command @kbd{C-x p k} (@code{project-kill-buffers})
|
||||
accomplishes that: it kills all the buffers that belong to the current
|
||||
project, except if @code{project-kill-buffers-ignores} tells
|
||||
otherwise.
|
||||
project that satisfy any of @code{project-kill-buffer-conditions}.
|
||||
|
||||
@node Switching Projects
|
||||
@subsection Switching Projects
|
||||
|
|
|
@ -518,6 +518,13 @@ between @samp{foo} and @samp{bar}, that matches
|
|||
@samp{@var{a}foo@var{b}bar@var{c}}, where @var{a}, @var{b}, and
|
||||
@var{c} can be any string including the empty string.
|
||||
|
||||
@item flex
|
||||
@cindex @code{flex}, completion style
|
||||
This aggressive completion style, also known as @code{flx} or
|
||||
@code{fuzzy} or @code{scatter} completion, attempts to complete using
|
||||
in-order substrings. For example, it can consider @samp{foo} to match
|
||||
@samp{frodo} or @samp{fbarbazoo}.
|
||||
|
||||
@item initials
|
||||
@cindex @code{initials}, completion style
|
||||
This very aggressive completion style attempts to complete acronyms
|
||||
|
|
|
@ -245,13 +245,13 @@ Do an incremental search on the selected article buffer
|
|||
(@code{gnus-summary-isearch-article}), as if you switched to the
|
||||
buffer and typed @kbd{C-s} (@pxref{Incremental Search}).
|
||||
|
||||
@kindex M-s @r{(Gnus Summary mode)}
|
||||
@kindex M-s M-s @r{(Gnus Summary mode)}
|
||||
@findex gnus-summary-search-article-forward
|
||||
@item M-s @var{regexp} @key{RET}
|
||||
Search forward for articles containing a match for @var{regexp}
|
||||
(@code{gnus-summary-search-article-forward}).
|
||||
|
||||
@kindex M-r @r{(Gnus Summary mode)}
|
||||
@kindex M-s M-r @r{(Gnus Summary mode)}
|
||||
@findex gnus-summary-search-article-backward
|
||||
@item M-r @var{regexp} @key{RET}
|
||||
Search back for articles containing a match for @var{regexp}
|
||||
|
|
|
@ -1845,6 +1845,13 @@ is, after a prefix key---then Emacs reorders the events so that this
|
|||
event comes either before or after the multi-event key sequence, not
|
||||
within it.
|
||||
|
||||
Some of these special events, such as @code{delete-frame}, invoke
|
||||
Emacs commands by default; others are not bound. If you want to
|
||||
arrange for a special event to invoke a command, you can do that via
|
||||
@code{special-event-map}. The command you bind to a function key in
|
||||
that map can then examine the full event which invoked it in
|
||||
@code{last-input-event}. @xref{Special Events}.
|
||||
|
||||
@node Event Examples
|
||||
@subsection Event Examples
|
||||
|
||||
|
|
|
@ -267,7 +267,8 @@ reason functions are defined to start with @code{lambda} is so that
|
|||
other lists, intended for other uses, will not accidentally be valid as
|
||||
functions.
|
||||
|
||||
The second element is a list of symbols---the argument variable names.
|
||||
The second element is a list of symbols---the argument variable
|
||||
names (@pxref{Argument List}).
|
||||
This is called the @dfn{lambda list}. When a Lisp function is called,
|
||||
the argument values are matched up against the variables in the lambda
|
||||
list, which are given local bindings with the values provided.
|
||||
|
@ -342,7 +343,7 @@ stored as symbol function definitions to produce named functions
|
|||
(@pxref{Function Names}).
|
||||
|
||||
@node Argument List
|
||||
@subsection Other Features of Argument Lists
|
||||
@subsection Features of Argument Lists
|
||||
@kindex wrong-number-of-arguments
|
||||
@cindex argument binding
|
||||
@cindex binding arguments
|
||||
|
@ -583,8 +584,8 @@ a function.
|
|||
@defmac defun name args [doc] [declare] [interactive] body@dots{}
|
||||
@code{defun} is the usual way to define new Lisp functions. It
|
||||
defines the symbol @var{name} as a function with argument list
|
||||
@var{args} and body forms given by @var{body}. Neither @var{name} nor
|
||||
@var{args} should be quoted.
|
||||
@var{args} (@pxref{Argument List}) and body forms given by @var{body}.
|
||||
Neither @var{name} nor @var{args} should be quoted.
|
||||
|
||||
@var{doc}, if present, should be a string specifying the function's
|
||||
documentation string (@pxref{Function Documentation}). @var{declare},
|
||||
|
|
|
@ -342,7 +342,7 @@ this choice, the rest of the regexp matches successfully.
|
|||
long time, if they lead to ambiguous matching. For
|
||||
example, trying to match the regular expression @samp{\(x+y*\)*a}
|
||||
against the string @samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz} could
|
||||
take hours before it ultimately fails. Emacs must try each way of
|
||||
take hours before it ultimately fails. Emacs may try each way of
|
||||
grouping the @samp{x}s before concluding that none of them can work.
|
||||
In general, avoid expressions that can match the same string in
|
||||
multiple ways.
|
||||
|
|
|
@ -791,11 +791,11 @@ use instead of the default @code{equal}.
|
|||
|
||||
@example
|
||||
@group
|
||||
(seq-contains '(symbol1 symbol2) 'symbol1)
|
||||
@result{} symbol1
|
||||
(seq-contains-p '(symbol1 symbol2) 'symbol1)
|
||||
@result{} t
|
||||
@end group
|
||||
@group
|
||||
(seq-contains '(symbol1 symbol2) 'symbol3)
|
||||
(seq-contains-p '(symbol1 symbol2) 'symbol3)
|
||||
@result{} nil
|
||||
@end group
|
||||
@end example
|
||||
|
|
|
@ -956,7 +956,7 @@ multiple sub-sections. Even though that was the only recommended
|
|||
approach for a long time, many people have chosen to use multiple
|
||||
top-level code sections instead. You may chose either style.
|
||||
|
||||
Using multiple top-level code sections has the advanatage that it
|
||||
Using multiple top-level code sections has the advantage that it
|
||||
avoids introducing an additional nesting level but it also means that
|
||||
the section named @samp{Code} does not contain all the code, which is
|
||||
awkward. To avoid that, you should put no code at all inside that
|
||||
|
|
|
@ -3464,7 +3464,6 @@ see @ref{Packages that do not come with Emacs}.
|
|||
@cindex Finding other packages
|
||||
@cindex Lisp packages that do not come with Emacs
|
||||
@cindex Packages, those that do not come with Emacs
|
||||
@cindex Emacs Lisp List
|
||||
@cindex Emacs Lisp Archive
|
||||
|
||||
The easiest way to add more features to your Emacs is to use the
|
||||
|
@ -3500,10 +3499,6 @@ The @uref{https://emacswiki.org, Emacs Wiki} contains pointers to some
|
|||
additional extensions. @uref{https://wikemacs.org, WikEmacs} is an
|
||||
alternative wiki for Emacs.
|
||||
|
||||
@uref{http://www.damtp.cam.ac.uk/user/sje30/emacs/ell.html, The Emacs
|
||||
Lisp List (ELL)}, has pointers to many Emacs Lisp files, but at time
|
||||
of writing it is no longer being updated.
|
||||
|
||||
It is impossible for us to list here all the sites that offer Emacs
|
||||
Lisp packages. If you are interested in a specific feature, then
|
||||
after checking Emacs itself and GNU ELPA, a web search is often the
|
||||
|
@ -4192,7 +4187,7 @@ You can get the old behavior by binding @kbd{SPC} to
|
|||
(define-key minibuffer-local-filename-completion-map (kbd "SPC")
|
||||
'minibuffer-complete-word)
|
||||
|
||||
(define-key minibuffer-local-must-match-filename-map (kbd "SPC")
|
||||
(define-key minibuffer-local-filename-must-match-map (kbd "SPC")
|
||||
'minibuffer-complete-word)
|
||||
@end lisp
|
||||
|
||||
|
|
|
@ -11029,14 +11029,14 @@ Go to the Gnus info node (@code{gnus-info-find-node}).
|
|||
|
||||
@table @kbd
|
||||
|
||||
@item M-s
|
||||
@kindex M-s @r{(Summary)}
|
||||
@item M-s M-s
|
||||
@kindex M-s M-s @r{(Summary)}
|
||||
@findex gnus-summary-search-article-forward
|
||||
Search through all subsequent (raw) articles for a regexp
|
||||
(@code{gnus-summary-search-article-forward}).
|
||||
|
||||
@item M-r
|
||||
@kindex M-r @r{(Summary)}
|
||||
@item M-s M-r
|
||||
@kindex M-s M-r @r{(Summary)}
|
||||
@findex gnus-summary-search-article-backward
|
||||
Search through all previous (raw) articles for a regexp
|
||||
(@code{gnus-summary-search-article-backward}).
|
||||
|
|
|
@ -1265,7 +1265,7 @@ for a long time. For more details, see
|
|||
To use this in Message, say:
|
||||
|
||||
@lisp
|
||||
(add-hook 'message-send-hook 'message-add-openpgp-header)
|
||||
(add-hook 'message-header-setup-hook 'message-add-openpgp-header)
|
||||
@end lisp
|
||||
|
||||
@noindent
|
||||
|
|
|
@ -1312,8 +1312,6 @@ repeated visits do not require repeated domain lookups.
|
|||
@end defopt
|
||||
@defopt url-max-password-attempts
|
||||
@end defopt
|
||||
@defopt url-temporary-directory
|
||||
@end defopt
|
||||
@defopt url-show-status
|
||||
@end defopt
|
||||
@defopt url-confirmation-func
|
||||
|
|
|
@ -220,7 +220,7 @@ GNU Emacs 26.2 (2019-04-12) emacs-26.2
|
|||
|
||||
GNU Emacs 26.3 (2019-08-28) emacs-26.3
|
||||
|
||||
GNU Emacs 27.1 (2020-08-06) emacs-27.1
|
||||
GNU Emacs 27.1 (2020-08-10) emacs-27.1
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
|
217
etc/NEWS
217
etc/NEWS
|
@ -199,7 +199,7 @@ and variables.
|
|||
displayed and which are kept hidden.
|
||||
|
||||
---
|
||||
*** New command bound to 'C': 'archive-copy-file'
|
||||
*** New command bound to 'C': 'archive-copy-file'.
|
||||
This command extracts the file under point and writes the data to a
|
||||
file.
|
||||
|
||||
|
@ -216,16 +216,16 @@ as a data list rather than as a piece of code.
|
|||
|
||||
+++
|
||||
*** New user option 'calendar-time-zone-style'.
|
||||
If 'numeric, calendar functions (eg calendar-sunrise-sunset) that display
|
||||
If 'numeric', calendar functions (eg 'calendar-sunrise-sunset') that display
|
||||
time zones will use a form like "+0100" instead of "CET".
|
||||
|
||||
** Dired
|
||||
|
||||
+++
|
||||
*** New user option 'dired-copy-dereference'.
|
||||
If set, Dired will dereferences symbolic links when copying. This can
|
||||
be switched off on a per-usage basis by providing 'dired-do-copy' with
|
||||
a 'C-u' prefix.
|
||||
If set to non-nil, Dired will dereference symbolic links when copying.
|
||||
This can be switched off on a per-usage basis by providing
|
||||
'dired-do-copy' with a 'C-u' prefix.
|
||||
|
||||
*** New user option 'dired-mark-region' affects all Dired commands
|
||||
that mark files. When non-nil and the region is active in Transient
|
||||
|
@ -259,9 +259,20 @@ invoke 'C-u C-x v s' ('vc-create-tag').
|
|||
---
|
||||
*** 'vc-hg' now uses 'hg summary' to populate extra 'vc-dir' headers.
|
||||
|
||||
---
|
||||
*** New variable 'vc-git-revision-complete-only-branches'
|
||||
If non-nil, only branches and remotes are considered when doing
|
||||
completion over branch names.
|
||||
|
||||
** Gnus
|
||||
|
||||
+++
|
||||
*** The key binding of 'gnus-summary-search-article-forward' has changed.
|
||||
This command was previously on 'M-s' and shadowed the global 'M-s'
|
||||
search prefix. The command has now been moved to 'M-s M-s'. (For
|
||||
consistency, the 'M-s M-r' key binding has been added for the
|
||||
'gnus-summary-search-article-backward' command.)
|
||||
|
||||
---
|
||||
*** The value of "all" in the 'large-newsgroup-initial' group parameter changes.
|
||||
It was previously nil, which didn't work, because nil is
|
||||
|
@ -293,23 +304,23 @@ To generate these headers, add the new function
|
|||
be generated according to the new 'message-openpgp-header' variable.
|
||||
|
||||
---
|
||||
*** A change to how Mail-Copies-To: never is handled.
|
||||
If a user has specified Mail-Copies-To: never, and Message was asked
|
||||
*** A change to how "Mail-Copies-To: never" is handled.
|
||||
If a user has specified "Mail-Copies-To: never", and Message was asked
|
||||
to do a "wide reply", some other arbitrary recipient would end up in
|
||||
the resulting To header, while the remaining recipients would be put
|
||||
in the Cc header. This is somewhat misleading, as it looks like
|
||||
the resulting "To" header, while the remaining recipients would be put
|
||||
in the "Cc" header. This is somewhat misleading, as it looks like
|
||||
you're responding to a specific person in particular. This has been
|
||||
changed so that all the recipients are put in the To header in these
|
||||
changed so that all the recipients are put in the "To" header in these
|
||||
instances.
|
||||
|
||||
+++
|
||||
*** New function to start Emacs in Message mode to send an email.
|
||||
Emacs can be defined as a handler for the "x-scheme-handler/mailto"
|
||||
MIME type with the following command: "emacs -f message-mailto %u".
|
||||
An emacs-mail.desktop file has been included, suitable for installing
|
||||
in desktop directories like /usr/share/applications. Clicking on a
|
||||
mailto: link in other applications will then open Emacs with headers
|
||||
filled out according to the link, e.g.
|
||||
An "emacs-mail.desktop" file has been included, suitable for
|
||||
installing in desktop directories like "/usr/share/applications".
|
||||
Clicking on a 'mailto:' link in other applications will then open
|
||||
Emacs with headers filled out according to the link, e.g.
|
||||
"mailto:larsi@gnus.org?subject=This+is+a+test".
|
||||
|
||||
---
|
||||
|
@ -324,7 +335,7 @@ this user option.
|
|||
*** New command to take screenshots.
|
||||
In Message mode buffers, the 'C-c C-p' ('message-insert-screenshot')
|
||||
command has been added. It depends on using an external program to
|
||||
take the actual screenshot, and defaults to ImageMagick "import".
|
||||
take the actual screenshot, and defaults to "ImageMagick import".
|
||||
|
||||
** Help
|
||||
|
||||
|
@ -345,7 +356,7 @@ This file was a compatibility kludge which is no longer needed.
|
|||
|
||||
---
|
||||
** Lisp mode now uses 'common-lisp-indent-function'.
|
||||
To revert to the previous behaviour,
|
||||
To revert to the previous behavior,
|
||||
'(setq lisp-indent-function 'lisp-indent-function)' from 'lisp-mode-hook'.
|
||||
|
||||
** Edebug
|
||||
|
@ -491,7 +502,7 @@ Defaults to 'libravatar', with 'unicornify' and 'gravatar' as options.
|
|||
|
||||
*** Regexp matching of messages is now case-sensitive by default.
|
||||
The variable 'compilation-error-case-fold-search' can be set for
|
||||
case-insensitive matching of messages when the old behaviour is
|
||||
case-insensitive matching of messages when the old behavior is
|
||||
required, but the recommended solution is to use a correctly matching
|
||||
regexp instead.
|
||||
|
||||
|
@ -523,10 +534,10 @@ This is used when invoking 'texi2dvi' from 'texinfo-tex-buffer'.
|
|||
|
||||
---
|
||||
*** New commands for moving in and between environments.
|
||||
An "environment" is something that ends with @end. The commands are
|
||||
An "environment" is something that ends with '@end'. The commands are
|
||||
'C-c C-c C-f' (next end), 'C-c C-c C-b' (previous end),
|
||||
'C-c C-c C-n' (next start) and 'C-c C-c C-p' (previous start), as well
|
||||
as 'C-c .', which will alternate between the start end the end of the
|
||||
as 'C-c .', which will alternate between the start and the end of the
|
||||
current environment.
|
||||
|
||||
** Rmail
|
||||
|
@ -650,8 +661,8 @@ mode buffer.
|
|||
+++
|
||||
*** New Emacs command line convenience function.
|
||||
The 'eww-browse' command has been added, which allows you to register
|
||||
Emacs as a MIME handler for "text/x-uri", and will call eww on the
|
||||
supplied URL. Usage example: emacs -f eww-browse https://gnu.org
|
||||
Emacs as a MIME handler for "text/x-uri", and will call 'eww' on the
|
||||
supplied URL. Usage example: "emacs -f eww-browse https://gnu.org".
|
||||
|
||||
+++
|
||||
*** 'eww-download-directory' will now use the XDG location, if defined.
|
||||
|
@ -714,13 +725,25 @@ https://www.w3.org/TR/xml/#charsets). Now it rejects such strings.
|
|||
** erc
|
||||
|
||||
---
|
||||
*** The /ignore command will now ask for a timeout to stop ignoring the user.
|
||||
*** The '/ignore' command will now ask for a timeout to stop ignoring the user.
|
||||
Allowed inputs are seconds or ISO8601-like periods like "1h" or "4h30m".
|
||||
|
||||
---
|
||||
*** ERC now recognizes C-] for italic text.
|
||||
*** ERC now recognizes 'C-]' for italic text.
|
||||
Italic text is displayed in the new 'erc-italic-face'.
|
||||
|
||||
---
|
||||
*** The erc-compat.el library is now marked obsolete.
|
||||
This file contained ERC compatibility code for Emacs 21 and XEmacs
|
||||
which is no longer needed.
|
||||
|
||||
---
|
||||
*** erc-match.el now supports 'message' highlight type (not including the nick).
|
||||
The 'erc-current-nick-highlight-type', 'erc-pal-highlight-type',
|
||||
'erc-fool-highlight-type', 'erc-keyword-highlight-type', and
|
||||
'erc-dangerous-host-highlight-type' variables now support a 'message'
|
||||
type for highlighting the entire message but not the sender's nick.
|
||||
|
||||
** Battery
|
||||
|
||||
---
|
||||
|
@ -771,18 +794,68 @@ The recentf files are no longer backed up.
|
|||
** Calc
|
||||
|
||||
---
|
||||
*** The behaviour when doing forward-delete has been changed.
|
||||
*** The behavior when doing forward-delete has been changed.
|
||||
Previously, using the 'C-d' command would delete the final number in
|
||||
the input field, no matter where point was. This has been changed to
|
||||
work more traditionally, with 'C-d' deleting the next character.
|
||||
Likewise, point isn't moved to the end of the string before inserting
|
||||
digits.
|
||||
|
||||
** term-mode
|
||||
|
||||
---
|
||||
*** New user option 'term-scroll-snap-to-bottom'.
|
||||
By default, 'term' and 'ansi-term' will now recenter the buffer so
|
||||
that the prompt is on the final line in the window. Setting this new
|
||||
user option to nil inhibits this behavior.
|
||||
|
||||
---
|
||||
*** New user option 'term-set-terminal-size'
|
||||
If non-nil, the 'LINES' and 'COLUMNS' environment variables will be set
|
||||
based on the current window size. In previous versions of Emacs, this
|
||||
was always done (and that could lead to odd displays when resizing the
|
||||
window after starting). This variable defaults to nil.
|
||||
|
||||
|
||||
** Miscellaneous
|
||||
|
||||
*** The new library hierarchy.el has been added.
|
||||
It's a library to create, query, navigate and display hierarchy
|
||||
structures.
|
||||
---
|
||||
*** 'C-s' in 'M-x' now searches over completions again.
|
||||
In Emacs 23, typing 'M-x' ('read-extended-command') and then 'C-s' (to
|
||||
do an interactive search) would search over possible completions.
|
||||
This was lost in Emacs 24, but is now back again.
|
||||
|
||||
---
|
||||
*** 'M-x report-emacs-bug' will no longer include "Recent messages" section.
|
||||
These were taken from the "*Messages*" buffer, and may inadvertently
|
||||
leak information from the reporting user.
|
||||
|
||||
---
|
||||
*** 'count-windows' now takes an optional parameter ALL-FRAMES.
|
||||
The semantics are as with 'walk-windows'.
|
||||
|
||||
---
|
||||
*** Killing virtual ido buffers interactively will make them go away.
|
||||
Previously, killing a virtual ido buffer with 'ido-kill-buffer' didn't
|
||||
do anything. This has now been changed, and killing virtual buffers
|
||||
with that command will remove the buffer from recentf.
|
||||
|
||||
---
|
||||
*** New variable 'ffap-file-name-with-spaces'.
|
||||
If non-nil, 'find-file-at-point' and friends will try to guess more
|
||||
expansively to identify a file name with spaces.
|
||||
|
||||
---
|
||||
*** Two new commands for centering in 'doc-view-mode'.
|
||||
The new commands 'doc-view-center-page-horizontally' (bound to 'c h')
|
||||
and 'doc-view-center-page-vertically' (bound to 'c v') center the page
|
||||
horizontally and vertically, respectively.
|
||||
|
||||
---
|
||||
*** Change in meaning of 'icomplete-show-matches-on-no-input'.
|
||||
Previously, choosing a different completion with commands like 'C-.'
|
||||
and then hitting 'RET' would choose the default completion. Doing this
|
||||
will now choose the completion under point instead.
|
||||
|
||||
---
|
||||
*** The width of the buffer-name column in 'list-buffers' is now dynamic.
|
||||
|
@ -791,23 +864,23 @@ wider than the length of the longest buffer name, except that it will
|
|||
never be narrower than 19 characters.
|
||||
|
||||
*** Bookmarks can now be targets for new tabs.
|
||||
When the 'bookmark.el' library is loaded, a customize choice is added
|
||||
When the bookmark.el library is loaded, a customize choice is added
|
||||
to 'tab-bar-new-tab-choice' for new tabs to show the bookmark list.
|
||||
|
||||
|
||||
** xwidget-webkit mode
|
||||
|
||||
*** New xwidget functions
|
||||
*** New xwidget functions.
|
||||
'xwidget-webkit-uri' (return the current URL), 'xwidget-webkit-title'
|
||||
(return the current title), and 'xwidget-webkit-goto-history' (goto a
|
||||
point in history).
|
||||
|
||||
*** Pixel-based scrolling
|
||||
*** Pixel-based scrolling.
|
||||
The 'xwidget-webkit-scroll-up', 'xwidget-webkit-scroll-down' commands
|
||||
now supports scrolling arbitrary pixel values. It now treats the
|
||||
optional 2nd argument as the pixel values to scroll.
|
||||
|
||||
*** New commands for scrolling
|
||||
*** New commands for scrolling.
|
||||
The new commands 'xwidget-webkit-scroll-up-line',
|
||||
'xwidget-webkit-scroll-down-line', 'xwidget-webkit-scroll-forward',
|
||||
'xwidget-webkit-scroll-backward' can be used to scroll webkit by the
|
||||
|
@ -817,6 +890,41 @@ height of lines or width of chars.
|
|||
When non-nil, use a new xwidget webkit session after bookmark jump.
|
||||
Otherwise, it will use 'xwidget-webkit-last-session'.
|
||||
|
||||
** Flyspell mode
|
||||
|
||||
+++
|
||||
*** Corrections and actions menu can be optionally bound to 'mouse-3'.
|
||||
When Flyspell mode highlights a word as misspelled, you can click on
|
||||
it to display a menu of possible corrections and actions. You can now
|
||||
easily bind this menu to 'down-mouse-3' (usually the right mouse button)
|
||||
instead of 'mouse-2' (the default) by customizing the new user option
|
||||
'flyspell-use-mouse-3-for-menu'.
|
||||
|
||||
** Time
|
||||
|
||||
---
|
||||
*** 'display-time-world' has been renamed to 'world-clock'.
|
||||
'world-clock' creates a buffer with an updating time display using
|
||||
several time zones. It is hoped that the new names are more
|
||||
discoverable.
|
||||
|
||||
The following functions have been renamed:
|
||||
|
||||
'display-time-world' to 'world-clock'
|
||||
'display-time-world-mode' to 'world-clock-mode'
|
||||
'display-time-world-display' to 'world-clock-display'
|
||||
'display-time-world-timer' to 'world-clock-update'
|
||||
|
||||
The following user options have been renamed:
|
||||
|
||||
'display-time-world-list' to 'world-clock-list'
|
||||
'display-time-world-time-format' to 'world-clock-time-format'
|
||||
'display-time-world-buffer-name' to 'world-clock-buffer-name'
|
||||
'display-time-world-timer-enable' to 'world-clock-timer-enable'
|
||||
'display-time-world-timer-second' to 'world-clock-timer-second'
|
||||
|
||||
The old names are now obsolete.
|
||||
|
||||
|
||||
* New Modes and Packages in Emacs 28.1
|
||||
|
||||
|
@ -827,6 +935,10 @@ composed of Lisp symbolic expressions that do not form a computer
|
|||
program. The ".dir-locals.el" file is automatically set to use this
|
||||
mode, as are other data files produced by Emacs.
|
||||
|
||||
** hierarchy.el
|
||||
|
||||
It's a library to create, query, navigate and display hierarchy structures.
|
||||
|
||||
|
||||
* Incompatible Editing Changes in Emacs 28.1
|
||||
|
||||
|
@ -889,7 +1001,41 @@ have now been removed.
|
|||
|
||||
---
|
||||
** Some libraries obsolete since Emacs 23 have been removed:
|
||||
'ledit.el', 'lmenu.el', 'lucid.el and 'old-whitespace.el'.
|
||||
ledit.el, lmenu.el, lucid.el and old-whitespace.el.
|
||||
|
||||
---
|
||||
** Some functions and variables obsolete since Emacs 23 have been removed:
|
||||
|
||||
'GOLD-map', 'bookmark-jump-noselect',
|
||||
'bookmark-read-annotation-text-func', 'buffer-menu-mode-hook',
|
||||
'char-coding-system-table', 'char-valid-p', 'charset-bytes',
|
||||
'charset-id', 'charset-list' (function), 'complete-in-turn',
|
||||
'completion-common-substring', 'crm-minibuffer-complete',
|
||||
'crm-minibuffer-complete-and-exit', 'crm-minibuffer-completion-help',
|
||||
'custom-mode', 'custom-mode-hook', 'detect-coding-with-priority',
|
||||
'dirtrack-debug' (function), 'dirtrack-debug-toggle',
|
||||
'dynamic-completion-table',
|
||||
'easy-menu-precalculate-equivalent-keybindings',
|
||||
'epa-display-verify-result', 'epg-passphrase-callback-function',
|
||||
'eshell-report-bug', 'ffap-bug', 'ffap-submit-bug', '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',
|
||||
'ispell-aspell-supports-utf8', 'lisp-mode-auto-fill',
|
||||
'locate-file-completion', 'make-coding-system',
|
||||
'minibuffer-local-must-match-filename-map', 'mouse-major-mode-menu',
|
||||
'mouse-popup-menubar', 'mouse-popup-menubar-stuff',
|
||||
'newsticker-groups-filename', 'non-iso-charset-alist',
|
||||
'nonascii-insert-offset', 'nonascii-translation-table',
|
||||
'password-read-and-add', 'pre-abbrev-expand-hook',
|
||||
'process-filter-multibyte-p', 'remember-buffer' (function),
|
||||
'rmail-message-filter', 'set-coding-priority',
|
||||
'set-process-filter-multibyte', 'shell-dirtrack-toggle',
|
||||
't-mouse-mode', 'tooltip-hook', 'tpu-have-ispell',
|
||||
'url-generate-unique-filename', 'url-temporary-directory',
|
||||
'vc-arch-command', 'vc-default-working-revision' (variable),
|
||||
'vc-mtn-command', 'vc-revert-buffer', 'vc-workfile-version',
|
||||
'vcursor-toggle-vcursor-map', 'w32-focus-frame', 'w32-select-font'.
|
||||
|
||||
|
||||
* Lisp Changes in Emacs 28.1
|
||||
|
@ -898,6 +1044,12 @@ have now been removed.
|
|||
** The 'count-lines' function now takes an optional parameter to
|
||||
ignore invisible lines.
|
||||
|
||||
---
|
||||
** 'count-words' now crosses field boundaries.
|
||||
Originally, 'count-words' would stop counting at the first field
|
||||
boundary it encountered; now it keeps counting all the way to the
|
||||
region's (or buffer's) end.
|
||||
|
||||
---
|
||||
** New function 'custom-add-choice'.
|
||||
This function can be used by modes to add elements to the
|
||||
|
@ -1039,7 +1191,6 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
Local variables:
|
||||
coding: utf-8
|
||||
|
|
16
etc/NEWS.27
16
etc/NEWS.27
|
@ -202,10 +202,11 @@ it won't work right without some adjustment:
|
|||
|
||||
** Emacs now notifies systemd when startup finishes or shutdown begins.
|
||||
Units that are ordered after 'emacs.service' will only be started
|
||||
after Emacs has finished initialization and is ready for use.
|
||||
(If your Emacs is installed in a non-standard location and you copied the
|
||||
emacs.service file to e.g. "~/.config/systemd/user/", you will need to copy
|
||||
the new version of the file again.)
|
||||
after Emacs has finished initialization and is ready for use, and
|
||||
Emacs needs to be built with systemd support. (If your Emacs is
|
||||
installed in a non-standard location and you copied the emacs.service
|
||||
file to e.g. "~/.config/systemd/user/", you will need to copy the new
|
||||
version of the file again.)
|
||||
|
||||
|
||||
* Changes in Emacs 27.1
|
||||
|
@ -595,7 +596,7 @@ the node "(emacs) Directory Variables" of the user manual.
|
|||
|
||||
** Network connections using 'local' can now use IPv6.
|
||||
'make-network-process' now uses the correct loopback address when
|
||||
asked to use ':host 'local' and ':family 'ipv6'.
|
||||
asked to use ":host 'local" and ":family 'ipv6".
|
||||
|
||||
** The new function 'replace-region-contents' replaces the current
|
||||
region using a given replacement-function in a non-destructive manner
|
||||
|
@ -1917,6 +1918,11 @@ The value of the new 'sender' slot (if a string) is used to set gpg's
|
|||
'mml-secure-openpgp-sign-with-sender'. See gpg(1) manual page about
|
||||
"--sender" for more information.
|
||||
|
||||
*** 'epg-find-configuration' no longer finds GnuPG 2.0 through 2.1.5.
|
||||
Previously, it found these versions by mistake. The intent was to
|
||||
find GnuPG 2.1.6 or later, or find GnuPG 1.4.3 or later within the
|
||||
GnuPG 1 series.
|
||||
|
||||
** Rmail
|
||||
|
||||
*** New user option 'rmail-output-reset-deleted-flag'.
|
||||
|
|
38
etc/PROBLEMS
38
etc/PROBLEMS
|
@ -419,27 +419,6 @@ EMACSLOADPATH overrides which directories the function "load" will search.
|
|||
If you observe strange problems, check for this variable in your
|
||||
environment.
|
||||
|
||||
*** Using epop3.el package causes Emacs to signal an error.
|
||||
|
||||
The error message might be something like this:
|
||||
|
||||
"Lisp nesting exceeds max-lisp-eval-depth"
|
||||
|
||||
This happens because epop3 redefines the function gethash, which is a
|
||||
built-in primitive beginning with Emacs 21.1. We don't have a patch
|
||||
for epop3 to fix it, but perhaps a newer version of epop3 corrects that.
|
||||
|
||||
*** Buffers from 'with-output-to-temp-buffer' get set up in Help mode.
|
||||
|
||||
Changes in Emacs 20.4 to the hooks used by that function cause
|
||||
problems for some packages, specifically BBDB. See the function's
|
||||
documentation for the hooks involved. BBDB 2.00.06 fixes the problem.
|
||||
|
||||
*** The Hyperbole package causes *Help* buffers not to be displayed in
|
||||
Help mode due to setting 'temp-buffer-show-hook' rather than using
|
||||
'add-hook'. Using '(add-hook 'temp-buffer-show-hook 'help-mode-finish)'
|
||||
after loading Hyperbole should fix this.
|
||||
|
||||
** Keyboard problems
|
||||
|
||||
*** Unable to enter the M-| key on some German keyboards.
|
||||
|
@ -575,13 +554,6 @@ For example, simply moving through a file that contains hundreds of
|
|||
thousands of characters per line is slow, and consumes a lot of CPU.
|
||||
This is a known limitation of Emacs with no solution at this time.
|
||||
|
||||
*** Emacs uses 100% of CPU time
|
||||
|
||||
This was a known problem with some old versions of the Semantic package.
|
||||
The solution was to upgrade Semantic to version 2.0pre4 (distributed
|
||||
with CEDET 1.0pre4) or later. Note that Emacs includes Semantic since
|
||||
23.2, and this issue does not apply to the included version.
|
||||
|
||||
*** Display artifacts on GUI frames on X-based systems.
|
||||
|
||||
This is known to be caused by using double-buffering (which is enabled
|
||||
|
@ -1952,11 +1924,6 @@ A few versions of the Linux kernel have timer bugs that break CPU
|
|||
profiling; see Bug#34235. To fix the problem, upgrade to one of the
|
||||
kernel versions 4.14.97, 4.19.19, or 4.20.6, or later.
|
||||
|
||||
*** GNU/Linux: Process output is corrupted.
|
||||
|
||||
There is a bug in Linux kernel 2.6.10 PTYs that can cause emacs to
|
||||
read corrupted process output.
|
||||
|
||||
*** GNU/Linux: Remote access to CVS with SSH causes file corruption.
|
||||
|
||||
If you access a remote CVS repository via SSH, files may be corrupted
|
||||
|
@ -2740,11 +2707,6 @@ library on these systems. The solution is to reconfigure Emacs while
|
|||
disabling all the features that require libgio: rsvg, dbus, gconf, and
|
||||
imagemagick.
|
||||
|
||||
*** Building Emacs for Cygwin can fail with GCC 3
|
||||
|
||||
As of Emacs 22.1, there have been stability problems with Cygwin
|
||||
builds of Emacs using GCC 3. Cygwin users are advised to use GCC 4.
|
||||
|
||||
*** Building Emacs 23.3 and later will fail under Cygwin 1.5.19
|
||||
|
||||
This is a consequence of a change to src/dired.c on 2010-07-27. The
|
||||
|
|
|
@ -146,6 +146,16 @@
|
|||
_GL_EXTERN_C int _gl_cxxalias_dummy
|
||||
#endif
|
||||
|
||||
/* _GL_CXXALIAS_MDA (func, rettype, parameters);
|
||||
is to be used when func is a Microsoft deprecated alias, on native Windows.
|
||||
It declares a C++ alias called GNULIB_NAMESPACE::func
|
||||
that redirects to _func, if GNULIB_NAMESPACE is defined.
|
||||
Example:
|
||||
_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
|
||||
*/
|
||||
#define _GL_CXXALIAS_MDA(func,rettype,parameters) \
|
||||
_GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters)
|
||||
|
||||
/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
|
||||
is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
|
||||
except that the C function rpl_func may have a slightly different
|
||||
|
|
|
@ -52,7 +52,9 @@
|
|||
# include "pathmax.h"
|
||||
# include "malloca.h"
|
||||
# include "filename.h"
|
||||
# if HAVE_GETCWD
|
||||
# if defined _WIN32 && !defined __CYGWIN__
|
||||
# define __getcwd _getcwd
|
||||
# elif HAVE_GETCWD
|
||||
# if IN_RELOCWRAPPER
|
||||
/* When building the relocatable program wrapper, use the system's getcwd
|
||||
function, not the gnulib override, otherwise we would get a link error.
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
|
||||
# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
|
||||
# else
|
||||
# if defined __cplusplus && __GNUC_PREREQ (2,8)
|
||||
# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
|
||||
# define __THROW throw ()
|
||||
# define __THROWNL throw ()
|
||||
# define __NTH(fct) __LEAF_ATTR fct throw ()
|
||||
|
@ -148,7 +148,7 @@
|
|||
# define __warnattr(msg) __attribute__((__warning__ (msg)))
|
||||
# define __errordecl(name, msg) \
|
||||
extern void name (void) __attribute__((__error__ (msg)))
|
||||
#elif __glibc_clang_has_attribute (__diagnose_if__)
|
||||
#elif __glibc_clang_has_attribute (__diagnose_if__) && 0 /* fails on Fedora 31 with Clang 9. */
|
||||
# define __warndecl(name, msg) \
|
||||
extern void name (void) __attribute__((__diagnose_if__ (1, msg, "warning")))
|
||||
# define __warnattr(msg) __attribute__((__diagnose_if__ (1, msg, "warning")))
|
||||
|
@ -194,7 +194,7 @@
|
|||
Example:
|
||||
int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
|
||||
|
||||
# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
|
||||
# ifdef __cplusplus
|
||||
|
@ -465,7 +465,8 @@
|
|||
|
||||
#if (!defined _Static_assert && !defined __cplusplus \
|
||||
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
|
||||
&& (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
|
||||
&& (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \
|
||||
|| defined __STRICT_ANSI__))
|
||||
# define _Static_assert(expr, diagnostic) \
|
||||
extern int (*__Static_assert_function (void)) \
|
||||
[!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
|
||||
|
|
|
@ -52,7 +52,7 @@ dup2_nothrow (int fd, int desired_fd)
|
|||
|
||||
TRY_MSVC_INVAL
|
||||
{
|
||||
result = dup2 (fd, desired_fd);
|
||||
result = _dup2 (fd, desired_fd);
|
||||
}
|
||||
CATCH_MSVC_INVAL
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ dup2_nothrow (int fd, int desired_fd)
|
|||
return result;
|
||||
}
|
||||
# else
|
||||
# define dup2_nothrow dup2
|
||||
# define dup2_nothrow _dup2
|
||||
# endif
|
||||
|
||||
static int
|
||||
|
|
|
@ -97,6 +97,12 @@
|
|||
_GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef creat
|
||||
# define creat _creat
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (creat, int, (const char *filename, mode_t mode));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode));
|
||||
# endif
|
||||
|
@ -106,6 +112,9 @@ _GL_CXXALIASWARN (creat);
|
|||
/* Assume creat is always declared. */
|
||||
_GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - "
|
||||
"use gnulib module creat for portability");
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef creat
|
||||
# define creat _creat
|
||||
#endif
|
||||
|
||||
#if @GNULIB_FCNTL@
|
||||
|
@ -146,6 +155,12 @@ _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
|
|||
_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef open
|
||||
# define open _open
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
|
||||
# endif
|
||||
|
@ -159,6 +174,9 @@ _GL_CXXALIASWARN (open);
|
|||
/* Assume open is always declared. */
|
||||
_GL_WARN_ON_USE (open, "open is not always POSIX compliant - "
|
||||
"use gnulib module open for portability");
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef open
|
||||
# define open _open
|
||||
#endif
|
||||
|
||||
#if @GNULIB_OPENAT@
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef __THROW
|
||||
# if defined __cplusplus && __GNUC_PREREQ (2,8)
|
||||
# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4)
|
||||
# define __THROW throw ()
|
||||
# else
|
||||
# define __THROW
|
||||
|
|
|
@ -682,7 +682,6 @@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
|
|||
HAVE_TIMEGM = @HAVE_TIMEGM@
|
||||
HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
|
||||
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
|
||||
HAVE_TZSET = @HAVE_TZSET@
|
||||
HAVE_UNISTD_H = @HAVE_UNISTD_H@
|
||||
HAVE_UNLINKAT = @HAVE_UNLINKAT@
|
||||
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
|
||||
|
@ -1159,7 +1158,7 @@ ifeq (,$(OMIT_GNULIB_MODULE_absolute-header))
|
|||
# Use this preprocessor expression to decide whether #include_next works.
|
||||
# Do not rely on a 'configure'-time test for this, since the expression
|
||||
# might appear in an installed header, which is used by some other compiler.
|
||||
HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
|
||||
HAVE_INCLUDE_NEXT = (__GNUC__ || __clang__ || 60000000 <= __DECC_VER)
|
||||
|
||||
endif
|
||||
## end gnulib module absolute-header
|
||||
|
@ -3185,7 +3184,6 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
|
|||
-e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
|
||||
-e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
|
||||
-e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
|
||||
-e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \
|
||||
-e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
|
||||
-e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
|
||||
-e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
|
||||
|
|
|
@ -396,7 +396,7 @@
|
|||
For now, assume all versions of GCC-like compilers generate bogus
|
||||
warnings for _Generic. This matters only for compilers that
|
||||
lack relevant builtins. */
|
||||
#if __GNUC__
|
||||
#if __GNUC__ || defined __clang__
|
||||
# define _GL__GENERIC_BOGUS 1
|
||||
#else
|
||||
# define _GL__GENERIC_BOGUS 0
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef __THROW
|
||||
# if defined __cplusplus && __GNUC_PREREQ (2,8)
|
||||
# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4)
|
||||
# define __THROW throw ()
|
||||
# else
|
||||
# define __THROW
|
||||
|
|
|
@ -94,7 +94,7 @@ my_tzset (void)
|
|||
const char *tz = getenv ("TZ");
|
||||
if (tz != NULL && strchr (tz, '/') != NULL)
|
||||
_putenv ("TZ=");
|
||||
# elif HAVE_TZSET
|
||||
# else
|
||||
tzset ();
|
||||
# endif
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
# define HAVE_TM_GMTOFF 1
|
||||
# define HAVE_TM_ZONE 1
|
||||
# define HAVE_TZNAME 1
|
||||
# define HAVE_TZSET 1
|
||||
# include "../locale/localeinfo.h"
|
||||
#else
|
||||
# include <config.h>
|
||||
|
@ -34,6 +33,7 @@
|
|||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
|
||||
#if HAVE_TZNAME && !HAVE_DECL_TZNAME
|
||||
|
@ -163,7 +163,10 @@ extern char *tzname[];
|
|||
size_t _w = pad == L_('-') || width < 0 ? 0 : width; \
|
||||
size_t _incr = _n < _w ? _w : _n; \
|
||||
if (_incr >= maxsize - i) \
|
||||
return 0; \
|
||||
{ \
|
||||
errno = ERANGE; \
|
||||
return 0; \
|
||||
} \
|
||||
if (p) \
|
||||
{ \
|
||||
if (_n < _w) \
|
||||
|
@ -365,7 +368,7 @@ tm_diff (const struct tm *a, const struct tm *b)
|
|||
#define ISO_WEEK1_WDAY 4 /* Thursday */
|
||||
#define YDAY_MINIMUM (-366)
|
||||
static int iso_week_days (int, int);
|
||||
#ifdef __GNUC__
|
||||
#if defined __GNUC__ || defined __clang__
|
||||
__inline__
|
||||
#endif
|
||||
static int
|
||||
|
@ -389,7 +392,6 @@ iso_week_days (int yday, int wday)
|
|||
#endif
|
||||
|
||||
#ifdef my_strftime
|
||||
# undef HAVE_TZSET
|
||||
# define extra_args , tz, ns
|
||||
# define extra_args_spec , timezone_t tz, int ns
|
||||
#else
|
||||
|
@ -449,6 +451,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
|
|||
size_t maxsize = (size_t) -1;
|
||||
#endif
|
||||
|
||||
int saved_errno = errno;
|
||||
int hour12 = tp->tm_hour;
|
||||
#ifdef _NL_CURRENT
|
||||
/* We cannot make the following values variables since we must delay
|
||||
|
@ -523,7 +526,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
|
|||
{
|
||||
/* POSIX.1 requires that local time zone information be used as
|
||||
though strftime called tzset. */
|
||||
# if HAVE_TZSET
|
||||
# ifndef my_strftime
|
||||
if (!*tzset_called)
|
||||
{
|
||||
tzset ();
|
||||
|
@ -1188,7 +1191,13 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
|
|||
time_t t;
|
||||
|
||||
ltm = *tp;
|
||||
ltm.tm_yday = -1;
|
||||
t = mktime_z (tz, <m);
|
||||
if (ltm.tm_yday < 0)
|
||||
{
|
||||
errno = EOVERFLOW;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Generate string value for T using time_t arithmetic;
|
||||
this works even if sizeof (long) < sizeof (time_t). */
|
||||
|
@ -1417,7 +1426,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
|
|||
|
||||
/* POSIX.1 requires that local time zone information be used as
|
||||
though strftime called tzset. */
|
||||
# if HAVE_TZSET
|
||||
# ifndef my_strftime
|
||||
if (!*tzset_called)
|
||||
{
|
||||
tzset ();
|
||||
|
@ -1486,5 +1495,6 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
|
|||
*p = L_('\0');
|
||||
#endif
|
||||
|
||||
errno = saved_errno;
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,11 @@
|
|||
static int
|
||||
orig_open (const char *filename, int flags, mode_t mode)
|
||||
{
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
return _open (filename, flags, mode);
|
||||
#else
|
||||
return open (filename, flags, mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Specification. */
|
||||
|
|
|
@ -558,7 +558,7 @@ weak_alias (__regerror, regerror)
|
|||
static const bitset_t utf8_sb_map =
|
||||
{
|
||||
/* Set the first 128 bits. */
|
||||
# if defined __GNUC__ && !defined __STRICT_ANSI__
|
||||
# if (defined __GNUC__ || __clang_major__ >= 4) && !defined __STRICT_ANSI__
|
||||
[0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
|
||||
# else
|
||||
# if 4 * BITSET_WORD_BITS < ASCII_CHARS
|
||||
|
|
|
@ -335,7 +335,7 @@ typedef struct
|
|||
Idx idx; /* for BACK_REF */
|
||||
re_context_type ctx_type; /* for ANCHOR */
|
||||
} opr;
|
||||
#if __GNUC__ >= 2 && !defined __STRICT_ANSI__
|
||||
#if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__
|
||||
re_token_type_t type : 8;
|
||||
#else
|
||||
re_token_type_t type;
|
||||
|
|
|
@ -215,6 +215,11 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
|
|||
"use gnulib module fclose for portable POSIX compliance");
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef fcloseall
|
||||
# define fcloseall _fcloseall
|
||||
#endif
|
||||
|
||||
#if @GNULIB_FDOPEN@
|
||||
# if @REPLACE_FDOPEN@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
|
@ -224,6 +229,12 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
|
|||
_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef fdopen
|
||||
# define fdopen _fdopen
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
|
||||
# endif
|
||||
|
@ -233,6 +244,9 @@ _GL_CXXALIASWARN (fdopen);
|
|||
/* Assume fdopen is always declared. */
|
||||
_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - "
|
||||
"use gnulib module fdopen for portability");
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef fdopen
|
||||
# define fdopen _fdopen
|
||||
#endif
|
||||
|
||||
#if @GNULIB_FFLUSH@
|
||||
|
@ -297,6 +311,11 @@ _GL_CXXALIASWARN (fgets);
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef fileno
|
||||
# define fileno _fileno
|
||||
#endif
|
||||
|
||||
#if @GNULIB_FOPEN@
|
||||
# if @REPLACE_FOPEN@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
|
@ -824,6 +843,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
|
|||
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef getw
|
||||
# define getw _getw
|
||||
#endif
|
||||
|
||||
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
|
||||
struct obstack;
|
||||
/* Grow an obstack with formatted output. Return the number of
|
||||
|
@ -940,7 +964,7 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
|
|||
#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
|
||||
# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
|
||||
|| (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
|
||||
# if defined __GNUC__
|
||||
# if defined __GNUC__ || defined __clang__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
/* Don't break __attribute__((format(printf,M,N))). */
|
||||
# define printf __printf__
|
||||
|
@ -1037,6 +1061,11 @@ _GL_CXXALIASWARN (puts);
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef putw
|
||||
# define putw _putw
|
||||
#endif
|
||||
|
||||
#if @GNULIB_REMOVE@
|
||||
# if @REPLACE_REMOVE@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
|
@ -1114,7 +1143,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - "
|
|||
|
||||
#if @GNULIB_SCANF@
|
||||
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
|
||||
# if defined __GNUC__
|
||||
# if defined __GNUC__ || defined __clang__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef scanf
|
||||
/* Don't break __attribute__((format(scanf,M,N))). */
|
||||
|
@ -1170,7 +1199,9 @@ _GL_CXXALIAS_SYS (snprintf, int,
|
|||
(char *restrict str, size_t size,
|
||||
const char *restrict format, ...));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (snprintf);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef snprintf
|
||||
# if HAVE_RAW_DECL_SNPRINTF
|
||||
|
@ -1214,6 +1245,11 @@ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
|
|||
"POSIX compliance");
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef tempnam
|
||||
# define tempnam _tempnam
|
||||
#endif
|
||||
|
||||
#if @GNULIB_TMPFILE@
|
||||
# if @REPLACE_TMPFILE@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
|
@ -1382,7 +1418,9 @@ _GL_CXXALIAS_SYS (vfscanf, int,
|
|||
(FILE *restrict stream,
|
||||
const char *restrict format, va_list args));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (vfscanf);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
|
||||
|
@ -1436,7 +1474,9 @@ _GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args));
|
|||
# else
|
||||
_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (vscanf);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_VSNPRINTF@
|
||||
|
@ -1464,7 +1504,9 @@ _GL_CXXALIAS_SYS (vsnprintf, int,
|
|||
(char *restrict str, size_t size,
|
||||
const char *restrict format, va_list args));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (vsnprintf);
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef vsnprintf
|
||||
# if HAVE_RAW_DECL_VSNPRINTF
|
||||
|
|
|
@ -217,6 +217,21 @@ _GL_WARN_ON_USE (canonicalize_file_name,
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef ecvt
|
||||
# define ecvt _ecvt
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef fcvt
|
||||
# define fcvt _fcvt
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef gcvt
|
||||
# define gcvt _gcvt
|
||||
#endif
|
||||
|
||||
#if @GNULIB_GETLOADAVG@
|
||||
/* Store max(NELEM,3) load average numbers in LOADAVG[].
|
||||
The three numbers are the load average of the last 1 minute, the last 5
|
||||
|
@ -468,6 +483,11 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef mktemp
|
||||
# define mktemp _mktemp
|
||||
#endif
|
||||
|
||||
#if @GNULIB_POSIX_OPENPT@
|
||||
/* Return an FD open to the master side of a pseudo-terminal. Flags should
|
||||
include O_RDWR, and may also include O_NOCTTY. */
|
||||
|
@ -546,10 +566,19 @@ _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (putenv, int, (char *string));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef putenv
|
||||
# define putenv _putenv
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (putenv, int, (char *string));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (putenv, int, (char *string));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (putenv);
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef putenv
|
||||
# define putenv _putenv
|
||||
#endif
|
||||
|
||||
#if @GNULIB_QSORT_R@
|
||||
|
|
|
@ -24,7 +24,12 @@ extern "C" {
|
|||
/* Just like strftime, but with two more arguments:
|
||||
POSIX requires that strftime use the local timezone information.
|
||||
Use the timezone __TZ instead. Use __NS as the number of
|
||||
nanoseconds in the %N directive. */
|
||||
nanoseconds in the %N directive.
|
||||
|
||||
On error, set errno and return 0. Otherwise, return the number of
|
||||
bytes generated (not counting the trailing NUL), preserving errno
|
||||
if the number is 0. This errno behavior is in draft POSIX 202x
|
||||
plus some requested changes to POSIX. */
|
||||
size_t nstrftime (char *restrict, size_t, char const *, struct tm const *,
|
||||
timezone_t __tz, int __ns);
|
||||
|
||||
|
|
|
@ -123,6 +123,12 @@ _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
|
|||
#endif
|
||||
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef memccpy
|
||||
# define memccpy _memccpy
|
||||
#endif
|
||||
|
||||
|
||||
/* Return the first instance of C within N bytes of S, or NULL. */
|
||||
#if @GNULIB_MEMCHR@
|
||||
# if @REPLACE_MEMCHR@
|
||||
|
@ -384,6 +390,12 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef strdup
|
||||
# define strdup _strdup
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (strdup, char *, (char const *__s));
|
||||
# else
|
||||
# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
|
||||
/* strdup exists as a function and as a macro. Get rid of the macro. */
|
||||
|
@ -401,6 +413,9 @@ _GL_CXXALIASWARN (strdup);
|
|||
_GL_WARN_ON_USE (strdup, "strdup is unportable - "
|
||||
"use gnulib module strdup for portability");
|
||||
# endif
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef strdup
|
||||
# define strdup _strdup
|
||||
#endif
|
||||
|
||||
/* Append no more than N characters from SRC onto DEST. */
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
|
||||
#if @HAVE_SYS_RANDOM_H@
|
||||
|
||||
/* On uClibc, <sys/random.h> assumes prior inclusion of <stddef.h>. */
|
||||
# if defined __UCLIBC__
|
||||
# include <stddef.h>
|
||||
# endif
|
||||
/* On Mac OS X 10.5, <sys/random.h> assumes prior inclusion of <sys/types.h>.
|
||||
On Max OS X 10.13, <sys/random.h> assumes prior inclusion of a file that
|
||||
includes <Availability.h>, such as <stdlib.h> or <unistd.h>. */
|
||||
|
|
|
@ -177,14 +177,14 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
|
|||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef close
|
||||
# define close close_used_without_including_unistd_h
|
||||
# else
|
||||
# elif !defined __clang__
|
||||
_GL_WARN_ON_USE (close,
|
||||
"close() used without including <unistd.h>");
|
||||
# endif
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef gethostname
|
||||
# define gethostname gethostname_used_without_including_unistd_h
|
||||
# else
|
||||
# elif !defined __clang__
|
||||
_GL_WARN_ON_USE (gethostname,
|
||||
"gethostname() used without including <unistd.h>");
|
||||
# endif
|
||||
|
@ -219,7 +219,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
|
|||
# define setsockopt setsockopt_used_without_including_sys_socket_h
|
||||
# undef shutdown
|
||||
# define shutdown shutdown_used_without_including_sys_socket_h
|
||||
# else
|
||||
# elif !defined __clang__
|
||||
_GL_WARN_ON_USE (socket,
|
||||
"socket() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (connect,
|
||||
|
|
|
@ -391,6 +391,12 @@ struct stat
|
|||
#endif
|
||||
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef chmod
|
||||
# define chmod _chmod
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_FCHMODAT@
|
||||
# if @REPLACE_FCHMODAT@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
|
@ -432,7 +438,9 @@ _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
|
|||
# else
|
||||
_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
|
||||
# endif
|
||||
# if __GLIBC__ >= 2
|
||||
_GL_CXXALIASWARN (fstat);
|
||||
# endif
|
||||
#elif @GNULIB_OVERRIDES_STRUCT_STAT@
|
||||
# undef fstat
|
||||
# define fstat fstat_used_without_requesting_gnulib_module_fstat
|
||||
|
@ -800,6 +808,12 @@ _GL_WARN_ON_USE (stat, "stat is unportable - "
|
|||
#endif
|
||||
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef umask
|
||||
# define umask _umask
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_UTIMENSAT@
|
||||
/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
|
||||
implementation relies on futimesat, which on Solaris 10 makes an invocation
|
||||
|
|
|
@ -135,7 +135,7 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
|
|||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef close
|
||||
# define close close_used_without_including_unistd_h
|
||||
# else
|
||||
# elif !defined __clang__
|
||||
_GL_WARN_ON_USE (close,
|
||||
"close() used without including <unistd.h>");
|
||||
# endif
|
||||
|
|
|
@ -135,13 +135,19 @@ _GL_CXXALIASWARN (nanosleep);
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (tzset, void, (void));
|
||||
_GL_CXXALIAS_RPL (tzset, void, (void));
|
||||
# else
|
||||
# if ! @HAVE_TZSET@
|
||||
_GL_FUNCDECL_SYS (tzset, void, (void));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef tzset
|
||||
# define tzset _tzset
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (tzset, void, (void));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (tzset, void, (void));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (tzset);
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef tzset
|
||||
# define tzset _tzset
|
||||
# endif
|
||||
|
||||
/* Return the 'time_t' representation of TP and normalize TP. */
|
||||
|
|
|
@ -54,31 +54,6 @@ enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - offsetof (struct tm_zone, abbrs) };
|
|||
matters; the pointer is never dereferenced. */
|
||||
static timezone_t const local_tz = (timezone_t) 1;
|
||||
|
||||
#if HAVE_TM_ZONE || HAVE_TZNAME
|
||||
|
||||
/* Return true if the values A and B differ according to the rules for
|
||||
tm_isdst: A and B differ if one is zero and the other positive. */
|
||||
static bool
|
||||
isdst_differ (int a, int b)
|
||||
{
|
||||
return !a != !b && 0 <= a && 0 <= b;
|
||||
}
|
||||
|
||||
/* Return true if A and B are equal. */
|
||||
static int
|
||||
equal_tm (const struct tm *a, const struct tm *b)
|
||||
{
|
||||
return ! ((a->tm_sec ^ b->tm_sec)
|
||||
| (a->tm_min ^ b->tm_min)
|
||||
| (a->tm_hour ^ b->tm_hour)
|
||||
| (a->tm_mday ^ b->tm_mday)
|
||||
| (a->tm_mon ^ b->tm_mon)
|
||||
| (a->tm_year ^ b->tm_year)
|
||||
| isdst_differ (a->tm_isdst, b->tm_isdst));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Copy to ABBRS the abbreviation at ABBR with size ABBR_SIZE (this
|
||||
includes its trailing null byte). Append an extra null byte to
|
||||
mark the end of ABBRS. */
|
||||
|
@ -327,17 +302,25 @@ mktime_z (timezone_t tz, struct tm *tm)
|
|||
timezone_t old_tz = set_tz (tz);
|
||||
if (old_tz)
|
||||
{
|
||||
time_t t = mktime (tm);
|
||||
#if HAVE_TM_ZONE || HAVE_TZNAME
|
||||
time_t badtime = -1;
|
||||
struct tm tm_1;
|
||||
if ((t != badtime
|
||||
|| (localtime_r (&t, &tm_1) && equal_tm (tm, &tm_1)))
|
||||
&& !save_abbr (tz, tm))
|
||||
t = badtime;
|
||||
tm_1.tm_sec = tm->tm_sec;
|
||||
tm_1.tm_min = tm->tm_min;
|
||||
tm_1.tm_hour = tm->tm_hour;
|
||||
tm_1.tm_mday = tm->tm_mday;
|
||||
tm_1.tm_mon = tm->tm_mon;
|
||||
tm_1.tm_year = tm->tm_year;
|
||||
tm_1.tm_yday = -1;
|
||||
tm_1.tm_isdst = tm->tm_isdst;
|
||||
time_t t = mktime (&tm_1);
|
||||
bool ok = 0 <= tm_1.tm_yday;
|
||||
#if HAVE_TM_ZONE || HAVE_TZNAME
|
||||
ok = ok && save_abbr (tz, &tm_1);
|
||||
#endif
|
||||
if (revert_tz (old_tz))
|
||||
return t;
|
||||
if (revert_tz (old_tz) && ok)
|
||||
{
|
||||
*tm = tm_1;
|
||||
return t;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
|
159
lib/unistd.in.h
159
lib/unistd.in.h
|
@ -273,6 +273,12 @@ _GL_INLINE_HEADER_BEGIN
|
|||
_GL_FUNCDECL_RPL (access, int, (const char *file, int mode)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (access, int, (const char *file, int mode));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef access
|
||||
# define access _access
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (access, int, (const char *file, int mode));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (access, int, (const char *file, int mode));
|
||||
# endif
|
||||
|
@ -286,11 +292,22 @@ _GL_WARN_ON_USE (access, "access does not always support X_OK - "
|
|||
"also, this function is a security risk - "
|
||||
"use the gnulib module faccessat instead");
|
||||
# endif
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef access
|
||||
# define access _access
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_CHDIR@
|
||||
# if defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef chdir
|
||||
# define chdir _chdir
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (chdir, int, (const char *file));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (chdir);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef chdir
|
||||
|
@ -298,6 +315,9 @@ _GL_CXXALIASWARN (chdir);
|
|||
_GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
|
||||
"use gnulib module chdir for portability");
|
||||
# endif
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef chdir
|
||||
# define chdir _chdir
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -342,6 +362,12 @@ _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and "
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (close, int, (int fd));
|
||||
_GL_CXXALIAS_RPL (close, int, (int fd));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef close
|
||||
# define close _close
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (close, int, (int fd));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (close, int, (int fd));
|
||||
# endif
|
||||
|
@ -354,6 +380,9 @@ _GL_CXXALIASWARN (close);
|
|||
/* Assume close is always declared. */
|
||||
_GL_WARN_ON_USE (close, "close does not portably work on sockets - "
|
||||
"use gnulib module close for portability");
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef close
|
||||
# define close _close
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -382,6 +411,12 @@ _GL_WARN_ON_USE (copy_file_range,
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (dup, int, (int oldfd));
|
||||
_GL_CXXALIAS_RPL (dup, int, (int oldfd));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef dup
|
||||
# define dup _dup
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (dup, int, (int oldfd));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (dup, int, (int oldfd));
|
||||
# endif
|
||||
|
@ -392,6 +427,9 @@ _GL_CXXALIASWARN (dup);
|
|||
_GL_WARN_ON_USE (dup, "dup is unportable - "
|
||||
"use gnulib module dup for portability");
|
||||
# endif
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef dup
|
||||
# define dup _dup
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -407,6 +445,12 @@ _GL_WARN_ON_USE (dup, "dup is unportable - "
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd));
|
||||
_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef dup2
|
||||
# define dup2 _dup2
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
|
||||
# endif
|
||||
|
@ -417,6 +461,9 @@ _GL_CXXALIASWARN (dup2);
|
|||
_GL_WARN_ON_USE (dup2, "dup2 is unportable - "
|
||||
"use gnulib module dup2 for portability");
|
||||
# endif
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef dup2
|
||||
# define dup2 _dup2
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -517,6 +564,43 @@ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
|
|||
#endif
|
||||
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef execl
|
||||
# define execl _execl
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef execle
|
||||
# define execle _execle
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef execlp
|
||||
# define execlp _execlp
|
||||
#endif
|
||||
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef execv
|
||||
# define execv _execv
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef execve
|
||||
# define execve _execve
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef execvp
|
||||
# define execvp _execvp
|
||||
#endif
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef execvpe
|
||||
# define execvpe _execvpe
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_FACCESSAT@
|
||||
# if @REPLACE_FACCESSAT@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
|
@ -692,6 +776,12 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
|
||||
_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef getcwd
|
||||
# define getcwd _getcwd
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size));
|
||||
# else
|
||||
/* Need to cast, because on mingw, the second parameter is
|
||||
int size. */
|
||||
|
@ -704,6 +794,9 @@ _GL_CXXALIASWARN (getcwd);
|
|||
_GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
|
||||
"use gnulib module getcwd for portability");
|
||||
# endif
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef getcwd
|
||||
# define getcwd _getcwd
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1038,6 +1131,12 @@ _GL_WARN_ON_USE (getpass, "getpass is unportable - "
|
|||
#endif
|
||||
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef getpid
|
||||
# define getpid _getpid
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_GETUSERSHELL@
|
||||
/* Return the next valid login shell on the system, or NULL when the end of
|
||||
the list has been reached. */
|
||||
|
@ -1110,6 +1209,12 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - "
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (isatty, int, (int fd));
|
||||
_GL_CXXALIAS_RPL (isatty, int, (int fd));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef isatty
|
||||
# define isatty _isatty
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (isatty, int, (int fd));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (isatty, int, (int fd));
|
||||
# endif
|
||||
|
@ -1120,6 +1225,9 @@ _GL_CXXALIASWARN (isatty);
|
|||
_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
|
||||
"use gnulib module isatty for portability");
|
||||
# endif
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef isatty
|
||||
# define isatty _isatty
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1231,6 +1339,12 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - "
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence));
|
||||
_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef lseek
|
||||
# define lseek _lseek
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
|
||||
# endif
|
||||
|
@ -1241,6 +1355,9 @@ _GL_CXXALIASWARN (lseek);
|
|||
_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
|
||||
"systems - use gnulib module lseek for portability");
|
||||
# endif
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef lseek
|
||||
# define lseek _lseek
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1373,6 +1490,12 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
|
|||
_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef read
|
||||
# define read _read
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count));
|
||||
# else
|
||||
/* Need to cast, because on mingw, the third parameter is
|
||||
unsigned int count
|
||||
|
@ -1380,6 +1503,9 @@ _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count));
|
|||
_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (read);
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef read
|
||||
# define read _read
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1462,6 +1588,12 @@ _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (rmdir, int, (char const *name));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef rmdir
|
||||
# define rmdir _rmdir
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (rmdir, int, (char const *name));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (rmdir, int, (char const *name));
|
||||
# endif
|
||||
|
@ -1472,6 +1604,9 @@ _GL_CXXALIASWARN (rmdir);
|
|||
_GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
|
||||
"use gnulib module rmdir for portability");
|
||||
# endif
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef rmdir
|
||||
# define rmdir _rmdir
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1530,6 +1665,12 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - "
|
|||
#endif
|
||||
|
||||
|
||||
#if defined _WIN32 && !defined __CYGWIN__
|
||||
# undef swab
|
||||
# define swab _swab
|
||||
#endif
|
||||
|
||||
|
||||
#if @GNULIB_SYMLINK@
|
||||
# if @REPLACE_SYMLINK@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
|
@ -1654,6 +1795,12 @@ _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - "
|
|||
# endif
|
||||
_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (unlink, int, (char const *file));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef unlink
|
||||
# define unlink _unlink
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (unlink, int, (char const *file));
|
||||
# else
|
||||
_GL_CXXALIAS_SYS (unlink, int, (char const *file));
|
||||
# endif
|
||||
|
@ -1664,6 +1811,9 @@ _GL_CXXALIASWARN (unlink);
|
|||
_GL_WARN_ON_USE (unlink, "unlink is not portable - "
|
||||
"use gnulib module unlink for portability");
|
||||
# endif
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef unlink
|
||||
# define unlink _unlink
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1735,6 +1885,12 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - "
|
|||
_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count)
|
||||
_GL_ARG_NONNULL ((2)));
|
||||
_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
|
||||
# elif defined _WIN32 && !defined __CYGWIN__
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef write
|
||||
# define write _write
|
||||
# endif
|
||||
_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count));
|
||||
# else
|
||||
/* Need to cast, because on mingw, the third parameter is
|
||||
unsigned int count
|
||||
|
@ -1742,6 +1898,9 @@ _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
|
|||
_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (write);
|
||||
#elif defined _WIN32 && !defined __CYGWIN__
|
||||
# undef write
|
||||
# define write _write
|
||||
#endif
|
||||
|
||||
_GL_INLINE_HEADER_END
|
||||
|
|
41
lib/verify.h
41
lib/verify.h
|
@ -23,11 +23,15 @@
|
|||
|
||||
/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC)
|
||||
works as per C11. This is supported by GCC 4.6.0 and later, in C
|
||||
mode.
|
||||
mode, and by clang (also in C++ mode).
|
||||
|
||||
Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as
|
||||
per C2X, and define _GL_HAVE_STATIC_ASSERT1 if static_assert (R)
|
||||
works as per C++17. This is supported by GCC 9.1 and later.
|
||||
per C2X. This is supported by GCC 9.1 and later, and by clang in
|
||||
C++1z mode.
|
||||
|
||||
Define _GL_HAVE_STATIC_ASSERT1 if static_assert (R) works as per
|
||||
C++17. This is supported by GCC 9.1 and later, and by clang in
|
||||
C++1z mode.
|
||||
|
||||
Support compilers claiming conformance to the relevant standard,
|
||||
and also support GCC when not pedantic. If we were willing to slow
|
||||
|
@ -35,7 +39,8 @@
|
|||
since this affects only the quality of diagnostics, why bother? */
|
||||
#ifndef __cplusplus
|
||||
# if (201112L <= __STDC_VERSION__ \
|
||||
|| (!defined __STRICT_ANSI__ && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)))
|
||||
|| (!defined __STRICT_ANSI__ \
|
||||
&& (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 4 <= __clang_major__)))
|
||||
# define _GL_HAVE__STATIC_ASSERT 1
|
||||
# endif
|
||||
# if (202000L <= __STDC_VERSION__ \
|
||||
|
@ -43,7 +48,15 @@
|
|||
# define _GL_HAVE__STATIC_ASSERT1 1
|
||||
# endif
|
||||
#else
|
||||
# if 201703L <= __cplusplus || 9 <= __GNUC__
|
||||
# if 4 <= __clang_major__
|
||||
# define _GL_HAVE__STATIC_ASSERT 1
|
||||
# endif
|
||||
# if 4 <= __clang_major__ && 201411 <= __cpp_static_assert
|
||||
# define _GL_HAVE__STATIC_ASSERT1 1
|
||||
# endif
|
||||
# if 201703L <= __cplusplus \
|
||||
|| 9 <= __GNUC__ \
|
||||
|| (4 <= __clang_major__ && 201411 <= __cpp_static_assert)
|
||||
# define _GL_HAVE_STATIC_ASSERT1 1
|
||||
# endif
|
||||
#endif
|
||||
|
@ -233,13 +246,6 @@ template <int w>
|
|||
|
||||
/* @assert.h omit start@ */
|
||||
|
||||
#if defined __has_builtin
|
||||
/* <https://clang.llvm.org/docs/LanguageExtensions.html#builtin-functions> */
|
||||
# define _GL_HAS_BUILTIN_ASSUME __has_builtin (__builtin_assume)
|
||||
#else
|
||||
# define _GL_HAS_BUILTIN_ASSUME 0
|
||||
#endif
|
||||
|
||||
#if 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))
|
||||
# define _GL_HAS_BUILTIN_TRAP 1
|
||||
#elif defined __has_builtin
|
||||
|
@ -299,11 +305,14 @@ template <int w>
|
|||
|
||||
Although assuming R can help a compiler generate better code or
|
||||
diagnostics, performance can suffer if R uses hard-to-optimize
|
||||
features such as function calls not inlined by the compiler. */
|
||||
features such as function calls not inlined by the compiler.
|
||||
|
||||
#if _GL_HAS_BUILTIN_ASSUME
|
||||
# define assume(R) __builtin_assume (R)
|
||||
#elif _GL_HAS_BUILTIN_UNREACHABLE
|
||||
Avoid Clang’s __builtin_assume, as clang 9.0.1 -Wassume can
|
||||
generate a bogus diagnostic "the argument to '__builtin_assume' has
|
||||
side effects that will be discarded" even when the argument has no
|
||||
side effects. */
|
||||
|
||||
#if _GL_HAS_BUILTIN_UNREACHABLE
|
||||
# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
|
||||
#elif 1200 <= _MSC_VER
|
||||
# define assume(R) __assume (R)
|
||||
|
|
|
@ -517,14 +517,6 @@ It is nil if the abbrev has already been unexpanded.")
|
|||
;; "Local (mode-specific) abbrev table of current buffer.")
|
||||
;; (make-variable-buffer-local 'local-abbrev-table)
|
||||
|
||||
(defcustom pre-abbrev-expand-hook nil
|
||||
"Function or functions to be called before abbrev expansion is done.
|
||||
This is the first thing that `expand-abbrev' does, and so this may change
|
||||
the current abbrev table before abbrev lookup happens."
|
||||
:type 'hook
|
||||
:group 'abbrev-mode)
|
||||
(make-obsolete-variable 'pre-abbrev-expand-hook 'abbrev-expand-function "23.1")
|
||||
|
||||
(defun clear-abbrev-table (table)
|
||||
"Undefine all abbrevs in abbrev table TABLE, leaving it empty."
|
||||
(setq abbrevs-changed t)
|
||||
|
@ -836,12 +828,10 @@ Takes no argument and should return the abbrev symbol if expansion took place.")
|
|||
(defun expand-abbrev ()
|
||||
"Expand the abbrev before point, if there is an abbrev there.
|
||||
Effective when explicitly called even when `abbrev-mode' is nil.
|
||||
Before doing anything else, runs `pre-abbrev-expand-hook'.
|
||||
Calls the value of `abbrev-expand-function' with no argument to do
|
||||
the work, and returns whatever it does. (That return value should
|
||||
be the abbrev symbol if expansion occurred, else nil.)"
|
||||
(interactive)
|
||||
(run-hooks 'pre-abbrev-expand-hook)
|
||||
(funcall abbrev-expand-function))
|
||||
|
||||
(defun abbrev--default-expand ()
|
||||
|
|
|
@ -923,8 +923,6 @@ annotations."
|
|||
"# Date: " (current-time-string) "\n"))
|
||||
|
||||
|
||||
(define-obsolete-variable-alias 'bookmark-read-annotation-text-func
|
||||
'bookmark-edit-annotation-text-func "23.1")
|
||||
(defvar bookmark-edit-annotation-text-func 'bookmark-default-annotation-text
|
||||
"Function to return default text to use for a bookmark annotation.
|
||||
It takes one argument, the name of the bookmark, as a string.")
|
||||
|
@ -1143,17 +1141,6 @@ DISPLAY-FUNC would be `switch-to-buffer-other-window'."
|
|||
(let ((pop-up-frames t))
|
||||
(bookmark-jump-other-window bookmark)))
|
||||
|
||||
(defun bookmark-jump-noselect (bookmark)
|
||||
"Return the location pointed to by BOOKMARK (see `bookmark-jump').
|
||||
The return value has the form (BUFFER . POINT).
|
||||
|
||||
Note: this function is deprecated and is present for Emacs 22
|
||||
compatibility only."
|
||||
(declare (obsolete bookmark-handle-bookmark "23.1"))
|
||||
(save-excursion
|
||||
(bookmark-handle-bookmark bookmark)
|
||||
(cons (current-buffer) (point))))
|
||||
|
||||
(defun bookmark-handle-bookmark (bookmark-name-or-record)
|
||||
"Call BOOKMARK-NAME-OR-RECORD's handler or `bookmark-default-handler'
|
||||
if it has none. This changes current buffer and point and returns nil,
|
||||
|
|
|
@ -229,9 +229,6 @@ commands.")
|
|||
map)
|
||||
"Local keymap for `Buffer-menu-mode' buffers.")
|
||||
|
||||
(define-obsolete-variable-alias 'buffer-menu-mode-hook
|
||||
'Buffer-menu-mode-hook "23.1")
|
||||
|
||||
(define-derived-mode Buffer-menu-mode tabulated-list-mode "Buffer Menu"
|
||||
"Major mode for Buffer Menu buffers.
|
||||
The Buffer Menu is invoked by the commands \\[list-buffers],
|
||||
|
|
|
@ -32,29 +32,15 @@
|
|||
|
||||
(declare-function inversion-check-version "inversion")
|
||||
|
||||
(if (fboundp 'locate-file)
|
||||
(defsubst ede--find-executable (exec)
|
||||
"Return an expanded file name for a program EXEC on the exec path."
|
||||
(locate-file exec exec-path))
|
||||
|
||||
;; Else, older version of Emacs.
|
||||
|
||||
(defsubst ede--find-executable (exec)
|
||||
"Return an expanded file name for a program EXEC on the exec path."
|
||||
(let ((p exec-path)
|
||||
(found nil))
|
||||
(while (and p (not found))
|
||||
(let ((f (expand-file-name exec (car p))))
|
||||
(if (file-exists-p f)
|
||||
(setq found f)))
|
||||
(setq p (cdr p)))
|
||||
found))
|
||||
)
|
||||
(defsubst ede--find-executable (exec)
|
||||
"Return an expanded file name for a program EXEC on the exec path."
|
||||
(declare (obsolete locate-file "28.1"))
|
||||
(locate-file exec exec-path))
|
||||
|
||||
(defvar ede-make-min-version "3.0"
|
||||
"Minimum version of GNU make required.")
|
||||
|
||||
(defcustom ede-make-command (cond ((ede--find-executable "gmake")
|
||||
(defcustom ede-make-command (cond ((executable-find "gmake")
|
||||
"gmake")
|
||||
(t "make")) ;; What to do?
|
||||
"The MAKE command to use for EDE when compiling.
|
||||
|
|
|
@ -46,27 +46,10 @@
|
|||
(declare-function c-forward-conditional "cc-cmds")
|
||||
(declare-function ede-system-include-path "ede")
|
||||
|
||||
;;; Compatibility
|
||||
;;
|
||||
(eval-when-compile (require 'cc-mode))
|
||||
|
||||
(if (fboundp 'c-end-of-macro)
|
||||
(eval-and-compile
|
||||
(defalias 'semantic-c-end-of-macro 'c-end-of-macro))
|
||||
;; From cc-mode 5.30
|
||||
(defun semantic-c-end-of-macro ()
|
||||
"Go to the end of a preprocessor directive.
|
||||
More accurately, move point to the end of the closest following line
|
||||
that doesn't end with a line continuation backslash.
|
||||
|
||||
This function does not do any hidden buffer changes."
|
||||
(while (progn
|
||||
(end-of-line)
|
||||
(when (and (eq (char-before) ?\\)
|
||||
(not (eobp)))
|
||||
(forward-char)
|
||||
t))))
|
||||
)
|
||||
(define-obsolete-function-alias 'semantic-c-end-of-macro
|
||||
#'c-end-of-macro "28.1")
|
||||
|
||||
;;; Code:
|
||||
(with-suppressed-warnings ((obsolete define-child-mode))
|
||||
|
@ -266,7 +249,7 @@ Return the defined symbol as a special spp lex token."
|
|||
(semantic-lex-analyzer #'semantic-cpp-lexer)
|
||||
(raw-stream
|
||||
(semantic-lex-spp-stream-for-macro (save-excursion
|
||||
(semantic-c-end-of-macro)
|
||||
(c-end-of-macro)
|
||||
;; HACK - If there's a C comment after
|
||||
;; the macro, do not parse it.
|
||||
(if (looking-back "/\\*.*" beginning-of-define)
|
||||
|
@ -590,7 +573,7 @@ case, we must skip it since it is the ELSE part."
|
|||
(define-lex-regex-analyzer semantic-lex-c-macrobits
|
||||
"Ignore various forms of #if/#else/#endif conditionals."
|
||||
"^\\s-*#\\s-*\\(if\\(n?def\\)?\\|endif\\|elif\\|else\\)"
|
||||
(semantic-c-end-of-macro)
|
||||
(c-end-of-macro)
|
||||
(setq semantic-lex-end-point (point))
|
||||
nil)
|
||||
|
||||
|
|
|
@ -183,16 +183,8 @@ macro `defcustom-mode-local-semantic-dependency-system-include-path'."
|
|||
;;
|
||||
;; methods for finding files on a provided path.
|
||||
(defmacro semantic--dependency-find-file-on-path (file path)
|
||||
(if (fboundp 'locate-file)
|
||||
`(locate-file ,file ,path)
|
||||
`(let ((p ,path)
|
||||
(found nil))
|
||||
(while (and p (not found))
|
||||
(let ((f (expand-file-name ,file (car p))))
|
||||
(if (file-exists-p f)
|
||||
(setq found f)))
|
||||
(setq p (cdr p)))
|
||||
found)))
|
||||
(declare (obsolete locate-file "28.1"))
|
||||
`(locate-file ,file ,path))
|
||||
|
||||
(defvar ede-minor-mode)
|
||||
(defvar ede-object)
|
||||
|
@ -216,11 +208,11 @@ provided mode, not from the current major mode."
|
|||
(when (file-exists-p file)
|
||||
(setq found file))
|
||||
(when (and (not found) (not systemp))
|
||||
(setq found (semantic--dependency-find-file-on-path file locp)))
|
||||
(setq found (locate-file file locp)))
|
||||
(when (and (not found) edesys)
|
||||
(setq found (semantic--dependency-find-file-on-path file edesys)))
|
||||
(setq found (locate-file file edesys)))
|
||||
(when (not found)
|
||||
(setq found (semantic--dependency-find-file-on-path file sysp)))
|
||||
(setq found (locate-file file sysp)))
|
||||
(if found (expand-file-name found))))
|
||||
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
(require 'semantic)
|
||||
(require 'semantic/lex)
|
||||
|
||||
(declare-function semantic-c-end-of-macro "semantic/bovine/c")
|
||||
(declare-function c-end-of-macro "cc-engine")
|
||||
|
||||
;;; Code:
|
||||
(defvar semantic-lex-spp-macro-symbol-obarray nil
|
||||
|
@ -946,7 +946,7 @@ by another macro."
|
|||
(save-excursion
|
||||
(let ((start (match-beginning 0))
|
||||
(end (match-end 0))
|
||||
(peom (save-excursion (semantic-c-end-of-macro) (point))))
|
||||
(peom (save-excursion (c-end-of-macro) (point))))
|
||||
(condition-case nil
|
||||
(progn
|
||||
;; This will throw an error if no closing paren can be found.
|
||||
|
|
|
@ -223,6 +223,13 @@ This variable is buffer-local."
|
|||
(other :tag "on" t))
|
||||
:group 'comint)
|
||||
|
||||
(defcustom comint-highlight-input t
|
||||
"If non-nil, highlight input with `comint-highlight-input' face.
|
||||
Otherwise keep the original highlighting untouched."
|
||||
:version "28.1"
|
||||
:type 'boolean
|
||||
:group 'comint)
|
||||
|
||||
(defface comint-highlight-input '((t (:weight bold)))
|
||||
"Face to use to highlight user input."
|
||||
:group 'comint)
|
||||
|
@ -1897,9 +1904,10 @@ Similarly for Soar, Scheme, etc."
|
|||
(end (if no-newline (point) (1- (point)))))
|
||||
(with-silent-modifications
|
||||
(when (> end beg)
|
||||
(add-text-properties beg end
|
||||
'(front-sticky t
|
||||
font-lock-face comint-highlight-input))
|
||||
(when comint-highlight-input
|
||||
(add-text-properties beg end
|
||||
'( font-lock-face comint-highlight-input
|
||||
front-sticky t )))
|
||||
(unless comint-use-prompt-regexp
|
||||
;; Give old user input a field property of `input', to
|
||||
;; distinguish it from both process output and unsent
|
||||
|
@ -3852,7 +3860,7 @@ REGEXP-GROUP is the regular expression group in REGEXP to use."
|
|||
(set-buffer output-buffer)
|
||||
(goto-char (point-min))
|
||||
;; Skip past the command, if it was echoed
|
||||
(and (looking-at command)
|
||||
(and (looking-at (regexp-quote command))
|
||||
(forward-line))
|
||||
(while (and (not (eobp))
|
||||
(re-search-forward regexp nil t))
|
||||
|
|
|
@ -801,16 +801,19 @@ has been executed, nil otherwise."
|
|||
If a setting was edited and set before, this saves it. If a
|
||||
setting was merely edited before, this sets it then saves it."
|
||||
(interactive)
|
||||
(when (custom-command-apply
|
||||
(lambda (child)
|
||||
(when (memq (widget-get child :custom-state)
|
||||
'(modified set changed rogue))
|
||||
(widget-apply child :custom-mark-to-save)))
|
||||
"Save all settings in this buffer? " t)
|
||||
;; Save changes to buffer and redraw.
|
||||
(custom-save-all)
|
||||
(dolist (child custom-options)
|
||||
(widget-apply child :custom-state-set-and-redraw))))
|
||||
(let (edited-widgets)
|
||||
(when (custom-command-apply
|
||||
(lambda (child)
|
||||
(when (memq (widget-get child :custom-state)
|
||||
'(modified set changed rogue))
|
||||
(push child edited-widgets)
|
||||
(widget-apply child :custom-mark-to-save)))
|
||||
"Save all settings in this buffer? " t)
|
||||
;; Save changes to buffer.
|
||||
(custom-save-all)
|
||||
;; Redraw and recalculate the state when necessary.
|
||||
(dolist (widget edited-widgets)
|
||||
(widget-apply widget :custom-state-set-and-redraw)))))
|
||||
|
||||
(defun custom-reset (_widget &optional event)
|
||||
"Select item from reset menu."
|
||||
|
@ -4868,8 +4871,6 @@ If several parents are listed, go to the first of them."
|
|||
(parent (downcase (widget-get button :tag))))
|
||||
(customize-group parent)))))
|
||||
|
||||
(define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1")
|
||||
|
||||
(defcustom Custom-mode-hook nil
|
||||
"Hook called when entering Custom mode."
|
||||
:type 'hook
|
||||
|
@ -4940,8 +4941,6 @@ if that value is non-nil."
|
|||
|
||||
(put 'Custom-mode 'mode-class 'special)
|
||||
|
||||
(define-obsolete-function-alias 'custom-mode 'Custom-mode "23.1")
|
||||
|
||||
;;; The End.
|
||||
|
||||
(provide 'cus-edit)
|
||||
|
|
|
@ -141,8 +141,7 @@ otherwise."
|
|||
(wid-field (get-char-property pos 'field))
|
||||
(wid-button (get-char-property pos 'button))
|
||||
(wid-doc (get-char-property pos 'widget-doc))
|
||||
;; If button.el is not loaded, we have no buttons in the text.
|
||||
(button (and (fboundp 'button-at) (button-at pos)))
|
||||
(button (button-at pos))
|
||||
(button-type (and button (button-type button)))
|
||||
(button-label (and button (button-label button)))
|
||||
(widget (or wid-field wid-button wid-doc)))
|
||||
|
|
|
@ -1037,7 +1037,7 @@ file.
|
|||
|
||||
To upgrade a version 206 file to version 208, call this command
|
||||
explicitly with a prefix argument: \\[universal-argument] \\[desktop-save].
|
||||
If you are upgrading from Emacs 24 or older, we recommed to do
|
||||
If you are upgrading from Emacs 24 or older, we recommend to do
|
||||
this once you decide you no longer need compatibility with versions
|
||||
of Emacs before 25.1.
|
||||
|
||||
|
|
|
@ -196,9 +196,6 @@ directory."
|
|||
(remove-hook 'comint-preoutput-filter-functions 'dirtrack t)))
|
||||
|
||||
|
||||
(define-obsolete-function-alias 'dirtrack-debug-toggle 'dirtrack-debug-mode
|
||||
"23.1")
|
||||
(define-obsolete-variable-alias 'dirtrack-debug 'dirtrack-debug-mode "23.1")
|
||||
(define-minor-mode dirtrack-debug-mode
|
||||
"Toggle Dirtrack debugging."
|
||||
nil nil nil
|
||||
|
|
|
@ -435,6 +435,9 @@ Typically \"page-%s.png\".")
|
|||
(define-key map (kbd "c m") 'doc-view-set-slice-using-mouse)
|
||||
(define-key map (kbd "c b") 'doc-view-set-slice-from-bounding-box)
|
||||
(define-key map (kbd "c r") 'doc-view-reset-slice)
|
||||
;; Centering the image
|
||||
(define-key map (kbd "c h") 'doc-view-center-page-horizontally)
|
||||
(define-key map (kbd "c v") 'doc-view-center-page-vertically)
|
||||
;; Searching
|
||||
(define-key map (kbd "C-s") 'doc-view-search)
|
||||
(define-key map (kbd "<find>") 'doc-view-search)
|
||||
|
@ -740,8 +743,7 @@ It's a subdirectory of `doc-view-cache-directory'."
|
|||
Document types are symbols like `dvi', `ps', `pdf', or `odf' (any
|
||||
OpenDocument format)."
|
||||
(and (display-graphic-p)
|
||||
(or (image-type-available-p 'imagemagick)
|
||||
(image-type-available-p 'png))
|
||||
(image-type-available-p 'png)
|
||||
(cond
|
||||
((eq type 'dvi)
|
||||
(and (doc-view-mode-p 'pdf)
|
||||
|
@ -769,10 +771,7 @@ OpenDocument format)."
|
|||
(defun doc-view-enlarge (factor)
|
||||
"Enlarge the document by FACTOR."
|
||||
(interactive (list doc-view-shrink-factor))
|
||||
(if (and doc-view-scale-internally
|
||||
(eq (plist-get (cdr (doc-view-current-image)) :type)
|
||||
'imagemagick))
|
||||
;; ImageMagick supports on-the-fly-rescaling.
|
||||
(if doc-view-scale-internally
|
||||
(let ((new (ceiling (* factor doc-view-image-width))))
|
||||
(unless (equal new doc-view-image-width)
|
||||
(setq-local doc-view-image-width new)
|
||||
|
@ -792,9 +791,7 @@ OpenDocument format)."
|
|||
(defun doc-view-scale-reset ()
|
||||
"Reset the document size/zoom level to the initial one."
|
||||
(interactive)
|
||||
(if (and doc-view-scale-internally
|
||||
(eq (plist-get (cdr (doc-view-current-image)) :type)
|
||||
'imagemagick))
|
||||
(if doc-view-scale-internally
|
||||
(progn
|
||||
(kill-local-variable 'doc-view-image-width)
|
||||
(doc-view-insert-image
|
||||
|
@ -927,6 +924,32 @@ Resize the containing frame if needed."
|
|||
(when new-frame-params
|
||||
(modify-frame-parameters (selected-frame) new-frame-params))))
|
||||
|
||||
(defun doc-view-center-page-horizontally ()
|
||||
"Center page horizontally when page is wider than window."
|
||||
(interactive)
|
||||
(let ((page-width (car (image-size (doc-view-current-image) 'pixel)))
|
||||
(window-width (window-body-width nil 'pixel))
|
||||
;; How much do we scroll in order to center the page?
|
||||
(pixel-hscroll 0)
|
||||
;; How many pixels are there in a column?
|
||||
(col-in-pixel (/ (window-body-width nil 'pixel)
|
||||
(window-body-width nil))))
|
||||
(when (> page-width window-width)
|
||||
(setq pixel-hscroll (/ (- page-width window-width) 2))
|
||||
(set-window-hscroll (selected-window)
|
||||
(/ pixel-hscroll col-in-pixel)))))
|
||||
|
||||
(defun doc-view-center-page-vertically ()
|
||||
"Center page vertically when page is wider than window."
|
||||
(interactive)
|
||||
(let ((page-height (cdr (image-size (doc-view-current-image) 'pixel)))
|
||||
(window-height (window-body-height nil 'pixel))
|
||||
;; How much do we scroll in order to center the page?
|
||||
(pixel-scroll 0))
|
||||
(when (> page-height window-height)
|
||||
(setq pixel-scroll (/ (- page-height window-height) 2))
|
||||
(set-window-vscroll (selected-window) pixel-scroll 'pixel))))
|
||||
|
||||
(defun doc-view-reconvert-doc ()
|
||||
"Reconvert the current document.
|
||||
Should be invoked when the cached images aren't up-to-date."
|
||||
|
@ -1393,12 +1416,11 @@ ARGS is a list of image descriptors."
|
|||
;; Only insert the image if the buffer is visible.
|
||||
(when (window-live-p (overlay-get ol 'window))
|
||||
(let* ((image (if (and file (file-readable-p file))
|
||||
(if (not (and doc-view-scale-internally
|
||||
(fboundp 'imagemagick-types)))
|
||||
(if (not doc-view-scale-internally)
|
||||
(apply #'create-image file doc-view--image-type nil args)
|
||||
(unless (member :width args)
|
||||
(setq args `(,@args :width ,doc-view-image-width)))
|
||||
(apply #'create-image file 'imagemagick nil args))))
|
||||
(apply #'create-image file doc-view--image-type nil args))))
|
||||
(slice (doc-view-current-slice))
|
||||
(img-width (and image (car (image-size image))))
|
||||
(displayed-img-width (if (and image slice)
|
||||
|
|
|
@ -105,9 +105,7 @@ Useful if new Emacs is used on B&W display.")
|
|||
(car cl)
|
||||
"white"))
|
||||
(set-face-foreground nf "black")
|
||||
(if (and chart-face-use-pixmaps
|
||||
pl
|
||||
(fboundp 'set-face-background-pixmap))
|
||||
(if (and chart-face-use-pixmaps pl)
|
||||
(condition-case nil
|
||||
(set-face-background-pixmap nf (car pl))
|
||||
(error (message "Cannot set background pixmap %s" (car pl)))))
|
||||
|
|
|
@ -270,12 +270,6 @@ with empty strings removed."
|
|||
(remove-hook 'choose-completion-string-functions
|
||||
'crm--choose-completion-string)))
|
||||
|
||||
(define-obsolete-function-alias 'crm-minibuffer-complete 'crm-complete "23.1")
|
||||
(define-obsolete-function-alias
|
||||
'crm-minibuffer-completion-help 'crm-completion-help "23.1")
|
||||
(define-obsolete-function-alias
|
||||
'crm-minibuffer-complete-and-exit 'crm-complete-and-exit "23.1")
|
||||
|
||||
;; testing and debugging
|
||||
;; (defun crm-init-test-environ ()
|
||||
;; "Set up some variables for testing."
|
||||
|
|
|
@ -364,6 +364,7 @@ which more-or-less shadow%s %s's corresponding table%s."
|
|||
|
||||
(defsubst derived-mode-setup-function-name (mode)
|
||||
"Construct a setup-function name based on a MODE name."
|
||||
(declare (obsolete nil "28.1"))
|
||||
(intern (concat (symbol-name mode) "-setup")))
|
||||
|
||||
|
||||
|
|
|
@ -29,16 +29,6 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(defvar easy-menu-precalculate-equivalent-keybindings nil
|
||||
"Determine when equivalent key bindings are computed for easy-menu menus.
|
||||
It can take some time to calculate the equivalent key bindings that are shown
|
||||
in a menu. If the variable is on, then this calculation gives a (maybe
|
||||
noticeable) delay when a mode is first entered. If the variable is off, then
|
||||
this delay will come when a menu is displayed the first time. If you never use
|
||||
menus, turn this variable off, otherwise it is probably better to keep it on.")
|
||||
(make-obsolete-variable
|
||||
'easy-menu-precalculate-equivalent-keybindings nil "23.1")
|
||||
|
||||
(defsubst easy-menu-intern (s)
|
||||
(if (stringp s) (intern s) s))
|
||||
|
||||
|
|
|
@ -515,7 +515,14 @@ Returns nil if they are."
|
|||
`(cdr ,cdr-x)
|
||||
(cl-assert (equal a b) t)
|
||||
nil))))))))
|
||||
((pred arrayp)
|
||||
((pred cl-struct-p)
|
||||
(cl-loop for slot in (cl-struct-slot-info (type-of a))
|
||||
for ai across a
|
||||
for bi across b
|
||||
for xf = (ert--explain-equal-rec ai bi)
|
||||
do (when xf (cl-return `(struct-field ,(car slot) ,xf)))
|
||||
finally (cl-assert (equal a b) t)))
|
||||
((or (pred arrayp) (pred recordp))
|
||||
;; For mixed unibyte/multibyte string comparisons, make both multibyte.
|
||||
(when (and (stringp a)
|
||||
(xor (multibyte-string-p a) (multibyte-string-p b)))
|
||||
|
|
|
@ -296,12 +296,13 @@ if non-nil)."
|
|||
(find-library-suffixes)
|
||||
"\\|"))
|
||||
(table (cl-loop for dir in (or find-function-source-path load-path)
|
||||
when (file-readable-p dir)
|
||||
for dir-or-default = (or dir default-directory)
|
||||
when (file-readable-p dir-or-default)
|
||||
append (mapcar
|
||||
(lambda (file)
|
||||
(replace-regexp-in-string suffix-regexp
|
||||
"" file))
|
||||
(directory-files dir nil
|
||||
(directory-files dir-or-default nil
|
||||
suffix-regexp))))
|
||||
(def (if (eq (function-called-at-point) 'require)
|
||||
;; `function-called-at-point' may return 'require
|
||||
|
|
|
@ -200,7 +200,9 @@
|
|||
(save-excursion
|
||||
(ignore-errors
|
||||
(goto-char pos)
|
||||
(or (eql (char-before) ?\')
|
||||
;; '(lambda ..) is not a funcall position, but #'(lambda ...) is.
|
||||
(or (and (eql (char-before) ?\')
|
||||
(not (eql (char-before (1- (point))) ?#)))
|
||||
(let* ((ppss (syntax-ppss))
|
||||
(paren-posns (nth 9 ppss))
|
||||
(parent
|
||||
|
@ -785,8 +787,6 @@ or to switch back to an existing one."
|
|||
nil)))
|
||||
(comment-indent-default)))
|
||||
|
||||
(define-obsolete-function-alias 'lisp-mode-auto-fill 'do-auto-fill "23.1")
|
||||
|
||||
(defcustom lisp-indent-offset nil
|
||||
"If non-nil, indent second line of expressions that many more columns."
|
||||
:group 'lisp
|
||||
|
|
|
@ -255,9 +255,9 @@ Left-fold the list L, starting with X, by the binary function F."
|
|||
x)
|
||||
|
||||
(defun rx--normalise-or-arg (form)
|
||||
"Normalise the `or' argument FORM.
|
||||
"Normalize the `or' argument FORM.
|
||||
Characters become strings, user-definitions and `eval' forms are expanded,
|
||||
and `or' forms are normalised recursively."
|
||||
and `or' forms are normalized recursively."
|
||||
(cond ((characterp form)
|
||||
(char-to-string form))
|
||||
((and (consp form) (memq (car form) '(or |)))
|
||||
|
|
|
@ -694,7 +694,7 @@
|
|||
ARG is used as the prefix value for the executed command. If
|
||||
EVENTS is a list of events, which become the beginning of the command."
|
||||
(interactive "P")
|
||||
(if (viper= (viper-last-command-char) ?\\)
|
||||
(if (viper= last-command-event ?\\)
|
||||
(message "Switched to EMACS state for the next command..."))
|
||||
(viper-escape-to-state arg events 'emacs-state))
|
||||
|
||||
|
@ -1149,7 +1149,7 @@ as a Meta key and any number of multiple escapes are allowed."
|
|||
"Begin numeric argument for the next command."
|
||||
(interactive "P")
|
||||
(viper-prefix-arg-value
|
||||
(viper-last-command-char) (if (consp arg) (cdr arg) nil)))
|
||||
last-command-event (if (consp arg) (cdr arg) nil)))
|
||||
|
||||
(defun viper-command-argument (arg)
|
||||
"Accept a motion command as an argument."
|
||||
|
@ -1157,7 +1157,7 @@ as a Meta key and any number of multiple escapes are allowed."
|
|||
(let ((viper-intermediate-command 'viper-command-argument))
|
||||
(condition-case nil
|
||||
(viper-prefix-arg-com
|
||||
(viper-last-command-char)
|
||||
last-command-event
|
||||
(cond ((null arg) nil)
|
||||
((consp arg) (car arg))
|
||||
((integerp arg) arg)
|
||||
|
@ -1564,7 +1564,7 @@ invokes the command before that, etc."
|
|||
|
||||
;; Hook used in viper-undo
|
||||
(defun viper-after-change-undo-hook (beg end _len)
|
||||
(if (and (boundp 'undo-in-progress) undo-in-progress)
|
||||
(if undo-in-progress
|
||||
(setq undo-beg-posn beg
|
||||
undo-end-posn (or end beg))
|
||||
;; some other hooks may be changing various text properties in
|
||||
|
@ -1598,9 +1598,9 @@ invokes the command before that, etc."
|
|||
(pos-visible-in-window-p before-undo-pt))
|
||||
(progn
|
||||
(push-mark (point-marker) t)
|
||||
(viper-sit-for-short 300)
|
||||
(sit-for 0.3)
|
||||
(goto-char undo-end-posn)
|
||||
(viper-sit-for-short 300)
|
||||
(sit-for 0.3)
|
||||
(if (pos-visible-in-window-p undo-beg-posn)
|
||||
(goto-char before-undo-pt)
|
||||
(goto-char undo-beg-posn)))
|
||||
|
@ -1886,15 +1886,11 @@ Undo previous insertion and inserts new."
|
|||
(or unread-command-events
|
||||
executing-kbd-macro
|
||||
(sit-for 840))
|
||||
(if (fboundp 'minibuffer-prompt-end)
|
||||
(delete-region (minibuffer-prompt-end) (point-max))
|
||||
(erase-buffer))
|
||||
(delete-region (minibuffer-prompt-end) (point-max))
|
||||
(insert viper-initial)))
|
||||
|
||||
(defsubst viper-minibuffer-real-start ()
|
||||
(if (fboundp 'minibuffer-prompt-end)
|
||||
(minibuffer-prompt-end)
|
||||
(point-min)))
|
||||
(minibuffer-prompt-end))
|
||||
|
||||
(defun viper-minibuffer-post-command-hook()
|
||||
(when (active-minibuffer-window)
|
||||
|
@ -1908,7 +1904,7 @@ Undo previous insertion and inserts new."
|
|||
"Exit minibuffer Viper way."
|
||||
(interactive)
|
||||
(let (command)
|
||||
(setq command (local-key-binding (char-to-string (viper-last-command-char))))
|
||||
(setq command (local-key-binding (char-to-string last-command-event)))
|
||||
(run-hooks 'viper-minibuffer-exit-hook)
|
||||
(if command
|
||||
(command-execute command)
|
||||
|
@ -2883,7 +2879,7 @@ If point is on a widget or a button, simulate clicking on that widget/button."
|
|||
(and (consp widget)
|
||||
(get (widget-type widget) 'widget-type))))
|
||||
(widget-button-press (point))
|
||||
(if (and (fboundp 'button-at) (fboundp 'push-button) (button-at (point)))
|
||||
(if (button-at (point))
|
||||
(push-button)
|
||||
;; not a widget or a button
|
||||
(save-excursion
|
||||
|
@ -4738,8 +4734,7 @@ Please, specify your level now: "))
|
|||
(viper-color-display-p (if (viper-window-display-p)
|
||||
(viper-color-display-p)
|
||||
'non-x))
|
||||
(viper-frame-parameters (if (fboundp 'frame-parameters)
|
||||
(frame-parameters (selected-frame))))
|
||||
(viper-frame-parameters (frame-parameters (selected-frame)))
|
||||
(viper-minibuffer-emacs-face (if (viper-has-face-support-p)
|
||||
(facep
|
||||
viper-minibuffer-emacs-face)
|
||||
|
|
|
@ -98,7 +98,7 @@ considered related."
|
|||
;;; Code
|
||||
|
||||
(defsubst viper-multiclick-p ()
|
||||
(not (viper-sit-for-short viper-multiclick-timeout t)))
|
||||
(not (sit-for (/ viper-multiclick-timeout 1000.0) t)))
|
||||
|
||||
;; Returns window where click occurs
|
||||
(defun viper-mouse-click-window (click)
|
||||
|
|
|
@ -786,14 +786,11 @@ Otherwise return the normal value."
|
|||
(defun viper-check-minibuffer-overlay ()
|
||||
(if (overlayp viper-minibuffer-overlay)
|
||||
(move-overlay
|
||||
viper-minibuffer-overlay
|
||||
(if (fboundp 'minibuffer-prompt-end) (minibuffer-prompt-end) 1)
|
||||
(1+ (buffer-size)))
|
||||
viper-minibuffer-overlay (minibuffer-prompt-end) (1+ (buffer-size)))
|
||||
(setq viper-minibuffer-overlay
|
||||
;; make overlay open-ended
|
||||
(make-overlay
|
||||
(if (fboundp 'minibuffer-prompt-end) (minibuffer-prompt-end) 1)
|
||||
(1+ (buffer-size))
|
||||
(minibuffer-prompt-end) (1+ (buffer-size))
|
||||
(current-buffer) nil 'rear-advance))))
|
||||
|
||||
|
||||
|
@ -808,9 +805,8 @@ Otherwise return the normal value."
|
|||
(define-obsolete-function-alias 'viper-abbreviate-file-name
|
||||
'abbreviate-file-name "27.1")
|
||||
|
||||
;; Sit for VAL milliseconds. XEmacs doesn't support the millisecond arg
|
||||
;; in sit-for, so this function smooths out the differences.
|
||||
(defsubst viper-sit-for-short (val &optional nodisp)
|
||||
(declare (obsolete nil "28.1"))
|
||||
(sit-for (/ val 1000.0) nodisp))
|
||||
|
||||
;; EVENT may be a single event of a sequence of events
|
||||
|
@ -868,11 +864,10 @@ Otherwise return the normal value."
|
|||
|
||||
;; Uses different timeouts for ESC-sequences and others
|
||||
(defun viper-fast-keysequence-p ()
|
||||
(not (viper-sit-for-short
|
||||
(if (viper-ESC-event-p last-input-event)
|
||||
(viper-ESC-keyseq-timeout)
|
||||
viper-fast-keyseq-timeout)
|
||||
t)))
|
||||
(not (sit-for (/ (if (viper-ESC-event-p last-input-event)
|
||||
(viper-ESC-keyseq-timeout)
|
||||
viper-fast-keyseq-timeout) 1000.0)
|
||||
t)))
|
||||
|
||||
(define-obsolete-function-alias 'viper-read-event-convert-to-char
|
||||
'read-event "27.1")
|
||||
|
@ -920,6 +915,7 @@ Otherwise return the normal value."
|
|||
basis)))
|
||||
|
||||
(defun viper-last-command-char ()
|
||||
(declare (obsolete nil "28.1"))
|
||||
last-command-event)
|
||||
|
||||
(defun viper-key-to-emacs-key (key)
|
||||
|
|
|
@ -666,10 +666,6 @@ If SECRET is non-nil, list secret keys instead of public keys."
|
|||
(goto-char (point-min)))
|
||||
(display-buffer buffer)))))
|
||||
|
||||
(defun epa-display-verify-result (verify-result)
|
||||
(declare (obsolete epa-display-info "23.1"))
|
||||
(epa-display-info (epg-verify-result-to-string verify-result)))
|
||||
|
||||
(defun epa-passphrase-callback-function (context key-id handback)
|
||||
(if (eq key-id 'SYM)
|
||||
(read-passwd
|
||||
|
|
16
lisp/epg.el
16
lisp/epg.el
|
@ -190,6 +190,7 @@
|
|||
(string nil :read-only t))
|
||||
|
||||
;;;; Context Struct
|
||||
(declare-function epa-passphrase-callback-function "epa.el")
|
||||
|
||||
(cl-defstruct (epg-context
|
||||
(:constructor nil)
|
||||
|
@ -215,7 +216,7 @@
|
|||
cipher-algorithm
|
||||
digest-algorithm
|
||||
compress-algorithm
|
||||
(passphrase-callback (list #'epg-passphrase-callback-function))
|
||||
(passphrase-callback (list #'epa-passphrase-callback-function))
|
||||
progress-callback
|
||||
edit-callback
|
||||
signers
|
||||
|
@ -1246,19 +1247,6 @@ callback data (if any)."
|
|||
|
||||
;;; Functions
|
||||
|
||||
(defun epg-passphrase-callback-function (context key-id _handback)
|
||||
(declare (obsolete epa-passphrase-callback-function "23.1"))
|
||||
(if (eq key-id 'SYM)
|
||||
(read-passwd "Passphrase for symmetric encryption: "
|
||||
(eq (epg-context-operation context) 'encrypt))
|
||||
(read-passwd
|
||||
(if (eq key-id 'PIN)
|
||||
"Passphrase for PIN: "
|
||||
(let ((entry (assoc key-id epg-user-id-alist)))
|
||||
(if entry
|
||||
(format "Passphrase for %s %s: " key-id (cdr entry))
|
||||
(format "Passphrase for %s: " key-id)))))))
|
||||
|
||||
(defun epg--list-keys-1 (context name mode)
|
||||
(let ((args (append (if (epg-context-home-directory context)
|
||||
(list "--homedir"
|
||||
|
|
|
@ -98,7 +98,6 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'erc-compat)
|
||||
(eval-when-compile (require 'cl-lib))
|
||||
;; There's a fairly strong mutual dependency between erc.el and erc-backend.el.
|
||||
;; Luckily, erc.el does not need erc-backend.el for macroexpansion whereas the
|
||||
|
@ -782,7 +781,7 @@ value of `erc-server-coding-system'."
|
|||
(pop precedence))
|
||||
(when precedence
|
||||
(setq coding (car precedence)))))
|
||||
(erc-decode-coding-string str coding)))
|
||||
(decode-coding-string str coding t)))
|
||||
|
||||
;; proposed name, not used by anything yet
|
||||
(defun erc-send-line (text display-fn)
|
||||
|
|
|
@ -419,7 +419,7 @@ where FOO is one of CLOSE, GET, SEND, LIST, CHAT, etc."
|
|||
(pcomplete-here
|
||||
(pcase (intern (downcase (pcomplete-arg 1)))
|
||||
('chat (mapcar (lambda (elt) (plist-get elt :nick))
|
||||
(erc-remove-if-not
|
||||
(cl-remove-if-not
|
||||
#'(lambda (elt)
|
||||
(eq (plist-get elt :type) 'CHAT))
|
||||
erc-dcc-list)))
|
||||
|
@ -427,7 +427,7 @@ where FOO is one of CLOSE, GET, SEND, LIST, CHAT, etc."
|
|||
(mapcar (lambda (elt) (symbol-name (plist-get elt :type)))
|
||||
erc-dcc-list)))
|
||||
('get (mapcar #'erc-dcc-nick
|
||||
(erc-remove-if-not
|
||||
(cl-remove-if-not
|
||||
#'(lambda (elt)
|
||||
(eq (plist-get elt :type) 'GET))
|
||||
erc-dcc-list)))
|
||||
|
@ -435,7 +435,7 @@ where FOO is one of CLOSE, GET, SEND, LIST, CHAT, etc."
|
|||
(pcomplete-here
|
||||
(pcase (intern (downcase (pcomplete-arg 2)))
|
||||
('get (mapcar (lambda (elt) (plist-get elt :file))
|
||||
(erc-remove-if-not
|
||||
(cl-remove-if-not
|
||||
#'(lambda (elt)
|
||||
(and (eq (plist-get elt :type) 'GET)
|
||||
(erc-nick-equal-p (erc-extract-nick
|
||||
|
@ -443,7 +443,7 @@ where FOO is one of CLOSE, GET, SEND, LIST, CHAT, etc."
|
|||
(pcomplete-arg 1))))
|
||||
erc-dcc-list)))
|
||||
('close (mapcar #'erc-dcc-nick
|
||||
(erc-remove-if-not
|
||||
(cl-remove-if-not
|
||||
#'(lambda (elt)
|
||||
(eq (plist-get elt :type)
|
||||
(intern (upcase (pcomplete-arg 1)))))
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
:group 'erc)
|
||||
|
||||
;;;###autoload(autoload 'erc-fill-mode "erc-fill" nil t)
|
||||
(erc-define-minor-mode erc-fill-mode
|
||||
(define-minor-mode erc-fill-mode
|
||||
"Toggle ERC fill mode.
|
||||
With a prefix argument ARG, enable ERC fill mode if ARG is
|
||||
positive, and disable it otherwise. If called from Lisp, enable
|
||||
|
|
|
@ -399,8 +399,7 @@ See `erc-interpret-controls-p' and `erc-interpret-mirc-color' for options."
|
|||
(start (match-beginning 0))
|
||||
(end (+ (match-beginning 0)
|
||||
(length (match-string 5 s)))))
|
||||
(setq s (erc-replace-match-subexpression-in-string
|
||||
"" s control 1 start))
|
||||
(setq s (replace-match "" nil nil s 1))
|
||||
(cond ((and erc-interpret-mirc-color (or fg-color bg-color))
|
||||
(setq fg fg-color)
|
||||
(setq bg bg-color))
|
||||
|
|
|
@ -267,7 +267,7 @@ The current buffer is given by BUFFER."
|
|||
(with-current-buffer buffer
|
||||
(auto-save-mode -1)
|
||||
(setq buffer-file-name nil)
|
||||
(erc-set-write-file-functions '(erc-save-buffer-in-logs))
|
||||
(set (make-local-variable 'write-file-functions) '(erc-save-buffer-in-logs))
|
||||
(when erc-log-insert-log-on-open
|
||||
(ignore-errors
|
||||
(save-excursion
|
||||
|
|
|
@ -94,7 +94,9 @@ The following values are allowed:
|
|||
`nick-or-keyword' - highlight the nick of the user who typed your nickname,
|
||||
or all instances of the current nickname if there was
|
||||
no sending user
|
||||
`all' - highlight the entire message where current nickname occurs
|
||||
`message' - highlight the entire message where current nickname occurs
|
||||
`all' - highlight the entire message (including the nick) where
|
||||
current nickname occurs
|
||||
|
||||
Any other value disables highlighting of current nickname altogether."
|
||||
:group 'erc-match
|
||||
|
@ -102,6 +104,7 @@ Any other value disables highlighting of current nickname altogether."
|
|||
(const nick)
|
||||
(const keyword)
|
||||
(const nick-or-keyword)
|
||||
(const message)
|
||||
(const all)))
|
||||
|
||||
(defcustom erc-pal-highlight-type 'nick
|
||||
|
@ -110,14 +113,17 @@ See `erc-pals'.
|
|||
|
||||
The following values are allowed:
|
||||
|
||||
nil - do not highlight the message at all
|
||||
`nick' - highlight pal's nickname only
|
||||
`all' - highlight the entire message from pal
|
||||
nil - do not highlight the message at all
|
||||
`nick' - highlight pal's nickname only
|
||||
`message' - highlight the entire message from pal
|
||||
`all' - highlight the entire message (including the nick)
|
||||
from pal
|
||||
|
||||
Any other value disables pal highlighting altogether."
|
||||
:group 'erc-match
|
||||
:type '(choice (const nil)
|
||||
(const nick)
|
||||
(const message)
|
||||
(const all)))
|
||||
|
||||
(defcustom erc-fool-highlight-type 'nick
|
||||
|
@ -126,14 +132,17 @@ See `erc-fools'.
|
|||
|
||||
The following values are allowed:
|
||||
|
||||
nil - do not highlight the message at all
|
||||
`nick' - highlight fool's nickname only
|
||||
`all' - highlight the entire message from fool
|
||||
nil - do not highlight the message at all
|
||||
`nick' - highlight fool's nickname only
|
||||
`message' - highlight the entire message from fool
|
||||
`all' - highlight the entire message (including the nick)
|
||||
from fool
|
||||
|
||||
Any other value disables fool highlighting altogether."
|
||||
:group 'erc-match
|
||||
:type '(choice (const nil)
|
||||
(const nick)
|
||||
(const message)
|
||||
(const all)))
|
||||
|
||||
(defcustom erc-keyword-highlight-type 'keyword
|
||||
|
@ -143,12 +152,15 @@ See variable `erc-keywords'.
|
|||
The following values are allowed:
|
||||
|
||||
`keyword' - highlight keyword only
|
||||
`all' - highlight the entire message containing keyword
|
||||
`message' - highlight the entire message containing keyword
|
||||
`all' - highlight the entire message (including the nick)
|
||||
containing keyword
|
||||
|
||||
Any other value disables keyword highlighting altogether."
|
||||
:group 'erc-match
|
||||
:type '(choice (const nil)
|
||||
(const keyword)
|
||||
(const message)
|
||||
(const all)))
|
||||
|
||||
(defcustom erc-dangerous-host-highlight-type 'nick
|
||||
|
@ -157,13 +169,16 @@ See `erc-dangerous-hosts'.
|
|||
|
||||
The following values are allowed:
|
||||
|
||||
`nick' - highlight nick from dangerous-host only
|
||||
`all' - highlight the entire message from dangerous-host
|
||||
`nick' - highlight nick from dangerous-host only
|
||||
`message' - highlight the entire message from dangerous-host
|
||||
`all' - highlight the entire message (including the nick)
|
||||
from dangerous-host
|
||||
|
||||
Any other value disables dangerous-host highlighting altogether."
|
||||
:group 'erc-match
|
||||
:type '(choice (const nil)
|
||||
(const nick)
|
||||
(const message)
|
||||
(const all)))
|
||||
|
||||
|
||||
|
@ -449,19 +464,18 @@ Use this defun with `erc-insert-modify-hook'."
|
|||
(match-beginning 0)))
|
||||
(nick-end (when nick-beg
|
||||
(match-end 0)))
|
||||
(message (buffer-substring
|
||||
(if (and nick-end
|
||||
(<= (+ 2 nick-end) (point-max)))
|
||||
;; Message starts 2 characters after the nick
|
||||
;; except for CTCP ACTION messages. Nick
|
||||
;; surrounded by angle brackets only in normal
|
||||
;; messages.
|
||||
(+ nick-end
|
||||
(if (eq ?> (char-after nick-end))
|
||||
2
|
||||
1))
|
||||
(point-min))
|
||||
(point-max))))
|
||||
(message-beg (if (and nick-end
|
||||
(<= (+ 2 nick-end) (point-max)))
|
||||
;; Message starts 2 characters after the
|
||||
;; nick except for CTCP ACTION messages.
|
||||
;; Nick surrounded by angle brackets only in
|
||||
;; normal messages.
|
||||
(+ nick-end
|
||||
(if (eq ?> (char-after nick-end))
|
||||
2
|
||||
1))
|
||||
(point-min)))
|
||||
(message (buffer-substring message-beg (point-max))))
|
||||
(when (and vector
|
||||
(not (and erc-match-exclude-server-buffer
|
||||
(erc-server-buffer-p))))
|
||||
|
@ -498,7 +512,12 @@ Use this defun with `erc-insert-modify-hook'."
|
|||
(while (re-search-forward match-regex nil t)
|
||||
(erc-put-text-property (match-beginning 0) (match-end 0)
|
||||
'font-lock-face match-face))))
|
||||
;; Highlight the whole message
|
||||
;; Highlight the whole message (not including the nick)
|
||||
((eq match-htype 'message)
|
||||
(erc-put-text-property
|
||||
message-beg (point-max)
|
||||
'font-lock-face match-face (current-buffer)))
|
||||
;; Highlight the whole message (including the nick)
|
||||
((eq match-htype 'all)
|
||||
(erc-put-text-property
|
||||
(point-min) (point-max)
|
||||
|
|
|
@ -181,7 +181,7 @@ nick from `erc-last-ison' to prevent any further notifications."
|
|||
(let ((nick (erc-extract-nick (erc-response.sender parsed))))
|
||||
(when (and (erc-member-ignore-case nick erc-notify-list)
|
||||
(erc-member-ignore-case nick erc-last-ison))
|
||||
(setq erc-last-ison (erc-delete-if
|
||||
(setq erc-last-ison (cl-delete-if
|
||||
(let ((nick-down (erc-downcase nick)))
|
||||
(lambda (el)
|
||||
(string= nick-down (erc-downcase el))))
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
|
||||
(require 'pcomplete)
|
||||
(require 'erc)
|
||||
(require 'erc-compat)
|
||||
(require 'time-date)
|
||||
|
||||
(defgroup erc-pcomplete nil
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
;;; Code:
|
||||
|
||||
(require 'erc)
|
||||
(require 'erc-compat)
|
||||
|
||||
(defgroup erc-stamp nil
|
||||
"For long conversation on IRC it is sometimes quite
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
(eval-when-compile (require 'cl-lib))
|
||||
(require 'erc)
|
||||
(require 'erc-compat)
|
||||
(require 'erc-match)
|
||||
|
||||
;;; Code:
|
||||
|
@ -329,9 +328,8 @@ important."
|
|||
|
||||
(defun erc-track-remove-from-mode-line ()
|
||||
"Remove `erc-track-modified-channels' from the mode-line."
|
||||
(when (boundp 'mode-line-modes)
|
||||
(setq mode-line-modes
|
||||
(remove '(t erc-modified-channels-object) mode-line-modes)))
|
||||
(setq mode-line-modes
|
||||
(remove '(t erc-modified-channels-object) mode-line-modes))
|
||||
(when (consp global-mode-string)
|
||||
(setq global-mode-string
|
||||
(delq 'erc-modified-channels-object global-mode-string))))
|
||||
|
@ -341,12 +339,10 @@ important."
|
|||
See `erc-track-position-in-mode-line' for possible values."
|
||||
;; CVS Emacs has a new format string, and global-mode-string
|
||||
;; is very far to the right.
|
||||
(cond ((and (eq position 'before-modes)
|
||||
(boundp 'mode-line-modes))
|
||||
(cond ((eq position 'before-modes)
|
||||
(add-to-list 'mode-line-modes
|
||||
'(t erc-modified-channels-object)))
|
||||
((and (eq position 'after-modes)
|
||||
(boundp 'mode-line-modes))
|
||||
((eq position 'after-modes)
|
||||
(add-to-list 'mode-line-modes
|
||||
'(t erc-modified-channels-object) t))
|
||||
((eq position t)
|
||||
|
|
|
@ -57,12 +57,12 @@
|
|||
|
||||
(load "erc-loaddefs" nil t)
|
||||
|
||||
(eval-when-compile (require 'cl-lib))
|
||||
(require 'cl-lib)
|
||||
(require 'font-lock)
|
||||
(require 'format-spec)
|
||||
(require 'pp)
|
||||
(require 'thingatpt)
|
||||
(require 'auth-source)
|
||||
(require 'erc-compat)
|
||||
(require 'time-date)
|
||||
(require 'iso8601)
|
||||
(eval-when-compile (require 'subr-x))
|
||||
|
@ -877,8 +877,8 @@ See `erc-server-flood-margin' for other flood-related parameters.")
|
|||
;; Script parameters
|
||||
|
||||
(defcustom erc-startup-file-list
|
||||
(list (concat erc-user-emacs-directory ".ercrc.el")
|
||||
(concat erc-user-emacs-directory ".ercrc")
|
||||
(list (concat user-emacs-directory ".ercrc.el")
|
||||
(concat user-emacs-directory ".ercrc")
|
||||
"~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc")
|
||||
"List of files to try for a startup script.
|
||||
The first existent and readable one will get executed.
|
||||
|
@ -1306,7 +1306,7 @@ Example:
|
|||
(enable (intern (format "erc-%s-enable" (downcase sn))))
|
||||
(disable (intern (format "erc-%s-disable" (downcase sn)))))
|
||||
`(progn
|
||||
(erc-define-minor-mode
|
||||
(define-minor-mode
|
||||
,mode
|
||||
,(format "Toggle ERC %S mode.
|
||||
With a prefix argument ARG, enable %s if ARG is positive,
|
||||
|
@ -1489,8 +1489,7 @@ Defaults to the server buffer."
|
|||
(define-derived-mode erc-mode fundamental-mode "ERC"
|
||||
"Major mode for Emacs IRC."
|
||||
(setq local-abbrev-table erc-mode-abbrev-table)
|
||||
(when (boundp 'next-line-add-newlines)
|
||||
(set (make-local-variable 'next-line-add-newlines) nil))
|
||||
(set (make-local-variable 'next-line-add-newlines) nil)
|
||||
(setq line-move-ignore-invisible t)
|
||||
(set (make-local-variable 'paragraph-separate)
|
||||
(concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)"))
|
||||
|
@ -2688,7 +2687,7 @@ displayed hostnames."
|
|||
otherwise `erc-server-announced-name'. SERVER is matched against
|
||||
`erc-common-server-suffixes'."
|
||||
(when server
|
||||
(or (cdar (erc-remove-if-not
|
||||
(or (cdar (cl-remove-if-not
|
||||
(lambda (net) (string-match (car net) server))
|
||||
erc-common-server-suffixes))
|
||||
erc-server-announced-name)))
|
||||
|
@ -3725,8 +3724,9 @@ the message given by REASON."
|
|||
x-toolkit-scroll-bars)))
|
||||
"")
|
||||
(if (featurep 'multi-tty) ", multi-tty" ""))
|
||||
(if erc-emacs-build-time
|
||||
(concat " of " erc-emacs-build-time)
|
||||
(if emacs-build-time
|
||||
(concat " of " (format-time-string
|
||||
"%Y-%m-%d" emacs-build-time))
|
||||
"")))
|
||||
t)
|
||||
|
||||
|
@ -4573,7 +4573,7 @@ See also: `erc-echo-notice-in-user-buffers',
|
|||
((string-match "^-" mode)
|
||||
;; Remove the unbanned masks from the ban list
|
||||
(setq erc-channel-banlist
|
||||
(erc-delete-if
|
||||
(cl-delete-if
|
||||
#'(lambda (y)
|
||||
(member (upcase (cdr y))
|
||||
(mapcar #'upcase
|
||||
|
@ -4594,7 +4594,7 @@ See also: `erc-echo-notice-in-user-buffers',
|
|||
"Group LIST into sublists of length N."
|
||||
(cond ((null list) nil)
|
||||
((null (nthcdr n list)) (list list))
|
||||
(t (cons (erc-subseq list 0 n) (erc-group-list (nthcdr n list) n)))))
|
||||
(t (cons (cl-subseq list 0 n) (erc-group-list (nthcdr n list) n)))))
|
||||
|
||||
|
||||
;;; MOTD numreplies
|
||||
|
@ -6183,8 +6183,7 @@ non-nil value is found.
|
|||
output (apply #'format format-args))
|
||||
;; Change all "1 units" to "1 unit".
|
||||
(while (string-match "\\([^0-9]\\|^\\)1 \\S-+\\(s\\)" output)
|
||||
(setq output (erc-replace-match-subexpression-in-string
|
||||
"" output (match-string 2 output) 2 (match-beginning 2))))
|
||||
(setq output (replace-match "" nil nil output 2)))
|
||||
output))
|
||||
|
||||
|
||||
|
|
|
@ -114,7 +114,6 @@ This is default behavior of shells like bash."
|
|||
backward-list
|
||||
forward-page
|
||||
backward-page
|
||||
forward-point
|
||||
forward-paragraph
|
||||
backward-paragraph
|
||||
backward-prefix-chars
|
||||
|
|
|
@ -382,12 +382,7 @@ it defaults to `insert'."
|
|||
"Set handle INDEX, using MODE, to point to TARGET."
|
||||
(when target
|
||||
(if (and (stringp target)
|
||||
(or (cond
|
||||
((boundp 'null-device)
|
||||
(string= target null-device))
|
||||
((boundp 'grep-null-device)
|
||||
(string= target grep-null-device))
|
||||
(t nil))
|
||||
(or (string= target null-device)
|
||||
(string= target "/dev/null")))
|
||||
(aset eshell-current-handles index nil)
|
||||
(let ((where (eshell-get-target target mode))
|
||||
|
|
|
@ -690,46 +690,47 @@ newline."
|
|||
"Send the output from PROCESS (STRING) to the interactive display.
|
||||
This is done after all necessary filtering has been done."
|
||||
(let ((oprocbuf (if process (process-buffer process)
|
||||
(current-buffer)))
|
||||
(inhibit-point-motion-hooks t)
|
||||
(inhibit-modification-hooks t))
|
||||
(let ((functions eshell-preoutput-filter-functions))
|
||||
(while (and functions string)
|
||||
(setq string (funcall (car functions) string))
|
||||
(setq functions (cdr functions))))
|
||||
(if (and string oprocbuf (buffer-name oprocbuf))
|
||||
(let (opoint obeg oend)
|
||||
(with-current-buffer oprocbuf
|
||||
(setq opoint (point))
|
||||
(setq obeg (point-min))
|
||||
(setq oend (point-max))
|
||||
(let ((buffer-read-only nil)
|
||||
(nchars (length string))
|
||||
(ostart nil))
|
||||
(widen)
|
||||
(goto-char eshell-last-output-end)
|
||||
(setq ostart (point))
|
||||
(if (<= (point) opoint)
|
||||
(setq opoint (+ opoint nchars)))
|
||||
(if (< (point) obeg)
|
||||
(setq obeg (+ obeg nchars)))
|
||||
(if (<= (point) oend)
|
||||
(setq oend (+ oend nchars)))
|
||||
(current-buffer)))
|
||||
(inhibit-point-motion-hooks t)
|
||||
(inhibit-modification-hooks t))
|
||||
(when (and string oprocbuf (buffer-name oprocbuf))
|
||||
(with-current-buffer oprocbuf
|
||||
(let ((functions eshell-preoutput-filter-functions))
|
||||
(while (and functions string)
|
||||
(setq string (funcall (car functions) string))
|
||||
(setq functions (cdr functions))))
|
||||
(when string
|
||||
(let (opoint obeg oend)
|
||||
(setq opoint (point))
|
||||
(setq obeg (point-min))
|
||||
(setq oend (point-max))
|
||||
(let ((buffer-read-only nil)
|
||||
(nchars (length string))
|
||||
(ostart nil))
|
||||
(widen)
|
||||
(goto-char eshell-last-output-end)
|
||||
(setq ostart (point))
|
||||
(if (<= (point) opoint)
|
||||
(setq opoint (+ opoint nchars)))
|
||||
(if (< (point) obeg)
|
||||
(setq obeg (+ obeg nchars)))
|
||||
(if (<= (point) oend)
|
||||
(setq oend (+ oend nchars)))
|
||||
;; Let the ansi-color overlay hooks run.
|
||||
(let ((inhibit-modification-hooks nil))
|
||||
(insert-before-markers string))
|
||||
(if (= (window-start) (point))
|
||||
(set-window-start (selected-window)
|
||||
(- (point) nchars)))
|
||||
(if (= (point) eshell-last-input-end)
|
||||
(set-marker eshell-last-input-end
|
||||
(- eshell-last-input-end nchars)))
|
||||
(set-marker eshell-last-output-start ostart)
|
||||
(set-marker eshell-last-output-end (point))
|
||||
(force-mode-line-update))
|
||||
(narrow-to-region obeg oend)
|
||||
(goto-char opoint)
|
||||
(eshell-run-output-filters))))))
|
||||
(if (= (window-start) (point))
|
||||
(set-window-start (selected-window)
|
||||
(- (point) nchars)))
|
||||
(if (= (point) eshell-last-input-end)
|
||||
(set-marker eshell-last-input-end
|
||||
(- eshell-last-input-end nchars)))
|
||||
(set-marker eshell-last-output-start ostart)
|
||||
(set-marker eshell-last-output-end (point))
|
||||
(force-mode-line-update))
|
||||
(narrow-to-region obeg oend)
|
||||
(goto-char opoint)
|
||||
(eshell-run-output-filters)))))))
|
||||
|
||||
(defun eshell-run-output-filters ()
|
||||
"Run the `eshell-output-filter-functions' on the current output."
|
||||
|
|
|
@ -384,15 +384,6 @@ corresponding to a successful execution."
|
|||
(set status-var eshell-last-command-status))
|
||||
(cadr result))))))
|
||||
|
||||
;;;_* Reporting bugs
|
||||
;;
|
||||
;; If you do encounter a bug, on any system, please report
|
||||
;; it -- in addition to any particular oddities in your configuration
|
||||
;; -- so that the problem may be corrected for the benefit of others.
|
||||
|
||||
;;;###autoload
|
||||
(define-obsolete-function-alias 'eshell-report-bug 'report-emacs-bug "23.1")
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defun eshell-unload-all-modules ()
|
||||
|
|
139
lisp/ffap.el
139
lisp/ffap.el
|
@ -1109,6 +1109,121 @@ The arguments CHARS, BEG and END are handled as described in
|
|||
;; Added at suggestion of RHOGEE (for ff-paths), 7/24/95.
|
||||
"Last string returned by the function `ffap-string-at-point'.")
|
||||
|
||||
(defcustom ffap-file-name-with-spaces nil
|
||||
"If non-nil, enable looking for paths with spaces in `ffap-string-at-point'.
|
||||
Enabling this variable may lead to `find-file-at-point' guessing
|
||||
wrong more often when trying to find a file name intermingled
|
||||
with normal text, but can be useful when working on systems that
|
||||
normally use spaces in file names (like Microsoft Windows and the
|
||||
like)."
|
||||
:type 'boolean
|
||||
:version "28.1")
|
||||
|
||||
(defun ffap-search-backward-file-end (&optional dir-separator end)
|
||||
"Search backward position point where file would probably end.
|
||||
Optional DIR-SEPARATOR defaults to \"/\". The search maximum is
|
||||
`line-end-position' or optional END point.
|
||||
|
||||
Suppose the cursor is somewhere that might be near end of file,
|
||||
the guessing would position point before punctuation (like comma)
|
||||
after the file extension:
|
||||
|
||||
C:\temp\file.log, which contain ....
|
||||
=============================== (before)
|
||||
---------------- (after)
|
||||
|
||||
|
||||
C:\temp\file.log on Windows or /tmp/file.log on Unix
|
||||
=============================== (before)
|
||||
---------------- (after)
|
||||
|
||||
The strategy is to search backward until DIR-SEPARATOR which defaults to
|
||||
\"/\" and then take educated guesses.
|
||||
|
||||
Move point and return point if an adjustment was done."
|
||||
(unless dir-separator
|
||||
(setq dir-separator "/"))
|
||||
(let ((opoint (point))
|
||||
point punct end whitespace-p)
|
||||
(when (re-search-backward
|
||||
(regexp-quote dir-separator) (line-beginning-position) t)
|
||||
;; Move to the beginning of the match..
|
||||
(forward-char 1)
|
||||
;; ... until typical punctuation.
|
||||
(when (re-search-forward "\\([][<>()\"'`,.:;]\\)"
|
||||
(or end
|
||||
(line-end-position))
|
||||
t)
|
||||
(setq end (match-end 0))
|
||||
(setq punct (match-string 1))
|
||||
(setq whitespace-p (looking-at "[ \t\r\n]\\|$"))
|
||||
(goto-char end)
|
||||
(cond
|
||||
((and (string-equal punct ".")
|
||||
whitespace-p) ;end of sentence
|
||||
(setq point (1- (point))))
|
||||
((and (string-equal punct ".")
|
||||
(looking-at "[a-zA-Z0-9.]+")) ;possibly file extension
|
||||
(setq point (match-end 0)))
|
||||
(t
|
||||
(setq point (point)))))
|
||||
(goto-char opoint)
|
||||
(when point
|
||||
(goto-char point)
|
||||
point))))
|
||||
|
||||
(defun ffap-search-forward-file-end (&optional dir-separator)
|
||||
"Search DIR-SEPARATOR and position point at file's maximum ending.
|
||||
This includes spaces.
|
||||
Optional DIR-SEPARATOR defaults to \"/\".
|
||||
Call `ffap-search-backward-file-end' to refine the ending point."
|
||||
(unless dir-separator
|
||||
(setq dir-separator "/"))
|
||||
(let* ((chars ;expected chars in file name
|
||||
(concat "[^][^<>()\"'`;,#*|"
|
||||
;; exclude the opposite as we know the separator
|
||||
(if (string-equal dir-separator "/")
|
||||
"\\\\"
|
||||
"/")
|
||||
"\t\r\n]"))
|
||||
(re (concat
|
||||
chars "*"
|
||||
(if dir-separator
|
||||
(regexp-quote dir-separator)
|
||||
"/")
|
||||
chars "*")))
|
||||
(when (looking-at re)
|
||||
(goto-char (match-end 0)))))
|
||||
|
||||
(defun ffap-dir-separator-near-point ()
|
||||
"Search backward and forward for closest slash or backlash in line.
|
||||
Return string slash or backslash. Point is moved to closest position."
|
||||
(let ((point (point))
|
||||
str pos)
|
||||
(when (looking-at ".*?/")
|
||||
(setq str "/"
|
||||
pos (match-end 0)))
|
||||
(when (and (looking-at ".*?\\\\")
|
||||
(or (null pos)
|
||||
(< (match-end 0) pos)))
|
||||
(setq str "\\"
|
||||
pos (match-end 0)))
|
||||
(goto-char point)
|
||||
(when (and (re-search-backward "/" (line-beginning-position) t)
|
||||
(or (null pos)
|
||||
(< (- point (point)) (- pos point))))
|
||||
(setq str "/"
|
||||
pos (1+ (point)))) ;1+ to keep cursor at the end of char
|
||||
(goto-char point)
|
||||
(when (and (re-search-backward "\\\\" (line-beginning-position) t)
|
||||
(or (null pos)
|
||||
(< (- point (point)) (- pos point))))
|
||||
(setq str "\\"
|
||||
pos (1+ (point))))
|
||||
(when pos
|
||||
(goto-char pos))
|
||||
str))
|
||||
|
||||
(defun ffap-string-at-point (&optional mode)
|
||||
"Return a string of characters from around point.
|
||||
|
||||
|
@ -1128,7 +1243,8 @@ Set the variables `ffap-string-at-point' and
|
|||
|
||||
When the region is active and larger than `ffap-max-region-length',
|
||||
return an empty string, and set `ffap-string-at-point-region' to '(1 1)."
|
||||
(let* ((args
|
||||
(let* (dir-separator
|
||||
(args
|
||||
(cdr
|
||||
(or (assq (or mode major-mode) ffap-string-at-point-mode-alist)
|
||||
(assq 'file ffap-string-at-point-mode-alist))))
|
||||
|
@ -1137,14 +1253,25 @@ return an empty string, and set `ffap-string-at-point-region' to '(1 1)."
|
|||
(beg (if region-selected
|
||||
(region-beginning)
|
||||
(save-excursion
|
||||
(skip-chars-backward (car args))
|
||||
(skip-chars-forward (nth 1 args) pt)
|
||||
(if (and ffap-file-name-with-spaces
|
||||
(memq mode '(nil file)))
|
||||
(when (setq dir-separator (ffap-dir-separator-near-point))
|
||||
(while (re-search-backward
|
||||
(regexp-quote dir-separator)
|
||||
(line-beginning-position) t)
|
||||
(goto-char (match-beginning 0))))
|
||||
(skip-chars-backward (car args))
|
||||
(skip-chars-forward (nth 1 args) pt))
|
||||
(point))))
|
||||
(end (if region-selected
|
||||
(region-end)
|
||||
(save-excursion
|
||||
(skip-chars-forward (car args))
|
||||
(skip-chars-backward (nth 2 args) pt)
|
||||
(when (and ffap-file-name-with-spaces
|
||||
(memq mode '(nil file)))
|
||||
(ffap-search-forward-file-end dir-separator)
|
||||
(ffap-search-backward-file-end dir-separator))
|
||||
(point))))
|
||||
(region-len (- (max beg end) (min beg end))))
|
||||
|
||||
|
@ -1824,12 +1951,6 @@ Only intended for interactive use."
|
|||
|
||||
(defalias 'find-file-literally-at-point 'ffap-literally)
|
||||
|
||||
|
||||
;;; Bug Reporter:
|
||||
|
||||
(define-obsolete-function-alias 'ffap-bug 'report-emacs-bug "23.1")
|
||||
(define-obsolete-function-alias 'ffap-submit-bug 'report-emacs-bug "23.1")
|
||||
|
||||
|
||||
;;; Hooks for Gnus, VM, Rmail:
|
||||
;;
|
||||
|
|
|
@ -988,14 +988,6 @@ one or more of those symbols."
|
|||
(completion-table-with-context
|
||||
string-dir names string-file pred action)))))
|
||||
|
||||
(defun locate-file-completion (string path-and-suffixes action)
|
||||
"Do completion for file names passed to `locate-file'.
|
||||
PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)."
|
||||
(declare (obsolete locate-file-completion-table "23.1"))
|
||||
(locate-file-completion-table (car path-and-suffixes)
|
||||
(cdr path-and-suffixes)
|
||||
string nil action))
|
||||
|
||||
(defvar locate-dominating-stop-dir-regexp
|
||||
(purecopy "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'")
|
||||
"Regexp of directory names that stop the search in `locate-dominating-file'.
|
||||
|
|
|
@ -504,12 +504,9 @@ Commands: Equivalent keys in read-only mode:
|
|||
(setq forms-new-record-filter nil)
|
||||
(setq forms-modified-record-filter nil)
|
||||
|
||||
;; If running Emacs 19 under X, setup faces to show read-only and
|
||||
;; read-write fields.
|
||||
(if (fboundp 'make-face)
|
||||
(progn
|
||||
(make-local-variable 'forms-ro-face)
|
||||
(make-local-variable 'forms-rw-face)))
|
||||
;; Setup faces to show read-only and read-write fields.
|
||||
(make-local-variable 'forms-ro-face)
|
||||
(make-local-variable 'forms-rw-face)
|
||||
|
||||
;; eval the buffer, should set variables
|
||||
;;(message "forms: processing control file...")
|
||||
|
@ -609,16 +606,14 @@ Commands: Equivalent keys in read-only mode:
|
|||
(setq forms--mode-setup t)
|
||||
|
||||
;; Copy desired faces to the actual variables used by the forms formatter.
|
||||
(if (fboundp 'make-face)
|
||||
(make-local-variable 'forms--ro-face)
|
||||
(make-local-variable 'forms--rw-face)
|
||||
(if forms-read-only
|
||||
(progn
|
||||
(make-local-variable 'forms--ro-face)
|
||||
(make-local-variable 'forms--rw-face)
|
||||
(if forms-read-only
|
||||
(progn
|
||||
(setq forms--ro-face forms-ro-face)
|
||||
(setq forms--rw-face forms-ro-face))
|
||||
(setq forms--ro-face forms-ro-face)
|
||||
(setq forms--rw-face forms-rw-face))))
|
||||
(setq forms--ro-face forms-ro-face)
|
||||
(setq forms--rw-face forms-ro-face))
|
||||
(setq forms--ro-face forms-ro-face)
|
||||
(setq forms--rw-face forms-rw-face))
|
||||
|
||||
;; Make more local variables.
|
||||
(make-local-variable 'forms--file-buffer)
|
||||
|
|
|
@ -1913,7 +1913,8 @@ increase the score of each group you read."
|
|||
"," gnus-summary-best-unread-article
|
||||
"[" gnus-summary-prev-unseen-article
|
||||
"]" gnus-summary-next-unseen-article
|
||||
"\M-s" gnus-summary-search-article-forward
|
||||
"\M-s\M-s" gnus-summary-search-article-forward
|
||||
"\M-s\M-r" gnus-summary-search-article-backward
|
||||
"\M-r" gnus-summary-search-article-backward
|
||||
"\M-S" gnus-summary-repeat-search-article-forward
|
||||
"\M-R" gnus-summary-repeat-search-article-backward
|
||||
|
|
|
@ -2751,16 +2751,17 @@ OpenPGP header will be left out. If all the values are nil,
|
|||
or `message-openpgp-header' is itself nil, the OpenPGP header
|
||||
will not be inserted."
|
||||
:type '(choice
|
||||
(const nil :tag "Don't add OpenPGP header")
|
||||
(list (choice (string :tag "ID")
|
||||
(const nil :tag "No ID"))
|
||||
(const :tag "Don't add OpenPGP header" nil)
|
||||
(list :tag "Use OpenPGP header"
|
||||
(choice (string :tag "ID")
|
||||
(const :tag "No ID" nil))
|
||||
(choice (string :tag "Key")
|
||||
(const nil :tag "No Key"))
|
||||
(choice (other nil :tag "None")
|
||||
(const "unprotected" :tag "Unprotected")
|
||||
(const "sign" :tag "Sign")
|
||||
(const "encrypt" :tag "Encrypt")
|
||||
(const "signencrypt" :tag "Sign and Encrypt"))))
|
||||
(const :tag "No Key" nil))
|
||||
(choice (other :tag "None" nil)
|
||||
(const :tag "Unprotected" "unprotected")
|
||||
(const :tag "Sign" "sign")
|
||||
(const :tag "Encrypt" "encrypt")
|
||||
(const :tag "Sign and Encrypt" "signencrypt"))))
|
||||
:version "28.1")
|
||||
|
||||
(defun message-add-openpgp-header ()
|
||||
|
@ -2768,32 +2769,34 @@ will not be inserted."
|
|||
|
||||
Header will be constructed as specified in `message-openpgp-header'.
|
||||
|
||||
Consider adding this function to `message-send-hook'."
|
||||
Consider adding this function to `message-header-setup-hook'"
|
||||
;; See https://tools.ietf.org/html/draft-josefsson-openpgp-mailnews-header
|
||||
(when (and message-openpgp-header
|
||||
(or (nth 0 message-openpgp-header)
|
||||
(nth 1 message-openpgp-header)
|
||||
(nth 2 message-openpgp-header)))
|
||||
(with-temp-buffer
|
||||
(insert "OpenPGP: ")
|
||||
;; add ID
|
||||
(let (need-sep)
|
||||
(when (nth 0 message-openpgp-header)
|
||||
(insert "id=" (nth 0 message-openpgp-header))
|
||||
(setq need-sep t))
|
||||
;; add URL
|
||||
(when (nth 1 message-openpgp-header)
|
||||
(when need-sep (insert "; "))
|
||||
(if (string-match-p ";")
|
||||
(insert "url=\"" (nth 1 message-openpgp-header) "\"")
|
||||
(insert "url=\"" (nth 1 message-openpgp-header) "\""))
|
||||
(setq need-sep t))
|
||||
;; add preference
|
||||
(when (nth 2 message-openpgp-header)
|
||||
(when need-sep (insert "; "))
|
||||
(insert "preference=" (nth 2 message-openpgp-header))))
|
||||
;; insert header
|
||||
(message-add-header (buffer-string)))))
|
||||
(message-add-header
|
||||
(with-temp-buffer
|
||||
(insert "OpenPGP: ")
|
||||
;; add ID
|
||||
(let (need-sep)
|
||||
(when (nth 0 message-openpgp-header)
|
||||
(insert "id=" (nth 0 message-openpgp-header))
|
||||
(setq need-sep t))
|
||||
;; add URL
|
||||
(when (nth 1 message-openpgp-header)
|
||||
(when need-sep (insert "; "))
|
||||
(if (string-match-p ";")
|
||||
(insert "url=\"" (nth 1 message-openpgp-header) "\"")
|
||||
(insert "url=\"" (nth 1 message-openpgp-header) "\""))
|
||||
(setq need-sep t))
|
||||
;; add preference
|
||||
(when (nth 2 message-openpgp-header)
|
||||
(when need-sep (insert "; "))
|
||||
(insert "preference=" (nth 2 message-openpgp-header))))
|
||||
;; insert header
|
||||
(buffer-string)))
|
||||
(message-sort-headers)))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -329,7 +329,6 @@ Whether the passphrase is cached at all is controlled by
|
|||
(autoload 'epg-verify-string "epg")
|
||||
(autoload 'epg-sign-string "epg")
|
||||
(autoload 'epg-encrypt-string "epg")
|
||||
(autoload 'epg-passphrase-callback-function "epg")
|
||||
(autoload 'epg-context-set-passphrase-callback "epg")
|
||||
(autoload 'epg-sub-key-fingerprint "epg")
|
||||
(autoload 'epg-configuration "epg-config")
|
||||
|
|
|
@ -242,7 +242,6 @@ Whether the passphrase is cached at all is controlled by
|
|||
(defvar epg-user-id-alist)
|
||||
|
||||
(autoload 'epg-make-context "epg")
|
||||
(autoload 'epg-passphrase-callback-function "epg")
|
||||
(autoload 'epa-select-keys "epa")
|
||||
(autoload 'epg-list-keys "epg")
|
||||
(autoload 'epg-context-set-armor "epg")
|
||||
|
|
|
@ -712,7 +712,6 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
|
|||
(autoload 'epg-verify-string "epg")
|
||||
(autoload 'epg-sign-string "epg")
|
||||
(autoload 'epg-encrypt-string "epg")
|
||||
(autoload 'epg-passphrase-callback-function "epg")
|
||||
(autoload 'epg-context-set-passphrase-callback "epg")
|
||||
(autoload 'epg-key-sub-key-list "epg")
|
||||
(autoload 'epg-sub-key-capability "epg")
|
||||
|
|
|
@ -56,14 +56,11 @@
|
|||
|
||||
(defvar smiley-data-directory)
|
||||
|
||||
(defcustom smiley-style
|
||||
(if (and (fboundp 'face-attribute)
|
||||
;; In batch mode, attributes can be unspecified.
|
||||
(condition-case nil
|
||||
(>= (face-attribute 'default :height) 160)
|
||||
(error nil)))
|
||||
'medium
|
||||
'low-color)
|
||||
;; In batch mode, attributes can be unspecified.
|
||||
(defcustom smiley-style (if (ignore-errors
|
||||
(>= (face-attribute 'default :height) 160))
|
||||
'medium
|
||||
'low-color)
|
||||
"Smiley style."
|
||||
:type '(choice (const :tag "small, 3 colors" low-color) ;; 13x14
|
||||
(const :tag "medium, ~10 colors" medium) ;; 16x16
|
||||
|
|
|
@ -237,17 +237,11 @@ Instead, each hi-lock command will cycle through the faces in
|
|||
"Human-readable lighters for `hi-lock-interactive-patterns'.")
|
||||
(put 'hi-lock-interactive-lighters 'permanent-local t)
|
||||
|
||||
(define-obsolete-variable-alias 'hi-lock-face-history
|
||||
'hi-lock-face-defaults "23.1")
|
||||
(defvar hi-lock-face-defaults
|
||||
'("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-salmon" "hi-aquamarine"
|
||||
"hi-black-b" "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb")
|
||||
"Default faces for hi-lock interactive functions.")
|
||||
|
||||
(define-obsolete-variable-alias 'hi-lock-regexp-history
|
||||
'regexp-history
|
||||
"23.1")
|
||||
|
||||
(defvar hi-lock-file-patterns-prefix "Hi-lock"
|
||||
"String used to identify hi-lock patterns at the start of files.")
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue