]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoAllow Fline_number_at_pos being called with a marker
Lars Ingebrigtsen [Sun, 7 Feb 2021 15:42:25 +0000 (16:42 +0100)]
Allow Fline_number_at_pos being called with a marker

* src/fns.c (Fline_number_at_pos): Also allow being called with a
marker (since the Lisp function allowed that).

3 years agoMove line-number-at-pos to C
Lars Ingebrigtsen [Sun, 7 Feb 2021 15:28:30 +0000 (16:28 +0100)]
Move line-number-at-pos to C

* doc/lispref/positions.texi (Text Lines): Revert previous change.

* lisp/simple.el (line-number-at-pos): Remove definition.

* lisp/simple.el (count-lines): Revert back to using
`forward-line', because there seems to be a disagreement on how
lines should be counted in a region...

* src/fns.c (Fline_number_at_pos): Rename from
Fline_number_at_position and adjust parameter list.

3 years agoMinor doc fixes in dictionary-connection.el
Stefan Kangas [Sun, 7 Feb 2021 15:06:06 +0000 (16:06 +0100)]
Minor doc fixes in dictionary-connection.el

* lisp/net/dictionary-connection.el:
(dictionary-connection-p, dictionary-connection-read-to-point):
Minor doc fixes to adhere to our conventions.

3 years agoFix copyright and license statement in dictionary*.el
Stefan Kangas [Sun, 7 Feb 2021 15:02:30 +0000 (16:02 +0100)]
Fix copyright and license statement in dictionary*.el

* lisp/net/dictionary-connection.el:
* lisp/net/dictionary.el: Add copyright statement and fix license
statement.

3 years agoAdd a new function 'line-number-at-position'
Lars Ingebrigtsen [Sun, 7 Feb 2021 15:02:56 +0000 (16:02 +0100)]
Add a new function 'line-number-at-position'

* doc/lispref/positions.texi (Text Lines): Document it.

* lisp/simple.el (count-lines): Use it.
(line-number-at-pos): Ditto.

* src/fns.c (Fline_number_at_position): New function (bug#22763).

3 years agoVarious doc fixes in dictionary.el
Stefan Kangas [Sun, 7 Feb 2021 14:53:46 +0000 (15:53 +0100)]
Various doc fixes in dictionary.el

* lisp/net/dictionary.el (dictionary-set-server-var)
(dictionary-server, dictionary-port)
(dictionary-default-dictionary)
(dictionary-default-popup-strategy, dictionary-proxy-server)
(dictionary-proxy-port, dictionary-description-open-delimiter)
(dictionary-description-close-delimiter)
(dictionary-window-configuration, dictionary-selected-window)
(dictionary-position-stack, dictionary-data-stack)
(dictionary-positions, dictionary-current-data)
(dictionary-connection, dictionary-instances)
(dictionary-color-support, dictionary-word-history)
(dictionary-mode, dictionary, dictionary-check-connection)
(dictionary-mode-p, dictionary-send-command)
(dictionary-read-reply-and-split, dictionary-check-reply)
(dictionary-check-initial-reply, dictionary-store-state)
(dictionary-store-positions, dictionary-new-search)
(dictionary-new-search-internal, dictionary-do-search)
(dictionary-display-search-result)
(dictionary-display-word-definition)
(dictionary-special-dictionary, dictionary-set-strategy)
(dictionary-tooltip-dictionary, dictionary-switch-tooltip-mode)
(dictionary-tooltip-mode, global-dictionary-tooltip-mode): Doc fixes
to adhere to our conventions.

3 years agoRevert "Fix inferior octave single-quote font lock"
Lars Ingebrigtsen [Sun, 7 Feb 2021 14:12:15 +0000 (15:12 +0100)]
Revert "Fix inferior octave single-quote font lock"

This reverts commit 9e68413c7f0a7f71e1cee923ace7282d14c2e686.

This patch led to bug#46327:

x = [2 2]'
disp(x)

Which meant that the transpose operator was interpreted
as the start of a string.

3 years agoReverse customize-changed and customize-changed-options aliasing
Lars Ingebrigtsen [Sun, 7 Feb 2021 14:07:21 +0000 (15:07 +0100)]
Reverse customize-changed and customize-changed-options aliasing

* lisp/cus-edit.el (customize-changed): Rename from
customize-changed-options (bug#23085), since the old name doesn't
reflect what it does: It's not just about user options, but also
faces and the like.
(customize-changed-options): Make into an obsolete alias.

3 years agoClarify that #s(hash-table ...) doesn't always create a new hash table
Lars Ingebrigtsen [Sun, 7 Feb 2021 13:47:09 +0000 (14:47 +0100)]
Clarify that #s(hash-table ...) doesn't always create a new hash table

* doc/lispref/hash.texi (Creating Hash): Note that the printed
representation doesn't necessarily create a new table (bug#23417).

* doc/lispref/lists.texi (Rearrangement): Link to Self-Evaluating
Forms to further expand upon immutability.

3 years agoAdd more commands to the new `C-x x' keymap
Lars Ingebrigtsen [Sun, 7 Feb 2021 12:53:44 +0000 (13:53 +0100)]
Add more commands to the new `C-x x' keymap

* doc/emacs/killing.texi (Accumulating Text):
* doc/emacs/display.texi (Line Truncation):
* doc/emacs/buffers.texi (Misc Buffer): Document it.

* lisp/bindings.el (ctl-x-x-map): Add new bindings for
rename-buffer, rename-uniquely, insert-buffer and
toggle-truncate-lines.

3 years agoMove 'revert-buffer' global binding to 'C-x g g'
Sean Whitton [Sun, 7 Feb 2021 12:30:33 +0000 (13:30 +0100)]
Move 'revert-buffer' global binding to 'C-x g g'

* lisp/bindings.el: Define ctl-x-g-map and bind 'revert-buffer' to
'C-x x g' globally.
* doc/emacs/files.texi: Replace 'C-x g' with 'C-x x g'.
* etc/NEWS: Document the change (bug#46300).

3 years ago; * lisp/emacs-lisp/byte-opt.el: improved comment
Mattias Engdegård [Sun, 7 Feb 2021 11:24:40 +0000 (12:24 +0100)]
; * lisp/emacs-lisp/byte-opt.el: improved comment

3 years ago; Improved commentary in the variable constprop mechanism
Mattias Engdegård [Sun, 7 Feb 2021 09:35:36 +0000 (10:35 +0100)]
; Improved commentary in the variable constprop mechanism

* lisp/emacs-lisp/byte-opt.el (byte-optimize--lexvars)
(byte-optimize--vars-outside-condition)
(byte-optimize-form-code-walker, byte-optimize-let-form):
Clarify various aspects in the variable constant-propagation code,
as kindly pointed out by Stefan Monnier.

3 years agoRevert "Fix the previous change"
Dmitry Gutov [Sat, 6 Feb 2021 20:59:00 +0000 (22:59 +0200)]
Revert "Fix the previous change"

This reverts commit fc37dc298f27025823fad2d944e11cc7ee6a058d.

That change was only needed in the release branch.

3 years agoFix spurious warnings from unwise condition order in inlined code
Mattias Engdegård [Thu, 4 Feb 2021 13:32:21 +0000 (14:32 +0100)]
Fix spurious warnings from unwise condition order in inlined code

These are both conditions having the form (and A B) where A is
side-effect-free and B may be known to be nil at compile time.
The compiler will then warn about A being useless and thrown away.
The fix is to test B first.

* lisp/gnus/gnus.el (gnus-method-to-server):
Test `(not no-enter-cache)` first.
(gnus-server-get-method): Test `group` first.

3 years agoConstprop of lexical variables
Mattias Engdegård [Sat, 6 Feb 2021 17:34:45 +0000 (18:34 +0100)]
Constprop of lexical variables

Lexical variables bound to a constant value (symbol, number or string)
are substituted at their point of use and the variable then eliminated
if possible.  Example:

  (let ((x (+ 2 3))) (f x))  =>  (f 5)

This reduces code size, eliminates stack operations, and enables
further optimisations.  The implementation is conservative, and is
strongly curtailed by the presence of variable mutation, conditions
and loops.

* lisp/emacs-lisp/byte-opt.el
(byte-optimize-enable-variable-constprop)
(byte-optimize-warn-eliminated-variable): New constants.
(byte-optimize--lexvars, byte-optimize--vars-outside-condition)
(byte-optimize--vars-outside-loop, byte-optimize--dynamic-vars):
New dynamic variables.
(byte-optimize--substitutable-p, byte-optimize-let-form):
New functions.
(byte-optimize-form-code-walker): Adapt clauses for variable
constprop, and add clauses for 'setq' and 'defvar'.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test-var)
(bytecomp-test-get-var, bytecomp-test-identity)
(byte-opt-testsuite-arith-data): Add test cases.

3 years ago; Fix byte-compilation warning
Eli Zaretskii [Sat, 6 Feb 2021 18:50:57 +0000 (20:50 +0200)]
; Fix byte-compilation warning

* test/src/process-tests.el (process-sentinel-interrupt-event): Fix
byte compilation warning.

3 years ago; Fix last change
Eli Zaretskii [Sat, 6 Feb 2021 18:20:31 +0000 (20:20 +0200)]
; Fix last change

3 years agoNew test for src/process.c on MS-Windows
Ioannis Kappas [Wed, 3 Feb 2021 22:50:54 +0000 (22:50 +0000)]
New test for src/process.c on MS-Windows

* test/src/process-tests.el (process-sentinel-interrupt-event):
New test.  (Bug#46284)

Copyright-paperwork-exempt: yes

3 years agoFix TEXT check in gnus-search IMAP search
Eric Abrahamsen [Sat, 6 Feb 2021 17:29:53 +0000 (09:29 -0800)]
Fix TEXT check in gnus-search IMAP search

* lisp/gnus/gnus-search.el (gnus-search-run-search): It's a string,
not a buffer!

3 years agoPermit zero value for 'child-frame-border-width' parameter (Bug#46184)
Martin Rudalics [Sat, 6 Feb 2021 17:22:29 +0000 (18:22 +0100)]
Permit zero value for 'child-frame-border-width' parameter (Bug#46184)

* doc/lispref/frames.texi (Layout Parameters): Update entry on
'child-frame-border-width' parameter.
* src/frame.c (make_frame): Init child_frame_border_width to -1.
(Fframe_child_frame_border_width): Return internal border width if
child frame border width parameter is nil.
(gui_report_frame_params): Report nil as child frame border
width parameter if the frame value is negative.
* src/frame.h (FRAME_INTERNAL_BORDER_WIDTH): Return value of
child frame border width only if it is not negative.
* src/xfns.c (Fx_create_frame): Default child frame border to -1
when recording it in its frame slot via gui_default_parameter.
* src/nsfns.m (ns_set_child_frame_border_width): Handle nil ARG.
(Fx_create_frame): Default child frame border width parameter to
nil.
* src/w32fns.c (w32_set_child_frame_border_width): Handle nil ARG.
(Fx_create_frame): Default child frame border width parameter to
nil.
* src/xfns.c (x_set_child_frame_border_width): Handle nil ARG.
(Fx_create_frame): Default child frame border width parameter to
nil.

3 years agoMerge from origin/emacs-27
Glenn Morris [Sat, 6 Feb 2021 16:10:38 +0000 (08:10 -0800)]
Merge from origin/emacs-27

8ad48a0bdd (origin/emacs-27) Improve doc string of 'text-scale-adjust'
7a25ff767d Clarify the indent-rigidly doc string
6c5ddf0e0b Fix two small tab bar issues
c71e08eba9 Fix last change in syntax.texi

# Conflicts:
# lisp/indent.el

3 years ago; Merge from origin/emacs-27
Glenn Morris [Sat, 6 Feb 2021 16:05:30 +0000 (08:05 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

43bf7f1b06 Correct the lispref manual about flushing ppss info

3 years agoMerge from origin/emacs-27
Glenn Morris [Sat, 6 Feb 2021 16:05:29 +0000 (08:05 -0800)]
Merge from origin/emacs-27

8c27af3ff4 Clarify how transient indentation modes are exited in the ...
fc37dc298f Fix the previous change

3 years ago; Merge from origin/emacs-27
Glenn Morris [Sat, 6 Feb 2021 16:05:29 +0000 (08:05 -0800)]
; Merge from origin/emacs-27

The following commits were skipped:

b99848c72c Bind default-directory to the project root
19534f988c Make sure default-directory relates to the originating buffer
d1455027e0 Initialize signal descriptions after pdumping
256356a36f Clarify the "Sentinels" node in the lispref manual
89f1634afc Fix problem with non-ASCII characters in nnmaildir

3 years agoFix previous change in testcover.el
Lars Ingebrigtsen [Sat, 6 Feb 2021 14:04:52 +0000 (15:04 +0100)]
Fix previous change in testcover.el

* lisp/emacs-lisp/testcover.el
(testcover-analyze-coverage-edebug-after): The wrapper macro is
called `1value', not `testcover-1value'.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 6 Feb 2021 13:11:29 +0000 (15:11 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years agoSupport file names with whitespace in Nroff mode
Eli Zaretskii [Sat, 6 Feb 2021 13:09:32 +0000 (15:09 +0200)]
Support file names with whitespace in Nroff mode

* lisp/textmodes/nroff-mode.el (nroff-view): Quote argument of
'Man-getpage-in-background' to support file names with special
characters.  (Bug#46051)

3 years agoTweak provided-mode-derived-p doc string
Lars Ingebrigtsen [Sat, 6 Feb 2021 12:54:33 +0000 (13:54 +0100)]
Tweak provided-mode-derived-p doc string

* lisp/subr.el (provided-mode-derived-p): Remove detail about "or
their aliases", since that seems self-evident (bug#46331) (and
derived-mode-p works the same, and doesn't have the bit in
question).

3 years agoImprove doc string of 'text-scale-adjust'
Eli Zaretskii [Sat, 6 Feb 2021 12:31:51 +0000 (14:31 +0200)]
Improve doc string of 'text-scale-adjust'

* lisp/face-remap.el (text-scale-adjust): Clarify that "default
face height" refers to the 'default' face.  (Bug#25168)

3 years agoWarn in message.el when sending encryptable mail
Lars Ingebrigtsen [Sat, 6 Feb 2021 12:26:25 +0000 (13:26 +0100)]
Warn in message.el when sending encryptable mail

* lisp/gnus/message.el (message-send): Query if it looks like
encryption was intended, but is not going to happen.

* lisp/gnus/mml-sec.el (mml-secure-is-encrypted-p): Allow saying
whether there's any <#secure tags present (bug#24411).

3 years agoRename the `1value' symbol in testcover.el
Lars Ingebrigtsen [Sat, 6 Feb 2021 11:28:46 +0000 (12:28 +0100)]
Rename the `1value' symbol in testcover.el

* lisp/emacs-lisp/testcover.el: Rename the symbol `1value'
throughout the file to `testcover-1value' to allow using the
variable in code that's to be tested (bug#25471).

3 years agoAllow provided-mode-derived-p to work on aliases
Lars Ingebrigtsen [Sat, 6 Feb 2021 11:03:43 +0000 (12:03 +0100)]
Allow provided-mode-derived-p to work on aliases

* lisp/subr.el (provided-mode-derived-p): Allow this to work on
modes that are aliases of other modes (bug#46331).  For instance:
(provided-mode-derived-p 'javascript-mode 'prog-mode)

3 years agoModernize use of prompts in auth-source.el
Michael Albinus [Sat, 6 Feb 2021 10:50:55 +0000 (11:50 +0100)]
Modernize use of prompts in auth-source.el

* lisp/auth-source.el (auth-source-search): Adapt docstring
(auth-source-format-prompt): Remove trailing ": ".
(auth-source-netrc-create, auth-source-secrets-create)
(auth-source-plstore-create): Adapt prompts.  Use `format-prompt'.
Do not ask interactively if `auth-source-save-behavior' is nil.

3 years agoClarify the indent-rigidly doc string
Lars Ingebrigtsen [Sat, 6 Feb 2021 10:46:58 +0000 (11:46 +0100)]
Clarify the indent-rigidly doc string

* lisp/indent.el (indent-rigidly): Clarify exiting the transient
mode (bug#46296).

3 years agoFix problem when ~/.mailcap had several entries for a MIME type
Lars Ingebrigtsen [Sat, 6 Feb 2021 10:40:00 +0000 (11:40 +0100)]
Fix problem when ~/.mailcap had several entries for a MIME type

* lisp/net/mailcap.el (mailcap-mime-info): Use all the matching
entries from ~/.mailcap, not just the first (bug#46318).

3 years agoAvoid a compilation warning in iter-do
Lars Ingebrigtsen [Sat, 6 Feb 2021 10:31:08 +0000 (11:31 +0100)]
Avoid a compilation warning in iter-do

* lisp/emacs-lisp/generator.el (iter-do): Avoid a compilation
warning on using variables marked for not using (bug#31641).
Eg. (iter-do (_ i))

3 years agoFix copying text properties in 'format'
Eli Zaretskii [Sat, 6 Feb 2021 09:54:08 +0000 (11:54 +0200)]
Fix copying text properties in 'format'

* src/editfns.c (styled_format): Fix accounting for text
properties that come from the format string.  (Bug#46317)

* test/src/editfns-tests.el (format-properties): Add new tests for
bug#46317.

3 years agoFix two small tab bar issues
Martin Rudalics [Sat, 6 Feb 2021 08:28:40 +0000 (09:28 +0100)]
Fix two small tab bar issues

* lisp/cus-start.el (frame-inhibit-implied-resize): Update version tag.
* lisp/frame.el (frame-inner-height): Do not count in tab bar.

3 years ago* lisp/emacs-lisp/pcase.el (let): Reimplement as a pcase macro
Stefan Monnier [Fri, 5 Feb 2021 20:07:47 +0000 (15:07 -0500)]
* lisp/emacs-lisp/pcase.el (let): Reimplement as a pcase macro

(pcase--macroexpand, pcase--u1): Remove handling of `let` from
`pcase`s core.

3 years ago; * src/xdisp.c (Fwindow_text_pixel_size): Fix comment.
Eli Zaretskii [Fri, 5 Feb 2021 20:04:15 +0000 (22:04 +0200)]
; * src/xdisp.c (Fwindow_text_pixel_size): Fix comment.

3 years agoFix 'C-d' on the first line in Rmail summary buffer
Eli Zaretskii [Fri, 5 Feb 2021 14:27:51 +0000 (16:27 +0200)]
Fix 'C-d' on the first line in Rmail summary buffer

* lisp/mail/rmailsum.el (rmail-summary-delete-forward): Fix
deleting backward past the beginning of the summary buffer.
(Bug#46325)

3 years agoAdd command 'dbus-monitor'
Michael Albinus [Fri, 5 Feb 2021 13:32:41 +0000 (14:32 +0100)]
Add command 'dbus-monitor'

* doc/misc/dbus.texi: (Monitoring Messages): Document 'dbus-monitor'.

* etc/NEWS: Mention 'dbus-monitor' but 'dbus-register-monitor'.
Fix typos and other oddities.

* lisp/net/dbus.el (dbus-monitor): New command.

* test/lisp/net/dbus-tests.el (dbus--test-register-service): Extend test.

3 years agoDon't hard-code ignored functions in `indent-according-to-mode'
Lars Ingebrigtsen [Fri, 5 Feb 2021 12:36:01 +0000 (13:36 +0100)]
Don't hard-code ignored functions in `indent-according-to-mode'

* lisp/indent.el (indent-line-ignored-functions): New variable
(bug#26945).
(indent-according-to-mode): Use it.

3 years ago; * src/xdisp.c (Fwindow_text_pixel_size): Another minor fix.
Eli Zaretskii [Fri, 5 Feb 2021 12:27:46 +0000 (14:27 +0200)]
; * src/xdisp.c (Fwindow_text_pixel_size): Another minor fix.

3 years agoFix last change in 'window-text-pixel-size'
Eli Zaretskii [Fri, 5 Feb 2021 12:24:01 +0000 (14:24 +0200)]
Fix last change in 'window-text-pixel-size'

* src/xdisp.c (Fwindow_text_pixel_size): Fix last change: preserve
the original Y coordinate after start_display, instead of zeroing
it out.  Reported by martin rudalics <rudalics@gmx.at>.

3 years agoFontize more automatic variables in makefile-gmake-mode
Lars Ingebrigtsen [Fri, 5 Feb 2021 12:08:50 +0000 (13:08 +0100)]
Fontize more automatic variables in makefile-gmake-mode

* lisp/progmodes/make-mode.el (makefile-gmake-font-lock-keywords):
Fontize the $ in more automatic variables (bug#27842).

3 years agoFix last change in syntax.texi
Eli Zaretskii [Fri, 5 Feb 2021 11:06:07 +0000 (13:06 +0200)]
Fix last change in syntax.texi

* doc/lispref/syntax.texi (Syntax Properties): Fix wording in last
change.  (Bug#46274)

3 years agoCorrect the lispref manual about flushing ppss info
Lars Ingebrigtsen [Fri, 5 Feb 2021 08:36:58 +0000 (09:36 +0100)]
Correct the lispref manual about flushing ppss info

* doc/lispref/syntax.texi (Syntax Properties): Correct the
information about flushing the state by copying the text from the
doc string (bug#46274).

(cherry picked from commit ff701ce2b261acce1dfcd1fe137268d87d5eab35)

3 years agoClarify how transient indentation modes are exited in the manual
Lars Ingebrigtsen [Fri, 5 Feb 2021 10:00:07 +0000 (11:00 +0100)]
Clarify how transient indentation modes are exited in the manual

* doc/emacs/indent.texi (Indentation Commands): Clarify that the
other keys don't just exit the transient mode, but are also
handled as normally (bug#46296).

3 years agoProtect against killed buffers in term-emulate-terminal
Lars Ingebrigtsen [Fri, 5 Feb 2021 09:13:23 +0000 (10:13 +0100)]
Protect against killed buffers in term-emulate-terminal

* lisp/term.el (term-emulate-terminal): Ensure that the buffer is
still alive before selecting it (bug#46323).  This avoids an error
when saying `C-x k' in an ansi-term buffer.

3 years agoFix repeating complex commands
Sean Whitton [Fri, 5 Feb 2021 09:06:22 +0000 (10:06 +0100)]
Fix repeating complex commands

* lisp/repeat.el (repeat): Fix repeating complex commands
(bug#46290).  This makes `M-: date RET C-x z' work again (like in
Emacs 21, apparently).

3 years agoMake octave-send-region deactivate the region
Lars Ingebrigtsen [Fri, 5 Feb 2021 08:45:49 +0000 (09:45 +0100)]
Make octave-send-region deactivate the region

* lisp/progmodes/octave.el (octave-send-region): Deactivate mark
after sending the region (bug#32282), since this is how these commands
usually work.

3 years agoCorrect the lispref manual about flushing ppss info
Lars Ingebrigtsen [Fri, 5 Feb 2021 08:36:58 +0000 (09:36 +0100)]
Correct the lispref manual about flushing ppss info

* doc/lispref/syntax.texi (Syntax Properties): Correct the
information about flushing the state by copying the text from the
doc string (bug#46274).

3 years ago* lisp/emacs-lisp/checkdoc.el: Doc fix; don't mention built-ins.
Stefan Kangas [Fri, 5 Feb 2021 01:39:49 +0000 (02:39 +0100)]
* lisp/emacs-lisp/checkdoc.el: Doc fix; don't mention built-ins.

3 years agoRemove some unnecessary references to Emacs 18
Stefan Kangas [Fri, 5 Feb 2021 01:27:57 +0000 (02:27 +0100)]
Remove some unnecessary references to Emacs 18

* lisp/progmodes/cmacexp.el:
* lisp/progmodes/f90.el:
* lisp/shell.el: Doc fix; don't mention Emacs 18.

3 years agoRemove Emacs 19 compat code from dcl-mode.el
Stefan Kangas [Fri, 5 Feb 2021 01:21:50 +0000 (02:21 +0100)]
Remove Emacs 19 compat code from dcl-mode.el

* lisp/progmodes/dcl-mode.el: Doc fix.
(dcl-mode-map, dcl-mode): Remove compat code for Emacs 19.

3 years agoRemove Emacs 20 compat code for header-line-format
Stefan Kangas [Fri, 5 Feb 2021 00:33:25 +0000 (01:33 +0100)]
Remove Emacs 20 compat code for header-line-format

* lisp/cedet/semantic/util-modes.el (semantic-stickyfunc-mode):
* lisp/erc/erc.el (erc-update-mode-line-buffer):
* lisp/ibuffer.el (ibuffer-use-header-line): Remove Emacs 20 compat
code; header-line-format is always defined starting with Emacs 21.

3 years ago* lisp/color.el: Remove Emacs 23.2 compat code.
Stefan Kangas [Fri, 5 Feb 2021 00:29:20 +0000 (01:29 +0100)]
* lisp/color.el: Remove Emacs 23.2 compat code.

3 years ago* lisp/textmodes/rst.el (rst-directive): Remove XEmacs compat code.
Stefan Kangas [Fri, 5 Feb 2021 00:27:14 +0000 (01:27 +0100)]
* lisp/textmodes/rst.el (rst-directive): Remove XEmacs compat code.

3 years agoAssume font-lock-mode variable is not void
Stefan Kangas [Fri, 5 Feb 2021 00:14:17 +0000 (01:14 +0100)]
Assume font-lock-mode variable is not void

* lisp/align.el (align-rules-list):
* lisp/cedet/semantic/idle.el
(semantic-idle-summary-useful-context-p):
* lisp/org/org-table.el (org-table-edit-field):
* lisp/org/org.el (org-restart-font-lock):
* lisp/progmodes/antlr-mode.el (antlr-language-option-extra):
* lisp/progmodes/idlwave.el (idlwave-choose):
* lisp/progmodes/sql.el (sql-product-font-lock):
* lisp/progmodes/verilog-mode.el
(verilog-save-font-no-change-functions, verilog-preprocess):
* lisp/vc/cvs-status.el:
* lisp/vc/smerge-mode.el (smerge-mode):
* lisp/woman.el (woman-decode-buffer): Assume font-lock-mode variable
is not void; it is preloaded.

3 years agoFix the previous change
Dmitry Gutov [Thu, 4 Feb 2021 23:17:09 +0000 (01:17 +0200)]
Fix the previous change

* lisp/progmodes/project.el (project-find-regexp):
Fix the previous change (project-root is not defined in this version).
(project-or-external-find-regexp): Same.

3 years agoBind default-directory to the project root
Dmitry Gutov [Thu, 4 Feb 2021 01:38:27 +0000 (03:38 +0200)]
Bind default-directory to the project root

* lisp/progmodes/project.el (project-find-regexp):
Bind default-directory to the project root, to save this value
in the resulting buffer (esp. if the project selector was used,
(https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg00140.html).
(project-or-external-find-regexp): Same.

(cherry picked from commit c07ebfcbe084e8219d8c2588f23f77ba4ef39087)

3 years agoMake sure default-directory relates to the originating buffer
Dmitry Gutov [Sat, 9 Jan 2021 00:08:59 +0000 (02:08 +0200)]
Make sure default-directory relates to the originating buffer

* lisp/progmodes/xref.el (xref--show-xref-buffer):
Pick up default-directory value from the caller
(https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00551.html).
(xref-show-definitions-buffer-at-bottom): Same.

(cherry picked from commit 6e73e07a6f5cbdd1c5ae6e0f3fbd0f8f56813f1a)

3 years agocperl-mode: eliminate dead code
Harald Jörg [Thu, 4 Feb 2021 19:52:20 +0000 (20:52 +0100)]
cperl-mode: eliminate dead code

* lisp/progmodes/cperl-mode.el (cperl-update-syntaxification):
Eliminate check for `syntax-propertize-rules` (always true)
and eliminate unused first parameter.
(cperl-mode): Eliminate obsolete `font-lock-syntactic-keywords`,
Eliminate check for `syntax-propertize-rules` (always true).
(cperl-fontify-syntaxically): Eliminate call to
no-longer-existing function `edebug-backtrace` (bug#46302).

3 years agoInitialize signal descriptions after pdumping
Eli Zaretskii [Thu, 4 Feb 2021 18:21:18 +0000 (20:21 +0200)]
Initialize signal descriptions after pdumping

* src/sysdep.c (init_signals) [!HAVE_DECL_SYS_SIGLIST]: Reinit
sys_siglist also after pdumping.  (Bug#46284)

3 years agoAvoid overwriting minibuffer prompt by keystrokes echo
Eli Zaretskii [Thu, 4 Feb 2021 17:35:07 +0000 (19:35 +0200)]
Avoid overwriting minibuffer prompt by keystrokes echo

* src/lread.c (Fread_char, Fread_event, Fread_char_exclusive):
Call cancel_echoing to make sure the prompt is not obscured by
keystrokes echo.  (Bug#46243)

3 years agoDeactivate region in `C-c C-r' in python-mode
Lars Ingebrigtsen [Thu, 4 Feb 2021 17:24:28 +0000 (18:24 +0100)]
Deactivate region in `C-c C-r' in python-mode

* lisp/progmodes/python.el (python-shell-send-region): Deactivate
mark after executing (bug#28789).  This is how this command worked
in Emacs 24, apparently.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 4 Feb 2021 16:02:27 +0000 (18:02 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years agoFix 'window-text-pixel-size' for short spans of text
Eli Zaretskii [Thu, 4 Feb 2021 16:00:29 +0000 (18:00 +0200)]
Fix 'window-text-pixel-size' for short spans of text

* src/xdisp.c (Fwindow_text_pixel_size): Support the use case
where FROM and TO belong to the same screen line.  Reported by
Yuan Fu <casouri@gmail.com>.

3 years agoClarify the "Sentinels" node in the lispref manual
Lars Ingebrigtsen [Thu, 4 Feb 2021 11:02:53 +0000 (12:02 +0100)]
Clarify the "Sentinels" node in the lispref manual

* doc/lispref/processes.texi (Sentinels): Mention "run" and that
the strings can be anything (bug#30461).

(cherry picked from commit 859a4cb6b22f75a3456e29d08fcfe9b8940fbe8b)

3 years agoImprove filling of Emacs Lisp doc strings
Lars Ingebrigtsen [Thu, 4 Feb 2021 15:12:41 +0000 (16:12 +0100)]
Improve filling of Emacs Lisp doc strings

* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): When filling
a Lisp string, try to avoid filling bits that follow it
(bug#28937).

3 years agoAllow a :variable keyword in define-globalized-minor-mode
Lars Ingebrigtsen [Thu, 4 Feb 2021 14:22:40 +0000 (15:22 +0100)]
Allow a :variable keyword in define-globalized-minor-mode

* doc/lispref/modes.texi (Defining Minor Modes): Document it.
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Allow specifying a :variable to be used if the underlying mode has
a divergent variable to store the state (bug#29081).

3 years agoFix previous ibuffer patch
Lars Ingebrigtsen [Thu, 4 Feb 2021 13:36:58 +0000 (14:36 +0100)]
Fix previous ibuffer patch

* lisp/ibuffer.el (ibuffer-last-sorting-mode): Restore variable
removed by mistake in previous change.

3 years agoMake the recency sorting stable when we have inverted sorting
Lars Ingebrigtsen [Thu, 4 Feb 2021 11:59:16 +0000 (12:59 +0100)]
Make the recency sorting stable when we have inverted sorting

* lisp/ibuffer.el (recency): Remove.
(recency): New macro function so that sorting by recency is
stable when inverted sorting is switched on (bug#30129).

3 years agoRevert "Tweak how ibuffer-invert-sorting updates the buffer"
Lars Ingebrigtsen [Thu, 4 Feb 2021 11:32:08 +0000 (12:32 +0100)]
Revert "Tweak how ibuffer-invert-sorting updates the buffer"

This reverts commit b8b3263eab688b97530a7bf7d565b084df56ea08.

This doesn't fix other instances of ibuffer-redisplay

3 years agoTweak how ibuffer-invert-sorting updates the buffer
Lars Ingebrigtsen [Thu, 4 Feb 2021 11:26:00 +0000 (12:26 +0100)]
Tweak how ibuffer-invert-sorting updates the buffer

* lisp/ibuf-ext.el (ibuffer-invert-sorting): Enable calling this
function repeatedly with more predictable results (bug#30129).

3 years agoDon't ask the user to make a bug report on missing arglists
Lars Ingebrigtsen [Thu, 4 Feb 2021 11:08:46 +0000 (12:08 +0100)]
Don't ask the user to make a bug report on missing arglists

* lisp/help-fns.el (help-fns--signature): Don't ask the user to
make a bug report (bug#30223) because the symbol may very well be
one that the user has defined themselves.
(help-fns-function-description-header): Ditto.

3 years agoClarify the "Sentinels" node in the lispref manual
Lars Ingebrigtsen [Thu, 4 Feb 2021 11:02:53 +0000 (12:02 +0100)]
Clarify the "Sentinels" node in the lispref manual

* doc/lispref/processes.texi (Sentinels): Mention "run" and that
the strings can be anything (bug#30461).

3 years agoAllow eshell to have an "erasedups"-like history
Lars Ingebrigtsen [Thu, 4 Feb 2021 10:55:44 +0000 (11:55 +0100)]
Allow eshell to have an "erasedups"-like history

* lisp/eshell/em-hist.el (eshell-add-input-to-history): Use the
new value (bug#30466).
(eshell-hist-ignoredups): Allow "erasedups"-like value.

3 years agoUpdate description of 'tramp-crypt-remove-directory'
Robert Pluim [Thu, 4 Feb 2021 10:24:13 +0000 (11:24 +0100)]
Update description of 'tramp-crypt-remove-directory'

* doc/misc/tramp.texi (Keeping files encrypted): Correct name of
function to use to indicate files should no longer be encrypted,
and update its description.

3 years agoBe stricter when going back to the previous node in Info-find-node-2
Lars Ingebrigtsen [Thu, 4 Feb 2021 10:23:21 +0000 (11:23 +0100)]
Be stricter when going back to the previous node in Info-find-node-2

* lisp/info.el (Info-find-node-2): When going back to the previous
node, be strict (bug#31137) since we have the exact node name.

3 years ago* lisp/replace.el (occur-rename-buffer): Check for overlay (bug#46268).
Juri Linkov [Thu, 4 Feb 2021 09:17:54 +0000 (11:17 +0200)]
* lisp/replace.el (occur-rename-buffer): Check for overlay (bug#46268).

(occur-1): Don't use occur--garbage-collect-revert-args
when reverting the Occur buffer with same bufs.

3 years agoFix epg filtering out keys that contain revoked IDs
Lars Ingebrigtsen [Thu, 4 Feb 2021 08:25:28 +0000 (09:25 +0100)]
Fix epg filtering out keys that contain revoked IDs

* lisp/epg.el (epg--filter-revoked-keys): Only filter out the
revoked user ids, not the entire key that contains revoked user
ids (bug#46138).

3 years agoFix problem with non-ASCII characters in nnmaildir
Alexandre Duret-Lutz [Mon, 11 Jan 2021 14:27:54 +0000 (15:27 +0100)]
Fix problem with non-ASCII characters in nnmaildir

* lisp/gnus/nnmaildir.el (nnmaildir-request-article): Enable
multipart 8bit-content-transfer-encoded files to be displayed
correctly by reading as `raw-text' instead of having Emacs
(incorrectly) decode the files (bug#44307).

Copyright-paperwork-exempt: yes

3 years agoDon't set removed variable facemenu-unlisted-faces
Stefan Kangas [Thu, 4 Feb 2021 07:16:33 +0000 (08:16 +0100)]
Don't set removed variable facemenu-unlisted-faces

* lisp/vc/ediff-init.el (ediff-hide-face): Redefine as obsolete
function alias for 'ignore'; the variable 'facemenu-unlisted-faces'
was removed in Emacs 22.  Remove all calls.

* lisp/mh-e/mh-e.el: Add comment saying that the variable
'facemenu-unlisted-faces' is removed.

3 years ago* lisp/man.el (Man-notify-method): Remove Emacs 19.28 compat code.
Stefan Kangas [Thu, 4 Feb 2021 07:12:22 +0000 (08:12 +0100)]
* lisp/man.el (Man-notify-method): Remove Emacs 19.28 compat code.

3 years agoUse require instead of boundp+load-library in double.el
Stefan Kangas [Thu, 4 Feb 2021 04:02:42 +0000 (05:02 +0100)]
Use require instead of boundp+load-library in double.el

* lisp/double.el (isearch): Use require instead of
boundp+load-library.

3 years agoRemove some unnecessary references to Emacs 19
Stefan Kangas [Thu, 4 Feb 2021 03:53:02 +0000 (04:53 +0100)]
Remove some unnecessary references to Emacs 19

* lisp/emacs-lisp/elp.el:
* lisp/mouse-copy.el:
* lisp/mouse-drag.el:
* lisp/progmodes/simula.el (simula-mode-map):
* lisp/term.el (term-matching-input-from-input-string):
* lisp/vcursor.el: Doc fix; don't mention Emacs 19.

3 years agoRemove XEmacs compat code from edebug.el
Stefan Kangas [Thu, 4 Feb 2021 03:30:03 +0000 (04:30 +0100)]
Remove XEmacs compat code from edebug.el

* lisp/emacs-lisp/edebug.el (edebug-window-live-p, edebug-mark):
Make obsolete.  Update callers.

3 years agoBind default-directory to the project root
Dmitry Gutov [Thu, 4 Feb 2021 01:38:27 +0000 (03:38 +0200)]
Bind default-directory to the project root

* lisp/progmodes/project.el (project-find-regexp):
Bind default-directory to the project root, to save this value
in the resulting buffer (esp. if the project selector was used,
(https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg00140.html).
(project-or-external-find-regexp): Same.

3 years agoTramp code cleanup
Michael Albinus [Wed, 3 Feb 2021 17:48:09 +0000 (18:48 +0100)]
Tramp code cleanup

* lisp/net/tramp.el (tramp-signal-hook-function)
(tramp-handle-access-file, tramp-handle-copy-directory)
(tramp-handle-directory-files, tramp-handle-file-local-copy)
(tramp-handle-insert-file-contents, tramp-handle-load):
* lisp/net/tramp-adb.el (tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-make-directory)
(tramp-adb-handle-file-local-copy, tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file):
* lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file)
(tramp-crypt-handle-directory-files)
(tramp-crypt-handle-make-directory):
* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error)
(tramp-gvfs-do-copy-or-rename-file)
(tramp-gvfs-handle-make-directory):
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file)
(tramp-rclone-handle-directory-files):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-symbolic-link)
(tramp-sh-handle-directory-files-and-attributes)
(tramp-sh-handle-file-name-all-completions)
(tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file)
(tramp-sh-handle-make-directory)
(tramp-sh-handle-file-local-copy)
(tramp-sh-inotifywait-process-filter):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file, tramp-smb-handle-directory-files)
(tramp-smb-handle-file-local-copy)
(tramp-smb-handle-make-directory, tramp-smb-handle-rename-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Unify error report.

* lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args
with other `tramp-*-file-name-handler'.

* lisp/net/tramp-compat.el (tramp-error): Declare.
(tramp-compat-file-missing): New defsubst.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Handle volatile files.
(tramp-gvfs-set-attribute): New defun.
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-times)
(tramp-gvfs-handle-set-file-uid-gid): Use it.

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
Use `msg-operation'.

* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Remove superfluous `format:
(tramp-smb-maybe-open-connection): Simplify loop.

* lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from
symlinked files.

* test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun.
(tramp--test-nextcloud-p): Remove.
(tramp-test40-special-characters-with-ls): Do not skip on MS Windows.
(tramp-test41-utf8): Skip if needed.

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 3 Feb 2021 16:11:08 +0000 (08:11 -0800)]
Merge from origin/emacs-27

7355209f53 (origin/emacs-27) * lisp/window.el (recenter-top-bottom): ...
dc78f8a4ea (emacs-27) url-http.el: Special-case NTLM authentication
85b0137858 * lisp/isearch.el (isearch-lazy-highlight): Fix defcustom ...
cbeda21083 Sync latest SKK-JISYO.L

3 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 3 Feb 2021 16:11:08 +0000 (08:11 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

0bc4b003d7 ; emacs-26 → emacs-27

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 3 Feb 2021 16:11:08 +0000 (08:11 -0800)]
Merge from origin/emacs-27

9c75434173 Fix build failure on macOS 10.7 (bug#46036)
ca44ea18ef Improve documentation of auto-resize-tool/tab-bars

3 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 3 Feb 2021 16:11:08 +0000 (08:11 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

9e45c29224 (xref-revert-buffer): Also 'erase-buffer' when handling a ...

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 3 Feb 2021 16:11:08 +0000 (08:11 -0800)]
Merge from origin/emacs-27

74a71c41e0 (tag: emacs-27.1.91) Update files for 27.1.91 pretest

# Conflicts:
# ChangeLog.3
# etc/AUTHORS
# lisp/ldefs-boot.el

3 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 3 Feb 2021 16:11:04 +0000 (08:11 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

86a2207d92 Bump Emacs version to 27.1.91

3 years agoMake backslash characters no longer escape in `f90-mode'
Lars Ingebrigtsen [Wed, 3 Feb 2021 13:36:17 +0000 (14:36 +0100)]
Make backslash characters no longer escape in `f90-mode'

* lisp/progmodes/f90.el (f90-backslash-not-special): Make obsolete
(bug#32766).
(f90-mode-syntax-table): Make the backslash be a normal
(non-escape) character, which is the default since about 2007 (and
F2K): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34203

3 years agoUpdate lisp/progmodes/verilog-mode.el
Wilson Snyder [Wed, 3 Feb 2021 04:22:44 +0000 (23:22 -0500)]
Update lisp/progmodes/verilog-mode.el

* lisp/progmodes/verilog-mode.el: Cleanup compile-time warning
suppression.  Use underscore for unused arguments and other style
cleanups.  Use '# for function references.  By Stefan Monnier.
(verilog-auto-reset, verilog-sig-tieoff):
Fix AUTORESET '0 (#1714). Reported by Paul Adams.
(verilog-simplify-range-expression):
Fix AUTOWIRE simplifying X/Y where there is a remainder (#1712).
Reported by Joachim Lechner.
(verilog-read-sub-decls-expr):
Fix multiplication in multidimensional AUTOINST output (#1698).
Reported by alanamckee.
(verilog-at-constraint-p, verilog-at-streaming-op-p, verilog-streaming-op-re):
Add streaming operator support (#1692) (#1516),
(verilog-auto-assign-modport, verilog-auto-inout-modport):
Support adding prefix to AUTOASSIGNMODPORT and AUTOINOUTMODPORT (#1690).
(verilog-signals-matching-dir-re):
Fix error when matching regexp with 2D packed memory.
Reported by Chris DeMarco.
(verilog-declaration-core-re): Allow parameter
declaration statements to align like any other declaration (#1683).
Suggested by Vinam Arora.
(verilog-auto-inout, verilog-auto-inout-in)
(verilog-auto-inout-module, verilog-auto-input, verilog-auto-inst)
(verilog-auto-inst-param, verilog-auto-output-every)
(verilog-signals-matching-regexp)
(verilog-signals-not-matching-regexp):
When "?!" is at the front of a signal-matching regexp, invert it.
(verilog-declaration-varname-matcher)
(verilog-highlight-max-lookahead, verilog-mode)
(verilog-single-declaration-end) (verilog-font-lock-keywords-1):
Improve syntax highlighting in declaration statements, and support
multi-line declarations, #1681.  Reported by Vinam Arora.