]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Wed, 13 Jul 2022 19:03:48 +0000 (21:03 +0200)]
; Auto-commit of loaddefs files.

2 years agoPrefer defvar-keymap in tab-bar.el
Stefan Kangas [Wed, 13 Jul 2022 18:01:55 +0000 (20:01 +0200)]
Prefer defvar-keymap in tab-bar.el

* lisp/tab-bar.el: Prefer keymap-set.
(tab-bar-map, tab-switcher-mode-map)
(tab-bar-switch-repeat-map, tab-bar-move-repeat-map): Prefer
defvar-keymap.

2 years ago* lisp/vc/vc-bzr.el (vc-bzr-program): Support breezy.
Stefan Kangas [Wed, 13 Jul 2022 12:40:53 +0000 (14:40 +0200)]
* lisp/vc/vc-bzr.el (vc-bzr-program): Support breezy.

2 years agoMake smtpmail try all auth methods
Lars Ingebrigtsen [Wed, 13 Jul 2022 12:34:30 +0000 (14:34 +0200)]
Make smtpmail try all auth methods

* lisp/mail/smtpmail.el (smtpmail-try-auth-methods): Try all valid
methods, even if one fails (bug#48562).

2 years agoFix recursive calls of x_connection_closed leading to dead terminal
Po Lu [Wed, 13 Jul 2022 12:16:21 +0000 (20:16 +0800)]
Fix recursive calls of x_connection_closed leading to dead terminal

* src/xterm.c (x_connection_closed): Return if called again for
the current display.
(x_io_error_quitter): Fix attributes.  (bug#56528)

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Wed, 13 Jul 2022 11:39:57 +0000 (13:39 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoAdapt Tramp version integrated in Emacs 28.2
Michael Albinus [Wed, 13 Jul 2022 11:38:11 +0000 (13:38 +0200)]
Adapt Tramp version integrated in Emacs 28.2

* lisp/net/trampver.el (customize-package-emacs-version-alist):
Adapt Tramp version integrated in Emacs 28.2.

2 years agoRevert "Make mouse-2 respect delete-selection mode"
Lars Ingebrigtsen [Wed, 13 Jul 2022 11:37:05 +0000 (13:37 +0200)]
Revert "Make mouse-2 respect delete-selection mode"

This reverts commit 215a700751f88bba18989e340181361a484d5b3a.

This leads to unintended consequences for cua-mode, among others (bug#56530).

2 years agoMake bibtex-mode not signal errors when used programmatically
Lars Ingebrigtsen [Wed, 13 Jul 2022 11:24:00 +0000 (13:24 +0200)]
Make bibtex-mode not signal errors when used programmatically

* lisp/textmodes/bibtex.el (bibtex-mode): Ensure that the font
lock machinery is set up (bug#48447).

2 years agoMake the rsh command obsolete
Stefan Kangas [Wed, 13 Jul 2022 10:40:54 +0000 (12:40 +0200)]
Make the rsh command obsolete

* lisp/net/telnet.el (rsh): Make obsolete.
(telnet-connect-command, telnet-mode): Adjust documentation for
above change.

2 years ago; Fix typos in the manual
Juri Linkov [Wed, 13 Jul 2022 06:58:14 +0000 (09:58 +0300)]
; Fix typos in the manual

2 years ago; * lisp/term/haiku-win.el: Fix compiler warnings.
Po Lu [Wed, 13 Jul 2022 05:46:59 +0000 (05:46 +0000)]
; * lisp/term/haiku-win.el: Fix compiler warnings.

2 years agoImplement TIMESTAMP target for Haiku selections
Po Lu [Wed, 13 Jul 2022 05:44:31 +0000 (05:44 +0000)]
Implement TIMESTAMP target for Haiku selections

* lisp/term/haiku-win.el (haiku-selection-targets): Fix return
values.
(gui-backend-get-selection): Handle TIMESTAMP specially.
* src/haiku_select.cc (be_get_clipboard_count): New function.
* src/haikuselect.c (Fhaiku_selection_timestamp): New function.
(syms_of_haikuselect): Add new defsubr.
* src/haikuselect.h: Update prototypes.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 13 Jul 2022 04:46:11 +0000 (06:46 +0200)]
Merge from origin/emacs-28

a3dab1e621 Don't mention cl-cXXXr aliases in cl-lib manual

2 years agoNew user option 'webjump-use-internal-browser'
Po Lu [Wed, 13 Jul 2022 04:36:08 +0000 (12:36 +0800)]
New user option 'webjump-use-internal-browser'

* lisp/net/webjump.el (webjump-use-internal-browser): New defcustom.
(webjump): Respect it.  Reported by Youmu <condy0919@gmail.com>.

2 years agoFix closing displays when preserving selections is enabled
Po Lu [Wed, 13 Jul 2022 03:01:59 +0000 (11:01 +0800)]
Fix closing displays when preserving selections is enabled

* src/frame.c (delete_frame): Bind `x-auto-preserve-selections'
to nil if deleting display.
* src/xselect.c (x_clear_frame_selections): Pass original frame
to that function.
* src/xterm.c (x_preserve_selections): Fix determining the new
owner.
(syms_of_xterm): New defsym `x-auto-preserve-selections'.
* src/xterm.h: Update prototypes.

2 years agoTweak image-converter-add-handler interface
Lars Ingebrigtsen [Tue, 12 Jul 2022 23:53:20 +0000 (01:53 +0200)]
Tweak image-converter-add-handler interface

* doc/emacs/files.texi (Image Mode): Adjust documentation.
* lisp/image/image-converter.el (image-convert): Let the converter
know whether it's a file or not.

2 years agoAutoload image-converter-add-handler
Lars Ingebrigtsen [Tue, 12 Jul 2022 23:39:55 +0000 (01:39 +0200)]
Autoload image-converter-add-handler

* lisp/image/image-converter.el (image-converter-add-handler):
Autoload.

2 years agoAdd support for viewing "images" such as Krita (.kra) files
Lars Ingebrigtsen [Tue, 12 Jul 2022 23:36:54 +0000 (01:36 +0200)]
Add support for viewing "images" such as Krita (.kra) files

* doc/emacs/files.texi (Image Mode): Document it.

* lisp/image/image-converter.el (image-converter-add-handler): New
function (bug#48415).
(image-convert): Use it.

2 years ago; * lisp/dirtrack.el: Restore important information in commentary.
Eli Zaretskii [Tue, 12 Jul 2022 17:00:16 +0000 (20:00 +0300)]
; * lisp/dirtrack.el: Restore important information in commentary.

2 years ago; * lisp/dirtrack.el: Improve commentary.
Stefan Kangas [Tue, 12 Jul 2022 16:42:52 +0000 (18:42 +0200)]
; * lisp/dirtrack.el: Improve commentary.

2 years agoDrop obsolete rsh/rlogin from two user options
Stefan Kangas [Tue, 12 Jul 2022 14:32:50 +0000 (16:32 +0200)]
Drop obsolete rsh/rlogin from two user options

* lisp/net/ange-ftp.el (ange-ftp-gateway-program):
* lisp/net/imap.el (imap-shell-program): Drop obsolete "rsh"/"rlogin".

2 years agoMake pcomplete/{rsh,rlogin} into alias for pcomplete/ssh
Stefan Kangas [Tue, 12 Jul 2022 14:32:07 +0000 (16:32 +0200)]
Make pcomplete/{rsh,rlogin} into alias for pcomplete/ssh

* lisp/pcmpl-unix.el (pcomplete/rlogin, pcomplete/rsh): Make into
aliases for 'pcomplete/ssh', as "rsh" and "rlogin" is more often than
not aliases for "ssh" on modern machines.

2 years ago; Fix recent additions to the Eshell manual
Eli Zaretskii [Tue, 12 Jul 2022 14:10:40 +0000 (17:10 +0300)]
; Fix recent additions to the Eshell manual

* doc/misc/eshell.texi (Variables): Fix a @footnote.
(Variables): Fix indexing and @item's in a @table.

2 years ago; * lisp/eshell/esh-var.el (eshell-variable-aliases-list): Doc fix.
Eli Zaretskii [Tue, 12 Jul 2022 14:03:08 +0000 (17:03 +0300)]
; * lisp/eshell/esh-var.el (eshell-variable-aliases-list): Doc fix.

2 years agoRemove rsh from Tramp manual, Overview section
Michael Albinus [Tue, 12 Jul 2022 13:42:17 +0000 (15:42 +0200)]
Remove rsh from Tramp manual, Overview section

* doc/misc/tramp.texi (Overview, Frequently Asked Questions):
Don't mention obsolete rsh and rcp.

2 years agoEnsure Eshell variable aliases properly handle indexing
Jim Porter [Thu, 7 Jul 2022 04:59:11 +0000 (21:59 -0700)]
Ensure Eshell variable aliases properly handle indexing

* lisp/eshell/em-dirs.el (eshell-dirs-initialize): Properly handle
indexing for variable aliases.

* lisp/eshell/esh-var (eshell-variable-aliases-list): Properly handle
indexing for variable aliases, and add SIMPLE-FUNCTION entry for
aliases.
(eshell-get-variable): Update how variable alias functions are called.

* test/lisp/eshell/em-alias-tests.el
(em-alias-test/alias-arg-vars-indices)
(em-alias-test/alias-arg-vars-split-indices)
(em-alias-test/alias-all-args-var-split-indices):
* test/lisp/eshell/em-dirs-tests.el (em-dirs-test/pwd-var-indices)
(em-dirs-test/oldpwd-var-indices)
(em-dirs-test/directory-ring-var-indices):
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/inside-emacs-var-split-indices)
(esh-var-test/last-result-var-split-indices): New tests.
(esh-var-test/last-arg-var-split-indices): Expand test to check
conversion behavior inside double quotes (bug#56509).

2 years agoAllow Eshell variable aliases to point to other aliases
Jim Porter [Sat, 9 Jul 2022 01:41:07 +0000 (18:41 -0700)]
Allow Eshell variable aliases to point to other aliases

In particular, this resolves an issue where '$+' referenced the real
environment variable '$PWD' instead of the Eshell variable alias of
the same name.  This meant that changing directories in Eshell
wouldn't update the value of '$+'.

* lisp/eshell/esh-var.el (eshell-get-variable): Allow Eshell variable
aliaes to point to other aliases.

* test/lisp/eshell/em-dirs-tests.el (em-dirs-test/pwd-var)
(em-dirs-test/short-pwd-var): Adapt tests to check this case
(bug#56509).

2 years agoImprove tests/organization for built-in variables
Jim Porter [Mon, 4 Jul 2022 03:05:29 +0000 (20:05 -0700)]
Improve tests/organization for built-in variables

* lisp/eshell/em-dirs.el (eshell-inside-emacs)
(eshell-dirs-initialize): Move 'INSIDE_EMACS' from here...

* lisp/eshell/esh-var.el (eshell-inside-emacs)
(eshell-variable-aliases-alist): ... to here, and improve doc string.

* test/lisp/eshell/eshell-tests.el (eshell-test/inside-emacs-var):
Move from here...

* test/lisp/eshell/esh-var-tests.el (esh-var-test/inside-emacs-var):
... to here.
(esh-var-test/last-arg-var-indices)
(esh-var-test/last-arg-var-split-indices): New tests.

* test/lisp/eshell/em-alias-tests.el:
* test/lisp/eshell/em-dirs-tests.el:
* test/lisp/eshell-em-script-tests.el: New files.

* doc/misc/eshell.texi (Built-ins): Fix 'cd' documentation; it works
with the directory ring, not the directory stack.  Move built-in
variables documentation from here...
(Variables): ... to here, and add documentation for missing built-in
variables.

2 years agoFix buffer-stale-function fix
Lars Ingebrigtsen [Tue, 12 Jul 2022 12:39:52 +0000 (14:39 +0200)]
Fix buffer-stale-function fix

* src/buffer.c (Fmake_indirect_buffer): Kill the local
buffer-stale-function variable instead of setting it
buffer-locally to the default value.  This should have the same
effect, but is less confusing.

2 years agoReduce syncing when fetching selection names during frame deletion
Po Lu [Tue, 12 Jul 2022 12:02:51 +0000 (20:02 +0800)]
Reduce syncing when fetching selection names during frame deletion

* src/xterm.c (x_preserve_selections): Use XCB to asynchronously
fetch the selection owner.

2 years agoDon't mention cl-cXXXr aliases in cl-lib manual
Stefan Kangas [Tue, 12 Jul 2022 11:41:28 +0000 (13:41 +0200)]
Don't mention cl-cXXXr aliases in cl-lib manual

* doc/misc/cl.texi (Lists, List Functions, Efficiency Concerns): Don't
mention 'cl-cXXXr' compatibility aliases for built-in 'cXXXr'
functions.  They shouldn't be used in new code.

2 years agoMake some rst.el compat aliases obsolete
Stefan Kangas [Tue, 12 Jul 2022 11:29:32 +0000 (13:29 +0200)]
Make some rst.el compat aliases obsolete

* lisp/textmodes/rst.el (rst-adjust-section-title)
(rst-display-adornments-hierarchy, rst-straighten-adornments)
(rst-toc-insert-update, rst-goto-section)
(rst-toc-mode-goto-section, rst-toc-mode-mouse-goto)
(rst-toc-mode-mouse-goto-kill, rst-toc-quit-window): Make
compatibility aliases obsolete.

2 years agoMake remote-shell-program default to ssh only
Stefan Kangas [Tue, 12 Jul 2022 10:11:43 +0000 (12:11 +0200)]
Make remote-shell-program default to ssh only

* lisp/files.el (remote-shell-program): Default to "ssh" only.  The
other commands in this list have severe security issues, and it is
easy enough for users to customize them manually if they want to.
See also the discussion in: https://debbugs.gnu.org/56461

2 years agoRecognize gemini in thing-at-point
Stefan Kangas [Tue, 12 Jul 2022 10:02:51 +0000 (12:02 +0200)]
Recognize gemini in thing-at-point

* lisp/thingatpt.el (thing-at-point-uri-schemes): Recognize gemini.

2 years ago; * lisp/completion.el: Remove code commented out since 1990.
Stefan Kangas [Tue, 12 Jul 2022 03:55:07 +0000 (05:55 +0200)]
; * lisp/completion.el: Remove code commented out since 1990.

2 years agoBetter gomoku X colour with bright background
Mattias Engdegård [Tue, 12 Jul 2022 09:08:05 +0000 (11:08 +0200)]
Better gomoku X colour with bright background

* lisp/play/gomoku.el (gomoku-X): Use blue rather than green for
crosses on bright background for better legibility.
(Red for naughts could be adjusted but seems just about bearable.)

2 years agoExpunge unused recompute-lucid-menubar, lucid-menu-bar-dirty-flag
Alan Mackenzie [Tue, 12 Jul 2022 09:31:08 +0000 (09:31 +0000)]
Expunge unused recompute-lucid-menubar, lucid-menu-bar-dirty-flag

This fixes bug #56502.  That function and these variables were manipulated by
the former file emacs-lisp/lmenu.el that was finally expunged from directory
obsolete/ by Stefan Kangas on 2020-05-15.  There remain references to them in
the *.c, and *.m files.

* src/keyboard.c (syms_of_keyboard): Remove declarations of the symbol and
variable.

* src/haikumenu.c (set_frame_menu_bar)
* src/keyboard.c (command_loop_1)
* src/nsmenu.m (ns_update_menubar)
* src/pgtkmenu.c (set_frame_menubar)
* src/xdisp.c (update_menu_bar)
* src/xmenu.c (set_frame_menubar): Remove calls to Qrecompute_lucid_menubar
contitional on Vlucid_menu_bar_dirty_flag.

2 years agoFix preserving selections if `x-lost-selection-functions' signals
Po Lu [Tue, 12 Jul 2022 07:14:04 +0000 (15:14 +0800)]
Fix preserving selections if `x-lost-selection-functions' signals

* src/xterm.c (x_preserve_selections): Get selection owner and
run lost selection hook separately.

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

9183d1672c ; * etc/PROBLEMS: Give a URL for bug#50666.
1f508a8b6f etc/PROBLEMS: Describe issues with native compilation on C...
84a5d47125 ; Fix last change
0461021893 ; * lisp/emacs-lisp/comp.el (native-comp-speed): Explain t...
876317271b * lisp/find-dired.el (find-dired): Doc fix; add crossrefer...

2 years agoTry to save selections from being disowned during frame deletion
Po Lu [Tue, 12 Jul 2022 02:47:23 +0000 (10:47 +0800)]
Try to save selections from being disowned during frame deletion

* lisp/cus-start.el (standard): Add
`x-auto-preserve-selections'.
* src/xselect.c (x_clear_frame_selections): Collect deleted
selections into a variable and preserve them.
* src/xterm.c (x_preserve_selections): New function.
(syms_of_xterm): New variable `x-auto-preserve-selections'.
* src/xterm.h: Update prototypes.

2 years ago; * lisp/textmodes/rst.el: Delete stale comment.
Stefan Kangas [Mon, 11 Jul 2022 23:43:50 +0000 (01:43 +0200)]
; * lisp/textmodes/rst.el: Delete stale comment.

2 years ago* lisp/mail/mail-utils.el (mail-string-delete): Make obsolete.
Stefan Kangas [Mon, 11 Jul 2022 20:32:36 +0000 (22:32 +0200)]
* lisp/mail/mail-utils.el (mail-string-delete): Make obsolete.

2 years ago; * etc/PROBLEMS: Give a URL for bug#50666.
Eli Zaretskii [Mon, 11 Jul 2022 18:24:33 +0000 (21:24 +0300)]
; * etc/PROBLEMS: Give a URL for bug#50666.

2 years agoetc/PROBLEMS: Describe issues with native compilation on Cygwin
Ken Brown [Mon, 11 Jul 2022 17:03:32 +0000 (13:03 -0400)]
etc/PROBLEMS: Describe issues with native compilation on Cygwin

2 years agoPrefer defvar-keymap in thumbs.el
Stefan Kangas [Mon, 11 Jul 2022 15:59:25 +0000 (17:59 +0200)]
Prefer defvar-keymap in thumbs.el

* lisp/thumbs.el (thumbs-mode-map, thumbs-view-image-mode-map):
Prefer defvar-keymap.

2 years agoRemove obsolete uses of obsolete functions
Mattias Engdegård [Mon, 11 Jul 2022 15:31:38 +0000 (17:31 +0200)]
Remove obsolete uses of obsolete functions

* src/minibuf.c (minibuf_conform_representation): Remove.
(Ftry_completion): Don't call it.
(Ftest_completion): Don't use the obsolete Fstring_make_unibyte or
Fstring_make_multibyte; they don't serve any useful purpose here.
We don't try to equate unibyte and multibyte raw bytes in symbol
lookups elsewhere and there is no reason to do it here.

2 years agoRemove dead branch from substitute-command-keys
Stefan Kangas [Mon, 11 Jul 2022 15:21:23 +0000 (17:21 +0200)]
Remove dead branch from substitute-command-keys

* lisp/help.el (substitute-command-keys): Remove dead branch;
where-is-internal will follow any remaps for us.  Note also that the
test case for remapping still pass.

2 years agoMake `g' in `vc-annotate' not bug out
Lars Ingebrigtsen [Mon, 11 Jul 2022 14:29:58 +0000 (16:29 +0200)]
Make `g' in `vc-annotate' not bug out

* lisp/vc/vc-annotate.el (vc-annotate): Don't bug out on `g'
(bug#48359).

2 years agoOnly reset buffer-local buffer-stale-function in make-indirect-buffer
Lars Ingebrigtsen [Mon, 11 Jul 2022 14:05:08 +0000 (16:05 +0200)]
Only reset buffer-local buffer-stale-function in make-indirect-buffer

* src/buffer.c (Fmake_indirect_buffer): Don't set the global
buffer-stale-function (bug#48348).

2 years ago; Fix last change
Eli Zaretskii [Mon, 11 Jul 2022 13:52:03 +0000 (16:52 +0300)]
; Fix last change

* doc/lispref/compile.texi (Native-Compilation Variables): Explain
better what the value -1 of 'native-comp-speed' means.

2 years ago; * lisp/emacs-lisp/comp.el (native-comp-speed): Explain the -1 value.
Eli Zaretskii [Mon, 11 Jul 2022 13:48:24 +0000 (16:48 +0300)]
; * lisp/emacs-lisp/comp.el (native-comp-speed): Explain the -1 value.

2 years agoDocument the recent add-global-abbrev change
Lars Ingebrigtsen [Mon, 11 Jul 2022 13:38:59 +0000 (15:38 +0200)]
Document the recent add-global-abbrev change

* doc/emacs/abbrevs.texi (Defining Abbrevs): Document that you can
use the active region.

2 years agoMake add-mode-abbrev use the active region
Lars Ingebrigtsen [Mon, 11 Jul 2022 13:34:07 +0000 (15:34 +0200)]
Make add-mode-abbrev use the active region

* lisp/abbrev.el (add-mode-abbrev, add-global-abbrev): Document it.
(add-abbrev): If there's an active region, use that as the
expansion (bug#56496).

2 years ago; * etc/NEWS: Announce obsoletion of rlogin.el.
Stefan Kangas [Mon, 11 Jul 2022 13:05:56 +0000 (15:05 +0200)]
; * etc/NEWS: Announce obsoletion of rlogin.el.

2 years ago* lisp/obsolete/rlogin.el: Add "Obsolete-since" line.
Stefan Kangas [Mon, 11 Jul 2022 11:56:28 +0000 (13:56 +0200)]
* lisp/obsolete/rlogin.el: Add "Obsolete-since" line.

2 years agoMake net/rlogin.el obsolete
Stefan Kangas [Mon, 11 Jul 2022 11:55:41 +0000 (13:55 +0200)]
Make net/rlogin.el obsolete

* lisp/net/rlogin.el: Move from here...
* lisp/obsolete/rlogin.el: ...to here.  (Bug#56461)

2 years ago* src/.lldbinit: Fix copyright year.
Stefan Kangas [Mon, 11 Jul 2022 12:56:48 +0000 (14:56 +0200)]
* src/.lldbinit: Fix copyright year.

2 years agoAllow commands that call `yes-or-no-p' to be repeatable again
Lars Ingebrigtsen [Mon, 11 Jul 2022 12:51:34 +0000 (14:51 +0200)]
Allow commands that call `yes-or-no-p' to be repeatable again

* lisp/subr.el (y-or-n-p): Enable commands that call this function
to be repeatable (bug#45999).  This stopped working after this
function started using read-from-minibuffer.
* src/fns.c (Fyes_or_no_p): Ditto.

2 years agoMove EIEIO autoloads to the common loaddefs.el
Stefan Kangas [Mon, 11 Jul 2022 12:29:33 +0000 (14:29 +0200)]
Move EIEIO autoloads to the common loaddefs.el

* lisp/emacs-lisp/eieio-core.el:
* lisp/emacs-lisp/eieio-custom.el:
* lisp/emacs-lisp/eieio-opt.el:
* lisp/obsolete/eieio-compat.el: Remove generated-autoload-file
setting and don't require eieio-loaddefs.el.

2 years agoSupport for debugging Emacs with LLDB
Gerd Möllmann [Sun, 10 Jul 2022 11:35:32 +0000 (13:35 +0200)]
Support for debugging Emacs with LLDB

* (src/.lldbinit): New file.
* (etc/emacs_lldb.py): Module loaded from .lldbinit.

2 years agoDon't create unused file rmail-loaddefs.el
Stefan Kangas [Mon, 11 Jul 2022 12:03:25 +0000 (14:03 +0200)]
Don't create unused file rmail-loaddefs.el

* lisp/mail/undigest.el: Remove 'generated-autoload-file' local
variable.  (Bug#56491)

2 years agoSimplify str_to_multibyte and related code
Mattias Engdegård [Mon, 11 Jul 2022 11:43:34 +0000 (13:43 +0200)]
Simplify str_to_multibyte and related code

* src/character.h (str_to_multibyte):
* src/character.c (str_to_multibyte): Remove `nbytes` argument; return
it instead.  Copy forwards.
* src/fns.c (concat_to_string, Fstring_make_multibyte):
Use str_to_multibyte.
(string_make_multibyte): Remove.
(string_to_multibyte):
* src/print.c (print_string):  Adapt calls.

2 years agoDoc fix; don't mention rlogin
Stefan Kangas [Mon, 11 Jul 2022 11:47:08 +0000 (13:47 +0200)]
Doc fix; don't mention rlogin

* doc/emacs/misc.texi (Remote Host):
* doc/misc/eshell.texi (Bugs and ideas): Don't mention
rlogin.  (Bug#56461)

2 years agoImprove behavior of `lost-selection-mode' with multiple buffers
Po Lu [Mon, 11 Jul 2022 11:36:01 +0000 (19:36 +0800)]
Improve behavior of `lost-selection-mode' with multiple buffers

* etc/NEWS: Announce new hook `post-select-region-hook'.

* lisp/select.el (lost-selection-last-region-buffer): New
variable.
(lost-selection-post-select-region-function): New function.
Deactivate the mark if the buffer changed.
(lost-selection-mode): Add new hook.

* src/keyboard.c (command_loop_1): Run that hook when
appropriate.
(syms_of_keyboard): New hook `post-select-region-hook'.

2 years agoFix crm.el compilation warning
Lars Ingebrigtsen [Mon, 11 Jul 2022 11:34:35 +0000 (13:34 +0200)]
Fix crm.el compilation warning

* lisp/emacs-lisp/crm.el (crm-default-separator): Move to avoid
compilation warning.

2 years agoDon't call home from test/src/process-tests.el
Lars Ingebrigtsen [Mon, 11 Jul 2022 11:19:48 +0000 (13:19 +0200)]
Don't call home from test/src/process-tests.el

* test/src/process-tests.el (process-num-processors): Move from
here...
* test/manual/process-callout-tests.el: ... to here (bug#55858).

2 years agoMake mouse-2 respect delete-selection mode
Visuwesh [Mon, 11 Jul 2022 10:57:34 +0000 (12:57 +0200)]
Make mouse-2 respect delete-selection mode

* lisp/delsel.el: Make the mouse yank commands delete-selection-mode
aware (bug#56421).

2 years ago* lisp/emacs-lisp/package.el (define-package): Make obsolete.
Stefan Kangas [Mon, 11 Jul 2022 10:41:50 +0000 (12:41 +0200)]
* lisp/emacs-lisp/package.el (define-package): Make obsolete.

2 years agoPrevent setting user time if the WM doesn't support it
Po Lu [Mon, 11 Jul 2022 10:48:12 +0000 (18:48 +0800)]
Prevent setting user time if the WM doesn't support it

* src/xterm.c (x_update_frame_user_time_window): Don't set
_NET_WM_USER_TIME if it's not supported by the window manager.

2 years agoAdd test for the gradle-android compilation message pattern
Mattias Engdegård [Mon, 11 Jul 2022 10:19:18 +0000 (12:19 +0200)]
Add test for the gradle-android compilation message pattern

* etc/compilation.txt (symbol): Add example.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data):
(compile-test-error-regexps): Add test case (bug#56249).

2 years agoFix memory leak in ns_draw_relief
Daniel Martín [Sun, 10 Jul 2022 20:36:28 +0000 (22:36 +0200)]
Fix memory leak in ns_draw_relief

* src/nsterm.h (struct ns_output): New fields to store the relief
colors.
* src/nsterm.m (ns_setup_relief_colors): New function to keep the
relief colors as part of the ns_output structure.
(ns_draw_relief): Remove static local variables.  Assigning them to
nil caused a memory leak of NSColor instances (bug#56462).  Call
ns_setup_relief_colors instead.

2 years agoAutoload named-let
Lars Ingebrigtsen [Mon, 11 Jul 2022 10:18:04 +0000 (12:18 +0200)]
Autoload named-let

* lisp/emacs-lisp/subr-x.el (named-let): Autoload `named-let' for
easier use (bug#56473).

2 years agoFix `M-x lisp-fill-paragraph'
Lars Ingebrigtsen [Mon, 11 Jul 2022 10:15:04 +0000 (12:15 +0200)]
Fix `M-x lisp-fill-paragraph'

* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Fix filling
when called directly with `M-x lisp-fill-paragraph' instead of via
`M-q' (bug#56476).

2 years agoMake crm-default-separator obsolete as per FIXME
Stefan Kangas [Sun, 26 Dec 2021 20:59:16 +0000 (21:59 +0100)]
Make crm-default-separator obsolete as per FIXME

* lisp/emacs-lisp/crm.el (crm-default-separator): Make into
obsolete variable alias for crm-separator.
(crm-separator): Update docstring for above change.

2 years ago; * lwlib/xlwmenu.c (make_shadow_gcs): Remove "a = a" pattern.
Manuel Giraud [Mon, 11 Jul 2022 10:09:13 +0000 (12:09 +0200)]
; * lwlib/xlwmenu.c (make_shadow_gcs): Remove "a = a" pattern.

* lwlib/xlwmenu.c (make_shadow_gcs): Remove code that sets a value
to itself (bug#56479).

2 years ago* lisp/find-dired.el (find-dired): Doc fix; add crossreference.
Stefan Kangas [Mon, 11 Jul 2022 09:51:16 +0000 (11:51 +0200)]
* lisp/find-dired.el (find-dired): Doc fix; add crossreference.

2 years agoRe-add comment on autoloading cookies in preloaded files
Stefan Kangas [Mon, 11 Jul 2022 09:17:09 +0000 (11:17 +0200)]
Re-add comment on autoloading cookies in preloaded files

This comment was removed in 2009, but it is useful to explain why
we are keeping these autoload cookies.
* lisp/bindings.el:
* lisp/font-core.el:
* lisp/format.el:
* lisp/international/mule-cmds.el: Re-add comment on autoloading.
* lisp/font-core.el (font-lock-defaults): Re-add autoload cookie,
despite the fact that this file is preloaded.

2 years agoPrefer :risky defcustom keyword
Stefan Kangas [Mon, 11 Jul 2022 08:33:45 +0000 (10:33 +0200)]
Prefer :risky defcustom keyword

* lisp/align.el (align-region-separate, align-rules-list)
(align-exclude-rules-list, align-vhdl-rules-list):
* lisp/bindings.el (mode-line-percent-position):
* lisp/filesets.el (filesets-menu-cache-file, filesets-commands)
(filesets-external-viewers, filesets-ingroup-patterns)
(filesets-data):
* lisp/hi-lock.el (hi-lock-file-patterns-policy):
* lisp/mail/mailalias.el (mail-complete-alist)
(mail-directory-process, mail-directory-stream)
(mail-directory-parser):
* lisp/mail/rmail.el (rmail-confirm-expunge):
* lisp/mail/sendmail.el (mail-signature):
* lisp/mail/supercite.el (sc-cite-frame-alist)
(sc-uncite-frame-alist, sc-recite-frame-alist)
(sc-default-cite-frame, sc-default-uncite-frame)
(sc-default-recite-frame, sc-attrib-selection-list)
(sc-rewrite-header-list):
* lisp/progmodes/make-mode.el (makefile-special-targets-list):
* lisp/so-long.el (so-long-action-alist):
* lisp/textmodes/sgml-mode.el (sgml-tag-alist): Prefer defcustom
:risky keyword argument to directly setting the 'risky-local-variable'
symbol property.

2 years agoSimplify and speed up string-to-multibyte
Mattias Engdegård [Mon, 11 Jul 2022 08:34:40 +0000 (10:34 +0200)]
Simplify and speed up string-to-multibyte

* src/character.h (str_to_multibyte):
* src/character.c (str_to_multibyte): Change signature and simplify;
the conversion is no longer done in-place.
* src/fns.c (string_to_multibyte): Drop temporary buffer and memcpy;
adapt to new str_to_multibyte signature.
* src/print.c (print_string): Drop memcpy; adapt call to str_to_multibyte.
* test/src/fns-tests.el (fns--string-to-unibyte): Rename to...
(fns--string-to-unibyte-multibyte): ... this and strengthen, so that
the test covers string-to-multibyte reasonably well.

2 years agoRename 'longlines-breakpoint-chars' to 'longlines-break-chars'
Manuel Giraud [Sun, 10 Jul 2022 13:01:55 +0000 (15:01 +0200)]
Rename 'longlines-breakpoint-chars' to 'longlines-break-chars'

* etc/NEWS:
* lisp/longlines.el (longlines-break-chars): Rename
'longlines-breakpoint-chars' to 'longlines-break-chars'
(bug#56335).

2 years agoHandle errors sending selection decline events asynchronously
Po Lu [Mon, 11 Jul 2022 02:07:21 +0000 (10:07 +0800)]
Handle errors sending selection decline events asynchronously

* src/xselect.c (x_decline_selection_request): Handle errors
asynchronously.
* src/xterm.c (x_ignore_errors_for_next_request)
(x_stop_ignoring_errors): Export functions.
* src/xterm.h: Update prototypes.

2 years ago* time-date.el (decoded-time-period): Rename TIME in docstring
Philip Kaludercic [Sun, 10 Jul 2022 18:55:02 +0000 (20:55 +0200)]
* time-date.el (decoded-time-period): Rename TIME in docstring

2 years ago; * lisp/emacs-lisp/ert-x.el (tramp-remote-path): Fix last change.
Michael Albinus [Sun, 10 Jul 2022 18:07:37 +0000 (20:07 +0200)]
; * lisp/emacs-lisp/ert-x.el (tramp-remote-path): Fix last change.

2 years agoRemove some ineffectual calls to purecopy
Stefan Kangas [Sun, 10 Jul 2022 16:57:19 +0000 (18:57 +0200)]
Remove some ineffectual calls to purecopy

* lisp/dired.el (dired-chown-program, dired-trivial-filenames):
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function):
* lisp/help-fns.el (help-fns--mention-shortdoc-groups):
* lisp/mail/mail-extr.el (mail-extr-full-name-prefixes)
(mail-extr-all-letters-but-separators, mail-extr-all-letters)
(mail-extr-first-letters, mail-extr-last-letters)
(mail-extr-bad-dot-pattern, mail-extr-full-name-suffix-pattern)
(mail-extr-alternative-address-pattern)
(mail-extr-trailing-comment-start-pattern)
(mail-extr-name-pattern, mail-extr-telephone-extension-pattern)
(mail-extr-ham-call-sign-pattern, mail-extr-normal-name-pattern)
(mail-extr-two-name-pattern)
(mail-extr-listserv-list-name-pattern)
(mail-extr-stupid-vms-date-stamp-pattern)
(mail-extr-hz-embedded-gb-encoded-chinese-pattern)
(mail-extr-x400-encoded-address-pattern)
(mail-extr-x400-encoded-address-field-pattern-format)
(mail-extr-x400-encoded-address-surname-pattern)
(mail-extr-x400-encoded-address-given-name-pattern)
(mail-extr-x400-encoded-address-full-name-pattern): Remove
ineffectual calls to purecopy.

2 years agoRename new option to browse-url-default-scheme
Stefan Kangas [Sun, 10 Jul 2022 16:44:43 +0000 (18:44 +0200)]
Rename new option to browse-url-default-scheme

* lisp/net/browse-url.el (browse-url-default-scheme): Rename from
'browse-url-guess-default-scheme'.  Update caller.
Suggested by Eli Zaretskii <eliz@gnu.org>.

2 years agoSpeed up string-to-unibyte
Mattias Engdegård [Sun, 10 Jul 2022 16:02:08 +0000 (18:02 +0200)]
Speed up string-to-unibyte

* src/character.h (str_to_unibyte):
* src/character.c (str_to_unibyte): Remove.
* src/fns.c (Fstring_to_unibyte): Ditch the call to str_to_unibyte and
the unnecessary heap allocation.  Write new, faster code.
* test/src/fns-tests.el (fns--string-to-unibyte): New test.

2 years agoFix Tramp test environment on hydra.nixos.org
Michael Albinus [Sun, 10 Jul 2022 16:13:50 +0000 (18:13 +0200)]
Fix Tramp test environment on hydra.nixos.org

* lisp/emacs-lisp/ert-x.el (tramp-remote-path): Declare.  Adapt
`tramp-remote-path' on hydra.  (Bug#56424)

* test/lisp/dnd-tests.el (dnd-tests-begin-drag-files): Remove instrumentation.

* test/lisp/filenotify-tests.el:
* test/lisp/shadowfile-tests.el:
* test/lisp/net/tramp-tests.el: Do not adapt `tramp-remote-path'.

2 years agoDon't use purecopy in dictionary.el
Stefan Kangas [Sun, 10 Jul 2022 15:09:18 +0000 (17:09 +0200)]
Don't use purecopy in dictionary.el

* lisp/net/dictionary.el (dictionary-pre-buffer)
(dictionary-display-dictionary-line)
(dictionary-display-more-info, dictionary-display-strategy-line)
(dictionary-display-match-lines): Don't use purecopy; it has no
effect here.

2 years ago* src/dired.c (directory_files_internal): Update comment
Stefan Monnier [Sun, 10 Jul 2022 15:15:27 +0000 (11:15 -0400)]
* src/dired.c (directory_files_internal): Update comment

2 years ago* src/dired.c (directory_files_internal): Fix bug#56469
Stefan Monnier [Sun, 10 Jul 2022 14:13:27 +0000 (10:13 -0400)]
* src/dired.c (directory_files_internal): Fix bug#56469

Avoid concatenating encoded and decoded file names.

2 years agoNew user option browse-url-guess-default-scheme
Stefan Kangas [Sun, 10 Jul 2022 12:30:52 +0000 (14:30 +0200)]
New user option browse-url-guess-default-scheme

* lisp/net/browse-url.el (browse-url-guess-default-scheme): New
user option.
(browse-url-url-at-point): Use above new user option.

2 years ago; Use example.org in an example
Stefan Kangas [Sun, 10 Jul 2022 12:22:40 +0000 (14:22 +0200)]
; Use example.org in an example

* lisp/net/browse-url.el (browse-url-filename-alist): Use example.org
to be more RFC2606 compliant.

2 years ago* doc/misc/tramp.texi (Frequently Asked Questions): Fix formatting.
Michael Albinus [Sun, 10 Jul 2022 12:19:55 +0000 (14:19 +0200)]
* doc/misc/tramp.texi (Frequently Asked Questions): Fix formatting.

2 years agoMinor fixes to WM_DELETE_WINDOW handling
Po Lu [Sun, 10 Jul 2022 12:05:23 +0000 (20:05 +0800)]
Minor fixes to WM_DELETE_WINDOW handling

* src/xterm.c (handle_one_xevent): Only handle WM_DELETE_WINDOW
to toplevel windows, and set event timestamp.

2 years agoMake browse-url.el support for plain "mozilla" obsolete
Stefan Kangas [Sun, 10 Jul 2022 10:15:48 +0000 (12:15 +0200)]
Make browse-url.el support for plain "mozilla" obsolete

* lisp/net/browse-url.el (browse-url-mozilla-program)
(browse-url-mozilla-arguments)
(browse-url-mozilla-startup-arguments)
(browse-url-mozilla-new-window-is-tab, browse-url-mozilla)
(browse-url-mozilla-sentinel): Make obsolete.  (Bug#56464)
(browse-url--browser-defcustom-type, browse-url-default-browser):
Don't refer to above obsolete function 'browse-url-mozilla'.

2 years ago* lisp/net/browse-url.el: Improve commentary.
Stefan Kangas [Sun, 10 Jul 2022 00:24:30 +0000 (02:24 +0200)]
* lisp/net/browse-url.el: Improve commentary.

2 years ago; * test/lisp/dnd-tests.el (dnd-tests-begin-drag-files): Instrument.
Michael Albinus [Sun, 10 Jul 2022 10:42:55 +0000 (12:42 +0200)]
; * test/lisp/dnd-tests.el (dnd-tests-begin-drag-files): Instrument.

2 years ago; * lisp/startup.el (command-line-1): Fix last change.
Eli Zaretskii [Sun, 10 Jul 2022 08:43:45 +0000 (11:43 +0300)]
; * lisp/startup.el (command-line-1): Fix last change.

2 years agoFix the startup.el behavior when 'face-font-rescale-alist' is non-nil
Eli Zaretskii [Sun, 10 Jul 2022 08:32:05 +0000 (11:32 +0300)]
Fix the startup.el behavior when 'face-font-rescale-alist' is non-nil

* lisp/startup.el (command-line-1, normal-top-level): Reset the
default face's font only if 'face-font-rescale-alist' affects that
face's font.  For the use case where it matters, see
https://lists.gnu.org/archive/html/emacs-devel/2022-07/msg00157.html.
Make the 'inhibit-startup-screen' and non-inhibit branches behave
the same in that case.