1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00
Commit Graph

149183 Commits

Author SHA1 Message Date
Lars Ingebrigtsen
989937e1bc Revert "Make revert-buffer preserve buffer-readedness"
This reverts commit fcae435f59.

This leads to problems when reverting from a file that's changed
readedness externally.
2021-07-27 17:24:14 +02:00
Michael Albinus
17048030f5 ; Fix last change in tramp.el 2021-07-27 13:08:36 +02:00
Michael Albinus
124a3cb60b Final tweak for Tramp's yubikey detection
* lisp/net/tramp.el (tramp-yubikey-regexp)
(tramp-action-show-and-confirm-message): Expect also "\n".
2021-07-27 09:28:28 +02:00
Alan Third
d2d3fc3929 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.
2021-07-26 23:12:31 +01:00
Alan Third
9ce3fdc461 Fix NS inset rectangle corners
* src/nsterm.m (ns_draw_relief): Use a path to draw the mitered
corners instead of rectangles.
2021-07-26 23:12:25 +01:00
Alan Third
49bbed0dfd 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.
2021-07-26 23:12:12 +01:00
Alan Third
0b54632013 * src/nsterm.m (ns_set_frame_alpha): Enable alpha on GNUstep. 2021-07-26 23:12:04 +01:00
Alan Third
246803f26f 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.
2021-07-26 21:04:05 +01:00
Mattias Engdegård
4f43058e9a 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.
2021-07-26 21:25:20 +02:00
Michael Albinus
67fe106d10 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.
2021-07-26 20:51:57 +02:00
Michael Albinus
1ff02c53b5 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.
2021-07-26 15:44:32 +02:00
Michael Albinus
c3a76935fa 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.
2021-07-26 09:55:30 +02:00
Mattias Engdegård
6b7c22e7ee ; * lisp/replace.el (occur-after-change-function): Fix logic mistake 2021-07-26 09:15:04 +02:00
Mattias Engdegård
a45aed9479 Describe changes to the occur-mode implementation in NEWS
* etc/NEWS: Mention change to the `occur-target` property (bug#39121).
2021-07-25 21:40:56 +02:00
Glenn Morris
81da37b662 Fix recent gdb-mi change
* lisp/progmodes/gdb-mi.el (gdb-registers-filter-pattern-list):
Fix type.
2021-07-25 09:44:37 -07:00
Glenn Morris
ed1480b1d9 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
2021-07-25 07:57:23 -07:00
Michael Albinus
df7bb79f38 Add instructions for Tramp bug reports
* doc/misc/tramp.texi (Bug Reports): Describe how to use password
cache with "emacs -Q".
2021-07-25 16:54:00 +02:00
Mattias Engdegård
f4d04931b7 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).
2021-07-25 16:41:46 +02:00
Mattias Engdegård
697341d7fd 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.
2021-07-25 16:40:59 +02:00
Eli Zaretskii
41a55a330f 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)
2021-07-25 15:50:46 +03:00
Michael Albinus
41e62df73a 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.
2021-07-25 14:14:49 +02:00
Kévin Le Gouguec
cb28b2e32b * etc/NEWS: Fix renaming of directory-append. 2021-07-25 12:23:33 +02:00
Christopher League
142961bcdf 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).
2021-07-25 12:23:33 +02:00
Michael Albinus
0577bd0cf9 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.
2021-07-25 12:05:01 +02:00
Mattias Engdegård
b0d33d4253 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.
2021-07-25 11:24:53 +02:00
Mattias Engdegård
c52e26df30 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.
2021-07-25 10:29:09 +02:00
Arthur Miller
d3415724a6 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
2021-07-25 10:44:31 +03:00
Peter Feigl
a6afa221d7 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).
2021-07-25 09:16:08 +02:00
Lars Ingebrigtsen
f04f8126f0 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'.
2021-07-25 08:54:20 +02:00
Lars Ingebrigtsen
aa9cba6587 Allow empty elements in directory-append
* doc/lispref/files.texi (Directory Names): Document it.
* src/fileio.c (Fdirectory_append): Allow empty elements.
2021-07-25 08:00:50 +02:00
Mattias Engdegård
03f844249c 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.
2021-07-24 19:30:39 +02:00
Eli Zaretskii
e3155440dc ; * src/fileio.c (Fdirectory_append): Doc fix. 2021-07-24 20:18:28 +03:00
Yuan Fu
7c83e605ab 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).
2021-07-24 19:11:08 +02:00
Lars Ingebrigtsen
42d4537ed2 Really convert to multibyte in Fdirectory_append
* src/fileio.c (Fdirectory_append): Fix check for whether we need
to convert to multibyte.
(Fdirectory_append):
2021-07-24 18:53:43 +02:00
Michael Albinus
0c77d1d2ca Fix last commit in tramp.el 2021-07-24 18:49:57 +02:00
Lars Ingebrigtsen
4b1367ee97 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.
2021-07-24 18:35:14 +02:00
Lars Ingebrigtsen
26da0b5ecb 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).
2021-07-24 18:21:50 +02:00
Lars Ingebrigtsen
6becc97433 Tweak Fdirectory_append slightly
* src/fileio.c (Fdirectory_append): Make the xfree condition more
robust.
2021-07-24 18:09:14 +02:00
Lars Ingebrigtsen
ba918ecb78 Improve directory-append manual entry
* doc/lispref/files.texi (Directory Names): Mention zero-length
restriction.
2021-07-24 18:06:36 +02:00
Lars Ingebrigtsen
28bf38743d Tweak Fdirectory_append for efficiency
* src/fileio.c (Fdirectory_append): Make slightly more efficient.
2021-07-24 17:28:10 +02:00
Lars Ingebrigtsen
b4543dfa9e 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.
2021-07-24 17:22:43 +02:00
Basil L. Contovounesios
8cd66a3170 ; Fix directory-append arglist in files.texi. 2021-07-24 14:59:36 +01:00
Michael Albinus
4d43974468 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2021-07-24 13:58:23 +02:00
Michael Albinus
9ad1f71c39 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.
2021-07-24 13:58:03 +02:00
Lars Ingebrigtsen
8b808be2fb 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'.
2021-07-24 13:53:46 +02:00
Lars Ingebrigtsen
d8a4a5ac7c Remove duplicated NEWS entries 2021-07-24 13:47:54 +02:00
Lars Ingebrigtsen
9192f5d25b 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).
2021-07-24 13:46:02 +02:00
Lars Ingebrigtsen
86a795f6dd 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.
2021-07-24 13:34:52 +02:00
Lars Ingebrigtsen
5431a58e86 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.
2021-07-24 13:30:58 +02:00
Eli Zaretskii
d0625dc553 ; One more change in back.texi. 2021-07-24 13:41:01 +03:00