diff --git a/Makefile.in b/Makefile.in index c4b346128dc..1cac48c59e6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -854,7 +854,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}; \ @@ -868,7 +868,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"; \ diff --git a/configure.ac b/configure.ac index 3e2a44d47bf..a5c8b3cb3a9 100644 --- a/configure.ac +++ b/configure.ac @@ -3446,6 +3446,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 diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 62e2c609f29..bb7ba057eb4 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -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 diff --git a/etc/emacsclient-mail.desktop b/etc/emacsclient-mail.desktop index 49c6f99f317..0a2420ddead 100644 --- a/etc/emacsclient-mail.desktop +++ b/etc/emacsclient-mail.desktop @@ -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 diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index ce81680a226..9f4118dfc86 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -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 diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1f970633bfc..630250c15c3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -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)) diff --git a/lisp/subr.el b/lisp/subr.el index cf6aa6452fe..6ea4d34ebc3 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4078,6 +4078,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)) @@ -4100,6 +4101,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)) diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 4f24c042c6a..6928e313dc4 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -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