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).
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.
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.
* 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).
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).
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.
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).
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.
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.
* 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.
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.
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.
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.
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.
* 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.
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.
* lisp/emacs-lisp/package.el (package-update-all): New function
(bug#19146).
(package--updateable-packages): Factored out...
(package-update): ... from here.
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.
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.
* lisp/apropos.el (apropos-user-option): Include buttons in the
output always (bug#55376).
(apropos-print-doc): Don't insert three spaces in the
non-apropos-multi-type case.
Tino Calancha [Wed, 11 May 2022 16:01:11 +0000 (18:01 +0200)]
char-uppercase-p: New predicate
Return non-nil if its argument is an uppercase character.
Suggested in Bug#54804.
* lisp/subr.el (char-uppercase-p): New defun.
* etc/NEWS (Lisp Changes in Emacs 29.1): Announce it
* doc/lispref/display.texi (Size of Displayed Text): Document it.
* test/lisp/subr-tests.el (test-char-uppercase-p): Add a test.
* doc/emacs/maintaining.texi (VC Directory Commands): Document it.
* lisp/vc/vc-dir.el (vc-dir-mode-map): Bind it to `%'.
(vc-dir-mark-by-regexp): New command (bug#16460).
* src/haiku_support.cc (BCursor_from_id): Accept int instead of
enum.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (haiku_create_frame): Stop manually assigning
cursors and set default value of the mouse color property.
(haiku_free_frame_resources): Free custom cursors too.
(struct user_cursor_info, INIT_USER_CURSOR): New struct.
(haiku_free_custom_cursors): New function.
(haiku_set_mouse_color): New param handler.
(haiku_frame_parm_handlers): Add param handler.
(syms_of_haikufns): New cursor shape variables from X.