]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoRevert "Make revert-buffer preserve buffer-readedness"
Lars Ingebrigtsen [Tue, 27 Jul 2021 15:23:32 +0000 (17:23 +0200)]
Revert "Make revert-buffer preserve buffer-readedness"

This reverts commit fcae435f598471a2911641412125c5ac4f73559f.

This leads to problems when reverting from a file that's changed
readedness externally.

3 years ago; Fix last change in tramp.el
Michael Albinus [Tue, 27 Jul 2021 11:08:36 +0000 (13:08 +0200)]
; Fix last change in tramp.el

3 years agoFinal tweak for Tramp's yubikey detection
Michael Albinus [Tue, 27 Jul 2021 07:28:28 +0000 (09:28 +0200)]
Final tweak for Tramp's yubikey detection

* lisp/net/tramp.el (tramp-yubikey-regexp)
(tramp-action-show-and-confirm-message): Expect also "\n".

3 years agoConvert fringe bitmaps to vectors on NS port
Alan Third [Sat, 24 Jul 2021 15:08:09 +0000 (16:08 +0100)]
Convert fringe bitmaps to vectors on NS port

Unfortunately *step doesn't support masks for bitmap images so
changing the colors of fringe bitmaps is awkward.  We can work around
this by converting the bitmap into an NSBezierPath and drawing it in
the required color.

* src/nsterm.m (ns_define_fringe_bitmap):
(ns_destroy_fringe_bitmap): New functions
(ns_draw_fringe_bitmap): Display the NSBezierPath.
* src/nsimage.m
([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]): Remove
variable that's there to allow us to easily modify the XBM colors.
([EmacsImage setXBMColor:]): Remove method.

3 years agoFix NS inset rectangle corners
Alan Third [Sat, 17 Jul 2021 12:04:58 +0000 (13:04 +0100)]
Fix NS inset rectangle corners

* src/nsterm.m (ns_draw_relief): Use a path to draw the mitered
corners instead of rectangles.

3 years agoSimplify NS sizing and positioning code
Alan Third [Sat, 17 Jul 2021 10:23:42 +0000 (11:23 +0100)]
Simplify NS sizing and positioning code

* src/nsterm.m (ns_set_offset): Unify the two branches into one, most
of the code is the same.
(ns_set_window_size): Use the provided tools to calculate the window
size instead of doing it ourselves.

3 years ago* src/nsterm.m (ns_set_frame_alpha): Enable alpha on GNUstep.
Alan Third [Sat, 10 Jul 2021 14:47:00 +0000 (15:47 +0100)]
* src/nsterm.m (ns_set_frame_alpha): Enable alpha on GNUstep.

3 years agoFix image crash on macOS (bug#49688)
Alan Third [Sat, 24 Jul 2021 11:44:19 +0000 (12:44 +0100)]
Fix image crash on macOS (bug#49688)

* src/nsimage.m ([EmacsImage allocInitFromFile:]): Use isValid to
check whether the image is valid instead of generating a tiff.

3 years agoAdjust grep-mode end-col function return value
Mattias Engdegård [Mon, 26 Jul 2021 19:18:42 +0000 (21:18 +0200)]
Adjust grep-mode end-col function return value

* lisp/progmodes/grep.el (grep-regexp-alist): Adjust the return value
from the END-COL function by one since it is now (after fixing
bug#49624) inclusive.  Found by Juri Linkov.

3 years agoSome minor improvements for share handling in tramp-gvfs.el
Michael Albinus [Mon, 26 Jul 2021 18:51:57 +0000 (20:51 +0200)]
Some minor improvements for share handling in tramp-gvfs.el

* lisp/net/tramp-gvfs.el (tramp-gvfs-connection-mounted-p):
Set "share" connection property if the mount spec offers it.
(tramp-gvfs-handle-get-remote-uid)
(tramp-gvfs-handle-get-remote-gid): Use it.

3 years agoAdapt Tramp for yubikey
Michael Albinus [Mon, 26 Jul 2021 13:44:32 +0000 (15:44 +0200)]
Adapt Tramp for yubikey

* lisp/net/tramp.el (tramp-yubikey-regexp): Adapt value.
(tramp-trace-functions): Adapt docstring.
(tramp-process-action-regexp): New defvar.
(tramp-action-password, tramp-process-one-action): Use it.
(tramp-action-show-and-confirm-message): Rewrite.

3 years agoAdapt tramp-sudoedit.el for better testing
Michael Albinus [Mon, 26 Jul 2021 07:55:30 +0000 (09:55 +0200)]
Adapt tramp-sudoedit.el for better testing

* doc/misc/tramp.texi (Bug Reports): Revert last change.  Mention
exception for sudoedit.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command):
Let-bind `tramp-cache-read-persistent-data' for better password handling.

3 years ago; * lisp/replace.el (occur-after-change-function): Fix logic mistake
Mattias Engdegård [Mon, 26 Jul 2021 07:15:04 +0000 (09:15 +0200)]
; * lisp/replace.el (occur-after-change-function): Fix logic mistake

3 years agoDescribe changes to the occur-mode implementation in NEWS
Mattias Engdegård [Sun, 25 Jul 2021 19:39:39 +0000 (21:39 +0200)]
Describe changes to the occur-mode implementation in NEWS

* etc/NEWS: Mention change to the `occur-target` property (bug#39121).

3 years agoFix recent gdb-mi change
Glenn Morris [Sun, 25 Jul 2021 16:44:37 +0000 (09:44 -0700)]
Fix recent gdb-mi change

* lisp/progmodes/gdb-mi.el (gdb-registers-filter-pattern-list):
Fix type.

3 years agoMerge from origin/emacs-27
Glenn Morris [Sun, 25 Jul 2021 14:57:23 +0000 (07:57 -0700)]
Merge from origin/emacs-27

d0625dc553 (origin/emacs-27) ; One more change in back.texi.
06d0a66e57 ; Yet another last-minute change in Emacs manual for printing

3 years agoAdd instructions for Tramp bug reports
Michael Albinus [Sun, 25 Jul 2021 14:54:00 +0000 (16:54 +0200)]
Add instructions for Tramp bug reports

* doc/misc/tramp.texi (Bug Reports): Describe how to use password
cache with "emacs -Q".

3 years agoFix tex-validate-buffer
Mattias Engdegård [Sun, 25 Jul 2021 11:04:43 +0000 (13:04 +0200)]
Fix tex-validate-buffer

* lisp/textmodes/tex-mode.el (tex-validate-buffer):
Set `inhibit-read-only` around all modifications of the
read-protected *Occur* buffer (bug#19326).
Add the `occur-match` property, and adjust the extent of the
`occur-target` property, so that next-error and previous-error work
correctly (bug#39121).

3 years agoAdd back occur-mode-find-occurrence for compatibility (bug#39121)
Mattias Engdegård [Sun, 25 Jul 2021 13:55:50 +0000 (15:55 +0200)]
Add back occur-mode-find-occurrence for compatibility (bug#39121)

* lisp/replace.el (occur-mode-find-occurrence):
Put back (an emulation of) the previously removed function.
It is used internally in eshell and in some external code.

Problem found by Basil Contovounesios.

3 years agoFix compilation of xftfont.c with old fontconfig
Eli Zaretskii [Sun, 25 Jul 2021 12:50:46 +0000 (15:50 +0300)]
Fix compilation of xftfont.c with old fontconfig

* src/xftfont.c (FC_LCD_FILTER): Define if undefined, for older
versions of fontconfig.  This was mistakenly deleted 2 years ago.
(Bug#49722)

3 years agoFix extended attributes for Tramp's sudoedit method (bug#49724)
Michael Albinus [Sun, 25 Jul 2021 12:14:49 +0000 (14:14 +0200)]
Fix extended attributes for Tramp's sudoedit method (bug#49724)

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Remove compat code for `{set-}file-extended-attributes'.
(tramp-sudoedit-handle-write-region): Handle extended attributes.
(Bug#49724)

* test/lisp/net/tramp-tests.el (tramp-test25-file-selinux):
Fix test for sudoedit method.

3 years ago* etc/NEWS: Fix renaming of directory-append.
Kévin Le Gouguec [Sun, 25 Jul 2021 10:23:28 +0000 (12:23 +0200)]
* etc/NEWS: Fix renaming of directory-append.

3 years agoWhen bookmark is overwritten, unfontify its previous position
Christopher League [Sun, 25 Jul 2021 07:37:36 +0000 (09:37 +0200)]
When bookmark is overwritten, unfontify its previous position

* lisp/bookmark.el (bookmark-store): When the bookmark-fontify option
is non-nil, setting or jumping to bookmarks will colorize them using
`bookmark-face'.  With this change, overwriting a bookmark will remove
the fontification at its former position (bug#49725).

3 years agoUse `file-name-concat' in Tramp
Michael Albinus [Sun, 25 Jul 2021 10:05:01 +0000 (12:05 +0200)]
Use `file-name-concat' in Tramp

* lisp/net/tramp-compat.el (tramp-compat-file-name-concat):
New defalias.

* lisp/net/tramp.el (tramp-handle-expand-file-name):
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name):
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
* lisp/net/tramp-smb.el (tramp-smb-handle-expand-file-name):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
Use it.

3 years agoDon't squash markers in occur-edit-mode
Mattias Engdegård [Sun, 25 Jul 2021 09:24:53 +0000 (11:24 +0200)]
Don't squash markers in occur-edit-mode

* lisp/replace.el (occur-after-change-function): Instead of replacing
the whole line being edited, use shrink-wrapping to replace the
smallest interval encompassing the change.  That way, we avoid
disturbing markers (such as occur highlighting locations) in the line;
they would otherwise all be forced to the beginning.

3 years agoKeep track of match extents in occur-mode (bug#39121)
Mattias Engdegård [Sat, 24 Jul 2021 14:32:11 +0000 (16:32 +0200)]
Keep track of match extents in occur-mode (bug#39121)

Use the `occur-target` text property to keep track of the extents of
all matches on each line instead of just the start of the first match.
Doing so allows us to highlight all matches when jumping to a matching
line instead of just the first one, and it works in a more principled
way.  It also removes compatibility problems that were introduced with
occur-highlight-regexp.

For compatibility with code that populate their own occur-mode
buffers, we still accept `occur-target` properties with a single
marker as value.

* lisp/replace.el (occur-highlight-regexp, occur-highlight-overlay):
Remove.
(occur-highlight-overlays): New.
(occur--targets-start): New.
* lisp/replace.el (occur-after-change-function):
(occur-mode-find-occurrence): Replace with...
(occur-mode--find-occurrences): ...this function that returns the
whole `occur-target` property value.
(occur-mode-goto-occurrence, occur-mode-goto-occurrence-other-window)
(occur-goto-locus-delete-o, occur-mode-display-occurrence)
(occur-engine): Adjust to new property format.
(occur--highlight-occurrence): Replace with...
(occur--highlight-occurrences): ...this function that takes
the `occur-target` property value as argument.
(occur-1): Don't use `occur-highlight-regexp`.
* test/lisp/replace-tests.el (occur-highlight-occurrence):
Adapt to new property format.

3 years agoSupport '--group-directories-first' in ls-lisp.el
Arthur Miller [Sat, 24 Jul 2021 14:58:08 +0000 (16:58 +0200)]
Support  '--group-directories-first' in ls-lisp.el

* lisp/ls-lisp.el (ls-lisp--sanitize-switches): New function.
(ls-lisp--insert-directory): Support '--group-directories-first'.
Call 'ls-lisp--sanitize-switches' to convert long options to short
forms and remove unsupported long options.  Update the doc string.

Copyright-paperwork-exempt: yes

3 years agoAdd commands to move to next/previous column in tabulated-list-mode
Peter Feigl [Sun, 25 Jul 2021 07:16:08 +0000 (09:16 +0200)]
Add commands to move to next/previous column in tabulated-list-mode

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map): Add
keybindings M-left and M-right.
(tabulated-list-previous-column tabulated-list-next-column): Implement
commands (bug#44711).

3 years agoRename directory-append to file-name-concat
Lars Ingebrigtsen [Sun, 25 Jul 2021 06:54:20 +0000 (08:54 +0200)]
Rename directory-append to file-name-concat

* src/fileio.c (Ffile_name_concat):
* lisp/files.el (move-file-to-trash):
* lisp/emacs-lisp/shortdoc.el (file-name):
* doc/lispref/files.texi (Directory Names): Rename
`directory-append' to `file-name-concat'.

3 years agoAllow empty elements in directory-append
Lars Ingebrigtsen [Sun, 25 Jul 2021 06:00:50 +0000 (08:00 +0200)]
Allow empty elements in directory-append

* doc/lispref/files.texi (Directory Names): Document it.
* src/fileio.c (Fdirectory_append): Allow empty elements.

3 years agoDisable delay and ding in replace-tests
Mattias Engdegård [Sat, 24 Jul 2021 15:11:21 +0000 (17:11 +0200)]
Disable delay and ding in replace-tests

* test/lisp/replace-tests.el (replace-tests-with-undo):
When testing the "U" (undo all changes) option, the code will delay
and ding which is obnoxious in an automated test.
Disabling that makes the test quiet and about 150 times faster.

3 years ago; * src/fileio.c (Fdirectory_append): Doc fix.
Eli Zaretskii [Sat, 24 Jul 2021 17:18:28 +0000 (20:18 +0300)]
; * src/fileio.c (Fdirectory_append): Doc fix.

3 years agoAdd filter to GDB's register buffer
Yuan Fu [Sat, 24 Jul 2021 17:11:08 +0000 (19:11 +0200)]
Add filter to GDB's register buffer

* lisp/progmodes/gdb-mi.el (gdb-registers-enable-filter)
(gdb-registers-filter-pattern-list): New custom options.
(gdb-header-click-event-handler, gdb-registers-toggle-filter): New
functions.
(gdb-header-click-event-handler): Only add a register if it passes the
filter.
(gdb-registers-mode-map): New keybinding for toggling the filter.
(gdb-registers-header): New buttons on the header line for the
filter (bug#39179).

3 years agoReally convert to multibyte in Fdirectory_append
Lars Ingebrigtsen [Sat, 24 Jul 2021 16:48:44 +0000 (18:48 +0200)]
Really convert to multibyte in Fdirectory_append

* src/fileio.c (Fdirectory_append): Fix check for whether we need
to convert to multibyte.
(Fdirectory_append):

3 years agoFix last commit in tramp.el
Michael Albinus [Sat, 24 Jul 2021 16:49:57 +0000 (18:49 +0200)]
Fix last commit in tramp.el

3 years agoFix Fdirectory_append check for whether strings have to be converted
Lars Ingebrigtsen [Sat, 24 Jul 2021 16:35:14 +0000 (18:35 +0200)]
Fix Fdirectory_append check for whether strings have to be converted

* src/coding.c (string_ascii_p): Make it non-static.

* src/fileio.c (Fdirectory_append): Fix check for whether we need
to convert to multibyte.

* src/fns.c (string_ascii_p): Remove copy.

* src/lisp.h: Declare string_ascii_p.

3 years agoSet the normal-erase-is-backspace variable from Customize
Lars Ingebrigtsen [Sat, 24 Jul 2021 16:21:50 +0000 (18:21 +0200)]
Set the normal-erase-is-backspace variable from Customize

* lisp/simple.el (normal-erase-is-backspace): Always set the
variable so that Customize is up-to-date (bug#49593).

3 years agoTweak Fdirectory_append slightly
Lars Ingebrigtsen [Sat, 24 Jul 2021 16:09:14 +0000 (18:09 +0200)]
Tweak Fdirectory_append slightly

* src/fileio.c (Fdirectory_append): Make the xfree condition more
robust.

3 years agoImprove directory-append manual entry
Lars Ingebrigtsen [Sat, 24 Jul 2021 16:06:36 +0000 (18:06 +0200)]
Improve directory-append manual entry

* doc/lispref/files.texi (Directory Names): Mention zero-length
restriction.

3 years agoTweak Fdirectory_append for efficiency
Lars Ingebrigtsen [Sat, 24 Jul 2021 15:28:10 +0000 (17:28 +0200)]
Tweak Fdirectory_append for efficiency

* src/fileio.c (Fdirectory_append): Make slightly more efficient.

3 years agoExtend directory-append to take an arbitrary number of components
Lars Ingebrigtsen [Sat, 24 Jul 2021 15:22:43 +0000 (17:22 +0200)]
Extend directory-append to take an arbitrary number of components

* doc/lispref/files.texi (Directory Names): Document it.
* lisp/emacs-lisp/shortdoc.el (file-name): Add new example.

* src/fileio.c (Fdirectory_append): Change the function to take an
arbitrary number of components.

3 years ago; Fix directory-append arglist in files.texi.
Basil L. Contovounesios [Sat, 24 Jul 2021 13:59:36 +0000 (14:59 +0100)]
; Fix directory-append arglist in files.texi.

3 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sat, 24 Jul 2021 11:58:23 +0000 (13:58 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

3 years agoAdd Tramp support for yubikey (bug#49714)
Michael Albinus [Sat, 24 Jul 2021 11:58:03 +0000 (13:58 +0200)]
Add Tramp support for yubikey (bug#49714)

* lisp/net/tramp.el (tramp-yubikey-regexp): New defcustom.
(tramp-action-show-and-confirm-message): New defun.

* lisp/net/tramp-sh.el (tramp-actions-before-shell)
(tramp-actions-copy-out-of-band): Add `tramp-yubikey-regexp' action.

3 years agoAdjust tab-bar to the new mode-line-misc-info value
Lars Ingebrigtsen [Sat, 24 Jul 2021 11:53:46 +0000 (13:53 +0200)]
Adjust tab-bar to the new mode-line-misc-info value

* lisp/tab-bar.el (tab-bar--define-keys): Adjust to the new
default value for `mode-line-misc-info'.

3 years agoRemove duplicated NEWS entries
Lars Ingebrigtsen [Sat, 24 Jul 2021 11:47:54 +0000 (13:47 +0200)]
Remove duplicated NEWS entries

3 years agoMake 's' in *Help* work for Lisp-defined variables again
Lars Ingebrigtsen [Sat, 24 Jul 2021 11:46:02 +0000 (13:46 +0200)]
Make 's' in *Help* work for Lisp-defined variables again

* lisp/help-fns.el (describe-variable): Make the `s' command work
for Lisp-defined variables again (bug#39121).

3 years agoFix problem when moving files called ~ to the trash
Lars Ingebrigtsen [Sat, 24 Jul 2021 11:34:52 +0000 (13:34 +0200)]
Fix problem when moving files called ~ to the trash

* lisp/files.el (move-file-to-trash): Construct the trash file
name safely (bug#49711).  This makes (move-file-to-trash "/tmp/~")
etc work.

3 years agoAdd new function `directory-append'
Lars Ingebrigtsen [Sat, 24 Jul 2021 11:30:58 +0000 (13:30 +0200)]
Add new function `directory-append'

* doc/lispref/files.texi (Directory Names): Document it, and
remove the concat-based file concatenation description.
* lisp/emacs-lisp/shortdoc.el (file-name): Add.  And add more
expand-file-name examples.

* src/fileio.c (Fdirectory_append): New function.

3 years ago; One more change in back.texi.
Eli Zaretskii [Sat, 24 Jul 2021 10:41:01 +0000 (13:41 +0300)]
; One more change in back.texi.

3 years ago; Yet another last-minute change in Emacs manual for printing
Eli Zaretskii [Sat, 24 Jul 2021 10:15:50 +0000 (13:15 +0300)]
; Yet another last-minute change in Emacs manual for printing

* doc/emacs/book-spine.texi:
* doc/emacs/back.texi: Minor copyedits.

3 years agoMake the test for auto-mode-alist from .dir-local.el stricter
Lars Ingebrigtsen [Sat, 24 Jul 2021 09:16:15 +0000 (11:16 +0200)]
Make the test for auto-mode-alist from .dir-local.el stricter

* lisp/files.el (set-auto-mode--dir-local-valid-p): New function.
(set-auto-mode--apply-alist): Use it as a stricter test.

3 years ago; * etc/NEWS: Fix wording of the 'fill-column' entry.
Eli Zaretskii [Fri, 23 Jul 2021 19:49:34 +0000 (22:49 +0300)]
; * etc/NEWS: Fix wording of the 'fill-column' entry.

3 years ago; * lisp/calendar/cal-french.el (calendar-french-trim-feast): Doc fix.
Eli Zaretskii [Fri, 23 Jul 2021 19:46:28 +0000 (22:46 +0300)]
; * lisp/calendar/cal-french.el (calendar-french-trim-feast): Doc fix.

3 years ago; * lisp/files.el (set-auto-mode--apply-alist): 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.

3 years agoImprove recently added documentation
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.

3 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Fri, 23 Jul 2021 18:30:46 +0000 (20:30 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

3 years agoFix bug#49699
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)

3 years agoFix typo in set-auto-mode--apply-alist
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).

3 years agoAllow storing SMTP variables when queueing mail
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.

3 years agoFix do-auto-fill thinko introduced earlier today
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.

3 years agoAdd auto-mode-alist functionality to .dir-locals.el
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.

3 years agoAdd more support for the French Revolutionary Calendar
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

3 years agoOff-by-one error in compilation rule end-column function (bug#49624)
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.

3 years agoWarn about arity errors in inlining calls (bug#12299)
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.

3 years agoRemove text props from callback args in erc-button
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).

3 years agodeclare-function doc string clarification about FILE
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).

3 years agoMake nil value of fill-column obsolete
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.

3 years agoAdjust time-tests.el to bug#30056
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).

3 years agoMove mode-line NEWS items to a common section
Lars Ingebrigtsen [Fri, 23 Jul 2021 12:44:15 +0000 (14:44 +0200)]
Move mode-line NEWS items to a common section

3 years ago'global-mode-string' elements should have a space at the end
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.

3 years agoFix an rcirc merge problem
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.

3 years agoMS-Windows followup to recent emacsclient changes
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.

3 years agoRedo emacsclient socket symlink-attack checking
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.

3 years agoMerge branch 'feature/rcirc-update'
Philip Kaludercic [Fri, 23 Jul 2021 11:23:35 +0000 (13:23 +0200)]
Merge branch 'feature/rcirc-update'

3 years agoMake erc recognize `foo*' as a function Lisp symbol
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).

3 years agoMake supersession warnings work again
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).

3 years agoFix display of line/wrap-prefix when there's a display property at BOL
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)

3 years agoMake revert-buffer preserve buffer-readedness
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).

3 years ago`term-char-mode' doc string clarification
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).

3 years agoBind the GIT_LITERAL_PATHSPECS environment variable
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).

3 years agoAvoid failing in desktop-clear due to killed buffers
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

3 years agoRemove the (value) bits from cus-start Customize strings
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).

3 years agoAvoid byte-compilation warning
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)

3 years ago; * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Doc fix.
Eli Zaretskii [Thu, 22 Jul 2021 07:31:14 +0000 (10:31 +0300)]
; * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Doc fix.

3 years agoMove generalized variable specs from cl-lib.el to gv.el
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).

3 years agoMake vc-git-mode-line-string more robust
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

3 years ago* lisp/cus-start.el: Add mode-line-compact to Customize
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

3 years agoMake input of multi-key inputs in different emacsclients more logical
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).

3 years ago* src/eval.c (signal_quit_p): Fix the usual int/Lisp_Object mixup
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

3 years ago* lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Add arg `category`
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.

3 years agoMake `C-g' after `M-x' not give a backtrace unless required
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.

3 years agoSpeed up by storing frame faces in hash tables instead of alists
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>.

3 years ago* doc/lispref/display.texi (Overlay Properties): Tweak further
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

3 years agoRemove some "is"es from previous json checkin
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.

3 years agoFactor out char_table_ref_simple for readability
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).

3 years agoFix final test for invalid base64url chars
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.

3 years agoFixed a typo in Gnus manual
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

3 years agoFix bug-reference.el compilation warning
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).

3 years agoRestore evaluation logic in dired-guess-default
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).