Philip Kaludercic [Tue, 7 Sep 2021 09:03:36 +0000 (11:03 +0200)]
Use fresh symbol for argument list
* rcirc.el (rcirc-define-command): Use make-symbol instead of gensym
Philip Kaludercic [Tue, 7 Sep 2021 08:33:51 +0000 (10:33 +0200)]
Allow /reconnect while connecting
* rcirc.el (reconnect): Kill previous process and start a new one
Philip Kaludercic [Mon, 6 Sep 2021 21:26:05 +0000 (23:26 +0200)]
Mention list of capabilities that should be implemented
* rcirc.el (rcirc-implemented-capabilities): Add comment
Philip Kaludercic [Mon, 6 Sep 2021 20:37:33 +0000 (22:37 +0200)]
Implement standard-replies capability
* rcirc.el (rcirc-implemented-capabilities): Add standard-replies to list
(rcirc-response-formats): Add response formats for WARN, FAIL and NOTE
(rcirc-handler-FAIL): Add handler
(rcirc-handler-WARN): Add handler
(rcirc-handler-NOTE): Add handler
Philip Kaludercic [Mon, 6 Sep 2021 17:10:46 +0000 (19:10 +0200)]
Connect to server asynchronously
* rcirc.el (rcirc-connect): Add :nowait option to open-network-stream
(rcirc-sentinel): Handle "open\n" events
Philip Kaludercic [Sun, 5 Sep 2021 18:42:48 +0000 (20:42 +0200)]
Implement multi-prefix capability
* rcirc.el (rcirc-implemented-capabilities): Add capability
(rcirc-user-nick): Handle multiple prefixes
Philip Kaludercic [Sun, 5 Sep 2021 18:34:18 +0000 (20:34 +0200)]
Fix rcirc-track-abbrevate-flag documentation
* rcirc.el (rcirc-track-abbrevate-flag): Rephrase docstring
Philip Kaludercic [Sun, 5 Sep 2021 18:30:43 +0000 (20:30 +0200)]
Store symbols in rcirc-acked-capabilities
* rcirc.el (rcirc-handler-CAP): Use intern and downcase
Philip Kaludercic [Sun, 5 Sep 2021 17:13:48 +0000 (19:13 +0200)]
Print value on malformed input
* rcirc.el (rcirc-define-command): Unquote argument
Philip Kaludercic [Sat, 4 Sep 2021 23:39:52 +0000 (01:39 +0200)]
Replace with-current-buffer with buffer-local-value where applicable
* rcirc.el (rcirc-buffer-process): Use buffer-local-value
(rcirc-last-quit-line): Use buffer-local-value
(rcirc-bury-buffers): Use buffer-local-value
(rcirc-record-activity): Use buffer-local-value
Philip Kaludercic [Fri, 6 Aug 2021 18:12:04 +0000 (20:12 +0200)]
Add new option rcirc-channel-filter
* rcirc.el (rcirc-channel-filter): Add option
(rcirc-short-buffer-name): Respect rcirc-channel-filter
(rcirc-handler-JOIN): Respect rcirc-channel-filter
(rcirc-handler-PART): Respect rcirc-channel-filter
(rcirc-handler-KICK): Respect rcirc-channel-filter
(rcirc-handler-QUIT): Respect rcirc-channel-filter
(rcirc-handler-INVITE): Respect rcirc-channel-filter
Philip Kaludercic [Fri, 6 Aug 2021 18:01:38 +0000 (20:01 +0200)]
Add new option rcirc-track-abbrevate-flag
* rcirc.el (rcirc-track-abbrevate-flag): Add option
(rcirc-short-buffer-name): Respect rcirc-track-abbrevate-flag
Philip Kaludercic [Wed, 28 Jul 2021 08:31:57 +0000 (10:31 +0200)]
Replace cl-c[ad]+r with regular c[ad]+r
* rcirc.el (rcirc-make-trees): Replace cl-cdadr with cdadr
(rcirc-handler-333): Replace cl-cadddr with cadddr
(rcirc-authenticate): Replace cl-cdddr with cdddr
Philip Kaludercic [Tue, 27 Jul 2021 18:01:49 +0000 (20:01 +0200)]
Remove removal of text properties from rcirc-buffer-alist keys
* rcirc.el (rcirc-mode): Remove set-text-properties call
Philip Kaludercic [Tue, 27 Jul 2021 15:42:32 +0000 (17:42 +0200)]
Fix checkdoc issues
* rcirc.el (rcirc-finished-sasl): Add period.
(rcirc-mode): Expand docstring.
(rcirc-handler-900): Document sender and process
Philip Kaludercic [Tue, 27 Jul 2021 15:30:22 +0000 (17:30 +0200)]
Update rcirc-buffer-alist after receiving NICK
* rcirc.el (rcirc-handler-NICK): Remove old nick and add new nick
Philip Kaludercic [Tue, 27 Jul 2021 08:08:06 +0000 (10:08 +0200)]
Fix TOPIC command
* rcirc.el (topic): Add target argument.
Philip Kaludercic [Sat, 24 Jul 2021 14:57:00 +0000 (16:57 +0200)]
Ensure that rcirc-buffer-alist has no text properties
* rcirc.el (rcirc-mode): Remove text properties from
rcirc-buffer-alist keys
Philip Kaludercic [Sat, 24 Jul 2021 09:19:54 +0000 (11:19 +0200)]
Generate no message when activating rcirc-omit-mode
* rcirc.el (rcirc-omit-mode): Remove (message ...) expressions
Eli Zaretskii [Fri, 23 Jul 2021 19:49:34 +0000 (22:49 +0300)]
; * etc/NEWS: Fix wording of the 'fill-column' entry.
Eli Zaretskii [Fri, 23 Jul 2021 19:46:28 +0000 (22:46 +0300)]
; * lisp/calendar/cal-french.el (calendar-french-trim-feast): Doc fix.
Eli Zaretskii [Fri, 23 Jul 2021 19:43:22 +0000 (22:43 +0300)]
; * lisp/files.el (set-auto-mode--apply-alist): Doc fix.
Eli Zaretskii [Fri, 23 Jul 2021 19:38:10 +0000 (22:38 +0300)]
Improve recently added documentation
* etc/NEWS: Improve wording of a recently added entry.
* doc/misc/smtpmail.texi (Queued delivery): Fix typo.
Michael Albinus [Fri, 23 Jul 2021 18:30:46 +0000 (20:30 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Alex Bochannek [Fri, 23 Jul 2021 18:29:59 +0000 (20:29 +0200)]
Fix bug#49699
* lisp/net/tramp-sh.el (tramp-scp-strict-file-name-checking):
Adapt check for macOS. (Bug#49699)
Lars Ingebrigtsen [Fri, 23 Jul 2021 18:18:21 +0000 (20:18 +0200)]
Fix typo in set-auto-mode--apply-alist
* lisp/files.el (set-auto-mode--apply-alist): Fix typo in
ad5faa424a5 (bug#49712).
Lars Ingebrigtsen [Fri, 23 Jul 2021 15:58:20 +0000 (17:58 +0200)]
Allow storing SMTP variables when queueing mail
* doc/misc/smtpmail.texi (Queued delivery): Document it (bug#49709).
* lisp/gnus/message.el (message-multi-smtp-send-mail): Store
variables.
* lisp/mail/smtpmail.el (smtpmail-queue-mail): Mention it.
(smtpmail-store-queue-variables): New variable.
(smtpmail-send-it): Store SMTP variables if requested.
(smtpmail-send-queued-mail): Restore variables.
Lars Ingebrigtsen [Fri, 23 Jul 2021 13:56:44 +0000 (15:56 +0200)]
Fix do-auto-fill thinko introduced earlier today
* lisp/simple.el (do-auto-fill): `current-fill-column' returns nil
to signal that we should fill.
Tom Tromey [Fri, 23 Jul 2021 13:51:11 +0000 (15:51 +0200)]
Add auto-mode-alist functionality to .dir-locals.el
* doc/emacs/custom.texi (Directory Variables): Document
auto-mode-alist in .dir-locals.el (Bug#18721)
* doc/emacs/modes.texi (Choosing Modes): Update.
* lisp/files.el (set-auto-mode--apply-alist): New function,
from set-auto-mode.
(set-auto-mode): Check directory locals for auto-mode-alist.
(dir-locals-collect-variables): Add "predicate" parameter.
(hack-dir-local--get-variables): New function, from
hack-dir-local-variables.
(hack-dir-local-variables): Call hack-dir-local--get-variables.
* test/lisp/files-resources/.dir-locals.el: New file.
* test/lisp/files-resources/whatever.quux: New file.
* test/lisp/files-tests.el (files-tests-data-dir): New variable.
(files-test-dir-locals-auto-mode-alist): New test.
Jean Forget [Fri, 23 Jul 2021 13:26:40 +0000 (15:26 +0200)]
Add more support for the French Revolutionary Calendar
* lisp/calendar/cal-french.el (calendar-french-feasts-array): New
variable (bug#19174).
(calendar-french-trim-feast): New function.
(calendar-french-date-string, calendar-french-goto-date):
(calendar-french-goto-date): Use them.
http://datetime.mongueurs.net/Histoire/s-c/01-g.en.html
https://metacpan.org/pod/DateTime::Calendar::FrenchRevolutionary#Internet
Mattias Engdegård [Sun, 18 Jul 2021 18:32:49 +0000 (20:32 +0200)]
Off-by-one error in compilation rule end-column function (bug#49624)
* lisp/progmodes/compile.el (compilation-error-properties):
When the end-column parameter of a compilation message rule
(in compilation-error-regexp-alist[-alist]) is a function, treat its
return value as if it were matched by the regexp, which is how it is
documented to work, and how all other parameters work.
Mattias Engdegård [Thu, 22 Jul 2021 13:00:17 +0000 (15:00 +0200)]
Warn about arity errors in inlining calls (bug#12299)
Wrong number of arguments in inlining function calls (to `defsubst` or
explicitly using `inline`) did not result in warnings, or in very
cryptic ones.
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Add calls
to `byte-compile--check-arity-bytecode`.
* lisp/emacs-lisp/bytecomp.el (byte-compile-emit-callargs-warn)
(byte-compile--check-arity-bytecode): New functions.
(byte-compile-callargs-warn): Use factored-out function.
* test/lisp/emacs-lisp/bytecomp-resources/warn-callargs-defsubst.el:
* test/lisp/emacs-lisp/bytecomp-tests.el ("warn-callargs-defsubst.el"):
New test case.
F. Jason Park [Fri, 23 Jul 2021 13:18:05 +0000 (15:18 +0200)]
Remove text props from callback args in erc-button
* lisp/erc/erc-button.el (erc-button-add-buttons-1): Remove text
properties from strings stored in `erc-data' and passed to
`erc-callback'
(both text properties themselves) (bug#49704). This reduces
memory usage in erc buffers (which are long-lived and can become
very large).
Lars Ingebrigtsen [Fri, 23 Jul 2021 13:12:03 +0000 (15:12 +0200)]
declare-function doc string clarification about FILE
* lisp/subr.el (declare-function): Mention that FILE can be nil
(bug#21466).
Stefan Kangas [Fri, 23 Jul 2021 12:57:44 +0000 (14:57 +0200)]
Make nil value of fill-column obsolete
* lisp/textmodes/fill.el (current-fill-column): Make nil value of
'fill-column' obsolete. (Bug#22847)
(current-fill-column--has-warned): New variable to track warning.
* lisp/simple.el (do-auto-fill): Remove handling of nil return value
from 'current-fill-column'.
* etc/NEWS: Announce obsoletion of this usage.
Lars Ingebrigtsen [Fri, 23 Jul 2021 12:46:12 +0000 (14:46 +0200)]
Adjust time-tests.el to bug#30056
* test/lisp/time-tests.el (time-tests-display-time-update): Adjust
test (bug#30056).
Lars Ingebrigtsen [Fri, 23 Jul 2021 12:44:15 +0000 (14:44 +0200)]
Move mode-line NEWS items to a common section
Lars Ingebrigtsen [Fri, 23 Jul 2021 12:40:53 +0000 (14:40 +0200)]
'global-mode-string' elements should have a space at the end
* lisp/time.el (display-time-string-forms):
* lisp/battery.el (battery-mode-line-format): Add a space to the
end (bug#30056).
* lisp/bindings.el (mode-line-misc-info): Remove space from end.
This will make the default format have one space before the
line-of-dashes (instead of two) on terminals.
Lars Ingebrigtsen [Fri, 23 Jul 2021 12:13:38 +0000 (14:13 +0200)]
Fix an rcirc merge problem
* lisp/net/rcirc.el (rcirc-get-server-method)
(rcirc-get-server-password): Remove double definition after merge.
Eli Zaretskii [Fri, 23 Jul 2021 11:56:16 +0000 (14:56 +0300)]
MS-Windows followup to recent emacsclient changes
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_file-has-acl): Set to true
to avoid compiling file-has-acl.c on MS-Windows.
Paul Eggert [Fri, 23 Jul 2021 11:33:21 +0000 (13:33 +0200)]
Redo emacsclient socket symlink-attack checking
* admin/merge-gnulib (GNULIB_MODULES): Add file-has-acl.
* lib/file-has-acl.c: New file, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib-src/emacsclient.c: Include acl.h, for file_has_acl.
(O_PATH): Default to O_SEARCH, which is good enough here.
(union local_sockaddr): New type.
(socket_status): Remove, replacing with ...
(connect_socket): New function. All callers changed.
This function checks for ownership and permissions issues with the
parent directory of the socket file, instead of checking the
owner of the socket (which does not help security).
(socknamesize): Move to file scope.
(local_sockname): New arg S. No need to pass socknamesize.
UID arg is now uid_t. All callers changed. Get file descriptor
of parent directory of socket, to foil some symlink attacks.
Do not follow symlinks to that directory.
(set_local_socket): Create the socket here instead of on
each attempt to connect it. Fall back from XDG_RUNTIME_DIR
to /tmp only if the former fails due to ENOENT. Adjust
permission-failure diagnostic to match changed behavior.
This addresses Bug#33847, which complained about emacsclient in a
safer XDG environment not connecting to an Emacs server running in
a less-safe enviroment outside XDG. The patch fixes a
longstanding issue with emacsclient permission checking.
It’s ineffective to look at the permission of the socket file
itself; on some platforms, these permissions are ignored anyway.
What matters are the permissions on the parent directory of the
socket file, as these are what make symlink attacks possible.
Change the permissions check accordingly, and also refuse to
follow symlinks to that parent directory. These changes make it
OK for emacsclient to fall back from XDG_RUNTIME_DIR to the
traditionally less-safe /tmp/emacsNNNN directories, since /tmp is
universally sticky nowadays.
Philip Kaludercic [Fri, 23 Jul 2021 11:23:35 +0000 (13:23 +0200)]
Merge branch 'feature/rcirc-update'
Lars Ingebrigtsen [Fri, 23 Jul 2021 11:15:32 +0000 (13:15 +0200)]
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).
Lars Ingebrigtsen [Fri, 23 Jul 2021 09:49:13 +0000 (11:49 +0200)]
Make supersession warnings work again
* src/filelock.c (lock_file): Fix thinko in lock_file in
2ad34bcea4e
(bug#49701).
Eli Zaretskii [Thu, 22 Jul 2021 18:23:48 +0000 (21:23 +0300)]
Fix display of line/wrap-prefix when there's a display property at BOL
* src/xdisp.c (get_line_prefix_it_property): New function.
(handle_line_prefix): Call 'get_line_prefix_it_property' instead
of 'get_it_property', to examine also the property of the buffer
text underlying the display or overlay string. (Bug#49695)
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).
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).
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).
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
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).
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)
Eli Zaretskii [Thu, 22 Jul 2021 07:31:14 +0000 (10:31 +0300)]
; * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Doc fix.
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).
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
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
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).
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
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.
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.
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>.
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
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.
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).
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.
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
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).
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).
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).
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).
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).
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).
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)
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.
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.
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.
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.
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.
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)
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)
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).
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).
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).
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).
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).
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.
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).
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.
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>.
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.
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).
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).
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.
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.
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.
Eli Zaretskii [Mon, 19 Jul 2021 16:24:41 +0000 (19:24 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
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.
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.
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).
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'.
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).