1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-14 07:20:35 -08:00
Commit graph

149142 commits

Author SHA1 Message Date
Philip Kaludercic
008a033bbb
Print value on malformed input
* rcirc.el (rcirc-define-command): Unquote argument
2021-09-05 19:13:48 +02:00
Philip Kaludercic
608b2ec9be
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
2021-09-05 01:39:52 +02:00
Philip Kaludercic
c817a34edd
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
2021-08-06 20:12:04 +02:00
Philip Kaludercic
ade9653108
Add new option rcirc-track-abbrevate-flag
* rcirc.el (rcirc-track-abbrevate-flag): Add option
(rcirc-short-buffer-name): Respect rcirc-track-abbrevate-flag
2021-08-06 20:01:38 +02:00
Philip Kaludercic
190ea9cd3e
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
2021-07-28 10:31:57 +02:00
Philip Kaludercic
7e13bfd4a8
Remove removal of text properties from rcirc-buffer-alist keys
* rcirc.el (rcirc-mode): Remove set-text-properties call
2021-07-27 20:01:49 +02:00
Philip Kaludercic
fb27708f51
Fix checkdoc issues
* rcirc.el (rcirc-finished-sasl): Add period.
(rcirc-mode): Expand docstring.
(rcirc-handler-900): Document sender and process
2021-07-27 17:42:32 +02:00
Philip Kaludercic
402385393a
Update rcirc-buffer-alist after receiving NICK
* rcirc.el (rcirc-handler-NICK): Remove old nick and add new nick
2021-07-27 17:30:22 +02:00
Philip Kaludercic
262fbe1a47
Fix TOPIC command
* rcirc.el (topic): Add target argument.
2021-07-27 10:08:06 +02:00
Philip Kaludercic
47b5dcdcf5
Ensure that rcirc-buffer-alist has no text properties
* rcirc.el (rcirc-mode): Remove text properties from
  rcirc-buffer-alist keys
2021-07-24 16:57:00 +02:00
Philip Kaludercic
1967b9c474
Generate no message when activating rcirc-omit-mode
* rcirc.el (rcirc-omit-mode): Remove (message ...) expressions
2021-07-24 11:19:54 +02:00
Eli Zaretskii
59eaa30c90 ; * etc/NEWS: Fix wording of the 'fill-column' entry. 2021-07-23 22:49:34 +03:00
Eli Zaretskii
26ff27714c ; * lisp/calendar/cal-french.el (calendar-french-trim-feast): Doc fix. 2021-07-23 22:46:28 +03:00
Eli Zaretskii
5708322560 ; * lisp/files.el (set-auto-mode--apply-alist): Doc fix. 2021-07-23 22:43:22 +03:00
Eli Zaretskii
1163217725 Improve recently added documentation
* etc/NEWS: Improve wording of a recently added entry.

* doc/misc/smtpmail.texi (Queued delivery): Fix typo.
2021-07-23 22:38:10 +03:00
Michael Albinus
8ec35857cf Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2021-07-23 20:30:46 +02:00
Alex Bochannek
eb20d013a1 Fix bug#49699
* lisp/net/tramp-sh.el (tramp-scp-strict-file-name-checking):
Adapt check for macOS.  (Bug#49699)
2021-07-23 20:29:59 +02:00
Lars Ingebrigtsen
2a231378fa Fix typo in set-auto-mode--apply-alist
* lisp/files.el (set-auto-mode--apply-alist): Fix typo in
ad5faa424a (bug#49712).
2021-07-23 20:18:21 +02:00
Lars Ingebrigtsen
1f24519735 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.
2021-07-23 17:58:20 +02:00
Lars Ingebrigtsen
6ce2acdadb 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.
2021-07-23 15:56:44 +02:00
Tom Tromey
ad5faa424a 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.
2021-07-23 15:51:11 +02:00
Jean Forget
6a3b89f9df 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
2021-07-23 15:26:45 +02:00
Mattias Engdegård
aa5437493b 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.
2021-07-23 15:20:44 +02:00
Mattias Engdegård
109ca1bd00 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.
2021-07-23 15:19:01 +02:00
F. Jason Park
4d172946c3 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).
2021-07-23 15:18:05 +02:00
Lars Ingebrigtsen
172dfac035 declare-function doc string clarification about FILE
* lisp/subr.el (declare-function): Mention that FILE can be nil
(bug#21466).
2021-07-23 15:12:03 +02:00
Stefan Kangas
99018681c4 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.
2021-07-23 14:57:44 +02:00
Lars Ingebrigtsen
4357d595ee Adjust time-tests.el to bug#30056
* test/lisp/time-tests.el (time-tests-display-time-update): Adjust
test (bug#30056).
2021-07-23 14:46:12 +02:00
Lars Ingebrigtsen
9dfa94aed1 Move mode-line NEWS items to a common section 2021-07-23 14:44:15 +02:00
Lars Ingebrigtsen
bb68faed02 '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.
2021-07-23 14:40:53 +02:00
Lars Ingebrigtsen
f3806ee149 Fix an rcirc merge problem
* lisp/net/rcirc.el (rcirc-get-server-method)
(rcirc-get-server-password): Remove double definition after merge.
2021-07-23 14:13:38 +02:00
Eli Zaretskii
ce04a88f3c 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.
2021-07-23 14:56:16 +03:00
Paul Eggert
007744dd04 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.
2021-07-23 13:33:37 +02:00
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
d3163a3b8f Make supersession warnings work again
* src/filelock.c (lock_file): Fix thinko in lock_file in 2ad34bcea4
(bug#49701).
2021-07-23 11:49:22 +02:00
Eli Zaretskii
662f91a795 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)
2021-07-22 21:23:48 +03: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
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