-ERC NEWS -*- outline -*-
+ERC NEWS
Copyright (C) 2006-2023 Free Software Foundation, Inc.
See the end of the file for license conditions.
Local variables:
coding: utf-8
mode: outline
+mode: emacs-news
paragraph-separate: "[ \f]*$"
end:
contain more up-to-date information, even for older versions."
(interactive "P")
(find-file
- (or (and arg erc--news-temp-file
+ (or (and erc--news-temp-file
(time-less-p (current-time) (car erc--news-temp-file))
+ (not (and arg (y-or-n-p (format "Re-fetch? "))))
(cdr erc--news-temp-file))
(and arg
(with-current-buffer (url-retrieve-synchronously erc--news-url)
(search-forward "200 OK" (pos-eol))
(search-forward "\n\n")
(delete-region (point-min) (point))
- (let ((tempfile (make-temp-file "erc-news.")))
+ ;; May warn about file having changed on disk (unless
+ ;; `query-about-changed-file' is nil on 28+).
+ (let ((tempfile (or (cdr erc--news-temp-file)
+ (make-temp-file "erc-news."))))
(write-region (point-min) (point-max) tempfile)
(kill-buffer)
(cdr (setq erc--news-temp-file
(expand-file-name "ERC-NEWS" data-directory)))
(when (fboundp 'emacs-news-view-mode)
(emacs-news-view-mode))
+ (goto-char (point-min))
(let ((v (mapcar #'number-to-string
(seq-take-while #'natnump (version-to-list erc-version)))))
- (while (and v
- (goto-char (point-min))
- (not (search-forward (concat "\014\n* Changes in ERC "
- (string-join v "."))
- nil t)))
+ (while (and v (not (search-forward (concat "\014\n* Changes in ERC "
+ (string-join v "."))
+ nil t)))
(setq v (butlast v))))
(beginning-of-line))