]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 months agoSlightly simplify 'kubed-define-resource'
Eshel Yaron [Mon, 22 Jul 2024 21:10:08 +0000 (23:10 +0200)]
Slightly simplify 'kubed-define-resource'

3 months ago; Update ldefs-boot.el
Eshel Yaron [Mon, 22 Jul 2024 10:49:57 +0000 (12:49 +0200)]
; Update ldefs-boot.el

3 months agoUse SBYTES instead of strlen in treesit.c
Stefan Kangas [Mon, 22 Jul 2024 10:21:25 +0000 (12:21 +0200)]
Use SBYTES instead of strlen in treesit.c

* src/treesit.c (treesit_ensure_query_compiled)
(Ftreesit_node_child_by_field_name, treesit_initialize_query):
Use SBYTES instead of strlen.

(cherry picked from commit d995429e7bc2bc5b5d87db45dbbaca121f8118e5)

3 months agoProhibit unbinding of built-in variables
Po Lu [Mon, 22 Jul 2024 01:56:08 +0000 (09:56 +0800)]
Prohibit unbinding of built-in variables

* src/data.c (set_internal): Signal error if a BLV with a
redirect or a forwarded symbol is being unbound.

* test/src/data-tests.el (binding-test-makunbound-built-in): New
test.

(cherry picked from commit da0165a01e01dcb4334feee03b462ac09ceb0f8c)

3 months agoFix segfault when deleting tree-sitter query (bug#72238)
Yuan Fu [Sun, 21 Jul 2024 23:50:59 +0000 (16:50 -0700)]
Fix segfault when deleting tree-sitter query (bug#72238)

* src/treesit.c (treesit_delete_query): Only delete query and cursor
when they are non-NULL.

(cherry picked from commit 4868a17396b6796b77285a3608b383aac32aee4f)

3 months agoAdd link to commit compatibility function handles
Theodor Thornhill [Sun, 21 Jul 2024 12:56:52 +0000 (14:56 +0200)]
Add link to commit compatibility function handles

* lisp/progmodes/typescript-ts-mode.el
(tsx-ts-mode--indent-compatibility-b893426): Add link to GitHub.

(cherry picked from commit ccb856189f483abfaa584f428b09a863f816a040)

3 months agoImprove one test (bug#71998)
Theodor Thornhill [Sun, 21 Jul 2024 12:55:06 +0000 (14:55 +0200)]
Improve one test (bug#71998)

* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts (Name):
Add pre-indent state.

(cherry picked from commit bb0f0c04a3985649f8ef86d9c3cbe68b78bee1aa)

3 months ago; Minor whitespace fix
Theodor Thornhill [Sun, 21 Jul 2024 11:58:14 +0000 (13:58 +0200)]
; Minor whitespace fix

*
lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings):
Tabs to spaces.

(cherry picked from commit 810be9cf863ecf74d6ca649ce38450a44ae55719)

3 months agoSignal error on wrong typescript dialect
Theodor Thornhill [Sun, 21 Jul 2024 11:55:49 +0000 (13:55 +0200)]
Signal error on wrong typescript dialect

*
lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode-wrong-dialect-error):
New error.

*
lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--check-dialect):
Helper function.

*
lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--indent-rules,
tsx-ts-mode--font-lock-compatibility-bb1f97b,
tsx-ts-mode--font-lock-compatibility-function-expression,
tsx-ts-mode--font-lock-compatibility-function-expression,
typescript-ts-mode--font-lock-settings): Use the new helper.

(cherry picked from commit 7a059ed88a13d660cc5eb20f5fa6a2903ed23247)

3 months ago; Fix typo
Theodor Thornhill [Sun, 21 Jul 2024 10:51:42 +0000 (12:51 +0200)]
; Fix typo

* lisp/treesit.el (treesit-ready-p): Minor typo fix.

(cherry picked from commit cdca1ba2e9dbbe2bb469c91179cdda4fd4585bb0)

3 months ago* lisp/progmodes/go-ts-mode.el (go-ts-mode-build-tags): Fix :version.
Michael Albinus [Sun, 21 Jul 2024 09:13:35 +0000 (11:13 +0200)]
* lisp/progmodes/go-ts-mode.el (go-ts-mode-build-tags): Fix :version.

(cherry picked from commit 5c08fd80d27c61512d1f3f5cf9c38e2d5c3a5c18)

3 months agoAdd commands to run unit tests in 'go-ts-mode'
Ankit R Gadiya [Mon, 13 May 2024 18:44:03 +0000 (00:14 +0530)]
Add commands to run unit tests in 'go-ts-mode'

* lisp/progmodes/go-ts-mode.el (go-ts-mode-build-tags): New variable.
(go-ts-mode-map): Add new bindings.
(go-ts-mode--get-build-tags-flag, go-ts-mode--compile-test)
(go-ts-mode--find-defun-at, go-ts-mode--get-function-regexp)
(go-ts-mode--get-functions-in-range)
(go-ts-mode--get-test-regexp-at-point)
(go-ts-mode-test-function-at-point, go-ts-mode-test-this-file)
(go-ts-mode-test-this-package): New functions.

* etc/NEWS: Mention the change.

(Bug#70939)

(cherry picked from commit f249c81f868e8fea9d2a05ce258b3ebefba6620f)

3 months ago; Fix recent changes in pdumper.c
Eli Zaretskii [Sun, 21 Jul 2024 04:27:38 +0000 (07:27 +0300)]
; Fix recent changes in pdumper.c

* src/pdumper.c (dump_treesit_compiled_query, dump_vectorlike):
Minor copyedits.

(cherry picked from commit e63fa29b98f3be18b7c66c9ca289e787b172ec37)

3 months agoFix bool vector length overflow
Paul Eggert [Sat, 20 Jul 2024 22:52:05 +0000 (15:52 -0700)]
Fix bool vector length overflow

* src/alloc.c (make_clear_bool_vector): It’s now the caller’s
responsibility to make sure the bool vector length is in range.
Add an eassert to double-check this.  This lets some locals be
ptrdiff_t not EMACS_INT.
(Fmake_bool_vector, Fbool_vector):
Check that bool vector lengths are in range.
* src/lisp.h (BOOL_VECTOR_LENGTH_MAX): New macro.
(bool_vector_words, bool_vector_bytes): Avoid undefined
behavior if size == EMACS_INT_MAX - (BITS_PER_BITS_WORD - 1).
This is mostly theoretical but it’s easy to do it right.
* src/lread.c (read_bool_vector): Use EMACS_INT, not just ptrdiff_t.
Check that length doesn’t exceed BOOL_VECTOR_LENGTH_MAX.
This fixes an unlikely integer overflow where the calculated size
went negative.

(cherry picked from commit 515e5ad0de133f0a3d501bd6290ccc51d8462955)

3 months agoChange list-length intptr_t to ptrdiff_t
Paul Eggert [Sat, 20 Jul 2024 16:03:24 +0000 (09:03 -0700)]
Change list-length intptr_t to ptrdiff_t

* src/fns.c (list_length, Fsafe_length, Fproper_list_p):
Use ptrdiff_t not intptr_t for accumulator, since result is ptrdiff_t.
This fixes a minor glitch in 2019-01-11T05:35:31!eggert@cs.ucla.edu
where I removed unnecessary overflow checks but forgot to change types.
This change should alter generated code only on oddball platforms where
ptrdiff_t is narrower than intptr_t, e.g., CheriBSD.

(cherry picked from commit 76497a01425e19a6c3a02c1e3031061fa0e7885b)

3 months ago; * lisp/eshell/esh-io.el (eshell-close-handles): Fix version annotation.
Jim Porter [Sat, 20 Jul 2024 21:46:14 +0000 (14:46 -0700)]
; * lisp/eshell/esh-io.el (eshell-close-handles): Fix version annotation.

(cherry picked from commit 55fefe06ef00cbe3e27a111a229a2622ae487c74)

3 months agoSupport dumping tree-sitter query (bug#69952)
Yuan Fu [Sat, 20 Jul 2024 20:56:32 +0000 (13:56 -0700)]
Support dumping tree-sitter query (bug#69952)

Previous commit allows Emacs to dump tree-sitter queries by simply
dumping the query string and language symbol, and left the query object
and cursor object as NULL.  This commit makes sure Emacs doesn't crash
when loading the dumped query, by make sure Emacs can handle the case
where the cursor is NULL.

* src/treesit.c (make_treesit_query): Initialize query with null cursor.
(treesit_ensure_query_cursor): New function.
(treesit_initialize_query): Ensure cursor is non-null.
* src/treesit.h (Lisp_TS_Query): Update documentation.

(cherry picked from commit 1abf3bdd7edcd405d4ccb4ef4de38068348f4b95)

3 months agoSupport compiled queries in pdump by dumping source (bug#69952)
Sergey Vinokurov [Sun, 6 Aug 2023 15:24:29 +0000 (16:24 +0100)]
Support compiled queries in pdump by dumping source (bug#69952)

* src/pdumper.c (dump_vectorlike): Dump compiled queries.
* src/pdumper.c (dump_treesit_compiled_query): New function.

(cherry picked from commit 1eca867e1b60acef7f4343bc5c70340de58f1079)

3 months agoSAFE_ALLOCA fixes
Paul Eggert [Sat, 20 Jul 2024 15:52:55 +0000 (08:52 -0700)]
SAFE_ALLOCA fixes

* src/comp.c (declare_imported_func, emit_simple_limple_call)
(declare_lex_function, compile_function):
* src/emacs-module.c (funcall_module):
* src/fns.c (Fstring_distance):
* src/font.c (font_sort_entities):
* src/haikumenu.c (digest_menu_items, haiku_menu_show):
* src/pgtkselect.c (Fpgtk_register_dnd_targets):
* src/xfns.c (Fx_begin_drag):
* src/xmenu.c (x_menu_show):
* src/xterm.c (x_dnd_compute_toplevels, handle_one_xevent)
(x_term_init):
Prefer SAFE_NALLOCA to doing size multiplication by hand, to catch
unlikely integer overflows.
* src/comp.c (emit_simple_limple_call): Fix bug where
SAFE_FREE was called too early, leading to unlikely
use of freed storage.
* src/xterm.c (handle_one_xevent): Remove side effects
from SAFE_ALLOCA args, as the args are evaluated twice.

(cherry picked from commit 101ec1430128a0b1d9e7d54cbd9c0add8f446f25)

3 months ago; Fix typo in xfont.c
Po Lu [Sat, 20 Jul 2024 13:48:08 +0000 (21:48 +0800)]
; Fix typo in xfont.c

* src/xfont.c (xfont_list): Subtract 9 from name, not 10 + 1.

(cherry picked from commit 301b97eb24ad280bdf36f562d5a95e9aff7f4a65)

3 months agoAvoid magic values in xfont_list
Stefan Kangas [Sat, 20 Jul 2024 13:12:50 +0000 (15:12 +0200)]
Avoid magic values in xfont_list

* src/xfont.c (xfont_list): Avoid magic values.

(cherry picked from commit 2f875ead59abe16c4559d26883ff1db524fa22f7)

3 months agoFix bibtex validation for non-file buffers
Liu Hui [Fri, 5 Jul 2024 09:50:08 +0000 (17:50 +0800)]
Fix bibtex validation for non-file buffers

* lisp/textmodes/bibtex.el (bibtex-validate): Use buffer name
to show errors in non-file buffers.  (Bug#71946)

(cherry picked from commit 816c53c2d9d6f2aabffdced23d10a0c902193235)

3 months ago; Skip commit ab7c40ea52a1db0cfc8b6605363f4e1378c9b471
Eshel Yaron [Mon, 22 Jul 2024 10:37:42 +0000 (12:37 +0200)]
; Skip commit ab7c40ea52a1db0cfc8b6605363f4e1378c9b471

3 months ago; * doc/misc/gnus.texi (Agent Caveats): Fix doc
James Thomas [Tue, 16 Jul 2024 01:34:23 +0000 (07:04 +0530)]
; * doc/misc/gnus.texi (Agent Caveats): Fix doc

* doc/misc/gnus.texi (Agent Caveats): Change doc due to commit
2020-10-16 "Add a new variable to control Gnus Agent caching"
(41d220dc6085, bug#43356).  (Bug#72134)

(cherry picked from commit ea30ffc52b3297b4fbefa1fd591b8d0eece5bfc6)

3 months ago; * src/sqlite.c (Fsqlite_load_extension): Add "vec0" to allowed extensions.
Eli Zaretskii [Sat, 20 Jul 2024 07:27:52 +0000 (10:27 +0300)]
; * src/sqlite.c (Fsqlite_load_extension): Add "vec0" to allowed extensions.

(cherry picked from commit 07b1a36f78c33d111da9a59d6f92ee6d0395d816)

3 months agoAvoid accessing uninitialized bool_vector words
Paul Eggert [Sat, 20 Jul 2024 07:17:14 +0000 (00:17 -0700)]
Avoid accessing uninitialized bool_vector words

Although loading uninitialized works from memory and then ignoring
the result works fine on conventional architectures, it
technically has undefined behavior in C, so redo bool_vector
allocation so that the code never does that.  This can improve
performance when allocating large vectors of nil, since calloc can
clear the memory lazily.
* src/alloc.c (make_clear_bool_vector): New function,
a generalization of make_uninit_bool_vector.
(make_uninit_bool_vector): Use it.
(Fmake_bool_vector): If !INIT, rely on make_clear_bool_vector.
* src/alloc.c (Fbool_vector):
* src/fns.c (Freverse): Don’t access uninitialized bool_vector words.

(cherry picked from commit 79b9f05d3a44b25db9fd3eff9cc002324cfa790c)

3 months agoFix setup of fonts for 'han' script.
Eli Zaretskii [Sat, 20 Jul 2024 06:46:21 +0000 (09:46 +0300)]
Fix setup of fonts for 'han' script.

* lisp/international/fontset.el (script-representative-chars): Add
more CJK representative characters to 'han' script.  (Bug#72188)

(cherry picked from commit cb78b43f39432af3301a39507eac23f5f1e9fbf3)

3 months ago; Skip commit 96f1db89ee7d3696d27a5bf044ada7942e354fda
Eshel Yaron [Mon, 22 Jul 2024 10:35:20 +0000 (12:35 +0200)]
; Skip commit 96f1db89ee7d3696d27a5bf044ada7942e354fda

3 months agoDocument GNU ELPA copyright in tips.texi
Stefan Kangas [Sat, 20 Jul 2024 05:46:37 +0000 (07:46 +0200)]
Document GNU ELPA copyright in tips.texi

* doc/lispref/tips.texi (Library Headers): Document that GNU ELPA
packages should have their copyright assigned to the FSF.

(cherry picked from commit 55110d1fda2daa204d98f93872577cca81733ad4)

3 months agoFix compilation on builds with native rectangle structures
Po Lu [Sat, 20 Jul 2024 04:39:33 +0000 (12:39 +0800)]
Fix compilation on builds with native rectangle structures

* src/androidgui.h (CONVERT_TO_NATIVE_RECT)
(CONVERT_FROM_EMACS_RECT): Delete redundant macro definitions.

* src/xdisp.c (Fremember_mouse_glyph) [CONVERT_TO_EMACS_RECT]:
Expand CONVERT_TO_EMACS_RECT to convert native rectangles into
a readable format if required.  Reported by Stefan Kangas
<stefankangas@gmail.com>.

(cherry picked from commit 358dbbb723b735eddd3f821ffeaf5382778433bd)

3 months agoRespect mouse-fine-graned-tracking in touch screen simple translation
Po Lu [Sat, 20 Jul 2024 03:28:47 +0000 (11:28 +0800)]
Respect mouse-fine-graned-tracking in touch screen simple translation

* lisp/touch-screen.el (touch-screen-current-tool): Expand doc
string.
(touch-screen-handle-point-update): Record extents of glyph
beneath the mouse as computed by `remember_mouse_glyph' if
necessary, and defer generation of mouse-movement events till
the mouse exit it.

* src/xdisp.c (Fremember_mouse_glyph): New function.
(syms_of_xdisp): Define new subr.

(cherry picked from commit 892abde34e052f7a9b1b27fcb27ded13b4ba3c04)

3 months ago; Skip commit 079e5a03156f7461d1c8f008663404277cac9ade
Eshel Yaron [Mon, 22 Jul 2024 10:34:35 +0000 (12:34 +0200)]
; Skip commit 079e5a03156f7461d1c8f008663404277cac9ade

3 months agoMiscellaneous checkdoc fixes
Stefan Kangas [Sat, 20 Jul 2024 00:22:49 +0000 (02:22 +0200)]
Miscellaneous checkdoc fixes

* lisp/ansi-color.el (ansi-color--ensure-context):
* lisp/doc-view.el (doc-view-svg-face):
* lisp/external-completion.el (external-completion-table):
* lisp/ffap.el (ffap-ro-mode-hook, ffap-gnus-hook):
* lisp/find-file.el:
* lisp/flow-ctrl.el (flow-control-c-s-replacement)
(flow-control-c-q-replacement):
* lisp/forms.el (forms-multi-line):
* lisp/help.el (search-forward-help-for-help):
* lisp/hi-lock.el (hi-lock-use-overlays):
* lisp/image.el (find-image):
* lisp/isearch.el (isearch-forward, isearch-forward-regexp)
(isearch-lazy-count-format):
* lisp/jsonrpc.el (jsonrpc--continue, initialize-instance):
* lisp/mouse-copy.el (mouse-kill-preserving-secondary):
* lisp/pixel-scroll.el (pixel-bob-at-top-p)
(pixel-scroll-down-and-set-window-vscroll):
* lisp/printing.el (pr-gv-command, pr-gs-command)
(pr-gs-switches):
* lisp/register.el (register-use-preview):
* lisp/repeat.el (repeat-check-key):
* lisp/saveplace.el (save-place-abbreviate-file-names):
* lisp/select.el (gui--clipboard-selection-unchanged-p):
* lisp/ses.el (ses-header-row):
* lisp/simple.el (transpose-sexps-default-function)
(normal-erase-is-backspace, normal-erase-is-backspace-mode):
* lisp/sqlite-mode.el (sqlite-mode):
* lisp/tempo.el (tempo-insert-region):
* lisp/term.el (term-mode-map, term-mode, term-char-mode):
Checkdoc fixes.

(cherry picked from commit e4760109ac8e3b0d73dd37e11121a01362542364)

3 months agoWork around GCC bug 58416 on 32-bit x86
Paul Eggert [Fri, 19 Jul 2024 20:39:21 +0000 (13:39 -0700)]
Work around GCC bug 58416 on 32-bit x86

* configure.ac (C_SWITCH_MATCHINE): On 32-bit x86 with GCC 4+,
append -mfpmath=sse (if SSE2 is known to work) or -fno-tree-sra
(otherwise) to work around GCC bug 58416.
* etc/NEWS: Mention this.

(cherry picked from commit 9f4fc6608212191e1a9e07bf89f38ba9e4ea786c)

3 months agoIn ‘INSTALL’ put configure vars in one section
Paul Eggert [Fri, 19 Jul 2024 19:44:35 +0000 (12:44 -0700)]
In ‘INSTALL’ put configure vars in one section

* INSTALL: Move description of CFLAGS etc. into the section headed
“Here is a complete list of the variables you may want to set”
since they are also variables one might want to set.

(cherry picked from commit 524e9d50a78c019ab23ecf469787d5ff6c119025)

3 months agoDon't set exit info in Eshell if the command is being piped elsewhere
Jim Porter [Fri, 19 Jul 2024 16:34:03 +0000 (09:34 -0700)]
Don't set exit info in Eshell if the command is being piped elsewhere

Previously, the exit info in Eshell was that of the last command that
finished, rather than the last command in a pipeline.

* lisp/eshell/esh-cmd.el (eshell-exec-lisp)
(eshell-lisp-command): Check whether the command is being piped.

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Record whether
the command is being piped...
(eshell-sentinel): ... and do the right thing with that info.

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/sigpipe-exits-process): Check the exit status to ensure
we don't report the first process's SIGPIPE exit.

(cherry picked from commit b7893e73878df83043e05dc8cb811971c0e99f03)

3 months agoSplit out exit code parts of 'eshell-close-handles' into a new function
Jim Porter [Tue, 24 Jan 2023 01:21:57 +0000 (17:21 -0800)]
Split out exit code parts of 'eshell-close-handles' into a new function

* lisp/eshell/esh-cmd.el (eshell-last-command-status)
(eshell-last-command-result): Move here from esh-io.el.
(eshell-set-exit-info): New function, extracted from
'eshell-close-handles'.

* lisp/eshell/esh-io.el (eshell-close-handles): Make old calling
convention obsolete.  Update callers to use 'eshell-set-exit-info' as
needed.

(cherry picked from commit 39c704e03de59a1cc46494fb71426e7a7fe8013d)

3 months ago* lisp/progmodes/peg.el (peg-syntax-classes): Typo (bug#72131)
Stefan Monnier [Fri, 19 Jul 2024 18:18:29 +0000 (14:18 -0400)]
* lisp/progmodes/peg.el (peg-syntax-classes): Typo (bug#72131)

(cherry picked from commit a478423d19fe320972fc319dd2cf7fdbca914754)

3 months ago* lisp/which-key.el: Bump version to 3.6.1
Philip Kaludercic [Fri, 19 Jul 2024 08:43:11 +0000 (10:43 +0200)]
* lisp/which-key.el: Bump version to 3.6.1

This is necessary to trigger a new ELPA release.

(cherry picked from commit 34b832fce1d01c22aa644196cd6e6b50b1d403ee)

3 months ago; * test/lisp/net/dbus-tests.el: silence compilation warnings
Mattias Engdegård [Fri, 19 Jul 2024 17:35:35 +0000 (19:35 +0200)]
; * test/lisp/net/dbus-tests.el: silence compilation warnings

(cherry picked from commit f591f477791aafbfe1086398fefdafed213b6ced)

3 months agoVisualize ranking of last game when adding scores
Peder O. Klingenberg [Thu, 18 Jul 2024 20:34:54 +0000 (22:34 +0200)]
Visualize ranking of last game when adding scores

* lisp/play/gamegrid.el (gamegrid-add-score-insecure): Move point to
the score just added, or end of buffer if the new score did not make
the list.  This makes it easier to see where the last game
ranked.  (Bug#72185)

(cherry picked from commit c330b97fe24088c32394fae7f52aa18315d123b0)

3 months ago* lisp/transient.el (static-if): Remove duplicated definition.
Jonas Bernoulli [Fri, 19 Jul 2024 17:10:30 +0000 (19:10 +0200)]
* lisp/transient.el (static-if): Remove duplicated definition.

(Bug#72182)

This should have been removed when the standalone version was merged
into Emacs.

(cherry picked from commit 951fb93956d3b90aa6d1fbc8c3dcd25c42fbe7dc)

3 months agoAdapt file-remote-p doc
Michael Albinus [Fri, 19 Jul 2024 16:29:49 +0000 (18:29 +0200)]
Adapt file-remote-p doc

* doc/lispref/files.texi (Magic File Names): Adapt file-remote-p.

* lisp/files.el (file-remote-p): Adapt docstring.

(cherry picked from commit 0218fb214376555df52188be4afee16249e3639c)

3 months ago; Fix typo in etc/ORG-NEWS (Bug#72186)
Stefan Kangas [Fri, 19 Jul 2024 08:13:04 +0000 (10:13 +0200)]
; Fix typo in etc/ORG-NEWS (Bug#72186)

(cherry picked from commit 34c1094e607c7ec89d66702da7f298b454b7c192)

3 months agoAllow specifying stdout/stderr separately in some Eshell commands
Jim Porter [Sat, 15 Jun 2024 03:45:44 +0000 (20:45 -0700)]
Allow specifying stdout/stderr separately in some Eshell commands

* lisp/eshell/eshell.el (eshell-command): Add ERROR-TARGET.
* lisp/eshell/em-script.el (eshell-execute-file): Make interactive, and
add ERROR-TARGET.

* doc/misc/eshell.texi (One-Off Commands, Scripts): Update
documentation.

* etc/NEWS: Announce this change.

(cherry picked from commit 99b360bb5aabf324cf038c27ac76ac1513319754)

3 months ago; * doc/misc/eshell.texi (Bugs and ideas): Remove now-implemented idea.
Jim Porter [Thu, 18 Jul 2024 19:48:31 +0000 (12:48 -0700)]
; * doc/misc/eshell.texi (Bugs and ideas): Remove now-implemented idea.

(cherry picked from commit 965be7bc461b3f56d68f07f3f13fe4e3f2d7e259)

3 months agoImprove implementation of built-in Eshell "kill" command
Jim Porter [Thu, 18 Jul 2024 18:43:34 +0000 (11:43 -0700)]
Improve implementation of built-in Eshell "kill" command

* lisp/eshell/esh-proc.el (eshell/kill): Fix handling of commands like
"kill 123".  Use REMOTE when signalling PIDs in remote directories.
Signal using process objects when possible.  Report errors when failing
to signal.

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill/process-id)
(esh-proc-test/kill/process-object): New tests (bug#72013).

(cherry picked from commit 259f4613bdea27abf330b58a9683ca4a9e936777)

3 months agoHandle broken pipes in a better way in Eshell
Jim Porter [Mon, 15 Jul 2024 05:43:54 +0000 (22:43 -0700)]
Handle broken pipes in a better way in Eshell

* lisp/eshell/esh-proc.el (eshell-insertion-filter): Send SIGPIPE
delaying for Tramp and falling back to SIGTERM for MS-Windows
(bug#72117).

(cherry picked from commit c7a498260ce3c016611da6e5e0aa5edeca58cd80)

3 months agoImprove handling of deferrable Eshell commands
Jim Porter [Wed, 17 Jul 2024 05:07:33 +0000 (22:07 -0700)]
Improve handling of deferrable Eshell commands

Now, we use the 'eshell-deferrable' wrapper to wrap a form that returns
a process (or list thereof).  This improves upon the old method, which
failed to handle 'eshell-replace-command' correctly.  In that case,
Eshell would fail to unmark commands as deferrable when necessary
(e.g. for commands in pipelines).

* lisp/eshell/esh-cmd.el (eshell-deferrable-commands): Make into a
defvar.
(eshell-deferrable): New function...
(eshell-structure-basic-command): ... use it.
(eshell-trap-errors): Rename to...
(eshell-do-command): ... this, and use 'eshell-deferrable'.  Update
callers.
(eshell--unmark-deferrable): Remove.  Update callers.
(eshell-execute-pipeline): Remove 'eshell-process-identity'.
(eshell-process-identity, eshell-named-command*, eshell-lisp-command*):
Make obsolete.

* test/lisp/eshell/esh-cmd-tests.el (eshell-test-replace-command): New
function.
(esh-cmd-test/pipeline/replace-command): New test.

(cherry picked from commit 1550213613b397da6e879cc0d00ede916f6c62cc)

3 months agoFix minor code style issue in pgtkfns.c
Stefan Kangas [Thu, 18 Jul 2024 12:59:09 +0000 (14:59 +0200)]
Fix minor code style issue in pgtkfns.c

* src/pgtkfns.c (pgtk_get_defaults_value)
(pgtk_set_defaults_value): Fix code style.

(cherry picked from commit 76874df05f7758deb4f47b7df278e54a66456fc9)

3 months agoAvoid overflow in pgtk_is_numeric_char
Stefan Kangas [Thu, 18 Jul 2024 12:48:56 +0000 (14:48 +0200)]
Avoid overflow in pgtk_is_numeric_char

* src/pgtkfns.c (PATH_MAX_LEN): New macro.
(parse_resource_key): Avoid overflow if a key is RESOURCE_KEY_MAX_LEN
long by making the array larger.

(cherry picked from commit 87facc9e3da3ca70a5a75eec57e3fa22c0636c92)

3 months agoUse strnlen to avoid unnecessary work in pgtkfns.c
Stefan Kangas [Tue, 16 Jul 2024 02:34:53 +0000 (04:34 +0200)]
Use strnlen to avoid unnecessary work in pgtkfns.c

* src/pgtkfns.c (pgtk_get_defaults_value, pgtk_set_defaults_value):
Factor out new function...
(pgtk_check_resource_key_length): ...to here.  Avoid unnecessary work by
using strnlen.

(cherry picked from commit d00a10333f06d30fee93ba3ee033e74dc4ff85bc)

3 months agoMinor cleanup of code in insdel.c
Eli Zaretskii [Thu, 18 Jul 2024 09:59:28 +0000 (12:59 +0300)]
Minor cleanup of code in insdel.c

* src/insdel.c (del_range_2): Update *_BYTE variables _after_
updating the corresponding character values.  This follows what we
do everywhere else, and allows to put a watchpoint on, say, Z_BYTE
to check consistency between the character and byte counts.  See
bug#72165 for one situation where it is useful.

(cherry picked from commit a90a1ed527e89cf26737b6a123070c55c3118923)

3 months ago* etc/TODO: Delete item about merging Magit.
Stefan Kangas [Thu, 18 Jul 2024 09:46:56 +0000 (11:46 +0200)]
* etc/TODO: Delete item about merging Magit.

Change requested by Jonas Bernoulli <jonas@bernoul.li>.

(cherry picked from commit 5916b172bdcdeb96b058c2ae18455f66dd6326fb)

3 months ago; Fix typos
Stefan Kangas [Sun, 7 Jul 2024 15:40:31 +0000 (17:40 +0200)]
; Fix typos

(cherry picked from commit a6cab228d4d1a82a80eac81b057857a230eef0b5)

3 months ago* doc/man/emacs.1.in: Add "No warranty" notice.
Stefan Kangas [Thu, 18 Jul 2024 08:42:59 +0000 (10:42 +0200)]
* doc/man/emacs.1.in: Add "No warranty" notice.

(cherry picked from commit 41dc28244f238739ce5c8f0c25a3d6d66992dd54)

3 months ago; * doc/man/emacs.1.in: Improve wording.
Stefan Kangas [Thu, 18 Jul 2024 08:36:01 +0000 (10:36 +0200)]
; * doc/man/emacs.1.in: Improve wording.

(cherry picked from commit b2ac343586709063edb2a3bdfb2cdc1ac484cda1)

3 months agoImprove emacs man page description of --user flag
Stefan Kangas [Thu, 18 Jul 2024 07:54:44 +0000 (09:54 +0200)]
Improve emacs man page description of --user flag

* doc/man/emacs.1.in: Improve --user flag description.
(Bug#72169)

(cherry picked from commit 110b3d08d73b01c84ee7160c656c66eb206a7d90)

3 months agoCheckdoc fixes in allout-widgets.el
Stefan Kangas [Thu, 18 Jul 2024 07:48:53 +0000 (09:48 +0200)]
Checkdoc fixes in allout-widgets.el

* lisp/allout-widgets.el (allout-widgets-setup)
(allout-widgets-tally-string, allout-widgets-mode-inhibit):
(allout-widgets-hook-error-handler): Checkdoc fixes.

(cherry picked from commit 4911f08912a55702db1fc17373e98eec8771c4b7)

3 months agoCheckdoc fixes in subr.el
Stefan Kangas [Thu, 18 Jul 2024 07:47:19 +0000 (09:47 +0200)]
Checkdoc fixes in subr.el

* lisp/subr.el (ctl-x-4-map, ctl-x-map)
(touch-screen-events-received): Checkdoc fixes.

(cherry picked from commit 109b592d77b41b474a6d61e5a73de66b99d54ce6)

3 months agoCheckdoc fixes in touch-screen.el
Stefan Kangas [Thu, 18 Jul 2024 07:44:28 +0000 (09:44 +0200)]
Checkdoc fixes in touch-screen.el

* lisp/touch-screen.el (touch-screen-handle-touch): Checkdoc fixes.

(cherry picked from commit 46436720787821d55589188290442fd5ef559705)

3 months agoCheckdoc fixes in treesit.el
Stefan Kangas [Thu, 18 Jul 2024 07:43:55 +0000 (09:43 +0200)]
Checkdoc fixes in treesit.el

* lisp/treesit.el (treesit-add-font-lock-rules)
(treesit--font-lock-mark-ranges-to-fontify): Checkdoc fixes.

(cherry picked from commit 9889774c62e7430bce7f9a241ebe529ea00f2362)

3 months ago; Skip commit c9d28a05d98a2c3c0fe89ac37bc143a41b60ea96
Eshel Yaron [Mon, 22 Jul 2024 10:29:09 +0000 (12:29 +0200)]
; Skip commit c9d28a05d98a2c3c0fe89ac37bc143a41b60ea96

3 months ago; Skip commit da97096fdbb50bf69348813c960eb8d10b2bdc44
Eshel Yaron [Mon, 22 Jul 2024 10:28:49 +0000 (12:28 +0200)]
; Skip commit da97096fdbb50bf69348813c960eb8d10b2bdc44

3 months ago(read-extended-command): Add alternative minibuffer action
Eshel Yaron [Mon, 22 Jul 2024 09:56:50 +0000 (11:56 +0200)]
(read-extended-command): Add alternative minibuffer action

3 months ago* lisp/net/kubed.el: Develop some more
Eshel Yaron [Mon, 22 Jul 2024 09:56:29 +0000 (11:56 +0200)]
* lisp/net/kubed.el: Develop some more

3 months agotabulated-list.el: Improve handling of disappearing sort column
Eshel Yaron [Mon, 22 Jul 2024 09:56:03 +0000 (11:56 +0200)]
tabulated-list.el: Improve handling of disappearing sort column

3 months agoEvolve kubed.el
Eshel Yaron [Sun, 21 Jul 2024 15:54:00 +0000 (17:54 +0200)]
Evolve kubed.el

3 months ago(minibuffer-message): Cease waiting when not in minibuffer
Eshel Yaron [Fri, 19 Jul 2024 17:23:56 +0000 (19:23 +0200)]
(minibuffer-message): Cease waiting when not in minibuffer

3 months agokubed.el: New file.
Eshel Yaron [Fri, 19 Jul 2024 17:23:41 +0000 (19:23 +0200)]
kubed.el: New file.

3 months agoAdd 'regexp' completion style
Eshel Yaron [Thu, 18 Jul 2024 17:36:34 +0000 (19:36 +0200)]
Add 'regexp' completion style

3 months ago; * src/emacs.c (syms_of_emacs) <Vsystem_type>: Fix doc string indentation.
Po Lu [Thu, 18 Jul 2024 05:35:47 +0000 (13:35 +0800)]
; * src/emacs.c (syms_of_emacs) <Vsystem_type>: Fix doc string indentation.

(cherry picked from commit 4c35382e98308843dce79438844fb5a796b7032b)

3 months agoPort better to Android 3.0
Po Lu [Tue, 16 Jul 2024 02:14:30 +0000 (10:14 +0800)]
Port better to Android 3.0

* java/org/gnu/emacs/EmacsNoninteractive.java (main): Use the
old getPackageInfo calling convention if it exists rather than
on Android 2.3.3 and earlier.

(cherry picked from commit 34882d524328638e2198952578638e0ffe0697c5)

3 months ago; * doc/emacs/anti.texi (Antinews): Fix typos (bug#72167).
john muhl [Wed, 17 Jul 2024 20:48:37 +0000 (15:48 -0500)]
; * doc/emacs/anti.texi (Antinews): Fix typos (bug#72167).

(cherry picked from commit 765cfaed775567afde3607b87f2657f0c0179f28)

3 months ago; Fix typos (bug#72167)
john muhl [Mon, 15 Jul 2024 20:08:41 +0000 (15:08 -0500)]
; Fix typos (bug#72167)

* lisp/progmodes/peg.el (peg--actions): Correct spelling
of "post-processing".
* lisp/progmodes/php-ts-mode.el: Correct spelling of
"taken".

(cherry picked from commit 7093504da2d7267cec1f6530b3cb234a5301012d)

3 months agoNew Tramp tests
Michael Albinus [Wed, 17 Jul 2024 16:05:02 +0000 (18:05 +0200)]
New Tramp tests

* test/lisp/net/tramp-tests.el
(tramp-test41-special-characters-direct-async)
(tramp-test42-utf8-direct-async): New tests.

(cherry picked from commit 8c7c4f4baaa1cb9f6d5d355c03dddc3dd1e0a747)

3 months agoUpdate Tramp manual
Michael Albinus [Wed, 17 Jul 2024 15:57:20 +0000 (17:57 +0200)]
Update Tramp manual

* doc/misc/tramp.texi (Remote processes): Add another reason why a
direct asynchronous process could fail.

(cherry picked from commit 85d2d7982d41d7c8ea31dd7150c78428a968944a)

3 months ago; Fix last change
Eli Zaretskii [Wed, 17 Jul 2024 11:10:50 +0000 (14:10 +0300)]
; Fix last change

* doc/lispref/windows.texi (Dedicated Windows):
* doc/emacs/windows.texi (Displaying Buffers): Mention keybinding.

(cherry picked from commit 504bdd560affd9173f0b406bcc830afca8648e20)

3 months agoFix 'toggle-window-dedicated' documentation
Robert Pluim [Wed, 17 Jul 2024 07:38:43 +0000 (09:38 +0200)]
Fix 'toggle-window-dedicated' documentation

* doc/emacs/windows.texi (Displaying Buffers): Fix the cross reference
to the elisp manual.  Add missing 'toggle-window-dedicated'.
* doc/lispref/windows.texi (Dedicated Windows): Mention
'toggle-window-dedicated'.

(cherry picked from commit 3ccebbe17b73488d2d0ba73fda3b70cb6034cc7d)

3 months ago; * doc/lispref/help.texi (Keys in Documentation): Add cross-reference.
Eli Zaretskii [Tue, 16 Jul 2024 14:35:42 +0000 (17:35 +0300)]
; * doc/lispref/help.texi (Keys in Documentation): Add cross-reference.

(cherry picked from commit 719d5753ca661d5ab264383a2a3ca5932c595b41)

3 months agoCheckdoc fixes in transient.el
Stefan Kangas [Tue, 16 Jul 2024 01:35:59 +0000 (03:35 +0200)]
Checkdoc fixes in transient.el

* lisp/transient.el (transient-format-description): Checkdoc fixes.

(cherry picked from commit e3bba63ecb9302d5a30c7ec55fa564aa9aba2b11)

3 months agoGo back to preferring -isystem to -I
Paul Eggert [Wed, 17 Jul 2024 15:13:31 +0000 (08:13 -0700)]
Go back to preferring -isystem to -I

* configure.ac: Go back to preferring -isystem to -I,
as headers like <gobject/gparam.h> still need it.  This
reverts almost all of 2024-07-16T02:25:44!eggert@cs.ucla.edu,
except that the ‘nw="$nw -Wsystem-headers"’ line continues to
be removed as it is no longer needed due to recent Gnulib changes.
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2024-07/msg00756.html

(cherry picked from commit 3a790abd869ddadc343710deb0c4368227ba6611)

3 months ago; Skip commit a1f29998bf49c85c2eddc1201657639fdd494ef2
Eshel Yaron [Wed, 17 Jul 2024 21:54:46 +0000 (23:54 +0200)]
; Skip commit a1f29998bf49c85c2eddc1201657639fdd494ef2

3 months agoHandle an edge case in c-ts-mode filling (bug#72116)
Yuan Fu [Wed, 17 Jul 2024 04:07:00 +0000 (21:07 -0700)]
Handle an edge case in c-ts-mode filling (bug#72116)

* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-setup): Add a new regexp branch.

(cherry picked from commit 5684fc5207e15adc2647a08bb9e6205fde112fa6)

3 months agoEglot: supported nested {} patterns in globs
João Távora [Mon, 15 Jul 2024 18:13:12 +0000 (19:13 +0100)]
Eglot: supported nested {} patterns in globs

The tailwindcss-language server issues patterns like this:

   **/{tailwind,tailwind.config,tailwind.*.config,\
   tailwind.config.*}.{js,cjs,ts,mjs}

Notive the nested "*" blob inside the the {} group.

Eglot used to reject them in 'workspace/didChangeWatchedFiles' requests,
responding with "Internal Error".  This could confuse some servers.  Now
I've done some changes to the state machine generation and it supports
them.

* lisp/progmodes/eglot.el (eglot--glob-parse): Relax parser.
(eglot--glob-fsm): New helper.
(eglot--glob-compile, eglot--glob-emit-{}): Use it.

* test/lisp/progmodes/eglot-tests.el (eglot-test-glob-test):
Uncomment some test cases.

Github-reference: https://github.com/joaotavora/eglot/issues/1403
(cherry picked from commit d7b93f63f6923f13fe999d12c4f0ba1dbf7160a8)

3 months agoCheck for more ‘find’ failures and port ‘find’
Paul Eggert [Tue, 16 Jul 2024 16:19:31 +0000 (09:19 -0700)]
Check for more ‘find’ failures and port ‘find’

* Makefile.in (install-eln), configure.ac (emacs_cv_find_delete):
* make-dist: Use ‘find ... -exec CMD {} +’ rather than ‘find
... -exec CMD {} \;’ so that if CMD fails, ‘find’ fails too.
* Makefile.in (install-eln): Port to ‘find’ implementations that
behave differently from GNU ‘find’ when given an argument
that contains ‘{}’ within a longer string.  POSIX allows
this behavior.

(cherry picked from commit 7cda30602fcaeecd0072d980a99156812fc7f086)

3 months agoQuote BIN_DESTDIR better
Paul Eggert [Tue, 16 Jul 2024 02:41:35 +0000 (19:41 -0700)]
Quote BIN_DESTDIR better

* Makefile.in (BIN_DESTDIR, install-eln, uninstall):
* src/Makefile.in ($(pdmp)):
Be more consistent about quoting BIN_DESTDIR and ELN_DESTDIR,
avoiding double-quoting ''like this'' which does not work as
expected.

(cherry picked from commit a826296cff6ac1c636db83ff66199c60b69cdeb3)

3 months agoPrefer -I to -isystem
Paul Eggert [Tue, 16 Jul 2024 02:25:44 +0000 (19:25 -0700)]
Prefer -I to -isystem

* configure.ac: Simplify configuration by using -I instead of
-isystem, as -isystem is no longer helpful for suppressing
diagnostics (and likely has not been helpful for years).
Do not suppress -Wsystem-headers, as Gnulib no longer enables it.

(cherry picked from commit a86c25c91f39a25a93d18c9267e024822c1bc43e)

3 months agoSimplify time form analysis
Paul Eggert [Mon, 15 Jul 2024 00:00:56 +0000 (01:00 +0100)]
Simplify time form analysis

This does not change behavior; it merely refactors the code
for simplicity.
* src/timefns.c (enum timeform, struct form_time):
Remove.  All uses removed.
(decode_time_components): Accept HZ instead of FORM.
This saves a switch.  All uses changed.
(decode_lisp_time): Return union c_time instead of struct form_time.
All uses changed.
(lisp_time_cform): Remove.  All uses changed to just use
decode_lisp_time.
(time_arith, Ftime_convert): Check (TICKS . HZ) form directly
using CONSP, instead of using the old struct form_time.
That's fast enough here.

(cherry picked from commit e1089cc9b6d7abfe468175eb92b146c884e00374)

3 months agoTest !FASTER_TIMEFNS with builtin resolutions
Paul Eggert [Sun, 14 Jul 2024 16:36:01 +0000 (17:36 +0100)]
Test !FASTER_TIMEFNS with builtin resolutions

* src/timefns.c (timespec_hz, trillion, ztrillion):
If !FASTER_TIMEFNS, do not optimize the calculations of
these variables.  This gives better test coverage of the
slow-path code, when compiling with -DFASTER_TIMEFNS=0.
(NEED_ZTRILLION_INIT): Move up, to simplify #ifdefery.
Now defined or not defined, instead of being 1 or not defined,
since it is used only via #ifdef.

(cherry picked from commit d10c1796c99637d847fa78e3fcb438d03774a00b)

3 months agoMake ztrillion static
Paul Eggert [Sun, 14 Jul 2024 14:59:20 +0000 (15:59 +0100)]
Make ztrillion static

* src/timefns.c (ztrillion): Now static, when it is a variable,
since no other module uses it.

(cherry picked from commit 51d096ec07dc3bc053965096cd768847020c240d)

3 months agoFix buffer size problem in print_bool_vector
Paul Eggert [Sun, 14 Jul 2024 22:45:31 +0000 (23:45 +0100)]
Fix buffer size problem in print_bool_vector

* src/print.c (print_bool_vector): Don’t assume SIZE fits
into ptrdiff_t, since it is an EMACS_INT.  This
pacifies gcc -Wformat-overflow on i686 --with-wide-int.

(cherry picked from commit a53fd69fe21ea057cd257e663219a33399545949)

3 months agoalloc.c: ckd_add, not by-hand checks
Paul Eggert [Sun, 14 Jul 2024 22:37:50 +0000 (23:37 +0100)]
alloc.c: ckd_add, not by-hand checks

* src/alloc.c (lmalloc, lrealloc): Prefer ckd_add to
by-hand checks for integer addition overflow.

(cherry picked from commit b77abd2bfeb13ae046b1f8c6157bd5a497665657)

3 months agoFix get_conversion_field --with-wide-wint overflow
Paul Eggert [Sun, 14 Jul 2024 22:24:21 +0000 (23:24 +0100)]
Fix get_conversion_field --with-wide-wint overflow

* src/textconv.c (get_conversion_field): Set max value to
PTRDIFF_MAX, not MOST_POSITIVE_FIXNUM, since the variable is
ptrdiff_t, not EMACS_INT.  Problem caught by gcc -Woverflow on a
32-bit platform with --with-wide-int.

(cherry picked from commit b4050ab75e896dd0df51624c956e0dd412dde2cc)

3 months agoPacify -Wmissing-variable-declarations for lisp_malloc_user
Paul Eggert [Sun, 14 Jul 2024 22:03:05 +0000 (23:03 +0100)]
Pacify -Wmissing-variable-declarations for lisp_malloc_user

* src/alloc.c (lisp_malloc_user) [!USE_LSB_TAG]:
Provide extern decl.

(cherry picked from commit a4bafce01e605ddcfff7a4de018b50ad96ea6f8a)

3 months agoPacify 32-bit GCC 14.1.1 in timer_check_2
Paul Eggert [Sun, 14 Jul 2024 19:53:28 +0000 (20:53 +0100)]
Pacify 32-bit GCC 14.1.1 in timer_check_2

* src/keyboard.c (timer_check_2): Refactor to make flow control
more obvious, to pacify -Wanalyzer-use-of-uninitialized-value with
gcc 14.1.1 20240607 (Red Hat 14.1.1-5) on i686.

(cherry picked from commit 31517e81d0d8562e222d4b0de399915df956099f)

3 months agoUse Gnulib workaround for Android strnlen bug
Paul Eggert [Fri, 12 Jul 2024 16:23:30 +0000 (17:23 +0100)]
Use Gnulib workaround for Android strnlen bug

The workaround for the Android 5.0 (API 21) strnlen bug
is now done in m4/strnlen.m4, taken from Gnulib, so
there is no need for Emacs to have its own workaround.
* configure.ac (ORIGINAL_AC_FUNC_STRNLEN, AC_FUNC_STRNLEN):
Remove.

(cherry picked from commit 2067c255e677f77eaf27dc992400111d8ac59bfd)

3 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Tue, 16 Jul 2024 02:03:17 +0000 (19:03 -0700)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit f5dbdedcc53d2c57b9ddecbe9248c90ef0fa08d6)

3 months ago; Skip commit 7d8ff5a56c52ed8917d9f45f2b113cfd3de7d497
Eshel Yaron [Wed, 17 Jul 2024 21:51:37 +0000 (23:51 +0200)]
; Skip commit 7d8ff5a56c52ed8917d9f45f2b113cfd3de7d497

3 months agoMake error messages adhere to our standards
Stefan Kangas [Tue, 16 Jul 2024 02:53:38 +0000 (04:53 +0200)]
Make error messages adhere to our standards

* src/cygw32.c (chdir_to_default_directory):
* src/fns.c (secure_hash):
* src/keyboard.c (Finternal_handle_focus_in):
* src/keymap.c (store_in_keymap):
* src/pgtkfns.c (pgtk_set_scroll_bar_foreground)
(pgtk_set_scroll_bar_background, Fx_export_frames)
(Fpgtk_set_monitor_scale_factor, pgtk_get_defaults_value)
(pgtk_set_defaults_value, Fpgtk_print_frames_dialog)
(pgtk_get_monitor_scale_factor):
* src/pgtkterm.c (pgtk_set_parent_frame):
* src/process.c (network_interface_info, send_process):
* src/w32.c (w32_read_registry):
* src/w32fns.c (Fw32_read_registry):
* src/window.c (Frecenter):
* src/xfns.c (Fx_export_frames, Fx_print_frames_dialog)
(x_set_mouse_color): Make 'error' message strings follow our guidelines.
More specifically, they should not end in a period, and normally also be
capitalized.  See '(elisp) Programming Tips'.

(cherry picked from commit 970409916e0dff9cd4d542f16f7d570149bdeeb1)