emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5890b80bca 06/14: Merge from origin/emacs-28


From: Eli Zaretskii
Subject: master 5890b80bca 06/14: Merge from origin/emacs-28
Date: Sat, 16 Apr 2022 14:06:44 -0400 (EDT)

branch: master
commit 5890b80bca13b48c6c3fd26ac2721db7f3a3d013
Merge: 6339fcffa1 84a2857722
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge from origin/emacs-28
    
    84a2857722 Fix scrolling of the stack window in Calc
    9dd44505b1 ; * src/window.c (Fset_window_start): Clarify the effect o...
    24a6c7c8c0 Update and fix instructions and scripts for updating the W...
    886339747b Extend tramp-archive-test45-auto-load
    ff997ad786 Ensure local `default-directory' in Tramp when needed
    4f27588a16 Clarify "idleness" in the ELisp manual
---
 admin/admin.el                       | 141 ++++++++++++++++++-----------------
 admin/make-tarball.txt               |  75 ++++++++++++++++---
 admin/upload-manuals                 |   5 +-
 doc/lispref/os.texi                  |   3 +-
 etc/refcards/Makefile                |   7 +-
 lisp/calc/calc.el                    |   2 +-
 lisp/net/tramp.el                    |  17 +++--
 src/window.c                         |   9 ++-
 test/lisp/net/tramp-archive-tests.el |  47 ++++++------
 9 files changed, 189 insertions(+), 117 deletions(-)

diff --git a/admin/admin.el b/admin/admin.el
index 5f02ea8ce4..8c68b18183 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 ec69302dae..17a4d9f807 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 1fa9865e65..1b7950ede8 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 4ee893f860..30883402f9 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/etc/refcards/Makefile b/etc/refcards/Makefile
index 6f8913c5f0..4c5daa9f44 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 3b1cf248fd..e642d1c5e4 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)))
                (set-window-start win (point)))))
        (calc-cursor-stack-index 0)
        (if (looking-at " *\\.$")
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 1f429edf4f..d7d375e111 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/src/window.c b/src/window.c
index aed698d2a3..4cca60e23d 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 254595d1b4..fe27629d90 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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]