1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00
Commit Graph

140244 Commits

Author SHA1 Message Date
Juri Linkov
aff8bca77c * lisp/replace.el (occur-engine-line): Revert part of fb16313025 (bug#39597)
; Do not merge to master.
2020-02-23 02:34:45 +02:00
Dmitry Gutov
dd5756436c 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.
2020-02-23 01:51:38 +02:00
Eli Zaretskii
2aed279be1 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>.
2020-02-22 11:07:42 +02:00
Wolfgang Scherer
0273f261a7 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.
2020-02-22 10:52:07 +02:00
Federico Tedin
d7c22338d2 Fix cursor-sensor--detect when current buf != selected window's buf
* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Avoid
trying to read text properties from position taken from another
buffer.  (Bug#38740)
2020-02-21 11:11:05 +02:00
Eli Zaretskii
2e39fc83bb * doc/emacs/sending.texi (Mail Sending): Fix index entries. 2020-02-21 11:03:08 +02:00
Allen Li
b410f902d5 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.

* doc/emacs/sending.texi (Mail Sending): Mention
'message-send-mail-function'.  (Bug#39639)
2020-02-21 11:01:25 +02:00
Allen Li
ac0546612d Fix reference to 'message-send-and-exit' in Emacs manual
Most of the manual here addresses Message mode, and C-c C-c directly
above cites the Message mode command, not the Mail mode command.

* doc/emacs/sending.texi (Mail Sending): Fix reference.  (Bug#39639)
2020-02-21 10:58:46 +02:00
Steven Allen
cd6a9b8f65 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)
2020-02-21 10:51:51 +02:00
Mattias Engdegård
9f08524748 Fix broken regexps
Incorrect escaping prevented these from working as intended.
Found by relint.

* lisp/progmodes/cc-defs.el (c-search-backward-char-property):
Add missing backslash.
* lisp/progmodes/simula.el (simula-mode):
Remove one backslash too many.
2020-02-20 11:25:25 +01:00
Paul Eggert
1d10885763 ; spelling and comment fix 2020-02-19 17:55:03 -08:00
Paul Eggert
614203bc80 ; make change-history-commit 2020-02-19 17:50:44 -08:00
Paul Eggert
28399e585e * Makefile.in (PREFERRED_BRANCH): Now emacs-27. 2020-02-19 17:41:24 -08:00
Paul Eggert
62afbc513a 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.
2020-02-19 17:22:27 -08:00
Paul Eggert
a2c4eeeecd Clarify when fixnums are used.
* doc/lispref/numbers.texi (Integer Basics): Clarify.
Based on a suggestion by Noam Postavsky (Bug#39557#32).
2020-02-17 13:54:36 -08:00
Paul Eggert
4e5ac4b0c6 Reorder discussion of integer basics
* doc/lispref/numbers.texi (Integer Basics): Put the fixnum/bignum
discussion at the end of the section, not at the start (Bug#39557).
2020-02-17 13:37:14 -08:00
Mattias Engdegård
f765aad28b 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).
2020-02-17 11:23:41 +01:00
Mattias Engdegård
39410cfc5a 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.
2020-02-17 11:23:41 +01:00
Mattias Engdegård
96a269d045 Speed up 'maven' compilation error message regexp
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.
2020-02-17 11:23:41 +01:00
Alan Mackenzie
efc9d4fe3e 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.
2020-02-16 17:46:02 +00:00
Alan Mackenzie
7ceb45f61f Reformulate c-end-of-macro, handling multiline block comments better
* lisp/progmodes/cc-langs.el (c-last-open-c-comment-start-on-line-re): Comment
out.
(c-open-c-comment-on-logical-line-re): Remove.

* 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.
2020-02-16 12:14:41 +00:00
YAMAMOTO Mitsuharu
888ffd960c Fix unexec failure on macOS 10.15.4
* src/unexmacosx.c (unexec_regions_merge): Align region start addresses to
page boundaries and then merge regions.
2020-02-16 09:50:26 +09:00
Eli Zaretskii
b392c9f365 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)
2020-02-15 10:47:08 +02:00
Pieter van Oostrum
7448834f73 Correct default regexp in 'package-menu-hide-package'
* lisp/emacs-lisp/package.el (package-menu-mode-menu): Correct default
regexp, so it only selects the package at point.
(Bug#39436)
2020-02-15 10:23:21 +02:00
Pieter van Oostrum
faada7ca42 Remove obsolete menu entry "Redisplay buffer"
* 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)
2020-02-15 10:15:27 +02:00
Mattias Engdegård
78d76cd93c Remove redundant 'msft' compilation error rule (bug#39595)
When the 'msft' rule was moved and modified, the old copy was left
in place by mistake.

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Remove old rule.
2020-02-14 20:25:57 +01:00
Philipp Stephani
75a9eee8b8 ; * src/editfns.c (Fbuffer_size): Tiny clarification. 2020-02-13 22:43:03 +01:00
Stefan Monnier
4d8d25d641 * doc/lispref/variables.texi (special-variable-p): Clarify limits 2020-02-13 15:01:28 -05:00
Mattias Engdegård
9f6a4bbcc9 Remove the optional KEEP-ORDER argument to regexp-opt
This argument was added for the 'or' clause in rx, but it turned out
to be a bad idea (bug#37659), and there seems to be little other use
for it.

* lisp/emacs-lisp/regexp-opt.el (regexp-opt): Remove KEEP-ORDER.
* doc/lispref/searching.texi (Regexp Functions):
* etc/NEWS: Remove it from the documentation.
* test/lisp/emacs-lisp/regexp-opt-tests.el (regexp-opt-test--match-all)
(regexp-opt-test--check-perm, regexp-opt-test--explain-perm)
(regexp-opt-keep-order, regexp-opt-longest-match): Simplify test.
2020-02-13 20:43:42 +01:00
Alan Mackenzie
d1e8ce8bb6 Make after-change-functions called from call-process get the correct BEG
This fixes bug #39585.

* src/callproc.c (call_process): Supply the correct CHARPOS to
signal_after_change (twice).
2020-02-13 19:00:36 +00:00
Bastien
0304f53076 doc/misc/org.texi: Fix @dircategory
* doc/misc/org.texi: Fix @dircategory.
2020-02-13 09:41:38 +01:00
Eli Zaretskii
027da652a4 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.
2020-02-12 21:39:44 +02:00
Mattias Engdegård
5a21aaff46 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.
2020-02-12 11:20:47 +01:00
Wolfgang Scherer
2b12c2b6f2 Make sure not to mark directories
* lisp/vc/vc-dir.el (vc-dir-mark-all-files):
Make sure not to mark directories (bug#37182).
2020-02-12 00:29:40 +02:00
Dmitry Gutov
ff4ed4a0ff ; Add a TODO 2020-02-12 00:29:40 +02:00
Dmitry Gutov
3a5129a1c9 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).
2020-02-12 00:29:39 +02:00
Alan Third
89d0c4451f Revert "Fix display of working text on NS (Bug#23412, Bug#1453)"
This reverts commit ba042176d8.

Do not merge to master (bug#38851)
2020-02-11 17:27:11 +00:00
Alan Mackenzie
ad5e350ab7 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.
2020-02-10 21:20:12 +00:00
Eli Zaretskii
06c302d425 Fix set-fontset-font with ADD arg non-nil
* src/fontset.c (fontset_add): Fix off-by-one error at TO.
(Bug#39482)
2020-02-09 19:18:38 +02:00
Alan Mackenzie
530067463b Correct "different than" to "different from" where appropriate
(doc/emacs/screen.texi)
(doc/lispintro/emacs-lisp-intro.texi)
(doc/misc/calc.texi)
(doc/misc/gnus.texi)
(doc/misc/sc.texi)
(lisp/align.el)
(lisp/allout-widgets.el)
(lisp/allout.el)
(lisp/emacs-lisp/gv.el)
(lisp/font-lock.el)
(lisp/gnus/mm-util.el)
(lisp/mail/feedmail.el)
(lisp/mail/sendmail.el)
(lisp/mail/supercite.el)
(lisp/org/org-attach.el)
(lisp/progmodes/cc-langs.el)
(lisp/progmodes/idlw-shell.el)
(lisp/ps-print.el)
(lisp/simple.el)
(src/cmds.c)
(src/editfns.c)
(src/frame.h)
(src/regex-emacs.c)
(src/xfaces.c): Replace "different than" by "different from".
2020-02-09 14:33:14 +00:00
Eli Zaretskii
56b8768b32 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)
2020-02-08 11:38:52 +02:00
Stefan Kangas
b2e27d8617 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.
2020-02-06 13:37:38 +01:00
Juri Linkov
09eed01afb 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.
2020-02-06 00:38:53 +02:00
Dmitry Gutov
4a0a114505 Support ido-vertical-mode better
* lisp/ido.el (ido-exhibit):
Prepend a space to INF if it starts with a newline (bug#39379).
2020-02-05 02:50:26 +03:00
Juri Linkov
ef5fba9f40 Fix faces tab-bar and tab-line.
* lisp/tab-bar.el (tab-bar) <defface>:
* lisp/tab-line.el (tab-line) <defface>:
Check for min-colors 88 instead of type x.
2020-02-05 01:27:30 +02:00
Robert Pluim
831508422e 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.
2020-02-03 16:40:25 +01:00
Mattias Engdegård
f27187f963 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).
2020-02-02 12:52:44 +01:00
Mattias Engdegård
32763dac46 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.)

* lisp/autoinsert.el (auto-insert-alist):
* lisp/cedet/mode-local.el (mode-local-print-bindings):
* lisp/net/tramp-cache.el (tramp-flush-connection-properties)
(tramp-list-connections):
* lisp/net/zeroconf.el (zeroconf-list-service-names)
(zeroconf-list-service-types, zeroconf-list-services):
* lisp/org/org.el (org-reload):
* lisp/whitespace.el (whitespace-report-region):
* test/lisp/emacs-lisp/map-tests.el (test-map-do):
Replace add-to-list with push.
2020-02-01 22:27:23 +01:00
Mattias Engdegård
d07f177382 Clarify add-to-list documentation (bug#39373)
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.
2020-02-01 22:26:57 +01:00
Stephen Gildea
d3d2ea927c 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.
2020-02-01 09:28:30 -08:00