1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-27 07:30:59 -08:00
Commit graph

169440 commits

Author SHA1 Message Date
Stefan Monnier
eb6708f0ac (c-initialize-cc-mode): Be slightly more explicit
* lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Don't depend on
the fact that `post-text-conversion-hook` is "local only".
2023-10-27 21:17:38 -04:00
Stefan Monnier
81510f2fff (provided-mode-derived-p): Fix alias case
The new handling of aliases in `provided-mode-derived-p`
introduced in Emacs-28.1 caused a regression where
(provided-mode-derived-p MODE MODE) returns nil if MODE is an alias.
Rework the loop so we consider an alias as a kind of parent.

* lisp/subr.el (provided-mode-derived-p): Step over aliases separately.

* test/lisp/subr-tests.el (subr-tests--derived-mode-1)
(subr-tests--derived-mode-2): Move out of `provided-mode-derived-p`
and give them properly namespaced names.
(provided-mode-derived-p): Add more tests for aliases.
2023-10-27 20:18:54 -04:00
F. Jason Park
9acd8c8e53 Tidy up ERC's internal text-property API
* lisp/erc/erc-fill.el (erc-fill--spaced-commands): Remove unused
internal variable originally intended for ERC 5.6.
(erc-fill): Check for `erc-msg' being `msg', which carries the same
meaning as `erc-cmd' being `PRIVMSG' or `NOTICE', except that inserted
outgoing messages now no longer normally have an `erc-cmd' property.
(erc-fill-wrap-mode, erc-fill-wrap-disable): Kill
`erc-fill--wrap-last-msg'.
(erc-fill--wrap-max-lull): Convert from buffer-local to normal
variable.
(erc-fill--wrap-continued-message-p): Rework slightly to guard against
resetting the "last speaker" marker when the `erc-ephemeral' text
property is present.  This tells insert- and send-related hook members
to pretend the current message doesn't exist when performing stateful
operations.  That is, modules should expect the message being inserted
to possibly disappear or be replaced.  Also, look for `erc-msg' being
`msg' instead of `erc-cmd' being `PRIVMSG', and fix bug involving only
checking `erc-ctcp' in the current message.
* lisp/erc/erc-stamp.el (erc-add-timestamp): Don't insert timestamps
when the `erc-ephemeral' text property is present.
* lisp/erc/erc.el (erc--msg-props): Add doc string explaining the
purpose of this variable and the various text properties most commonly
present in its value.
(erc--msg-prop-overrides): Add doc string.
(erc-send-action): Don't set `erc-cmd' prop on outgoing CTCP ACTIONs.
(erc-display-message): Reverse overrides to prefer items toward the
front of the alist.
(erc-process-ctcp-query): Include existing overrides from environs.
(erc-send-current-line): Include existing overrides from environs.
(erc-display-msg): Fix doc string and reverse overrides.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--insert-privmsg):
Remove stray comment.
(erc-fill-tests--save-p): Set value from environment variable.
(erc-fill-tests--compare): Limit writing snapshots to one test at a
time.
(erc-fill-wrap--merge-action): Fix expected output for non-action
messages that follow action messages.  These were previously merged
but escaped detection.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Update.
(Bug#60936)
2023-10-27 13:09:29 -07:00
F. Jason Park
5c4a9b7303 Use marker for max pos in erc--traverse-inserted
* lisp/erc/erc-stamp.el (erc-stamp--propertize-left-date-stamp): Run
`erc-stamp--insert-date-hook' separately here instead of via
`erc-insert-modify-hook'.
(erc-stamp--insert-date-stamp-as-phony-message): Don't include value
of `erc-stamp--insert-date-hook' in let-bound `erc-insert-modify-hook'
because its members can run twice if buffer-local.  Remove
`erc-send-modify-hook' because it only runs via `erc-display-msg'.
Shadow "pre" and "done" hooks because they don't expect to run in a
narrowed buffer.  Call getter for `erc-stamp--current-time'.
(erc-stamp--lr-date-on-pre-modify,
erc-insert-timestamp-left-and-right): Use function form of
`erc-stamp--current-time' for determining current time stamp.
* lisp/erc/erc.el (erc--get-inserted-msg-bounds): Fix off-by-one like
thinko.
(erc--traverse-inserted): Create temporary marker when END is a buffer
position so that insertions and deletions are accounted for in
the terminating condition.
(erc--delete-inserted-message): New function.
* test/lisp/erc/erc-tests.el (erc--delete-inserted-message): New test.
(erc--update-modules/unknown): Improve readability slightly.
* test/lisp/erc/resources/erc-d/erc-d-t.el (erc-d-t-make-expecter):
Indicate assertion flavor in error message.  (Bug#60936)
2023-10-27 13:09:13 -07:00
F. Jason Park
a4ba236e56 Ignore date stamps completely in erc-track
* etc/ERC-NEWS: Mention that date stamps no longer optionally affect
the mode line.  Also mention but discourage new variable
'erc-stamp-prepend-date-stamps-p'.
* lisp/erc/erc-stamp.el (erc-stamp-prepend-date-stamps-p): New
variable, an escape hatch to allow date stamps to once again be
prepended to messages.
(erc-insert-timestamp-left-and-right): Don't insert stamps as
independent messages when legacy support flag
`erc-stamp-prepend-date-stamps-p' is non-nil.
* lisp/erc/erc-track.el (erc-track--skipped-msgs): New internal
variable.
(erc-track-modified-channels): In previous versions, a date stamp
attached to a message for an IRC command in `erc-track-exclude-types'
would have no effect on the mode line.  That they were able to
otherwise was probably a bug.  Regardless, this distinction was lost
for the worse after date stamps became independent messages with
c68dc7786f "Manage some text props for ERC insertion-hook members".
To sidestep this regression, the `track' module will ignore date
stamps completely from now on.  Thanks to Corwin Brust for spotting
this.
* test/lisp/erc/erc-scenarios-stamp.el
(erc-scenarios-stamp--left/display-margin-mode): Remove redundant
binding.
(erc-scenarios-stamp--legacy-date-stamps): New test.  (Bug#60936)
2023-10-27 13:08:44 -07:00
F. Jason Park
a491a3d835 ; * lisp/erc/erc.el (erc-after-connect): Remove package-version. 2023-10-27 13:08:44 -07:00
F. Jason Park
e9205323e1 Be slightly more aggressive with erc-scrolltobottom-all
* lisp/erc/erc-goodies.el (erc--scrolltobottom-on-post-command):
Redo obsolete doc string.
(erc--scrolltobottom-at-prompt-minibuffer-active,
erc--scrolltobottom-on-win-conf-change): Rename former to latter to
better reflect actual role.  Remove conditional guard so it always
runs.
(erc--scrolltobottom-setup): Set `scroll-step' locally when a user
hasn't customized `scroll-conservatively'.  Update
`window-configuration-change-hook' member name.  (Bug#64855)
2023-10-27 13:08:44 -07:00
Eli Zaretskii
c59c8db98a ; Another fix for profiler.c
* src/profiler.c: Reshuffle functions and declarations to compile
also when PROFILER_CPU_SUPPORT is not defined.  (Bug#66774)
2023-10-27 20:47:01 +03:00
Eli Zaretskii
ee848be84c Fix compilation error in profiler.c
* src/profiler.c (memory): Declare outside of the
PROFILER_CPU_SUPPORT conditional.  (Bug#66774)
2023-10-27 18:26:27 +03:00
Michael Albinus
28c2191df0 * lisp/net/tramp.el (tramp-read-id-output): Identifiers can contain "-". 2023-10-27 15:18:36 +02:00
Eli Zaretskii
d81c59612f ; Fix style of error messages in pdumper.c
* src/pdumper.c (dump_buffer, dump_do_dump_relocation)
(dump_native_comp_unit): Make the style of error messages more
consistent.
2023-10-27 15:37:34 +03:00
Ihor Radchenko
8c9e544501 * src/pdumper.c (dump_buffer): Print message when aborting (bug#66743)
When the buffer contains overlays, it cannot be dumped.  Print a
clear message describing the reason, instead of just aborting.
2023-10-27 15:26:27 +03:00
Po Lu
bbd4385a63 Substitute eassert for assert throughout Android code
* src/android.c (android_init_emacs_service)
(android_init_emacs_pixmap, android_init_graphics_point)
(android_init_emacs_drawable, android_init_emacs_window)
(android_init_emacs_cursor, android_destroy_handle)
(android_create_window, android_init_android_rect_class)
(android_init_emacs_gc_class, android_begin_query):

* src/androidselect.c (android_init_emacs_clipboard)
(android_init_emacs_desktop_notification):

* src/androidterm.c (getExtractedText)
(android_get_surrounding_text_internal):

* src/androidvfs.c (android_vfs_init): Replace assert with
eassert.
2023-10-27 18:44:15 +08:00
Po Lu
fe2761cf3e Mention additional return values for framep et al
* doc/lispref/frames.texi (Frames, Multiple Terminals): Don't
omit mentions of Android or Haiku.
2023-10-27 11:17:47 +08:00
Po Lu
4a4677aa32 Correct order of arguments to dnd-handle-multiple-urls
* lisp/term/android-win.el (android-handle-dnd-event): Pass
new-uri-list before action.
2023-10-27 08:25:43 +08:00
Stefan Kangas
194a8f5c14 Fix browse-url-default-scheme custom :type
* lisp/net/browse-url.el (browse-url-default-scheme): Fix custom
:type.
2023-10-27 00:02:22 +02:00
Harald Jörg
967ee6a70c ; cperl-mode.el: Remove a duplicate defvar
* lisp/progmodes/cperl-mode.el (imenu-max-items): Remove duplicate
defvar.
2023-10-26 21:55:31 +02:00
Stefan Kangas
2ec90ac8ff Remove highlighting trailing whitespace from cperl-mode
* lisp/progmodes/cperl-mode.el (cperl-invalid-face): Make
obsolete in favor of 'show-trailing-whitespace'.
(cperl-init-faces): No longer highlight trailing whitespace
separately.
(cperl-praise, cperl-tips-faces): Update documentation for above
change.
2023-10-26 21:09:06 +02:00
Stefan Kangas
3d72fb13a8 ; Update item numbering in cperl-praise
* lisp/progmodes/cperl-mode.el (cperl-praise): Remove retired item and
update numbering.
2023-10-26 20:55:44 +02:00
Stefan Kangas
f0157616cf Remove link to Perl info documentation
* lisp/info-look.el: Remove link to Perl info documentation.  It is no
longer distributed with Perl, nor is it available from CPAN.
2023-10-26 20:54:24 +02:00
Michael Albinus
ff791f6b00 * doc/misc/tramp.texi (Traces and Profiles): Fix indentation. 2023-10-26 15:55:15 +02:00
João Távora
309823ff77 Flymake: protect against problematic invalid diagnostics
If a backend reports a diagnostic which is out of bounds, it still
lives in flymake--state and will still be cleaned up in the next run
of flymake--publish-diagnostics.  But if flymake--highlight-line
doesn't give it an overlay (which it didn't until now), things will
break afterwards.

See bug#66759 and https://github.com/joaotavora/eglot/discussions/1311

* lisp/progmodes/flymake.el (flymake--highlight-line): Set
flymake--diag-overlay earlier.
(Version): Bump to 1.3.7.
2023-10-26 14:21:04 +01:00
Po Lu
7c668eb75b Properly respond to drops observing the Motif protocol
* lisp/pgtk-dnd.el (pgtk-dnd-handle-file-name):

* lisp/x-dnd.el (x-dnd-handle-file-name): Correct order of
arguments to d-h-m-u.
2023-10-26 19:49:40 +08:00
Po Lu
6ad14b658f Correct typos in the manuals
* doc/misc/tramp.texi (Traces and Profiles): Don't mimic
@enumerate with @indentedblock, which is absent from Texinfo
4.13.

* doc/misc/use-package.texi (Global keybindings): Remove stray
comma after @xref.
2023-10-26 19:46:32 +08:00
Po Lu
11f44ec6dd Enable DND handlers to receive more than one URI at a time
* doc/lispref/frames.texi (Drag and Drop): Illustrate the effect
of the dnd-multiple-handler property and how convergent handlers
are reconciled.

* etc/NEWS (Lisp Changes in Emacs 30.1): Announce this change.

* lisp/dnd.el (dnd-protocol-alist): Bring doc string up to date.
(dnd-handle-one-url): Obsolete this function.
(dnd-handle-multiple-urls): New function.

* lisp/pgtk-dnd.el (pgtk-dnd-handle-uri-list)
(pgtk-dnd-handle-file-name):

* lisp/term/android-win.el (android-handle-dnd-event):

* lisp/term/haiku-win.el (haiku-drag-and-drop):

* lisp/term/ns-win.el (ns-drag-n-drop):

* lisp/term/w32-win.el (w32-handle-dropped-file):

* lisp/x-dnd.el (x-dnd-handle-uri-list, x-dnd-handle-file-name):
Reimplement in terms of `dnd-handle-multiple-uris'.

* lisp/term/pgtk-win.el (pgtk-drag-n-drop)
(pgtk-drag-n-drop-other-frame, pgtk-drag-n-drop-as-text): Efface
detritus that remained after the removal of the old PGTK drag
and drop implementation.

* test/lisp/dnd-tests.el (ert-x, dnd-tests-list-1)
(dnd-tests-list-2, dnd-tests-list-3, dnd-tests-list-4)
(dnd-tests-local-file-function, dnd-tests-remote-file-function)
(dnd-tests-http-scheme-function, dnd-tests-browse-url-handler)
(dnd-tests-receive-multiple-urls): New tests.
2023-10-26 11:38:18 +00:00
Harald Jörg
b62ad00981 cperl-mode.el: Make commands and options for Perl info pages obsolete.
The Perl documentation in info format is no longer distributed with Perl,
nor is it available from CPAN.   Point to cperl-perldoc instead.

* lisp/progmodes/cperl-mode.el (cperl-info-page): Make obsolete.
(cperl-tips): Remove outdated instructions to get Perl info
sources from the docstring.
(cperl-praise): Remove advertising the info interface in the
docstring.
(cperl-mode-map): Replace bindings to `cperl-info-on-command' and
`cperl-info-on-current-command' by `cperl-perldoc'.
(cperl-menu): Remove menu entries pointing to the Perl info page.
(cperl-mode): Remove explanation of the Perl info commands from
the docstring.
(cperl-info-on-command, cperl-info-on-current-command),
(cperl-imenu-info-imenu-search, cperl-imenu-on-info): Declare the
commands obsolete.

* etc/NEWS: Describe the obsoletion of Perl info commands.
2023-10-26 12:06:12 +02:00
Po Lu
fda07b56d9 Revise selection documentation
* doc/lispref/frames.texi (Window System Selections):
(X Selections):

* lisp/select.el (selection-coding-system): Correct
misunderstandings about the nature of selection-coding-system
under X.
2023-10-26 04:50:19 +00:00
Po Lu
cfa3887e2d Mollify byte compiler in builds without SQLite
* lisp/sqlite-mode.el (sqlite-open): New declare-function.
2023-10-26 02:52:23 +00:00
Wilhelm H Kirschbaum
2c72eecbaa Simplify sigil font-lock match for elixir-ts-mode
There is no need to match on specific sigils, except for regex.

* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--font-lock-settings): Update sigil match (bug#64275).
2023-10-26 03:26:23 +03:00
Dmitry Gutov
70e25298f1 Tweak the DOI URL and the description
* lisp/emacs-lisp/smie.el: Use a friendlier (HTTPS) DOI URL.  And
fix the year in the description.
2023-10-26 02:39:12 +03:00
Stefan Kangas
3d2d941576 Support HTTPS links in newsticker extra elements
* lisp/net/newst-reader.el (newsticker--do-print-extra-element):
Support HTTPS links.
2023-10-25 23:26:37 +02:00
Stefan Kangas
01242dda77 ; Fix webjump test after recent change
* test/lisp/net/webjump-tests.el (webjump-tests-url-fix): Adjust
test after recent change to prefer HTTPS.
2023-10-25 23:26:33 +02:00
Stefan Kangas
a73e662def ; Fix two broken links 2023-10-25 23:25:00 +02:00
Michael Albinus
beb0a7e1a7 * doc/misc/tramp.texi (Traces and Profiles): Fix indentation. 2023-10-25 19:25:53 +02:00
Stefan Kangas
ce9d1d3f4d Support HTTPS in ido-file-internal
* lisp/ido.el (ido-file-internal): Support HTTPS.
2023-10-25 16:27:08 +02:00
Stefan Kangas
aa79a5fc0f Support HTTPS URLs in newsticker-add-url
* lisp/net/newst-backend.el (newsticker-add-url): Support HTTPS.
2023-10-25 16:27:08 +02:00
john muhl
e76eaecbde Improve imenu support in lua-ts-mode
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Include require
statements and remove anonymous entries.
(lua-ts--named-function-p, lua-ts--require-name-function)
(lua-ts--require-p): New functions.
* lisp/speedbar.el (speedbar-supported-extension-expressions):
Add Lua to the list of supported file types.  (Bug#66465)
2023-10-25 16:49:31 +03:00
Spencer Baugh
1d60139a80 Add toggle-window-dedicated command and mode-line-window-dedicated
It's sometimes useful to interactively make certain windows dedicated.
This allows a level of interactive control over which window
display-buffer uses.

Additionally, when a window is dedicated (even without this new
command) it can affect display-buffer behavior in ways which may be
unexpected for users.  Let's display the window dedicated status in
the mode-line to help indicate what's going on.

* doc/emacs/windows.texi (Displaying Buffers): Add information about
dedicated windows and toggle-window-dedicated.
* doc/emacs/screen.texi (Mode Line): Add information about the window
dedicated indicator.
* etc/NEWS: Announce mode-line-window-dedicated and
toggle-window-dedicated.
* lisp/window.el (toggle-window-dedicated): Add.  (bug#64619)
(window-prefix-map): Add C-x w d binding.
* lisp/bindings.el (mode-line-window-control): Add.
(mode-line-window-dedicated): Add.
(standard-mode-line-format): Insert mode-line-window-dedicated.
2023-10-25 16:43:51 +03:00
Ulrich Müller
74330c0b96 ; Fix spelling of my name in all ChangeLog files 2023-10-25 15:20:46 +02:00
dalanicolai
95d56b92a6 Fix 'locate-dominating-file' when FILE is not a directory.
* lisp/files.el (locate-dominating-file): Handle FILE that is not
a directory.  (Bug#66542)
2023-10-25 16:12:24 +03:00
Jens Schmidt
8d2a04f4c0 Better handle errors when writing r-o files without backup
* lisp/files.el (basic-save-buffer-2): Restore file permissions when
writing read-only files without backup fails.  (Bug#66546)
2023-10-25 15:56:39 +03:00
Stefan Kangas
90474045c0 Add HTTPS to mh-access-types
* lisp/mh-e/mh-mime.el (mh-access-types): Add HTTPS.
2023-10-25 14:23:59 +02:00
Stefan Kangas
0ce068c298 Respect browse-url-default-scheme on Haiku
* lisp/net/browse-url.el (browse-url-default-haiku-browser): Respect
'browse-url-default-scheme', which currently defaults to "http".
2023-10-25 12:49:19 +02:00
Stefan Kangas
8fef7150d6 Prefer HTTPS in `M-x webjump´
* lisp/net/webjump.el (webjump-url-fix): Prefer HTTPS to HTTP.
(webjump-sites): Document the above change.
(webjump-sample-sites): Change some links to HTTP only.
2023-10-25 12:30:07 +02:00
Stefan Kangas
5e451b8b30 Silence makeinfo 7.1 warnings in Tramp manual
* doc/misc/tramp.texi: Fix makinfo warning "@indent is useless inside
of a paragraph".
2023-10-25 12:27:09 +02:00
Stefan Kangas
71c366ba02 Reduce code duplication in webjump
* lisp/net/webjump.el (webjump): Simplify.
2023-10-25 12:27:01 +02:00
Mattias Engdegård
e3da8edf5e LLDB support: cope with inserted text being write-protected
* lisp/progmodes/gud.el (gud-lldb-marker-filter):
Force deletion of the part of the buffer being moved back into
filtering again (bug#66738).
2023-10-25 12:14:57 +02:00
Po Lu
b36e2b1772 Documentation copy-edits
* doc/emacs/input.texi (Touchscreens):

* doc/lispref/frames.texi (Other Selections): Insubstantial
copy-edits and improvements to word choice.
2023-10-25 10:28:54 +08:00
Po Lu
eff1313c6b Correct computation of intermediate axis coordinates
* src/sfnt.c (sfnt_compute_tuple_scale, sfnt_vary_simple_glyph)
(sfnt_vary_compound_glyph): Correct typos involving
intermediate_end (or something of the like) being set to
intermediate_start.
2023-10-25 10:19:36 +08:00
Stefan Kangas
643c67cf23 Prefer HTTPS to HTTP in ffap
* lisp/ffap.el (ffap-fixup-machine): Prefer HTTPS to HTTP for things
looking like URIs (for example www.example.org).
2023-10-24 22:40:12 +02:00