Commit graph

158101 commits

Author SHA1 Message Date
Stefan Kangas
4c41cef353 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.
2022-07-11 14:29:33 +02:00
Gerd Möllmann
7af425f87b Support for debugging Emacs with LLDB
* (src/.lldbinit): New file.
* (etc/emacs_lldb.py): Module loaded from .lldbinit.
2022-07-11 14:08:05 +02:00
Stefan Kangas
d9732425a6 Don't create unused file rmail-loaddefs.el
* lisp/mail/undigest.el: Remove 'generated-autoload-file' local
variable.  (Bug#56491)
2022-07-11 14:03:25 +02:00
Mattias Engdegård
5990da6290 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.
2022-07-11 13:52:01 +02:00
Stefan Kangas
050252043f 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)
2022-07-11 13:48:48 +02:00
Po Lu
6f57fb71a5 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'.
2022-07-11 19:36:12 +08:00
Lars Ingebrigtsen
2f823ffd28 Fix crm.el compilation warning
* lisp/emacs-lisp/crm.el (crm-default-separator): Move to avoid
compilation warning.
2022-07-11 13:34:35 +02:00
Lars Ingebrigtsen
061de95d59 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).
2022-07-11 13:19:48 +02:00
Visuwesh
215a700751 Make mouse-2 respect delete-selection mode
* lisp/delsel.el: Make the mouse yank commands delete-selection-mode
aware (bug#56421).
2022-07-11 12:58:48 +02:00
Stefan Kangas
ade7a212a8 * lisp/emacs-lisp/package.el (define-package): Make obsolete. 2022-07-11 12:51:00 +02:00
Po Lu
c0ced4e499 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.
2022-07-11 18:48:37 +08:00
Mattias Engdegård
25dd4f169d 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).
2022-07-11 12:29:12 +02:00
Daniel Martín
7ae7a95e80 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.
2022-07-11 18:21:43 +08:00
Lars Ingebrigtsen
bebf39f292 Autoload named-let
* lisp/emacs-lisp/subr-x.el (named-let): Autoload `named-let' for
easier use (bug#56473).
2022-07-11 12:18:04 +02:00
Lars Ingebrigtsen
8ab9102950 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).
2022-07-11 12:15:38 +02:00
Stefan Kangas
693929bf48 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.
2022-07-11 12:10:36 +02:00
Manuel Giraud
d8225e9fa1 ; * 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).
2022-07-11 12:09:13 +02:00
Stefan Kangas
99adfafdfc 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.
2022-07-11 11:31:03 +02:00
Stefan Kangas
da3f3dd091 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.
2022-07-11 11:30:00 +02:00
Mattias Engdegård
69b68099ec 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.
2022-07-11 10:38:49 +02:00
Manuel Giraud
9684687793 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).
2022-07-11 10:23:37 +02:00
Po Lu
d9464d7fe5 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.
2022-07-11 10:07:21 +08:00
Philip Kaludercic
b283e36cf1 * time-date.el (decoded-time-period): Rename TIME in docstring 2022-07-11 01:05:06 +02:00
Michael Albinus
c6f6761545 ; * lisp/emacs-lisp/ert-x.el (tramp-remote-path): Fix last change. 2022-07-10 20:07:37 +02:00
Stefan Kangas
27c3a8b277 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.
2022-07-10 19:42:25 +02:00
Stefan Kangas
29684a7342 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>.
2022-07-10 18:45:50 +02:00
Mattias Engdegård
cfda663282 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.
2022-07-10 18:20:37 +02:00
Michael Albinus
4bab499ed0 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'.
2022-07-10 18:13:50 +02:00
Stefan Kangas
f8de0d5436 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.
2022-07-10 17:17:34 +02:00
Stefan Monnier
d51d72b4a6 * src/dired.c (directory_files_internal): Update comment 2022-07-10 11:15:27 -04:00
Stefan Monnier
46a2e5dc93 * src/dired.c (directory_files_internal): Fix bug#56469
Avoid concatenating encoded and decoded file names.
2022-07-10 10:13:27 -04:00
Stefan Kangas
118e05f570 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.
2022-07-10 15:01:23 +02:00
Stefan Kangas
afaf45d653 ; Use example.org in an example
* lisp/net/browse-url.el (browse-url-filename-alist): Use example.org
to be more RFC2606 compliant.
2022-07-10 14:41:18 +02:00
Michael Albinus
e45411966f * doc/misc/tramp.texi (Frequently Asked Questions): Fix formatting. 2022-07-10 14:19:55 +02:00
Po Lu
a7fff36991 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.
2022-07-10 20:05:31 +08:00
Stefan Kangas
86dc875bf5 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'.
2022-07-10 13:04:01 +02:00
Stefan Kangas
8eb8928337 * lisp/net/browse-url.el: Improve commentary. 2022-07-10 13:04:01 +02:00
Michael Albinus
65a336ce48 ; * test/lisp/dnd-tests.el (dnd-tests-begin-drag-files): Instrument. 2022-07-10 12:42:55 +02:00
Eli Zaretskii
170dcde029 ; * lisp/startup.el (command-line-1): Fix last change. 2022-07-10 11:43:45 +03:00
Eli Zaretskii
aa25a38f2c 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.
2022-07-10 11:32:05 +03:00
Po Lu
84473eb610 ; * src/composite.c (Fcomposition_get_gstring): Fix compiler warnings. 2022-07-10 15:25:00 +08:00
Po Lu
d7120d9766 Fix build with old sqlite libraries
* src/sqlite.c (Fsqlite_open): Don't use SQLITE_OPEN_FULLMUTEX
if not defined.
2022-07-10 15:23:55 +08:00
Eli Zaretskii
8dc4c19be8 Speed up 'find_automatic_composition'
* src/composite.c (find_automatic_composition): Limit search
backward in buffers to the first newline.  Fix commentary.
2022-07-10 09:37:40 +03:00
Po Lu
143548fdd6 Don't sync for errors setting up DND targets and toplevels
* src/xterm.c (xm_setup_dnd_targets, x_dnd_free_toplevels)
(x_dnd_compute_toplevels): Avoid catching errors synchronously.
2022-07-10 13:22:58 +08:00
Stefan Kangas
c8c8bbd855 Merge from origin/emacs-28
115261b323 ; Improve wording of recently-changed doc strings.
2022-07-10 06:30:35 +02:00
Po Lu
932cf200bb Make `x-no-window-manager' cover user time as well
* src/xterm.c (x_update_frame_user_time_window):
(x_wm_supports_1): Respect `x-no-window-manager'.  This makes
testing some features easier.
2022-07-10 10:49:46 +08:00
Glenn Morris
588feeecfd * test/Makefile.in (WRITE_LOG): Always be verbose on hydra.nixos. 2022-07-09 15:12:42 -07:00
Stefan Monnier
ad011fd3ac Make STRING_SET_MULTIBYTE an inline function
* src/lisp.h (STRING_SET_MULTIBYTE): Make it into a function.

* src/composite.c (Fcomposition_get_gstring):
Prefer `make_multibyte_string` over Fconcat+STRING_SET_MULTIBYTE.
2022-07-09 12:53:34 -04:00
Stefan Kangas
16e79eb75f Exclude platform specific browsers from custom type
* lisp/net/browse-url.el (browse-url--browser-defcustom-type):
Don't include platform specific browsers on other platforms.
2022-07-09 18:10:55 +02:00
Stefan Kangas
1383e6de55 * lisp/net/eww.el (eww): Improve docstring. 2022-07-09 17:46:59 +02:00