Merge from origin/emacs-29

7e1012765c Fix libwebp check for some webp installations
c2ca009da4 Avoid potential infloop
34c14430e9 Don't misindent 'else:' after 'if re.match:' in Python
8a2a554192 * Make sure `default-directory' exists before spawning pr...
1862e7eb7e Fix sed expression in install-etc make target
c8ec0017cb Avoid using bash in the emacsclient desktop file
a588937094 Fix documentation of the 'line-height' text property
971ded31c4 Add 'declare' specs to with- and without-restriction
This commit is contained in:
Stefan Kangas 2023-03-09 06:30:23 +01:00
commit 5056b8e589
8 changed files with 52 additions and 12 deletions

View file

@ -841,7 +841,7 @@ install-etc:
rm -f $${tmp}
tmp=etc/emacsclient.tmpdesktop; rm -f $${tmp}; \
client_name=`echo emacsclient | sed '$(TRANSFORM)'`${EXEEXT}; \
sed -e "/^Exec=emacsclient/ s|emacsclient|${bindir}/$${client_name}|" \
sed -e "/^Exec=/ s|emacsclient|${bindir}/$${client_name}|" \
-e "/^Icon=emacs/ s/emacs/${EMACS_NAME}/" \
$(USE_STARTUP_NOTIFICATION_SED_CMD) \
${srcdir}/etc/emacsclient.desktop > $${tmp}; \
@ -855,7 +855,7 @@ install-etc:
rm -f $${tmp}
tmp=etc/emacsclient-mail.tmpdesktop; rm -f $${tmp}; \
client_name=`echo emacsclient | sed '$(TRANSFORM)'`${EXEEXT}; \
sed -e "/^Exec=emacsclient/ s|emacsclient|${bindir}/$${client_name}|" \
sed -e "/^Exec=/ s|emacsclient|${bindir}/$${client_name}|" \
-e "/^Icon=emacs/ s/emacs/${EMACS_NAME}/" \
${srcdir}/etc/emacsclient-mail.desktop > $${tmp}; \
${INSTALL_DATA} $${tmp} "$(DESTDIR)${desktopdir}/$${client_name}-mail.desktop"; \

View file

@ -2776,6 +2776,25 @@ if test "${with_webp}" != "no"; then
WEBP_MODULE="libwebpdemux >= $WEBP_REQUIRED"
EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE])
# WebPGetInfo is sometimes not present inside libwebpdemux, so
# if it does not link, also check for libwebpdecoder.
OLD_CFLAGS=$CFLAGS
OLD_LIBS=$LIBS
CFLAGS="$CFLAGS $WEBP_CFLAGS"
LIBS="$LIBS $WEBP_LIBS"
AC_CHECK_FUNC([WebPGetInfo], [],
[WEBP_MODULE="$WEBP_MODULE libwebpdecoder >= $WEBP_REQUIRED"
HAVE_WEBP=no
AS_UNSET([WEBP_LIBS])
AS_UNSET([WEBP_CFLAGS])
EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE])])
CFLAGS=$OLD_CFLAGS
LIBS=$OLD_LIBS
AC_SUBST([WEBP_CFLAGS])
AC_SUBST([WEBP_LIBS])
fi

View file

@ -2345,10 +2345,11 @@ newline. The property value can be one of several forms:
@item t
If the property value is @code{t}, the newline character has no
effect on the displayed height of the line---the visible contents
alone determine the height. The @code{line-spacing} property,
described below, is also ignored in this case. This is useful for
tiling small images (or image slices) without adding blank areas
between the images.
alone determine the height. The @code{line-spacing} property of the
newline, described below, is also ignored in this case. This is
useful for tiling small images (or image slices) without adding blank
areas between the images.
@item (@var{height} @var{total})
If the property value is a list of the form shown, that adds extra
space @emph{below} the display line. First Emacs uses @var{height} as
@ -2409,7 +2410,9 @@ overrides line spacings specified for the frame.
property that can enlarge the default frame line spacing and the
buffer local @code{line-spacing} variable: if its value is larger than
the buffer or frame defaults, that larger value is used instead, for
the display line ending in that newline.
the display line ending in that newline (unless the newline also has
the @code{line-height} property whose value is one of the special
values which cause @code{line-spacing} to be ignored, see above).
One way or another, these mechanisms specify a Lisp value for the
spacing of each line. The value is a height spec, and it translates

View file

@ -2,9 +2,9 @@
Categories=Network;Email;
Comment=GNU Emacs is an extensible, customizable text editor - and more
# We want to pass the following commands to the shell wrapper:
# u=${1//\\/\\\\}; u=${u//\"/\\\"}; exec emacsclient --alternate-editor= --display="$DISPLAY" --eval "(message-mailto \"$u\")"
# u=$(echo "$1" | sed 's/[\"]/\\&/g'); exec emacsclient --alternate-editor= --display="$DISPLAY" --eval "(message-mailto \"$u\")"
# Special chars '"', '$', and '\' must be escaped as '\\"', '\\$', and '\\\\'.
Exec=bash -c "u=\\${1//\\\\\\\\/\\\\\\\\\\\\\\\\}; u=\\${u//\\\\\\"/\\\\\\\\\\\\\\"}; exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" bash %u
Exec=sh -c "u=\\$(echo \\"\\$1\\" | sed 's/[\\\\\\"]/\\\\\\\\&/g'); exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" sh %u
Icon=emacs
Name=Emacs (Mail, Client)
MimeType=x-scheme-handler/mailto;
@ -16,7 +16,7 @@ Actions=new-window;new-instance;
[Desktop Action new-window]
Name=New Window
Exec=bash -c "u=\\${1//\\\\\\\\/\\\\\\\\\\\\\\\\}; u=\\${u//\\\\\\"/\\\\\\\\\\\\\\"}; exec emacsclient --alternate-editor= --create-frame --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" bash %u
Exec=sh -c "u=\\$(echo \\"\\$1\\" | sed 's/[\\\\\\"]/\\\\\\\\&/g'); exec emacsclient --alternate-editor= --create-frame --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" sh %u
[Desktop Action new-instance]
Name=New Instance

View file

@ -3726,7 +3726,8 @@ Prepare every function for final compilation and drive the C back-end."
(temp-file (make-temp-file
(concat "emacs-int-comp-"
(file-name-base output) "-")
nil ".el")))
nil ".el"))
(default-directory invocation-directory))
(with-temp-file temp-file
(insert ";; -*-coding: utf-8-emacs-unix; -*-\n")
(mapc (lambda (e)
@ -4023,6 +4024,7 @@ display a message."
(comp-log "\n")
(mapc #'comp-log expr-strings)))
(load1 load)
(default-directory invocation-directory)
(process (make-process
:name (concat "Compiling: " source-file)
:buffer (with-current-buffer

View file

@ -5792,7 +5792,9 @@ likely an invalid python file."
(catch 'exit
(while (python-nav--syntactically
(lambda ()
(re-search-backward (python-rx block-start) nil t))
(cl-loop while (re-search-backward (python-rx block-start) nil t)
if (memq (char-before) '(nil ?\s ?\t ?\n))
return t))
#'<)
(let ((indentation (current-indentation)))
(when (and (not (memq indentation collected-indentations))

View file

@ -4051,6 +4051,7 @@ to other portions of the buffer, use `without-restriction' with the
same LABEL argument.
\(fn START END [:label LABEL] BODY)"
(declare (indent 0) (debug t))
(if (eq (car rest) :label)
`(internal--with-restriction ,start ,end (lambda () ,@(cddr rest))
,(cadr rest))
@ -4073,6 +4074,7 @@ restrictions set by `with-restriction' with the same LABEL argument
are lifted.
\(fn [:label LABEL] BODY)"
(declare (indent 0) (debug t))
(if (eq (car rest) :label)
`(internal--without-restriction (lambda () ,@(cddr rest))
,(cadr rest))

View file

@ -1982,6 +1982,18 @@ match foo:
(should (eq (car (python-indent-context)) :after-block-start))
(should (= (python-indent-calculate-indentation) 8))))
(ert-deftest python-indent-after-re-match ()
"Test BUG 62031 regression."
(python-tests-with-temp-buffer
"
def test_re(string):
if re.match('^[a-c]+$', string):
print('yes')
else:
"
(python-tests-look-at "else:")
(should (= (python-indent-calculate-indentation) 4))))
;;; Filling