diff options
-rw-r--r-- | admin/admin.el | 141 | ||||
-rw-r--r-- | admin/make-tarball.txt | 75 | ||||
-rwxr-xr-x | admin/upload-manuals | 5 | ||||
-rw-r--r-- | doc/lispref/os.texi | 3 | ||||
-rw-r--r-- | doc/misc/eww.texi | 8 | ||||
-rw-r--r-- | etc/PROBLEMS | 67 | ||||
-rw-r--r-- | etc/refcards/Makefile | 7 | ||||
-rw-r--r-- | lisp/calc/calc.el | 2 | ||||
-rw-r--r-- | lisp/dired-aux.el | 37 | ||||
-rw-r--r-- | lisp/dired.el | 7 | ||||
-rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 8 | ||||
-rw-r--r-- | lisp/files.el | 4 | ||||
-rw-r--r-- | lisp/gnus/mm-encode.el | 2 | ||||
-rw-r--r-- | lisp/net/tramp-archive.el | 15 | ||||
-rw-r--r-- | lisp/net/tramp.el | 17 | ||||
-rw-r--r-- | lisp/outline.el | 73 | ||||
-rw-r--r-- | lisp/progmodes/vhdl-mode.el | 32 | ||||
-rw-r--r-- | lisp/simple.el | 4 | ||||
-rw-r--r-- | lisp/vc/vc-bzr.el | 2 | ||||
-rw-r--r-- | lisp/vc/vc-cvs.el | 2 | ||||
-rw-r--r-- | lisp/vc/vc-dav.el | 4 | ||||
-rw-r--r-- | lisp/vc/vc-rcs.el | 2 | ||||
-rw-r--r-- | lisp/vc/vc-sccs.el | 2 | ||||
-rw-r--r-- | lisp/vc/vc-src.el | 12 | ||||
-rw-r--r-- | lisp/vc/vc.el | 2 | ||||
-rw-r--r-- | msdos/sed1v2.inp | 6 | ||||
-rw-r--r-- | msdos/sedlibmk.inp | 3 | ||||
-rw-r--r-- | src/indent.c | 5 | ||||
-rw-r--r-- | src/msdos.h | 9 | ||||
-rw-r--r-- | src/window.c | 9 | ||||
-rw-r--r-- | test/lisp/net/tramp-archive-tests.el | 47 |
31 files changed, 397 insertions, 215 deletions
diff --git a/admin/admin.el b/admin/admin.el index 5f02ea8ce45..8c68b181831 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -602,76 +602,81 @@ style=\"text-align:left\">") (forward-line 1) (setq done t))))) (let (done open-td tag desc) - ;; Convert the list that Makeinfo made into a table. - (or (search-forward "<ul class=\"menu\">" nil t) - ;; FIXME? The following search seems dangerously lax. - (search-forward "<ul>")) - (replace-match "<table style=\"float:left\" width=\"100%\">") - (forward-line 1) - (while (not done) - (cond - ((or (looking-at "<li>\\(<a.+</a>\\):[ \t]+\\(.*\\)$") - (looking-at "<li>\\(<a.+</a>\\)$")) - (setq tag (match-string 1)) - (setq desc (match-string 2)) - (replace-match "" t t) - (when open-td - (save-excursion - (forward-char -1) - (skip-chars-backward " ") - (delete-region (point) (line-end-position)) - (insert "</td>\n </tr>"))) - (insert " <tr>\n ") - (if table-workaround - ;; This works around a Firefox bug in the mono file. - (insert "<td bgcolor=\"white\">") - (insert "<td>")) - (insert tag "</td>\n <td>" (or desc "")) - (setq open-td t)) - ((eq (char-after) ?\n) - (delete-char 1) - ;; Negate the following `forward-line'. - (forward-line -1)) - ((looking-at "<!-- ") - (search-forward "-->")) - ((looking-at "<p>[- ]*The Detailed Node Listing[- \n]*") - (replace-match " </td></tr></table>\n + ;; Texinfo 6.8 and later doesn't produce <ul class="menu"> lists + ;; for the TOC menu, and the "description" part of each menu + ;; item is not there anymore. So for HTML manuals produced by + ;; those newer versions of Texinfo we punt and leave the menu in + ;; its original form. + (when (or (search-forward "<ul class=\"menu\">" nil t) + ;; FIXME? The following search seems dangerously lax. + (search-forward "<ul>")) + ;; Convert the list that Makeinfo made into a table. + (replace-match "<table style=\"float:left\" width=\"100%\">") + (forward-line 1) + (while (not done) + (cond + ((or (looking-at "<li>\\(<a.+</a>\\):[ \t]+\\(.*\\)$") + (looking-at "<li>\\(<a.+</a>\\)$")) + (setq tag (match-string 1)) + (setq desc (match-string 2)) + (replace-match "" t t) + (when open-td + (save-excursion + (forward-char -1) + (skip-chars-backward " ") + (delete-region (point) (line-end-position)) + (insert "</td>\n </tr>"))) + (insert " <tr>\n ") + (if table-workaround + ;; This works around a Firefox bug in the mono file. + (insert "<td bgcolor=\"white\">") + (insert "<td>")) + (insert tag "</td>\n <td>" (or desc "")) + (setq open-td t)) + ((eq (char-after) ?\n) + (delete-char 1) + ;; Negate the following `forward-line'. + (forward-line -1)) + ((looking-at "<!-- ") + (search-forward "-->")) + ((looking-at "<p>[- ]*The Detailed Node Listing[- \n]*") + (replace-match " </td></tr></table>\n <h3>Detailed Node Listing</h3>\n\n" t t) - (search-forward "<p>") - ;; FIXME Fragile! - ;; The Emacs and Elisp manual have some text at the - ;; start of the detailed menu that is not part of the menu. - ;; Other manuals do not. - (if (looking-at "Here are some other nodes") - (search-forward "<p>")) - (goto-char (match-beginning 0)) - (skip-chars-backward "\n ") - (setq open-td nil) - (insert "</p>\n\n<table style=\"float:left\" width=\"100%\">")) - ((looking-at "</li></ul>") - (replace-match "" t t)) - ((looking-at "<p>") - (replace-match "" t t) - (when open-td - (insert " </td></tr>") - (setq open-td nil)) - (insert " <tr> + (search-forward "<p>") + ;; FIXME Fragile! + ;; The Emacs and Elisp manual have some text at the + ;; start of the detailed menu that is not part of the menu. + ;; Other manuals do not. + (if (looking-at "Here are some other nodes") + (search-forward "<p>")) + (goto-char (match-beginning 0)) + (skip-chars-backward "\n ") + (setq open-td nil) + (insert "</p>\n\n<table style=\"float:left\" width=\"100%\">")) + ((looking-at "</li></ul>") + (replace-match "" t t)) + ((looking-at "<p>") + (replace-match "" t t) + (when open-td + (insert " </td></tr>") + (setq open-td nil)) + (insert " <tr> <th colspan=\"2\" align=\"left\" style=\"text-align:left\">") - (if (re-search-forward "</p>[ \t\n]*<ul class=\"menu\">" nil t) - (replace-match " </th></tr>"))) - ((looking-at "[ \t]*</ul>[ \t]*$") - (replace-match - (if open-td - " </td></tr>\n</table>" - "</table>") t t) - (setq done t)) - (t - (if (eobp) - (error "Parse error in %s" - (file-name-nondirectory buffer-file-name))) - (unless open-td - (setq done t)))) - (forward-line 1))))) + (if (re-search-forward "</p>[ \t\n]*<ul class=\"menu\">" nil t) + (replace-match " </th></tr>"))) + ((looking-at "[ \t]*</ul>[ \t]*$") + (replace-match + (if open-td + " </td></tr>\n</table>" + "</table>") t t) + (setq done t)) + (t + (if (eobp) + (error "Parse error in %s" + (file-name-nondirectory buffer-file-name))) + (unless open-td + (setq done t)))) + (forward-line 1)))))) (defconst make-manuals-dist-output-variables diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index ec69302dae8..17a4d9f807b 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -315,17 +315,70 @@ looks like this: </div> </div> -Regenerate the various manuals in manual/. -The scripts admin/make-manuals and admin/upload-manuals summarize the process. - -If you have Texinfo installed locally, make-manuals might fail if it -cannot find epsf.tex. In that case define in the environment - - TEXINPUTS=:/path/to/texinfo-tree/doc - -where /path/to/texinfo-tree is the absolute file name of the top-level -directory where you have the Texinfo source tree. Then re-run -make-manuals. +Next, regenerate the various manuals in HTML, PDF, and PS formats: + + Invoke ./admin/make-manuals from the top-level directory of the + Emacs source tree that contains the manuals for which you want to + produce HTML docs. This creates the 'manual' directory and + populates it with the necessary files. + + If you have Texinfo installed locally, make-manuals might fail if it + cannot find epsf.tex. In that case define in the environment + + TEXINPUTS=:/path/to/texinfo-tree/doc + + where /path/to/texinfo-tree is the absolute file name of the + top-level directory where you have the Texinfo source tree. Then + re-run make-manuals. + + make-manuals can also fail if the HTML manuals produced by Texinfo + violate some of the assumptions admin/admin.el makes about the + format of the produced HTML. Debug these problems and resolve them, + then re-run make-manuals. (Each time you run make-manuals, it + empties the manuals/ directory and regenerates the files there, but + if the files in manuals/ can be used without regeneration, i.e. if + the problem you solved doesn't affect the produced HTML, you can + invoke make-manuals with the -c switch, which will make the process + much faster.) + +Now change to the 'manual' directory and invoke upload-manuals: + + ../admin/updload-manuals /path/to/webpages/cvs/checkout + + where /path/to/webpages/cvs/checkout is the place where you have the + CVS checkout of the Emacs Web pages, with subdirectories 'manual' + and 'refcards'. This moves the produced manuals to directories in + the Web pages CVS checkout tree, and also invokes CVS commands to + commit changed files, add new files, and remove stale files that are + no longer part of the manuals. + + If upload-manuals fails, resolve the problems and re-invoke it. + This requires running make-manuals again, since upload-manuals + destructively modifies the 'manual' directory where you invoke it. + Also, upload-manuals invokes "cvs commit -f", so if you run it + several times, some files will be committed more than once even + though they were not changed in-between. Suck it up. + + All the added and removed files need to be committed, so next fire + up Emacs, type "C-x v d" to invoke vc-dir on the Web pages checkout, + and use "C-x v v" and other VC commands to commit all the files that + upload-manuals didn't automatically commit. (You can also do that + with manual CVS commands, of course, but this is not recommended.) + + Next, make sure that manual/index.html file is consistent with the + info/dir file in the branch for which you are producing the manuals, + in that it mentions all the manuals. It could be outdated if + manuals were added or removed since the last release. + + For each new manual, a file manual/MANUAL.html (where MANUAL is the + name of the manual) should be created from the template in + manual/eww.html, after editing the title and the Copyright years, + and the links in it changed to point to the appropriate files in the + manual/html_node/ and manual/html_mono/ subdirectories. + + In addition, the file refcards/index.html should be audited to make + sure it includes the up-to-date list of refcards actually produced + and put under that subdirectory. Browsing <https://web.cvs.savannah.gnu.org/viewvc/?root=emacs> is one way to check for any files that still need updating. diff --git a/admin/upload-manuals b/admin/upload-manuals index 1fa9865e657..1b7950ede80 100755 --- a/admin/upload-manuals +++ b/admin/upload-manuals @@ -334,7 +334,10 @@ for d in html_node/*; do [ -e $webdir/manual/$d ] || { echo "New directory: $d" mkdir $webdir/manual/$d - $cvs add $webdir/manual/$d || die "add error" + ( + cd $webdir/manual + $cvs add $d || die "add error" + ) } new= diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 4ee893f860f..30883402f9e 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2298,7 +2298,8 @@ can use in calling @code{cancel-timer} (@pxref{Timers}). @end deffn @cindex idleness - Emacs becomes @dfn{idle} when it starts waiting for user input, and + Emacs becomes @dfn{idle} when it starts waiting for user input +(unless it waits for input with a timeout, @pxref{Reading One Event}), and it remains idle until the user provides some input. If a timer is set for five seconds of idleness, it runs approximately five seconds after Emacs first becomes idle. Even if @var{repeat} is non-@code{nil}, diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index 6d1ba3962f3..f23180c1d4e 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi @@ -311,11 +311,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}, -or, if you want to only allow some specific images, customize -@code{shr-allowed-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 diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 25022cad463..482c29f3301 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -651,6 +651,46 @@ And then rename the system's readline so that it won't be loaded: See <https://pypi.python.org/pypi/gnureadline> for more details on installation. +*** On MS-Windows, invoking "M-x run-python" signals an error. + +If the error says something like this: + + Python was not found; run with arguments to install + from the Microsoft Store, or disable this shortcut + from Settings > Manage App Execution Aliases. + + Process Python exited abnormally with code 49 + +then this is due to the MS-Windows "feature" that is intended to +encourage you to install the latest available Python version. It +works by placing "fake" python.exe and python3.exe executables in a +special directory, and having that directory on your Path _before_ the +directory where the real Python executable is installed. That "fake" +Python then decides whether to redirect you to the Microsoft Store or +invoke the actual Python. The directory where Windows keeps those +"fake" executables is under your Windows user's 'AppData' directory, +typically 'C:\Users\<user>\AppData\Local\Microsoft\WindowsApps', where +"<user>" is the user name of your Windows user. + +To solve this, you have several alternatives: + + . Go to "Settings > Manage App Execution Aliases" and turn OFF the + aliases for python.exe and/or python3.exe. This will affect only + Python, and may require you to manage upgrades to your Python + installation manually, instead of being automatically prompted by + MS-Windows. + . Move the directory with the "fake" executables to the end of Path, + or at least after the directory where the real Python is + installed. Depending on the position in Path where you move it, + it will affect Python and/or other programs which Windows monitors + via the "App Execution Aliases" feature. + . Manually remove python.exe and/or python3.exe from the above + directory. Again, this affects only your Python installation. + +Whatever you do, you will need to restart Emacs to refresh its notion +of the directory where python.exe/python3.exe lives, because that is +recorded when Python mode is started. + *** Visiting files in some auto-mounted directories causes Emacs to print 'Error reading dir-locals: (file-error "Read error" "is a directory" ...' @@ -1009,6 +1049,15 @@ index 5504171..431adf8 100644 If you can't modify that file directly, copy it to the directory ~/.m17n.d/ (create it if it doesn't exist), and apply the patch. +** On Haiku, some proportionally-spaced fonts display with artifacting. + +This is a Haiku bug: https://dev.haiku-os.org/ticket/17229, which can +be remedied by using a different font that does not exhibit this +problem, or by configuring Emacs '--with-be-cairo'. + +So far, Bitstream Charter and Noto Sans have been known to exhibit +this problem, while Noto Sans Display is known to not do so. + ** On MS-Windows, some characters display as boxes with hex code. Also, some characters could display with wrong fonts. @@ -1022,14 +1071,20 @@ modern fonts are used, such as Noto Emoji or Ebrima. The solution is to switch to a configuration that uses HarfBuzz as its shaping engine, where these problems don't exist. -** On Haiku, some proportionally-spaced fonts display with artifacting. +** On MS-Windows, selecting some fonts as the default font doesn't work. -This is a Haiku bug: https://dev.haiku-os.org/ticket/17229, which can -be remedied by using a different font that does not exhibit this -problem, or by configuring Emacs '--with-be-cairo'. +This can happen if you select font variants such as "Light" or "Thin" +or "Semibold" or "Heavy", and some others. The APIs used by Emacs on +Windows to enumerate fonts in a font family consider only 4 font +variants to belong to the same family: Regular, Italic, Bold, and +Bold-Italic. All the other variants aren't returned by those APIs +when we request to list all the fonts in a family, and thus aren't +considered by Emacs to belong to the family. So any font variant that +is not one of those 4 will likely not work as expected; in most cases +Emacs will select some other font instead. -So far, Bitstream Charter and Noto Sans have been known to exhibit -this problem, while Noto Sans Display is known to not do so. +The only workaround is not to choose such font variants as the default +font when running Emacs on MS-Windows. * Internationalization problems diff --git a/etc/refcards/Makefile b/etc/refcards/Makefile index 6f8913c5f01..4c5daa9f44c 100644 --- a/etc/refcards/Makefile +++ b/etc/refcards/Makefile @@ -233,10 +233,11 @@ pl-refcard.pdf: $(pl_refcard_deps) fi $(ENVADD) pdftex -output-format=pdf pl-refcard.tex pl-refcard.dvi: $(pl_refcard_deps) - if ! kpsewhich -format=fmt mex > /dev/null; then \ - echo "No mex format found."; false; \ + if kpsewhich -format=fmt mex > /dev/null; then \ + $(ENVADD) tex pl-refcard.tex; \ + else \ + $(ENVADD) mex pl-refcard.tex; \ fi - $(ENVADD) tex pl-refcard.tex pl-refcard.ps: pl-refcard.dvi dvips -t a4 -o $@ pl-refcard.dvi diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 3b1cf248fd9..2c139a02385 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -1816,7 +1816,7 @@ See calc-keypad for details." (if win (progn (calc-cursor-stack-index 0) - (vertical-motion (- 2 (window-height win))) + (vertical-motion (- 3 (window-height win 'floor))) (set-window-start win (point))))) (calc-cursor-stack-index 0) (if (looking-at " *\\.$") diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index c49e4e91d83..7edfde08f80 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1896,22 +1896,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) @@ -1924,7 +1925,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)) @@ -1943,7 +1944,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) diff --git a/lisp/dired.el b/lisp/dired.el index d0cf72adc58..2856c5d2435 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1034,8 +1034,11 @@ If a directory or nothing is found at point, return nil." ;;;###autoload (defun dired (dirname &optional switches) "\"Edit\" directory DIRNAME--delete, rename, print, etc. some files in it. -Optional second argument SWITCHES specifies the `ls' options used. -\(Interactively, use a prefix argument to be able to specify SWITCHES.) +Optional second argument SWITCHES specifies the options to be used +when invoking `insert-directory-program', usually `ls', which produces +the listing of the directory files and their attributes. +Interactively, a prefix argument will cause the command to prompt +for SWITCHES. If DIRNAME is a string, Dired displays a list of files in DIRNAME (which may also have shell wildcards appended to select certain files). diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index ed9b1b7d836..8e38df43c87 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -553,10 +553,14 @@ too large if positive or too small if negative)." ,new))))) (seq-subseq seq start end)) +;;; This isn't a defalias because autoloading defalises doesn't work +;;; very well. + ;;;###autoload -(defalias 'cl-concatenate #'seq-concatenate +(defun cl-concatenate (type &rest sequences) "Concatenate, into a sequence of type TYPE, the argument SEQUENCEs. -\n(fn TYPE SEQUENCE...)") +\n(fn TYPE SEQUENCE...)" + (apply #'seq-concatenate type sequences)) ;;; List functions. diff --git a/lisp/files.el b/lisp/files.el index 2aa6c9dedc6..b5ec7d45005 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -7325,7 +7325,9 @@ need to be passed verbatim to shell commands." (defvar insert-directory-program (purecopy "ls") - "Absolute or relative name of the `ls' program used by `insert-directory'.") + "Absolute or relative name of the `ls'-like program. +This is used by `insert-directory' and `dired-insert-directory' +\(thus, also by `dired').") (defcustom directory-free-space-program (purecopy "df") "Program to get the amount of free space on a file system. 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." diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 7f4eca3f7c7..4a020c7150f 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -362,14 +362,13 @@ arguments to pass to the OPERATION." (progn (defun tramp-archive-autoload-file-name-handler (operation &rest args) "Load Tramp archive file name handler, and perform OPERATION." (defvar tramp-archive-autoload) - (when tramp-archive-enabled - ;; We cannot use `tramp-compat-temporary-file-directory' here due - ;; to autoload. When installing Tramp's GNU ELPA package, there - ;; might be an older, incompatible version active. We try to - ;; overload this. - (let ((default-directory temporary-file-directory) - (tramp-archive-autoload t)) - (apply #'tramp-autoload-file-name-handler operation args))))) + (let (;; We cannot use `tramp-compat-temporary-file-directory' here + ;; due to autoload. When installing Tramp's GNU ELPA package, + ;; there might be an older, incompatible version active. We + ;; try to overload this. + (default-directory temporary-file-directory) + (tramp-archive-autoload tramp-archive-enabled)) + (apply #'tramp-autoload-file-name-handler operation args)))) (put #'tramp-archive-autoload-file-name-handler 'tramp-autoload t) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 1f429edf4f8..d7d375e111d 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5915,14 +5915,15 @@ verbosity of 6." "Return t if system process PROCESS-NAME is running for `user-login-name'." (when (stringp process-name) (catch 'result - (dolist (pid (list-system-processes)) - (when-let ((attributes (process-attributes pid)) - (comm (cdr (assoc 'comm attributes)))) - (and (string-equal (cdr (assoc 'user attributes)) (user-login-name)) - ;; The returned command name could be truncated to 15 - ;; characters. Therefore, we cannot check for `string-equal'. - (string-prefix-p comm process-name) - (throw 'result t))))))) + (let ((default-directory temporary-file-directory)) + (dolist (pid (list-system-processes)) + (when-let ((attributes (process-attributes pid)) + (comm (cdr (assoc 'comm attributes)))) + (and (string-equal (cdr (assoc 'user attributes)) (user-login-name)) + ;; The returned command name could be truncated to 15 + ;; characters. Therefore, we cannot check for `string-equal'. + (string-prefix-p comm process-name) + (throw 'result t)))))))) ;; When calling "emacs -Q", `auth-source-search' won't be called. If ;; you want to debug exactly this case, call "emacs -Q --eval '(setq diff --git a/lisp/outline.el b/lisp/outline.el index 696d109f1ee..9f73ca0d0c7 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -178,13 +178,22 @@ in the file it applies to.") map)) (defcustom outline-minor-mode-cycle-filter nil - "Filter out positions on the heading available for cycling." + "Control where on a heading the visibility-cycling commands are bound to keys. +This option controls, in Outline minor mode, where on a heading typing +the key sequences bound to visibility-cycling commands like `outline-cycle' +and `outline-cycle-buffer' will invoke those commands. By default, you can +invoke these commands by typing `TAB' and `S-TAB' anywhere on a heading line, +but customizing this option can make those bindings be in effect only at +specific positions on the heading, like only at the line's beginning or +line's end. This allows these keys to be bound to their usual commands, +as determined by the major mode, elsewhere on the heading lines. +This option is only in effect when `outline-minor-mode-cycle' is non-nil." :type '(choice (const :tag "Everywhere" nil) (const :tag "At line beginning" bolp) (const :tag "Not at line beginning" (lambda () (not (bolp)))) (const :tag "At line end" eolp) - (function :tag "Custom filter")) + (function :tag "Custom filter function")) :version "28.1") (defvar outline-minor-mode-cycle) @@ -371,28 +380,33 @@ After that, changing the prefix key requires manipulating keymaps." (set-default sym val))) (defcustom outline-minor-mode-cycle nil - "Enable cycling of headings in `outline-minor-mode'. -When enabled, it puts a keymap with cycling keys on heading lines. -When point is on a heading line, then typing `TAB' cycles between `hide all', -`headings only' and `show all' (`outline-cycle'). Typing `S-TAB' on -a heading line cycles the whole buffer (`outline-cycle-buffer'). -Typing these keys anywhere outside heading lines uses their default bindings." + "Enable visibility-cycling commands on headings in `outline-minor-mode'. +If enabled, typing `TAB' on a heading line cycles the visibility +state of that heading's body between `hide all', `headings only' +and `show all' (`outline-cycle'), and typing `S-TAB' on a heading +line likewise cycles the visibility state of the whole buffer +\(`outline-cycle-buffer'). +Typing these keys anywhere outside heading lines invokes their default +bindings, per the current major mode." :type 'boolean :safe #'booleanp :version "28.1") (defcustom outline-minor-mode-highlight nil - "Highlight headings in `outline-minor-mode' using font-lock keywords. -Non-nil value works well only when outline font-lock keywords -don't conflict with the major mode's font-lock keywords. -When t, it puts outline faces only if there are no major mode's faces -on headings. When `override', it completely overwrites major mode's -faces with outline faces. When `append', it tries to append outline -faces to major mode's faces." - :type '(choice (const :tag "No highlighting" nil) - (const :tag "Overwrite major mode faces" override) - (const :tag "Append outline faces to major mode faces" append) - (const :tag "Highlight separately from major mode faces" t)) + "Whether to highlight headings in `outline-minor-mode' using font-lock keywords. +This option controles whether `outline-minor-mode' will use its font-lock +keywords to highlight headings, which could potentially conflict with +font-lock faces defined by the major mode. Thus, a non-nil value will +work well only when there's no such conflict. +If the value is t, use outline faces only if there are no major mode's +font-lock faces on headings. When `override', completely overwrite major +mode's font-lock faces with outline faces. When `append', try to append +outline font-lock faces to those of major mode." + :type '(choice (const :tag "Do not use outline font-lock highlighting" nil) + (const :tag "Overwrite major mode font-lock faces" override) + (const :tag "Append outline font-lock faces to major mode's" + append) + (const :tag "Highlight with outline font-lock faces only if major mode doesn't" t)) :safe #'symbolp :version "28.1") @@ -1521,11 +1535,14 @@ Return either 'hide-all, 'headings-only, or 'show-all." (save-excursion (outline-end-of-subtree) (point))))) (defun outline-cycle () - "Cycle between `hide all', `headings only' and `show all'. + "Cycle visibility state of the current heading line's body. -`Hide all' means hide all subheadings and their bodies. -`Headings only' means show sub headings but not their bodies. -`Show all' means show all subheadings and their bodies." +This cycles the visibility of the current heading line's subheadings +and body between `hide all', `headings only' and `show all'. + +`Hide all' means hide all the subheadings and their bodies. +`Headings only' means show the subheadings, but not their bodies. +`Show all' means show all the subheadings and their bodies." (interactive) (condition-case nil (pcase (outline--cycle-state) @@ -1547,7 +1564,15 @@ Return either 'hide-all, 'headings-only, or 'show-all." "Internal variable used for tracking buffer cycle state.") (defun outline-cycle-buffer () - "Cycle the whole buffer like in `outline-cycle'." + "Cycle visibility state of the body lines of the whole buffer. + +This cycles the visibility of all the subheadings and bodies of all +the heading lines in the buffer. It cycles them between `hide all', +`headings only' and `show all'. + +`Hide all' means hide all the buffer's subheadings and their bodies. +`Headings only' means show all the subheadings, but not their bodies. +`Show all' means show all the buffer's subheadings and their bodies." (interactive) (let (has-top-level) (save-excursion diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index c6693b4de53..642aad509c4 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -8396,30 +8396,30 @@ buffer." ((visible-list (vhdl-get-visible-signals)) ;; define syntactic regions where signals are read (scan-regions-list - '(;; right-hand side of signal/variable assignment + `(;; right-hand side of signal/variable assignment ;; (special case: "<=" is relational operator in a condition) - ((vhdl-re-search-forward "[<:]=" proc-end t) - (vhdl-re-search-forward ";\\|\\<\\(then\\|loop\\|report\\|severity\\|is\\)\\>" proc-end t)) + ((vhdl-re-search-forward "[<:]=" ,proc-end t) + (vhdl-re-search-forward ";\\|\\<\\(then\\|loop\\|report\\|severity\\|is\\)\\>" ,proc-end t)) ;; if condition - ((vhdl-re-search-forward "^\\s-*if\\>" proc-end t) - (vhdl-re-search-forward "\\<then\\>" proc-end t)) + ((vhdl-re-search-forward "^\\s-*if\\>" ,proc-end t) + (vhdl-re-search-forward "\\<then\\>" ,proc-end t)) ;; elsif condition - ((vhdl-re-search-forward "\\<elsif\\>" proc-end t) - (vhdl-re-search-forward "\\<then\\>" proc-end t)) + ((vhdl-re-search-forward "\\<elsif\\>" ,proc-end t) + (vhdl-re-search-forward "\\<then\\>" ,proc-end t)) ;; while loop condition - ((vhdl-re-search-forward "^\\s-*while\\>" proc-end t) - (vhdl-re-search-forward "\\<loop\\>" proc-end t)) + ((vhdl-re-search-forward "^\\s-*while\\>" ,proc-end t) + (vhdl-re-search-forward "\\<loop\\>" ,proc-end t)) ;; exit/next condition - ((vhdl-re-search-forward "\\<\\(exit\\|next\\)\\s-+\\w+\\s-+when\\>" proc-end t) - (vhdl-re-search-forward ";" proc-end t)) + ((vhdl-re-search-forward "\\<\\(exit\\|next\\)\\s-+\\w+\\s-+when\\>" ,proc-end t) + (vhdl-re-search-forward ";" ,proc-end t)) ;; assert condition - ((vhdl-re-search-forward "\\<assert\\>" proc-end t) - (vhdl-re-search-forward "\\(\\<report\\>\\|\\<severity\\>\\|;\\)" proc-end t)) + ((vhdl-re-search-forward "\\<assert\\>" ,proc-end t) + (vhdl-re-search-forward "\\(\\<report\\>\\|\\<severity\\>\\|;\\)" ,proc-end t)) ;; case expression - ((vhdl-re-search-forward "^\\s-*case\\>" proc-end t) - (vhdl-re-search-forward "\\<is\\>" proc-end t)) + ((vhdl-re-search-forward "^\\s-*case\\>" ,proc-end t) + (vhdl-re-search-forward "\\<is\\>" ,proc-end t)) ;; parameter list of procedure call, array index - ((and (re-search-forward "^\\s-*\\(\\w\\|\\.\\)+[ \t\n\r\f]*(" proc-end t) + ((and (re-search-forward "^\\s-*\\(\\w\\|\\.\\)+[ \t\n\r\f]*(" ,proc-end t) (1- (point))) (progn (backward-char) (forward-sexp) (while (looking-at "(") (forward-sexp)) (point))))) diff --git a/lisp/simple.el b/lisp/simple.el index bbab57703de..7e964c9d1d5 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'. @@ -5289,7 +5289,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) diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 836630acb5d..ee394a93af4 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -640,7 +640,7 @@ Returns nil if unable to find this information." ;; Could run `bzr status' in the directory and see if it succeeds, but ;; that's relatively expensive. (defalias 'vc-bzr-responsible-p #'vc-bzr-root - "Return non-nil if FILE is (potentially) controlled by bzr. + "Return the directory if FILE is (potentially) controlled by bzr. The criterion is that there is a `.bzr' directory in the same or a superior directory.") diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index e234b9a0447..8f06d5a847a 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -308,7 +308,7 @@ to the CVS command." (vc-switches 'CVS 'register))) (defun vc-cvs-responsible-p (file) - "Return non-nil if CVS thinks it is responsible for FILE." + "Return the directory if CVS thinks it is responsible for FILE." (let ((dir (if (file-directory-p file) file (file-name-directory file)))) diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el index 61e2cd23900..94621599e4a 100644 --- a/lisp/vc/vc-dav.el +++ b/lisp/vc/vc-dav.el @@ -137,9 +137,9 @@ It should return a status of either 0 (no differences found), or ) (defun vc-dav-responsible-p (url) - "Return non-nil if DAV considers itself `responsible' for URL." + "Return the URL if DAV considers itself `responsible' for URL." ;; Check for DAV support on the web server. - (and t url)) + url) ;;; Unimplemented functions ;; diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 20f3b1fba71..fb57b2bbc6e 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -288,7 +288,7 @@ to the RCS command." (match-string 1)))))) (defun vc-rcs-responsible-p (file) - "Return non-nil if RCS thinks it would be responsible for registering FILE." + "Return the directory if RCS thinks it would be responsible for FILE." ;; TODO: check for all the patterns in vc-rcs-master-templates (let ((dir (if (file-directory-p file) file diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index 4bbf92b3274..1035ee9ce9d 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -212,7 +212,7 @@ to the SCCS command." (vc-sccs-do-command nil 0 "get" (vc-master-name file))))) (defun vc-sccs-responsible-p (file) - "Return non-nil if SCCS thinks it would be responsible for registering FILE." + "Return the directory if SCCS thinks it would be responsible for FILE." ;; TODO: check for all the patterns in vc-sccs-master-templates (or (and (file-directory-p (expand-file-name "SCCS" (file-name-directory file))) diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el index 1c1a7b5d139..5a252c55cb2 100644 --- a/lisp/vc/vc-src.el +++ b/lisp/vc/vc-src.el @@ -242,11 +242,13 @@ This function differs from vc-do-command in that it invokes `vc-src-program'." (vc-src-command nil files "add")) (defun vc-src-responsible-p (file) - "Return non-nil if SRC thinks it would be responsible for registering FILE." - (file-directory-p (expand-file-name ".src" - (if (file-directory-p file) - file - (file-name-directory file))))) + "Return the directory if SRC thinks it would be responsible for FILE." + (let ((dir (expand-file-name ".src" + (if (file-directory-p file) + file + (file-name-directory file))))) + (and (file-directory-p dir) + dir))) (defun vc-src-checkin (files comment &optional _rev) "SRC-specific version of `vc-backend-checkin'. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index a6124acadd2..3508f684c49 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -220,7 +220,7 @@ ;; ;; - responsible-p (file) ;; -;; Return non-nil if this backend considers itself "responsible" for +;; Return the directory if this backend considers itself "responsible" for ;; FILE, which can also be a directory. This function is used to find ;; out what backend to use for registration of new files and for things ;; like change log generation. The default implementation always diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 4cc733ee79e..b7818f8b21e 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -198,6 +198,8 @@ s/ *@WEBP_LIBS@// /^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 $@\ @@ -209,6 +211,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\ diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp index 45e03621ce3..302fefe19f0 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/indent.c b/src/indent.c index d5ad02ae3af..acbb9dc9723 100644 --- a/src/indent.c +++ b/src/indent.c @@ -2209,7 +2209,10 @@ whether or not it is currently displayed in some window. */) } else it_overshoot_count = - !(it.method == GET_FROM_IMAGE || it.method == GET_FROM_STRETCH); + /* If image_id is negative, it's a fringe bitmap, which by + definition doesn't affect display in the text area. */ + !((it.method == GET_FROM_IMAGE && it.image_id >= 0) + || it.method == GET_FROM_STRETCH); if (start_x_given) { 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 <https://www.gnu.org/licenses/>. */ #include <dpmi.h> #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 *); diff --git a/src/window.c b/src/window.c index aed698d2a37..4cca60e23d9 100644 --- a/src/window.c +++ b/src/window.c @@ -1852,8 +1852,13 @@ Return POS. */) DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. WINDOW must be a live window and defaults to the selected one. Return -POS. Optional third arg NOFORCE non-nil inhibits next redisplay from -overriding motion of point in order to display at this exact start. +POS. + +Optional third arg NOFORCE non-nil prevents next redisplay from +moving point if displaying the window at POS makes point invisible; +redisplay will then choose the WINDOW's start position by itself in +that case, i.e. it will disregard POS if adhering to it will make +point not visible in the window. For reliable setting of WINDOW start position, make sure point is at a position that will be visible when that start is in effect, diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index 254595d1b4f..fe27629d902 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el @@ -905,28 +905,31 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." (file-attributes %S \"/\")) \ (message \"tramp-archive loaded: %%s\" \ (featurep 'tramp-archive))))")) - (dolist (default-directory - `(,temporary-file-directory - ;; Starting Emacs in a directory which has - ;; `tramp-archive-file-name-regexp' syntax is - ;; supported only with Emacs > 27.2 (sigh!). - ;; (Bug#48476) - ,(file-name-as-directory tramp-archive-test-directory))) - (dolist (file `("/mock::foo" ,(concat tramp-archive-test-archive "foo"))) - (should - (string-match - (format - "tramp-archive loaded: %s[[:ascii:]]+tramp-archive loaded: %s" - (tramp-archive-file-name-p default-directory) - (or (tramp-archive-file-name-p default-directory) - (tramp-archive-file-name-p file))) - (shell-command-to-string - (format - "%s -batch -Q -L %s --eval %s" - (shell-quote-argument - (expand-file-name invocation-name invocation-directory)) - (mapconcat #'shell-quote-argument load-path " -L ") - (shell-quote-argument (format code file)))))))))) + (dolist (enabled '(t nil)) + (dolist (default-directory + `(,temporary-file-directory + ;; Starting Emacs in a directory which has + ;; `tramp-archive-file-name-regexp' syntax is + ;; supported only with Emacs > 27.2 (sigh!). + ;; (Bug#48476) + ,(file-name-as-directory tramp-archive-test-directory))) + (dolist (file `("/mock::foo" ,(concat tramp-archive-test-archive "foo"))) + (should + (string-match + (format + "tramp-archive loaded: %s[[:ascii:]]+tramp-archive loaded: %s" + (tramp-archive-file-name-p default-directory) + (or (tramp-archive-file-name-p default-directory) + (and enabled (tramp-archive-file-name-p file)))) + (shell-command-to-string + (format + "%s -batch -Q -L %s --eval %s --eval %s" + (shell-quote-argument + (expand-file-name invocation-name invocation-directory)) + (mapconcat #'shell-quote-argument load-path " -L ") + (shell-quote-argument + (format "(setq tramp-archive-enabled %s)" enabled)) + (shell-quote-argument (format code file))))))))))) (ert-deftest tramp-archive-test46-delay-load () "Check that `tramp-archive' is loaded lazily, only when needed." |