aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2017-10-20 22:45:36 -0700
committerPaul Eggert2017-10-20 22:45:36 -0700
commitf400c7b69714c91a714ff0ab5b9f16708daf49b9 (patch)
tree4a6549c67213696481b659654cac312f204f9479
parent8cedc552463358509dd785f54e58bfaf8099de62 (diff)
parent868eb74f910eb67a5e74ebb1867ebcfbfced55c4 (diff)
downloademacs-f400c7b69714c91a714ff0ab5b9f16708daf49b9.tar.gz
emacs-f400c7b69714c91a714ff0ab5b9f16708daf49b9.zip
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
-rw-r--r--admin/admin.el20
-rw-r--r--lisp/gnus/gnus-sum.el2
-rw-r--r--lisp/gnus/mail-source.el16
-rw-r--r--lisp/subr.el10
-rw-r--r--src/doc.c2
5 files changed, 28 insertions, 22 deletions
diff --git a/admin/admin.el b/admin/admin.el
index b2adfbf9f76..bedb6b2c032 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -158,11 +158,17 @@ Documentation changes might not have been completed!"))))
158 (re-search-forward "is about changes in Emacs version \\([0-9]+\\)") 158 (re-search-forward "is about changes in Emacs version \\([0-9]+\\)")
159 (replace-match (number-to-string newmajor) nil nil nil 1) 159 (replace-match (number-to-string newmajor) nil nil nil 1)
160 (re-search-forward "^See files \\(NEWS\\)") 160 (re-search-forward "^See files \\(NEWS\\)")
161 (replace-match (format "NEWS.%s, NEWS" oldmajor) nil nil nil 1) 161 (unless (save-match-data
162 (let ((start (line-beginning-position))) 162 (when (looking-at "\\(\\..*\\), \\(\\.\\.\\.\\|…\\)")
163 (search-forward "in older Emacs versions") 163 (replace-match
164 (or (equal start (line-beginning-position)) 164 (format ".%s, NEWS.%s" oldmajor (1- oldmajor))
165 (fill-region start (line-beginning-position 2)))) 165 nil nil nil 1)
166 t))
167 (replace-match (format "NEWS.%s, NEWS" oldmajor) nil nil nil 1)
168 (let ((start (line-beginning-position)))
169 (search-forward "in older Emacs versions")
170 (or (equal start (line-beginning-position))
171 (fill-region start (line-beginning-position 2)))))
166 (re-search-forward "^ $") 172 (re-search-forward "^ $")
167 (forward-line -1) 173 (forward-line -1)
168 (let ((start (point))) 174 (let ((start (point)))
@@ -893,3 +899,7 @@ changes (in a non-trivial way). This function does not check for that."
893(provide 'admin) 899(provide 'admin)
894 900
895;;; admin.el ends here 901;;; admin.el ends here
902
903;; Local Variables:
904;; coding: utf-8
905;; End:
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 48571096cc7..79d38f1bfe3 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."
10294 "Import an arbitrary file into a mail newsgroup." 10294 "Import an arbitrary file into a mail newsgroup."
10295 (interactive "fImport file: \nP") 10295 (interactive "fImport file: \nP")
10296 (let ((group gnus-newsgroup-name) 10296 (let ((group gnus-newsgroup-name)
10297 (now (current-time))
10298 atts lines group-art) 10297 atts lines group-art)
10299 (unless (gnus-check-backend-function 'request-accept-article group) 10298 (unless (gnus-check-backend-function 'request-accept-article group)
10300 (error "%s does not support article importing" group)) 10299 (error "%s does not support article importing" group))
@@ -10313,6 +10312,7 @@ latter case, they will be copied into the relevant groups."
10313 (goto-char (point-min)) 10312 (goto-char (point-min))
10314 (unless (re-search-forward "^date:" nil t) 10313 (unless (re-search-forward "^date:" nil t)
10315 (goto-char (point-max)) 10314 (goto-char (point-max))
10315 (setq atts (file-attributes file))
10316 (insert "Date: " (message-make-date (nth 5 atts)) "\n"))) 10316 (insert "Date: " (message-make-date (nth 5 atts)) "\n")))
10317 ;; This doesn't look like an article, so we fudge some headers. 10317 ;; This doesn't look like an article, so we fudge some headers.
10318 (setq atts (file-attributes file) 10318 (setq atts (file-attributes file)
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 3befd46620e..93f03be72d0 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."
591If CONFIRM is non-nil, ask for confirmation before removing a file." 591If CONFIRM is non-nil, ask for confirmation before removing a file."
592 (interactive "P") 592 (interactive "P")
593 (require 'gnus-util) 593 (require 'gnus-util)
594 (let* ((high2days (/ 65536.0 60 60 24));; convert high bits to days 594 (let* ((now (current-time))
595 (low2days (/ 1.0 65536.0)) ;; convert low bits to days
596 (diff (if (natnump age) age 30));; fallback, if no valid AGE given 595 (diff (if (natnump age) age 30));; fallback, if no valid AGE given
597 currday files) 596 files)
598 (setq files (directory-files 597 (setq files (directory-files
599 mail-source-directory t 598 mail-source-directory t
600 (concat "\\`" 599 (concat "\\`"
601 (regexp-quote mail-source-incoming-file-prefix))) 600 (regexp-quote mail-source-incoming-file-prefix))))
602 currday (* (car (current-time)) high2days)
603 currday (+ currday (* low2days (nth 1 (current-time)))))
604 (while files 601 (while files
605 (let* ((ffile (car files)) 602 (let* ((ffile (car files))
606 (bfile (replace-regexp-in-string "\\`.*/\\([^/]+\\)\\'" "\\1" 603 (bfile (replace-regexp-in-string "\\`.*/\\([^/]+\\)\\'" "\\1"
607 ffile)) 604 ffile))
608 (filetime (nth 5 (file-attributes ffile))) 605 (filetime (nth 5 (file-attributes ffile))))
609 (fileday (* (car filetime) high2days))
610 (fileday (+ fileday (* low2days (nth 1 filetime)))))
611 (setq files (cdr files)) 606 (setq files (cdr files))
612 (when (and (> (- currday fileday) diff) 607 (when (and (> (time-to-number-of-days (time-subtract now filetime))
608 diff)
613 (if confirm 609 (if confirm
614 (y-or-n-p 610 (y-or-n-p
615 (format-message "\ 611 (format-message "\
diff --git a/lisp/subr.el b/lisp/subr.el
index a6c998e9be2..b6b55b53def 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
4820and/or MAX-VALUE are nil. 4820and/or MAX-VALUE are nil.
4821 4821
4822Optional MIN-TIME specifies the minimum interval time between 4822Optional MIN-TIME specifies the minimum interval time between
4823echo area updates (default is 0.2 seconds.) If the function 4823echo area updates (default is 0.2 seconds.) If the OS is not
4824`float-time' is not present, time is not tracked at all. If the 4824capable of measuring fractions of seconds, this parameter is
4825OS is not capable of measuring fractions of seconds, this 4825effectively rounded up."
4826parameter is effectively rounded up."
4827 (when (string-match "[[:alnum:]]\\'" message) 4826 (when (string-match "[[:alnum:]]\\'" message)
4828 (setq message (concat message "..."))) 4827 (setq message (concat message "...")))
4829 (unless min-time 4828 (unless min-time
@@ -4831,8 +4830,7 @@ parameter is effectively rounded up."
4831 (let ((reporter 4830 (let ((reporter
4832 ;; Force a call to `message' now 4831 ;; Force a call to `message' now
4833 (cons (or min-value 0) 4832 (cons (or min-value 0)
4834 (vector (if (and (fboundp 'float-time) 4833 (vector (if (>= min-time 0.02)
4835 (>= min-time 0.02))
4836 (float-time) nil) 4834 (float-time) nil)
4837 min-value 4835 min-value
4838 max-value 4836 max-value
diff --git a/src/doc.c b/src/doc.c
index 3286c12675a..e81740bfc1c 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -336,6 +336,8 @@ string is passed through `substitute-command-keys'. */)
336 } 336 }
337 337
338 fun = Findirect_function (function, Qnil); 338 fun = Findirect_function (function, Qnil);
339 if (NILP (fun))
340 xsignal1 (Qvoid_function, function);
339 if (CONSP (fun) && EQ (XCAR (fun), Qmacro)) 341 if (CONSP (fun) && EQ (XCAR (fun), Qmacro))
340 fun = XCDR (fun); 342 fun = XCDR (fun);
341 if (SUBRP (fun)) 343 if (SUBRP (fun))