1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 03:20:39 -08:00
Commit graph

157313 commits

Author SHA1 Message Date
Po Lu
e5dbe60e3c Improve handling of fallback drop protocols
* lisp/x-dnd.el (x-dnd-use-offix-drop): New value `files', which
means to only drop files using the OffiX protocol.  Make it the
default.
(x-dnd-handle-old-kde): Handle other data types correctly.
(x-dnd-offix-old-kde-to-name): New variable.
(x-dnd-offix-id-to-name): Fix typo in doc string.
(x-dnd-handle-unsupported-drop): Implement new value.
2022-06-16 14:33:30 +08:00
Po Lu
55e9d729ca Fix Motif DND after atom ownership is lost due to frame destruction
* src/xterm.c (xm_get_drag_atom_1): Record owner.
(x_free_frame_resources): Clear drag atom if owner was freed.
* src/xterm.h (struct x_display_info): New field
`motif_drag_atom_owner'.
2022-06-16 14:00:27 +08:00
Stefan Kangas
054832c9e1 Merge from origin/emacs-28
4d7a936ac2 ; * src/fileio.c (Fset_file_modes): Improve previous change
32cff740e2 Describe 'set-file-modes' argument prompting
2022-06-16 06:52:01 +02:00
Po Lu
6dd4c5b953 Improve drag atom computation
* src/xterm.c (xm_get_drag_window): Avoid leak if error occured
creating drag window.  Also use StructureNotifyMask instead of
ButtonPressMask.
(xm_get_drag_atom_1): Update.  Make EMACS_DRAG_ATOM a list of
atoms and use the first one that isn't currently owned.
(xm_get_drag_atom): Stop owning selection here.
(xm_setup_drag_info): Record chosen atom.
(x_dnd_cleanup_drag_and_drop, x_dnd_begin_drag_and_drop)
(x_dnd_update_state, handle_one_xevent, x_connection_closed):
Use chosen atom.
* src/xterm.h (struct x_display_info): New field
`motif_drag_atom_time'.
2022-06-16 12:49:52 +08:00
Paul Eggert
343482d641 Streamline time decoding and conversion
* src/lisp.h (lisp_h_BASE2_EQ, BASE2_EQ): New macros and functions.
* src/timefns.c (tzlookup, Fdecode_time): Use them.
(Ftime_convert): Convert to symbol once, instead of many times.
2022-06-15 23:27:08 -05:00
Paul Eggert
9a2be29672 Don’t test time functions for NaNs, INF
* test/src/timefns-tests.el (decode-then-encode-time)
(time-equal-p-NaN-NaN, time-arith-tests):
Don’t test time functions with infinities and NaNs,
which are not Lisp time values.
2022-06-15 23:27:08 -05:00
Paul Eggert
9bce1f3d70 Prefer BASE_EQ in time-sensitive ops
* src/timefns.c (tzlookup, lisp_time_hz_ticks)
(decode_time_components, lisp_to_timespec, lispint_arith)
(time_arith, time_cmp, Fdecode_time, Fencode_time)
(Ftime_convert): Prefer BASE_EQ to EQ where either will do.
2022-06-15 23:27:07 -05:00
Paul Eggert
16ee227c18 icalendar-tests no longer assumes TZ = wall
Do not assume that the TZ environment variable is either unset or
agrees with /etc/localtime.  I ran into this test bug while
running ‘TZ=America/Chicago make check’ on a platform where
/etc/localtime was America/Los_Angeles.
* test/lisp/calendar/icalendar-tests.el:
(icalendar-tests--decode-isodatetime): Don’t use
set-time-zone-rule, whose doc string says “Instead of calling this
function, you typically want something else” for a reason.
Instead, pass the zone arg to icalendar-test--format.
2022-06-15 23:06:08 -05:00
Po Lu
160b22ebf7 Handle OffiX drop of multiple files
* lisp/x-dnd.el (x-dnd-types-alist): Register DndTypeFiles.
(x-dnd-offix-id-to-name): Fix typo.
(x-dnd-handle-offix-files): New function.
(x-dnd-convert-to-offix): Fix conversion to DndTypeFiles.
2022-06-16 10:39:01 +08:00
Po Lu
9accc800a7 Comply with the Motif requirement for unique drag atoms
* src/xselect.c (x_handle_selection_request)
(Fx_get_selection_internal, syms_of_xselect): New variable
`x-selection-alias-alist'.  Respect that alist of aliases.

* src/xterm.c (x_atom_refs): Intern _EMACS_DRAG_ATOM.
(xm_get_drag_atom_1, xm_get_drag_atom): New functions.
(xm_setup_drag_info, x_dnd_cleanup_drag_and_drop)
(x_dnd_begin_drag_and_drop, x_dnd_update_state, handle_one_xevent)
(x_connection_closed, x_intern_cached_atom): Alias the drag atom
to XdndSelection.  Use it instead of XdndSelection to set the
Motif index atom.
(x_get_atom_name): Handle new atoms.
(syms_of_xterm): New defsym.
* src/xterm.h (struct x_display_info): New fields for new atoms
and their names.
2022-06-16 10:08:12 +08:00
Sean Whitton
556c304007 * .dir-locals.el: Set emacs-lisp-docstring-fill-column. 2022-06-15 14:42:55 -07:00
Sean Whitton
82694cdb20 ; * etc/NEWS: Add entry for recent minibuffer abbrev table changes. 2022-06-15 14:41:17 -07:00
Lars Ingebrigtsen
a29e0f1c64 Adjust ibuffer test
* test/lisp/ibuffer-tests.el (ibuffer-format-qualifier): Adjust
test after recent formatting changes.
2022-06-15 18:36:58 +02:00
Lars Ingebrigtsen
1ead480ca1 Allow completing tags, parameters and values in html-mode
* lisp/textmodes/sgml-mode.el (html-mode--complete-at-point):
Allow completing tags, parameters and values (bug#29057).
2022-06-15 18:29:42 +02:00
Manuel Giraud
b105981803 Do not display 'nil for 0-ary filter qualifier in ibuf
* lisp/ibuf-ext.el (ibuffer-format-qualifier-1): Do not display
nil in header for 0-ary filter qualifier.
* lisp/ibuf-macs.el (define-ibuffer-filter): Also fix the message.
2022-06-15 17:52:38 +02:00
Stefan Kangas
ebdda80b07 Prefer defvar-keymap in ibuffer.el
* lisp/ibuffer.el (ibuffer--filter-map, ibuffer-name-map)
(ibuffer-filename/process-header-map, ibuffer-mode-name-map)
(ibuffer-name-header-map, ibuffer-size-header-map)
(ibuffer-mode-header-map, ibuffer-mode-filter-group-map): Prefer
defvar-keymap.
2022-06-15 16:43:22 +02:00
Robert Pluim
4d7a936ac2 ; * src/fileio.c (Fset_file_modes): Improve previous change 2022-06-15 15:16:47 +02:00
Po Lu
9b053968ef Implement using the OffiX protocol for dropping
* lisp/x-dnd.el (x-dnd-use-offix-drop): New user option.
(x-dnd-handle-unsupported-drop): Return t if the OffiX protocol
was used.
(x-treat-local-requests-remotely): New defvar.
(x-dnd-convert-to-offix, x-dnd-do-offix-drop): New functions.

* src/xterm.c: Update commentary.
(x_term_init): Extend number of DND atoms allocated by default.
2022-06-15 21:03:31 +08:00
Robert Pluim
32cff740e2 Describe 'set-file-modes' argument prompting
* src/fileio.c (Fset_file_modes): Document that FILENAME is prompted
for.  (Bug#55984)
2022-06-15 14:27:28 +02:00
Miha Rihtaršič
8ee9e20f8c whitespace.el: New whitespace style `lines-char'
* lisp/whitespace.el (whitespace-style):
(whitespace-style-value-list):
(whitespace-toggle-option-alist):
(global-whitespace-toggle-options):
(whitespace-help-text):
(whitespace-interactive-char):
(whitespace-style-face-p):
(whitespace-color-on):
(whitespace-lines-regexp): New whitespace style `lines-char', which
highlights only the first character over the whitespace-line-column
limit (bug#55980).
2022-06-15 14:25:08 +02:00
Po Lu
12d6aad132 Handle receiving new OffiX protocol during drag-and-drop
* lisp/x-dnd.el (x-dnd-types-alist, x-dnd-known-types): Add
DndTypeFile and DndTypeText.
(x-dnd-init-frame): Add _DND_PROTOCOL.
(x-dnd-handle-drag-n-drop-event): Handle _DND_PROTOCOL events.
(x-dnd-handle-old-kde): Drop event if proto is too new.
(x-dnd-offix-id-to-name): New list.
(x-dnd-handle-offix-file, x-dnd-handle-offix): New functions.
2022-06-15 20:09:45 +08:00
Lars Ingebrigtsen
0d383b592c Fix ;;;###autoload scanning from (some) packages
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Fix autoloads scanning from packages.
2022-06-15 14:05:17 +02:00
Michael Albinus
6237aec6ca Fix file name quoting in tramp-smb.el
* lisp/net/tramp-smb.el (tramp-smb-shell-quote-localname): New defun.
(tramp-smb-handle-add-name-to-file, tramp-smb-handle-copy-file)
(tramp-smb-handle-delete-directory)
(tramp-smb-handle-delete-file)
(tramp-smb-do-file-attributes-with-stat)
(tramp-smb-handle-file-local-copy)
(tramp-smb-handle-file-system-info)
(tramp-smb-handle-make-directory-internal)
(tramp-smb-handle-make-symbolic-link)
(tramp-smb-handle-process-file, tramp-smb-handle-rename-file)
(tramp-smb-handle-set-file-modes)
(tramp-smb-handle-start-file-process)
(tramp-smb-handle-write-region, tramp-smb-get-file-entries)
(tramp-smb-get-stat-capability): Use it.
(tramp-smb-get-localname): Remove superfluous test.  (Bug#55855)
2022-06-15 12:43:17 +02:00
Michael Albinus
8fca44da81 Improve Tramp debugging
* lisp/net/tramp-cache.el (tramp-list-connections): Fix docstring.

* lisp/net/tramp.el (tramp-backtrace): New optional arg FORCE.
2022-06-15 10:57:56 +02:00
Juri Linkov
112b6b8e37 Update args of isearch-search-fun-in-text-property (bug#14013)
* lisp/isearch.el (isearch-search-fun-in-text-property): Swap signature args.
* lisp/dired-aux.el (dired-isearch-search-filenames): Update the call.
2022-06-15 10:32:09 +03:00
Visuwesh
7547e4e60e repeat-mode: Don't echo unset keys in help message
* repeat.el (repeat-echo-message-string): Check if the key is set.
(bug#55977)
2022-06-15 10:24:33 +03:00
Po Lu
36f96c351a Handle coordinates for the old KDE drop protocol
* src/xterm.c (x_atom_refs): Add DndProtocol and _DND_PROTOCOL.
(x_coords_from_dnd_message): Handle the old KDE protocol.
* src/xterm.h (struct x_display_info): New atoms.
2022-06-15 14:47:11 +08:00
Stefan Kangas
5b7f24e58a Merge from origin/emacs-28
850050ca5c Revert "Clarify what a Calc registeri in in calc-insert-re...
2022-06-15 06:32:14 +02:00
Po Lu
1302c329eb Fix link action handling with Motif DND
* src/xterm.c (enum xm_drag_operation): New alternate
definition.
(XM_DRAG_OPERATION_IS_LINK): New macro.
(handle_one_xevent): Use it instead.
2022-06-15 11:37:39 +08:00
Po Lu
2e2913654b Handle coordinates from XM_DRAG_REASON_DRAG_MOTION replies
* src/xterm.c (struct xm_drag_motion_reply): New struct.
(xm_read_drag_motion_reply): New function.
(x_coords_from_dnd_message): Handle those messages as well.
2022-06-15 09:26:46 +08:00
Sean Whitton
787c4ad8b0 Add abbrev tables for minibuffer-mode and minibuffer-inactive-mode
* lisp/minibuffer.el (minibuffer-mode, minibuffer-inactive-mode): Add
an abbrev table for each of these modes (bug#55946).
2022-06-14 14:32:08 -05:00
Mattias Engdegård
1ac74e2862 Simplify byte-compiler assuming cconv normalisations
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker)
(byte-optimize-let-form, byte-optimize-letX):
* lisp/emacs-lisp/bytecomp.el (byte-compile-unwind-protect):
Simplify source optimisation and codegen code that can now rely on
normalised let/let* and unwind-protect forms.
2022-06-14 20:19:59 +02:00
Mattias Engdegård
d6600481ae Run cconv for dynbound code as well
Make cconv work for dynamically bound code and always run it.
This allows later stages to benefit from transformations and
normalisations in cconv.

* lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): Always run
cconv.
* lisp/emacs-lisp/cconv.el (cconv--analyze-function)
(cconv-analyze-form): In dynbound code, treat all variable bindings
as dynamic (lambda, let, let* and condition-case).
2022-06-14 20:19:59 +02:00
Mattias Engdegård
6825e5686a Normalise setq during macro-expansion
Early normalisation of setq during macroexpand-all allows later
stages, cconv, byte-opt and codegen, to be simplified and duplicated
checks to be eliminated.

* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
Normalise all setq forms to a sequence of (setq VAR EXPR).
Emit warnings if necessary.
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
* lisp/emacs-lisp/bytecomp.el (byte-compile-setq):
Simplify.
* test/lisp/emacs-lisp/bytecomp-tests.el: Adapt and add tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-nonvariable.el;
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-odd.el:
New files.
2022-06-14 20:19:59 +02:00
Juri Linkov
175bc8e5a5 * lisp/replace.el (read-regexp): Use minibuffer-message in the minibuffer. 2022-06-14 19:35:02 +03:00
Robert Pluim
d8f9cf7772 Add more characters with macron in C-x 8 map and latin input methods
* lisp/international/iso-transl.el (iso-transl-char-map): Add
sequences for {AE,ae,G,g} with macron.
* lisp/leim/quail/latin-post.el ("latin-postfix"): Add missing entries
for {AE,ae,G,g} with macron.
* lisp/leim/quail/latin-pre.el ("latin-prefix"): Add entries for
'letter with macron' for {A,a,E,e,AE,ae,I,I,O,o,U,u,Y,y} with macron.

(Bug#55668)
2022-06-14 16:31:10 +02:00
Stephen Berman
b090dbdae8 Fix errors when aligning text in find-dired
* lisp/find-dired.el (find-dired-filter): Don't error out while
trying to align the text (by just removing that code) (bug#46218).
2022-06-14 15:37:53 +02:00
Lars Ingebrigtsen
9225599ca7 Make flymake-proc--delete-temp-directory slightly safer
* lisp/progmodes/flymake-proc.el
(flymake-proc--delete-temp-directory): Temp dir name may be
abbreviatated, so expand it first (bug#46203).
2022-06-14 15:24:19 +02:00
Lars Ingebrigtsen
03124c4201 Fix .dir-local.el caching for symlinks
* lisp/files.el (dir-locals-read-from-dir): We want the time stamp
of the actual file, not the time stamp of the symlink (if
.dir-locals.el is a symlink) (bug#46122).
2022-06-14 15:01:44 +02:00
Lars Ingebrigtsen
a02bb84c80 Leave the contents on the *Backtrace* buffer on `q'
* lisp/emacs-lisp/debug.el (debug): Don't clear the contents of
the buffer on `q' (bug#55863).
2022-06-14 14:38:05 +02:00
Lars Ingebrigtsen
bea90d8de2 Fix gud parsing of empty jdb classpaths
* lisp/progmodes/gud.el (gud-jdb-marker-filter): Parse empty
classpaths (like classpath: []) correctly (bug#55957).
2022-06-14 14:26:58 +02:00
Daniel Martín
3e74cf6516 Bind Cmd-t to menu-set-font on macOS
* lisp/term/ns-win.el (global-map): set-frame-font asks for a font
using the minibuffer, but the former ns-popup-font-panel always showed
the graphical font panel on macOS.  To preserve the same behavior,
bind it to menu-set-font, which is also called by Options, Set Default
Font (bug#55967).
2022-06-14 14:23:06 +02:00
Lars Ingebrigtsen
441f081a64 Allow using alists in ido completion and hitting TAB
* lisp/ido.el (ido-completion-help): Allow using an alist
COMPLETIONS (bug#46091).
2022-06-14 14:16:55 +02:00
Lars Ingebrigtsen
850050ca5c Revert "Clarify what a Calc registeri in in calc-insert-register"
This reverts commit 73400e4002.

This has been fixed in Emacs 29 by making it possible to use regular registers in calc.
2022-06-14 13:56:07 +02:00
Lars Ingebrigtsen
706ef0ae93 Mention how to only get syntactic font locking in the manual
* doc/lispref/modes.texi (Syntactic Font Lock): Note how to only
get syntactic font locking (bug#46039).
2022-06-14 13:53:20 +02:00
Po Lu
8fa1cdc1fa ; Improve doc of `x-dnd-native-test-function'
* src/xterm.c (syms_of_xterm): Improve doc.  Suggested by Eli
Zaretskii <eliz@gnu.org>.
2022-06-14 19:50:31 +08:00
Michael Albinus
fda5cccba8 Fix Tramp problem with non-essential
* lisp/net/tramp.el (tramp-run-real-handler):
Handle also functions which use a `tramp-file-name' for the file
name handler.  (Bug#55832)
(tramp-get-home-directory, tramp-get-remote-uid)
(tramp-get-remote-gid): VEC can also be nil.
2022-06-14 13:04:34 +02:00
Mattias Engdegård
9fb80aee17 ; * lisp/emacs-lisp/cconv.el: Fix outdated comments. 2022-06-14 12:14:47 +02:00
Po Lu
18a1c7de2e Fix mishandling of dnd-scroll-margin with scroll bar motion
* lisp/dnd.el (dnd-handle-movement): Ignore posns inside scroll
bars for now.
2022-06-14 17:43:36 +08:00
Juri Linkov
99cb3a7154 * lisp/minibuffer.el (minibuffer-complete-history): New command.
(minibuffer-complete-defaults): New command.
https://lists.gnu.org/archive/html/emacs-devel/2022-06/msg00498.html
2022-06-14 10:14:52 +03:00