]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoMerge branch 'feature/long-lines-and-font-locking'
Gregory Heytings [Fri, 29 Jul 2022 08:22:03 +0000 (10:22 +0200)]
Merge branch 'feature/long-lines-and-font-locking'

2 years agoFurther minor improvements of documentation
Gregory Heytings [Fri, 29 Jul 2022 08:11:10 +0000 (08:11 +0000)]
Further minor improvements of documentation

* src/xdisp.c (syms_of_xdisp) <fontification-functions>:
* etc/NEWS: Further minor wording improvements.

2 years agoMinor improvements of recent documentation changes
Eli Zaretskii [Fri, 29 Jul 2022 07:08:50 +0000 (10:08 +0300)]
Minor improvements of recent documentation changes

* src/editfns.c (Fwiden):
* doc/lispref/display.texi (Auto Faces):
* src/xdisp.c (syms_of_xdisp) <fontification-functions>:
* etc/NEWS: Clarify and improve wording of documentation changes.

2 years agoAlso update after buffer flip caused by flush_frame
Po Lu [Fri, 29 Jul 2022 06:52:31 +0000 (14:52 +0800)]
Also update after buffer flip caused by flush_frame

* src/xterm.c (x_flip_and_flush): Mark the end of a sync frame.

2 years ago; Fix wording of some doc strings in selection.el
Eli Zaretskii [Fri, 29 Jul 2022 06:31:26 +0000 (09:31 +0300)]
; Fix wording of some doc strings in selection.el

* lisp/select.el (xselect-dnd-target-available-p)
(xselect-dt-netfile-available-p, xselect-uri-list-available-p):
Doc fixes.

2 years agoImplement extended frame synchronization
Po Lu [Fri, 29 Jul 2022 02:13:54 +0000 (10:13 +0800)]
Implement extended frame synchronization

* src/xterm.c (x_atom_refs): New atom _NET_WM_FRAME_TIMINGS.
(x_sync_update_finish, x_sync_update_begin): New frame.
(x_update_begin, x_update_end, XTframe_up_to_date): Begin and
end frames accordingly if extended frame synchronization is
enabled.
(handle_one_xevent): Ignore timing and frame drawn events.

* src/xterm.h (struct x_display_info): New atom.
(FRAME_X_COUNTER_VALUE): New macro.

2 years agoDon't offer meaningless selection targets during drag-and-drop
Po Lu [Fri, 29 Jul 2022 00:50:55 +0000 (08:50 +0800)]
Don't offer meaningless selection targets during drag-and-drop

* lisp/select.el (xselect-dnd-target-available-p): New function.
(selection-converter-alist): Register it as the availability
function for DND specific targets.

2 years agoFinal documentation tweaks.
Gregory Heytings [Thu, 28 Jul 2022 21:12:05 +0000 (21:12 +0000)]
Final documentation tweaks.

* etc/NEWS: Update the NEWS entry.

* src/xdisp.c (syms_of_xdisp): Mention the fact that restrictions
may be locked around 'fontification-functions'.

2 years agoAdd an optional 'lock' parameter to 'narrow-to-region'
Gregory Heytings [Thu, 28 Jul 2022 20:37:49 +0000 (20:37 +0000)]
Add an optional 'lock' parameter to 'narrow-to-region'

* src/editfns.c (Fnarrow_to_region): Add the parameter to the
function, and handle it. Update docstring.
(unwind_locked_begv, unwind_locked_zv): New functions.
(Fwiden): Do nothing when restrictions are locked. Update
docstring.
(syms_of_editfns): Replace the 'inhibit-widen' symbol and variable
with a 'restrictions-locked' symbol and variable. Update docstring.

* src/xdisp.c (handle_fontified_prop): Use Fnarrow_to_region with
the new parameter.
(unwind_narrowed_zv): Remove function.

* src/process.c (Finternal_default_process_filter): Add a third
argument to Fnarrow_to_region.

* src/lread.c (readevalloop): Add a third argument to
Fnarrow_to_region.

* src/bytecode.c (exec_byte_code): Add a third argument to
Fnarrow_to_region.

* etc/NEWS (like): Mention the new parameter of 'narrow-to-region'.

* doc/lispref/positions.texi (Narrowing): Document it.

2 years ago* lisp/tab-bar.el (tab-prefix-map): Fix key broken by conversion.
Juri Linkov [Thu, 28 Jul 2022 19:49:09 +0000 (22:49 +0300)]
* lisp/tab-bar.el (tab-prefix-map): Fix key broken by conversion.

2 years ago; * test/lisp/subr-tests.el (string-comparison-test): Add more tests.
Eli Zaretskii [Thu, 28 Jul 2022 18:41:15 +0000 (21:41 +0300)]
; * test/lisp/subr-tests.el (string-comparison-test): Add more tests.

2 years agoCleanup `string-equal-ignore-case' declarations.
Sam Steingold [Thu, 28 Jul 2022 16:35:21 +0000 (12:35 -0400)]
Cleanup `string-equal-ignore-case' declarations.

Also, a minor declaration cleanup for other `compare-strings' thin wrappers.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Remove
  `string-equal-ignore-case', `string-prefix-p', `string-suffix-p'.
(side-effect-and-error-free-fns): Add `proper-list-p' (it already
  was in `pure-fns').
(pure-fns): Remove `string-prefix-p', `string-suffix-p'
  (`string-equal-ignore-case' was missing here).
* lisp/subr.el (proper-list-p): Remove partially duplicate `put's from here.
(string-equal-ignore-case, string-prefix-p, string-suffix-p): Add
  `pure' and `side-effect-free' declarations.
(string-equal-ignore-case): Make inline.

2 years agoa couple more `string-equal-ignore-case' test cases
Sam Steingold [Tue, 26 Jul 2022 18:40:49 +0000 (14:40 -0400)]
a couple more `string-equal-ignore-case' test cases

2 years agoComment fixes for recent icon code
Lars Ingebrigtsen [Thu, 28 Jul 2022 15:49:57 +0000 (17:49 +0200)]
Comment fixes for recent icon code

* lisp/cus-edit.el (custom-icon-state): Add comment.

* lisp/emacs-lisp/icons.el: Remove comment.

2 years ago; Minor fixes to the "icons" feature
Eli Zaretskii [Thu, 28 Jul 2022 14:21:30 +0000 (17:21 +0300)]
; Minor fixes to the "icons" feature

* lisp/emacs-lisp/icons.el (icons--create): Use 'display-images-p'
to test for image capability.

* doc/lispref/display.texi (Icons): Improve indexing,
cross-references, and wording.

2 years agoDelete fast-lock.el and lazy-lock.el
Stefan Kangas [Thu, 28 Jul 2022 13:32:42 +0000 (15:32 +0200)]
Delete fast-lock.el and lazy-lock.el

The 'font-lock-support-mode' is occasionally useful for debugging
purposes, so it remains as a defvar.
Ref: https://lists.gnu.org/r/emacs-devel/2020-08/msg00125.html

* lisp/obsolete/fast-lock.el:
* lisp/obsolete/lazy-lock.el: Delete libraries obsolete since
22.1.  (Bug#56560)

* lisp/font-lock.el (font-lock-support-mode): Make into a defvar and
delete any mention of 'lazy-lock-mode' and 'fast-lock-mode'.
(font-lock-turn-on-thing-lock, font-lock-turn-off-thing-lock):
Drop support for obsolete modes lazy-lock and fast-lock.
(font-lock-after-fontify-buffer)
(font-lock-after-unfontify-buffer): Make into obsolete function
aliases for 'ignore'.  Adjust callers.
(font-lock-keywords, font-lock-inhibit-thing-lock): Adjust
documentation to not mention lazy-lock and fast-lock.
* lisp/font-core.el (font-lock-defaults): Adjust documentation to
not mention 'font-lock-inhibit-thing-lock'.
* lisp/mail/rmail.el (rmail-variables): Don't inhibit obsolete
lazy-lock-mode and fast-lock-mode.

2 years agoFix grab view persisting on Haiku after popup menu closes
Po Lu [Thu, 28 Jul 2022 13:24:10 +0000 (13:24 +0000)]
Fix grab view persisting on Haiku after popup menu closes

* src/haiku_support.cc (BasicMouseUp): Improve handling of
wait_for_release_message.
(be_clear_grab_view): New function.
* src/haiku_support.h: Update prototypes.
* src/haikumenu.c (haiku_menu_show): Call it here.

2 years agoConvert ffap comments to tests
Stefan Kangas [Thu, 28 Jul 2022 12:38:24 +0000 (14:38 +0200)]
Convert ffap comments to tests

* test/lisp/ffap-tests.el (ffap-file-remote-p, ffap-machine-p):
New tests.

2 years ago; Delete LCD Archive entries
Stefan Kangas [Thu, 28 Jul 2022 12:20:56 +0000 (14:20 +0200)]
; Delete LCD Archive entries

* lisp/emacs-lisp/advice.el:
* lisp/emacs-lisp/trace.el:
* lisp/mail/feedmail.el:
* lisp/mail/supercite.el: Delete entries for the defunct LCD Archive.

2 years ago; * src/print.c (print_vectorlike): Fix Lisp_Object type mixup.
Po Lu [Thu, 28 Jul 2022 13:04:06 +0000 (21:04 +0800)]
; * src/print.c (print_vectorlike): Fix Lisp_Object type mixup.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Thu, 28 Jul 2022 12:56:25 +0000 (14:56 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

68093c6db3 ; Auto-commit of loaddefs files.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 28 Jul 2022 12:56:25 +0000 (14:56 +0200)]
Merge from origin/emacs-28

ba54f7e39c ; * doc/lispref/windows.texi (Window Sizes): Another typo....
7990d0c36a ; * doc/lispref/windows.texi (Window Sizes): Fix a typo.  ...

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Thu, 28 Jul 2022 12:56:25 +0000 (14:56 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

1c8e90649e Bump Emacs version to 28.1.91

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 28 Jul 2022 12:56:24 +0000 (14:56 +0200)]
Merge from origin/emacs-28

92e77873ad Update ChangeLog and AUTHORS for 28.1.91 pretest
093214402b ; * admin/authors.el (authors-aliases): Update.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Thu, 28 Jul 2022 12:56:24 +0000 (14:56 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

05df70e755 Revert the `...' documentation back to actual usage

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 28 Jul 2022 12:56:24 +0000 (14:56 +0200)]
Merge from origin/emacs-28

23112f89f9 ; Improve documentation of 'file-name-with-extension'
4be938169d Release the desktop lock in 'kill-emacs-hook'
4ea1f6c7f8 ; * doc/lispref/tips.texi (Documentation Tips): Fix typos....

# Conflicts:
# doc/lispref/tips.texi

2 years agoUse icons in warnings buffers
Lars Ingebrigtsen [Thu, 28 Jul 2022 12:38:54 +0000 (14:38 +0200)]
Use icons in warnings buffers

* lisp/emacs-lisp/warnings.el (warning-suppress-action)
(warning-suppress-log-action): Removed.
New icon.
(warnings-suppress): New helper function.
(display-warning): Use it (bug#46025).

2 years agoUse icons in outline
Lars Ingebrigtsen [Thu, 28 Jul 2022 12:37:59 +0000 (14:37 +0200)]
Use icons in outline

* lisp/help.el (describe-bindings): Don't force buttons on
(bug#56691).

* lisp/outline.el (outline-minor-mode-use-buttons): Default
buttons on in special-mode buffers.
* lisp/outline.el (outline-minor-mode-buttons): Remove.
(outline-open, outline-close): New icons.
(outline-minor-mode-highlight-buffer): Use the new predicate to
switch on/off.
(outline--make-button): Remove.
(outline--make-button-overlay): Use icons.el instantiation.
(outline--valid-emoji-p): Remove.
(outline--valid-char-p): Remove.
(outline--insert-open-button, outline--insert-close-button): Make
point movement better in *Help* buffers.

2 years agoAdd support for user-customizable icons
Lars Ingebrigtsen [Thu, 28 Jul 2022 12:31:33 +0000 (14:31 +0200)]
Add support for user-customizable icons

* doc/emacs/custom.texi (Specific Customization): Mention it.

* doc/emacs/display.texi (Icons): New node.

* doc/lispref/display.texi (Icons): New node.

* lisp/button.el (buttonize):
(button--properties, buttonize-region): Allow not overriding faces.

* lisp/cus-edit.el (custom-save-all): Save icons.
(custom-icon): New widget.
(custom-icon-value-create, custom-toggle-hide-icon)
(custom--icons-widget-value, custom-icon-set): Helper functions
for the widget.
(customize-icon): Main command.
(custom-icon-state-set, custom-icon-state): Helper functions.
(custom-theme-set-icons): Function to be used by theme writers.
(custom-set-icons): Function to be used in .emacs.
(custom-save-icons): New function.

* lisp/custom.el (custom-push-theme): Add icons.

* lisp/emacs-lisp/icons.el: New file.

* test/lisp/emacs-lisp/icons-tests.el: Add some tests.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Thu, 28 Jul 2022 11:31:43 +0000 (13:31 +0200)]
; Auto-commit of loaddefs files.

2 years agoCorrectly set marker position after specpdl is unwound during printing
Po Lu [Thu, 28 Jul 2022 11:25:46 +0000 (19:25 +0800)]
Correctly set marker position after specpdl is unwound during printing

* src/print.c (PRINTFINISH): Don't call set_marker_both with the
wrong current_buffer.  Reported by Lars Ingebrigtsen
<larsi@gnus.org>.

2 years agoMake quickurl.el obsolete (part 2/2)
Stefan Kangas [Fri, 15 Jul 2022 16:46:16 +0000 (18:46 +0200)]
Make quickurl.el obsolete (part 2/2)

* lisp/obsolete/quickurl.el: Add "Obsolete-since" header.
* lisp/info.el (Info-file-list-for-emacs): Delete quickurl entry.
* doc/misc/autotype.texi (QuickURL): Delete section.

2 years agoMake net/quickurl.el obsolete (part 1/2)
Stefan Kangas [Fri, 15 Jul 2022 16:40:58 +0000 (18:40 +0200)]
Make net/quickurl.el obsolete (part 1/2)

* lisp/net/quickurl.el: Move from here...
* lisp/obsolete/quickurl.el: ...to here.

2 years agoDon't export print--unreadable-callback-buffer to lisp
Lars Ingebrigtsen [Thu, 28 Jul 2022 10:39:45 +0000 (12:39 +0200)]
Don't export print--unreadable-callback-buffer to lisp

* src/print.c (syms_of_print): Don't export
`print--unreadable-callback-buffer' to lisp.

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 ago; * doc/lispref/windows.texi (Window Sizes): Another typo. (Bug#56811)
Eli Zaretskii [Thu, 28 Jul 2022 09:56:44 +0000 (12:56 +0300)]
; * doc/lispref/windows.texi (Window Sizes): Another typo.  (Bug#56811)

2 years ago; * doc/lispref/windows.texi (Window Sizes): Fix a typo. (Bug#56811)
Eli Zaretskii [Thu, 28 Jul 2022 09:29:07 +0000 (12:29 +0300)]
; * doc/lispref/windows.texi (Window Sizes): Fix a typo.  (Bug#56811)

2 years agoBump Emacs version to 28.1.91
Stefan Kangas [Thu, 28 Jul 2022 09:20:47 +0000 (11:20 +0200)]
Bump Emacs version to 28.1.91

* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.1.91.

2 years agoUpdate ChangeLog and AUTHORS for 28.1.91 pretest
Stefan Kangas [Thu, 28 Jul 2022 09:15:51 +0000 (11:15 +0200)]
Update ChangeLog and AUTHORS for 28.1.91 pretest

* ChangeLog.3:
* etc/AUTHORS: Update.

2 years ago; * admin/authors.el (authors-aliases): Update.
Stefan Kangas [Thu, 28 Jul 2022 09:07:27 +0000 (11:07 +0200)]
; * admin/authors.el (authors-aliases): Update.

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 agoMinor update of truncate-line optimization
Eli Zaretskii [Thu, 28 Jul 2022 08:39:28 +0000 (11:39 +0300)]
Minor update of truncate-line optimization

* src/xdisp.c (forward_to_next_line_start): Look into display and
overlay strings only when lines are truncated on display.

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 agoRevert the `...' documentation back to actual usage
Lars Ingebrigtsen [Fri, 3 Jun 2022 11:04:13 +0000 (13:04 +0200)]
Revert the `...' documentation back to actual usage

* doc/lispref/tips.texi (Documentation Tips): Document how `...'
is really used now (bug#55780).  ‘...’ is not really used in the
Emacs sources.

(cherry picked from commit 1ed9c1c7f9fe32ff5123091033350beb1ccae4ca)

2 years ago; Improve documentation of 'file-name-with-extension'
Eli Zaretskii [Thu, 28 Jul 2022 07:45:43 +0000 (10:45 +0300)]
; Improve documentation of 'file-name-with-extension'

* lisp/files.el (file-name-with-extension): Doc fix.  (Bug#56809)

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 agoRelease the desktop lock in 'kill-emacs-hook'
Paul Pogonyshev [Wed, 27 Jul 2022 19:20:55 +0000 (21:20 +0200)]
Release the desktop lock in 'kill-emacs-hook'

* lisp/desktop.el: Run 'desktop--on-kill' in 'kill-emacs-hook'.
(desktop--on-kill): New function, refactored from 'desktop-kill'.
(desktop-kill): Call 'desktop--on-kill'.  (Bug#56800)

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; * doc/lispref/tips.texi (Documentation Tips): Fix typos. (Bug#56802)
Arash Esbati [Wed, 27 Jul 2022 17:59:25 +0000 (19:59 +0200)]
; * doc/lispref/tips.texi (Documentation Tips): Fix typos.  (Bug#56802)

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 ago; Fix typos in comments and remove debug code.
Eli Zaretskii [Wed, 27 Jul 2022 17:10:46 +0000 (20:10 +0300)]
; Fix typos in comments and remove debug code.

2 years agoSpeed up Isearch in very long lines under line truncation
Eli Zaretskii [Wed, 27 Jul 2022 17:05:44 +0000 (20:05 +0300)]
Speed up Isearch in very long lines under line truncation

* src/xdisp.c (strings_with_newlines): New function.
(forward_to_next_line_start): Call 'strings_with_newlines' in
buffers with very long lines, to avoid falling back on slow
iteration.  (Bug#56682)

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 agoImprovement for long lines in buffers with font locking.
Gregory Heytings [Mon, 25 Jul 2022 20:27:17 +0000 (20:27 +0000)]
Improvement for long lines in buffers with font locking.

* src/xdisp.c (get_narrowed_width): Factored out from 'get_narrowed_len'.
(get_narrowed_len): Updated to use 'get_narrowed_width'.
(get_closer_narrowed_begv): New function.
(SET_WITH_NARROWED_BEGV): Add parameter to the macro.
(back_to_previous_line_start): Use the new function.
(get_visually_first_element, move_it_vertically_backward): Update the
calls to the macro.

* src/dispextern.h: Prototype of 'get_closer_narrowed_begv'.
Fix the prototypes of 'get_narrowed_begv' and 'get_narrowed_zv'.

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'.