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

158456 commits

Author SHA1 Message Date
Po Lu
bfa951cdfa Fix invalid current buffer after print-unreadable-function signals
* src/print.c (PRINTPREPARE): Remove `old' and
record_unwind_current_buffer instead.
(PRINTFINISH): Stop restoring `old'.  (bug#56773)
2022-07-27 17:42:30 +08:00
Lars Ingebrigtsen
8be5481b8e Add a test for python-mode comment/else problem
Based on a patch from kobarity <kobarity@gmail.com>
2022-07-27 11:38:19 +02:00
Stephen Berman
dc84264f3c Fix comment/else indentation problem in python-mode
* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions): Fix indentation of
"else" after a comment (bug#56742).
2022-07-27 11:37:31 +02:00
Po Lu
27b5ab80ec Fix frame determination for XI touch events
* src/xterm.c (handle_one_xevent): Find touchscreen event
windows using x_window_to_frame.
2022-07-27 16:00:29 +08:00
Po Lu
de863f70aa Remove workaround for some input method problems
* src/xterm.c (handle_one_xevent): Remove modifier key
workaround for some input method problems, since they cause more
problems than they fix.  (bug#56782)
2022-07-27 13:01:54 +08:00
Po Lu
86f60ec54a Fix NS stretch glyph display
* src/nsterm.m (ns_draw_window_cursor): Just draw hollow cursor.
There is no need to draw the phys cursor glyph.
(ns_dumpglyphs_stretch): Delete function.
(ns_draw_glyph_string): New function.  Port code from X and use
it instead.  (bug#56787)
2022-07-27 11:21:34 +08:00
Alan Mackenzie
004ee6b046 CC Mode: correct the calculation and handling of c-use-category.
This fixes bug #56629.  The use of c-use-category was inconsistent, with the
result that it would be nil at compilation time, but t at run time.  This
resulted in wrongly writing syntax-table text properties to <s and >s, yet
testing for category properties on them.

* lisp/progmodes/cc-defs.el (c-use-category): Move to after the definition of
c-<-as-paren-syntax and c->-as-paren-syntax so as correctly to be able to use
their values.  Put an eval-when-compile around the calculation of its value,
to reduce the chances of future failure.
(c-mark-<-as-paren, c-mark->-as-paren, c-unmark-<->-as-paren, c-sc-scan-lists)
(c-sc-parse-partial-sexp): Wrap c-use-category in (eval-when-compile ...) as
an optimization, preventing the XEmacs code also being generated.
2022-07-26 19:43:13 +00:00
Lars Ingebrigtsen
058d3c0d16 Add missing @end defun to strings.texi
* doc/lispref/strings.texi (Text Comparison): Add missing @end defun.
2022-07-26 20:54:23 +02:00
Eli Zaretskii
d809207f53 ; Fix documentation of 'network-lookup-address-info'
* doc/lispref/processes.texi (Misc Network): Fix punctuation and
markup.
2022-07-26 21:34:38 +03:00
Eli Zaretskii
7b447956d8 ; Improve doc string of 'read-extended-command'
* lisp/simple.el (read-extended-command-mode)
(read-extended-command): Doc fixes.
2022-07-26 21:27:39 +03:00
Sam Steingold
90ec9bb83e restore and obsolete gnus-string-equal' and bibtex-string='
* lisp/gnus/gnus-util.el (gnus-string-equal): Restore and declare obsolete.
* lisp/textmodes/bibtex.el (bibtex-string=): Likewise.
2022-07-26 14:08:38 -04:00
Sam Steingold
1e3a7bf69d avoid error when message-fetch-field returns nil
* gnus-art.el (article-hide-boring-headers): Use "" when
  `message-fetch-field' returns `nil'
2022-07-26 14:02:49 -04:00
Sam Steingold
70341cab3e string-equal-ignore-case: new function
* lisp/cedet/semantic/complete.el (semantic-collector-calculate-completions):
  Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
  Add `string-equal-ignore-case'.
* lisp/emacs-lisp/cl-extra.el (cl-equalp): Use `string-equal-ignore-case'.
* lisp/emacs-lisp/shadow.el (load-path-shadows-find): Likewise.
* lisp/emacs-lisp/shortdoc.el (string): Add `string-equal-ignore-case'.
* lisp/files.el (file-truename): Use `string-equal-ignore-case'.
(file-relative-name): Likewise.
* lisp/gnus/gnus-art.el (article-hide-boring-headers):
  Use `string-equal-ignore-case' instead of `gnus-string-equal'.
* lisp/gnus/gnus-util.el (gnus-string-equal):
  Remove, use `string-equal-ignore-case' instead.
* lisp/international/mule-cmds.el (describe-language-environment):
  Use `string-equal-ignore-case'.
(locale-charset-match-p): Likewise.
* lisp/man.el (Man-softhyphen-to-minus): Use `string-prefix-p'.
* lisp/minibuffer.el (completion--string-equal-p):
  Remove, use `string-equal-ignore-case' instead.
(completion--twq-all): Use `string-equal-ignore-case'.
(completion--do-completion): Likewise.
* lisp/net/browse-url.el (browse-url-default-windows-browser):
  Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/org/ob-core.el (org-babel-results-keyword):
  Use `string-equal-ignore-case' instead of explicit `compare-strings'.
(org-babel-insert-result): Likewise.
* lisp/org/org-compat.el (string-equal-ignore-case):
  Define unless defined already.
(org-mode-flyspell-verify): Use `string-equal-ignore-case'.
* lisp/org/org-lint.el (org-lint-duplicate-custom-id): Likewise.
* lisp/org/ox.el (org-export-resolve-radio-link): Use
  `string-equal-ignore-case' and `string-clean-whitespace'.
* lisp/progmodes/flymake-proc.el
  (flymake-proc--check-patch-master-file-buffer):
  Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/progmodes/idlwave.el (idlwave-class-or-superclass-with-tag):
  Use `string-equal-ignore-case' instead of explicit `compare-strings'.
* lisp/subr.el (member-ignore-case): Use `string-equal-ignore-case'.
(string-equal-ignore-case): Compare strings ignoring case.
* lisp/textmodes/bibtex.el (bibtex-string=): Remove.
(bibtex-format-entry, bibtex-font-lock-url, bibtex-autofill-entry)
(bibtex-print-help-message, bibtex-validate, bibtex-validate-globally)
(bibtex-clean-entry, bibtex-completion-at-point-function, (bibtex-url):
  Use `string-equal-ignore-case' instead of `bibtex-string='.
* lisp/textmodes/sgml-mode.el (sgml-get-context):
  Use `string-equal-ignore-case' instead of explicit `compare-strings'.
(sgml-calculate-indent): Likewise
* test/lisp/subr-tests.el (string-comparison-test):
  Add tests for `string-equal-ignore-case'.
2022-07-26 13:49:28 -04:00
Lars Ingebrigtsen
015cf7824e Don't bind `M-X' when doing general completion
* lisp/minibuffer.el (minibuffer-local-must-match-map): Remove the
M-X binding here, because it's nonsensical outside
read-extended-command (bug#56741).

* lisp/simple.el (read-extended-command-mode-map)
(read-extended-command-mode): New minor mode to bind `M-X' in
read-extended-command.
(read-extended-command-1): Use it.
2022-07-26 15:21:28 +02:00
Lars Ingebrigtsen
a1384cd65d Add a test for print-unreadable-function
* test/lisp/subr-tests.el (test-print-unreadable-function): Add
failing test (bug#56773).
2022-07-26 14:31:33 +02:00
Mattias Engdegård
592ae7ffe2 Add duplicate-dwim (bug#56418)
Like duplicate-line but duplicates the region instead if active.
Rectangular regions are duplicated on the right-hand side.
The region remains active afterwards, to facilitate further
duplication or other operations on the same text.

* lisp/rect.el (rectangle--duplicate-right):
* lisp/misc.el (duplicate-dwim): New.
* test/lisp/misc-tests.el (misc--duplicate-dwim): New test.
* etc/NEWS: Announce.
2022-07-26 14:23:30 +02:00
Robert Pluim
fc1b7b720b Teach 'network-lookup-address-info' to validate numeric addresses
* src/process.c (Fnetwork_lookup_address_info): Add optional 'hints'
argument, pass AI_NUMERICHOST to 'getaddrinfo' if it's 'numeric'.
(syms_of_process): Add 'numeric' symbol.
* doc/lispref/processes.texi (Misc Network): Expunge passive voice.
Update 'network-lookup-address-info' description.
* test/src/process-tests.el (lookup-hints-specification):
(lookup-hints-values): Test new functionality.
* etc/NEWS: Announce change.
2022-07-26 14:16:07 +02:00
Michael Albinus
dfa16cadc1 Fix regression in last Tramp change
* lisp/net/tramp-sh.el (tramp-readlink-file-truename): Remove.
(tramp-sh-handle-file-truename): Revert implementation.  (Bug#56774)
2022-07-26 14:10:50 +02:00
Po Lu
a03d7630f1 Fix flicker when moving tooltips between frames during mouse drag-and-drop
* src/haikufns.c (Fx_show_tip):
* src/nsfns.m (Fx_show_tip): Allow sharing existing tooltip
frames between any two frames.
* src/xfns.c (Fx_show_tip): Allow that but only between frames
on the same X display.
2022-07-26 16:12:06 +08:00
Po Lu
2bc6d82831 Handle modifiers during Haiku DND wheel movement
* lisp/term/haiku-win.el (haiku-dnd-modifier-mask)
(haiku-dnd-wheel-modifier-type): New functions.
(haiku-handle-drag-wheel): Use them.
* lisp/x-dnd.el (x-dnd-modifier-mask): Remove outdated comment.
* src/haikuselect.c (haiku_note_drag_wheel): Pass modifiers to
wheel function.
(syms_of_haikuselect): Update doc strings.
2022-07-26 05:42:42 +00:00
Stefan Kangas
f6040018c5 Merge from origin/emacs-28
970190b844 Avoid infloop in 'recenter'
a866674b2a Fix inaccuracies in "lax search" documentation
2022-07-26 06:30:19 +02:00
Po Lu
06cec5ee0b Remove some redundant checks in the DND code
* src/xterm.c (handle_one_xevent): Don't check tab_bar_p or
tool_bar_p before clearing last items during drag-and-drop.
2022-07-26 10:29:16 +08:00
Paul Eggert
d04701c0c4 Note guideline for doc string expressions
* doc/lispref/tips.texi (Documentation Tips):
Mention \\=' and \\=` and say that expressions like
(NAME TYPE RANGE) should not be quoted.
2022-07-25 13:00:10 -07:00
Eli Zaretskii
970190b844 Avoid infloop in 'recenter'
* src/window.c (Frecenter): Avoid infinite loop in the minibuffer
under 'fido-vertical-mode'.  (Bug#56765)
2022-07-25 21:59:55 +03:00
Mattias Engdegård
0f9c28f008 ; * test/lisp/net/tramp-tests.el (tramp--test-enabled): fix regexp 2022-07-25 18:08:47 +02:00
Michael Albinus
4c9d3d199c Fix regexp in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp--test-enabled): Fix regexp
for Tramp test files.
2022-07-25 17:19:02 +02:00
Robert Pluim
b86569f130 Make package-archives URL treatment slighty laxer
'package-archives' URLs are expected to end in '/', but we can
cater for people typoing that by using 'url-expand-file-name'.

* lisp/emacs-lisp/package.el (package--with-response-buffer-1): Use
'url-expand-file-name' instead of 'concat'.
2022-07-25 15:35:30 +02:00
João Távora
ffe12ff250 Clean up more robustly in compile.el
* lisp/progmodes/compile.el (compilation-sentinel): Use
unwind-protect.
2022-07-25 14:19:02 +01:00
Eli Zaretskii
a866674b2a Fix inaccuracies in "lax search" documentation
* doc/emacs/search.texi (Lax Search): Update the examples of
character folding in search.  (Bug#56747)
2022-07-25 14:49:23 +03:00
Michael Albinus
7478d1cbf6 ; Instrument tramp-tests.el 2022-07-25 11:47:43 +02:00
Po Lu
bc3e9f4f6d Fix mouse face handling during frame reentry on Haiku
* src/haikuterm.c (haiku_read_socket): Clear
last_mouse_glyph_frame like on X.
2022-07-25 09:39:26 +00:00
Stefan Kangas
14d8c6f7b1 Merge from origin/emacs-28
ba70d0f77c Update to Org 9.5.4-17-g6e991f
2022-07-25 06:30:18 +02:00
Stefan Kangas
948275b4d4 ; Merge from origin/emacs-28
The following commit was skipped:

f7fd7bf477 Find libgccjit.dylib on Homebrew Macos
2022-07-25 06:30:18 +02:00
Po Lu
1a85545f2d Fix typo in x-dnd-tests.el
* test/lisp/x-dnd-tests.el (x-begin-drag): Avoid extra leading /
in file names.  (bug#56712)
2022-07-25 10:08:41 +08:00
Po Lu
3c23ae13f0 Fix mouse face handling with tooltips
* src/xterm.c (handle_one_xevent): Clear last_mouse_motion_frame
and last_mouse_glyph_frame on LeaveNotify.  Otherwise, mouse
face will be restored by gui_redo_mouse_highlight and will not
be restored if an EnterNotify is later sent on top of the same
glyph.
2022-07-25 10:07:30 +08:00
Po Lu
b1f14e94ad ; Rename misnamed function in xterm.c
* src/xterm.c (x_init_master_valuators): Rename to
`x_cache_xi_devices'.  Update comment accordingly.  All callers
changed.
2022-07-25 09:23:15 +08:00
Kyle Meyer
ba70d0f77c Update to Org 9.5.4-17-g6e991f 2022-07-24 16:24:24 -04:00
Mike Kupfer
2181495af8 Fix the prompt for mh-mime-save-parts (SF#500)
* mh-mime.el (mh-mime-save-parts): Use the default argument to
read-directory-name; don't use format-prompt.
2022-07-24 11:30:12 -07:00
Mike Kupfer
bb0af6489a * mh-mime.el (mh-mime-save-parts): Restore default-directory (SF#498) 2022-07-24 11:30:12 -07:00
Michael Albinus
9ed5c39aad Refactor Tramp
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-adb-handle-get-remote-gid' and
`tramp-adb-handle-get-remote-uid'.
(tramp-adb-handle-file-attributes): Use `tramp-convert-file-attributes'.
(tramp-do-parse-file-attributes-with-ls): Remove ID-FORMAT.
(tramp-adb-handle-directory-files-and-attributes):
Use `tramp-skeleton-directory-files-and-attributes'.
(tramp-adb-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'.
(tramp-adb-handle-copy-file, tramp-adb-handle-rename-file):
Use `tramp-barf-if-file-missing'.
(tramp-adb-handle-get-remote-uid)
(tramp-adb-handle-get-remote-gid): New defuns.

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
Use `tramp-archive-handle-directory-files'.
(tramp-archive-handle-directory-files): New defun.

* lisp/net/tramp-cache.el (tramp-file-property-p): New defun.

* lisp/net/tramp-compat.el (tramp-compat-take): New defalias.

* lisp/net/tramp-crypt.el (tramp-crypt-do-copy-or-rename-file):
Use `tramp-barf-if-file-missing'.
(tramp-crypt-handle-directory-files):
Use `tramp-skeleton-directory-files'.

* lisp/net/tramp-fuse.el (tramp-fuse-handle-directory-files):
Use `tramp-skeleton-directory-files'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Use `tramp-barf-if-file-missing'.

* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file):
Use `tramp-barf-if-file-missing'.

* lisp/net/tramp-sh.el (tramp-readlink-file-truename)
(tramp-stat-file-attributes)
(tramp-stat-directory-files-and-attributes): New defconsts.
(tramp-perl-file-attributes)
(tramp-perl-directory-files-and-attributes): Adapt.
(tramp-sh-handle-make-symbolic-link): Flush TARGET file properties.
(tramp-sh-handle-file-truename): Use `tramp-readlink-file-truename'
(tramp-sh-handle-file-exists-p)
(tramp-sh-handle-file-executable-p)
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-directory-p)
(tramp-sh-handle-file-writable-p): Adapt check of file properties.
(tramp-sh-handle-file-attributes): Simplify.
(tramp-do-file-attributes-with-ls): Remove ID-FORMAT.  Combine two
remote commands.  Compute both versions of uid and gid together.
(tramp-do-file-attributes-with-perl)
(tramp-do-directory-files-and-attributes-with-perl):
Remove ID-FORMAT.
(tramp-do-file-attributes-with-stat): Remove ID-FORMAT.  Use
`tramp-stat-file-attributes'.
(tramp-sh-handle-directory-files-and-attributes):
Use `tramp-skeleton-directory-files-and-attributes'.
(tramp-do-directory-files-and-attributes-with-stat):
Remove ID-FORMAT.  Use `tramp-stat-directory-files-and-attributes'.
(tramp-sh-handle-copy-directory): Use `tramp-skeleton-copy-directory'.
(tramp-do-copy-or-rename-file): Use `tramp-barf-if-file-missing'.
(tramp-sh-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'.
(tramp-sh-handle-write-region): Combine two remote commands.
(tramp-sh-gio-monitor-process-filter): Simplify `cond' call.
(tramp-expand-script): Extend for ls, readling and stat.
(tramp-open-connection-setup-interactive-shell): Do not set
`tramp-end-of-output'.
(tramp-open-connection-setup-interactive-shell): Do not send
prompt formatting command, it's superfluous.
(tramp-send-command-and-check): Rearrange in order to accept also
heredoc scripts.
(tramp-convert-file-attributes): Move function to tramp.el.
(tramp-get-remote-id): Set connection property.
(tramp-get-remote-uid-with-id): Use it.
(tramp-get-remote-python): Don't check for python2 anymore.

* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Use `tramp-handle-directory-files'.
(tramp-smb-handle-copy-directory): Use `tramp-skeleton-copy-directory'.
(tramp-smb-handle-directory-files): Remove.
(tramp-smb-handle-file-attributes): Use `tramp-convert-file-attributes'.
(tramp-smb-do-file-attributes-with-stat): Remove ID-FORMAT.
(tramp-smb-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Use `tramp-barf-if-file-missing'.
(tramp-sudoedit-file-attributes): New defconst.
(tramp-sudoedit-handle-file-attributes): Simplify code.

* lisp/net/tramp.el (tramp-setup-debug-buffer): Set debug buffer
as not modified.
(tramp-barf-if-file-missing, tramp-skeleton-copy-directory)
(tramp-skeleton-directory-files)
(tramp-skeleton-directory-files-and-attributes)
(tramp-skeleton-file-local-copy): New macros.
(tramp-handle-copy-directory): Use `tramp-skeleton-copy-directory'.
(tramp-handle-directory-files): Use `tramp-skeleton-directory-files'.
(tramp-handle-file-local-copy): Use `tramp-skeleton-file-local-copy'.
(tramp-handle-insert-file-contents): Use `tramp-barf-if-file-missing'.
(tramp-get-process-attributes, tramp-action-out-of-band):
Simplify `cond' call.
(tramp-check-cached-permissions): Simplify.
(tramp-make-tramp-temp-file): Reimplement.

* test/lisp/net/tramp-archive-tests.el (tramp-copy-size-limit):
Don't set.

* test/lisp/net/tramp-tests.el (tramp--test-enabled):
Remove superfluous test files.
(tramp-test21-file-links): Protect file name deletion.
2022-07-24 16:02:10 +02:00
Po Lu
295efb6025 Throw errors in XDS handler directly
* lisp/x-dnd.el (x-dnd-xds-testing): New defvar.
(x-dnd-handle-direct-save): Signal errors directly if it is
true.
* test/lisp/x-dnd-tests.el (x-dnd-xds-testing): New defvar.
(x-dnd-tests-do-direct-save-internal): Bind it to t around
x-begin-drag.  (bug#56712)
2022-07-24 21:33:42 +08:00
Eugene Ha
f7fd7bf477 Find libgccjit.dylib on Homebrew Macos
* configure.ac: Also find libggcjit on Homebrew (bug#55173).

Copyright-paperwork-exempt: yes
(cherry picked from commit faa29fa2c9)
2022-07-24 15:48:18 +03:00
Paul Pogonyshev
2024136d31 Don't exclude current dir in `package--reload-previously-loaded'
* lisp/emacs-lisp/package.el (package--reload-previously-loaded):
Don't exclude the current directory (bug#56614).
2022-07-24 11:06:57 +02:00
YugaEgo
2c980815f5 Add new user option 'diff-whitespace-style'
* lisp/vc/diff-mode.el (diff-whitespace-style): New user option.
(diff-setup-whitespace): Use it (Bug#56679).
(top level): require 'whitespace.
(whitespace-style, whitespace-trailing-regexp): Remove defvars.
2022-07-24 11:06:57 +02:00
Stefan Kangas
a463dccdd0 Merge from origin/emacs-28
b4067394dc Set `default-directory' of Tramp archive connection buffer
2529e82002 ; * doc/lispref/functions.texi (Declare Form): Fix typo.
54c4ceb009 Update the documentation of 'declare' forms
7263631dca Fix bookmark support for Help functions in native-compilat...

# Conflicts:
#	lisp/help.el
2022-07-24 09:55:01 +02:00
Stefan Kangas
279eb4e6ab ; Merge from origin/emacs-28
The following commit was skipped:

ba7a75e052 Fix mode line mouse-1 binding when showing only column num...
2022-07-24 09:53:17 +02:00
Po Lu
928ea0fbf1 ; * lisp/x-dnd.el (x-dnd-init-frame): Ignore tip frames. 2022-07-24 10:43:52 +08:00
Po Lu
235045f712 Prevent exposing tooltip frames to Lisp code during drag-and-drop
* src/xterm.c (x_dnd_compute_toplevels): Ignore tooltip frames.
(x_tooltip_window_to_frame): Allow unrelated_tooltip_p to be
NULL.
(handle_one_xevent): Ignore DND events to tooltip frames.
2022-07-24 10:42:02 +08:00
Dmitry Gutov
1b99f2908b * lisp/progmodes/xref.el: Bump the version. 2022-07-23 21:13:39 +03:00
Michael Albinus
b4067394dc Set `default-directory' of Tramp archive connection buffer
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Set `default-directory' of Tramp connection buffer.  (Bug#56628)
2022-07-23 19:45:24 +02:00