1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Merge from savannah/emacs-30

72cf9964f3 Inaccuracy in efaq.texi
fc48e9e8ed ; Fix typos in DOS Makefile scripts
9b8d754579 ; * etc/NEWS: Explain Nextstep.
8819e5a45d Fix treesit crash (bug#71681)
eaf2dc96c1 ; Fix SHR test on MS-Windows
57880f597c Delete redundant mention of `with-eval-after-load'
ea8ce98434 * doc/misc/efaq.texi (New in Emacs 30): Fix typos.
45a20d781a ; Fix typos in symbols
d95f039af4 Document security fixes in FAQ
d063af203c Add "New in Emacs 30" to FAQ
ca6b484162 ; * etc/NEWS: Move "Minibuffer and Completions"
35c46663e4 ; * etc/NEWS: Move item to "Lisp Changes".
0515b38d28 ; * etc/NEWS: Move keyboard macro items closer together.
22af3a7103 ; * etc/NEWS: More copy-edits.
000ef8876a ; * etc/NEWS: Move items to "Incompatible Lisp Changes".
4088dc8e4c ; * etc/NEWS: Rearrange "Incompatible Lisp Changes".
179800f36b ; * lisp/epg.el (epg--start): Add commentary about encoding.
73898f0214 Fix non-ASCII filename operatiion on EasyPG (bug#71500)
a65b6aac6b Silence warning with global minor mode :predicate
f5f7343ac4 ; * etc/NEWS: Move an item to "Startup Changes"
c95066bf18 ; * etc/NEWS: Move some Lisp items to better place.
bf7db88ce1 ; * etc/NEWS: Rearrange "Editing Changes in Emacs 30.1"
000424eb9e ; * etc/NEWS: Make touch screen support more prominent.
5b5671587f ; * etc/NEWS: Rearrange "Changes in Emacs 30.1".
31124abdef ; * lisp/thingatpt.el (sexp-at-point): Doc fix (bug#71777).
44f269d6e6 Fix: make 'xwidget-webkit-scroll-backward' scroll backwards
358085997c Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
736b7cad40 Add jsdoc support to php-ts-mode in <script> element
5f3d964e39 Update to Transient v0.7.2-4-gf75bc48d

# Conflicts:
#	etc/NEWS
This commit is contained in:
Po Lu 2024-06-30 10:06:09 +08:00
commit e2561e267f
28 changed files with 1030 additions and 890 deletions

View File

@ -847,6 +847,7 @@ in the Emacs development repository (@pxref{Latest version of Emacs}).
@menu
* Origin of the term Emacs::
* Latest version of Emacs::
* New in Emacs 30::
* New in Emacs 29::
* New in Emacs 28::
* New in Emacs 27::
@ -920,6 +921,90 @@ Emacs, type @kbd{C-h C-n} (@kbd{M-x view-emacs-news}). You can give
this command a prefix argument to read about which features were new
in older versions.
@node New in Emacs 30
@section What is different about Emacs 30?
@cindex Differences between Emacs 29 and Emacs 30
@cindex Emacs 30, new features in
Here's a list of the most important changes in Emacs 30 as compared to
Emacs 29. The full list is too long to fit here, but can be read in the
Emacs @file{NEWS} file by typing @kbd{C-h n} inside Emacs.
@itemize
@item
Native compilation is now enabled by default. When Emacs is built on a
machine with @samp{libgccjit}, this will improve Emacs performance in
many typical workloads.
@item
Emacs has been ported to the Android operating system. See the file
@file{java/INSTALL} in the Emacs source distribution for details on how
to build it.
@item
Numerous performance improvements, for example in parsing JSON, reading
data from subprocesses, handling output from Eshell and in Shell mode, X
selection requests, remote files, and so on.
@item
Native JSON support is now always available; libjansson is no longer
used.
@item
New major modes based on the
@uref{https://tree-sitter.github.io/tree-sitter/, tree-sitter library}
library for editing Elixir, HTML, Lua, HEEx, and PHP.
@item
Support for the EditorConfig standard has been added, an editor-neutral
way to provide directory local (project-wide) settings. It is enabled
via a new global minor mode @code{editorconfig-mode} which makes Emacs
obey the @file{.editorconfig} files.
@item
Support for touchscreens has been improved. On systems that understand
them (at present X, Android, PGTK, and MS-Windows), many touch screen
gestures are now implemented and translated into mouse or gesture
events, and support for tapping tool bar buttons and opening menus has
been added.
@item
Tool bar tweaks. The new minor mode @code{window-tool-bar-mode}
provides a per-window toolbar. Toolbars can be placed on the bottom of
a frame by setting the @code{tool-bar-position} variable on all window
systems but GNUStep and macOS.
@item
The @samp{which-key} package from GNU ELPA is now included in Emacs.
After enabling the minor mode mode @code{which-key-mode}, if you enter
@kbd{C-x} and wait for one second, the minibuffer will expand with all
available key bindings that follow @kbd{C-x} (or as many as space
allows).
@item
New global minor mode @code{kill-ring-deindent-mode}. When enabled,
text being saved to the kill ring will be de-indented by the column
number at its start.
@item
New minor mode @code{visual-wrap-prefix-mode}. Unlike @kbd{M-q}, the
indentation only happens on display, and doesn't change the buffer text
in any way.
@item
Automatic regeneration of TAGS files using the new global minor mode
@code{etags-regen-mode}.
@item
Improved warnings from the byte-code compiler to aid Lisp developers.
@item
Support for underline colors on TTY frames.
@end itemize
@node New in Emacs 29
@section What is different about Emacs 29?
@cindex Differences between Emacs 28 and Emacs 29
@ -929,6 +1014,9 @@ Here's a list of the most important changes in Emacs 29 as compared to
Emacs 28 (the full list is too long, and can be read in the Emacs
@file{NEWS} file by typing @kbd{C-h n} inside Emacs).
Note that Emacs 29.3 and 29.4 both contained important security fixes.
Upgrading is particularly important if you use Emacs as a mail client.
@itemize
@item
Emacs can now be built with the
@ -3576,6 +3664,21 @@ same privileges as the Emacs process itself. Be aware of this when
you use the package system (e.g. @code{M-x list-packages}) with third
party archives. Use only third parties that you can trust!
@item
Using an out-of-date Emacs version.
For security purposes, we recommend always using the latest officially
released version of Emacs. Using old versions of Emacs might put your
security at risk, as newer versions occasionally include important
security fixes. Please review the Emacs release notes and the
@file{etc/NEWS} file for details.
Upgrading to the most recent version is particularly important if you
use Emacs as a mail client, or to edit files that come from untrusted
sources. You should be able to install the latest version of Emacs
through your system's package manager, and it is always available at
@uref{https://www.gnu.org/software/emacs/, the Emacs website}.
@item
The @code{file-local-variable} feature. (Yes, a risk, but easy to
change.)

View File

@ -1208,7 +1208,10 @@ prefix's @code{transient--layout} property, but it is often more convenient
to use the same form as understood by @code{transient-define-prefix},
described below. If you use the latter approach, you can use the
@code{transient-parse-suffixes} and @code{transient-parse-suffix} functions to
transform them from the convenient to the expected form.
transform them from the convenient to the expected form. Depending
on the used group class, @code{transient-parse-suffixes}'s SUFFIXES must be
a list of group vectors (for @code{transient-columns}) or a list of suffix
lists (for all other group classes).
If you explicitly specify children and then transform them using
@code{:setup-children}, then the class of the group is determined as usual,
@ -1220,6 +1223,32 @@ For backward compatibility, if you fail to do so, @code{transient-column}
is used and a warning is displayed. This warning will eventually
be replaced with an error.
@lisp
(transient-define-prefix my-finder-by-keyword ()
"Select a keyword and list matching packages."
;; The real `finder-by-keyword' is more convenient
;; of course, but that is not the point here.
[:class transient-columns
:setup-children
(lambda (_)
(transient-parse-suffixes
'my-finder-by-keyword
(let ((char (1- ?A)))
(mapcar ; a list ...
(lambda (partition)
(vconcat ; of group vectors ...
(mapcar (lambda (elt)
(let ((keyword (symbol-name (car elt))))
; ... where each suffix is a list
(list (format "%c" (cl-incf char))
keyword
(lambda ()
(interactive)
(finder-list-matches keyword)))))
partition)))
(seq-partition finder-known-keywords 7)))))])
@end lisp
@item
The boolean @code{:pad-keys} argument controls whether keys of all suffixes
contained in a group are right padded, effectively aligning the

File diff suppressed because it is too large Load Diff

View File

@ -1055,7 +1055,7 @@ If DST-N is specified, use it; otherwise assume it to be the current slot."
"Set constant VAL to current slot."
(comp--add-const-to-relocs val)
;; Leave relocation index nil on purpose, will be fixed-up in final
;; by `comp-finalize-relocs'.
;; by `comp--finalize-relocs'.
(comp--emit `(setimm ,(comp--slot) ,val)))
(defun comp--make-curr-block (block-name entry-sp &optional addr)

View File

@ -524,7 +524,8 @@ on if the hook has explicitly disabled it.
(progn
(put ',global-mode 'globalized-minor-mode t)
:autoload-end
(defvar-local ,MODE-major-mode nil))
(defvar-local ,MODE-major-mode nil)
,@(when predicate `((defvar ,MODE-predicate))))
;; The actual global minor-mode
(define-minor-mode ,global-mode
,(concat (format "Toggle %s in all buffers.\n" pretty-name)

View File

@ -228,10 +228,9 @@ Usage example:
(when (setq command
(let ((current-key-remap-sequence
(vector tchar)))
;; Provide an empty prompt to `t-s-t-t' so
;; that it may not repeatedly display
;; and/or disable the on-screen keyboard,
;; or move point.
;; Provide an empty prompt so that it may
;; not repeatedly display and/or disable
;; the on-screen keyboard, or move point.
(touch-screen-translate-touch "")))
(setq command (if (> (length command) 0)
(aref command 0)

View File

@ -676,10 +676,14 @@ callback data (if any)."
:command (cons (epg-context-program context)
args)
:connection-type 'pipe
:coding 'raw-text
:coding '(raw-text . nil)
:filter #'epg--process-filter
:stderr error-process
:noquery t))))
;; We encode and decode ourselves the text sent/received from gpg,
;; so the below disables automatic encoding and decoding by
;; subprocess communications routines.
(set-process-coding-system process 'raw-text 'raw-text)
(setf (epg-context-process context) process)))
(defun epg--process-filter (process input)

View File

@ -363,7 +363,7 @@ instead of a `set' state, which precludes any actual saving."
Non-nil inside an ERC module's activation (or deactivation)
command, such as `erc-spelling-enable', when it's been called
indirectly via the module's minor-mode toggle, i.e.,
`erc-spelling-mode'. Nil otherwise. Its value is either the
`erc-spelling-mode'. nil otherwise. Its value is either the
symbol `toggle' or an integer produced by `prefix-numeric-value'.
See Info node `(elisp) Defining Minor Modes' for more.")

View File

@ -200,7 +200,7 @@ Properties can be set with
;; - can be ignored by window managers (most positional args, like `height',
;; `width', `left' and `top', and others, like `auto-raise', `auto-lower')
;; - can be set externally in X resources or Window registry (again, most
;; positional parameters, and also `toolbar-lines', `menu-bar-lines' etc.)
;; positional parameters, and also `tool-bar-lines', `menu-bar-lines' etc.)
;, - can contain references to live objects (`buffer-list', `minibuffer') or
;; code (`buffer-predicate')
;; - are set automatically, and cannot be changed (`window-id', `parent-id'),

View File

@ -1778,7 +1778,7 @@ shown below.
#+PROPERTY: var foo=1, bar=2
HEADER-ARGUMENTS is alist of all the arguments."
HEADER-ARGUMENTS is an alist of all the arguments."
(let (results)
(mapc (lambda (pair)
(if (eq (car pair) :var)

View File

@ -160,7 +160,7 @@ Otherwise, execute block according to header settings."
(org-babel-lilypond-process-basic body params)))
(defun org-babel-lilypond-tangle ()
"Tangle lilypond blocks, then `org-babel-liypond-execute-tangled-ly'."
"Tangle lilypond blocks, then `org-babel-lilypond-execute-tangled-ly'."
(interactive)
(if (org-babel-tangle nil "yes" "lilypond")
(org-babel-lilypond-execute-tangled-ly) nil))

View File

@ -557,7 +557,7 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(let ((origin (point-marker)))
;; Handle special case when we refile to exactly same
;; location with tree promotion/demotion. Point marker
;; saved by `org-width-wide-buffer' (`save-excursion')
;; saved by `org-with-wide-buffer' (`save-excursion')
;; will then remain before the inserted subtree in
;; unexpected location.
(set-marker-insertion-type origin t)

View File

@ -13864,7 +13864,7 @@ comment at the start of cc-engine.el for more info."
;;
;; This is true when point is at the last non syntactic WS position on the
;; line, there is a macro call last on the line, and this particular macro's
;; name is defined by the regexp `c-vs-macro-regexp' as not needing a
;; name is defined by the regexp `c-macro-with-semi-re' as not needing a
;; semicolon.
(save-excursion
(save-restriction

View File

@ -500,7 +500,6 @@ Variables controlling indentation style and extra features:
dcl-imenu-label-call
Change the text that is used as sub-listing labels in imenu.
To run code after DCL mode has loaded, use `with-eval-after-load'.
Turning on DCL mode calls the value of the variable `dcl-mode-hook'
with no args, if that value is non-nil.

View File

@ -851,7 +851,7 @@ Return the buffer created."
For each member, a symbol is added to the table. Members are
extracted from the buffer-local tree `ebrowse--tree-table'.
Each symbol has its property `ebrowse-info' set to a list (TREE MEMBER-LIST
Each symbol has its property `ebrowse-tree' set to a list (TREE MEMBER-LIST
MEMBER) where TREE is the tree in which the member is defined,
MEMBER-LIST is a symbol describing the member list in which the member
is found, and MEMBER is a MEMBER structure describing the member.

View File

@ -2544,7 +2544,7 @@ THINGS are either registrations or unregisterations (sic)."
(defun eglot--TextDocumentIdentifier ()
"Compute TextDocumentIdentifier object for current buffer.
Sets `eglot--TextDocumentIdentifier-uri' (which see) as a side effect."
Sets `eglot--TextDocumentIdentifier-cache' (which see) as a side effect."
(unless eglot--TextDocumentIdentifier-cache
(let ((truename (file-truename (or buffer-file-name
(ignore-errors

View File

@ -5122,7 +5122,7 @@ commands) or source buffers (that display program source code)."
(defun gdb--buffer-type (buffer)
"Return the type of BUFFER if it is a function buffer.
Buffer type is like `gdb-registers-type', `gdb-stack-buffer'.
Buffer type is like `gdb-registers-buffer', `gdb-stack-buffer'.
These symbols are used by `gdb-get-buffer-create'.
Return nil if BUFFER is not a GDB function buffer."

View File

@ -36,6 +36,7 @@
;; * https://github.com/tree-sitter/tree-sitter-php
;; * https://github.com/tree-sitter/tree-sitter-html
;; * https://github.com/tree-sitter/tree-sitter-javascript
;; * https://github.com/tree-sitter/tree-sitter-jsdoc
;; * https://github.com/tree-sitter/tree-sitter-css
;; * https://github.com/claytonrcarter/tree-sitter-phpdoc
;;
@ -86,6 +87,7 @@
(phpdoc . ("https://github.com/claytonrcarter/tree-sitter-phpdoc"))
(html . ("https://github.com/tree-sitter/tree-sitter-html" "v0.20.3"))
(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "v0.21.2"))
(jsdoc . ("https://github.com/tree-sitter/tree-sitter-jsdoc" "v0.21.0"))
(css . ("https://github.com/tree-sitter/tree-sitter-css" "v0.21.0")))
"Treesitter language parsers required by `php-ts-mode'.
You can customize this variable if you want to stick to a specific
@ -1296,6 +1298,7 @@ Depends on `c-ts-common-comment-setup'."
(treesit-ready-p 'phpdoc)
(treesit-ready-p 'html)
(treesit-ready-p 'javascript)
(treesit-ready-p 'jsdoc)
(treesit-ready-p 'css)))
(error "Tree-sitter for PHP isn't
available. You can install the parsers with M-x
@ -1334,6 +1337,12 @@ Depends on `c-ts-common-comment-setup'."
(start_tag (tag_name))
(raw_text) @cap))
:embed 'jsdoc
:host 'javascript
:local t
`(((comment) @cap
(:match ,js--treesit-jsdoc-beginning-regexp @cap)))
:embed 'css
:host 'html
:offset '(1 . -1)

View File

@ -778,7 +778,10 @@ Signal an error if the entire string was not used."
;;;###autoload
(defun sexp-at-point ()
"Return the sexp at point, or nil if none is found."
"Return the sexp at point, or nil if none is found.
This is for returning the Lisp object represented by text at point;
use (thing-at-point \\='sexp) instead if you rather want the balanced
expression at point regardless of Lisp syntax."
(form-at-point 'sexp))
;;;###autoload
(defun symbol-at-point ()

View File

@ -2550,7 +2550,10 @@ value. Otherwise return CHILDREN as is."
(transient--pop-keymap 'transient--redisplay-map)
(setq transient--redisplay-map new)
(transient--push-keymap 'transient--redisplay-map))
(transient--redisplay)))))))
(transient--redisplay)))))
(setq transient-current-prefix nil)
(setq transient-current-command nil)
(setq transient-current-suffixes nil)))
(defun transient--post-exit (&optional command)
(transient--debug 'post-exit)
@ -2573,9 +2576,6 @@ value. Otherwise return CHILDREN as is."
(remove-hook 'pre-command-hook #'transient--pre-command)
(remove-hook 'post-command-hook #'transient--post-command)
(advice-remove 'recursive-edit #'transient--recursive-edit))
(setq transient-current-prefix nil)
(setq transient-current-command nil)
(setq transient-current-suffixes nil)
(let ((resume (and transient--stack
(not (memq transient--exitp '(replace suspend))))))
(unless (or resume (eq transient--exitp 'replace))

View File

@ -1614,7 +1614,7 @@ Within these categories order using `which-key-key-order'."
(when found `(replaced . ,key-binding))))
(defun which-key--maybe-replace (key-binding)
"Use `which-key--replacement-alist' to maybe replace KEY-BINDING.
"Use `which-key-replacement-alist' to maybe replace KEY-BINDING.
KEY-BINDING is a cons cell of the form \(KEY . BINDING\) each of
which are strings. KEY is of the form produced by `key-binding'."
(let* ((replacer (if which-key-allow-multiple-replacements

View File

@ -378,7 +378,7 @@ one char."
(> (window-hscroll) 0))
(set-window-hscroll nil (- (window-hscroll) n))
(xwidget-webkit-execute-script session
(format "window.scrollBy(%-d, 0);"
(format "window.scrollBy(-%d, 0);"
(* n (window-font-width)))))))
(defun xwidget-webkit-scroll-top ()

View File

@ -288,7 +288,7 @@ s/@PACKAGE@/emacs/
/^MKDIR_P *=/s/@MKDIR_P@/echo/
/^NEXT_AS_FIRST_DIRECTIVE_DIRENT_H *=/s/@[^@\n]*@/<dirent.h>/
/^NEXT_AS_FIRST_DIRECTIVE_ERRNO_H *=/s/@[^@\n]*@//
/^NEXT_AS_FIRST_DIRECTIVE_ENDIAN_H *=/s/@[^@\n]*@/<machine/endian.h>/
/^NEXT_AS_FIRST_DIRECTIVE_ENDIAN_H *=/s|@[^@\n]*@|<machine/endian.h>|
/^NEXT_AS_FIRST_DIRECTIVE_FCNTL_H *=/s/@[^@\n]*@/<fcntl.h>/
/^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/
/^NEXT_AS_FIRST_DIRECTIVE_LIMITS_H *=/s/@[^@\n]*@/<limits.h>/
@ -307,7 +307,7 @@ s/@PACKAGE@/emacs/
/^NEXT_DIRENT_H *=/s/@[^@\n]*@/<dirent.h>/
/^NEXT_DIRENT_H *=/s/@[^@\n]*@/<dirent.h>/
/^NEXT_ERRNO_H *=/s/@[^@\n]*@//
/^NEXT_ENDIAN_H *=/s/@[^@\n]*@/<machine/endian.h>/
/^NEXT_ENDIAN_H *=/s|@[^@\n]*@|<machine/endian.h>|
/^NEXT_FCNTL_H *=/s/@[^@\n]*@/<fcntl.h>/
/^NEXT_FLOAT_H *=/s/@[^@\n]*@//
/^NEXT_GETOPT_H *=/s/@[^@\n]*@/<getopt.h>/

View File

@ -846,7 +846,6 @@ treesit_record_change (ptrdiff_t start_byte, ptrdiff_t old_end_byte,
treesit_tree_edit_1 (tree, start_offset, old_end_offset,
new_end_offset);
XTS_PARSER (lisp_parser)->need_reparse = true;
XTS_PARSER (lisp_parser)->timestamp++;
/* VISIBLE_BEG/END records tree-sitter's range of view in
the buffer. We need to adjust them when tree-sitter's
@ -948,10 +947,7 @@ treesit_sync_visible_region (Lisp_Object parser)
this function is called), we need to reparse. */
if (visible_beg != BUF_BEGV_BYTE (buffer)
|| visible_end != BUF_ZV_BYTE (buffer))
{
XTS_PARSER (parser)->need_reparse = true;
XTS_PARSER (parser)->timestamp++;
}
XTS_PARSER (parser)->need_reparse = true;
/* Before we parse or set ranges, catch up with the narrowing
situation. We change visible_beg and visible_end to match
@ -1090,6 +1086,7 @@ treesit_ensure_parsed (Lisp_Object parser)
XTS_PARSER (parser)->tree = new_tree;
XTS_PARSER (parser)->need_reparse = false;
XTS_PARSER (parser)->timestamp++;
/* After-change functions should run at the very end, most crucially
after need_reparse is set to false, this way if the function
@ -1725,7 +1722,6 @@ buffer. */)
ranges);
XTS_PARSER (parser)->need_reparse = true;
XTS_PARSER (parser)->timestamp++;
return Qnil;
}
@ -2923,11 +2919,10 @@ be completely in the region.
If NODE-ONLY is non-nil, return a list of nodes.
Besides a node, NODE can also be a parser, in which case the root node
of that parser is used.
NODE can also be a language symbol, in which case the root node of a
parser for that language is used. If such a parser doesn't exist, it
is created.
Besides a node, NODE can be a parser, in which case the root node of
that parser is used. NODE can also be a language symbol, in which case
the root node of a parser for that language is used. If such a parser
doesn't exist, it is created.
Signal `treesit-query-error' if QUERY is malformed or something else
goes wrong. You can use `treesit-query-validate' to validate and debug
@ -2941,8 +2936,13 @@ the query. */)
treesit_initialize ();
/* Resolve NODE into an actual node. */
/* Resolve NODE into an actual node, signals if node not
up-to-date. */
Lisp_Object lisp_node = treesit_resolve_node (node);
/* As of right now, the node returned by treesit_resolve_node always
passes treesit_check_node; but it might not be true in the future,
so adding the line below just to be safe. */
treesit_check_node (node);
/* Extract C values from Lisp objects. */
TSNode treesit_node = XTS_NODE (lisp_node)->node;
@ -2970,8 +2970,8 @@ the query. */)
&signal_symbol, &signal_data))
xsignal (signal_symbol, signal_data);
/* WARN: After this point, free TREESIT_QUERY and CURSOR before every
signal and return if NEEDS_TO_FREE_QUERY_AND_CURSOR is true. */
/* WARN: After this point, if NEEDS_TO_FREE_QUERY_AND_CURSOR is true,
free TREESIT_QUERY and CURSOR before every signal and return. */
/* Set query range. */
if (!NILP (beg) && !NILP (end))

View File

@ -136,13 +136,15 @@ settings, then once more for each (OPTION . VALUE) pair.")
(ert-deftest shr-test/zoom-image ()
"Test that `shr-zoom-image' properly replaces the original image."
(skip-unless (bound-and-true-p image-types))
(let ((image (expand-file-name "data/image/blank-100x200.png"
(getenv "EMACS_TEST_DIRECTORY"))))
(let* ((image (expand-file-name "data/image/blank-100x200.png"
(getenv "EMACS_TEST_DIRECTORY")))
(image-url (concat "file://" (if (string-prefix-p "/" image)
image (concat "/" image)))))
(dolist (alt '(nil "" "nothing to see here"))
(with-temp-buffer
(ert-info ((format "image with alt=%S" alt))
(let ((attrs (if alt (format " alt=\"%s\"" alt) "")))
(insert (format "<img src=\"file://%s\" %s" image attrs)))
(insert (format "<img src=\"%s\" %s" image-url attrs)))
(cl-letf* (;; Pretend we're a graphical display.
((symbol-function 'display-graphic-p) #'always)
((symbol-function 'url-queue-retrieve)
@ -161,11 +163,13 @@ settings, then once more for each (OPTION . VALUE) pair.")
;; Render the document.
(erase-buffer)
(shr-insert-document dom)
(shr-test-wait-for (lambda () (= put-image-calls 1)))
(shr-test-wait-for (lambda () (= put-image-calls 1))
"Timed out waiting for initial load")
;; Now zoom the image.
(goto-char (point-min))
(shr-zoom-image)
(shr-test-wait-for (lambda () (= put-image-calls 2)))
(shr-test-wait-for (lambda () (= put-image-calls 2))
"Timed out waiting to zoom image")
;; Check that we got a sliced image.
(let ((slice-count 0))
(goto-char (point-min))

View File

@ -53,8 +53,7 @@
'(("C-a" . "which-key-test--named-map"))))))
(ert-deftest which-key-test--prefix-declaration ()
"Test `which-key-declare-prefixes' and
`which-key-declare-prefixes-for-mode'. See Bug #109."
;; See Bug #109.
(let* ((major-mode 'test-mode)
which-key-replacement-alist)
(which-key-add-key-based-replacements

View File

@ -361,7 +361,7 @@
2))
(defun comp-test-copy-insn-f (insn)
;; From `comp-copy-insn'.
;; From `comp--copy-insn'.
(if (consp insn)
(let (result)
(while (consp insn)

View File

@ -1320,7 +1320,7 @@ Return a list of results."
(5 (message "five")))
x)
't
;; FIXME improve `comp-cond-cstrs-target-mvar' to cross block
;; FIXME improve `comp--cond-cstrs-target-mvar' to cross block
;; boundary if necessary as this should return:
;; (or (integer 1 1) (integer 5 5))
)