Noam Postavsky [Wed, 26 Feb 2020 01:09:00 +0000 (20:09 -0500)]
Define libgnutls-version properly
* src/gnutls.c (syms_of_gnutls) <libgnutls-version>: Define with
DEFVAR_LISP and add docstring, so that this variable will accessible by
help facilities.
Alan Mackenzie [Sun, 23 Feb 2020 19:43:56 +0000 (19:43 +0000)]
CC Mode: Protect against consecutive calls to before-change-functions ...
without an intervening call to after-change-functions. This would have been a
workaround to bug #38691 had the causes of that bug not been removed.
* lisp/progmodes/cc-mode.el (c-just-done-before-change): Add an extra value to
this variable, 'whole-buffer, this being set by c-before-change as a signal to
c-after-change that although c-before-change has run, it has assumed the
entire buffer as the change region.
(c-before-change, c-after-change): Adapt to the new meaning of the above.
Alan Mackenzie [Sun, 23 Feb 2020 11:00:28 +0000 (11:00 +0000)]
CC Mode: Fontify foo in "const auto foo :" correctly
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): While attempting to
find a declaration's identifier, recast the latest found id. as that
identifier when there is no other type identifier and the result of the most
recent c-forward-type call is 'maybe or 'found. In the latter case, remove
the id. from the found types list, too.
Dmitry Gutov [Sat, 22 Feb 2020 23:51:38 +0000 (01:51 +0200)]
Move more logic to vc-ignore from vc-default-ignore
* lisp/vc/vc-dir.el (vc-dir-ignore):
Pass relative file names to vc-ignore.
* lisp/vc/vc.el (vc-ignore): Move the responsibility of
constructing the ignore pattern (right now, most often a relative
file name) using a file name received from the user, here.
(vc-default-ignore): ...from here (bug#37189, see discussion).
Also clarify the docstring.
Eli Zaretskii [Sat, 22 Feb 2020 09:07:42 +0000 (11:07 +0200)]
Warn about the likes of "[:alnum:]" in regexps
* doc/lispref/searching.texi (Char Classes): Warn about erroneous
usage of named character classes. Suggested by Stephen Leake
<stephen_leake@stephe-leake.org>.
Wolfgang Scherer [Fri, 21 Feb 2020 20:28:11 +0000 (21:28 +0100)]
Don't write absolute filenames and duplicate strings to CVS ignore files
* lisp/vc/vc-cvs.el (vc-cvs-ignore): Expand filename correctly
and pass on only the basename as the pattern.
(vc-cvs-append-to-ignore) Do not write duplicate strings to
.cvsignore. New optional parameter SORT to more explicitly
control sorting of the ignore entries. (Bug#37215)
* lisp/vc/pcvs.el (cvs-mode-ignore): Call 'vc-cvs-append-to-ignore'
with SORT argument.
Allen Li [Mon, 17 Feb 2020 07:55:43 +0000 (23:55 -0800)]
Document 'message-send-mail-function' in the Emacs manual
Most of the manual here addresses Message mode, yet talks about
'send-mail-function' which is used for Mail mode.
Fixing this completely requires more involved work, but for now at
least document the difference here.
Steven Allen [Sat, 15 Feb 2020 23:13:59 +0000 (15:13 -0800)]
Skip shell prompt on current line in Eshell even if it's protected
When the eshell prompt is protected (e.g., with rear non-sticky,
inhibited movements, etc.), 'beginning-of-line' won't move to the
actual beginning of the line and therefore won't skip over the
prompt.
* lisp/eshell/em-prompt.el (eshell-previous-prompt): Use
'forward-line' to go to the beginning of the line, even if it's
protected. (Bug#39627)
Paul Eggert [Thu, 20 Feb 2020 01:21:16 +0000 (17:21 -0800)]
Fix bug when visiting euc-jp-encoded directories
Problem reported by Ken Sasaki (Bug#39672).
* src/fileio.c (Ffile_directory_p):
Encode filename before giving it to file_directory_p.
This fixes a typo introduced in
2019-09-18T02:18:14Z!eggert@cs.ucla.edu.
Make OMake support slightly less expensive (bug#39595)
When run with -p or -P, OMake regurgitates error messages that
prevented further progress, indented by 6 spaces. Use that fact
to ameliorate the modification done to other error message regexps.
* lisp/progmodes/compile.el (compilation-parse-errors):
When 'omake' is enabled, allow error messages to be indented by 0 or 6
spaces instead of any number of spaces, to avoid pathological
behaviour.
(compilation-error-regexp-alist-alist): Anchor the 'omake' pattern to
bol for performance. Repair the 'ruby-Test::Unit' pattern, which
relied on the previously over-generous 'omake' hack.
* etc/compilation.txt (OMake): Add examples.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data)
(compile-test-error-regexps): Add test for OMake (indented error).
Speed up 'msft' and 'watcom' compilation error regexps
They have similar structure, and both suffer from being able to
match leading spaces in multiple ways which leads to bad performance
when backtracking (bug#39595).
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Improved 'msft' and 'watcom' regexps.
Anchor the regexp at line-start to prevent quadratic behaviour when
it doesn't match (bug#39595). It's unclear whether the type tag, like
[ERROR], is always present; we keep it optional just in case.
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Rewrite 'maven' regexp, using rx for clarity.
* etc/compilation.txt (maven): More examples.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): No leading spaces; they seems to
stem from a misunderstanding in bug#11517.
Alan Mackenzie [Sun, 16 Feb 2020 17:46:02 +0000 (17:46 +0000)]
Amend c-backward-sws better to handle multiline block comments
In particular, multiline comments lacking escaped newlines.
* lisp/progmodes/cc-engine.el (c-backward-sws): Whilst searching backward for
a putative beginning of macro, move back over block comments whose innards
lack escaped newlines.
* lisp/progmodes/cc-engine.el (c-end-of-macro): Handle multiline block
comments lacking escaped newlines using parse-partial-sexp rather than the
former variables removed from cc-langs.el.
Eli Zaretskii [Sat, 15 Feb 2020 08:47:08 +0000 (10:47 +0200)]
Fix 'reverse-region' when less than one line is in region
* lisp/sort.el (reverse-region): Signal a user-error if the region
includes less than one full line, thus avoiding an inadvertent
deletion of text following the current line. Fix the doc string.
Fix comments to start with a capital letter. (Bug#39376)
* lisp/emacs-lisp/package.el (package-menu-mode-menu): Remove obsolete
menu entry "Redisplay buffer".
(package-menu-mode-menu): Menu entry "Refresh Package List":
make the doc string more accurate.
(Bug#39436)
Eli Zaretskii [Wed, 12 Feb 2020 19:39:44 +0000 (21:39 +0200)]
Fix display of minibuffer prompt in ido.el
* lisp/minibuffer.el (minibuffer--message-overlay-pos): New
function.
(set-minibuffer-message): Use it to determine where to show the
overlay with the temporary message.
* lisp/ido.el (ido-exhibit): Revert "Render Ido suggestions using
an overlay"; this restores the original code which inserted the
match-status information into the minibuffer, instead of
displaying it in an overlay with an after-string. Put the special
'minibuffer-message' text property at the beginning of the
inserted text. (Bug#39379)
* etc/NEWS:
* doc/lispref/display.texi (Displaying Messages):
* doc/lispref/text.texi (Special Properties): Document the
'minibuffer-message' text property and its effect.
rx: Use longest match for all-string 'or' forms (bug#37659)
Revert to the Emacs 26 semantics that always gave the longest match
for rx 'or' forms with only string arguments. This guarantee was
never well documented, but it is useful and people likely have come to
rely on it. For example, prior to this change,
(rx (or ">" ">="))
matched ">" even if the text contained ">=".
* lisp/emacs-lisp/rx.el (rx--translate-or): Don't tell regexp-opt to
preserve the matching order.
* doc/lispref/searching.texi (Rx Constructs): Document the
longest-match guarantee for all-string 'or' forms.
* test/lisp/emacs-lisp/rx-tests.el (rx-or): Update test.
Dmitry Gutov [Tue, 11 Feb 2020 21:45:52 +0000 (23:45 +0200)]
vc-hg-dir-status-files: Fix when DIR is not repository root
* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
Make sure it works correctly in a subdirectory of the repo root.
Bind default-directory to DIR and add 're: -I .' to the arguments
(bug#39380).
Alan Mackenzie [Mon, 10 Feb 2020 21:20:12 +0000 (21:20 +0000)]
c-end-of-macro: Handle block coment lines with unescaped NLs correctly
* lisp/progmodes/cc-langs.el (c-last-open-c-comment-start-on-line-re): Make
obsolete, and supersede by ...
(c-open-c-comment-on-logical-line-re): New language variable.
* lisp/progmodes/cc-engine.el (c-end-of-macro): Inside macros, handle
multiline block comments whose line ends are not escaped correctly.
Eli Zaretskii [Sat, 8 Feb 2020 09:38:52 +0000 (11:38 +0200)]
More accurate documentation of 'package-menu-hide-package'
* doc/emacs/package.texi (Package Menu): Improve the description
of the 'H' command.
* lisp/emacs-lisp/package.el (package-menu-mode-menu): More
accurate wording of the help-echo string.
(package-menu-hide-package): Make the doc string more accurate.
(Bug#39436)
Stefan Kangas [Thu, 6 Feb 2020 12:30:33 +0000 (13:30 +0100)]
Revert "Signal user-error on duplicate package refresh"
That commit caused errors when the connection was dropped in the
middle of a package refresh. To avoid any further issues this close
to the pretest, we simply remove this feature. (Bug#39187)
Don't merge to master, where we will instead try to fix the bug.
Juri Linkov [Wed, 5 Feb 2020 22:38:53 +0000 (00:38 +0200)]
Wrap some set-auto-mode calls with delay-mode-hooks (bug#39190)
* lisp/gnus/mm-view.el (mm-display-inline-fontify):
* lisp/vc/diff-mode.el (diff-syntax-fontify-props):
* lisp/vc/vc.el (vc-find-revision-no-save):
Add delay-mode-hooks around set-auto-mode calls
to not run hooks that might assume buffer-file-name
really associates buffer with a file.
Robert Pluim [Fri, 31 Jan 2020 09:22:59 +0000 (10:22 +0100)]
Cater for 3-argument version of pthread_setname_np
Fixes Bug#39363.
* configure.ac: Add check for 3-argument version of
pthread_setname_np.
* src/systhread.c (sys_thread_set_name)
[HAVE_PTHREAD_SETNAME_NP_3ARG]: Call pthread_setname_np with
3 arguments.
Clarify lexvar restrictions for add-to-ordered-list, add-to-history
* lisp/subr.el (add-to-ordered-list, add-to-history):
* doc/lispref/lists.texi (List Variables):
* doc/lispref/minibuf.texi (Minibuffer History):
Note in the doc string and manual that the variable arguments to
add-to-ordered-list and add-to-history cannot refer to a lexical
variable (bug#39373).
Replace add-to-list to lexical variable with push (bug#39373)
Since 'add-to-list', being a plain function, cannot access lexical
variables, such use must be rewritten for correctness.
(Some instances actually do work thanks to a compiler macro,
but it's not something code should rely on.)
While add-to-list often works with lexical variables, this is a hack
that isn't always effective; better tell the user not to try.
* doc/lispref/lists.texi (List Variables): Add a note about lexical
variables to the add-to-list description. Fix the equivalent code.
* lisp/subr.el (add-to-list): Amend doc string.
Stephen Gildea [Sat, 1 Feb 2020 17:28:30 +0000 (09:28 -0800)]
MH-E: alter content in mh-display-msg, not mh-show-mode
* lisp/mh-e/mh-show.el (mh-display-msg, mh-show-mode): buffer-altering
code formerly in mh-show-mode is moved to the location in mh-display-msg
where mh-show-mode used to be called before the fix to MH-E bug #470
moved the call earlier.
Stephen Gildea [Sat, 1 Feb 2020 17:18:46 +0000 (09:18 -0800)]
Update documentation for mh-show-mode-hook
* lisp/mh-e/mh-e.el, doc/misc/mh-e.texi (mh-show-mode-hook): Now that
the fix for MH-E bug #470 calls mh-show-mode-hook earlier, update the
documentation to no longer say that the message contents are available.
Stephen Gildea [Wed, 29 Jan 2020 17:21:19 +0000 (09:21 -0800)]
Example goto-addr hook: MH-E already uses goto-address
* lisp/net/goto-addr.el, doc/emacs/misc.texi: Do not use MH-E as the
example of how to add a hook to goto-address, because MH-E calls
goto-address internally.
Add more blackboard bold characters to TeX input method
This patch adds all capital blackboard bold letters and those for "1"
and "2". Most characters are in common use in mathematics, but it does
not seem useful to exclude the few not widely used.
Eli Zaretskii [Fri, 31 Jan 2020 09:34:50 +0000 (11:34 +0200)]
Allow exiting the Python interpreter of a GDB session
* lisp/progmodes/gdb-mi.el (gdb-delchar-or-quit): Send EOF to GDB
if we are in an embedded interpreter. This allows to exit from
"pi" cleanly. (Bug#39140)
Federico Tedin [Wed, 29 Jan 2020 21:24:40 +0000 (22:24 +0100)]
Ensure minibuffer input is added to history in read_minibuf
* src/minibuf.c (read_minibuf): Parse input string after saving
the string to the history list instead of before, in case parsing
signals an error or is interrupted by C-g. (Bug#39291)
Juri Linkov [Tue, 28 Jan 2020 00:11:59 +0000 (02:11 +0200)]
* lisp/wdired.el: Clean out isearch-filter-predicate (bug#37496)
* lisp/wdired.el (wdired-change-to-dired-mode): Use remove-function to
remove wdired-isearch-filter-read-only (whose value was added in
wdired-change-to-wdired-mode) from local value of isearch-filter-predicate.
Stefan Kangas [Sat, 25 Jan 2020 15:21:06 +0000 (16:21 +0100)]
Improve doc string of 'newline'
* lisp/simple.el (newline): Doc fix. Move 'use-hard-newlines' down,
since it's less important than the meaning of the prefix argument, and
is less frequently used than 'electric-indent-mode' and
'auto-fill-mode'. Change the wording to no longer call it an
option.
Paul Eggert [Sat, 25 Jan 2020 00:57:31 +0000 (16:57 -0800)]
Improve doc of eq on bignums etc.
* doc/lispref/numbers.texi (Integer Basics):
* doc/lispref/objects.texi (Integer Type, Equality Predicates):
Be clearer about eq vs eql vs = on bignums, floats, and strings.
Stephen Gildea [Fri, 24 Jan 2020 17:15:44 +0000 (09:15 -0800)]
; Clarify what time-stamp-active enables
Fix documentation strings and comments for time-stamp. Most notably:
* lisp/time-stamp.el (time-stamp-active): in the doc string, clarify
that time-stamp-active does not add time-stamp to any hook.