]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoMake revert-buffer preserve buffer-readedness
Lars Ingebrigtsen [Thu, 22 Jul 2021 14:24:58 +0000 (16:24 +0200)]
Make revert-buffer preserve buffer-readedness

* lisp/files.el (revert-buffer): Preserve buffer-readedness
(bug#35166).

3 years ago`term-char-mode' doc string clarification
Lars Ingebrigtsen [Thu, 22 Jul 2021 14:17:59 +0000 (16:17 +0200)]
`term-char-mode' doc string clarification

* lisp/term.el (term-char-mode): Document behaviour (bug#49186).

3 years agoBind the GIT_LITERAL_PATHSPECS environment variable
Dmitry Gutov [Thu, 22 Jul 2021 12:41:52 +0000 (14:41 +0200)]
Bind the GIT_LITERAL_PATHSPECS environment variable

* lisp/vc/vc-git.el (vc-git-command):
(vc-git--call): Ensure that git interprets file names literally
(bug#39452).

3 years agoAvoid failing in desktop-clear due to killed buffers
Sergey Organov [Thu, 22 Jul 2021 12:22:26 +0000 (14:22 +0200)]
Avoid failing in desktop-clear due to killed buffers

* lisp/desktop.el (desktop-clear): check that buffer is not already
killed before attempting to kill it. A buffer might become killed as
part of regular operation as a side-effect of killing another buffer,
and then attempt to kill it again causes error (bug#49692).

Copyright-paperwork-exempt: yes

3 years agoRemove the (value) bits from cus-start Customize strings
Lars Ingebrigtsen [Thu, 22 Jul 2021 12:14:33 +0000 (14:14 +0200)]
Remove the (value) bits from cus-start Customize strings

* lisp/cus-start.el (standard): Don't mention the Lisp values in
the choice strings, because that's just confusing in the Customize
interface (bug#49687).

3 years agoAvoid byte-compilation warning
Eli Zaretskii [Thu, 22 Jul 2021 09:14:50 +0000 (12:14 +0300)]
Avoid byte-compilation warning

* test/src/buffer-tests.el (buffer-tests-inhibit-buffer-hooks):
Avoid byte-compiler warning.  (Bug#49667)

3 years ago; * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Doc fix.
Eli Zaretskii [Thu, 22 Jul 2021 07:31:14 +0000 (10:31 +0300)]
; * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Doc fix.

3 years agoMove generalized variable specs from cl-lib.el to gv.el
Lars Ingebrigtsen [Wed, 21 Jul 2021 22:21:34 +0000 (00:21 +0200)]
Move generalized variable specs from cl-lib.el to gv.el

* lisp/emacs-lisp/cl-lib.el: Move all the generalized variable
specifications from cl-lib.el...
* lisp/emacs-lisp/gv.el: ... to gv.el.  This will make things like
`(setf (getenv "FOO") "BAR")' work without requiring anything,
since `setf' lives in gv.el (bug#49651).

3 years agoMake vc-git-mode-line-string more robust
Yan Gajdos [Wed, 21 Jul 2021 21:56:44 +0000 (23:56 +0200)]
Make vc-git-mode-line-string more robust

* lisp/vc/vc-git.el (vc-git-mode-line-string): Make function more
robust (bug#49683).  It could previously error out under certain
conditions, like moving directories in and out of the
VC-controlled tree.

Copyright-paperwork-exempt: yes

3 years ago* lisp/cus-start.el: Add mode-line-compact to Customize
Illia Ostapyshyn [Wed, 21 Jul 2021 21:53:17 +0000 (23:53 +0200)]
* lisp/cus-start.el: Add mode-line-compact to Customize

* lisp/cus-start.el (standard): Make `mode-line-compact' into a
user option (bug#49687).

Copyright-paperwork-exempt: yes

3 years agoMake input of multi-key inputs in different emacsclients more logical
Logan Perkins [Wed, 21 Jul 2021 15:56:20 +0000 (17:56 +0200)]
Make input of multi-key inputs in different emacsclients more logical

* src/keyboard.c (read_key_sequence): Don't continue the input of
multi-key commands in one emacsclient in another (bug#39687).

3 years ago* src/eval.c (signal_quit_p): Fix the usual int/Lisp_Object mixup
Stefan Monnier [Wed, 21 Jul 2021 15:12:25 +0000 (11:12 -0400)]
* src/eval.c (signal_quit_p): Fix the usual int/Lisp_Object mixup

3 years ago* lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Add arg `category`
Stefan Monnier [Wed, 21 Jul 2021 15:11:50 +0000 (11:11 -0400)]
* lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Add arg `category`

Use it to obey `byte-compile-warnings`.

(macroexp--warn-wrap): Add arg `category`.
(macroexp-macroexpand, macroexp--expand-all): Use it.

* lisp/emacs-lisp/cconv.el (cconv--convert-funcbody, cconv-convert):
Mark the warnings as `lexical`.

* lisp/emacs-lisp/eieio-core.el (eieio-oref, eieio-oref-default)
(eieio-oset-default):
* lisp/emacs-lisp/eieio.el (defclass): Adjust to new calling convention.

3 years agoMake `C-g' after `M-x' not give a backtrace unless required
Lars Ingebrigtsen [Wed, 21 Jul 2021 14:53:54 +0000 (16:53 +0200)]
Make `C-g' after `M-x' not give a backtrace unless required

* src/eval.c (signal_quit_p): New function.
(maybe_call_debugger): React to all `quit' signals (bug#49675).

* src/keyboard.c (cmd_error_internal, menu_item_eval_property_1):
Ditto.

3 years agoSpeed up by storing frame faces in hash tables instead of alists
Jashank Jeremy [Wed, 21 Jul 2021 14:01:03 +0000 (16:01 +0200)]
Speed up by storing frame faces in hash tables instead of alists

* src/frame.h (struct frame): Add face_hash_table, remove face_alist.
(fset_face_hash_table): New function.
(fset_face_alist): Remove.
* src/frame.c (make_frame): Initialize f->face_hash_table.
(Fmake_terminal_frame): Update to work with hash tables instead of
alists.
* src/xfaces.c (lface_from_face_name_no_resolve):
(Finternal_make_lisp_face):
(update_face_from_frame_parameter): Update to work with hash tables
instead of alists.
(Fframe_face_hash_table): New function.
(Fframe_face_alist): Move to faces.el as frame-face-alist.
(syms_of_xfaces): Add frame_face_hash_table.

* lisp/progmodes/elisp-mode.el (elisp--eval-defun-1):
* lisp/frame.el (frame-set-background-mode): Update to work with hash
tables instead of alists.
* lisp/faces.el (face-new-frame-defaults): Mark obsolete.
(face-list): Update to use face--new-frame-defaults.
(frame-face-alist): Moved here from src/xfaces.c.
(x-create-frame-with-faces): Update to handle subtle semantic change
to how frame faces propagate, which otherwise breaks frame creation
with reverse video enabled (bug#41200).

Reworked from a patch by Clément Pit-Claudel <clement.pitclaudel@live.com>.

3 years ago* doc/lispref/display.texi (Overlay Properties): Tweak further
Stefan Monnier [Wed, 21 Jul 2021 13:09:43 +0000 (09:09 -0400)]
* doc/lispref/display.texi (Overlay Properties): Tweak further

The "character after point" is not as important as point itself

3 years agoRemove some "is"es from previous json checkin
Lars Ingebrigtsen [Wed, 21 Jul 2021 12:22:54 +0000 (14:22 +0200)]
Remove some "is"es from previous json checkin

* lisp/subr.el (json-available-p):
* doc/lispref/text.texi (Parsing JSON): Fix typo in last check-in.

3 years agoFactor out char_table_ref_simple for readability
Stefan Kangas [Wed, 21 Jul 2021 12:01:57 +0000 (14:01 +0200)]
Factor out char_table_ref_simple for readability

* src/chartab.c (char_table_ref_simple): New function...
(sub_char_table_ref_and_range, char_table_ref_and_range):
...factored out from here. (bug#45550).

3 years agoFix final test for invalid base64url chars
Lars Ingebrigtsen [Wed, 21 Jul 2021 11:28:17 +0000 (13:28 +0200)]
Fix final test for invalid base64url chars

* src/fns.c (base64_decode_1): Fix test for invalid base64url
(bug#45562).  Noted by Andreas Schwab.

3 years agoFixed a typo in Gnus manual
Pankaj Jangid [Wed, 21 Jul 2021 06:45:23 +0000 (12:15 +0530)]
Fixed a typo in Gnus manual

* doc/misc/gnus.texi (Washing Mail): Fixed typo

3 years agoFix bug-reference.el compilation warning
Lars Ingebrigtsen [Wed, 21 Jul 2021 11:15:05 +0000 (13:15 +0200)]
Fix bug-reference.el compilation warning

* lisp/progmodes/bug-reference.el (bug-reference-mode): Silence a
compilation warning (bug#49677).

3 years agoRestore evaluation logic in dired-guess-default
Lars Ingebrigtsen [Wed, 21 Jul 2021 11:12:05 +0000 (13:12 +0200)]
Restore evaluation logic in dired-guess-default

* lisp/dired-x.el (dired-guess-default): Restore the `eval' bits
also removed in a previous commit (bug#48071).

3 years agoFix dired-guess-default logic after previous change
Lars Ingebrigtsen [Wed, 21 Jul 2021 11:04:06 +0000 (13:04 +0200)]
Fix dired-guess-default logic after previous change

* lisp/dired-x.el (dired-guess-default): Restore previous logic --
require matches for all files (bug#48071).

3 years agoAdd json-available-p
Lars Ingebrigtsen [Wed, 21 Jul 2021 10:49:11 +0000 (12:49 +0200)]
Add json-available-p

* doc/lispref/text.texi (Parsing JSON): Document it.
* lisp/subr.el (json-available-p): New function (bug#49660).

3 years agoMention rear-advance in relation to the keymap overlay property
Lars Ingebrigtsen [Wed, 21 Jul 2021 10:33:42 +0000 (12:33 +0200)]
Mention rear-advance in relation to the keymap overlay property

* doc/lispref/display.texi (Overlay Properties): Mention the
effect of REAR-ADVANCE (bug#459).

3 years agoFix mistake in `quote` optimiser
Mattias Engdegård [Wed, 21 Jul 2021 08:54:43 +0000 (10:54 +0200)]
Fix mistake in `quote` optimiser

Found by Pip Cet.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-quote): Fix mistake that
made this optimiser ineffective at removing quoting of nil, t, and
keywords.  The only obvious consequence is that we no longer need...
(byte-optimize-form): ...a 'nil => nil normalising step here; remove.
(byte-optimize-form-code-walker): Make the compiler warn about (quote).

3 years ago* lisp/button.el (button-map): Bind [follow-link] to 'mouse-face' (bug#49626)
Juri Linkov [Tue, 20 Jul 2021 19:53:06 +0000 (22:53 +0300)]
* lisp/button.el (button-map): Bind [follow-link] to 'mouse-face' (bug#49626)

3 years ago; * lisp/emacs-lisp/byte-opt.el (byte-optimize-eq): Fix last change.
Mattias Engdegård [Tue, 20 Jul 2021 17:32:11 +0000 (19:32 +0200)]
; * lisp/emacs-lisp/byte-opt.el (byte-optimize-eq): Fix last change.

3 years agoStrength-reduce (eq X nil) to (not X)
Mattias Engdegård [Tue, 20 Jul 2021 13:46:32 +0000 (15:46 +0200)]
Strength-reduce (eq X nil) to (not X)

* lisp/emacs-lisp/byte-opt.el (byte-optimize-eq): New optimisation,
which results in better test and branch code generation where it
applies.

3 years agoCount (not X) as a switch condition
Mattias Engdegård [Tue, 20 Jul 2021 15:23:11 +0000 (17:23 +0200)]
Count (not X) as a switch condition

* lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix):
Treat (not VAR) and (null VAR) as (eq VAR nil) when computing the
extent of switch ops.

3 years ago* lisp/shadowfile.el (shadow-homedir): Add slash.
Michael Albinus [Tue, 20 Jul 2021 16:44:51 +0000 (18:44 +0200)]
* lisp/shadowfile.el (shadow-homedir): Add slash.

(shadow-contract-file-name): Use it.  Bug#49596.

3 years ago; * etc/NEWS: Announce the change in json.c behavior on MS-Windows.
Eli Zaretskii [Tue, 20 Jul 2021 16:00:53 +0000 (19:00 +0300)]
; * etc/NEWS: Announce the change in json.c behavior on MS-Windows.

3 years agoFix documentation of a recent changeset
Eli Zaretskii [Tue, 20 Jul 2021 15:37:40 +0000 (18:37 +0300)]
Fix documentation of a recent changeset

* lisp/autorevert.el (auto-revert-mode):
* lisp/files.el (revert-buffer): Doc fix.  (Bug#49661)

3 years agoFix Bug#49636
Michael Albinus [Tue, 20 Jul 2021 15:28:29 +0000 (17:28 +0200)]
Fix Bug#49636

* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Let-bind `auto-save-default'.  (Bug#49636)

3 years agoImprove auto-revert-mode and revert-buffer doc strings
Konstantin Kharlamov [Tue, 20 Jul 2021 14:38:55 +0000 (16:38 +0200)]
Improve auto-revert-mode and revert-buffer doc strings

* lisp/autorevert.el (auto-revert-mode):
* lisp/files.el (revert-buffer): Mention that there is
revert-buffer-with-fine-grain that is better suited for markers
preservation (bug#49661).

3 years agoMake `kill-all-local-variables' also remove lambda from hooks
jakanakaevangeli [Tue, 20 Jul 2021 14:31:24 +0000 (16:31 +0200)]
Make `kill-all-local-variables' also remove lambda from hooks

* src/buffer.c (reset_buffer_local_variables): Also remove
non-symbol elements from hook variables (bug#46407).

3 years agoMake dired-guess-default return all matching programs
Lars Ingebrigtsen [Tue, 20 Jul 2021 14:16:09 +0000 (16:16 +0200)]
Make dired-guess-default return all matching programs

* lisp/dired-x.el (dired-guess-default): Return all matching
programs (bug#48071).

3 years agoAllow installing packages with DOS line endings
Ioannis Kappas [Tue, 20 Jul 2021 13:53:34 +0000 (15:53 +0200)]
Allow installing packages with DOS line endings

* lisp/emacs-lisp/package.el (package-install-from-buffer): Allow
installing files with different line ending conventions (Unix, DOS
and Macos) (bug#48137).

3 years agoSignal an error in json.c function if not available
Lars Ingebrigtsen [Tue, 20 Jul 2021 12:47:07 +0000 (14:47 +0200)]
Signal an error in json.c function if not available

* src/json.c (Fjson_serialize, Fjson_insert)
(Fjson_parse_string, Fjson_parse_buffer, syms_of_json): Signal
`json-unavailable' if jansson isn't available (bug#48228).

3 years agoQuit minibuffers without aborting kmacros
Miha Rihtaršič [Tue, 20 Jul 2021 12:36:45 +0000 (14:36 +0200)]
Quit minibuffers without aborting kmacros

* doc/lispref/commands.texi (Quitting): Document `minibuffer-quit'
(Recursive Editing): Document throwing of function values to `exit'.

* doc/lispref/errors.texi (Standard Errors): Document
`minibuffer-quit'

* lisp/minibuffer.el (minibuffer-quit-recursive-edit): New function.

* lisp/simple.el (minibuffer-error-function): Do not abort keyboard
macro execution if is minibuffer-quit is signaled (bug#48603).
* src/data.c (syms_of_data): New error symbol `minibuffer-quit'

* src/keyboard.c (recursive_edit_1): Implement throwing of function
values to `exit`.  In that case, the function will be called without
arguments before returning from the command loop.
(cmd_error):
(Fcommand_error_default_function): Do not abort keyboard macro
execution if minibuffer-quit is signaled.
(command_loop_2): New argument HANDLERS.

* src/macros.c (Fexecute_kbd_macro): Use command_loop_2 instead of
command_loop_1.

* src/minibuf.c (Fabort_minibuffers): Use it.

3 years agoFix problem with certain fonts in ftfont_shape_by_flt
Kenichi Handa [Tue, 20 Jul 2021 12:22:53 +0000 (14:22 +0200)]
Fix problem with certain fonts in ftfont_shape_by_flt

* src/ftfont.c (ftfont_shape_by_flt): Fix problem with unusual OTF
tables in fonts (bug#49066).

3 years agoAdd commands 'kill-matching-lines' and 'copy-matching-lines'
Earl Hyatt [Sat, 19 Jun 2021 12:30:31 +0000 (08:30 -0400)]
Add commands 'kill-matching-lines' and 'copy-matching-lines'

* doc/emacs/search.texi: Document these additions.
* lisp/replace.el:
Add the commands 'kill-matching-lines' and 'copy-matching-lines'.

'kill-matching-lines' is like 'flush-lines', but adds the lines to the
kill ring as a single string, keeping line endings.
'copy-matching-lines' is like 'kill-matching-lines', but only copies
those lines instead of killing them.

3 years agoTweak example in Function Indirection node in the lispref manual
Lars Ingebrigtsen [Tue, 20 Jul 2021 12:06:40 +0000 (14:06 +0200)]
Tweak example in Function Indirection node in the lispref manual

* doc/lispref/eval.texi (Function Indirection): Make example more
robust (bug#49647).  Suggested by Scott Marks
<scott.c.marks@gmail.com>.

3 years agoPut command line file names and mouse dragging onto 'file-name-history'
Lars Ingebrigtsen [Tue, 20 Jul 2021 11:48:10 +0000 (13:48 +0200)]
Put command line file names and mouse dragging onto 'file-name-history'

* lisp/dnd.el (dnd-open-local-file): Add file to history.
* lisp/files.el (file-name-history--add): New function (bug#12915).

* lisp/startup.el (command-line-1): Add file to history.

3 years agoMention `overlays-in' in the `overlays-at' doc string
Lars Ingebrigtsen [Tue, 20 Jul 2021 11:32:39 +0000 (13:32 +0200)]
Mention `overlays-in' in the `overlays-at' doc string

* src/buffer.c (Foverlays_at): Mention `overlays-in' in the doc
string (bug#459).

3 years agoMake wdired work better in narrowed-to buffers
Lars Ingebrigtsen [Mon, 19 Jul 2021 17:03:28 +0000 (19:03 +0200)]
Make wdired work better in narrowed-to buffers

* lisp/wdired.el (wdired--before-change-fn):
(wdired--restore-properties): Widen before doing anything so that
we get all the changed bits (bug#49124).

3 years agoAdd function for filtering ANSI sequences when compiling
Ivan Sokolov [Mon, 19 Jul 2021 16:54:18 +0000 (18:54 +0200)]
Add function for filtering ANSI sequences when compiling

* lisp/ansi-color.el (ansi-color-for-compilation-mode): New user
option (bug#49609).
(ansi-color-compilation-filter): New function.

3 years agoFix typos in a recent change
Eli Zaretskii [Mon, 19 Jul 2021 16:46:43 +0000 (19:46 +0300)]
Fix typos in a recent change

* src/buffer.c (Fmake_indirect_buffer): Fix a typo in a recent
change.

* doc/lispref/buffers.texi (Indirect Buffers): Fix punctuation.

3 years agoMake the `s' command in *Help* work for Lisp variables defined in C
Lars Ingebrigtsen [Mon, 19 Jul 2021 16:35:09 +0000 (18:35 +0200)]
Make the `s' command in *Help* work for Lisp variables defined in C

* lisp/help-fns.el (describe-variable): Store the type.
* lisp/help-mode.el (help-view-source): Use the type.  This fixes
the problem when looking for a variable defined in a C file.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Mon, 19 Jul 2021 16:24:41 +0000 (19:24 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years ago; Fix a typo in a recent change
Eli Zaretskii [Mon, 19 Jul 2021 16:24:01 +0000 (19:24 +0300)]
; Fix a typo in a recent change

* src/callint.c (syms_of_callint) <mouse-leave-buffer-hook>: Fix a
typo in the doc string.

3 years agoAdd inhibit-buffer-hooks to `make-indirect-buffer'
Lars Ingebrigtsen [Mon, 19 Jul 2021 16:23:07 +0000 (18:23 +0200)]
Add inhibit-buffer-hooks to `make-indirect-buffer'

* doc/lispref/buffers.texi (Indirect Buffers): Document it (bug#49160).

* src/buffer.c (Fmake_indirect_buffer): Allow controlling whether
to inhibit buffer hooks.

3 years agoMake make-indirect-buffer inherit inhibit-buffer-hook from base buffer
dickmao [Mon, 19 Jul 2021 16:12:17 +0000 (18:12 +0200)]
Make make-indirect-buffer inherit inhibit-buffer-hook from base buffer

* src/buffer.c (Fmake_indirect_buffer):
Match base buffer's inhibit-buffer-hooks.
* test/src/buffer-tests.el (buffer-tests-inhibit-buffer-hooks-indirect):
Add a test (bug#49160).

3 years agoDocument recent changes in 'comint-delete-output' (bug#1496)
Eli Zaretskii [Mon, 19 Jul 2021 16:21:49 +0000 (19:21 +0300)]
Document recent changes in 'comint-delete-output' (bug#1496)

* doc/emacs/misc.texi (Shell Mode): Document the new optional
behavior of 'C-c C-o'.

* etc/NEWS: Call out the new behavior of 'C-c C-o'.

3 years agoUse 'remember-buffer' in remember.el doc strings.
Gabriel do Nascimento Ribeiro [Mon, 19 Jul 2021 16:04:25 +0000 (18:04 +0200)]
Use 'remember-buffer' in remember.el doc strings.

* lisp/textmodes/remember.el (remember-initial-contents)
(remember-before-remember-hook, remember-destroy): Refer to
`remember-buffer'.

* lisp/textmodes/remember.el (remember-buffer): Make into
defcustom (bug#49373).

3 years agoUse 'remember-buffer' in remember.el doc strings.
Gabriel do Nascimento Ribeiro [Mon, 19 Jul 2021 15:47:30 +0000 (17:47 +0200)]
Use 'remember-buffer' in remember.el doc strings.

* lisp/textmodes/remember.el (remember-initial-contents)
(remember-before-remember-hook, remember-destroy): Refer to
`remember-buffer'.

* lisp/textmodes/remember.el (remember-buffer): Make into
defcustom (bug#49373).

3 years agoPropagate asynchronousness correctly when using proxies in url.el
Madhu [Mon, 19 Jul 2021 15:42:18 +0000 (17:42 +0200)]
Propagate asynchronousness correctly when using proxies in url.el

* lisp/url/url.el (url-retrieve-internal): Propagate
asynchronousness correctly when using a proxy (bug#49570).

Copyright-paperwork-exempt: yes

3 years agoFix infloop in woman-file-name
Lars Ingebrigtsen [Mon, 19 Jul 2021 15:31:17 +0000 (17:31 +0200)]
Fix infloop in woman-file-name

* lisp/woman.el (woman-file-name): Fix infloop for non-existent
manual page (bug#414).

3 years agoAllow comint-delete-output to save the output on the kill ring
Lars Ingebrigtsen [Mon, 19 Jul 2021 15:13:11 +0000 (17:13 +0200)]
Allow comint-delete-output to save the output on the kill ring

* lisp/comint.el (comint-delete-output): Allow saving the output
to the kill ring (bug#1496).

3 years agoFix documentation of mouse-leave-buffer-hook
Lars Ingebrigtsen [Mon, 19 Jul 2021 14:41:54 +0000 (16:41 +0200)]
Fix documentation of mouse-leave-buffer-hook

* doc/lispref/hooks.texi (Standard Hooks): Ditto.

* src/callint.c (syms_of_callint): Document the actual usage of
`mouse-leave-buffer-hook' (bug#2932).

3 years agoUse make-separator-line in shortdoc
Lars Ingebrigtsen [Mon, 19 Jul 2021 14:13:57 +0000 (16:13 +0200)]
Use make-separator-line in shortdoc

* lisp/simple.el (separator-line): Tweak definition to not be so
overwhelming.

* lisp/emacs-lisp/shortdoc.el (shortdoc-separator): Removed.
(shortdoc-display-group): Use make-separator-line.

3 years agoAdd a new function for separator lines
Lars Ingebrigtsen [Mon, 19 Jul 2021 13:48:20 +0000 (15:48 +0200)]
Add a new function for separator lines

* lisp/help-fns.el (describe-symbol): Use it.

* lisp/help.el (describe-key): Use it.

* lisp/simple.el (separator-line): New face.
(make-separator-line): New function (bug#49630).

3 years ago; Fix omission in last change to custom.texi.
Basil L. Contovounesios [Sun, 18 Jul 2021 22:06:45 +0000 (23:06 +0100)]
; Fix omission in last change to custom.texi.

3 years ago; * doc/lispref/variables.texi (File Local Variables): Fix last change.
Eli Zaretskii [Sun, 18 Jul 2021 18:57:03 +0000 (21:57 +0300)]
; * doc/lispref/variables.texi (File Local Variables): Fix last change.

3 years agoFix documentation of a recent changeset (bug#5003)
Eli Zaretskii [Sun, 18 Jul 2021 18:53:22 +0000 (21:53 +0300)]
Fix documentation of a recent changeset (bug#5003)

* lisp/files.el (safe-local-variable-values)
(ignored-local-variable-values): Doc fix.
(ignored-local-variable-values): Add :version tag.

* doc/emacs/custom.texi (Safe File Variables): Mention
'ignored-local-variable-values'.
* doc/lispref/variables.texi (File Local Variables): Fix wording.

* etc/NEWS: Improve wording of the 'ignored-local-variable-values'
entry.

3 years agoCount compile errors when FILE is a function
Mattias Engdegård [Sun, 18 Jul 2021 18:27:03 +0000 (20:27 +0200)]
Count compile errors when FILE is a function

* lisp/progmodes/compile.el (compilation-parse-errors):
Don't omit messages from the error count when FILE is a function
rather than a regexp match number.

3 years ago; * test/lisp/progmodes/compile-tests.el: simplify end-col
Mattias Engdegård [Sun, 18 Jul 2021 15:28:24 +0000 (17:28 +0200)]
; * test/lisp/progmodes/compile-tests.el: simplify end-col

The internal representation of columns uses half-open intervals but
don't expose that in the test cases, where we want to use the same
numbers as in the compilation messages.

3 years agoClarify event-convert-list doc string
Lars Ingebrigtsen [Sun, 18 Jul 2021 16:18:03 +0000 (18:18 +0200)]
Clarify event-convert-list doc string

* src/keyboard.c (Fevent_convert_list): Clarify that the base type
returned isn't always the same (bug#7631).

3 years agoAdd doc string to time-stamp-tests that didn't have one
Stephen Gildea [Sun, 18 Jul 2021 15:38:37 +0000 (08:38 -0700)]
Add doc string to time-stamp-tests that didn't have one

* test/lisp/time-stamp-tests.el (formatz-generate-tests,
  formatz-%z-spotcheck): Add doc strings to tests.

3 years agoAllow ignoring local variable values permanently
Lars Ingebrigtsen [Sun, 18 Jul 2021 15:18:17 +0000 (17:18 +0200)]
Allow ignoring local variable values permanently

* doc/lispref/variables.texi (File Local Variables): Document it.

* lisp/files.el (ignored-local-variable-values): New user option
(bug#5003).
(hack-local-variables-confirm): Allow ignoring permanently.
(hack-local-variables-filter): Ignore the permanently ignored
variables.

3 years agoMake remote file locks more robust
Michael Albinus [Sun, 18 Jul 2021 14:58:52 +0000 (16:58 +0200)]
Make remote file locks more robust

* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
Make file locks more robust.

* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Rename and extend.

3 years agoMake remote file locks more robust. (Bug#49621)
Naofumi Yasufuku [Sun, 18 Jul 2021 14:57:53 +0000 (16:57 +0200)]
Make remote file locks more robust.  (Bug#49621)

* lisp/net/tramp-sh.el (tramp-sh-handle-write-region): Make file
locks more robust.  (Bug#49621)

Copyright-paperwork-exempt: yes

3 years agoMaintain a list of terminal buffers in the menu
Lars Ingebrigtsen [Sun, 18 Jul 2021 14:34:02 +0000 (16:34 +0200)]
Maintain a list of terminal buffers in the menu

* lisp/term.el (term--update-term-menu): New function (bug#5641).
(term-mode): Use it to list terminal buffers.

3 years agoFix display of mode-line with bidi formatting controls
Eli Zaretskii [Sun, 18 Jul 2021 14:27:23 +0000 (17:27 +0300)]
Fix display of mode-line with bidi formatting controls

* src/xdisp.c (face_before_or_after_it_pos): Reimplement the bidi
iteration to find the character after the current in visual order.
(Bug#49562)

3 years agoFix problem in `shadow-define-literal-group' (Bug#49596)
Michael Albinus [Sun, 18 Jul 2021 13:57:41 +0000 (15:57 +0200)]
Fix problem in `shadow-define-literal-group' (Bug#49596)

* lisp/shadowfile.el (shadow-make-fullname): HOST can also be a
remote file name.  Bug#49596.

* test/lisp/shadowfile-tests.el (auth-source-save-behavior)
(tramp-cache-read-persistent-data, tramp-persistency-file-name):
Set them globally.
(shadow-test06-literal-groups): Extend test.

3 years agoMake indent-tabs-mode into a regular mode instead of just a variable
Lars Ingebrigtsen [Sun, 18 Jul 2021 13:24:55 +0000 (15:24 +0200)]
Make indent-tabs-mode into a regular mode instead of just a variable

* lisp/simple.el (indent-tabs-mode): Make into a minor mode (bug#6276).

3 years agoDon't shorten comment padding if the padding isn't spaces
Lars Ingebrigtsen [Sun, 18 Jul 2021 12:49:48 +0000 (14:49 +0200)]
Don't shorten comment padding if the padding isn't spaces

* lisp/newcomment.el (comment-padright): Don't shorten non-space
padding (bug#6822).
(comment-padleft): Ditto.

3 years agoFix an unlikely `copyright-find-copyright' problem
Lars Ingebrigtsen [Sun, 18 Jul 2021 12:31:09 +0000 (14:31 +0200)]
Fix an unlikely `copyright-find-copyright' problem

* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make
the copyright matcher more robust (bug#7179).

3 years ago; * etc/NEWS: Move entry to its right place.
Mattias Engdegård [Sun, 18 Jul 2021 11:33:30 +0000 (13:33 +0200)]
; * etc/NEWS: Move entry to its right place.

3 years agoFix previous grep-file-at-point change
Lars Ingebrigtsen [Sat, 17 Jul 2021 14:56:35 +0000 (16:56 +0200)]
Fix previous grep-file-at-point change

* lisp/progmodes/grep.el (grep-file-at-point): Fix previous change.

3 years agoAdd new function 'grep-file-at-point'
Lennart Borgman [Sat, 17 Jul 2021 14:53:36 +0000 (16:53 +0200)]
Add new function 'grep-file-at-point'

* lisp/progmodes/grep.el (grep-file-at-point): New function to
return the file name at point (bug#8252).

3 years agoEnhance pcomplete support for xargs
Karthik Chikmagalur [Sat, 17 Jul 2021 14:29:11 +0000 (16:29 +0200)]
Enhance pcomplete support for xargs

* lisp/pcmpl-unix.el (pcomplete/xargs): Add support for completing xargs
options, including the ability to distinguish them from the command
xargs runs (bug#49603).
Copyright-paperwork-exempt: yes

3 years agoMake 'n'/'p' work again in shortdoc after previous changes
Lars Ingebrigtsen [Sat, 17 Jul 2021 13:41:33 +0000 (15:41 +0200)]
Make 'n'/'p' work again in shortdoc after previous changes

* lisp/emacs-lisp/shortdoc.el (shortdoc--goto-section): Adjust to
changes in how the text properties are inserted in 22a5482ab6
(bug#49605).  Also make into a regular function.

3 years agoEIEIO: Prevent excessive evaluation of :initform
akater [Mon, 12 Jul 2021 14:15:54 +0000 (14:15 +0000)]
EIEIO: Prevent excessive evaluation of :initform

* lisp/emacs-lisp/eieio.el (initialize-instance):
Do not evaluate initform of a slot when initarg for the slot is provided,
according to the following secitons of CLHS:
- Object Creation and Initialization
- Initialization Arguments
- Defaulting of Initialization Arguments
- Rules for Initialization Arguments

* test/lisp/emacs-lisp/eieio-etests/eieio-tests.el:
Add corresponding tests
Fix a typo

3 years agoDefine revert-buffer-function for *Memory Report*
Mattias Engdegård [Fri, 16 Jul 2021 11:04:14 +0000 (13:04 +0200)]
Define revert-buffer-function for *Memory Report*

* lisp/emacs-lisp/memory-report.el (memory-report):
Allow the memory report buffer to be updated by pressing 'g'.

3 years ago; Fix last change in files.el
Michael Albinus [Fri, 16 Jul 2021 16:54:12 +0000 (18:54 +0200)]
; Fix last change in files.el

3 years agoAdd lock-file-mode
Michael Albinus [Fri, 16 Jul 2021 16:13:28 +0000 (18:13 +0200)]
Add lock-file-mode

* doc/emacs/files.texi (Interlocking):
* doc/lispref/files.texi (File Locks):
* etc/NEWS: Add lock-file-mode.

* lisp/files.el (lock-file-name-transforms)
(remote-file-name-inhibit-locks): Move down.
(lock-file-mode): New minor mode.

3 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 16 Jul 2021 14:51:35 +0000 (07:51 -0700)]
Merge from origin/emacs-27

7ac411ae2c (origin/emacs-27) ; * src/data.c (Fcar, Fcdr): Doc fix.
0d9e1826f7 One more minor update of the Emacs manual for 19th printing
92616d30e0 ; Fix let-alist Texinfo markup
c13acf8e34 ; * doc/emacs/mule.texi (International Chars): Mention 'de...

3 years ago; Fix wording of recent changes in documentation
Eli Zaretskii [Fri, 16 Jul 2021 13:26:21 +0000 (16:26 +0300)]
; Fix wording of recent changes in documentation

* lisp/files.el (query-about-changed-file):
* doc/emacs/files.texi (Visiting):
* etc/NEWS: Fix the wording of a recent change.  (Bug#10755)

3 years agoClarify emacsclient Options node in the Emacs manual
Lars Ingebrigtsen [Fri, 16 Jul 2021 12:51:03 +0000 (14:51 +0200)]
Clarify emacsclient Options node in the Emacs manual

* doc/emacs/misc.texi (emacsclient Options): Don't claim that
emacsclient searches for a socket name (bug#13319).

3 years agoAdd new user option 'query-about-changed-file'
Lars Ingebrigtsen [Fri, 16 Jul 2021 12:30:24 +0000 (14:30 +0200)]
Add new user option 'query-about-changed-file'

* doc/emacs/files.texi (Visiting): Document it.
* lisp/files.el (query-about-changed-file): New user option (bug#10775).
(find-file-noselect): Use it.

3 years agoFix lock-file-name-transforms build problem
Lars Ingebrigtsen [Fri, 16 Jul 2021 11:59:42 +0000 (13:59 +0200)]
Fix lock-file-name-transforms build problem

* lisp/files.el (lock-file-name-transforms): Remove
custom-initialize-delay to fix build problem (bug#49507).

3 years agoFix wording in a recent ELisp manual change
Eli Zaretskii [Fri, 16 Jul 2021 11:30:12 +0000 (14:30 +0300)]
Fix wording in a recent ELisp manual change

* doc/lispref/tips.texi (Coding Conventions): Fix wording in a
recent change.  (Bug#21440)

3 years agoAllow hiding variables in Customize
Lars Ingebrigtsen [Fri, 16 Jul 2021 10:55:21 +0000 (12:55 +0200)]
Allow hiding variables in Customize

* lisp/cus-edit.el (custom-toggle-hide-variable): Allow closing an
option even if there are unsaved changes (bug#11655).

3 years agoMake `number-at-point' work for more hex numbers
Remington Furman [Fri, 16 Jul 2021 09:47:36 +0000 (11:47 +0200)]
Make `number-at-point' work for more hex numbers

* lisp/thingatpt.el (number-at-point): Rewrite to actually catch
the hex numbers (bug#49588).

Copyright-paperwork-exempt: yes

3 years agoClarify -unload-feature in Coding Conventions
Lars Ingebrigtsen [Fri, 16 Jul 2021 08:56:21 +0000 (10:56 +0200)]
Clarify -unload-feature in Coding Conventions

* doc/lispref/tips.texi (Coding Conventions): Clarify when an
unload function is useful (bug#21440).

3 years agoAdd a couple more shell-tests-split-string tests
Lars Ingebrigtsen [Thu, 15 Jul 2021 23:42:49 +0000 (01:42 +0200)]
Add a couple more shell-tests-split-string tests

3 years agoImprove recent jka-compr-compression-info-list change
Glenn Morris [Thu, 15 Jul 2021 20:19:48 +0000 (13:19 -0700)]
Improve recent jka-compr-compression-info-list change

* lisp/jka-cmpr-hook.el (jka-compr-compression-info-list):
Document previous change, and fix :type.

3 years agoAdd bug-reference support for Codeberg projects
Tassilo Horn [Thu, 15 Jul 2021 19:51:54 +0000 (21:51 +0200)]
Add bug-reference support for Codeberg projects

* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add support for codeberg.org bug and pull request references.
* doc/emacs/maintaining.texi (Bug Reference): Mention that bug and
pull request references for codeberg projects are supported.

3 years agoAdd support for sourcehut to bug-reference.el
Tassilo Horn [Thu, 15 Jul 2021 19:43:29 +0000 (21:43 +0200)]
Add support for sourcehut to bug-reference.el

* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add support for bug references like #17 and ~user/project#19 for
sourcehut (sr.ht).
* doc/emacs/maintaining.texi (Bug Reference): Document sourcehut
support.