1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00
Commit graph

149304 commits

Author SHA1 Message Date
Lars Ingebrigtsen
16860f6c5f `term-char-mode' doc string clarification
* lisp/term.el (term-char-mode): Document behaviour (bug#49186).
2021-07-22 16:17:59 +02:00
Dmitry Gutov
a2d0ff2600 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).
2021-07-22 14:41:52 +02:00
Sergey Organov
6f9ff3d749 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
2021-07-22 14:22:26 +02:00
Lars Ingebrigtsen
0dcc444981 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).
2021-07-22 14:14:48 +02:00
Eli Zaretskii
c8a1af6d37 Avoid byte-compilation warning
* test/src/buffer-tests.el (buffer-tests-inhibit-buffer-hooks):
Avoid byte-compiler warning.  (Bug#49667)
2021-07-22 12:14:50 +03:00
Eli Zaretskii
3edc4fb5d8 ; * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Doc fix. 2021-07-22 10:31:14 +03:00
Lars Ingebrigtsen
a828557320 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).
2021-07-22 00:21:34 +02:00
Yan Gajdos
38a62efc15 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
2021-07-21 23:56:44 +02:00
Illia Ostapyshyn
a98bf3e7d7 * 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
2021-07-21 23:53:17 +02:00
Logan Perkins
903ecd7bea 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).
2021-07-21 17:56:20 +02:00
Stefan Monnier
0576b81ca7 * src/eval.c (signal_quit_p): Fix the usual int/Lisp_Object mixup 2021-07-21 11:12:25 -04:00
Stefan Monnier
52187012f1 * 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.
2021-07-21 11:11:50 -04:00
Lars Ingebrigtsen
da4b3973de 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.
2021-07-21 16:53:54 +02:00
Jashank Jeremy
e3b8ddd500 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>.
2021-07-21 16:01:13 +02:00
Stefan Monnier
e56ad2cb0f * doc/lispref/display.texi (Overlay Properties): Tweak further
The "character after point" is not as important as point itself
2021-07-21 09:09:43 -04:00
Lars Ingebrigtsen
3d956fd0e3 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.
2021-07-21 14:22:54 +02:00
Stefan Kangas
cb9d82a17c 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).
2021-07-21 14:01:57 +02:00
Lars Ingebrigtsen
bb2d1252e6 Fix final test for invalid base64url chars
* src/fns.c (base64_decode_1): Fix test for invalid base64url
(bug#45562).  Noted by Andreas Schwab.
2021-07-21 13:28:17 +02:00
Pankaj Jangid
cdc1fab38d Fixed a typo in Gnus manual
* doc/misc/gnus.texi (Washing Mail): Fixed typo
2021-07-21 13:16:18 +02:00
Lars Ingebrigtsen
92923414a0 Fix bug-reference.el compilation warning
* lisp/progmodes/bug-reference.el (bug-reference-mode): Silence a
compilation warning (bug#49677).
2021-07-21 13:15:05 +02:00
Lars Ingebrigtsen
5e385eb49d 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).
2021-07-21 13:12:05 +02:00
Lars Ingebrigtsen
bc0aca059d 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).
2021-07-21 13:04:06 +02:00
Lars Ingebrigtsen
e4f323a82a Add json-available-p
* doc/lispref/text.texi (Parsing JSON): Document it.
* lisp/subr.el (json-available-p): New function (bug#49660).
2021-07-21 12:49:11 +02:00
Lars Ingebrigtsen
654ef06070 Mention rear-advance in relation to the keymap overlay property
* doc/lispref/display.texi (Overlay Properties): Mention the
effect of REAR-ADVANCE (bug#459).
2021-07-21 12:33:46 +02:00
Mattias Engdegård
070c80ee06 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).
2021-07-21 11:17:18 +02:00
Juri Linkov
1b251ed4e8 * lisp/button.el (button-map): Bind [follow-link] to 'mouse-face' (bug#49626) 2021-07-20 22:53:06 +03:00
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