1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-11 16:08:13 +00:00
Commit Graph

80798 Commits

Author SHA1 Message Date
Philip Kaludercic
55a19a1da2
Merge branch 'feature/rcirc-update' 2021-07-23 13:23:35 +02:00
Lars Ingebrigtsen
f1101fdc82 Make erc recognize `foo*' as a function Lisp symbol
* lisp/erc/erc-button.el (erc-button-alist): Add some more chars
to the `foo' button regexp (bug#49690).
2021-07-23 13:15:32 +02:00
Lars Ingebrigtsen
fcae435f59 Make revert-buffer preserve buffer-readedness
* lisp/files.el (revert-buffer): Preserve buffer-readedness
(bug#35166).
2021-07-22 16:24:58 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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