1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

149040 commits

Author SHA1 Message Date
Mattias Engdegård
f9d7440814 ; * lisp/emacs-lisp/byte-opt.el (byte-optimize-eq): Fix last change. 2021-07-20 19:32:11 +02:00
Mattias Engdegård
46d7d44894 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.
2021-07-20 19:21:00 +02:00
Mattias Engdegård
51a86b6a05 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.
2021-07-20 19:21:00 +02:00
Michael Albinus
0c58796a22 * lisp/shadowfile.el (shadow-homedir): Add slash.
(shadow-contract-file-name): Use it.  Bug#49596.
2021-07-20 18:44:51 +02:00
Eli Zaretskii
97fd31fec7 ; * etc/NEWS: Announce the change in json.c behavior on MS-Windows. 2021-07-20 19:00:53 +03:00
Eli Zaretskii
b575e44cbf Fix documentation of a recent changeset
* lisp/autorevert.el (auto-revert-mode):
* lisp/files.el (revert-buffer): Doc fix.  (Bug#49661)
2021-07-20 18:37:40 +03:00
Michael Albinus
6bea195db5 Fix Bug#49636
* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Let-bind `auto-save-default'.  (Bug#49636)
2021-07-20 17:28:29 +02:00
Konstantin Kharlamov
61c1522dde 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).
2021-07-20 16:38:55 +02:00
jakanakaevangeli
b4fabb316d 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).
2021-07-20 16:31:24 +02:00
Lars Ingebrigtsen
c175ad52fa Make dired-guess-default return all matching programs
* lisp/dired-x.el (dired-guess-default): Return all matching
programs (bug#48071).
2021-07-20 16:16:09 +02:00
Ioannis Kappas
606b783acb 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).
2021-07-20 15:53:34 +02:00
Lars Ingebrigtsen
aa8859d0cb 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).
2021-07-20 14:47:07 +02:00
Miha Rihtaršič
7edbcb3648 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.
2021-07-20 14:36:45 +02:00
Kenichi Handa
557c59591c 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).
2021-07-20 14:22:53 +02:00
Earl Hyatt
3dd87631fc 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.
2021-07-20 14:10:23 +02:00
Lars Ingebrigtsen
0499294a36 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>.
2021-07-20 14:06:40 +02:00
Lars Ingebrigtsen
e02576c7eb 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.
2021-07-20 13:48:10 +02:00
Lars Ingebrigtsen
06ee8ac36c Mention overlays-in' in the overlays-at' doc string
* src/buffer.c (Foverlays_at): Mention `overlays-in' in the doc
string (bug#459).
2021-07-20 13:32:39 +02:00
Lars Ingebrigtsen
6ebe8b03d8 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).
2021-07-19 19:03:28 +02:00
Ivan Sokolov
f7f2024b86 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.
2021-07-19 18:54:23 +02:00
Eli Zaretskii
0c48469ac1 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.
2021-07-19 19:46:43 +03:00
Lars Ingebrigtsen
072512414e 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.
2021-07-19 18:35:12 +02:00
Eli Zaretskii
f5640a3bdf Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2021-07-19 19:24:41 +03:00
Eli Zaretskii
b2925ad125 ; Fix a typo in a recent change
* src/callint.c (syms_of_callint) <mouse-leave-buffer-hook>: Fix a
typo in the doc string.
2021-07-19 19:24:01 +03:00
Lars Ingebrigtsen
514398c665 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.
2021-07-19 18:23:11 +02:00
dickmao
95e31a1a32 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).
2021-07-19 18:23:11 +02:00
Eli Zaretskii
dd70012dca 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'.
2021-07-19 19:21:49 +03:00
Gabriel do Nascimento Ribeiro
513539524e 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).
2021-07-19 18:04:25 +02:00
Gabriel do Nascimento Ribeiro
069f790ca3 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).
2021-07-19 17:47:30 +02:00
Madhu
039d00326e 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
2021-07-19 17:42:18 +02:00
Lars Ingebrigtsen
8f51194aa5 Fix infloop in woman-file-name
* lisp/woman.el (woman-file-name): Fix infloop for non-existent
manual page (bug#414).
2021-07-19 17:31:17 +02:00
Lars Ingebrigtsen
4ffa928b93 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).
2021-07-19 17:13:11 +02:00
Lars Ingebrigtsen
3094c12c45 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).
2021-07-19 16:41:54 +02:00
Lars Ingebrigtsen
6336c18e5c 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.
2021-07-19 16:13:57 +02:00
Lars Ingebrigtsen
620e35f09f 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).
2021-07-19 15:48:20 +02:00
Basil L. Contovounesios
13b247c3c4 ; Fix omission in last change to custom.texi. 2021-07-18 23:06:45 +01:00
Eli Zaretskii
b0c7343993 ; * doc/lispref/variables.texi (File Local Variables): Fix last change. 2021-07-18 21:57:03 +03:00
Eli Zaretskii
bbce22337c 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.
2021-07-18 21:53:22 +03:00
Mattias Engdegård
88cc9d22df 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.
2021-07-18 20:41:59 +02:00
Mattias Engdegård
014a67200c ; * 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.
2021-07-18 20:40:56 +02:00
Lars Ingebrigtsen
48dfaa734b 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).
2021-07-18 18:18:03 +02:00
Stephen Gildea
87a432455d 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.
2021-07-18 08:44:18 -07:00
Lars Ingebrigtsen
da200ab049 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.
2021-07-18 17:18:22 +02:00
Michael Albinus
7075ebbf5b 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.
2021-07-18 16:58:52 +02:00
Naofumi Yasufuku
1bd012ce43 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
2021-07-18 16:57:53 +02:00
Lars Ingebrigtsen
e77bd6e8bf 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.
2021-07-18 16:35:17 +02:00
Eli Zaretskii
595eddd848 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)
2021-07-18 17:27:23 +03:00
Michael Albinus
12a193f876 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.
2021-07-18 15:57:41 +02:00
Lars Ingebrigtsen
c112f73668 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).
2021-07-18 15:24:55 +02:00
Lars Ingebrigtsen
d2f9295a1f 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.
2021-07-18 14:49:48 +02:00