Commit graph

83629 commits

Author SHA1 Message Date
Juri Linkov
1b83e58adb * lisp/frame.el: Don't require 'frameset.el' (bug#51883).
(clone-frame): Use frame-internal-parameters.
(undelete-frame--handle-delete-frame): Instead of using frameset-save,
save frame-parameters except frame-internal-parameters and 'display'
on non-graphic display.  Also save window-state from window-state-get.
(undelete-frame): Instead of using frameset-restore,
set default-frame-alist for make-frame (like in clone-frame),
and restore window-state with window-state-put.

* lisp/frameset.el (frameset-session-filter-alist): Append
parameters from frame-internal-parameters with the filter :never.
Remove :name that is now in frame-internal-parameters.
(frameset-persistent-filter-alist): Remove outer-window-id,
parent-id, window-id that are now in frame-internal-parameters,
included here via frameset-session-filter-alist.

* src/frame.c (frame-internal-parameters): New variable.
2022-01-30 18:40:09 +02:00
Stefan Kangas
f4ddd6153d Merge from origin/emacs-28
e81e375539 ; Yet another minor fix of Malayalam composition rules.
94f38cbec4 Fix last change of Malayalam composition rules
ed3bbeb80d Fix rendering of Malayalam script
5ef3a52342 Improve documentation of Occur mode
2022-01-30 06:31:11 +01:00
Stefan Monnier
35cd9197fc package.el: Fix bug#53529
* lisp/emacs-lisp/package.el (package-autoload-ensure-default-file):
Enforce Unix EOLs.
2022-01-29 17:51:06 -05:00
Eli Zaretskii
e81e375539 ; Yet another minor fix of Malayalam composition rules. 2022-01-29 22:14:30 +02:00
Eli Zaretskii
94f38cbec4 Fix last change of Malayalam composition rules
* lisp/language/indian.el (malayalam-composable-pattern):
Reinstate.  Instead of removing it, add any sequence of
Malayalam characters to the existing patterns, so as not
to lose the patterns that use ZWJ and ZWNJ.  (Bug#53625)
2022-01-29 21:56:53 +02:00
Eli Zaretskii
ed3bbeb80d Fix rendering of Malayalam script
* lisp/language/indian.el (malayalam-composable-pattern): Remove.
(script-regexp-alist): Remove 'malayalam-composable-pattern'.
Instead, pass any sequence of Malayalam codepoints to the shaping
engine.  (Bug#53625)
2022-01-29 21:22:02 +02:00
Juri Linkov
96533c18b7 * lisp/tab-bar.el (tab-bar-menu-bar-button): New variable (bug#51648).
(tab-bar-format-menu-bar): Use it.
2022-01-29 21:05:55 +02:00
Juri Linkov
e241e77194 * lisp/isearch.el: Put 'isearch-scroll' property on two new symbols.
Put 'isearch-scroll' property on new commands 'recenter-other-window'
and 'context-menu-open'.
2022-01-29 20:55:17 +02:00
Eli Zaretskii
4320eebb4a ; * lisp/subr.el (use-dialog-box-p): Fix typo. 2022-01-29 19:18:26 +02:00
Eli Zaretskii
bddd9c5f68 ; Fix formatting of last change. 2022-01-29 17:56:30 +02:00
Eli Zaretskii
f7b408ec50 Don't require mouse for prompting via dialog boxes
* lisp/subr.el (use-dialog-box-p): Don't require mouse support,
and allow dialog boxes when invoked via the TTY menus without a
mouse.
(from--tty-menu-p): New internal variable.

* lisp/menu-bar.el (popup-menu): Bind 'from--tty-menu-p' when
invoking a command from the menu.
2022-01-29 17:54:43 +02:00
Charles A. Roelli
a836e8bf0c Make revert-buffer ('g') keep point in VC diff buffers
* lisp/vc/vc.el (vc-diff-restore-buffer): New function.
(vc-diff-finish): Update its calling convention to include an
optional 'oldbuf' parameter, and handle it.
(vc-diff-internal): Pass a clone of the incumbent vc-diff
buffer to 'vc-diff-finish' (bug#28852).
2022-01-29 16:47:52 +01:00
Jae-hyeon Park
852a5f24bb Make gnus-icalendar-with-decoded-handle more DWIM
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-with-decoded-handle): Assume that calendars with
no charset is utf-8.

Copyright-paperwork-exempt: yes
2022-01-29 15:44:44 +01:00
Po Lu
a85e9d7641 Fix error at startup with recent change
* lisp/startup.el (normal-top-level): Don't access
`native-comp-eln-load-path' if not (featurep 'native-compile).
2022-01-29 19:08:52 +08:00
Po Lu
e380fb509b Fix unrelated help text tooltips if a popup is shown during the delay
* doc/lispref/frames.texi (Pop-Up Menus): Document new hook.
* etc/NEWS: Announce `x-pre-popup-menu-hook'.
* lisp/tooltip.el (tooltip-mode): Make sure `tooltip-hide' is
run before any popup menu is displayed to prevent unrelated help
text from obscuring the popup menu if it pops up during the
tooltip delay.
* src/menu.c (x_popup_menu_1): Run said hook right before the
popup menu is displayed.
(syms_of_menu): New hook `x-pre-popup-menu-hook'.
2022-01-29 18:57:08 +08:00
Eli Zaretskii
0a5ece3da1 Allow <Delete> key to delete entire grapheme clusters
* lisp/simple.el (delete-forward-char): If deleting forward,
delete complete grapheme clusters as single units.

* etc/NEWS: Announce the change.
2022-01-29 12:19:23 +02:00
Eli Zaretskii
a773d7f05b Fix native-compilation at startup
* lisp/startup.el (normal-top-level): Set up the initial value of
'native-comp-eln-load-path' early into startup, then amend it
after calling 'command-line'.  (Bug#53497)
2022-01-29 11:55:02 +02:00
Po Lu
7e17749ada Fix a default value of the `:underline' face attribute
* lisp/cus-face.el (custom-face-attributes): Add `:position' t
default value of "On" for underlines.
2022-01-29 14:05:49 +08:00
Po Lu
95ccd1ba47 Implement real menu help-echo text on Haiku
* lisp/tooltip.el (tooltip-show-help): Remove Haiku-specific
conditional since that's now taken care of by C code.

* src/haiku_io.c (haiku_read_size):
(haiku_read_with_timeout):
(haiku_write_without_signal): Add parameter `popup_p'.  All
callers changed.
(port_popup_menu_to_emacs): New variable.

* src/haiku_support.cc (struct be_popup_menu_data): New
structure.
(be_popup_menu_thread_entry): New function.
(class EmacsMenuItem): New field `menu_ptr'.
(Highlight): Send help text to the popup port if this item
isn't for a menu bar.
(BMenu_add_item): Set menu_ptr appropriately.
(BMenu_run): Complete rewrite that allows to read help text from
the menu bar port.

* src/haiku_support.h (struct haiku_menu_bar_help_event): New
fields for popup menus.

* src/haikumenu.c (digest_menu_items): Only set help tooltip on
popup menus when system tooltips are enabled.
(haiku_menu_show_help):
(haiku_process_pending_signals_for_menu): New functions.
(haiku_menu_show): Pass new callbacks.
2022-01-29 05:11:04 +00:00
Stefan Monnier
7531bf096e Reduce code duplication in parts of (auto)load&defalias
* src/data.c (defalias): New function, extracted from `Fdefalias`.
(Fdefalias): Use it.
(Ffset): Don't handle `Vautoload_queue` here, handle it in
`defalias` instead.
* src/comp.c (comp--register-subr): Use `defalias` instead of
duplicating its code.

* src/eval.c (load_with_autoload_queue): New function, extracted from
`Fautoload_do_load`.
(Fautoload_do_load): Use it.
(un_autoload): Mark it as static.
* src/fns.c (Frequire): Use it as well.

* src/lisp.h (defalias, load_with_autoload_queue): New declarations.
(un_autoload): Remove declaration.
2022-01-28 13:19:11 -05:00
Sebastian Urban
1f5fa1de7f Make where-is correctly identify aliases
* lisp/help.el (where-is): Make aliases correctly say which
function is an alias for what (bug#37325).
2022-01-28 17:27:28 +01:00
Lars Ingebrigtsen
fdc7272980 Improve the read-file-name doc string slightly
* lisp/minibuffer.el (read-file-name): Note that the semantics of
INITIAL are odd (bug#37883).
2022-01-28 17:03:14 +01:00
Michael Albinus
87c2367011 Clarify where the shell-command output goes
* lisp/simple.el (shell-command):
* doc/emacs/misc.texi (Single Shell): Clarify where the output
goes if the specified buffer isn't the current one (bug#40896).
2022-01-28 16:32:15 +01:00
Lars Ingebrigtsen
12d3c4831a Allow using dired-hide-details-mode in wdired buffers
* lisp/dired.el (dired-hide-details-mode): Also work in
wdired-mode buffers (bug#45127).

* lisp/wdired.el (wdired-mode-map): Add a key binding.
2022-01-28 15:56:05 +01:00
Lars Ingebrigtsen
bf695b937e Move native-comp-eln-load-path setting earlier again
* lisp/startup.el (normal-top-level): Move
`native-comp-eln-load-path' earlier because hooks called may need
the setting (bug#53596).
2022-01-28 15:26:39 +01:00
Lele Gaifax
70c3437ae1 Fix copyright-fix-years, use a dash to separate years in a range
Commit 7a46fa9c75, allowing en-dash as
years separator, changed the way the years range is composed taking the
separator from the `sep' variable instead of always using an hardwired
hyphen. Since the code explicitly avoid to touch (that is, extend)
existing ranges, that `sep' variable is almost always a space, or
whatever character precedes the last parsed year, thus generating a
range like "2020 2022" instead of "2020-2022".

* lisp/emacs-lisp/copyright.el (copyright-fix-years): Always use an dash
to separate years in a range.

* test/lisp/emacs-lisp/copyright-tests.el (with-copyright-fix-years-test):
(copyright-fix-years-tests--data):
(text-copyright-fix-years): New test cases (bug#53597).
2022-01-28 15:23:05 +01:00
Lars Ingebrigtsen
7ba197a163 Fix merge error in doc-view-pdf/ps->png
* lisp/doc-view.el (doc-view-pdf/ps->png): Fix merge error from
previous epub patch.
2022-01-28 14:47:15 +01:00
Eli Zaretskii
b293e254eb ; Rename 'startup--require-comp-safetly'
* src/comp.c (maybe_defer_native_compilation):
* lisp/startup.el (startup--require-comp-safely): Rename from
'startup--require-comp-safetly'.  All callers changed.
2022-01-28 09:37:28 +02:00
Stefan Kangas
9d0833f408 Merge from origin/emacs-28
3dd47bde7a * lisp/frame.el (clone-frame): Filter out 'parent-id' (bug...
2022-01-28 06:32:22 +01:00
Lars Ingebrigtsen
8eaf04de83 Add new switch --init-directory
* doc/emacs/cmdargs.texi (Initial Options): Mention it.
* lisp/startup.el (normal-top-level): Move the eln init to after
we've processed the command line arguments.
(command-line): Interpret the --init-directory switch.

* src/emacs.c (standard_args): Add.
2022-01-27 23:38:13 +01:00
Glenn Morris
53ebc1fa21 * lisp/doc-view.el (doc-view-epub-font-size): Fix type; add version.
Flagged by test-custom-opts.
2022-01-27 14:21:55 -08:00
Andrea Corallo
536a57b72c Fix potential native compiler circular dependencies during load
* lisp/startup.el (startup--require-comp-safetly): New function.
(startup--honor-delayed-native-compilations): Make use of
`startup--require-comp-safetly'.
* src/comp.c (CALL0I): New define.
(maybe_defer_native_compilation): Make use of
`startup--require-comp-safetly'.
2022-01-27 23:02:31 +01:00
Lars Ingebrigtsen
ce220524fc Fix up previous "Quit Emacs" from menu logic
* lisp/files.el (files--buffers-needing-to-be-saved): Separated
out into its own function...
(save-some-buffers): ... from here.
(save-buffers-kill-emacs): Check that we have anything to save
before prompting the user.
2022-01-27 22:26:12 +01:00
Lars Ingebrigtsen
b8ddd94aac Make the save buffers prompt from Quit Emacs menu more understandable
* lisp/files.el (save-buffers-kill-emacs): Use a much simpler (and
more understandable) prompt when exiting Emacs from the menu bar
(bug#4980).

* lisp/subr.el (use-dialog-box-p): Separate out into its own
function for reuse...
(y-or-n-p): ... from here.
2022-01-27 19:56:29 +01:00
Juri Linkov
3dd47bde7a * lisp/frame.el (clone-frame): Filter out 'parent-id' (bug#51883). 2022-01-27 19:47:40 +02:00
Arni Magnusson
61f5ca3b27 Add setx highlighting to bat-mode
* lisp/progmodes/bat-mode.el (bat-font-lock-keywords):
(bat-font-lock-keywords): Highlight setx (bug#53568).
2022-01-27 17:12:11 +01:00
Lars Ingebrigtsen
77b4e06f8a Move some of the doc-view variables around to fix load errors 2022-01-27 17:10:13 +01:00
Daniel Nicolai
d633db5189 Add support for EPUB, CBZ, FB2 and (O)XPS extension to doc view
* doc/emacs/misc.texi (Document View): Add requirements for new
extensions (i.e. mutool).

* lisp/doc-view.el (doc-view): Additionally update preliminary comment
(doc-view-custom-set-epub-font-size): redraw image after setting
(doc-view-unoconv-program): Put code all on one line
(doc-view-doc-type): Update docstring.
(doc-view-kill-proc): Fix comment indentation
(doc-view-mode-p):
Add check for new extensions and alternative check for PDF
(doc-view-pdf/ps->png): Associate new extension with png converter
(doc-view-convert-current-doc): Handle new extensions like PDF's
(doc-view-set-doc-type): Set correct doc-type for new extensions.

* lisp/files.el (auto-mode-alist):
Associate new extension types with doc-view.
2022-01-27 17:03:38 +01:00
Lars Ingebrigtsen
b9239954b6 Tweak href/superscript fix in tex-mode
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1): Fix
superscripts in href in a better way.
2022-01-27 16:30:12 +01:00
Andrea Corallo
d0aac84b2a * Fix `startup--honor-delayed-native-compilations' for (bug#53497)
* lisp/startup.el (startup--honor-delayed-native-compilations): Don't
forget to set `comp--loadable' when `comp--delayed-sources' is empty.
2022-01-27 11:55:35 +01:00
Andrea Corallo
60cfb90d01 * Have `benchmark-run-compiled' use the native compiler when available
* lisp/emacs-lisp/benchmark.el (benchmark-run-compiled): Use native
compiler when available.
2022-01-27 11:55:21 +01:00
Stefan Kangas
a8862f313b Merge from origin/emacs-28
c9524819ea Partially revert a fill-region-as-paragraph regression
6075ea0b79 Fix 'make_lispy_position' when there's an image at EOB

# Conflicts:
#	test/lisp/textmodes/fill-tests.el
2022-01-27 09:45:49 +01:00
Po Lu
333e95196f * lisp/xwidget.el (xwidget-webkit-edit-mode-map): Pass C-backspace. 2022-01-27 14:07:08 +08:00
Stefan Kangas
8f9f1701f6 Don't discourage auto-mode-alist entries in autoloads
* lisp/files.el (auto-mode-alist, interpreter-mode-alist): Delete
comment discouraging entries in autoload directives.  (Bug#8158)
2022-01-27 03:57:45 +01:00
Lars Ingebrigtsen
0a51a85b5d Make smerge-refine-ignore-whitespace into defcustom
* lisp/vc/smerge-mode.el (smerge-refine-ignore-whitespace): Make
into defcustom (bug#12585).
2022-01-26 18:57:29 +01:00
Lars Ingebrigtsen
c9524819ea Partially revert a fill-region-as-paragraph regression
* lisp/textmodes/fill.el (fill-region-as-paragraph): Revert
e186af261 (bug#53537), because it leads to regressions.  (But
leave tests in place.)
2022-01-26 16:20:05 +01:00
Lars Ingebrigtsen
c5b0019e10 Fix copyright-find-copyright when searching from the end
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make
the double check also work when searching from the end (bug#7179).

Do not merge to master.
2022-01-26 15:03:56 +01:00
Lars Ingebrigtsen
ed18d08f6f Fix copyright.el comment and add a test
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).

Do not merge to master.
2022-01-26 15:03:33 +01:00
Lars Ingebrigtsen
826959ccb4 Fix copyright-find-copyright when searching from the end
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make
the double check also work when searching from the end (bug#7179).
2022-01-26 15:02:00 +01:00
Lars Ingebrigtsen
8a343ecee5 Fix copyright.el comment and add a test
* lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix
comment (bug#7179).
2022-01-26 14:53:07 +01:00