commit a4db9b35e16316a9bec57990a189f774ee165fec (HEAD, refs/remotes/origin/master) Merge: 458a79b3c7e cd9a215ef07 Author: Yuan Fu Date: Tue Aug 6 22:02:44 2024 -0700 Merge from savannah/emacs-30 commit cd9a215ef0768534881b775f66a9a3fa9ffceb44 (refs/remotes/origin/emacs-30) Author: Yuan Fu Date: Tue Aug 6 21:58:04 2024 -0700 ; Minor fix in c-ts-common--fill-block-comment * lisp/progmodes/c-ts-common.el: (c-ts-common--fill-block-comment): Checking for end-mask done is equivalent to checking end-marker, so the original code doesn't have a bug. diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el index 14dd29e07e2..2ee150748c5 100644 --- a/lisp/progmodes/c-ts-common.el +++ b/lisp/progmodes/c-ts-common.el @@ -214,7 +214,7 @@ comment." (goto-char start-marker) (delete-char 1) (insert "/")) - (when (and end-mask-done start-marker) + (when (and end-mask-done end-marker) (goto-char end-marker) (delete-region (point) (+ end-len (point))) (insert (make-string end-len ?\s))) commit 458a79b3c7eb164e254f86d5610418ffd5050fec Author: Yuan Fu Date: Tue Aug 6 21:54:20 2024 -0700 ; Minor change in c-ts-common--fill-block-comment * lisp/progmodes/c-ts-common.el: (c-ts-common--fill-block-comment): Add check for end-mask-done. This doesn't affect correctness, but makes the code easier to read. diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el index 7d51d2434e6..7609d8fdc61 100644 --- a/lisp/progmodes/c-ts-common.el +++ b/lisp/progmodes/c-ts-common.el @@ -209,7 +209,7 @@ comment." (fill-region (max start-marker para-start) (min end para-end) arg)) ;; Unmask. - (when end-marker + (when (and end-marker end-mask-done) (goto-char end-marker) (delete-region (point) (+ end-len (point))) (insert (make-string end-len ?\s))) commit 1a4c26d413f06342fc7fa9230f9312a95a37dae3 Merge: aa5c725fe7b 679f7ccc49f Author: Po Lu Date: Wed Aug 7 09:21:27 2024 +0800 Merge from savannah/emacs-30 679f7ccc49f Prevent accesses to /content files without a GUI connection f0a7eec5a7d * lisp/net/tramp-integration.el (shortdoc): Use `tramp--w... fb642d9cf54 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/... f1e37ae423f Avoid crashes in very large buffers with long lines 4dc9e99349d Update description of string comparison functions 3817355aed5 Add sanity check when adding Tramp functions to shortdoc 1bbb3220179 ; * lisp/erc/erc-fill.el (erc-fill-wrap-mode): Doc fix. 3f6e7e1da68 js-ts-mode: Make jsdoc's "description" block a comment (b... 1c7e00f4f65 Also condition cjk-misc font-spec on Android b89d65df5fa ; * etc/PROBLEMS: How to install sources on SUSE Linux (b... 729b17c2026 ; * src/lread.c (Fload): Add comment. (Bug#72433) bfb1aee9989 Fix ':defer nil' in 'use-package' d787817076e Document unsupported color Emoji on OpenBSD db1f749db55 Fix regressions in Customize caused by 'widget-unselected... f94d58008eb Avoid inserting extra space in SVG data 292fcd20099 Fix c-ts-common filling function (bug#71760) e50d597f450 Fix missing type checks before specbind # Conflicts: # lisp/progmodes/c-ts-common.el commit 679f7ccc49f6300681309029f4e58cffe3e9ff1a Author: Po Lu Date: Wed Aug 7 09:17:57 2024 +0800 Prevent accesses to /content files without a GUI connection * src/androidvfs.c (android_content_name): Hide all subdirectories when `android_init_gui' is not set. diff --git a/src/androidvfs.c b/src/androidvfs.c index bb855099c77..14da8eed37e 100644 --- a/src/androidvfs.c +++ b/src/androidvfs.c @@ -2599,9 +2599,10 @@ android_content_name (struct android_vnode *vnode, char *name, component_end++; /* Now, find out if the first component is a special vnode; if so, - call its root lookup function with the rest of NAME there. */ + call its root lookup function with the rest of NAME there. What is + more, content files are inaccessible in the absence of a GUI. */ - if (api < 19) + if (api < 19 || !android_init_gui) i = 3; else if (api < 21) i = 1; commit f0a7eec5a7ddd4a009d050b97acf29744d576e5d Author: Michael Albinus Date: Tue Aug 6 20:25:20 2024 +0200 * lisp/net/tramp-integration.el (shortdoc): Use `tramp--with-startup'. diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el index 6b28ddb7472..8d039c25eae 100644 --- a/lisp/net/tramp-integration.el +++ b/lisp/net/tramp-integration.el @@ -274,37 +274,38 @@ NAME must be equal to `tramp-current-connection'." ;;; Integration of shortdoc.el: -(with-eval-after-load 'shortdoc - ;; Some packages deactivate Tramp. They don't deserve a shortdoc entry then. - (when (file-remote-p "/ssh:user@host:/tmp/foo") - (dolist (elem `((file-remote-p - :eval (file-remote-p "/ssh:user@host:/tmp/foo") - :eval (file-remote-p "/ssh:user@host:/tmp/foo" 'method) - :eval (file-remote-p "/ssh:user@[::1]#1234:/tmp/foo" 'host) - ;; We don't want to see the text properties. - :no-eval (file-remote-p "/sudo::/tmp/foo" 'user) - :result ,(substring-no-properties - (file-remote-p "/sudo::/tmp/foo" 'user))) - (file-local-name - :eval (file-local-name "/ssh:user@host:/tmp/foo")) - (file-local-copy - :no-eval (file-local-copy "/ssh:user@host:/tmp/foo") - :eg-result "/tmp/tramp.8ihLbO" - :eval (file-local-copy "/tmp/foo")))) - (unless (assoc (car elem) - (member "Remote Files" (assq 'file shortdoc--groups))) - (shortdoc-add-function 'file "Remote Files" elem))) - - (add-hook - 'tramp-integration-unload-hook - (lambda () - (let ((glist (assq 'file shortdoc--groups))) - (while (and (consp glist) - (not (and (stringp (cadr glist)) - (string-equal (cadr glist) "Remote Files")))) - (setq glist (cdr glist))) - (when (consp glist) - (setcdr glist nil))))))) +(tramp--with-startup + (with-eval-after-load 'shortdoc + ;; Some packages deactivate Tramp. They don't deserve a shortdoc entry then. + (when (file-remote-p "/ssh:user@host:/tmp/foo") + (dolist (elem `((file-remote-p + :eval (file-remote-p "/ssh:user@host:/tmp/foo") + :eval (file-remote-p "/ssh:user@host:/tmp/foo" 'method) + :eval (file-remote-p "/ssh:user@[::1]#1234:/tmp/foo" 'host) + ;; We don't want to see the text properties. + :no-eval (file-remote-p "/sudo::/tmp/foo" 'user) + :result ,(substring-no-properties + (file-remote-p "/sudo::/tmp/foo" 'user))) + (file-local-name + :eval (file-local-name "/ssh:user@host:/tmp/foo")) + (file-local-copy + :no-eval (file-local-copy "/ssh:user@host:/tmp/foo") + :eg-result "/tmp/tramp.8ihLbO" + :eval (file-local-copy "/tmp/foo")))) + (unless (assoc (car elem) + (member "Remote Files" (assq 'file shortdoc--groups))) + (shortdoc-add-function 'file "Remote Files" elem))) + + (add-hook + 'tramp-integration-unload-hook + (lambda () + (let ((glist (assq 'file shortdoc--groups))) + (while (and (consp glist) + (not (and (stringp (cadr glist)) + (string-equal (cadr glist) "Remote Files")))) + (setq glist (cdr glist))) + (when (consp glist) + (setcdr glist nil)))))))) ;;; Integration of compile.el: commit fb642d9cf546f52a11cdfef479447ce2e8fa3ec8 Merge: f1e37ae423f 4dc9e99349d Author: Eli Zaretskii Date: Tue Aug 6 21:20:52 2024 +0300 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/emacs into emacs-30 commit f1e37ae423f3be6224f88a21f30ed40e73a4ce22 Author: Eli Zaretskii Date: Tue Aug 6 21:19:49 2024 +0300 Avoid crashes in very large buffers with long lines * src/xdisp.c (get_large_narrowing_begv, get_large_narrowing_zv) (get_medium_narrowing_begv, get_medium_narrowing_zv): Use 'ptrdiff_t' instead of 'int', to prevent integer overflow in large buffers. (Bug#72497) diff --git a/src/xdisp.c b/src/xdisp.c index 1dadb372911..5add42ef11b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3621,14 +3621,14 @@ get_narrowed_len (struct window *w) static ptrdiff_t get_medium_narrowing_begv (struct window *w, ptrdiff_t pos) { - int len = get_narrowed_len (w); + ptrdiff_t len = get_narrowed_len (w); return max ((pos / len - 1) * len, BEGV); } static ptrdiff_t get_medium_narrowing_zv (struct window *w, ptrdiff_t pos) { - int len = get_narrowed_len (w); + ptrdiff_t len = get_narrowed_len (w); return min ((pos / len + 1) * len, ZV); } @@ -3678,9 +3678,9 @@ get_large_narrowing_begv (ptrdiff_t pos) { if (long_line_optimizations_region_size <= 0) return BEGV; - int len = long_line_optimizations_region_size / 2; - int begv = max (pos - len, BEGV); - int limit = long_line_optimizations_bol_search_limit; + ptrdiff_t len = long_line_optimizations_region_size / 2; + ptrdiff_t begv = max (pos - len, BEGV); + ptrdiff_t limit = long_line_optimizations_bol_search_limit; while (limit > 0) { if (begv == BEGV || FETCH_BYTE (CHAR_TO_BYTE (begv) - 1) == '\n') @@ -3696,7 +3696,7 @@ get_large_narrowing_zv (ptrdiff_t pos) { if (long_line_optimizations_region_size <= 0) return ZV; - int len = long_line_optimizations_region_size / 2; + ptrdiff_t len = long_line_optimizations_region_size / 2; return min (pos + len, ZV); } commit 4dc9e99349d23f6c7fc43f02d5f1e8c50f473183 Author: Ulrich Müller Date: Tue Aug 6 18:04:46 2024 +0200 Update description of string comparison functions * doc/lispref/strings.texi (Text Comparison): Swap descriptions of 'string-equal' (the function) and 'string=' (its alias). Same for 'string-lessp' and 'string<'. Document 'string>'. (Bug#72486) * doc/lispref/sequences.texi (Sequence Functions): Update cross reference to 'string-lessp'. diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 9b0a0d74f30..079fc6094c3 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -468,8 +468,9 @@ Specifically: @item Numbers are compared using @code{<} (@pxref{definition of <}). @item -Strings are compared using @code{string<} (@pxref{definition of -string<}) and symbols are compared by comparing their names as strings. +Strings are compared using @code{string-lessp} (@pxref{definition of +string-lessp}) and symbols are compared by comparing their names as +strings. @item Conses, lists, vectors and records are compared lexicographically. This means that the two sequences are compared element-wise from left to diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index d29665ac19b..09ab93ded27 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -502,7 +502,7 @@ in case if @code{case-fold-search} is non-@code{nil}. @end example @end defun -@defun string= string1 string2 +@defun string-equal string1 string2 This function returns @code{t} if the characters of the two strings match exactly. Symbols are also allowed as arguments, in which case the symbol names are used. Case is always significant, regardless of @@ -513,25 +513,25 @@ This function is equivalent to @code{equal} for comparing two strings the two strings are ignored; use @code{equal-including-properties} if you need to distinguish between strings that differ only in their text properties. However, unlike @code{equal}, if either argument is not a -string or symbol, @code{string=} signals an error. +string or symbol, @code{string-equal} signals an error. @example -(string= "abc" "abc") +(string-equal "abc" "abc") @result{} t -(string= "abc" "ABC") +(string-equal "abc" "ABC") @result{} nil -(string= "ab" "ABC") +(string-equal "ab" "ABC") @result{} nil @end example A unibyte and a multibyte string are equal in the sense of -@code{string=} if and only if they contain the same sequence of +@code{string-equal} if and only if they contain the same sequence of character codes all being in the range 0--127 (@acronym{ASCII}). @xref{Text Representations}. @end defun -@defun string-equal string1 string2 -@code{string-equal} is another name for @code{string=}. +@defun string= string1 string2 +@code{string=} is another name for @code{string-equal}. @end defun @defun string-equal-ignore-case string1 string2 @@ -597,9 +597,8 @@ that collation implements. @end defun @cindex lexical comparison of strings -@anchor{definition of string<} -@defun string< string1 string2 -@c (findex string< causes problems for permuted index!!) +@anchor{definition of string-lessp} +@defun string-lessp string1 string2 This function compares two strings a character at a time. It scans both the strings at the same time to find the first pair of corresponding characters that do not match. If the lesser character of these two is @@ -618,11 +617,11 @@ multibyte non-@acronym{ASCII} character (@pxref{Text Representations}). @example @group -(string< "abc" "abd") +(string-lessp "abc" "abd") @result{} t -(string< "abd" "abc") +(string-lessp "abd" "abc") @result{} nil -(string< "123" "abc") +(string-lessp "123" "abc") @result{} t @end group @end example @@ -634,15 +633,15 @@ no characters is less than any other string. @example @group -(string< "" "abc") +(string-lessp "" "abc") @result{} t -(string< "ab" "abc") +(string-lessp "ab" "abc") @result{} t -(string< "abc" "") +(string-lessp "abc" "") @result{} nil -(string< "abc" "ab") +(string-lessp "abc" "ab") @result{} nil -(string< "" "") +(string-lessp "" "") @result{} nil @end group @end example @@ -651,8 +650,8 @@ Symbols are also allowed as arguments, in which case their print names are compared. @end defun -@defun string-lessp string1 string2 -@code{string-lessp} is another name for @code{string<}. +@defun string< string1 string2 +@code{string<} is another name for @code{string-lessp}. @end defun @defun string-greaterp string1 string2 @@ -661,6 +660,10 @@ This function returns the result of comparing @var{string1} and @code{(string-lessp @var{string2} @var{string1})}. @end defun +@defun string> string1 string2 +@code{string>} is another name for @code{string-greaterp}. +@end defun + @cindex locale-dependent string comparison @defun string-collate-lessp string1 string2 &optional locale ignore-case This function returns @code{t} if @var{string1} is less than commit aa5c725fe7ba0a5e67ce1029061b2d887ddeb949 Author: Ulrich Müller Date: Tue Aug 6 09:40:28 2024 +0200 * lisp/format.el (format-alist): Make 'duden' format write-only. diff --git a/lisp/format.el b/lisp/format.el index 34bd30e83a5..fc44436874b 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -90,9 +90,9 @@ ;; FROM-FN used to call the "diac" command which is not widely ;; available and apparently not under a free software license: ;; https://nm.wu-wien.ac.at/nm/download/file/diac4.tar.gz - ;; Reliable round-trip conversion is not possible anyway - ;; and would be by heuristic method, so use nil for now. - nil iso-iso2duden t nil) + ;; Reliable round-trip conversion is not possible anyway and + ;; would be by heuristic method, so make it write-only for now. + iso-cvt-write-only iso-iso2duden t nil) (de646 ,(purecopy "German ASCII (ISO 646)") nil ,(purecopy "iconv -f iso646-de -t utf-8") commit 7b49261b5e33b0de967c885aeee988b0221026bb Author: Juri Linkov Date: Tue Aug 6 09:59:48 2024 +0300 * lisp/tab-bar.el (tab-bar--format-tab-group): Add 'current-group'. Use current-group symbol for current tab group item (bug#71883). diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 0ac31727ef4..8164ec51498 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1047,7 +1047,7 @@ The argument I is the tab index, and CURRENT-P is non-nil when the tab is current. Return the result as a keymap." (append `((,(intern (format "sep-%i" i)) menu-item ,(tab-bar-separator) ignore)) - `((,(intern (format "group-%i" i)) + `((,(intern (if current-p "current-group" (format "group-%i" i))) menu-item ,(if current-p (condition-case nil commit 0822d0c1cdd0f107c2090016ab528a5279c50756 Author: Pip Cet Date: Mon Aug 5 21:58:16 2024 +0000 Avoid compiler warning * src/timefns.c (Fdecode_time): Use 'UNINIT' to avoid a warning with gcc 14 and checking enabled. diff --git a/src/timefns.c b/src/timefns.c index 7d8ecd36407..9685b8a50d9 100644 --- a/src/timefns.c +++ b/src/timefns.c @@ -1555,7 +1555,7 @@ usage: (decode-time &optional TIME ZONE FORM) */) if HZ != 1 also set TH.ticks. */ time_t time_spec; Lisp_Object hz; - struct ticks_hz th; + struct ticks_hz th UNINIT; if (EQ (form, Qt)) { th = decode_lisp_time (specified_time, CFORM_TICKS_HZ).th; commit e7109dfd9c15312d20582efdde8c929c9a65282a Author: Pip Cet Date: Mon Aug 5 21:47:57 2024 +0000 Fix typo in pdumper.c * src/pdumper.c (dump_interval_node): Call 'dump_field_fixup_later' with the correct arguments. Discovered by Danny McClanahan. diff --git a/src/pdumper.c b/src/pdumper.c index 53bddf91f04..0b8dab3a734 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -2136,9 +2136,9 @@ dump_interval_node (struct dump_context *ctx, struct itree_node *node) if (node->parent) dump_field_fixup_later (ctx, &out, node, &node->parent); if (node->left) - dump_field_fixup_later (ctx, &out, node, &node->parent); + dump_field_fixup_later (ctx, &out, node, &node->left); if (node->right) - dump_field_fixup_later (ctx, &out, node, &node->parent); + dump_field_fixup_later (ctx, &out, node, &node->right); DUMP_FIELD_COPY (&out, node, begin); DUMP_FIELD_COPY (&out, node, end); DUMP_FIELD_COPY (&out, node, limit); commit ca258e81b81539dc20a06958f911fc5dcd3df922 Author: Pip Cet Date: Mon Aug 5 21:46:58 2024 +0000 * src/search.c (Fre__describe_compiled): Use 'CHECK_STRING'. diff --git a/src/search.c b/src/search.c index 2ff8b0599c4..087b99d87f3 100644 --- a/src/search.c +++ b/src/search.c @@ -3405,6 +3405,7 @@ DEFUN ("re--describe-compiled", Fre__describe_compiled, Sre__describe_compiled, If RAW is non-nil, just return the actual bytecode. */) (Lisp_Object regexp, Lisp_Object raw) { + CHECK_STRING (regexp); struct regexp_cache *cache_entry = compile_pattern (regexp, NULL, (!NILP (Vcase_fold_search) commit ee371f55b359b509cd381c87e78b5f5ee9311f37 Author: Mattias Engdegård Date: Mon Aug 5 21:27:17 2024 +0200 Avoid warning when building on macOS versions < 14 (bug#72440) * src/nsterm.m ([EmacsView initFrameFromEmacs:]): The clipsToBounds property of NSView is only public from macOS 14 on. diff --git a/src/nsterm.m b/src/nsterm.m index be9142f7a4a..5c2e6446f7e 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8073,9 +8073,10 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f #ifdef NS_IMPL_COCOA old_title = 0; maximizing_resize = NO; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 140000 /* Restore to default before macOS 14 (bug#72440). */ - if ([self respondsToSelector:@selector(setClipsToBounds:)]) - [self setClipsToBounds: YES]; + [self setClipsToBounds: YES]; +#endif #endif #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 commit 3817355aed503e79c03bca5d203bd73716d10d9e Author: Michael Albinus Date: Mon Aug 5 20:19:30 2024 +0200 Add sanity check when adding Tramp functions to shortdoc * lisp/net/tramp-integration.el (shortdoc): Check, that Tramp isn't disabled. diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el index 56deaf9066b..6b28ddb7472 100644 --- a/lisp/net/tramp-integration.el +++ b/lisp/net/tramp-integration.el @@ -275,34 +275,36 @@ NAME must be equal to `tramp-current-connection'." ;;; Integration of shortdoc.el: (with-eval-after-load 'shortdoc - (dolist (elem `((file-remote-p - :eval (file-remote-p "/ssh:user@host:/tmp/foo") - :eval (file-remote-p "/ssh:user@host:/tmp/foo" 'method) - :eval (file-remote-p "/ssh:user@[::1]#1234:/tmp/foo" 'host) - ;; We don't want to see the text properties. - :no-eval (file-remote-p "/sudo::/tmp/foo" 'user) - :result ,(substring-no-properties - (file-remote-p "/sudo::/tmp/foo" 'user))) - (file-local-name - :eval (file-local-name "/ssh:user@host:/tmp/foo")) - (file-local-copy - :no-eval (file-local-copy "/ssh:user@host:/tmp/foo") - :eg-result "/tmp/tramp.8ihLbO" - :eval (file-local-copy "/tmp/foo")))) - (unless (assoc (car elem) - (member "Remote Files" (assq 'file shortdoc--groups))) - (shortdoc-add-function 'file "Remote Files" elem))) - - (add-hook - 'tramp-integration-unload-hook - (lambda () - (let ((glist (assq 'file shortdoc--groups))) - (while (and (consp glist) - (not (and (stringp (cadr glist)) - (string-equal (cadr glist) "Remote Files")))) - (setq glist (cdr glist))) - (when (consp glist) - (setcdr glist nil)))))) + ;; Some packages deactivate Tramp. They don't deserve a shortdoc entry then. + (when (file-remote-p "/ssh:user@host:/tmp/foo") + (dolist (elem `((file-remote-p + :eval (file-remote-p "/ssh:user@host:/tmp/foo") + :eval (file-remote-p "/ssh:user@host:/tmp/foo" 'method) + :eval (file-remote-p "/ssh:user@[::1]#1234:/tmp/foo" 'host) + ;; We don't want to see the text properties. + :no-eval (file-remote-p "/sudo::/tmp/foo" 'user) + :result ,(substring-no-properties + (file-remote-p "/sudo::/tmp/foo" 'user))) + (file-local-name + :eval (file-local-name "/ssh:user@host:/tmp/foo")) + (file-local-copy + :no-eval (file-local-copy "/ssh:user@host:/tmp/foo") + :eg-result "/tmp/tramp.8ihLbO" + :eval (file-local-copy "/tmp/foo")))) + (unless (assoc (car elem) + (member "Remote Files" (assq 'file shortdoc--groups))) + (shortdoc-add-function 'file "Remote Files" elem))) + + (add-hook + 'tramp-integration-unload-hook + (lambda () + (let ((glist (assq 'file shortdoc--groups))) + (while (and (consp glist) + (not (and (stringp (cadr glist)) + (string-equal (cadr glist) "Remote Files")))) + (setq glist (cdr glist))) + (when (consp glist) + (setcdr glist nil))))))) ;;; Integration of compile.el: commit 3ad4623bec49428fda34a475641eae9f1f33fc78 Author: Gerd Möllmann Date: Mon Aug 5 17:26:23 2024 +0200 ; Fix the fix for EmacsView * src/nsterm.m ([EmacsView initFrameFromEmacs:]): Check if setClipsToBound is available. diff --git a/src/nsterm.m b/src/nsterm.m index 3f0669aeefe..be9142f7a4a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8074,7 +8074,8 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f old_title = 0; maximizing_resize = NO; /* Restore to default before macOS 14 (bug#72440). */ - [self setClipsToBounds: YES]; + if ([self respondsToSelector:@selector(setClipsToBounds:)]) + [self setClipsToBounds: YES]; #endif #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 commit 1d0c68fbdcbfe0ab5f4e14882d8003f7b7d7d0a0 Author: Mattias Engdegård Date: Mon Aug 5 16:44:17 2024 +0200 ; * lisp/transient.el: require pp to defvar pp-default-function diff --git a/lisp/transient.el b/lisp/transient.el index eb3f3062045..7ec9848889f 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -37,6 +37,7 @@ (require 'edmacro) (require 'format-spec) (require 'seq) +(require 'pp) (eval-when-compile (require 'subr-x)) commit c7d9cd722e5a7042a52c92f8497f903bfe9870b8 Author: Jonas Bernoulli Date: Mon Aug 5 14:41:02 2024 +0200 Update to Transient v0.7.4-1-g3d9e9358 diff --git a/doc/misc/transient.texi b/doc/misc/transient.texi index 10e4c9deef1..8ec70464050 100644 --- a/doc/misc/transient.texi +++ b/doc/misc/transient.texi @@ -31,7 +31,7 @@ General Public License for more details. @finalout @titlepage @title Transient User and Developer Manual -@subtitle for version 0.7.2.1 +@subtitle for version 0.7.4 @author Jonas Bernoulli @page @vskip 0pt plus 1filll @@ -53,7 +53,7 @@ resource to get over that hurdle is Psionic K's interactive tutorial, available at @uref{https://github.com/positron-solutions/transient-showcase}. @noindent -This manual is for Transient version 0.7.2.1. +This manual is for Transient version 0.7.4. @insertcopying @end ifnottex @@ -1497,15 +1497,31 @@ values. In complex cases it might be necessary to use this variable instead, i.e., if you need access to information beside the value. @end defvar +@defvar transient-current-command +The transient from which this suffix command was invoked. The +returned value is a symbol, the transient prefix command. +@end defvar + @defvar transient-current-prefix The transient from which this suffix command was invoked. The returned value is a @code{transient-prefix} object, which holds information associated with the transient prefix command. @end defvar -@defvar transient-current-command -The transient from which this suffix command was invoked. The -returned value is a symbol, the transient prefix command. +@defvar transient-active-prefix +This function returns the active transient object. Return @code{nil} if +there is no active transient, if the transient buffer isn't shown, +and while the active transient is suspended (e.g., while the +minibuffer is in use). + +Unlike @code{transient-current-prefix}, which is only ever non-@code{nil} in code +that is run directly by a command that is invoked while a transient +is current, this function is also suitable for use in asynchronous +code, such as timers and callbacks (this function's main use-case). + +If optional PREFIXES is non-@code{nil}, it must be a list of prefix command +symbols, in which case the active transient object is only returned +if it matches one of the PREFIXES." @end defvar @node Transient State diff --git a/lisp/transient.el b/lisp/transient.el index 71702cbda2f..eb3f3062045 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -5,7 +5,7 @@ ;; Author: Jonas Bernoulli ;; URL: https://github.com/magit/transient ;; Keywords: extensions -;; Version: 0.7.2.1 +;; Version: 0.7.4 ;; SPDX-License-Identifier: GPL-3.0-or-later @@ -36,41 +36,7 @@ (require 'eieio) (require 'edmacro) (require 'format-spec) - -(eval-and-compile - (when (and (featurep 'seq) - (not (fboundp 'seq-keep))) - (unload-feature 'seq 'force))) (require 'seq) -(unless (fboundp 'seq-keep) - (display-warning 'transient (substitute-command-keys "\ -Transient requires `seq' >= 2.24, -but due to bad defaults, Emacs's package manager, refuses to -upgrade this and other built-in packages to higher releases -from GNU Elpa, when a package specifies that this is needed. - -To fix this, you have to add this to your init file: - - (setq package-install-upgrade-built-in t) - -Then evaluate that expression by placing the cursor after it -and typing \\[eval-last-sexp]. - -Once you have done that, you have to explicitly upgrade `seq': - - \\[package-upgrade] seq \\`RET' - -Then you also must make sure the updated version is loaded, -by evaluating this form: - - (progn (unload-feature 'seq t) (require 'seq)) - -Until you do this, you will get random errors about `seq-keep' -being undefined while using Transient. - -If you don't use the `package' package manager but still get -this warning, then your chosen package manager likely has a -similar defect.") :emergency)) (eval-when-compile (require 'subr-x)) @@ -80,7 +46,6 @@ similar defect.") :emergency)) (declare-function Man-getpage-in-background "man" (topic)) (defvar Man-notify-method) -(defvar pp-default-function) ; since Emacs 29.1 (defmacro transient--with-emergency-exit (id &rest body) (declare (indent defun)) @@ -1588,6 +1553,31 @@ This is bound while the suffixes are drawn in the transient buffer.") ;;; Identities +(defun transient-active-prefix (&optional prefixes) + "Return the active transient object. + +Return nil if there is no active transient, if the transient buffer +isn't shown, and while the active transient is suspended (e.g., while +the minibuffer is in use). + +Unlike `transient-current-prefix', which is only ever non-nil in code +that is run directly by a command that is invoked while a transient +is current, this function is also suitable for use in asynchronous +code, such as timers and callbacks (this function's main use-case). + +If optional PREFIXES is non-nil, it must be a list of prefix command +symbols, in which case the active transient object is only returned +if it matches one of the PREFIXES." + (and transient--showp + transient--prefix + (or (not prefixes) + (memq (oref transient--prefix command) prefixes)) + (or (memq 'transient--pre-command pre-command-hook) + (and (memq t pre-command-hook) + (memq 'transient--pre-command + (default-value 'pre-command-hook)))) + transient--prefix)) + (defun transient-prefix-object () "Return the current prefix as an object. @@ -2432,72 +2422,35 @@ value. Otherwise return CHILDREN as is." (remove-hook 'minibuffer-exit-hook ,exit))) ,@body))) -(static-if (>= emacs-major-version 30) ;transient--wrap-command - (defun transient--wrap-command () - (cl-assert - (>= emacs-major-version 30) nil - "Emacs was downgraded, making it necessary to recompile Transient") - (letrec - ((prefix transient--prefix) - (suffix this-command) - (advice - (lambda (fn &rest args) - (interactive - (lambda (spec) - (let ((abort t)) - (unwind-protect - (prog1 (let ((debugger #'transient--exit-and-debug)) - (advice-eval-interactive-spec spec)) - (setq abort nil)) - (when abort - (when-let ((unwind (oref prefix unwind-suffix))) - (transient--debug 'unwind-interactive) - (funcall unwind suffix)) - (advice-remove suffix advice) - (oset prefix unwind-suffix nil)))))) - (unwind-protect - (let ((debugger #'transient--exit-and-debug)) - (apply fn args)) - (when-let ((unwind (oref prefix unwind-suffix))) - (transient--debug 'unwind-command) - (funcall unwind suffix)) - (advice-remove suffix advice) - (oset prefix unwind-suffix nil))))) - (when (symbolp this-command) - (advice-add suffix :around advice '((depth . -99)))))) - - (defun transient--wrap-command () - (let* ((prefix transient--prefix) - (suffix this-command) - (advice nil) - (advice-interactive - (lambda (spec) - (let ((abort t)) - (unwind-protect - (prog1 (let ((debugger #'transient--exit-and-debug)) - (advice-eval-interactive-spec spec)) - (setq abort nil)) - (when abort - (when-let ((unwind (oref prefix unwind-suffix))) - (transient--debug 'unwind-interactive) - (funcall unwind suffix)) - (advice-remove suffix advice) - (oset prefix unwind-suffix nil)))))) - (advice-body - (lambda (fn &rest args) - (unwind-protect - (let ((debugger #'transient--exit-and-debug)) - (apply fn args)) - (when-let ((unwind (oref prefix unwind-suffix))) - (transient--debug 'unwind-command) - (funcall unwind suffix)) - (advice-remove suffix advice) - (oset prefix unwind-suffix nil))))) - (setq advice `(lambda (fn &rest args) - (interactive ,advice-interactive) - (apply ',advice-body fn args))) - (when (symbolp this-command) - (advice-add suffix :around advice '((depth . -99))))))) +(defun transient--wrap-command () + (letrec + ((prefix transient--prefix) + (suffix this-command) + (advice + (lambda (fn &rest args) + (interactive + (lambda (spec) + (let ((abort t)) + (unwind-protect + (prog1 (let ((debugger #'transient--exit-and-debug)) + (advice-eval-interactive-spec spec)) + (setq abort nil)) + (when abort + (when-let ((unwind (oref prefix unwind-suffix))) + (transient--debug 'unwind-interactive) + (funcall unwind suffix)) + (advice-remove suffix advice) + (oset prefix unwind-suffix nil)))))) + (unwind-protect + (let ((debugger #'transient--exit-and-debug)) + (apply fn args)) + (when-let ((unwind (oref prefix unwind-suffix))) + (transient--debug 'unwind-command) + (funcall unwind suffix)) + (advice-remove suffix advice) + (oset prefix unwind-suffix nil))))) + (when (symbolp this-command) + (advice-add suffix :around advice '((depth . -99)))))) (defun transient--premature-post-command () (and (equal (this-command-keys-vector) []) @@ -3764,68 +3717,39 @@ have a history of their own.") (insert " ")) (insert ?\n)) -(cl-defmethod transient--insert-group ((group transient-column)) +(cl-defmethod transient--insert-group ((group transient-column) + &optional skip-empty) (transient--maybe-pad-keys group) (dolist (suffix (oref group suffixes)) (let ((str (transient-with-shadowed-buffer (transient-format suffix)))) - (insert str) - (unless (string-match-p ".\n\\'" str) - (insert ?\n))))) + (unless (and (not skip-empty) (equal str "")) + (insert str) + (unless (string-match-p ".\n\\'" str) + (insert ?\n)))))) (cl-defmethod transient--insert-group ((group transient-columns)) - (let* ((columns - (mapcar - (lambda (column) - (transient--maybe-pad-keys column group) - (transient-with-shadowed-buffer - (let* ((transient--pending-group column) - (rows (mapcar #'transient-format (oref column suffixes)))) - (if-let ((desc (transient-format-description column))) - (cons desc rows) - rows)))) - (oref group suffixes))) - (vp (or (oref transient--prefix variable-pitch) - transient-align-variable-pitch)) - (rs (apply #'max (mapcar #'length columns))) - (cs (length columns)) - (cw (mapcar (let ((widths (oref transient--prefix column-widths))) - (lambda (col) - (apply - #'max - (if-let ((min (pop widths))) - (if vp (* min (transient--pixel-width " ")) min) - 0) - (mapcar (if vp #'transient--pixel-width #'length) - col)))) - columns)) - (cc (transient--seq-reductions-from - (apply-partially #'+ (* 2 (if vp (transient--pixel-width " ") 1))) - cw 0))) - (if transient-force-single-column - (dotimes (c cs) - (dotimes (r rs) - (when-let ((cell (nth r (nth c columns)))) - (unless (equal cell "") - (insert cell ?\n)))) - (unless (= c (1- cs)) - (insert ?\n))) - (dotimes (r rs) - (dotimes (c cs) - (if vp - (progn - (when-let ((cell (nth r (nth c columns)))) - (insert cell)) - (if (= c (1- cs)) - (insert ?\n) - (insert (propertize " " 'display - `(space :align-to (,(nth (1+ c) cc))))))) - (when (> c 0) - (insert (make-string (max 1 (- (nth c cc) (current-column))) - ?\s))) - (when-let ((cell (nth r (nth c columns)))) - (insert cell)) - (when (= c (1- cs)) - (insert ?\n)))))))) + (if transient-force-single-column + (dolist (group (oref group suffixes)) + (transient--insert-group group t)) + (let* ((columns + (mapcar + (lambda (column) + (transient--maybe-pad-keys column group) + (transient-with-shadowed-buffer + `(,@(and-let* ((desc (transient-format-description column))) + (list desc)) + ,@(let ((transient--pending-group column)) + (mapcar #'transient-format (oref column suffixes)))))) + (oref group suffixes))) + (stops (transient--column-stops columns))) + (dolist (row (apply #'transient--mapn #'list columns)) + (let ((stops stops)) + (dolist (cell row) + (let ((stop (pop stops))) + (when cell + (transient--align-to stop) + (insert cell))))) + (insert ?\n))))) (cl-defmethod transient--insert-group ((group transient-subgroups)) (let ((subgroups (oref group suffixes))) @@ -4003,9 +3927,8 @@ face `transient-heading' to the complete string." (cl-defmethod transient-format-description :around ((obj transient-suffix)) "Format the description by calling the next method. If the result is nil, then use \"(BUG: no description)\" as the -description. -If the OBJ's `key' is currently unreachable, then apply the face -`transient-unreachable' to the complete string." +description. If the OBJ's `key' is currently unreachable, then +apply the face `transient-unreachable' to the complete string." (let ((desc (or (cl-call-next-method obj) (and (slot-boundp transient--prefix 'suffix-description) (funcall (oref transient--prefix suffix-description) @@ -4141,6 +4064,28 @@ If the OBJ's `key' is currently unreachable, then apply the face (car (window-text-pixel-size nil (line-beginning-position) (point)))))) +(defun transient--column-stops (columns) + (let* ((var-pitch (or transient-align-variable-pitch + (oref transient--prefix variable-pitch))) + (char-width (and var-pitch (transient--pixel-width " ")))) + (transient--seq-reductions-from + (apply-partially #'+ (* 2 (if var-pitch char-width 1))) + (transient--mapn + (lambda (cells min) + (apply #'max + (if min (if var-pitch (* min char-width) min) 0) + (mapcar (if var-pitch #'transient--pixel-width #'length) cells))) + columns + (oref transient--prefix column-widths)) + 0))) + +(defun transient--align-to (stop) + (unless (zerop stop) + (insert (if (or transient-align-variable-pitch + (oref transient--prefix variable-pitch)) + (propertize " " 'display `(space :align-to (,stop))) + (make-string (max 0 (- stop (current-column))) ?\s))))) + (defun transient-command-summary-or-name (obj) "Return the summary or name of the command represented by OBJ. @@ -4495,6 +4440,17 @@ we stop there." (push (funcall function (car acc) elt) acc)) (nreverse acc))) +(defun transient--mapn (function &rest lists) + "Apply FUNCTION to elements of LISTS. +Like `cl-mapcar' but while that stops when the shortest list +is exhausted, continue until the longest list is, using nil +as stand-in for elements of exhausted lists." + (let (result) + (while (catch 'more (mapc (lambda (l) (and l (throw 'more t))) lists) nil) + (push (apply function (mapcar #'car-safe lists)) result) + (setq lists (mapcar #'cdr lists))) + (nreverse result))) + ;;; Font-Lock (defconst transient-font-lock-keywords commit f1e29506822739208e5706b733cfd713c5f37cfd Author: Gerd Möllmann Date: Mon Aug 5 11:39:44 2024 +0200 ; Fix last change in EmacsView * src/nsterm.m ([EmacsView initFrameFromEmacs:]): Don't check AppKit version. diff --git a/src/nsterm.m b/src/nsterm.m index 296e58c1697..3f0669aeefe 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8074,8 +8074,7 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f old_title = 0; maximizing_resize = NO; /* Restore to default before macOS 14 (bug#72440). */ - if (NSAppKitVersionNumber >= NSAppKitVersionNumber14_0) - [self setClipsToBounds: YES]; + [self setClipsToBounds: YES]; #endif #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 commit 9253910a5a5ec89fe6e676e53f355f3b0bdc176e Author: Gerd Möllmann Date: Mon Aug 5 09:39:01 2024 +0200 Restore a default before macOS 14 API change (bug#72440) * src/nsterm.m ([EmacsView initFrameFromEmacs:]): Set clipsToBounds to YES. diff --git a/src/nsterm.m b/src/nsterm.m index b883e605a5b..296e58c1697 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8073,6 +8073,9 @@ - (instancetype) initFrameFromEmacs: (struct frame *)f #ifdef NS_IMPL_COCOA old_title = 0; maximizing_resize = NO; + /* Restore to default before macOS 14 (bug#72440). */ + if (NSAppKitVersionNumber >= NSAppKitVersionNumber14_0) + [self setClipsToBounds: YES]; #endif #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 commit 1bbb3220179f2f063cb8252646c34c2bf359decb Author: F. Jason Park Date: Sun Aug 4 22:26:11 2024 -0700 ; * lisp/erc/erc-fill.el (erc-fill-wrap-mode): Doc fix. diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el index defef6fe414..c863d99a339 100644 --- a/lisp/erc/erc-fill.el +++ b/lisp/erc/erc-fill.el @@ -490,16 +490,15 @@ option `erc-fill-wrap-margin-width'. To use it, either include `erc-fill-wrap'. Once enabled, use \\[erc-fill-wrap-nudge] to adjust the width of -the indent and the stamp margin. And For cycling between +the indent and the stamp margin. For cycling between logical- and screen-line oriented command movement, see \\[erc-fill-wrap-toggle-truncate-lines]. Similarly, use \\[erc-fill-wrap-refill-buffer] to fix alignment problems after running certain commands, like `text-scale-adjust'. Also see -related stylistic options `erc-fill-wrap-merge', and +related stylistic options `erc-fill-wrap-merge' and `erc-fill-wrap-merge-indicator'. (Hint: in narrow windows, try -setting `erc-fill-static-center' to 1, and if you use -`erc-fill-wrap-merge-indicator', choose \"Leading MIDDLE DOT sans -gap\" or one of the \"trailing\" items from the Customize menu.) +setting `erc-fill-static-center' to 1 and choosing \"Leading +MIDDLE DOT sans gap\" for `erc-fill-wrap-merge-indicator'.) This module imposes various restrictions on the appearance of timestamps. Most notably, it insists on displaying them in the @@ -510,12 +509,11 @@ Additionally, this module assumes that users providing their own `erc-insert-timestamp-function' have also customized the option `erc-fill-wrap-margin-side' to an explicit side. When stamps appear in the right margin, which they do by default, users may -find that ERC actually appends them to copy-as-killed messages -without an intervening space. This normally poses at most a -minor inconvenience, however users of the `log' module may prefer -a workaround provided by `erc-stamp-prefix-log-filter', which -strips trailing stamps from logged messages and instead prepends -them to every line. +find that ERC actually appends them to copy-as-killed messages. +This normally poses at most a minor inconvenience. Users of the +`log' module wanting to avoid this effect in logs should see +`erc-stamp-prefix-log-filter', which strips trailing stamps from +logged messages and instead prepends them to every line. A so-called \"local\" module, `fill-wrap' depends on the global modules `fill', `stamp', `button', and `scrolltobottom'. It commit 3f6e7e1da682b708ece0ac79b9c6b8acb357d729 Author: Damien Cassou Date: Sun Jul 21 21:32:34 2024 +0200 js-ts-mode: Make jsdoc's "description" block a comment (bug#72461) * lisp/progmodes/js.el (js-ts-mode): Add "description" to `c-ts-common--comment-regexp'. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index f8140c14a49..75c8111035c 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3946,7 +3946,9 @@ See `treesit-thing-settings' for more information.") :embed 'jsdoc :host 'javascript :local t - `(((comment) @capture (:match ,js--treesit-jsdoc-beginning-regexp @capture)))))) + `(((comment) @capture (:match ,js--treesit-jsdoc-beginning-regexp @capture))))) + + (setq c-ts-common--comment-regexp (rx (or "comment" "line_comment" "block_comment" "description")))) ;; Imenu (setq-local treesit-simple-imenu-settings commit 1c7e00f4f653cf3d30006cefe6568227dcb91c60 Author: Po Lu Date: Mon Aug 5 09:34:11 2024 +0800 Also condition cjk-misc font-spec on Android * lisp/international/fontset.el (setup-default-fontset) : Don't search for matching scripts elsewhere than on Android. diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index d60349e05e3..b52ac1994c2 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -724,7 +724,9 @@ ;; This is required, as otherwise many TrueType fonts ;; with CJK characters but no corresponding ``design ;; language'' declaration can't be found. - ,(font-spec :registry "iso10646-1" :script 'cjk-misc)) + ,@(and (featurep 'android) + (list (font-spec :registry "iso10646-1" + :script 'cjk-misc)))) (hangul (nil . "KSC5601.1987-0") ,(font-spec :registry "iso10646-1" :lang 'ko)) commit b89d65df5fad102aa6abf0285d31b0abd148c907 Author: Björn Bidar Date: Sun Aug 4 16:09:36 2024 +0300 ; * etc/PROBLEMS: How to install sources on SUSE Linux (bug#72465). diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 5f9d09b695d..7d7c9ab5f27 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -456,6 +456,26 @@ However, the exact directory name will depend on the system, and you will need to both upgrade source and debug info when your system upgrades or patches Emacs, and change your startup file accordingly. +** SUSE based distributions (openSUSE, SUSE Linux Enterprise) + +On systems with distributions, you can install source and debug info via +superuser commands like the following: + + # Install Emacs source and debuginfo by using --plus-content + zypper --plus-content debug,source install \ + emacs-debuginfo emacs-debugsource + +To get describe-function and similar commands to work, you can then add +something like the following to your startup file: + + (setq find-function-C-source-directory + "/usr/src/debug/emacs-27.1-1/src/") + +The line above should work for all systems using zypper besides SUSE +based ones, however it could be that you have to adjust the path to the +sources slightly depending on the version of the distribution you have +installed. + ** Source and debuginfo for other systems If your system follows neither the Debian nor the Red Hat patterns, commit 729b17c20269ea78f0d1f07aafbeba7bd126f66a Author: Eli Zaretskii Date: Sun Aug 4 11:58:00 2024 +0300 ; * src/lread.c (Fload): Add comment. (Bug#72433) diff --git a/src/lread.c b/src/lread.c index 3feb27eda46..c336c6db6e1 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1752,6 +1752,9 @@ Return t if the file exists and loads successfully. */) saved_strings[i].size = 0; } + /* The "...done" messages are shown only in interactive mode, because + the echo-area can display only the last message, and we want to + avoid the impression that the load is still in progress. */ if (!noninteractive && (NILP (nomessage) || force_load_messages)) { if (is_module) commit bfb1aee99898d7704a64ee124217b9e9ca43d66d Author: Eli Zaretskii Date: Sun Aug 4 11:52:12 2024 +0300 Fix ':defer nil' in 'use-package' * lisp/use-package/use-package-core.el (use-package-normalize-keywords): Use 'plist-get' instead of 'plist-member'. (Bug#72414) diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el index dd4efd3831d..8c3241d5ee0 100644 --- a/lisp/use-package/use-package-core.el +++ b/lisp/use-package/use-package-core.el @@ -726,9 +726,9 @@ extending any keys already present." ;; If at this point no :load, :defer or :no-require has been seen, then ;; :load the package itself. - (when (and (not (plist-member args :load)) - (not (plist-member args :defer)) - (not (plist-member args :no-require))) + (when (and (not (plist-get args :load)) + (not (plist-get args :defer)) + (not (plist-get args :no-require))) (setq args (append args `(:load (,name))))) ;; Sort the list of keywords based on the order of `use-package-keywords'. commit d787817076e26d28163073847f01fd3587106355 Author: Manuel Giraud Date: Thu Jul 25 13:57:59 2024 +0200 Document unsupported color Emoji on OpenBSD Bug#72268 * etc/PROBLEMS (Runtime problems related to font handling): Document unsupported color Emoji on OpenBSD. diff --git a/etc/PROBLEMS b/etc/PROBLEMS index c1ad8321fa6..5f9d09b695d 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1274,6 +1274,27 @@ Emacs will select some other font instead. The only workaround is not to choose such font variants as the default font when running Emacs on MS-Windows. +** On OpenBSD, color Emoji are not supported by default. + +The system's FreeType library is not built with libpng support, so it +can't display color emoji. This is due to the fact that, on OpenBSD, +libpng is provided through ports and that a base component cannot depend +on that. + +However, you can add support for PNG in the system's FreeType library by +following those steps: + 1. Install the 'png' package. + 2. Read the release(8) man page for how to get Xenocara sources. + 3. Patch the file + "/usr/xenocara/lib/freetype/include/freetype/config/ftoption.h" + by uncommenting the "#define FT_CONFIG_OPTION_USE_PNG" line. + 4. Patch the file "/usr/xenocara/lib/freetype/Makefile" by + appending "-L/usr/local/lib -lpng" to LDADD and appending + "-I/usr/local/include" to CPPFLAGS. + 5. Build and install Xenocara (also, see release(8)). + +Note that this support will be gone after each OpenBSD's system upgrade. + * Internationalization problems ** M-{ does not work on a Spanish PC keyboard. commit db1f749db5560611f58c000b9582174b9187e045 Author: Stephen Berman Date: Thu Aug 1 19:28:04 2024 +0200 Fix regressions in Customize caused by 'widget-unselected' face * lisp/wid-edit.el (widget-checklist-add-item): Don't call 'widget-specify-selected'. (Bug#72404) (Bug#72156) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 693991a6f3e..e7e6351fcab 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -2549,7 +2549,10 @@ If the item is checked, CHOSEN is a cons whose cdr is the value." (t (widget-create-child-value widget type (car (cdr chosen))) - (widget-specify-selected child))))) + ;; This somehow breaks :options and other + ;; Custom features. + ;; (widget-specify-selected child) + )))) (t (error "Unknown escape `%c'" escape))))) ;; Update properties. commit f94d58008eb3d6e9d3ea9e9b967be329a880057b Author: David Ponce Date: Fri Jul 19 16:10:00 2024 +0200 Avoid inserting extra space in SVG data * lisp/svg.el (svg-print): Remove useless extra space from the XML representation of child node. (Bug#72198) diff --git a/lisp/svg.el b/lisp/svg.el index f2eb2ec66dd..f5c76145136 100644 --- a/lisp/svg.el +++ b/lisp/svg.el @@ -331,7 +331,6 @@ If the SVG is later changed, the image will also be updated." (insert (format " %s=\"%s\"" (car attr) (cdr attr))))) (insert ">") (dolist (elem (nthcdr 2 dom)) - (insert " ") (svg-print elem)) (insert (format "" (car dom))))) commit 292fcd2009918a3e4f15b6451ad521a0a92188ad Author: Damien Cassou Date: Sun Jul 21 21:33:59 2024 +0200 Fix c-ts-common filling function (bug#71760) * lisp/progmodes/c-ts-common.el (c-ts-common--fill-block-comment): If masking hasn't been done, don't unmask. diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el index 3882a697c48..14dd29e07e2 100644 --- a/lisp/progmodes/c-ts-common.el +++ b/lisp/progmodes/c-ts-common.el @@ -151,7 +151,9 @@ comment." (orig-point (point-marker)) (start-marker (point-marker)) (end-marker nil) - (end-len 0)) + (end-len 0) + (start-mask-done nil) + (end-mask-done nil)) (move-marker start-marker start) ;; We mask "/*" and the space before "*/" like ;; `c-fill-paragraph' does. @@ -162,6 +164,7 @@ comment." (group "/") "*")) (goto-char (match-beginning 1)) (move-marker start-marker (point)) + (setq start-mask-done t) (replace-match " " nil nil nil 1)) ;; Include whitespaces before /*. @@ -179,6 +182,7 @@ comment." (goto-char (match-beginning 1)) (setq end-marker (point-marker)) (setq end-len (- (match-end 1) (match-beginning 1))) + (setq end-mask-done t) (replace-match (make-string end-len ?x) nil nil nil 1)) @@ -206,11 +210,11 @@ comment." (fill-region (max start-marker para-start) (min end para-end) arg)) ;; Unmask. - (when start-marker + (when (and start-mask-done start-marker) (goto-char start-marker) (delete-char 1) (insert "/")) - (when end-marker + (when (and end-mask-done start-marker) (goto-char end-marker) (delete-region (point) (+ end-len (point))) (insert (make-string end-len ?\s))) commit e50d597f4508c6ef333c5616a2a924360437ba55 Author: Mattias Engdegård Date: Sat Aug 3 19:08:39 2024 +0200 Fix missing type checks before specbind This fixes bugs that crashed Emacs when the Lisp interpreter was fed bad code. * src/eval.c (FletX, Flet, internal_lisp_condition_case) (funcall_lambda): Hoist symbol-with-pos elimination and type checks to a dominating position for efficiency. This also plugs at least two typing holes. (Mea culpa.) * test/src/eval-tests.el (eval-bad-specbind): New regression test. diff --git a/src/eval.c b/src/eval.c index 1e0628b4aa3..3681641950c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1018,8 +1018,8 @@ usage: (let* VARLIST BODY...) */) } var = maybe_remove_pos_from_symbol (var); - if (!NILP (lexenv) && BARE_SYMBOL_P (var) - && !XBARE_SYMBOL (var)->u.s.declared_special + CHECK_TYPE (BARE_SYMBOL_P (var), Qsymbolp, var); + if (!NILP (lexenv) && !XBARE_SYMBOL (var)->u.s.declared_special && NILP (Fmemq (var, Vinternal_interpreter_environment))) /* Lexically bind VAR by adding it to the interpreter's binding alist. */ @@ -1090,10 +1090,10 @@ usage: (let VARLIST BODY...) */) varlist = XCDR (varlist); Lisp_Object var = maybe_remove_pos_from_symbol (SYMBOLP (elt) ? elt : Fcar (elt)); + CHECK_TYPE (BARE_SYMBOL_P (var), Qsymbolp, var); tem = temps[argnum]; - if (!NILP (lexenv) && SYMBOLP (var) - && !XSYMBOL (var)->u.s.declared_special + if (!NILP (lexenv) && !XBARE_SYMBOL (var)->u.s.declared_special && NILP (Fmemq (var, Vinternal_interpreter_environment))) /* Lexically bind VAR by adding it to the lexenv alist. */ lexenv = Fcons (Fcons (var, tem), lexenv); @@ -1492,7 +1492,7 @@ internal_lisp_condition_case (Lisp_Object var, Lisp_Object bodyform, ptrdiff_t CACHEABLE clausenb = 0; var = maybe_remove_pos_from_symbol (var); - CHECK_SYMBOL (var); + CHECK_TYPE (BARE_SYMBOL_P (var), Qsymbolp, var); Lisp_Object success_handler = Qnil; @@ -3280,18 +3280,18 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, Lisp_Object *arg_vector) { maybe_quit (); - Lisp_Object next = XCAR (syms_left); - if (!SYMBOLP (next)) + Lisp_Object next = maybe_remove_pos_from_symbol (XCAR (syms_left)); + if (!BARE_SYMBOL_P (next)) xsignal1 (Qinvalid_function, fun); - if (EQ (next, Qand_rest)) + if (BASE_EQ (next, Qand_rest)) { if (rest || previous_rest) xsignal1 (Qinvalid_function, fun); rest = 1; previous_rest = true; } - else if (EQ (next, Qand_optional)) + else if (BASE_EQ (next, Qand_optional)) { if (optional || rest || previous_rest) xsignal1 (Qinvalid_function, fun); @@ -3313,12 +3313,12 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, Lisp_Object *arg_vector) arg = Qnil; /* Bind the argument. */ - if (!NILP (lexenv) && SYMBOLP (next)) + if (!NILP (lexenv)) /* Lexically bind NEXT by adding it to the lexenv alist. */ lexenv = Fcons (Fcons (next, arg), lexenv); else /* Dynamically bind NEXT. */ - specbind (maybe_remove_pos_from_symbol (next), arg); + specbind (next, arg); previous_rest = false; } } diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el index 187dc2f34d5..e1663f489c5 100644 --- a/test/src/eval-tests.el +++ b/test/src/eval-tests.el @@ -362,5 +362,13 @@ expressions works for identifiers starting with period." (error err)))) (should (eq inner-error outer-error)))) +(ert-deftest eval-bad-specbind () + (should-error (eval '(let (((a b) 23)) (+ 1 2)) t) + :type 'wrong-type-argument) + (should-error (eval '(let* (((a b) 23)) (+ 1 2)) t) + :type 'wrong-type-argument) + (should-error (eval '(condition-case (a b) (+ 1 2) (:success 'ok))) + :type 'wrong-type-argument) + (should-error (eval '(funcall '(lambda ((a b) 3.15) 84) 5 4)))) ;;; eval-tests.el ends here