]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoRemove unreliable test for match data clobbering
Noam Postavsky [Sun, 16 May 2021 13:19:57 +0000 (15:19 +0200)]
Remove unreliable test for match data clobbering

* src/search.c (Freplace_match): Don't test for change in search_regs
start and end, this is unreliable if change hooks modify text earlier
in the buffer (bug#35264).

3 years agoOptimize calls to 'eql', 'memql' and similar for fixnums.
Philipp Stephani [Thu, 6 May 2021 17:13:00 +0000 (19:13 +0200)]
Optimize calls to 'eql', 'memql' and similar for fixnums.

It's good practice to compare integers using 'eql' because two bignum
objects representing the same integer might not be 'eq'.  However,
'eql' is slower and doesn't have its own byte code.  Therefore,
replace it with 'eq' if one argument is guaranteed to be a fixnum on
all platforms.

* lisp/emacs-lisp/byte-opt.el (byte-optimize--fixnump): New helper
function.
(byte-optimize-equal, byte-optimize-member, byte-optimize-assoc): Use
it to optimize 'eql' etc. to 'eq' if it will always compare fixnums.

3 years agoFix handling of stderr buffer in Tramp's make-process (Bug#47861)
Michael Albinus [Sun, 16 May 2021 10:08:09 +0000 (12:08 +0200)]
Fix handling of stderr buffer in Tramp's make-process (Bug#47861)

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Reimplement stderr buffer handling.  (Bug#47861)
(tramp-maybe-open-connection): Improve traces.

* test/lisp/net/tramp-tests.el (tramp-test30-make-process):
Rework for stderr buffer.

3 years agoBug reference auto-setup for Rmail
Tassilo Horn [Sun, 16 May 2021 07:21:48 +0000 (09:21 +0200)]
Bug reference auto-setup for Rmail

* lisp/progmodes/bug-reference.el
(bug-reference-try-setup-from-rmail): New function setting up
`bug-reference-mode' from the current Rmail message.

3 years agoUpdate CSS completion tests
Dmitry Gutov [Sat, 15 May 2021 20:46:30 +0000 (23:46 +0300)]
Update CSS completion tests

* test/lisp/textmodes/css-mode-tests.el (css-test-complete-pseudo-class)
(css-test-complete-pseudo-element): Update the tests for recent changes.

3 years agoRefactor bug-reference setup functions into a defvar
Tassilo Horn [Sat, 15 May 2021 19:19:55 +0000 (21:19 +0200)]
Refactor bug-reference setup functions into a defvar

* lisp/progmodes/bug-reference.el
(bug-reference-auto-setup-functions): New defvar so that other
packages can add their own auto-setup functions to it.
* lisp/progmodes/bug-reference.el (bug-reference--run-auto-setup): Use
the new variable instead of hard-coding the 4 functions we've had
already.

3 years agoFix segfaults when byte-compiling with native-compilation
Eli Zaretskii [Sat, 15 May 2021 17:44:40 +0000 (20:44 +0300)]
Fix segfaults when byte-compiling with native-compilation

* src/emacs.c (main): Call 'set_initial_minibuffer_mode' before
entering recursive-exit.
* src/minibuf.c (init_minibuf_once_for_pdumper): Don't call
'set_minibuffer_mode' here...
(set_initial_minibuffer_mode): ... set it in this new function.
(Bug#48446)
* src/lisp.h: Add prototype for 'set_initial_minibuffer_mode'.

3 years agoMiscellaneous corrections to src/minibuf.c for bug #48337
Alan Mackenzie [Sat, 15 May 2021 11:49:49 +0000 (11:49 +0000)]
Miscellaneous corrections to src/minibuf.c for bug #48337

* src/minibuf.c (read_minibuf): Call get_minibuffer before incrementing
minibuf_level, in case a hook function calls Factive_minibuffer_window.
(init_minibuf_once_for_pdumper): Create  *Minibuf-0* here (moved from
init_minibuf_once), and set its mode, so that clicking in the mini-window
immediately after start up works (thanks, Eli Z.).

3 years agoFix launching net-utils on MS-Windows
Eli Zaretskii [Sat, 15 May 2021 09:38:01 +0000 (12:38 +0300)]
Fix launching net-utils on MS-Windows

* lisp/net/net-utils.el (net-utils-run-simple): Bind
coding-system-for-read around the code which starts the process.
(Bug#48375)

3 years agoFix `quit-restore-window' when all previous buffers got killed (Bug#48367)
pillule [Sat, 15 May 2021 08:47:07 +0000 (10:47 +0200)]
Fix `quit-restore-window' when all previous buffers got killed (Bug#48367)

* lisp/window.el (quit-restore-window): Simplify calculation of
WINDOW's previous buffer.  Avoid that killing WINDOW's previous
buffers results in a state where `quit-window' has no more
effect, by simply deleting WINDOW in that case (Bug#48367).

Copyright-paperwork-exempt: yes

3 years agoMairix: use 'mairix-search-options' as documented
Daniel Semyonov [Sat, 1 May 2021 14:03:07 +0000 (17:03 +0300)]
Mairix: use 'mairix-search-options' as documented

* lisp/net/mairix.el (mairix-call-mairix): Append
'mairix-search-options' to the arguments passed to mairix.

Copyright-paperwork-exempt: yes

3 years agoMairix: autoload main interactive functions
Daniel Semyonov [Sat, 1 May 2021 14:01:22 +0000 (17:01 +0300)]
Mairix: autoload main interactive functions

* lisp/net/mairix.el (mairix-search, mairix-use-saved-search)
(mairix-edit-saved-searches-customize, mairix-search-from-this-article)
(mairix-search-thread-this-article, mairix-widget-search-based-on-article)
(mairix-edit-saved-searches, mairix-widget-search, mairix-update-database):
Add magic autoload comment.

Copyright-paperwork-exempt: yes

3 years agoImprove doc string of 'log-edit-generate-changelog-from-diff'
Eli Zaretskii [Sat, 15 May 2021 08:06:41 +0000 (11:06 +0300)]
Improve doc string of 'log-edit-generate-changelog-from-diff'

* lisp/vc/log-edit.el (log-edit-generate-changelog-from-diff):
Improve the doc string.  (Bug#48269)

3 years agoHave X builds handle VisibilityNotify events (Bug#48268, Bug#48413)
Martin Rudalics [Sat, 15 May 2021 07:20:50 +0000 (09:20 +0200)]
Have X builds handle VisibilityNotify events (Bug#48268, Bug#48413)

* src/xterm.c (handle_one_xevent): Handle VisibilityNotify
events (Bug#48268, Bug#48413).

3 years agoAdd :company-kind support to nxml-mode completion
Dmitry Gutov [Sat, 15 May 2021 01:18:42 +0000 (04:18 +0300)]
Add :company-kind support to nxml-mode completion

* lisp/nxml/rng-nxml.el (rng-complete-tag)
(rng-complete-attribute-name, rng-complete-attribute-value):
Support :company-kind.

3 years agoAdd :company-kind support to sh-mode completion
Dmitry Gutov [Sat, 15 May 2021 00:44:16 +0000 (03:44 +0300)]
Add :company-kind support to sh-mode completion

* lisp/progmodes/sh-script.el (sh--completion-keywords):
New variable.
(sh--cmd-completion-table): Extracted from here.
(sh-completion-at-point-function): Add :company-kind.

3 years agoInclude colons in the completion strings
Dmitry Gutov [Sat, 15 May 2021 00:17:17 +0000 (03:17 +0300)]
Include colons in the completion strings

* lisp/textmodes/css-mode.el
(css--complete-pseudo-element-or-class):
Include colons in the completion strings. That's simply the nicer
behavior (e.g. someone typing : will see pseudo-elements in
completions as well), and by the standards, the colons are part of
their names anyway (of pseudo-elements and classes).

3 years agoAdd :company-kind support to css-mode completion
Dmitry Gutov [Fri, 14 May 2021 23:47:05 +0000 (02:47 +0300)]
Add :company-kind support to css-mode completion

* lisp/textmodes/css-mode.el (css--complete-pseudo-element-or-class)
(css--complete-property-value, css-completion-at-point)
(css--complete-at-rule): Add :company-kind properties, to annotate
completions with kinds returned in each case.

3 years agoMake the M-x obsoletion check more robust
Lars Ingebrigtsen [Fri, 14 May 2021 16:50:24 +0000 (18:50 +0200)]
Make the M-x obsoletion check more robust

* lisp/simple.el (read-extended-command): Make the obsoletion
check more robust.

3 years agoVarious detailed fixes to minibuf.c, etc., to fix bug #48337
Alan Mackenzie [Fri, 14 May 2021 15:52:21 +0000 (15:52 +0000)]
Various detailed fixes to minibuf.c, etc., to fix bug #48337

Also fix some unsafe coding.

* lisp/window.el (push-window-buffer-onto-prev): New function, extracted from
(record-window-buffer): Refactor by extracting the above, and removing the now
redundant parameter DO-MINIBUF.

* src/minibuf.c (zip_minibuffer_stacks, read_minibuf): Replace calls to
get_minibuffer (0) by nth_minibuffer (0).  Replace calls to
Qrecord_window_buffer by calls to Qpush_window_buffer_onto_prev.
(Factive_minibuffer_window, read_minibuf_unwind): Call abort_emacs should an
"impossible" null value be returned by nth_minibuffer.
(read_minibuf): Move the get_minibuffer_call to just after the incrementation
of minibuf_level as a precaution against a missing buffer in
Vminibuffer_list.
(nth_minibuffer): Replace XCAR by Fcar, to allow (car nil) to work.
(init_minibuf_once): Create the inactive buffer  *Minibuf-0*.
(syms_of_minibuf): New DEFSYM, Qpush_window_buffer_onto_prev.

* src/window.c (restore_window_configuration): Replace some XCARs and XCDRs
by Fcar_safe and Fcdr_safe.

3 years ago; * doc/misc/calc.texi (Date Arithmetic): Fix order in @menu.
Eli Zaretskii [Thu, 13 May 2021 16:58:30 +0000 (19:58 +0300)]
; * doc/misc/calc.texi (Date Arithmetic): Fix order in @menu.

3 years ago* doc/misc/calc.texi: Remove most hand-written node pointers.
Glenn Morris [Thu, 13 May 2021 16:26:47 +0000 (09:26 -0700)]
* doc/misc/calc.texi: Remove most hand-written node pointers.

The complex, conditional node layout makes this one of the very
few cases that can't be done entirely automatically.

3 years agoRemove more hand-written node pointers in doc/misc
Glenn Morris [Thu, 13 May 2021 16:08:40 +0000 (09:08 -0700)]
Remove more hand-written node pointers in doc/misc

* doc/misc/ede.texi, doc/misc/mh-e.texi, doc/misc/reftex.texi:
* doc/misc/todo-mode.texi: Remove hand-written node pointers.

3 years ago* doc/misc/epa.texi: Remove hand-written node pointers.
Glenn Morris [Thu, 13 May 2021 15:20:49 +0000 (08:20 -0700)]
* doc/misc/epa.texi: Remove hand-written node pointers.

3 years agoMerge from origin/emacs-27
Glenn Morris [Thu, 13 May 2021 15:11:03 +0000 (08:11 -0700)]
Merge from origin/emacs-27

bcd92b5708 (origin/emacs-27) Improve documentation of Hexl mode
c233f4eccd ; * etc/NEWS: Fix decoded-time-set-defaults typo.
4c3abb3dd1 Fix compilation errors with latest w32 API headers
127f1f330b Improve doc strings in log-edit.el
e36183ff46 ; * etc/TODO (etc/DOC): Update the todo entries.

# Conflicts:
# etc/NEWS

3 years ago* doc/misc/epa.texi: Fix @nodes in previous change.
Glenn Morris [Thu, 13 May 2021 15:07:57 +0000 (08:07 -0700)]
* doc/misc/epa.texi: Fix @nodes in previous change.

3 years agoImprove Tramp traces
Michael Albinus [Thu, 13 May 2021 14:46:17 +0000 (16:46 +0200)]
Improve Tramp traces

* lisp/net/tramp-cmds.el (tramp-list-tramp-buffers):
List also trace buffers.

* lisp/net/tramp.el (tramp-buffer-name):
Add `tramp-suppress-trace' property.
(tramp-get-debug-file-name): Fix docstring.
(tramp-trace-buffer-name): New defun.
(tramp-trace-functions): New defvar.
(tramp-debug-message): Obey also `tramp-trace-functions'.

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
Handle trace buffer accordingly.

3 years agoProcess sentinels need to work under X and commandline
dickmao [Thu, 13 May 2021 13:21:53 +0000 (15:21 +0200)]
Process sentinels need to work under X and commandline

* src/process.c (add_non_keyboard_read_fd): Make this a public function.
(add_process_read_fd): Fold old, static add_non_keyboard_read_fd guts
into here.
* src/xsmfns.c (ice_conn_watch_CB): Call add_non_keyboard_read_fd
(bug#43834).

3 years agoFix vertical cursor motion across tall text or small images
Eli Zaretskii [Thu, 13 May 2021 13:12:10 +0000 (16:12 +0300)]
Fix vertical cursor motion across tall text or small images

'line-move-partial' should in general leave it to the display
engine to scroll or recenter the window due to vertical motion of
the cursor.  The only purpose of this function is to produce
vscroll suitable for scrolling across large (relatively to the
window's height) images, where moving by display lines is not
appropriate.

* src/xdisp.c (Fdisplay__line_is_continued_p): New primitive.

* lisp/simple.el (line-move-partial): Call
'display--line-is-continued-p' to decide whether to leave it to
redisplay to scroll the window as appropriate.  (Bug#48170)

3 years agoFix bug#48349 in file-name-non-special
Michael Albinus [Thu, 13 May 2021 11:57:46 +0000 (13:57 +0200)]
Fix bug#48349 in file-name-non-special

* lisp/files.el (file-name-non-special): Use Tramp file name
handler only in case of `copy-file', 'rename-file' and
`copy-directory'.  (Bug#48349)

3 years agoDocument `package-quickstart' in the user manual
Stefan Kangas [Thu, 13 May 2021 11:45:04 +0000 (13:45 +0200)]
Document `package-quickstart' in the user manual

* doc/emacs/package.texi (Package Installation): Document
`package-quickstart' (bug#44748).

3 years agoMake searching for files faster under Windows
Nicolás Bértolo [Thu, 13 May 2021 11:30:29 +0000 (13:30 +0200)]
Make searching for files faster under Windows

* src/lread.c (openp): Use faccessat to check that a file exists
before opening it on Windows (bug#41646).  This speeds up
searching for files.

3 years agoDon't consider obsolete commands for completion in some cases
Stefan Kangas [Thu, 13 May 2021 10:17:53 +0000 (12:17 +0200)]
Don't consider obsolete commands for completion in some cases

* lisp/simple.el (read-extended-command): Exclude obsolete commands
that are either lacking a 'current-name' or were obsoleted in a
previous major version (bug#43300).

(There's been some back and forth here.  Obsolete commands used to be
treated normally for completion, and then they were removed.  Then
they were put back again, but annotated with what they were
obsoleting.  There was some pushback on this change, so this latest
changes is a compromise between the last two states.)

3 years agoUse an explicit line width of 1 on hollow cursors under X
Radon Rosborough [Thu, 13 May 2021 09:40:59 +0000 (11:40 +0200)]
Use an explicit line width of 1 on hollow cursors under X

* src/xterm.c (x_draw_hollow_cursor): Specify a line width of
1 explicitly to avoid problems on some X implementations (bug#42452).

3 years ago; * src/image.c (xpm_format, xpm_valid_color_symbols_p): Fix last change.
Eli Zaretskii [Thu, 13 May 2021 09:33:08 +0000 (12:33 +0300)]
; * src/image.c (xpm_format, xpm_valid_color_symbols_p): Fix last change.

3 years ago* src/image.c (xpm_image_p): Avoid another compiler warning.
Eli Zaretskii [Thu, 13 May 2021 09:23:19 +0000 (12:23 +0300)]
* src/image.c (xpm_image_p): Avoid another compiler warning.

3 years ago* src/image.c: Avoid compiler warnings in Cairo builds without XPM.
Eli Zaretskii [Thu, 13 May 2021 09:17:44 +0000 (12:17 +0300)]
* src/image.c: Avoid compiler warnings in Cairo builds without XPM.

3 years agoFix evaluation order for hack-local-variables
Tom Gillespie [Wed, 12 May 2021 21:31:23 +0000 (23:31 +0200)]
Fix evaluation order for hack-local-variables

* lisp/files.el (hack-local-variables): Fix the ordering which
local variables are evaluated by `hack-local-variables' so that
prop-line local variables are evaluated first. There is a hidden
nreverse lurking in `hack-local-variables-apply' which means that
the prop line variables must come second in order to be evaluated
before the end of file variables.

3 years agoDon't mark interactive commands as internal functions
Philip K [Wed, 12 May 2021 18:00:15 +0000 (20:00 +0200)]
Don't mark interactive commands as internal functions

* lisp/epa-ks.el (epa-ks-search-mode-map): Rename commands from
"--" to "-" throughout.

3 years ago; Rearrange EasyPG entry in etc/NEWS
Michael Albinus [Wed, 12 May 2021 17:50:01 +0000 (19:50 +0200)]
; Rearrange EasyPG entry in etc/NEWS

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Wed, 12 May 2021 17:03:32 +0000 (20:03 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years agoImprove doc strings and prompt in epa-ks.el
Eli Zaretskii [Wed, 12 May 2021 17:02:28 +0000 (20:02 +0300)]
Improve doc strings and prompt in epa-ks.el

* lisp/epa-ks.el (epa-ks--mark-key-to-fetch, epa-ks--fetch-key)
(epa-search-keys): Doc fixes.
(epa-ks-do-key-to-fetch): Better wording for the fetch prompt.

3 years agoEven further `text-property-search-forward' clarifications
Lars Ingebrigtsen [Wed, 12 May 2021 17:01:53 +0000 (19:01 +0200)]
Even further `text-property-search-forward' clarifications

* lisp/emacs-lisp/text-property-search.el
(text-property-search-forward): Further doc string clarifications.

3 years agoUpdate email address in epa-ks.el
Lars Ingebrigtsen [Wed, 12 May 2021 16:57:07 +0000 (18:57 +0200)]
Update email address in epa-ks.el

3 years agoAll a GPG key server client
Philip K [Wed, 12 May 2021 16:44:43 +0000 (18:44 +0200)]
All a GPG key server client

* lisp/epa-ks.el (epa-keyserver): New file (bug#39886).
* doc/misc/epa.texi (Quick start): Mention it.
(Querying a key server): Document it.

3 years ago; Comment fix
Glenn Morris [Wed, 12 May 2021 16:38:57 +0000 (09:38 -0700)]
; Comment fix

3 years agoFix `uniquify-managed' unbounded growth
Lars Ingebrigtsen [Wed, 12 May 2021 15:36:24 +0000 (17:36 +0200)]
Fix `uniquify-managed' unbounded growth

* lisp/uniquify.el (uniquify-rationalize-file-buffer-names):
Protect against exponential `uniquify-managed' growth when
reverting several (more than two) buffers that have the same file
name (bug#36877).

3 years agoFurther corrections for the text-property-search doc strings
Lars Ingebrigtsen [Wed, 12 May 2021 14:17:50 +0000 (16:17 +0200)]
Further corrections for the text-property-search doc strings

* lisp/emacs-lisp/text-property-search.el
(text-property-search-forward): Correct doc string.
(text-property-search-backward): Ditto.

3 years agoTweak indentation of #foo in js-mode
Lars Ingebrigtsen [Wed, 12 May 2021 13:41:26 +0000 (15:41 +0200)]
Tweak indentation of #foo in js-mode

* lisp/progmodes/js.el (js--proper-indentation): Indent #define
(etc) to column 0, but otherwise indent #foo normally (bug#47488).

3 years agoRemove unused variable in rmail.el
Lars Ingebrigtsen [Wed, 12 May 2021 12:15:36 +0000 (14:15 +0200)]
Remove unused variable in rmail.el

* lisp/mail/rmail.el (rmail-reply): Remove unused lexical variable
introduced in previous patch.

3 years agoFix the tests for 'string-limit'
Eli Zaretskii [Wed, 12 May 2021 13:41:03 +0000 (16:41 +0300)]
Fix the tests for 'string-limit'

* test/lisp/emacs-lisp/subr-x-tests.el (subr-string-limit-coding):
Fix the expected results of string-limit when encoding with
UTF-16.  Add tests for UTF-8 with BOM.  (Bug#48324)

* lisp/emacs-lisp/subr-x.el (string-limit): Add FIXME comment
about the current implementation, which is faulty by design.

3 years agoAbbreviate rgrep command on MS Windows (bug#48302)
Jim Porter [Wed, 12 May 2021 08:47:07 +0000 (10:47 +0200)]
Abbreviate rgrep command on MS Windows (bug#48302)

* lisp/progmodes/grep.el (grep-mode-font-lock-keywords):
Adapt regexp to match MS Windows-style shell-quoting.

* test/lisp/progmodes/grep-tests.el: New file.

3 years agoHandle Bug#24526 without breaking Emacs on tiling WMs (Bug#48268)
Martin Rudalics [Wed, 12 May 2021 07:44:02 +0000 (09:44 +0200)]
Handle Bug#24526 without breaking Emacs on tiling WMs (Bug#48268)

Since tiling window managers may react allergically to resize
requests immediately following MapNotify events on X, make sure
that such requests are issued only when a new frame should not
become visible and a size has been explicitly requested for it.

* lisp/faces.el (x-create-frame-with-faces): Mark frame as
'was-invisible' if it should be initially invisible or iconified
and has its size specified explicitly.
* src/frame.c (make_frame): Initialize new frame's was_invisible
flag.
(Fframe__set_was_invisible): New internal function.
* src/frame.h (struct frame): Specify size of new_size_p slot.
New flag was_invisible.
* src/w32fns.c (Fx_create_frame)
* src/nsfns.m (Fx_create_frame)
* src/xfns.c (Fx_create_frame): Set new frame's was_invisible
flag.
* src/xterm.c (handle_one_xevent): Call xg_frame_set_char_size
after a PropertyNotify or MapNotify event only if F's
was_invisible flag was set.

3 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Richard Stallman [Wed, 12 May 2021 03:08:42 +0000 (23:08 -0400)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

What choice do I have?

3 years agoAvoid querying in a noninteractive Emacs.
Richard Stallman [Wed, 12 May 2021 02:59:12 +0000 (22:59 -0400)]
Avoid querying in a noninteractive Emacs.

* lisp/mail/sendmail.el (mail-send): In noninteractive Emacs,
don't ask about combining header fields.

3 years agoHandle empty string as mail-header-separator
Richard Stallman [Wed, 12 May 2021 02:56:54 +0000 (22:56 -0400)]
Handle empty string as mail-header-separator

* lisp/mail/sendmail.el (mail-mode):
(mail-sendmail-undelimit-header): Handle mail-header-separator empty.
(mail-send): Search for mail-header-separator as entire contents of line.

3 years agoHandle multi-line FROM.
Richard Stallman [Wed, 12 May 2021 02:41:17 +0000 (22:41 -0400)]
Handle multi-line FROM.

* lisp/mail/rmailsum.el (rmail-header-summary): Handle multi-line FROM.

3 years agoLittle improvements in rmail.el. Recognize encryped override headers.
Richard Stallman [Wed, 12 May 2021 02:38:21 +0000 (22:38 -0400)]
Little improvements in rmail.el.  Recognize encryped override headers.

* lisp/mail/rmail.el (rmail-simplified-subject): Delete `[External] :'.
(rmail-reply): In encrypted message, search for other header fields
        inside the encrypted part, and use them instead of the real header.
(rmail-epa-decrypt): Don't set MIME unless it's Rmail mode.

3 years agoUse rfc822-goto-eoh rather that mail-header-separator.
Richard Stallman [Wed, 12 May 2021 02:19:00 +0000 (22:19 -0400)]
Use rfc822-goto-eoh rather that mail-header-separator.

* lisp/epa-mail.el (epa-mail-sign)
(epa-mail-default-recipients, epa-mail-encrypt):
Use rfc822-goto-eoh, not mail-header-separator.
(epa-mail-default-recipients): Assume epa-mail-aliases
elements are lower case, search case-independently.

3 years agoMove the Text Properties menu back to Edit
Eli Zaretskii [Tue, 11 May 2021 20:18:01 +0000 (23:18 +0300)]
Move the Text Properties menu back to Edit

* lisp/textmodes/enriched.el (enriched-mode): Don't add "Text
Properties" sub-menu to Text mode menu.
* lisp/facemenu.el (menu-bar-edit-menu): Add "Text Properties"
sub-menu back to the Edit menu.

3 years agoRemove purecopy throughout facemenu.el (since it's not preloaded)
Lars Ingebrigtsen [Tue, 11 May 2021 19:12:08 +0000 (21:12 +0200)]
Remove purecopy throughout facemenu.el (since it's not preloaded)

3 years agoMove facemenu to enriched mode
Lars Ingebrigtsen [Tue, 11 May 2021 19:06:52 +0000 (21:06 +0200)]
Move facemenu to enriched mode

* lisp/menu-bar.el (menu-bar-edit-menu): Move from here...

* lisp/textmodes/enriched.el (enriched-mode): ... to here.

3 years agoFix dired confirm message asking to kill buffers of deleted dir (bug#48301)
Tassilo Horn [Tue, 11 May 2021 19:07:49 +0000 (21:07 +0200)]
Fix dired confirm message asking to kill buffers of deleted dir (bug#48301)

* lisp/dired.el (dired-clean-up-after-deletion): Fix dired
confirmation message asking to kill buffers of deleted dir in the case
where `dired-listing-switches' contain -p (bug#48301).

3 years ago* lisp/font-lock.el: Fix `font-lock-comment-end-skip` fallback (bug#34088)
Stefan Monnier [Tue, 11 May 2021 17:19:50 +0000 (13:19 -0400)]
* lisp/font-lock.el: Fix `font-lock-comment-end-skip` fallback (bug#34088)

(font-lock-fontify-syntactically-region): Use `comment-end-skip` as
fallback for `font-lock-comment-end-skip`, as is done for
`font-lock-comment-start-skip` (and as the name suggests).

* lisp/progmodes/opascal.el (opascal-mode): Revert last change,
made unnecessary.

3 years agoImprove documentation of Hexl mode
Eli Zaretskii [Tue, 11 May 2021 17:06:02 +0000 (20:06 +0300)]
Improve documentation of Hexl mode

* doc/emacs/misc.texi (Editing Binary Files): Explain that Hexl can
also be used for editing text, including non-ASCII text.

3 years agoRename comp-deferred-compilation
Andrea Corallo [Tue, 11 May 2021 16:10:19 +0000 (18:10 +0200)]
Rename comp-deferred-compilation

* lisp/progmodes/elisp-mode.el
(emacs-lisp-native-compile-and-load): Rename
comp-deferred-compilation -> native-comp-deferred-compilation.
* src/comp.c (maybe_defer_native_compilation, syms_of_comp):
Likewise.

3 years ago* Rename comp-deferred-compilation-deny-list
Andrea Corallo [Tue, 11 May 2021 16:07:19 +0000 (18:07 +0200)]
* Rename comp-deferred-compilation-deny-list

* lisp/emacs-lisp/comp.el (native-comp-deferred-compilation-deny-list)
(native-compile-async-skip-p): Rename
comp-deferred-compilation-deny-list ->
native-comp-deferred-compilation-deny-list.

3 years agoMention native compilation in the user manual
Eli Zaretskii [Tue, 11 May 2021 14:41:42 +0000 (17:41 +0300)]
Mention native compilation in the user manual

* doc/emacs/building.texi (Lisp Libraries): Mention native
compilation.

3 years agoFix exiting Emacs when savehist-file not writable
Stefan Kangas [Tue, 11 May 2021 13:56:41 +0000 (15:56 +0200)]
Fix exiting Emacs when savehist-file not writable

* lisp/savehist.el (savehist-save): Show warning when 'savehist-file'
is not writable.  (Bug#34093)
(savehist--has-given-file-warning): New variable.

3 years agoFix comment end delimiter fontification in OPascal mode
Lars Ingebrigtsen [Tue, 11 May 2021 13:51:42 +0000 (15:51 +0200)]
Fix comment end delimiter fontification in OPascal mode

* lisp/progmodes/opascal.el (opascal-mode): Fontify the ending
brace with `font-lock-comment-delimiter-face' correctly (bug#34088).

3 years agoFix assertions in nth_minibuffer
Eli Zaretskii [Tue, 11 May 2021 13:37:37 +0000 (16:37 +0300)]
Fix assertions in nth_minibuffer

* src/minibuf.c (nth_minibuffer): Avoid assertion violation when
DEPTHth minibuffer doesn't exist.  (Bug#48337)

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 11 May 2021 13:24:30 +0000 (16:24 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years ago`text-property-search-forward' doc string improvement
Lars Ingebrigtsen [Tue, 11 May 2021 12:30:00 +0000 (14:30 +0200)]
`text-property-search-forward' doc string improvement

* lisp/emacs-lisp/text-property-search.el
(text-property-search-forward): Correct and clarify the doc string
(bug#48317).

3 years agoFix Hexl handling of coding-systems with BOM
Eli Zaretskii [Tue, 11 May 2021 11:55:29 +0000 (14:55 +0300)]
Fix Hexl handling of coding-systems with BOM

* lisp/international/mule-cmds.el (encode-coding-char): If
CODING-SYSTEM produces BOM, remove the BOM bytes from the produced
byte sequence.  (Bug#48324)

* lisp/hexl.el (hexl-mode): Use bufferpos-to-filepos to convert
point to offset into the original file.
(hexl-mode-exit, hexl-maybe-dehexlify-buffer): Use
filepos-to-bufferpos to restore point in the original buffer.
(hexl-mode, hexl-insert-multibyte-char)
(hexl-self-insert-command, hexl-insert-hex-char)
(hexl-insert-decimal-char, hexl-insert-octal-char)
(hexl-find-file): Enhance the doc strings, mainly explaining the
complications of inserting multibyte characters.
(hexl-insert-multibyte-char): Don't treat CH as unibyte if the
coding-system isn't ASCII-compatible.  Don't treat null bytes as
multibyte.

3 years ago; Fix typo in erc.texi
Michael Albinus [Tue, 11 May 2021 07:27:14 +0000 (09:27 +0200)]
; Fix typo in erc.texi

3 years ago* doc/misc/erc.texi (Connecting): Fix cross reference.
Glenn Morris [Tue, 11 May 2021 01:55:19 +0000 (18:55 -0700)]
* doc/misc/erc.texi (Connecting): Fix cross reference.

3 years agoTweak documentation relating to 'erc-tls'
Amin Bandali [Tue, 11 May 2021 01:32:42 +0000 (21:32 -0400)]
Tweak documentation relating to 'erc-tls'

* doc/misc/erc.texi (Connecting): Add a reference to the auth manual.
* etc/NEWS: Remove the verbose, detailed example of client certificate
specification and refer to the ERC manual instead.
* lisp/erc/erc.el (erc-tls): Fix leftover path example in docstring.

3 years ago* lib/Makefile.in (maintainer-clean): Fully ignore rmdir errors.
Glenn Morris [Mon, 10 May 2021 20:31:08 +0000 (13:31 -0700)]
* lib/Makefile.in (maintainer-clean): Fully ignore rmdir errors.

3 years ago* Makefile.in: Simplify maintainer-clean.
Glenn Morris [Mon, 10 May 2021 20:30:00 +0000 (13:30 -0700)]
* Makefile.in: Simplify maintainer-clean.

(maintainer_clean_dirs): Remove.
(maintainer-clean): Don't duplicate clean by running bootstrap-clean,
which can lead to issues with parallel clean.

3 years ago* test/src/emacs-module-tests.el (mod-test-file): Unbreak out-of-tree.
Glenn Morris [Mon, 10 May 2021 18:37:40 +0000 (11:37 -0700)]
* test/src/emacs-module-tests.el (mod-test-file): Unbreak out-of-tree.

3 years ago* test/Makefile.in (clean): Remove generated mml-sec file.
Glenn Morris [Mon, 10 May 2021 18:17:14 +0000 (11:17 -0700)]
* test/Makefile.in (clean): Remove generated mml-sec file.

3 years agoAlways include the test/ directory in tarfiles
Glenn Morris [Mon, 10 May 2021 17:42:53 +0000 (10:42 -0700)]
Always include the test/ directory in tarfiles

In hindsight, it's hard to see why not including it was ever an option.
* make-dist: Always include the test/ directory.
(with_tests): Remove.
(--tests, --no-tests): Make these options no-ops.
* Makefile.in (mostlyclean_dirs, maintainer_clean_dirs): Add "test".
(mostlyclean, clean, distclean, maintainer-clean):
Remove special-casing for "test".
($(CHECK_TARGETS)): Simplify.

3 years agoExtend meaning of UNIQUIFY `auto-save-file-name-transforms'. (Bug#47493)
Michael Albinus [Mon, 10 May 2021 11:42:48 +0000 (13:42 +0200)]
Extend meaning of UNIQUIFY `auto-save-file-name-transforms'.  (Bug#47493)

* doc/lispref/backups.texi (Auto-Saving): Explain UNIQUIFY being a
secure hash in auto-save-file-name-transforms.

* etc/NEWS: Mention change in `auto-save-file-name-transforms'.

* lisp/files.el (auto-save-file-name-transforms): Adapt docstring.
(make-auto-save-file-name): Care, if UNIQ is a secure hash symbol.

3 years ago; Fix oddities in etc/NEWS
Michael Albinus [Mon, 10 May 2021 11:36:06 +0000 (13:36 +0200)]
; Fix oddities in etc/NEWS

3 years agoAvoid saving session customizations in the custom-file
Mauro Aranda [Mon, 10 May 2021 11:33:32 +0000 (13:33 +0200)]
Avoid saving session customizations in the custom-file

* lisp/custom.el (custom-theme-recalc-variable): Only stash theme
settings for void variables.
(custom-declare-variable): After initializing a variable, unstash a
theme setting, if present.
(disable-theme): When disabling a theme, maybe unstash a theme
setting.

* test/lisp/custom-resources/custom--test-theme.el: Add two settings
for testing the fix.

3 years agoAlways heed the `lexical-binding' local variable
Lars Ingebrigtsen [Mon, 10 May 2021 10:40:11 +0000 (12:40 +0200)]
Always heed the `lexical-binding' local variable

* doc/lispref/variables.texi (File Local Variables): Document
`permanently-enabled-local-variables'.

* lisp/files.el (enable-local-variables): Mention the new variable.
(set-auto-mode): Always call `hack-local-variables'.
(hack-local-variables): Factor out the variable gathering into its
own function, and respect the new variable (bug#47843).
(hack-local-variables--find-variables): Factored out from
`hack-local-variables'.
(permanently-enabled-local-variables): New variable.

3 years ago* lib-src/Makefile.in (clean): Tidy up seccomp-filter files.
Glenn Morris [Mon, 10 May 2021 01:46:11 +0000 (18:46 -0700)]
* lib-src/Makefile.in (clean): Tidy up seccomp-filter files.

3 years ago* test/Makefile.in (SUBDIRS, subdir_template): Fix out-of-tree.
Glenn Morris [Mon, 10 May 2021 01:33:44 +0000 (18:33 -0700)]
* test/Makefile.in (SUBDIRS, subdir_template): Fix out-of-tree.

3 years agoSmall fixes for out-of-tree clean rules.
Glenn Morris [Mon, 10 May 2021 01:27:04 +0000 (18:27 -0700)]
Small fixes for out-of-tree clean rules.

* Makefile.in (top_maintainer_clean, extraclean): Fix out-of-tree.

3 years agoSmall fixes for Makefile clean rules
Glenn Morris [Mon, 10 May 2021 01:22:49 +0000 (18:22 -0700)]
Small fixes for Makefile clean rules

* Makefile.in (maintainer-clean): Move some items from extraclean.
(extraclean): doc/emacs already deletes emacsver.texi.

3 years agoBase the "extraclean" Make rule on "maintainer-clean"
Glenn Morris [Mon, 10 May 2021 01:14:12 +0000 (18:14 -0700)]
Base the "extraclean" Make rule on "maintainer-clean"

* Makefile.in (FIND_DELETE): New, set by configure.
(extraclean_dirs): Remove.
(extraclean): Make it just a small variation on maintainer-clean.
* admin/charsets/Makefile.in (extraclean):
* admin/grammars/Makefile.in (extraclean):
* admin/unidata/Makefile.in (extraclean):
* leim/Makefile.in (extraclean):
* lib-src/Makefile.in (extraclean):
* lisp/Makefile.in (extraclean):
* lwlib/Makefile.in (extraclean):
* nt/Makefile.in (extraclean):
* src/Makefile.in (extraclean): Remove target.
* lib/Makefile.in (extraclean): Merge into maintainer-clean.

3 years ago* lisp/misearch.el (multi-isearch-switch-buffer): New function.
Juri Linkov [Sun, 9 May 2021 19:27:08 +0000 (22:27 +0300)]
* lisp/misearch.el (multi-isearch-switch-buffer): New function.

* lisp/isearch.el (isearch-search-string):
* lisp/misearch.el (multi-isearch-wrap, multi-isearch-pop-state): Use it.

https://lists.gnu.org/archive/html/emacs-devel/2021-05/msg00309.html

3 years ago; * etc/NEWS.27: Revert last change.
Basil L. Contovounesios [Sun, 9 May 2021 13:49:23 +0000 (14:49 +0100)]
; * etc/NEWS.27: Revert last change.

This reverts commit 3d276324edd90b2df9f0987f635ca0c39037a81d
2021-05-09 "; Fix decoded-time-set-defaults typo in NEWS.27."
which was mistakenly applied to etc/NEWS.27 on the master branch.

It is replaced by commit c233f4eccddf09e41441b2a292491b469fd61792
2021-05-09 "; * etc/NEWS: Fix decoded-time-set-defaults typo."
on the emacs-27 branch (bug#48298).

3 years ago; * etc/NEWS: Fix decoded-time-set-defaults typo.
Basil L. Contovounesios [Sun, 9 May 2021 13:46:27 +0000 (14:46 +0100)]
; * etc/NEWS: Fix decoded-time-set-defaults typo.

This was mistakenly applied to NEWS.27 on the master branch in
2021-05-09 "; Fix decoded-time-set-defaults typo in NEWS.27."
but that has now been reverted (bug#48298).

3 years agoCleanups for Tramp out-of-band methods on MS Windows
Michael Albinus [Sun, 9 May 2021 13:37:37 +0000 (15:37 +0200)]
Cleanups for Tramp out-of-band methods on MS Windows

* doc/misc/tramp.texi (Frequently Asked Questions):
tramp-use-ssh-controlmaster-options is nil on MS Windows.

* lisp/net/tramp.el (tramp-unquote-shell-quote-argument): Revert previous
change, it worked (not as expected but) properly.

* test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards):
Don't skip on MS Windows.
(tramp--test-windows-nt-and-scp-p): Remove.
(tramp--test-special-characters): Skip for out-of-band methods on
MS Windows, sometimes.

3 years agoMake autoloads-force work in build directory
Andreas Schwab [Sun, 9 May 2021 12:22:05 +0000 (14:22 +0200)]
Make autoloads-force work in build directory

* lisp/Makefile.in (autoloads-force): Remove $(lisp)/loaddefs.el,
not loaddefs.el.

3 years agoDefault to 1970 in decoded-time-set-defaults
Basil L. Contovounesios [Sun, 9 May 2021 08:50:00 +0000 (09:50 +0100)]
Default to 1970 in decoded-time-set-defaults

* lisp/calendar/time-date.el (decoded-time-set-defaults): Set an
unspecified year field to 1970, as promised in the docstring, and to
ensure it's representable on all systems (bug#48298).

3 years agoReintroduce autoloads for edebug-all-defs/edebug-all-forms
Lars Ingebrigtsen [Sun, 9 May 2021 09:47:01 +0000 (11:47 +0200)]
Reintroduce autoloads for edebug-all-defs/edebug-all-forms

* lisp/emacs-lisp/edebug.el (edebug-all-defs, edebug-all-forms):
Reintroduce ;;;###autoload of these user options that were removed
in bae2cfe63c, because this leads to errors in a common (and
recommended) use case (bug#47516).

3 years agoFix indentation of lines starting with # in js-mode
Lars Ingebrigtsen [Sat, 8 May 2021 12:42:51 +0000 (14:42 +0200)]
Fix indentation of lines starting with # in js-mode

* lisp/progmodes/js.el (js--proper-indentation): # is not like in
C -- it doesn't have to appear on the beginning of the line
(bug#47488).

3 years ago; Fix decoded-time-set-defaults typo in NEWS.27.
Basil L. Contovounesios [Sun, 9 May 2021 08:40:40 +0000 (09:40 +0100)]
; Fix decoded-time-set-defaults typo in NEWS.27.

See bug#48298.