emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master f400c7b 3/4: Merge from origin/emacs-26


From: Paul Eggert
Subject: [Emacs-diffs] master f400c7b 3/4: Merge from origin/emacs-26
Date: Sat, 21 Oct 2017 02:01:21 -0400 (EDT)

branch: master
commit f400c7b69714c91a714ff0ab5b9f16708daf49b9
Merge: 8cedc55 868eb74
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Merge from origin/emacs-26
    
    868eb74f91 Simplify make-progress-reporter vs float-time
    83db9a1bba Fix two more minor Gnus typos
    e655946ce0 Fix two minor Gnus typos
    6a00914d6d Tweak Fdocumentation's error for an undefined function
    7c63655e39 Tweak format of list of old files in NEWS header
    
    # Conflicts:
    #   etc/NEWS
---
 admin/admin.el           | 20 +++++++++++++++-----
 lisp/gnus/gnus-sum.el    |  2 +-
 lisp/gnus/mail-source.el | 16 ++++++----------
 lisp/subr.el             | 10 ++++------
 src/doc.c                |  2 ++
 5 files changed, 28 insertions(+), 22 deletions(-)

diff --git a/admin/admin.el b/admin/admin.el
index b2adfbf..bedb6b2 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -158,11 +158,17 @@ Documentation changes might not have been completed!"))))
         (re-search-forward "is about changes in Emacs version \\([0-9]+\\)")
         (replace-match (number-to-string newmajor) nil nil nil 1)
         (re-search-forward "^See files \\(NEWS\\)")
-        (replace-match (format "NEWS.%s, NEWS" oldmajor) nil nil nil 1)
-        (let ((start (line-beginning-position)))
-          (search-forward "in older Emacs versions")
-          (or (equal start (line-beginning-position))
-              (fill-region start (line-beginning-position 2))))
+        (unless (save-match-data
+                  (when (looking-at "\\(\\..*\\), \\(\\.\\.\\.\\|…\\)")
+                    (replace-match
+                     (format ".%s, NEWS.%s" oldmajor (1- oldmajor))
+                     nil nil nil 1)
+                    t))
+          (replace-match (format "NEWS.%s, NEWS" oldmajor) nil nil nil 1)
+          (let ((start (line-beginning-position)))
+            (search-forward "in older Emacs versions")
+            (or (equal start (line-beginning-position))
+                (fill-region start (line-beginning-position 2)))))
         (re-search-forward "^$")
         (forward-line -1)
         (let ((start (point)))
@@ -893,3 +899,7 @@ changes (in a non-trivial way).  This function does not 
check for that."
 (provide 'admin)
 
 ;;; admin.el ends here
+
+;; Local Variables:
+;; coding: utf-8
+;; End:
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 4857109..79d38f1 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -10294,7 +10294,6 @@ latter case, they will be copied into the relevant 
groups."
   "Import an arbitrary file into a mail newsgroup."
   (interactive "fImport file: \nP")
   (let ((group gnus-newsgroup-name)
-       (now (current-time))
        atts lines group-art)
     (unless (gnus-check-backend-function 'request-accept-article group)
       (error "%s does not support article importing" group))
@@ -10313,6 +10312,7 @@ latter case, they will be copied into the relevant 
groups."
            (goto-char (point-min))
            (unless (re-search-forward "^date:" nil t)
              (goto-char (point-max))
+             (setq atts (file-attributes file))
              (insert "Date: " (message-make-date (nth 5 atts)) "\n")))
        ;; This doesn't look like an article, so we fudge some headers.
        (setq atts (file-attributes file)
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 3befd46..93f03be 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -591,25 +591,21 @@ Return the number of files that were found."
 If CONFIRM is non-nil, ask for confirmation before removing a file."
   (interactive "P")
   (require 'gnus-util)
-  (let* ((high2days (/ 65536.0 60 60 24));; convert high bits to days
-        (low2days  (/ 1.0 65536.0))     ;; convert low bits to days
+  (let* ((now (current-time))
         (diff (if (natnump age) age 30));; fallback, if no valid AGE given
-        currday files)
+        files)
     (setq files (directory-files
                 mail-source-directory t
                 (concat "\\`"
-                        (regexp-quote mail-source-incoming-file-prefix)))
-         currday (* (car (current-time)) high2days)
-         currday (+ currday (* low2days (nth 1 (current-time)))))
+                        (regexp-quote mail-source-incoming-file-prefix))))
     (while files
       (let* ((ffile (car files))
             (bfile (replace-regexp-in-string "\\`.*/\\([^/]+\\)\\'" "\\1"
                                              ffile))
-            (filetime (nth 5 (file-attributes ffile)))
-            (fileday (* (car filetime) high2days))
-            (fileday (+ fileday (* low2days (nth 1 filetime)))))
+            (filetime (nth 5 (file-attributes ffile))))
        (setq files (cdr files))
-       (when (and (> (- currday fileday) diff)
+       (when (and (> (time-to-number-of-days (time-subtract now filetime))
+                     diff)
                   (if confirm
                       (y-or-n-p
                        (format-message "\
diff --git a/lisp/subr.el b/lisp/subr.el
index a6c998e..b6b55b5 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4820,10 +4820,9 @@ CURRENT-VALUE and MIN-CHANGE do not have any effect if 
MIN-VALUE
 and/or MAX-VALUE are nil.
 
 Optional MIN-TIME specifies the minimum interval time between
-echo area updates (default is 0.2 seconds.)  If the function
-`float-time' is not present, time is not tracked at all.  If the
-OS is not capable of measuring fractions of seconds, this
-parameter is effectively rounded up."
+echo area updates (default is 0.2 seconds.)  If the OS is not
+capable of measuring fractions of seconds, this parameter is
+effectively rounded up."
   (when (string-match "[[:alnum:]]\\'" message)
     (setq message (concat message "...")))
   (unless min-time
@@ -4831,8 +4830,7 @@ parameter is effectively rounded up."
   (let ((reporter
         ;; Force a call to `message' now
         (cons (or min-value 0)
-              (vector (if (and (fboundp 'float-time)
-                               (>= min-time 0.02))
+              (vector (if (>= min-time 0.02)
                           (float-time) nil)
                       min-value
                       max-value
diff --git a/src/doc.c b/src/doc.c
index 3286c12..e81740b 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -336,6 +336,8 @@ string is passed through `substitute-command-keys'.  */)
     }
 
   fun = Findirect_function (function, Qnil);
+  if (NILP (fun))
+    xsignal1 (Qvoid_function, function);
   if (CONSP (fun) && EQ (XCAR (fun), Qmacro))
     fun = XCDR (fun);
   if (SUBRP (fun))



reply via email to

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