From 338eda09d88d83d408c0bba1448b1c9eabad2d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Sun, 10 Apr 2022 14:31:36 +0200 Subject: [PATCH 1/6] Fix typo in next-error-find-buffer-function * lisp/simple.el (next-error-find-buffer-function): Fix typo (bug#54830). --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 1f606556b65..a8ca9600aff 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -222,7 +222,7 @@ rejected, and the function returns nil." (defcustom next-error-find-buffer-function #'ignore "Function called to find a `next-error' capable buffer. -This functions takes the same three arguments as the function +This function takes the same three arguments as the function `next-error-find-buffer', and should return the buffer to be used by the subsequent invocation of the command `next-error' and `previous-error'. From e8d2f40f41b09ec5e4b4eebe6441927e8d1dc434 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 10 Apr 2022 15:44:11 +0300 Subject: [PATCH 2/6] Clean up the MSDOS port * src/msdos.h (tcdrain): Redirect to '_dos_commit'. (openat, fchmodat, futimens, utimensat): Add prototypes. * msdos/sed1v2.inp (MAKE_PDUMPER_FINGERPRINT): Fix indentation, so that Make won't consider this line a command. ($(etc)/DOC): Chdir back to ../src, since "make-docfile -d" leaves us in a wrong directory. * msdos/sedlibmk.inp (GL_GNULIB_GETRANDOM, GL_GNULIB_MEMMEM) (GL_GNULIB_SIGDESCR_NP): Define to 1, to get the prototypes from Gnulib headers. --- msdos/sed1v2.inp | 8 +++++++- msdos/sedlibmk.inp | 3 +++ src/msdos.h | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index e041e4e5b8d..a79bf2eb71c 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -179,6 +179,8 @@ s/ *@LIBXPM@// /^PAXCTL_dumped *=/s/=.*$/=/ /^PAXCTL_notdumped *=/s/=.*$/=/ /^DUMPING *=/s/@DUMPING@/unexec/ +/^[ \t]*MAKE_PDUMPER_FINGERPRINT = *$/c\ +MAKE_PDUMPER_FINGERPRINT = /^lisp\.mk:/,/^$/c\ lisp.mk: $(lispsource)/loadup.el\ @rm -f $@\ @@ -190,6 +192,10 @@ lisp.mk: $(lispsource)/loadup.el\ /^ [ ]*\$(AM_V_at)\$(libsrc)\/make-docfile -d/s!make-docfile!make-docfile -o $(etc)/DOC! / > \$(etc)\/DOC *$/s/ >.*$// +/^\$(etc)\/DOC/,/^$/{ + /^$/i\ + cd ../src +} /^ [ ]*\$(AM_V_GLOBALS)\$(libsrc)\/make-docfile.*>.*globals.tmp/s!make-docfile!make-docfile -o globals.tmp! /^ [ ]*\$(AM_V_GLOBALS)\$(libsrc)\/make-doc/s!>.*$!! /^\$(libsrc)\/make-docfile\$(EXEEXT): /i\ @@ -255,4 +261,4 @@ s| -I\$(top_srcdir)/lib|| s| -I\. -I\$(srcdir)| -I.| /^ *test "X/d /\$(CC) -o \$@.tmp/s/\$@.tmp/\$@/ -/mv \$@.tmp \$@/d \ No newline at end of file +/mv \$@.tmp \$@/d diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 59ebec9e756..e87cef5fff2 100644 --- a/msdos/sedlibmk.inp +++ b/msdos/sedlibmk.inp @@ -180,11 +180,14 @@ s/@PACKAGE@/emacs/ /^GL_GNULIB_ENVIRON *=/s/@GL_GNULIB_ENVIRON@/1/ /^GL_GNULIB_FDATASYNC *=/s/@GL_GNULIB_FDATASYNC@/1/ /^GL_GNULIB_GETLOADAVG *=/s/@GL_GNULIB_GETLOADAVG@/1/ +/^GL_GNULIB_GETRANDOM *=/s/@GL_GNULIB_GETRANDOM@/1/ /^GL_GNULIB_UNISTD_H_GETOPT *=/s/@GL_GNULIB_UNISTD_H_GETOPT@/1/ +/^GL_GNULIB_MEMMEM *=/s/@GL_GNULIB_MEMMEM@/1/ /^GL_GNULIB_MEMRCHR *=/s/@GL_GNULIB_MEMRCHR@/1/ /^GL_GNULIB_MEMPCPY *=/s/@GL_GNULIB_MEMPCPY@/1/ /^GL_GNULIB_MKOSTEMP *=/s/@GL_GNULIB_MKOSTEMP@/1/ /^GL_GNULIB_MKTIME *=/s/@GL_GNULIB_MKTIME@/1/ +/^GL_GNULIB_SIGDESCR_NP *=/s/@GL_GNULIB_SIGDESCR_NP@/1/ /^GL_GNULIB_TIME_R *=/s/@GL_GNULIB_TIME_R@/1/ /^GL_GNULIB_TIMEGM *=/s/@GL_GNULIB_TIMEGM@/1/ /^GL_GNULIB_TIME_RZ *=/s/@GL_GNULIB_TIME_RZ@/1/ diff --git a/src/msdos.h b/src/msdos.h index 7e57c7c1102..24697bcf24b 100644 --- a/src/msdos.h +++ b/src/msdos.h @@ -22,6 +22,10 @@ along with GNU Emacs. If not, see . */ #include #include "termhooks.h" /* struct terminal */ +struct terminal; + +extern unsigned int _dos_commit(int); +#define tcdrain(f) _dos_commit(f) int dos_ttraw (struct tty_display_info *); int dos_ttcooked (void); @@ -57,6 +61,11 @@ ssize_t readlinkat (int, const char *, char *, size_t); int fstatat (int, char const *, struct stat *, int); int unsetenv (const char *); int faccessat (int, const char *, int, int); +int openat (int, const char *, int, int); +int fchmodat (int, const char *, mode_t, int); +int futimens (int, const struct timespec[2]); +int utimensat (int, const char *, const struct timespec[2], int); + void msdos_fatal_signal (int); void syms_of_msdos (void); int pthread_sigmask (int, const sigset_t *, sigset_t *); From 33828e4818f28407e5425b021cd64ad505b25d91 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 10 Apr 2022 20:19:01 +0300 Subject: [PATCH 3/6] * doc/misc/eww.texi (Advanced): Correct outdated info (bug#54839). --- doc/misc/eww.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index 248bd63e87f..df1eb53c9d5 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi @@ -310,9 +310,9 @@ state the directionality. size or content. By customizing @code{shr-max-image-proportion} you can set the maximal image proportion in relation to the window they are displayed in. E.g., 0.7 means an image is allowed to take up 70% -of the width and height. If Emacs supports image scaling (ImageMagick -support required) then larger images are scaled down. You can block -specific images completely by customizing @code{shr-blocked-images}. +of the width and height. If Emacs supports image scaling, then larger +images are scaled down. You can block specific images completely by +customizing @code{shr-blocked-images}. @vindex shr-inhibit-images You can control image display by customizing From cccaa9c31de363bba5920031ecdb9db4ad3207ee Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 11 Apr 2022 12:40:50 +0200 Subject: [PATCH 4/6] Fix a kill-append regression * lisp/simple.el (kill-append): Fix a regression when kill-ring-max is zero (bug#54842). --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index a8ca9600aff..b9cb957064d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5183,7 +5183,7 @@ If `kill-append-merge-undo' is non-nil, remove the last undo boundary in the current buffer." (let ((cur (car kill-ring))) (kill-new (if before-p (concat string cur) (concat cur string)) - (or (string= cur "") + (or (= (length cur) 0) (null (get-text-property 0 'yank-handler cur))))) (when (and kill-append-merge-undo (not buffer-read-only)) (let ((prev buffer-undo-list) From e71c7a7c600bae3337de95d193dd106e9bfa2b4c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 11 Apr 2022 14:31:04 +0300 Subject: [PATCH 5/6] Fix default-directory of buffers visiting files in renamed directories * lisp/dired-aux.el (dired-rename-file): Take note of whether FILE is a directory before it is renamed, which makes it impossible to determine if it was a directory. (dired-rename-subdir, dired-rename-subdir-1): Revert to using dired-in-this-tree-p instead of file-in-directory-p, for the benefit of files that were renamed/removed, because file-in-directory-p returns nil in those cases. (Bug#54838) --- lisp/dired-aux.el | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 15f95eb5799..57155ec26dc 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1838,22 +1838,23 @@ rename them using `vc-rename-file'." "Rename FILE to NEWNAME. Signal a `file-already-exists' error if a file NEWNAME already exists unless OK-IF-ALREADY-EXISTS is non-nil." - (dired-handle-overwrite newname) - (dired-maybe-create-dirs (file-name-directory newname)) - (if (and dired-vc-rename-file - (vc-backend file) - (ignore-errors (vc-responsible-backend newname))) - (vc-rename-file file newname) - ;; error is caught in -create-files - (rename-file file newname ok-if-already-exists)) - ;; Silently rename the visited file of any buffer visiting this file. - (and (get-file-buffer file) - (with-current-buffer (get-file-buffer file) - (set-visited-file-name newname nil t))) - (dired-remove-file file) - ;; See if it's an inserted subdir, and rename that, too. - (when (file-directory-p file) - (dired-rename-subdir file newname))) + (let ((file-is-dir-p (file-directory-p file))) + (dired-handle-overwrite newname) + (dired-maybe-create-dirs (file-name-directory newname)) + (if (and dired-vc-rename-file + (vc-backend file) + (ignore-errors (vc-responsible-backend newname))) + (vc-rename-file file newname) + ;; error is caught in -create-files + (rename-file file newname ok-if-already-exists)) + ;; Silently rename the visited file of any buffer visiting this file. + (and (get-file-buffer file) + (with-current-buffer (get-file-buffer file) + (set-visited-file-name newname nil t))) + (dired-remove-file file) + ;; See if it's an inserted subdir, and rename that, too. + (when file-is-dir-p + (dired-rename-subdir file newname)))) (defun dired-rename-subdir (from-dir to-dir) (setq from-dir (file-name-as-directory from-dir) @@ -1866,7 +1867,7 @@ unless OK-IF-ALREADY-EXISTS is non-nil." (while blist (with-current-buffer (car blist) (if (and buffer-file-name - (file-in-directory-p buffer-file-name expanded-from-dir)) + (dired-in-this-tree-p buffer-file-name expanded-from-dir)) (let ((modflag (buffer-modified-p)) (to-file (replace-regexp-in-string (concat "^" (regexp-quote from-dir)) @@ -1885,7 +1886,7 @@ unless OK-IF-ALREADY-EXISTS is non-nil." (while alist (setq elt (car alist) alist (cdr alist)) - (if (file-in-directory-p (car elt) expanded-dir) + (if (dired-in-this-tree-p (car elt) expanded-dir) ;; ELT's subdir is affected by the rename (dired-rename-subdir-2 elt dir to))) (if (equal dir default-directory) From 5e47d6284bf184cb21acb1fb142ddb6eeea9c8ec Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 11 Apr 2022 14:24:23 -0400 Subject: [PATCH 6/6] * lisp/gnus/mm-encode.el (mm-default-file-encoding): Fix "when" arg --- lisp/gnus/mm-encode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el index ead3bae219d..39b1ad1f3b9 100644 --- a/lisp/gnus/mm-encode.el +++ b/lisp/gnus/mm-encode.el @@ -99,7 +99,7 @@ This variable should never be set directly, but bound before a call to ;;;###autoload (define-obsolete-function-alias 'mm-default-file-encoding - #'mm-default-file-type "future") ;Old bad name. + #'mm-default-file-type "28.1") ;Old bad name. ;;;###autoload (defun mm-default-file-type (file) "Return a default content type for FILE."