]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoEnsure that we don't call print-unreadable-function from " prin1"
Lars Ingebrigtsen [Thu, 28 Jul 2022 10:23:53 +0000 (12:23 +0200)]
Ensure that we don't call print-unreadable-function from " prin1"

* src/print.c (PRINTPREPARE): Bind the current buffer so that we
can retrieve it later.
(print_vectorlike): Use it (bug#56773).
(syms_of_print): New internal `print--unreadable-callback-buffer'
variable.

2 years agoDoc fixes: don't mention EFS
Stefan Kangas [Thu, 28 Jul 2022 08:48:07 +0000 (10:48 +0200)]
Doc fixes: don't mention EFS

* doc/misc/ede.texi (ede-project):
* doc/misc/gnus.texi (Directory Groups, Various Various):
* lisp/cedet/ede/base.el (ede-project):
* lisp/gnus/mml.el (mml-attach-external):
* lisp/org/org.el (org-file-apps):
* lisp/url/url-file.el (url-file-find-possibly-compressed-file):
Doc fixes; don't mention XEmacs specific library EFS.

2 years agoNew test ffap-replace-file-component
Stefan Kangas [Thu, 28 Jul 2022 08:33:25 +0000 (10:33 +0200)]
New test ffap-replace-file-component

* test/lisp/ffap-tests.el (ffap-replace-file-component): New test.

2 years agoMinor doc fixes in ffap.el
Stefan Kangas [Thu, 28 Jul 2022 08:19:20 +0000 (10:19 +0200)]
Minor doc fixes in ffap.el

* lisp/ffap.el:
(ffap-url-fetcher): Minor doc fixes.  Adapt to new default; don't
mention defunct/missing library ffap-url.el.

2 years agoFix minor problem with scroll bar grabs on Haiku
Po Lu [Thu, 28 Jul 2022 07:28:23 +0000 (07:28 +0000)]
Fix minor problem with scroll bar grabs on Haiku

* haiku_support.cc (class EmacsScrollBar, EmacsScrollBar)
(MouseDown, MouseUp): Keep a counter of the mouse down events
received.

2 years agoFix race conditions in mouse button handling on Haiku
Po Lu [Thu, 28 Jul 2022 07:17:04 +0000 (07:17 +0000)]
Fix race conditions in mouse button handling on Haiku

* src/haiku_support.cc (class EmacsView): New field
`grabbed_buttons'.  Remove `previous_buttons'.
(BasicMouseDown, BasicMouseUp): Accept new parameter `message'.
Use data from that message instead.
(MouseDown, MouseUp): Pass the current message to BasicMouseUp
and BasicMouseDown.

2 years ago* src/xterm.c (x_set_offset): Respect x-no-window-manager.
Po Lu [Thu, 28 Jul 2022 02:59:19 +0000 (10:59 +0800)]
* src/xterm.c (x_set_offset): Respect x-no-window-manager.

2 years agoRemove excessive synchronization from x_sync_with_move
Po Lu [Thu, 28 Jul 2022 01:25:37 +0000 (09:25 +0800)]
Remove excessive synchronization from x_sync_with_move

* src/xterm.c (x_sync_with_move): Remove redundant XSync.  The X
server always handles requests in order.

2 years agoDrop support for obsolete "Lisp Code Directory" from ffap
Stefan Kangas [Wed, 27 Jul 2022 22:25:33 +0000 (00:25 +0200)]
Drop support for obsolete "Lisp Code Directory" from ffap

Ref: https://flex.phys.tohoku.ac.jp/texi/faq/faq_146.html
Note also that the host "archive.cis.ohio-state.edu" is unknown.
* lisp/ffap.el (ffap-alist): Drop support for obsolete "Lisp Code
Directory".
(ffap-lcd): Make obsolete.

2 years ago; * lisp/ffap.el: Delete code commented out since 1997.
Stefan Kangas [Wed, 27 Jul 2022 22:17:53 +0000 (00:17 +0200)]
; * lisp/ffap.el: Delete code commented out since 1997.

2 years agoDrop support for XEmacs package EFS
Stefan Kangas [Wed, 27 Jul 2022 21:33:03 +0000 (23:33 +0200)]
Drop support for XEmacs package EFS

EFS is a long defunct XEmacs-specific fork of Ange FTP that is
superseded by TRAMP.
* lisp/ffap.el (ffap-ftp-default-user)
(ffap-replace-file-component, ffap-host-to-filename):
* lisp/gnus/mml.el (mml-parse-file-name):
* lisp/gnus/nnheader.el (nnheader-re-read-dir):
* lisp/net/browse-url.el (browse-url-filename-alist):
* lisp/speedbar.el (speedbar-check-vc): Drop support for XEmacs
package EFS.

2 years agoMake ffap-file-suffix obsolete
Stefan Kangas [Wed, 27 Jul 2022 21:21:28 +0000 (23:21 +0200)]
Make ffap-file-suffix obsolete

* lisp/ffap.el (ffap-file-suffix): Make obsolete in favor of
file-name-extension.  Update callers.

2 years agoRemove Tramp instrumentation
Michael Albinus [Wed, 27 Jul 2022 19:20:49 +0000 (21:20 +0200)]
Remove Tramp instrumentation

2 years ago* lisp/net/tramp.el (tramp-handle-shell-command): Modify sentinel handling.
Michael Albinus [Wed, 27 Jul 2022 17:55:18 +0000 (19:55 +0200)]
* lisp/net/tramp.el (tramp-handle-shell-command): Modify sentinel handling.

2 years agoFurther Tramp instrumentation
Michael Albinus [Wed, 27 Jul 2022 13:22:08 +0000 (15:22 +0200)]
Further Tramp instrumentation

; * test/infra/test-jobs.yml (test-lisp-net-inotify):
; Revert instrumentation.

2 years ago; * etc/NEWS: typo
Mattias Engdegård [Wed, 27 Jul 2022 12:34:00 +0000 (14:34 +0200)]
; * etc/NEWS: typo

2 years agoAdd compat from GNU ELPA as a soft dependency in ERC
F. Jason Park [Fri, 8 Jul 2022 11:58:26 +0000 (04:58 -0700)]
Add compat from GNU ELPA as a soft dependency in ERC

* lisp/erc/erc-backend.el (erc-parse-server-response,
erc--parse-isupport-value): Remove sub-28 compat code involving
`string-search'.

* lisp/erc/erc-compat.el: Require compat package, but don't error
when absent.

* lisp/erc/erc-dcc.el (erc-dcc-member): Remove `string-search' compat
code.
(erc-dcc-unquote-filename): Remove `string-replace' compat code.

* lisp/erc/erc-speedbar.el (erc-speedbar-expand-server,
erc-speedbar-expand-channel, erc-speedbar-expand-user): Remove
`string-search' compat code.

* lisp/erc/erc.el: Add compat version 28.1.2.0 to Package-Requires
header and require `erc-compat' after other libraries.
(erc--valid-local-channel-p): Remove `string-search' compat code.
(erc-update-mode-line-buffer): Remove `string-replace' compat code.
(erc-message-english-PART): Remove `string-replace' compat code.

2 years agoAvoid mutating default value of erc-server-last-peers
F. Jason Park [Wed, 6 Jul 2022 07:40:42 +0000 (00:40 -0700)]
Avoid mutating default value of erc-server-last-peers

* lisp/erc/erc-backend.el (erc-server-last-peers): Leave default as
nil instead of a quoted constant.
(erc-server-connect): Initialize `erc-server-last-peers' to a new
value local to a server buffer.
(erc-message): Operate on server's local `erc-server-last-peers' value
instead of the global default.  Prefer replacing value instead of
mutating CDR to make for easier testing.
(erc-server-PRIVMSG): Create a new `erc-server-last-peers' for easier
testing. (Bug#56449)

2 years agoEnsure erc-dcc-chat-setup runs in the right buffer
F. Jason Park [Sun, 24 Jul 2022 12:14:24 +0000 (05:14 -0700)]
Ensure erc-dcc-chat-setup runs in the right buffer

* lisp/erc/erc-dcc.el (erc-dcc-chat-setup): Ensure initialization runs
in the intended buffer regardless of the value of `erc-join-buffer'.
(erc-dcc--send-final-turbo-ack, erc-dcc-get-filter): Rename internal
variable formerly known as `erc-dcc--X-send-final-turbo-ack'.

2 years agoFix CTCP regression in erc-server-PRIVMSG
F. Jason Park [Sun, 24 Jul 2022 12:14:24 +0000 (05:14 -0700)]
Fix CTCP regression in erc-server-PRIVMSG

* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Don't create a query
buffer for non-ACTION CTCP messages.

* test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-dcc-chat-accept):
Add test for basic DCC CHAT accept dialog.

* test/lisp/erc/resources/dcc/chat/accept-dcc.eld: New file.
* test/lisp/erc/resources/dcc/chat/accept.eld: New file.

2 years agoAllow non-IRC line delimiters with ERC test server
F. Jason Park [Sun, 24 Jul 2022 12:14:24 +0000 (05:14 -0700)]
Allow non-IRC line delimiters with ERC test server

* test/lisp/erc/resources/erc-d/erc-d.el (erc-d-server-fqdn,
erc-d--initialize-client, erc-d--log, erc-d--send, erc-d--filter,
erc-d-run): Add new variable and use it.  Also optionally accept
keyword arguments in `erc-d-run'.

* test/lisp/erc/resources/erc-d/erc-d-tests.el
(erc-d-run-direct-foreign-protocol): Add test demoing newline-only
line-wise protocol.

* test/lisp/erc/resources/erc-d/resources/foreign.eld: New file.

2 years agoFix thinko in last change
Po Lu [Wed, 27 Jul 2022 11:56:43 +0000 (19:56 +0800)]
Fix thinko in last change

* src/print.c (PRINTPREPARE): Also remove `print_free_buffer'.
Record unwind protect instead.
(PRINTFINISH): Stop freeing the print buffer.  (bug#56773)

2 years ago; Instrument Tramp tests
Michael Albinus [Wed, 27 Jul 2022 11:46:53 +0000 (13:46 +0200)]
; Instrument Tramp tests

; * test/infra/test-jobs.yml (test-lisp-net-inotify): Run expensive.
; * test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Instrument.

2 years agoIn Tramp, use `string-empty-p' and `string-equal-ignore-case' consequently
Michael Albinus [Wed, 27 Jul 2022 10:51:11 +0000 (12:51 +0200)]
In Tramp, use `string-empty-p' and `string-equal-ignore-case' consequently

* lisp/net/tramp.el (tramp-find-method):
* lisp/net/tramp-cmds.el (tramp-change-syntax):
* lisp/net/tramp-sh.el (tramp-sh-get-signal-strings)
(tramp-open-connection-setup-interactive-shell): Use `string-empty-p'.

* lisp/net/tramp-compat.el (tramp-compat-string-equal-ignore-case):
New defalias.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted): Use it.

2 years agoUpdate test-print-unreadable-function after fix
Lars Ingebrigtsen [Wed, 27 Jul 2022 10:01:54 +0000 (12:01 +0200)]
Update test-print-unreadable-function after fix

* test/lisp/subr-tests.el (test-print-unreadable-function): Update
test after fix.

2 years agoImprove 'diff-whitespace-style' user option declaration
YugaEgo [Wed, 27 Jul 2022 09:52:01 +0000 (11:52 +0200)]
Improve 'diff-whitespace-style' user option declaration

* lisp/vc/diff-mode.el (diff-whitespace-style):
Use ':require'.  Minor docstring fix.
(top level): Do not require 'whitespace.
(whitespace-style, whitespace-trailing-regexp):
Add defvars (rollback recent removal).
* etc/NEWS: Extend 'diff-whitespace-style' introduction.
(Bug#56679) (bug#56679).

2 years agoFix invalid current buffer after print-unreadable-function signals
Po Lu [Wed, 27 Jul 2022 09:39:14 +0000 (17:39 +0800)]
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)

2 years agoAdd a test for python-mode comment/else problem
Lars Ingebrigtsen [Wed, 27 Jul 2022 09:38:19 +0000 (11:38 +0200)]
Add a test for python-mode comment/else problem

Based on a patch from kobarity <kobarity@gmail.com>

2 years agoFix comment/else indentation problem in python-mode
Stephen Berman [Wed, 27 Jul 2022 09:37:31 +0000 (11:37 +0200)]
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).

2 years agoFix frame determination for XI touch events
Po Lu [Wed, 27 Jul 2022 08:00:29 +0000 (16:00 +0800)]
Fix frame determination for XI touch events

* src/xterm.c (handle_one_xevent): Find touchscreen event
windows using x_window_to_frame.

2 years agoRemove workaround for some input method problems
Po Lu [Wed, 27 Jul 2022 05:01:41 +0000 (13:01 +0800)]
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)

2 years agoFix NS stretch glyph display
Po Lu [Wed, 27 Jul 2022 03:21:34 +0000 (11:21 +0800)]
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)

2 years agoCC Mode: correct the calculation and handling of c-use-category.
Alan Mackenzie [Tue, 26 Jul 2022 19:43:13 +0000 (19:43 +0000)]
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.

2 years agoAdd missing @end defun to strings.texi
Lars Ingebrigtsen [Tue, 26 Jul 2022 18:54:23 +0000 (20:54 +0200)]
Add missing @end defun to strings.texi

* doc/lispref/strings.texi (Text Comparison): Add missing @end defun.

2 years ago; Fix documentation of 'network-lookup-address-info'
Eli Zaretskii [Tue, 26 Jul 2022 18:34:38 +0000 (21:34 +0300)]
; Fix documentation of 'network-lookup-address-info'

* doc/lispref/processes.texi (Misc Network): Fix punctuation and
markup.

2 years ago; Improve doc string of 'read-extended-command'
Eli Zaretskii [Tue, 26 Jul 2022 18:27:39 +0000 (21:27 +0300)]
; Improve doc string of 'read-extended-command'

* lisp/simple.el (read-extended-command-mode)
(read-extended-command): Doc fixes.

2 years agorestore and obsolete `gnus-string-equal' and `bibtex-string='
Sam Steingold [Tue, 26 Jul 2022 18:08:38 +0000 (14:08 -0400)]
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.

2 years agoavoid error when message-fetch-field returns nil
Sam Steingold [Tue, 26 Jul 2022 18:02:49 +0000 (14:02 -0400)]
avoid error when message-fetch-field returns nil

* gnus-art.el (article-hide-boring-headers): Use "" when
  `message-fetch-field' returns `nil'

2 years agostring-equal-ignore-case: new function
Sam Steingold [Tue, 26 Jul 2022 17:47:03 +0000 (13:47 -0400)]
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'.

2 years agoDon't bind `M-X' when doing general completion
Lars Ingebrigtsen [Tue, 26 Jul 2022 13:21:28 +0000 (15:21 +0200)]
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.

2 years agoAdd a test for print-unreadable-function
Lars Ingebrigtsen [Tue, 26 Jul 2022 12:31:04 +0000 (14:31 +0200)]
Add a test for print-unreadable-function

* test/lisp/subr-tests.el (test-print-unreadable-function): Add
failing test (bug#56773).

2 years agoAdd duplicate-dwim (bug#56418)
Mattias Engdegård [Mon, 20 Jun 2022 09:16:26 +0000 (11:16 +0200)]
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.

2 years agoTeach 'network-lookup-address-info' to validate numeric addresses
Robert Pluim [Mon, 25 Jul 2022 10:17:07 +0000 (12:17 +0200)]
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.

2 years agoFix regression in last Tramp change
Michael Albinus [Tue, 26 Jul 2022 12:10:50 +0000 (14:10 +0200)]
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)

2 years agoFix flicker when moving tooltips between frames during mouse drag-and-drop
Po Lu [Tue, 26 Jul 2022 08:12:06 +0000 (16:12 +0800)]
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.

2 years agoHandle modifiers during Haiku DND wheel movement
Po Lu [Tue, 26 Jul 2022 05:41:25 +0000 (05:41 +0000)]
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.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Tue, 26 Jul 2022 04:30:19 +0000 (06:30 +0200)]
Merge from origin/emacs-28

970190b844 Avoid infloop in 'recenter'
a866674b2a Fix inaccuracies in "lax search" documentation

2 years agoRemove some redundant checks in the DND code
Po Lu [Tue, 26 Jul 2022 02:29:16 +0000 (10:29 +0800)]
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.

2 years agoNote guideline for doc string expressions
Paul Eggert [Mon, 25 Jul 2022 19:59:26 +0000 (12:59 -0700)]
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.

2 years agoAvoid infloop in 'recenter'
Eli Zaretskii [Mon, 25 Jul 2022 18:59:55 +0000 (21:59 +0300)]
Avoid infloop in 'recenter'

* src/window.c (Frecenter): Avoid infinite loop in the minibuffer
under 'fido-vertical-mode'.  (Bug#56765)

2 years ago; * test/lisp/net/tramp-tests.el (tramp--test-enabled): fix regexp
Mattias Engdegård [Mon, 25 Jul 2022 16:08:47 +0000 (18:08 +0200)]
; * test/lisp/net/tramp-tests.el (tramp--test-enabled): fix regexp

2 years agoFix regexp in tramp-tests.el
Michael Albinus [Mon, 25 Jul 2022 15:19:02 +0000 (17:19 +0200)]
Fix regexp in tramp-tests.el

* test/lisp/net/tramp-tests.el (tramp--test-enabled): Fix regexp
for Tramp test files.

2 years agoMake package-archives URL treatment slighty laxer
Robert Pluim [Tue, 1 Mar 2022 10:34:11 +0000 (11:34 +0100)]
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'.

2 years agoClean up more robustly in compile.el
João Távora [Fri, 22 Jul 2022 08:23:02 +0000 (09:23 +0100)]
Clean up more robustly in compile.el

* lisp/progmodes/compile.el (compilation-sentinel): Use
unwind-protect.

2 years agoFix inaccuracies in "lax search" documentation
Eli Zaretskii [Mon, 25 Jul 2022 11:49:23 +0000 (14:49 +0300)]
Fix inaccuracies in "lax search" documentation

* doc/emacs/search.texi (Lax Search): Update the examples of
character folding in search.  (Bug#56747)

2 years ago; Instrument tramp-tests.el
Michael Albinus [Mon, 25 Jul 2022 09:47:43 +0000 (11:47 +0200)]
; Instrument tramp-tests.el

2 years agoFix mouse face handling during frame reentry on Haiku
Po Lu [Mon, 25 Jul 2022 09:38:06 +0000 (09:38 +0000)]
Fix mouse face handling during frame reentry on Haiku

* src/haikuterm.c (haiku_read_socket): Clear
last_mouse_glyph_frame like on X.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 25 Jul 2022 04:30:18 +0000 (06:30 +0200)]
Merge from origin/emacs-28

ba70d0f77c Update to Org 9.5.4-17-g6e991f

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Mon, 25 Jul 2022 04:30:18 +0000 (06:30 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

f7fd7bf477 Find libgccjit.dylib on Homebrew Macos

2 years agoFix typo in x-dnd-tests.el
Po Lu [Mon, 25 Jul 2022 02:08:37 +0000 (10:08 +0800)]
Fix typo in x-dnd-tests.el

* test/lisp/x-dnd-tests.el (x-begin-drag): Avoid extra leading /
in file names.  (bug#56712)

2 years agoFix mouse face handling with tooltips
Po Lu [Mon, 25 Jul 2022 02:07:30 +0000 (10:07 +0800)]
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.

2 years ago; Rename misnamed function in xterm.c
Po Lu [Mon, 25 Jul 2022 01:23:15 +0000 (09:23 +0800)]
; 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.

2 years agoUpdate to Org 9.5.4-17-g6e991f
Kyle Meyer [Sun, 24 Jul 2022 20:24:24 +0000 (16:24 -0400)]
Update to Org 9.5.4-17-g6e991f

2 years agoFix the prompt for mh-mime-save-parts (SF#500)
Mike Kupfer [Sun, 17 Jul 2022 18:49:56 +0000 (11:49 -0700)]
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.

2 years ago* mh-mime.el (mh-mime-save-parts): Restore default-directory (SF#498)
Mike Kupfer [Sun, 17 Jul 2022 18:23:48 +0000 (11:23 -0700)]
* mh-mime.el (mh-mime-save-parts): Restore default-directory (SF#498)

2 years agoRefactor Tramp
Michael Albinus [Sun, 24 Jul 2022 14:02:10 +0000 (16:02 +0200)]
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.

2 years agoThrow errors in XDS handler directly
Po Lu [Sun, 24 Jul 2022 13:32:42 +0000 (21:32 +0800)]
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)

2 years agoFind libgccjit.dylib on Homebrew Macos
Eugene Ha [Thu, 28 Apr 2022 21:48:38 +0000 (23:48 +0200)]
Find libgccjit.dylib on Homebrew Macos

* configure.ac: Also find libggcjit on Homebrew (bug#55173).

Copyright-paperwork-exempt: yes
(cherry picked from commit faa29fa2c9e9d5a5d7544a1a39b2a89cf57a8439)

2 years agoDon't exclude current dir in `package--reload-previously-loaded'
Paul Pogonyshev [Sun, 24 Jul 2022 09:06:19 +0000 (11:06 +0200)]
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).

2 years agoAdd new user option 'diff-whitespace-style'
YugaEgo [Sun, 24 Jul 2022 09:01:50 +0000 (11:01 +0200)]
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.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 24 Jul 2022 07:55:01 +0000 (09:55 +0200)]
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

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Sun, 24 Jul 2022 07:53:17 +0000 (09:53 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

ba7a75e052 Fix mode line mouse-1 binding when showing only column num...

2 years ago; * lisp/x-dnd.el (x-dnd-init-frame): Ignore tip frames.
Po Lu [Sun, 24 Jul 2022 02:43:52 +0000 (10:43 +0800)]
; * lisp/x-dnd.el (x-dnd-init-frame): Ignore tip frames.

2 years agoPrevent exposing tooltip frames to Lisp code during drag-and-drop
Po Lu [Sun, 24 Jul 2022 02:42:02 +0000 (10:42 +0800)]
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.

2 years ago* lisp/progmodes/xref.el: Bump the version.
Dmitry Gutov [Sat, 23 Jul 2022 18:13:17 +0000 (21:13 +0300)]
* lisp/progmodes/xref.el: Bump the version.

2 years agoSet `default-directory' of Tramp archive connection buffer
Michael Albinus [Sat, 23 Jul 2022 17:45:24 +0000 (19:45 +0200)]
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)

2 years agoFix `lsh` warning shortcomings (bug#56641)
Mattias Engdegård [Sat, 23 Jul 2022 16:42:11 +0000 (18:42 +0200)]
Fix `lsh` warning shortcomings (bug#56641)

Reported by Basil Contovounesios.

* etc/NEWS: Mention how to suppress the warning.
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Amend doc string.
* lisp/subr.el: Use `macroexp-warn-and-return` to delay the warning
until codegen time (which makes it suppressible) and to prevent
repeated warnings.
* test/lisp/international/ccl-tests.el (shift):
* test/src/data-tests.el (data-tests-ash-lsh):
Suppress warning in tests of `lsh` itself.

2 years agoUpdate pdumper.c after recent long lines changes
Basil L. Contovounesios [Sat, 23 Jul 2022 11:22:09 +0000 (14:22 +0300)]
Update pdumper.c after recent long lines changes

For discussion, see:
https://lists.gnu.org/r/emacs-devel/2022-07/msg00761.html

* src/pdumper.c (dump_buffer): Dump new field
long_line_optimizations_p introduced in commit e7b5912b23 of
2022-07-16 "Improvements to long lines handling."
(dump_buffer) [CHECK_STRUCTS]: Update hash accordingly
for --enable-checking=structs.

2 years agoCorrect symbol in error for failed CHECK_INTEGER (bug#56723)
Mattias Engdegård [Sat, 23 Jul 2022 12:55:54 +0000 (14:55 +0200)]
Correct symbol in error for failed CHECK_INTEGER (bug#56723)

Reported by Jeronimo Pellegrini.

* src/lisp.h (CHECK_INTEGER): Use integerp, not numberp.

2 years agoSupport new "binary file matches" format in Ripgrep 13
Dmitry Gutov [Sat, 23 Jul 2022 12:23:56 +0000 (15:23 +0300)]
Support new "binary file matches" format in Ripgrep 13

* lisp/progmodes/xref.el (xref-matches-in-files):
Support new "binary file matches" format in Ripgrep 13
(bug#56624).

2 years agoRemove macOS region color code
Po Lu [Sat, 23 Jul 2022 11:57:50 +0000 (19:57 +0800)]
Remove macOS region color code

* lisp/faces.el (region): Remove macOS specific definition.
Equivalent functionality is no longer available on free
operating systems.

2 years ago; * etc/NEWS: Fix wording and punctuation of 'comint-delete-old-input'.
Eli Zaretskii [Sat, 23 Jul 2022 10:46:06 +0000 (13:46 +0300)]
; * etc/NEWS: Fix wording and punctuation of 'comint-delete-old-input'.

2 years ago; * etc/NEWS: Fix typo.
Eli Zaretskii [Sat, 23 Jul 2022 10:42:13 +0000 (13:42 +0300)]
; * etc/NEWS: Fix typo.

2 years ago; * etc/NEWS: Move the 'lsh' item to its proper place.
Eli Zaretskii [Sat, 23 Jul 2022 10:39:50 +0000 (13:39 +0300)]
; * etc/NEWS: Move the 'lsh' item to its proper place.

2 years agoUse `ash` instead of `lsh` in verilog-mode (bug#56641)
Mattias Engdegård [Sat, 23 Jul 2022 10:29:35 +0000 (12:29 +0200)]
Use `ash` instead of `lsh` in verilog-mode (bug#56641)

* lisp/progmodes/verilog-mode.el (verilog-simplify-range-expression):
Use `ash`; the result will be the same because the first argument is
nonnegative.

2 years agoWarn about calls to `lsh` (bug#56641)
Mattias Engdegård [Sat, 23 Jul 2022 10:15:08 +0000 (12:15 +0200)]
Warn about calls to `lsh` (bug#56641)

* lisp/subr.el (lsh): Warn when compiled; recommend `ash`.
* etc/NEWS: Add note.

2 years ago; * doc/lispref/functions.texi (Declare Form): Fix typo.
Eli Zaretskii [Sat, 23 Jul 2022 09:56:00 +0000 (12:56 +0300)]
; * doc/lispref/functions.texi (Declare Form): Fix typo.

2 years agoUpdate the documentation of 'declare' forms
Eli Zaretskii [Sat, 23 Jul 2022 09:54:07 +0000 (12:54 +0300)]
Update the documentation of 'declare' forms

* doc/lispref/compile.texi (Native-Compilation Variables): Mention
the 'declare' alternative for 'native-comp-speed'.
* doc/lispref/functions.texi (Declare Form): Document 'declare'
forms that were previously undocumented.

2 years ago; * lisp/emacs-lisp/bytecomp.el: comment cleanup
Mattias Engdegård [Sat, 23 Jul 2022 09:04:28 +0000 (11:04 +0200)]
; * lisp/emacs-lisp/bytecomp.el: comment cleanup

2 years agoUndo C parts of "Don't use the Gtk region face"
Po Lu [Sat, 23 Jul 2022 09:02:22 +0000 (17:02 +0800)]
Undo C parts of "Don't use the Gtk region face"

This reverts commit a24f710395f9777cb9f8b000300e5e9c892d7794, apart
from the change to faces.el and NEWS.

2 years agoDon't use the Gtk region face
Lars Ingebrigtsen [Sat, 23 Jul 2022 08:52:30 +0000 (10:52 +0200)]
Don't use the Gtk region face

* lisp/faces.el (region): Don't use the Gtk region face, because
it produces low contrast combinations (bug#46493).
* src/gtkutil.h:
* src/gtkutil.c (xg_check_special_colors): Remove.

* src/xfns.c (x_defined_color):
* src/pgtkterm.c (pgtk_defined_color): Don't call.

2 years agoFix Python navigation problem with a line continuation using backslash
kobarity [Sat, 23 Jul 2022 08:26:33 +0000 (10:26 +0200)]
Fix Python navigation problem with a line continuation using backslash

* lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix
line continuation using backslash in nested defun (bug#56615).

2 years agoFix bookmark support for Help functions in native-compilation builds
Eli Zaretskii [Sat, 23 Jul 2022 08:11:47 +0000 (11:11 +0300)]
Fix bookmark support for Help functions in native-compilation builds

* lisp/help.el (describe-key--helper, describe-function--helper):
New helper functions.
(describe-key): Call 'describe-key--helper' instead of a
lambda-function.
* lisp/help-fns.el (describe-function): Call
'describe-function--helper' instead of a lambda-function.
(Bug#56643)

2 years agoFix wdired entry when there are hidden subdirs
Lars Ingebrigtsen [Sat, 23 Jul 2022 07:33:18 +0000 (09:33 +0200)]
Fix wdired entry when there are hidden subdirs

* lisp/dired.el (dired--unhide): Allow `C-c C-q' to work when
there are hidden inserted subdirs (bug#56698).

2 years agoFix mode line mouse-1 binding when showing only column numbers
Miha Rihtarsic [Sat, 23 Jul 2022 07:32:50 +0000 (10:32 +0300)]
Fix mode line mouse-1 binding when showing only column numbers

* lisp/bindings.el (mode-line-position): Fix the mouse-1 binding
when showing only column numbers (bug#56694).  Do not merge to
master.

2 years agoNew user option to disable deleting current input in comint mouse-2
Visuwesh [Sat, 23 Jul 2022 07:15:24 +0000 (09:15 +0200)]
New user option to disable deleting current input in comint mouse-2

* etc/NEWS: Announce the user option (bug#56646).
* lisp/comint.el (comint-delete-old-input): New user option to disable
deleting current input when insert an old input using mouse-2.
(comint-insert-input): Use it.

2 years agoUse special-mode in eldoc--doc-buffer
Lars Ingebrigtsen [Sat, 23 Jul 2022 07:13:30 +0000 (09:13 +0200)]
Use special-mode in eldoc--doc-buffer

* lisp/emacs-lisp/eldoc.el (eldoc--format-doc-buffer): Use
`special-mode' to allow normal customizations of the buffer
(bug#56659).

2 years agoFix PGTK DND after a source leaves without dropping anything
Po Lu [Sat, 23 Jul 2022 07:00:12 +0000 (15:00 +0800)]
Fix PGTK DND after a source leaves without dropping anything

* lisp/pgtk-dnd.el (pgtk-dnd-clear-data-on-motion): New flag.
(pgtk-dnd-handle-gdk): Set flag upon drag-leave.  Clear state
upon drag-motion if it is set.

2 years agoFix off-by-one error in string-truncate-left
Lars Ingebrigtsen [Sat, 23 Jul 2022 06:55:20 +0000 (08:55 +0200)]
Fix off-by-one error in string-truncate-left

* lisp/emacs-lisp/subr-x.el (string-truncate-left): Fix off-by-one
error (bug#56685).

2 years agoHandle text scale and global text scale during DND wheel movement
Po Lu [Sat, 23 Jul 2022 06:18:18 +0000 (14:18 +0800)]
Handle text scale and global text scale during DND wheel movement

* lisp/x-dnd.el (x-dnd-mwheel-scroll): Handle `text-scale' and
`global-text-scale' mwheel actions.