Juri Linkov [Sun, 12 Dec 2021 17:48:40 +0000 (19:48 +0200)]
* lisp/startup.el: Let-bind browse-url-browser-function instead of setq-local
* lisp/startup.el (fancy-startup-text, fancy-about-text)
(fancy-splash-head, normal-about-screen): Let-bind browse-url-browser-function
to eww-browse-url around functions that use browse-url.
(fancy-startup-screen, fancy-about-screen): Don't set buffer-local
browse-url-browser-function.
https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg00939.html
Po Lu [Sun, 12 Dec 2021 13:33:56 +0000 (21:33 +0800)]
Fix overline display over stretch glyphs with box on NS
* src/nsterm.m (ns_dumpglyphs_stretch): Don't draw text
decorations when there is a box.
(ns_draw_glyph_string): Draw text decorations after the box
in stretch glyph that have one.
* lib-src/etags.c (TEX_decode_env): Fix off-by-one parsing of
TEXTAGS environment variable (bug#52438). Based on a patch by
David Fussner <dfussner@googlemail.com> and amended by Andreas
Schwab <schwab@linux-m68k.org>.
Make sqlite-mode-list-tables work on older sqlite versions
* lisp/sqlite-mode.el (sqlite-mode-list-tables): Use sqlite_master
instead of sqlite_schema, since the former name is the historical
name and is available in all sqlite3 versions:
https://sqlite.org/schematab.html
Po Lu [Sun, 12 Dec 2021 01:17:00 +0000 (01:17 +0000)]
Fix drawing overlines on top of stretch glyphs when there is a box
* src/haikuterm.c (haiku_draw_string_box): Also draw text
decorations if the clipping is to be set.
(haiku_draw_glyph_string): Only draw text decorations if
the box will not be drawn with clipping.
* lisp/emacs-lisp/byte-opt.el (byte-optimize--substitutable-p):
Treat (internal-get-closed-var N) as constants for propagation
purposes, because that is effectively what such forms will be compiled
to. This allows for the elimination of some lexical variables.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test case.
* lisp/gnus/gnus-sum.el (gnus-thread-header):
Replace lovingly hand-crafted assembler code with plain Lisp.
With lexical binding the difference is unlikely to be detectable.
Eli Zaretskii [Sat, 11 Dec 2021 18:15:53 +0000 (20:15 +0200)]
Fix hang when deleting a pipe process
* src/w32.h (FILE_DONT_CLOSE): New flag.
* src/w32.c (sys_close): Don't close descriptors used to read from
the pipe process. Leave the FILE_DONT_CLOSE flag set in the
descriptor's info.
(register_aux_fd): Set the FILE_DONT_CLOSE flag in the
descriptor's info.
* src/w32proc.c (reader_thread): When exiting normally, close the
file descriptor used to read from a pipe process. (Bug#52414)
Po Lu [Fri, 10 Dec 2021 13:36:59 +0000 (21:36 +0800)]
Fix the DJGPP port
* config.bat:
* msdos/sed1v2.inp:
* msdos/sed2v2.inp:
* msdos/sed3v2.inp:
* msdos/sedlibmk.inp: Update for Emacs 28.
* msdos/langinfo.h: New file.
* lisp/loadup.el: Use correct path to temacs when dumping on
MS-DOS.
* src/callproc.c (environ) [MSDOS]: New declaration.
(child_setup, emacs_spawn): Update MS-DOS parts for Emacs 28.
* src/fileio.c (Fcopy_file): Don't use copy_file_range on
MS-DOS.
* src/msdos.c (initialize_msdos_display): Add
`defined_color_hook'.
(openat, fchmodat, futimens, utimensat): New functions.
* src/msdos.h (FRAME_X_DISPLAY): New macro.
* src/process.c: Make some more things conditional on
subprocess support.
(PIPECONN_P, PIPECONN1_P) [!subprocesses]: New placeholder
macros.
(Fnum_processors): Return 1 on MSDOS.
(open_channel_for_module): Avoid subprocess specific code
on MSDOS.
* src/xterm.c (handle_one_xevent) <GenericEvent> [HAVE_XINPUT2]: The
variable any_stop_p is used only when HAVE_XWIDGETS, so guard its
declaration accordingly to pacify GCC's -Wunused-variable warning.
Eli Zaretskii [Sat, 11 Dec 2021 09:54:44 +0000 (11:54 +0200)]
Minor cleanups in sqlite.c
* src/sqlite.c (Fsqlite_open): Signal an error if
'init_sqlite_functions' fails. Encode FILE using UTF-8.
(Fsqlite_close, Fsqlite_execute, Fsqlite_select)
(Fsqlite_load_extension): Doc fixes.
(Fsqlite_load_extension): Encode MODULE using UTF-8.
Eli Zaretskii [Sat, 11 Dec 2021 09:26:04 +0000 (11:26 +0200)]
Minor cleanups of sqlite3 code on MS-Windows
* src/sqlite.c (sqlite_loaded_p): Function deleted: not used
anymore.
(init_sqlite_functions) [WINDOWSNT]: Use a static 'bool' variable
to indicate if sqlite3 DLL was successfully loaded.
(Fsqlite_available_p) [WINDOWSNT]: Just call
'init_sqlite_functions' if Vlibrary_cache doesn't mention
'sqlite3'.
* lisp/sqlite-mode.el (sqlite-mode-list-data)
(sqlite--mode--list-data): Don't leave open cursor (because they
block other processes from deleting stuff).
(sqlite-mode-delete): Adjust to new layout.
Stefan Kangas [Sat, 11 Dec 2021 05:56:31 +0000 (06:56 +0100)]
Merge from origin/emacs-28
5708da48d1 Revert "Make `M-x run-python' select the window again" aa2872a127 Make `M-x run-python' select the window again c8e19b3a84 Don't bug out on certain empty elements with ids
Check whether the sqlite supports sqlite3_load_extension
* configure.ac: Check for sqlite3_load_extension, which is
apparently missing in some versions.
* src/sqlite.c: Add guards.
(Fsqlite_load_extension): Ifdef out on systems that doesn't have it.
* configure.ac: Add check for the sqlite library.
* doc/lispref/text.texi (Database): Document it.
* lisp/sqlite.el: New file.
* lisp/term/w32-win.el (dynamic-library-alist): Add a mapping.
* src/Makefile.in (SQLITE3_LIBS): Add the libraries.
* src/alloc.c (union emacs_align_type): Add a Lisp_Sqlite struct.
* src/data.c (Ftype_of): Add sqlite.
* src/emacs.c (main): Load the syms.
* src/lisp.h (DEFINE_GDB_SYMBOL_BEGIN): Add PVEC_SQLITE.
(GCALIGNED_STRUCT): New struct to keep data for sqlite database
objects and statement objects.
(SQLITEP, SQLITE, CHECK_SQLITE, XSQLITE): New macros for accessing
the objects.
* src/pdumper.c (dump_vectorlike): Update hash.
(dump_vectorlike): Don't dump it.
* src/print.c (print_vectorlike): Add a printer for the sqlite
object.
Stefan Kangas [Fri, 10 Dec 2021 05:30:33 +0000 (06:30 +0100)]
Merge from origin/emacs-28
7a25ba0fde ; * lisp/image-dired.el: Fix typo. dda6337066 emacsclient takes more care about XDG_RUNTIME_DIR 26fb4168b8 ; Prefer HTTPS in more URLs 6b89578524 ; * lisp/progmodes/flymake.el: Update the minimum Emacs ve...
Paul Eggert [Thu, 9 Dec 2021 17:03:10 +0000 (09:03 -0800)]
emacsclient takes more care about XDG_RUNTIME_DIR
* lib-src/emacsclient.c (set_local_socket): Revert to the Emacs 27
behavior of not trying TMPDIR if XDG_RUNTIME_DIR is set.
This is one of the suggestions made by Jim Porter and
independently by Ulrich Mueller in Bug#51327.
Stefan Kangas [Thu, 9 Dec 2021 13:53:51 +0000 (14:53 +0100)]
Merge from origin/emacs-28
1821844357 Add missing K key documentation for Cangjie input methods be860c1385 Fix manual entry of 'quit-restore-window' (Bug#52328) 35a96139df Clarify a comment in xdisp.c 6ba2f028cf Revert "Grep alias `all' shall not match parent directory" eb9e33e238 ; * etc/NEWS: Non-nil repeat-keep-prefix is not the defaul... 538fc1d0e0 Fix mode-line display in Calendar mode
Po Lu [Thu, 9 Dec 2021 09:57:25 +0000 (17:57 +0800)]
Make precision scrolling up work over display strings
* lisp/pixel-scroll.el
(pixel-point-and-height-at-unseen-line): Use
`window-text-pixel-size'.
(pixel-scroll-precision-scroll-up-page): Use delta as vscroll
directly.
Stefan Kangas [Thu, 9 Dec 2021 02:28:19 +0000 (03:28 +0100)]
image-dired: Show image info in header line
* lisp/image-dired.el
(image-dired-update-header-line): New function to show image
information in the header line.
(image-dired-display-thumb-properties): Make obsolete.
(image-dired-track-thumbnail)
(image-dired--display-thumb-properties-fun)
(image-dired-forward-image, image-dired-next-line)
(image-dired-previous-line, image-dired-beginning-of-buffer)
(image-dired-end-of-buffer, image-dired-read-comment): Use
image-dired-update-header-line instead of
image-dired-display-thumb-properties.
Stefan Kangas [Wed, 8 Dec 2021 23:57:34 +0000 (00:57 +0100)]
image-dired: Go to next image when marking
* lisp/image-dired.el
(image-dired-marking-shows-next): New user option to show the next
image after marking, unmarking or flagging an image.
(image-dired--do-mark-command): New macro.
(image-dired-mark-thumb-original-file)
(image-dired-unmark-thumb-original-file)
(image-dired-flag-thumb-original-file)
(image-dired-toggle-mark-thumb-original-file)
(image-dired-unmark-all-marks): Use above new macro.
Stefan Kangas [Wed, 8 Dec 2021 23:01:23 +0000 (00:01 +0100)]
image-dired: Remove some TODOs
To the extent that these TODOs are relevant or useful, it would be
better to add such features to image-mode directly.
* lisp/image-dired.el: Remove some TODOs.
Emacs got better at quoting shell arguments and the original value
works correctly for vc-git-grep. At the same time, the value
introduced on that commit caused a regression on lgrep.
* lisp/progmodes/grep.el (grep-files-aliases): Use previous value for
`all'. Fixes bug#52367
Stefan Monnier [Wed, 8 Dec 2021 21:14:03 +0000 (16:14 -0500)]
lisp/mouse.el: Fix some lambdas quoted with ` or '
Also prefer #' to quote named functions.
* lisp/mouse.el (minor-mode-menu-from-indicator, context-menu-entry)
([C-down-mouse-3]): Don't abuse lambda lists for functions.
(context-menu-mode): Remove redundant `:group`.
(mouse-drag-line): Remove unused var `draggable`.
(mouse-yank-primary): Make it work for non-mouse events.
Juri Linkov [Wed, 8 Dec 2021 20:31:55 +0000 (22:31 +0200)]
* lisp/mouse.el (context-menu-entry): Bind to make-sparse-keymap, not ignore.
Then where-is-internal does not run context-menu-map from the :filter,
and no context menu functions are called by e.g. describe-mode in wrong buffer
(bug#9923)
Stefan Kangas [Wed, 8 Dec 2021 16:15:28 +0000 (17:15 +0100)]
Define some more keymaps in one step
* lisp/calc/calc-store.el (calc-var-name-map):
* lisp/mail/rmailsum.el (rmail-summary-edit-map):
* lisp/speedbar.el (speedbar-buffers-key-map): Define in one step.
* lisp/progmodes/ebrowse.el (ebrowse-global-submap-4)
(ebrowse-global-submap-5): Define in one step and use defvar-keymap.
Eli Zaretskii [Wed, 8 Dec 2021 14:22:10 +0000 (16:22 +0200)]
Fix mode-line display in Calendar mode
* lisp/help.el (substitute-command-keys): New optional argument
NO-FACE, to avoid putting the 'help-key-binding' face on the key
bindings.
* lisp/calendar/calendar.el (calendar-mode-line-entry): Call
'substitute-command-keys' with the new optional argument non-nil.
(Bug#52366)
* doc/lispref/help.texi (Keys in Documentation): Document the new
optional argument of 'substitute-command-keys'.
* etc/NEWS: Announce the addition of a new argument to
'substitute-command-keys'.