Stefan Kangas [Fri, 5 Aug 2022 18:17:23 +0000 (20:17 +0200)]
Allow newline after def*-form for definition-prefix
* lisp/emacs-lisp/loaddefs-gen.el (autoload-ignored-definitions):
Add another semantic function.
(loaddefs-generate--compute-prefixes): Allow newline after the "(def*"
form. (Bug#57000)
Stefan Monnier [Fri, 5 Aug 2022 14:38:59 +0000 (10:38 -0400)]
timer.el: Avoid repeated timers
https://mail.gnu.org/archive/html/emacs-devel/2022-07/msg01127.html
points out that end-users can get bitten by this, accidentally
calling `timer-activate` on an already activated timer.
* lisp/emacs-lisp/timer.el (timer--activate): Signal an error if we try
to re-add a timer that's already on the timer-list.
Eli Zaretskii [Fri, 5 Aug 2022 12:53:06 +0000 (15:53 +0300)]
Avoid assertion violations in 'back_to_previous_visible_line_start'
* src/xdisp.c (init_iterator): Always initialize narrowed_begv to
zero, since SET_WITH_NARROWED_BEGV depends on it being non-zero as
an indication that long-line optimizations are in use.
(back_to_previous_visible_line_start): When long-line
optimizations are in effect, we may end up not on a newline.
Stefan Monnier [Fri, 5 Aug 2022 12:18:04 +0000 (08:18 -0400)]
bytecomp.el: Further simplifications enabled by commit 59732a83c8875c
* lisp/emacs-lisp/bytecomp.el (byte-compile-output-docform): Don't
insert a \n before the #@ docstrings since make-docfile doesn't scan
.elc files any more.
Make loaddefs.el dependencies more explicit in src/Makefile.in
* src/Makefile.in (LC_ALL): Add loaddefs.el as a dependency, too,
since that file may be deleted, but the loaddefs.elc file still
exists. This causes problems in nativecomp builds.
Stefan Kangas [Fri, 5 Aug 2022 10:55:28 +0000 (12:55 +0200)]
Fix namespace problems in viper.el
* lisp/emulation/viper.el
(viper-this-major-mode-requires-vi-state): Rename from
'this-major-mode-requires-vi-state'. Retain old name as an
obsolete alias.
(viper-set-state-in-major-mode): Rename from
'set-viper-state-in-major-mode'. Retain old name as an obsolete
alias.
Stefan Kangas [Fri, 5 Aug 2022 10:49:38 +0000 (12:49 +0200)]
Fix namespace problems in xscheme.el
* lisp/progmodes/xscheme.el (xscheme-default-runlight): Rename
from 'default-xscheme-runlight'. Retain old name as an obsolete
alias.
(xscheme-verify-buffer): Rename from 'verify-xscheme-buffer'.
Retain old name as an obsolete alias.
Stefan Kangas [Fri, 5 Aug 2022 10:28:59 +0000 (12:28 +0200)]
Fix namespace problem in saveplace.el
* lisp/saveplace.el (save-place-load-alist-from-file): Rename from
'load-save-place-alist-from-file'. Retain old name as an obsolete
alias. Update callers.
Po Lu [Fri, 5 Aug 2022 08:12:07 +0000 (16:12 +0800)]
Improve C-x C-q in emacs-news-mode
* lisp/textmodes/emacs-news-mode.el (emacs-news-mode-map)
(emacs-news-view-mode-map): Make C-x C-q switch to the
appropriate mode for editing, and vice versa.
(emacs-news-mode): Disable button-mode and make buffer
read-write.
Po Lu [Fri, 5 Aug 2022 05:21:29 +0000 (13:21 +0800)]
Improve multi-pointer X support
* etc/TODO: Document that MPX support still needs work.
* src/xterm.c (xi_handle_interaction): New function.
(handle_one_xevent): Call it in the appropriate places.
Po Lu [Fri, 5 Aug 2022 02:18:18 +0000 (10:18 +0800)]
Improve input extension focus handling with multiple master devices
* src/xterm.c (x_cache_xi_devices): Initialize device fields to
0.
(xi_handle_focus_change, xi_focus_handle_for_device)
(xi_handle_delete_frame): New functions; store focus information
per-device instead.
(x_detect_focus_change): Handle GenericEvents that way instead.
(handle_one_xevent): Don't cache XI devices on DeviceChanged.
(x_free_frame_resources): Clear any frame focus information.
* src/xterm.h (struct xi_device_t): New fields for focus
tracking. Add comments describing fields.
Stefan Kangas [Thu, 4 Aug 2022 20:58:59 +0000 (22:58 +0200)]
Be more lax when picking up prefixes for loaddefs
* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--compute-prefixes): Allow tabs and spaces before
symbol name, so that "(defvar\tfoo-bar nil)" is properly picked up.
Before this change, such a definition would be wrongly picked up as
the symbol "nil".
* lisp/auth-source.el (auth-source-netrc-parse-all): New function
(bug#56976).
(auth-source-netrc-parse): Partially revert behaviour in previous
change -- require :allow-null to match.
* lisp/emacs-lisp/loaddefs-gen.el (no-update-autoloads): Moved
here from autoload.el.
* lisp/emacs-lisp/loaddefs-gen.el: Removed now that it's no longer
used.
* lisp/emacs-lisp/package.el
(package-autoload-ensure-default-file): Don't warn about
soon-to-be obsolete functon.
Clean up nntp-send-authinfo after removing obsolete variable
* lisp/gnus/nntp.el (netrc-parse, netrc-machine, netrc-get):
Remove declarations.
(nntp-send-authinfo): Now that `nntp-authinfo-file' is removed,
don't parse the .authinfo file twice, but just rely on the
auth-source functions (bug#56972).
Stefan Kangas [Thu, 4 Aug 2022 12:37:17 +0000 (14:37 +0200)]
Fix namespace problem in meta-mode.el
* lisp/progmodes/meta-mode.el
(meta-font-lock-match-declaration-item-and-skip-to-next): Rename
from 'font-lock-match-meta-declaration-item-and-skip-to-next'.
Retain old name as an obsolete alias.
Stefan Kangas [Thu, 4 Aug 2022 10:14:10 +0000 (12:14 +0200)]
Fix namespace problem in dired-aux.el
* lisp/dired-aux.el (dired-minibuffer-default-add-shell-commands):
Rename from 'minibuffer-default-add-dired-shell-commands'. Retain
old name as an obsolete alias.
Michael Albinus [Thu, 4 Aug 2022 09:59:18 +0000 (11:59 +0200)]
Fix Tramp test
* test/lisp/net/tramp-tests.el (tramp-test48-unload):
Ignore autoload functions in `tramp-file-name' structure tests,
since `tramp-file-name-handler' is also autoloaded.
* src/composite.c (composition_compute_stop_pos): Use an 'endpos' that
is not too far away.
(find_automatic_composition): Use a 'head' that is not too far away.
Also make sure that this code path is not taken when long line
optimizations are disabled.
* src/dispextern.h (struct composition_it): Add a field that points
to the parent iterator.
Po Lu [Thu, 4 Aug 2022 07:52:03 +0000 (15:52 +0800)]
Fix about:protocols in EWW
* lisp/net/eww.el (eww--dwim-expand-url): Handle `about: ' URLs.
(bug#56885)
* lisp/url/url-about.el (url-about): Return correct content type
for HTML data.
* lisp/url/url-http.el (url-http--get-referer): Refrain from
looking for a referrer if the lastloc had no host.
* configure.ac (HAVE_XSYNC): Also check for XSyncTriggerFence.
* src/xfns.c (Fx_create_frame): Create fences.
* src/xterm.c (x_atom_refs): New atom.
(x_sync_trigger_fence, x_sync_init_fences, x_sync_free_fences):
New functions.
(x_sync_update_finish): Trigger the appropriate fence.
(x_free_frame_resources): Free fences.
* src/xterm.h (struct x_display_info): New atom
`_NET_WM_SYNC_FENCES'.
(struct x_output): New field `sync_fences'.
* doc/lispref/loading.texi (Autoload): We're no longer using
make-docfile for loaddefs.el, but we're retaining the format.
Adjust the documentation.
* lisp/loadup.el: Adjust commentary.
* src/lread.c (read_string_literal): Since we're now
byte-compiling the loaddefs files (so doc strings come from the
.elc files), remove the hack that make this return 0 when the
string starts with "\\n".