1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-25 05:52:42 -08:00
Commit graph

158478 commits

Author SHA1 Message Date
Po Lu
02ab6aaf7b 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.
2022-07-28 07:28:23 +00:00
Po Lu
27a0bcd779 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.
2022-07-28 07:17:04 +00:00
Po Lu
c44068ac6c * src/xterm.c (x_set_offset): Respect x-no-window-manager. 2022-07-28 10:59:19 +08:00
Po Lu
f720630195 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.
2022-07-28 09:25:37 +08:00
Stefan Kangas
9ad5421a62 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.
2022-07-28 00:28:27 +02:00
Stefan Kangas
0add6a29c7 ; * lisp/ffap.el: Delete code commented out since 1997. 2022-07-28 00:17:53 +02:00
Stefan Kangas
fcaad99053 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.
2022-07-28 00:11:12 +02:00
Stefan Kangas
faa007cebf Make ffap-file-suffix obsolete
* lisp/ffap.el (ffap-file-suffix): Make obsolete in favor of
file-name-extension.  Update callers.
2022-07-27 23:21:28 +02:00
Michael Albinus
00897b6369 Remove Tramp instrumentation 2022-07-27 21:20:49 +02:00
Michael Albinus
4a1c7a90ed * lisp/net/tramp.el (tramp-handle-shell-command): Modify sentinel handling. 2022-07-27 19:55:18 +02:00
Michael Albinus
cc6aebc85e Further Tramp instrumentation
; * test/infra/test-jobs.yml (test-lisp-net-inotify):
; Revert instrumentation.
2022-07-27 15:22:08 +02:00
Mattias Engdegård
35435b86f9 ; * etc/NEWS: typo 2022-07-27 14:34:28 +02:00
F. Jason Park
f6b6614c32 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.
2022-07-27 05:19:09 -07:00
F. Jason Park
c238f568cd 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)
2022-07-27 05:19:09 -07:00
F. Jason Park
075d6bb410 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'.
2022-07-27 05:19:09 -07:00
F. Jason Park
4a5499910a 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.
2022-07-27 05:19:09 -07:00
F. Jason Park
69f578e047 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.
2022-07-27 05:19:09 -07:00
Po Lu
833a1f2c53 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)
2022-07-27 20:01:53 +08:00
Michael Albinus
e6b0fa4408 ; 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.
2022-07-27 13:46:53 +02:00
Michael Albinus
db4dd28c21 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.
2022-07-27 12:51:11 +02:00
Lars Ingebrigtsen
1864298889 Update test-print-unreadable-function after fix
* test/lisp/subr-tests.el (test-print-unreadable-function): Update
test after fix.
2022-07-27 12:01:54 +02:00
YugaEgo
f21feaf00e 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).
2022-07-27 11:52:22 +02:00
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