]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoDelete some compat code for very old Emacs versions
Stefan Kangas [Sat, 14 May 2022 20:33:07 +0000 (22:33 +0200)]
Delete some compat code for very old Emacs versions

* lisp/apropos.el (apropos-local-value):
* lisp/ido.el (ido-buffer-internal):
* lisp/leim/quail/ipa.el (ipa-x-sampa-prepend-to-keymap-entry):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/speedbar.el (speedbar-create-tag-hierarchy): Delete compat code
for very old versions of Emacs.
* lisp/gnus/nnmail.el (nnmail-fancy-expiry-target): Avoid using
obsolete name.

2 years agosrc/lisp.h (FOR_EACH_TAIL_SAFE): Typo
Stefan Monnier [Sat, 14 May 2022 16:46:21 +0000 (12:46 -0400)]
src/lisp.h (FOR_EACH_TAIL_SAFE): Typo

2 years agoMake 'check-declare-directory' more portable
Eli Zaretskii [Sat, 14 May 2022 16:08:55 +0000 (19:08 +0300)]
Make 'check-declare-directory' more portable

* lisp/emacs-lisp/check-declare.el (check-declare-directory): Use
'directory-files-recursively' instead of running Find and Grep in
a subprocess.  (Bug#55386)

2 years agoDrop ancient OEmacs support from vcursor.el
Stefan Kangas [Sat, 14 May 2022 13:47:35 +0000 (15:47 +0200)]
Drop ancient OEmacs support from vcursor.el

* lisp/vcursor.el (vcursor-bind-keys, vcursor-key-bindings)
(vcursor-other-window): Drop OEmacs support.  OEmacs was "a
version of GNU Emacs V19.19" that worked "under plain MSDOS,
Windows, or DESQview/X".

2 years agoRemove Emacs 22 compat code from htmlfontify.el
Stefan Kangas [Fri, 13 May 2022 21:50:43 +0000 (23:50 +0200)]
Remove Emacs 22 compat code from htmlfontify.el

* lisp/htmlfontify.el (hfy-prop-invisible-p): Redefine as obsolete
function alias for invisible-p.  Update all callers.

2 years agoRemove some XEmacs compat code from org-mode
Stefan Kangas [Fri, 13 May 2022 21:44:12 +0000 (23:44 +0200)]
Remove some XEmacs compat code from org-mode

* lisp/org/org-clock.el (org-clock-select-task): Remove XEmacs
compat code.

2 years ago; Fix PGTK declare-function mistakes
Po Lu [Sat, 14 May 2022 13:42:21 +0000 (21:42 +0800)]
; Fix PGTK declare-function mistakes

* lisp/frame.el (pgtk-frame-list-z-order):
(frame-list-z-order):
* lisp/term/pgtk-win.el (pgtk-hide-emacs): Remove extraneous or
incorrect `declare-function's.  Reported by Eli Zaretskii
<eliz@gnu.org>.

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Po Lu [Sat, 14 May 2022 13:35:43 +0000 (21:35 +0800)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoMinor fixes for popup dialogs on macOS
Po Lu [Sat, 14 May 2022 13:35:05 +0000 (21:35 +0800)]
Minor fixes for popup dialogs on macOS

* nsmenu.m (pop_down_menu): Restore old hack for macOS.
([EmacsDialogPanel initWithTitle:isQuestion:]): Set command
title correctly.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 14 May 2022 13:32:38 +0000 (16:32 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; Fix mistakes in 'declare function' forms
Eli Zaretskii [Sat, 14 May 2022 13:19:12 +0000 (16:19 +0300)]
; Fix mistakes in 'declare function' forms

* lisp/progmodes/gdb-mi.el (tooltip-show):
* lisp/vc/vc-git.el (grep-expand-template):
* lisp/cedet/semantic/imenu.el (pulse-momentary-highlight-one-line):
* lisp/mail/feedmail.el (smtpmail-via-smtp):
* lisp/mail/rmail.el (rmail-mime-entity-truncated):
* lisp/mail/rmailsum.el (rmail-cease-edit):
* lisp/progmodes/gud.el (speedbar-toggle-line-expansion)
(speedbar-edit-line):
* lisp/autoinsert.el (sgml-tag):
* lisp/comint.el (url-host, url-type, url-filename):
* lisp/progmodes/elisp-mode.el (xref-make, xref-item-location):
* lisp/vc/vc-hooks.el (vc-responsible-backend):
* lisp/cedet/semantic/complete.el (tooltip-show):
* lisp/doc-view.el (tooltip-show):
* lisp/follow.el (mwheel-scroll):
* lisp/term/pgtk-win.el (pgtk-set-resource):
* lisp/progmodes/cperl-mode.el (Info-find-node):
* lisp/lpr.el (print-region-function):
* lisp/w32-fns.el (w32-version, w32-read-registry):
* lisp/emacs-lisp/checkdoc.el (ispell-correct-p, checkdoc-dired):
* lisp/progmodes/xref.el (apropos-parse-pattern):
* lisp/cus-edit.el (apropos-parse-pattern):
* lisp/obsolete/gs.el (x-change-window-property):
* lisp/x-dnd.el (x-change-window-property):
* lisp/xwidget.el (make-xwidget):
* lisp/transient.el (info, Man-find-section, Man-next-section)
(Man-getpage-in-background):
* lisp/frame.el (x-device-class, pgtk-device-class):
* lisp/textmodes/texinfo.el (flymake--log-1):
* lisp/term/x-win.el (x-internal-focus-input-context): Fix
'declare function' errors uncovered by 'check-declare'.

2 years agoFix processing of dialog box items on NS
Po Lu [Sat, 14 May 2022 13:18:27 +0000 (21:18 +0800)]
Fix processing of dialog box items on NS

* src/nsmenu.m (pop_down_menu): Remove old hack and discard menu
items.
(ns_popup_dialog):
([EmacsDialogPanel initWithContentRect:styleMask:backing:defer:]):
([EmacsDialogPanel windowShouldClose:]):
([EmacsDialogPanel dealloc]):
([EmacsDialogPanel processdialog:]):
([EmacsDialogPanel addButton:value:row:]):
([EmacsDialogPanel addString:row:]):
([EmacsDialogPanel clicked:]):
([EmacsDialogPanel initFromContents:isQuestion:]):
([EmacsDialogPanel timeouthandler:]):
([EmacsDialogPanel runDialogAt:]): Use the regular menu item
machinery to parse dialog items instead of the incorrect ad-hoc
code used previously.

* src/nsterm.h: Update prototypes.

2 years agoAvoid unsafe alloca when looking up toplevels
Po Lu [Sat, 14 May 2022 12:07:27 +0000 (20:07 +0800)]
Avoid unsafe alloca when looking up toplevels

* src/xterm.c (x_dnd_compute_toplevels): Use SAFE_ALLOCA, since
alloca isn't safe when there are lots of toplevels or the window
manager is broken.

2 years agoFix undigest-tests on MS-Windows
Eli Zaretskii [Sat, 14 May 2022 08:30:54 +0000 (11:30 +0300)]
Fix undigest-tests on MS-Windows

* lisp/emacs-lisp/ert-x.el (ert-with-temp-file): Accept a new
keyword argument :coding CODING to use as the encoding when
writing initial text to the temporary file.

* test/lisp/mail/undigest-tests.el (rmail-undigest-test-rfc934-digest)
(rmail-undigest-test-rfc1153-digest-strict)
(rmail-undigest-test-rfc1153-less-strict-digest)
(rmail-undigest-test-rfc1153-sloppy-digest)
(rmail-undigest-test-rfc1521-mime-digest)
(rmail-undigest-test-multipart-mixed-digest): Force the temporary
mbox files to have Unix-style EOL format.

2 years ago; Fix the documentation of compiler-macros and advice
Eli Zaretskii [Sat, 14 May 2022 07:34:50 +0000 (10:34 +0300)]
; Fix the documentation of compiler-macros and advice

* doc/lispref/functions.texi (Advice and Byte Code): Fix typos
and improve wording and indexing.  (Bug#23264)

2 years ago2022-05-14 Martin Rudalics <rudalics@gmx.at>
Martin Rudalics [Sat, 14 May 2022 07:19:57 +0000 (09:19 +0200)]
2022-05-14  Martin Rudalics  <rudalics@gmx.at>

* lisp/window.el (quit-restore-select-window): New function.
(quit-restore-window): Call 'quit-restore-select-window' to avoid
selecting inactive minibuffer window (Bug#55403).

2 years agoTry to restore valuator values when a device is enabled
Po Lu [Sat, 14 May 2022 06:12:39 +0000 (14:12 +0800)]
Try to restore valuator values when a device is enabled

* src/xterm.c (struct xi_known_valuator): New struct.
(xi_populate_device_from_info): Figure out all the values of the
valuators and set the scroll valuators's current_value to it.

2 years agoBetter fix for disappearing menu items on NS
Po Lu [Sat, 14 May 2022 05:50:52 +0000 (13:50 +0800)]
Better fix for disappearing menu items on NS

* src/frame.c (delete_frame): Revert last change.
* src/nsmenu.m (free_frame_menubar): Only free if that frame's
menu bar is actually being displayed.
(ns_update_menubar): Note the last frame to have updated the
menu bar.

2 years agoAdd more cursor bitmaps on Haiku
Po Lu [Sat, 14 May 2022 05:29:49 +0000 (05:29 +0000)]
Add more cursor bitmaps on Haiku

* src/haikufns.c (cursor_bitmaps): Register new cursor bitmaps.
* src/haikugui.h (hand_ptr_bits, hand_ptrmask_bits)
(horizd_ptr_bits, horizd_ptrmask_bits, vertd_ptr_bits)
(vertd_ptrmask_bits, hourglass_bits, hourglass_mask_bits): New
cursor bitmaps.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Sat, 14 May 2022 04:31:37 +0000 (06:31 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

f044da7704 Fix tooltip face overwriting dragged text strings during m...

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 14 May 2022 04:31:34 +0000 (06:31 +0200)]
Merge from origin/emacs-28

a769cbfcfb Fix lexical-binding fallout in vhdl-mode.el

2 years agoWork around deleting tooltip frames clearing menubars on NS
Po Lu [Sat, 14 May 2022 04:16:34 +0000 (12:16 +0800)]
Work around deleting tooltip frames clearing menubars on NS

* src/frame.c (delete_frame): Update menu bars if a tooltip
frame was deleted on NS.

2 years agoImplement non-system tooltips on NS
Po Lu [Sat, 14 May 2022 03:29:43 +0000 (11:29 +0800)]
Implement non-system tooltips on NS

* src/nsfns.m (unwind_create_frame): Return Lisp_Object like on
X.
(do_unwind_create_frame): New function.
(Fx_create_frame): Adjust accordingly.
(compute_tip_xy): Fix coding style.
(unwind_create_tip_frame, ns_create_tip_frame): New functions.
(x_hide_tip, Fx_show_tip, Fx_hide_tip): Create and hide actual
tooltip frames.
(syms_of_nsfns): New defvar `x-max-tooltip-size' and staticpros.

* src/nsterm.m (ns_set_window_size): Clean up coding style.
([EmacsWindow initWithEmacsFrame:]):
([EmacsWindow initWithEmacsFrame:fullscreen:screen:]): Handle
tooltip frames.

2 years agoPut help-fns--compiler-macro last in the *Help* buffer
Lars Ingebrigtsen [Sat, 14 May 2022 02:59:24 +0000 (04:59 +0200)]
Put help-fns--compiler-macro last in the *Help* buffer

* lisp/help-fns.el (help-fns-describe-function-functions): Make
help-fns--compiler-macro the last entry (because it's not the most
interesting information).

2 years agoFix display class of tooltip frames on Haiku
Po Lu [Sat, 14 May 2022 02:38:53 +0000 (02:38 +0000)]
Fix display class of tooltip frames on Haiku

* haikufns.c (haiku_create_tip_frame): Set up frame display
class.
(syms_of_haikufns): New symbols `mono', `grayscale' and `color'.

2 years agoRestore `with-help-window' return code
Lars Ingebrigtsen [Sat, 14 May 2022 02:13:44 +0000 (04:13 +0200)]
Restore `with-help-window' return code

* lisp/help.el (help--window-setup): Return the correct thing.

2 years agoImprove the *Help* output for compiler macros and the like
Lars Ingebrigtsen [Sat, 14 May 2022 02:06:32 +0000 (04:06 +0200)]
Improve the *Help* output for compiler macros and the like

* doc/lispref/functions.texi (Advice and Byte Code): New node.

* lisp/help-fns.el (help-fns--compiler-macro): Also output data on
other byte compilation things, and link to the manual (bug#23264).

2 years agoReenable frame sync for child frames after they're unparented
Po Lu [Sat, 14 May 2022 02:11:22 +0000 (10:11 +0800)]
Reenable frame sync for child frames after they're unparented

* src/xfns.c (x_set_parent_frame, Fx_create_frame): Use correct
boolean constants.
* src/xterm.c (handle_one_xevent): Enable frame synchronization
upon receiving a sync request event.

2 years agoTweak querying in package-update-all
Lars Ingebrigtsen [Sat, 14 May 2022 01:10:46 +0000 (03:10 +0200)]
Tweak querying in package-update-all

* lisp/emacs-lisp/package.el (package-update-all): Reverse the
QUERY logic to make calling more regular.

2 years agoUse ert-with-temp-file in undigest-tests.el
Stefan Kangas [Fri, 13 May 2022 20:53:16 +0000 (22:53 +0200)]
Use ert-with-temp-file in undigest-tests.el

* test/lisp/mail/undigest-tests.el (ert-x): Require.
(rmail-undigest-test-rfc934-digest)
(rmail-undigest-test-rfc1153-digest-strict)
(rmail-undigest-test-rfc1153-less-strict-digest)
(rmail-undigest-test-rfc1153-sloppy-digest)
(rmail-undigest-test-rfc1521-mime-digest)
(rmail-undigest-test-multipart-mixed-digest): Use ert-with-temp-file.

2 years agoDon't use obsolete yow library
Stefan Kangas [Fri, 13 May 2022 20:29:53 +0000 (22:29 +0200)]
Don't use obsolete yow library

* lisp/erc/erc.el (erc-quit-reason-zippy, erc-part-reason-zippy):
Don't use obsolete yow library.

2 years agoRemove some XEmacs compat code from flyspell.el
Stefan Kangas [Fri, 13 May 2022 20:21:35 +0000 (22:21 +0200)]
Remove some XEmacs compat code from flyspell.el

* lisp/textmodes/flyspell.el (flyspell-display-next-corrections):
Remove XEmacs compat code.

2 years agoRemove some XEmacs compat code from org-mode
Stefan Kangas [Fri, 13 May 2022 19:41:16 +0000 (21:41 +0200)]
Remove some XEmacs compat code from org-mode

* lisp/org/ol-eww.el (org-eww-copy-for-org-mode):
* lisp/org/ol-w3m.el (org-w3m-copy-for-org-mode):
* lisp/org/org-refile.el (org-refile):
* lisp/org/org.el (org-change-tag-in-region): Remove XEmacs compat
code.

2 years agoRemove some XEmacs compat code from eudc-bob.el
Stefan Kangas [Fri, 13 May 2022 19:30:05 +0000 (21:30 +0200)]
Remove some XEmacs compat code from eudc-bob.el

* lisp/net/eudc-bob.el (eudc-bob-can-display-inline-images): Make
into obsolete alias for display-graphic-p.  Update all callers.
(eudc-bob-display-jpeg): Remove XEmacs compat code.

2 years agoRegenerate ldefs-boot.el
Lars Ingebrigtsen [Fri, 13 May 2022 19:24:26 +0000 (21:24 +0200)]
Regenerate ldefs-boot.el

2 years agoAdd new minor mode `header-line-indent-mode'
Lars Ingebrigtsen [Fri, 13 May 2022 19:24:12 +0000 (21:24 +0200)]
Add new minor mode `header-line-indent-mode'

This is mostly factored out from tabulated-list.el (with bugs fixed).

* doc/lispref/modes.texi (Header Lines): Document it.
* lisp/display-line-numbers.el (header-line-indent): New variable.
(header-line-indent--line-number-width)
(header-line-indent--watch-line-number-width)
(header-line-indent--window-scroll-function): New helper functions.
(header-line-indent-mode): New minor mode.

* lisp/display-line-numbers.el (header-line-indent-width): New
variable.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-line-number-width)
(tabulated-list-watch-line-number-width)
(tabulated-list-window-scroll-function): Make into obsolete aliases.
(tabulated-list-mode): Use 'header-line-indent-mode'.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
Adjust the header line format and computation.

* src/buffer.c (syms_of_buffer): Mention header-line-indent-mode.

2 years agoRevert mistaken change in help-mode-setup
Lars Ingebrigtsen [Fri, 13 May 2022 17:31:46 +0000 (19:31 +0200)]
Revert mistaken change in help-mode-setup

* lisp/help-mode.el (help-mode-setup): Revert mistakenly applied
change from cd87a5c7a.

2 years agoDon't overwrite variables set by callback in help--window-setup
Lars Ingebrigtsen [Fri, 13 May 2022 15:14:21 +0000 (17:14 +0200)]
Don't overwrite variables set by callback in help--window-setup

* lisp/help.el (help--window-setup): Initialize the buffer in the
correct order to avoid resetting variables set by the callback.

2 years agoDon't clear out local variables in `with-help-window'
Lars Ingebrigtsen [Fri, 13 May 2022 14:58:59 +0000 (16:58 +0200)]
Don't clear out local variables in `with-help-window'

* lisp/help-mode.el (help-mode-setup): Declare obsolete.
(help-mode-finish): Ditto.

* lisp/help.el (with-help-window): Don't be a wrapper around
`with-temp-buffer-window', because that made the macro big and
difficult to understand.
(help--window-setup): Implement the relevant bits from
`with-temp-buffer-window'.  Also don't clear out local variables,
because that makes things like `text-scale-mode' not work (bug#25979).

2 years ago* doc/lispref/help.texi (Keys in Documentation): Typo in last change
Stefan Monnier [Fri, 13 May 2022 14:38:42 +0000 (10:38 -0400)]
* doc/lispref/help.texi (Keys in Documentation): Typo in last change

2 years agoAllow substitute-command-keys to include menus in \{...} output
Lars Ingebrigtsen [Fri, 13 May 2022 13:54:16 +0000 (15:54 +0200)]
Allow substitute-command-keys to include menus in \{...} output

* doc/lispref/help.texi (Keys in Documentation): Document it.
* lisp/help.el (substitute-command-keys): Add an argument to
include menus in the \{...-map} output (bug#24236).

2 years agoInclude the number of dependencies in the install prompt
Lars Ingebrigtsen [Fri, 13 May 2022 13:31:13 +0000 (15:31 +0200)]
Include the number of dependencies in the install prompt

* lisp/emacs-lisp/package.el (package-menu--list-to-prompt): Add
the info to the prompt (bug#23346).
(package--dependencies): New function.

2 years agoAllow calling package-update-all from the command line
Lars Ingebrigtsen [Fri, 13 May 2022 13:04:50 +0000 (15:04 +0200)]
Allow calling package-update-all from the command line

* lisp/emacs-lisp/package.el (package-update-all): Allow calling from
  the command line with -f package-update-all without any queries.

2 years agoFix tooltip face overwriting dragged text strings during mouse DND
Po Lu [Fri, 13 May 2022 12:57:24 +0000 (20:57 +0800)]
Fix tooltip face overwriting dragged text strings during mouse DND

* lisp/mouse.el (mouse-drag-and-drop-region): Copy
`text-tooltip' before showing it.  Do not merge to master.

2 years agoUse gsettings font rendering entries for pgtk builds
Pieter van Prooijen [Sun, 8 May 2022 14:27:38 +0000 (16:27 +0200)]
Use gsettings font rendering entries for pgtk builds

If present, apply the gsettings font hinting and antialiasing
entries when creating a font in cairo.  Do this at
initialization and when the entries change, re-rendering the
frames.

* src/ftcrfont.c (ftcrfont_open): Use the font_options derived
from gsettings when opening a font.
(ftcrfont_cached_font_ok): Report a cached font as invalid if
its font options differ from the current options inside
gsettings.
* src/xsettings.c (apply_gsettings_font_hinting)
(apply_gsettings_font_alias, apply_gsettings_font_rgba_order):
Convert the settings from GSettings to the cairo_font_options_t
object.
(init_gsettings, something_changed_gsettingsCB): Invoke the
apply functions if the relevant settings changed.
(store_font_options_changed): Store an event to re-render the
fonts.
(xsetting_get_font_options)
* src/xsettings.h (xsettings_get_font_options): New function.

2 years ago; Minor improvements to earlier change
Po Lu [Fri, 13 May 2022 12:48:46 +0000 (20:48 +0800)]
; Minor improvements to earlier change

* etc/NEWS:
* lisp/tooltip.el (tooltip-show): Rename `frame-face' to
`default-face' and improve doc about system tooltips.

2 years agoAdd a provide in epa-ks
Lars Ingebrigtsen [Fri, 13 May 2022 12:44:27 +0000 (14:44 +0200)]
Add a provide in epa-ks

* lisp/epa-ks.el (epa-ks): Add a provide (bug#55388).

2 years agoRemove some XEmacs compat code from pascal.el
Stefan Kangas [Fri, 13 May 2022 10:43:15 +0000 (12:43 +0200)]
Remove some XEmacs compat code from pascal.el

* lisp/progmodes/pascal.el (pascal-outline-map): Remove XEmacs compat
code.

2 years ago* lisp/language/thai-util.el (thai-word-mode-map): Prefer defvar-keymap.
Stefan Kangas [Thu, 12 May 2022 13:53:28 +0000 (15:53 +0200)]
* lisp/language/thai-util.el (thai-word-mode-map): Prefer defvar-keymap.

2 years agoFix dabbrev expansion after recent file-name buffer addition
Lars Ingebrigtsen [Fri, 13 May 2022 12:29:48 +0000 (14:29 +0200)]
Fix dabbrev expansion after recent file-name buffer addition

* lisp/dabbrev.el (dabbrev--find-expansion): Remove the now-dead
file name buffer from dabbrev--friend-buffer-list, so that we
don't trip over the killed buffer later (bug introduced in 2d0085f756).

2 years agoMake imenu-flush-cache into a function
Lars Ingebrigtsen [Fri, 13 May 2022 12:07:13 +0000 (14:07 +0200)]
Make imenu-flush-cache into a function

* doc/emacs/programs.texi (Imenu): Remove documentation.

* lisp/imenu.el (imenu-flush-cache): Make into a function, since
this isn't supposed to be used interactively.

2 years agoFix lexical-binding fallout in vhdl-mode.el
Eli Zaretskii [Fri, 13 May 2022 12:00:21 +0000 (15:00 +0300)]
Fix lexical-binding fallout in vhdl-mode.el

* lisp/progmodes/vhdl-mode.el (arch-alist, pack-alist)
(file-alist, unit-alist, rule-alist): Defvar them, since vhdl-aput
expects them to be dynamically bound.  (Bug#55389)
(vhdl-speedbar-insert-hierarchy): Rename the PACK-ALIST argument
to PACKAGE-ALIST, to avoid shadowing the global variable.

2 years agoAllow changing the face used for text and frame colors in tooltips
Po Lu [Fri, 13 May 2022 11:46:43 +0000 (19:46 +0800)]
Allow changing the face used for text and frame colors in tooltips

* etc/NEWS: Announce new arguments to `tooltip-show'.
* lisp/tooltip.el (tooltip-show): Accept new arguments
`text-face' and `frame-face'.  Use them to display text and
determine the foreground, background and border colors of the
tooltip frame respectively.

2 years agoRely solely on device scaling for fonts on PGTK
Po Lu [Fri, 13 May 2022 11:18:17 +0000 (19:18 +0800)]
Rely solely on device scaling for fonts on PGTK

* src/pgtkterm.c (pgtk_get_text_scaling_factor): Delete
function.
(pgtk_term_init): Stop multiplying dpi by text scale.
(bug#55394)

2 years ago; Fix RefTeX docstrings
Arash Esbati [Fri, 13 May 2022 10:18:15 +0000 (12:18 +0200)]
; Fix RefTeX docstrings

* lisp/textmodes/reftex-cite.el (reftex-parse-bibitem)
(reftex-format-bibitem): Quote backslash.

* lisp/textmodes/reftex-vars.el
(reftex-cite-cleanup-optional-args): Fix example with 2 optional
arguments.

2 years agoFix display of image reliefs for tab bars on NS
Po Lu [Fri, 13 May 2022 09:08:09 +0000 (17:08 +0800)]
Fix display of image reliefs for tab bars on NS

* src/nsterm.m (ns_draw_image_relief): New function.
Synchronize code with X.
(ns_dumpglyphs_image): Use that function instead, as on X.

2 years agoMinor cleanups to PGTK code
Po Lu [Fri, 13 May 2022 08:32:10 +0000 (16:32 +0800)]
Minor cleanups to PGTK code

* src/pgtkterm.c (pgtk_text_scaling_factor): Rename to
`pgtk_get_text_scaling_factor', clean up coding style, and fix
leak of GSettings object.
(pgtk_term_init): Clean up coding style and fix scroll
increments.

2 years agoImprove test for empty help-echo on NS menu bar items
Po Lu [Fri, 13 May 2022 08:08:54 +0000 (16:08 +0800)]
Improve test for empty help-echo on NS menu bar items

* src/nsmenu.m ([EmacsMenu menu:willHighlightItem:]): Also check
if idx is valid.

2 years agoDisplay help-echo for popup menus on NS
Po Lu [Fri, 13 May 2022 08:06:40 +0000 (16:06 +0800)]
Display help-echo for popup menus on NS

* src/nsmenu.m ([EmacsMenu menu:willHighlightItem:]): Display
help echo for ordinary popup menus as well.

2 years agoFix extraneous quit events processing GTK native input inside popups
Po Lu [Fri, 13 May 2022 07:30:22 +0000 (15:30 +0800)]
Fix extraneous quit events processing GTK native input inside popups

* src/gtkutil.c (xg_widget_key_press_event_cb): Return
immediately if a popup is active.
* src/xterm.c (x_filter_event): Clear `xg_pending_quit_event' if
a popup is active.

2 years ago; * configure.ac (-Wbidi-chars): Disable use of these warnings.
Eli Zaretskii [Fri, 13 May 2022 07:19:56 +0000 (10:19 +0300)]
; * configure.ac (-Wbidi-chars): Disable use of these warnings.

2 years agoAdd more cursor bitmaps on Haiku
Po Lu [Fri, 13 May 2022 05:34:46 +0000 (05:34 +0000)]
Add more cursor bitmaps on Haiku

* src/haikufns.c (cursor_bitmaps, cursor_bitmaps_for_id):
Register crosshair and xterm cursors.

* src/haikugui.h (cross_ptr_bits, cross_ptrmask_bits)
(ibeam_ptr_bits, ibeam_ptrmask_bits): New cursor bitmaps.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 13 May 2022 04:30:28 +0000 (06:30 +0200)]
Merge from origin/emacs-28

f03c5d81bd Fix ControlPath quoting in Tramp

2 years agoFix disabling frame synchronization on child frames
Po Lu [Fri, 13 May 2022 04:21:32 +0000 (12:21 +0800)]
Fix disabling frame synchronization on child frames

* src/xfns.c (Fx_create_frame): Disable GTK 3's own frame
synchronization on child frames, since the CM doesn't send
synchronization events to them.

2 years agoAllow setting cursor colors for custom cursors on Haiku
Po Lu [Fri, 13 May 2022 04:03:36 +0000 (04:03 +0000)]
Allow setting cursor colors for custom cursors on Haiku

* src/haikufns.c: (struct user_cursor_bitmap_info):
(cursor_bitmaps): Fix hotspot for left arrow pointer.
(cursor_bitmaps_for_id): New array.
(haiku_set_mouse_color): If a color was specified, consult
`cursor_bitmaps_for_id' for user-specified cursors.

2 years agoAllow actually setting cursor colors on Haiku
Po Lu [Fri, 13 May 2022 03:14:26 +0000 (03:14 +0000)]
Allow actually setting cursor colors on Haiku

* src/haiku_support.cc (be_create_pixmap_cursor): New function.
* src/haiku_support.h: Update prototypes.

* src/haikufns.c (haiku_create_frame): Change default cursor
color to "font-color".
(haiku_create_tip_frame): Likewise.

(struct user_cursor_bitmap_info): New struct.
(cursor_bitmaps): New list of bitmaps corresponding to cursors.
(haiku_create_colored_cursor): New function.
(haiku_free_custom_cursors): Set current cursor to the default
cursor before freeing the original value.
(haiku_set_mouse_color): Actually recolor cursors based on
built-in bitmaps.

* src/haikuterm.c (haiku_defined_color): Clean up coding style.

2 years agoFix quitting during drag-and-drop when GTK native input is on
Po Lu [Fri, 13 May 2022 01:15:42 +0000 (09:15 +0800)]
Fix quitting during drag-and-drop when GTK native input is on

* src/xterm.c (x_dnd_begin_drag_and_drop): Also look in
`xg_pending_quit_event' when GTK native input is on.

2 years agoUpdate from gnulib
Paul Eggert [Fri, 13 May 2022 00:19:35 +0000 (17:19 -0700)]
Update from gnulib

2 years agoPacify GCC 12 in default developer build
Paul Eggert [Fri, 13 May 2022 00:01:10 +0000 (17:01 -0700)]
Pacify GCC 12 in default developer build

This lets ‘./configure; make’ work on Fedora 36 x86-64 from a Git
checkout without generating false-alarm warnings.
* lib-src/etags.c (main): There appeared to be false alarm with
GCC 12.  However, the code was wrong anyway, as it mishandled file
names containing "'" so fix that bug.  This pacifies GCC.
(mercury_decl): Omit tests ‘s + pos != NULL’ that were apparently
intended to be ‘s[pos] != '\0'’ but which were miscoded to always
be true and which were mostly not needed anyway.  In one place,
though, a test was needed, so fix that by using strchr instead.
* src/alloc.c (lisp_free) [!GC_MALLOC_CHECK]:
* src/term.c (Fsuspend_tty): Don’t look at a pointer after freeing
it, even just to test it for equality with some other pointer, as
this has undefined behavior in C and GCC 12 diagnoses this.
* src/dbusbind.c (xd_read_message_1): Rework the code a bit
so that it has fewer tests.  This pacifies GCC 12 which was
complaining incorrectly about dereferencing a null pointer.
* src/intervals.c (copy_properties): Remove an eassume that should
no longer be needed even to pacify older GCCs, due to ...
* src/intervals.h (split_interval_left): ... this addition of
ATTRIBUTE_RETURNS_NONNULL to pacify a GCC 12 warning about
dereferencing a null pointer.
* src/regex-emacs.c (EXTEND_BUFFER): Use negative values rather
than auxiliary booleans to indicate null pointers.  This pacifies
GCC 12 false alarms about using uninitialized variables.
* src/xdisp.c (clear_position): New function.
(append_space_for_newline, extend_face_to_end_of_line):
Use it to work around false alarms from GCC 12.
(display_and_set_cursor): Add an UNINIT to pacify GCC 12.
* src/xterm.c (x_draw_glyphless_glyph_string_foreground):
Defend against hypothetical bad code elsewhere;
this also pacifies GCC 12.
(x_term_init): Use fixed-size auto array rather than alloca,
as the array is small; this also pacifies GCC 12.

2 years ago; Improve doc string of 'sh-indent-statement-after-and'
Eli Zaretskii [Thu, 12 May 2022 16:58:39 +0000 (19:58 +0300)]
; Improve doc string of 'sh-indent-statement-after-and'

* lisp/progmodes/sh-script.el (sh-indent-statement-after-and):
Clarify the doc string.  (Bug#22645)

2 years agoAdd new user option 'sh-indent-statement-after-and'
Lars Ingebrigtsen [Thu, 12 May 2022 16:16:43 +0000 (18:16 +0200)]
Add new user option 'sh-indent-statement-after-and'

* lisp/progmodes/sh-script.el (sh-indent-statement-after-and): New
user option (bug#22645).
(sh-smie-sh-rules): Use it.

2 years agoFix ControlPath quoting in Tramp
Michael Albinus [Thu, 12 May 2022 13:46:20 +0000 (15:46 +0200)]
Fix ControlPath quoting in Tramp

* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Adapt docstring.  Do not quote ControlPath.  Reported by Daniel
Kessler <kesslerd@umich.edu>.

2 years agoRemove unused RIF method
Po Lu [Thu, 12 May 2022 13:08:26 +0000 (13:08 +0000)]
Remove unused RIF method

* src/haikuterm.c (haiku_update_window_end): Delete function.
(haiku_redisplay_interface): Remove RIF method.

2 years agoMake prompt read-only in inferior-scheme-mode
Lars Ingebrigtsen [Thu, 12 May 2022 12:15:12 +0000 (14:15 +0200)]
Make prompt read-only in inferior-scheme-mode

* lisp/cmuscheme.el (inferior-scheme-mode): Make the prompt
read-only to be more consistent with other inferior modes
(bug#21118).

2 years agoFix retrieving images that contain ) characters in shr
Lars Ingebrigtsen [Thu, 12 May 2022 12:07:29 +0000 (14:07 +0200)]
Fix retrieving images that contain ) characters in shr

* lisp/net/shr.el (shr-save-contents, shr-get-image-data): Don't call.
(shr-encode-url): Make obsolete.  (This function makes no sense.)
(shr-tag-img): Don't call.

2 years agoImprove url-http debugging
Lars Ingebrigtsen [Thu, 12 May 2022 11:11:45 +0000 (13:11 +0200)]
Improve url-http debugging

* lisp/url/url-http.el (url-http-parse-headers): Output the
headers we receive in the debug output.
* lisp/url/url-vars.el (url-extensions-header): Remove useless header.

2 years ago; lisp/textmodes/reftex-cite.el: Fix docstring
Arash Esbati [Thu, 12 May 2022 10:52:00 +0000 (12:52 +0200)]
; lisp/textmodes/reftex-cite.el: Fix docstring

* lisp/textmodes/reftex-cite.el
(reftex-extract-bib-entries-from-thebibliography): Quote
backslash in docstring.

2 years agoFix build on Mac OS X 10.11
Po Lu [Thu, 12 May 2022 09:21:39 +0000 (17:21 +0800)]
Fix build on Mac OS X 10.11

* src/nsterm.h (NSButtonTypeMomentaryPushIn): New define.

2 years ago* lisp/array.el (array-mode-map): Prefer defvar-keymap.
Stefan Kangas [Thu, 12 May 2022 09:07:51 +0000 (11:07 +0200)]
* lisp/array.el (array-mode-map): Prefer defvar-keymap.

2 years agoFix searching the bitmap file path on Haiku
Po Lu [Thu, 12 May 2022 07:39:11 +0000 (07:39 +0000)]
Fix searching the bitmap file path on Haiku

* src/image.c (image_create_bitmap_from_file): [HAVE_HAIKU]:
Look for the bitmap inside `x-bitmap-file-path' as well.

2 years ago; * src/bytecode.c (exec_byte_code): Fix white space.
Stefan Kangas [Thu, 12 May 2022 07:32:10 +0000 (09:32 +0200)]
; * src/bytecode.c (exec_byte_code): Fix white space.

2 years agoImprove Tramp's write-region
Michael Albinus [Thu, 12 May 2022 07:03:45 +0000 (09:03 +0200)]
Improve Tramp's write-region

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Use `tramp-handle-write-region'.
(tramp-sudoedit-handle-write-region): Remove.

* lisp/net/tramp.el (tramp-skeleton-write-region):
Set extended attributes.

2 years agoFix merging of anonymous faces with an `:extend' property on unexec
Po Lu [Thu, 12 May 2022 06:55:41 +0000 (14:55 +0800)]
Fix merging of anonymous faces with an `:extend' property on unexec

* src/emacs.c (main): Unconditionally call `init_xfaces'.
* src/lisp.h: Enable `init_xfaces' on unexec builds too.
* src/xfaces.c (init_xfaces): Move fix for bug#34226 into
pdumper-specific section leaving the initialization of
`face_attr_sym' intact.

2 years agoImprove mouse dragging
Po Lu [Thu, 12 May 2022 05:31:08 +0000 (13:31 +0800)]
Improve mouse dragging

* lisp/mouse.el (mouse-drag-and-drop-region-display-tooltip):
Respect foreground and background parameters.
(mouse-drag-and-drop-region): Enable fine grained tracking.

2 years ago; Improve documentation of 'restore-buffer-modified-p'
Eli Zaretskii [Thu, 12 May 2022 06:47:25 +0000 (09:47 +0300)]
; Improve documentation of 'restore-buffer-modified-p'

* src/buffer.c (Frestore_buffer_modified_p):
* doc/lispref/buffers.texi (Buffer Modification): Fix doc wording.

2 years ago; Improve documentation of 'switch-to-prev-buffer-skip-regexp'
Eli Zaretskii [Thu, 12 May 2022 06:29:53 +0000 (09:29 +0300)]
; Improve documentation of 'switch-to-prev-buffer-skip-regexp'

* lisp/window.el (switch-to-prev-buffer-skip-regexp):
* etc/NEWS:
* doc/lispref/windows.texi (Window History): Improve wording of
the documentation of 'switch-to-prev-buffer-skip-regexp'.
(Bug#19070)

2 years ago; Improve documentation of 'imenu-flush-cache'
Eli Zaretskii [Thu, 12 May 2022 06:16:24 +0000 (09:16 +0300)]
; Improve documentation of 'imenu-flush-cache'

* etc/NEWS: Expand the description of 'imenu-flush-cache'.

* doc/emacs/programs.texi (Imenu): Document 'imenu-flush-cache'.

* lisp/imenu.el (imenu-flush-cache): Doc fix.  (Bug#20589)

2 years agoMake cursor display on Haiku consistent with X
Po Lu [Thu, 12 May 2022 04:11:12 +0000 (04:11 +0000)]
Make cursor display on Haiku consistent with X

* src/haikuterm.c (haiku_draw_image_glyph_string): Merge cursor
foregrounds correctly.
(haiku_draw_hollow_cursor, haiku_draw_bar_cursor): New
functions.  Port code from X.
(haiku_draw_window_cursor): Port code from X so bar cursors on
top of images are treated right.

2 years agoFix cperl-file-style defcustom type
Lars Ingebrigtsen [Thu, 12 May 2022 02:44:47 +0000 (04:44 +0200)]
Fix cperl-file-style defcustom type

* lisp/progmodes/cperl-mode.el (cperl-file-style): Fix the type.

2 years agoClean up Haiku display opening code
Po Lu [Thu, 12 May 2022 02:29:15 +0000 (02:29 +0000)]
Clean up Haiku display opening code

* src/haikufns.c (Fx_open_connection):
(Fhaiku_frame_list_z_order): Improve error messages and fix
coding style.

2 years agoAdd new command 'imenu-flush-cache'
Lars Ingebrigtsen [Thu, 12 May 2022 02:24:32 +0000 (04:24 +0200)]
Add new command 'imenu-flush-cache'

* lisp/imenu.el (imenu-flush-cache): New command (bug#20589).

2 years agoNew command 'package-update-all'
Lars Ingebrigtsen [Thu, 12 May 2022 01:59:16 +0000 (03:59 +0200)]
New command 'package-update-all'

* lisp/emacs-lisp/package.el (package-update-all): New function
(bug#19146).
(package--updateable-packages): Factored out...
(package-update): ... from here.

2 years agoPort some stuff to XCB to avoid confusing Xlib behavior
Po Lu [Thu, 12 May 2022 01:36:43 +0000 (09:36 +0800)]
Port some stuff to XCB to avoid confusing Xlib behavior

* src/xterm.c (x_set_frame_alpha, handle_one_xevent): Port
retrieving the opacity property to XCB.

2 years agoAdd new user option switch-to-prev-buffer-skip-regexp
Lars Ingebrigtsen [Thu, 12 May 2022 01:35:21 +0000 (03:35 +0200)]
Add new user option switch-to-prev-buffer-skip-regexp

* doc/lispref/windows.texi (Window History): Document it.
* lisp/window.el (switch-to-prev-buffer-skip): Mention it.
(switch-to-prev-buffer-skip-regexp): New user option (bug#19070).
(switch-to-prev-buffer-skip-p): Use it.

2 years agoBind TAB in indent-rigidly-map as a convenience
Lars Ingebrigtsen [Thu, 12 May 2022 01:09:22 +0000 (03:09 +0200)]
Bind TAB in indent-rigidly-map as a convenience

* lisp/indent.el (indent-rigidly): Mention it.
(indent-rigidly-map): Bind TAB so that `C-x TAB TAB...' does the
logical thing.

2 years agoOnly handle SelectionRequest events from the DND display during DND
Po Lu [Thu, 12 May 2022 01:07:59 +0000 (09:07 +0800)]
Only handle SelectionRequest events from the DND display during DND

* src/xterm.c (handle_one_xevent): Handle only SelectionRequest
events from the DND frame's display via hold_quit.

2 years agoMake message load eudc-capf more lazily
Lars Ingebrigtsen [Thu, 12 May 2022 00:54:24 +0000 (02:54 +0200)]
Make message load eudc-capf more lazily

* lisp/gnus/message.el (eudc-capf): Remove require, because all
the relevant eudc-capf functions are autoloaded, apparently.

2 years agoMake anchored regexps work in image-dired-mark-tagged-files
Lars Ingebrigtsen [Thu, 12 May 2022 00:51:53 +0000 (02:51 +0200)]
Make anchored regexps work in image-dired-mark-tagged-files

* lisp/image-dired.el (image-dired-mark-tagged-files): Make
anchored regexps work (bug#55375).

2 years agoFix non-variable widgets in the 'H' command in Cus-mode
Lars Ingebrigtsen [Thu, 12 May 2022 00:27:22 +0000 (02:27 +0200)]
Fix non-variable widgets in the 'H' command in Cus-mode

* lisp/cus-edit.el (custom-mode-map):
(custom-commands): Adjust.
(custom-toggle-hide-all-widgets): Rename and work for all widget
types, not just variables.

2 years agoAdjust restore-buffer-modified-p autosaved logic
Lars Ingebrigtsen [Thu, 12 May 2022 00:16:38 +0000 (02:16 +0200)]
Adjust restore-buffer-modified-p autosaved logic

* doc/lispref/buffers.texi (Buffer Modification): Adjust
documentation.

* src/buffer.c (Frestore_buffer_modified_p): Fix up the logic
around `autosaved': It means "the buffer is modified, and also
autosaved".