[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a4df7483295 01/11: Prefer emacs-news-mode in etc/ERC-NEWS
From: |
F. Jason Park |
Subject: |
master a4df7483295 01/11: Prefer emacs-news-mode in etc/ERC-NEWS |
Date: |
Mon, 12 Jun 2023 00:15:54 -0400 (EDT) |
branch: master
commit a4df74832959f2f11d4dd52a39781ccc8d86550d
Author: F. Jason Park <jp@neverwas.me>
Commit: F. Jason Park <jp@neverwas.me>
Prefer emacs-news-mode in etc/ERC-NEWS
* etc/ERC-NEWS: Remove `outline' from prop line and prefer
`emacs-news-mode' in local variables list.
* lisp/erc/erc.el (erc-news): Overwrite cached file and ask before
re-fetching.
---
etc/ERC-NEWS | 3 ++-
lisp/erc/erc.el | 17 ++++++++++-------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS
index e9ec9e2caab..5753120107a 100644
--- a/etc/ERC-NEWS
+++ b/etc/ERC-NEWS
@@ -1,4 +1,4 @@
-ERC NEWS -*- outline -*-
+ERC NEWS
Copyright (C) 2006-2023 Free Software Foundation, Inc.
See the end of the file for license conditions.
@@ -1926,5 +1926,6 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>.
Local variables:
coding: utf-8
mode: outline
+mode: emacs-news
paragraph-separate: "[ ]*$"
end:
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 2c2df81fa6d..99505a2355f 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -7458,8 +7458,9 @@ With ARG, download and display the latest revision, which
may
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)
@@ -7467,7 +7468,10 @@ contain more up-to-date information, even for older
versions."
(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
@@ -7482,13 +7486,12 @@ contain more up-to-date information, even for older
versions."
(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))
- master updated (b6d48190609 -> edfbdb3f165), F. Jason Park, 2023/06/12
- master 67f7ac2bbee 05/11: Deprecate nicknames entry in erc-button-alist, F. Jason Park, 2023/06/12
- master 2daa71f9329 09/11: Don't insert prompt input before markers in ERC, F. Jason Park, 2023/06/12
- master 1c3f6aa98f5 07/11: Measure stamps pixel-wise with erc-fill-wrap, F. Jason Park, 2023/06/12
- master d880a08f959 08/11: Cement ordering of essential hook members in ERC, F. Jason Park, 2023/06/12
- master ac80e377830 02/11: ; * doc/misc/erc.texi: Fix reconnecting in SOCKS example., F. Jason Park, 2023/06/12
- master a4df7483295 01/11: Prefer emacs-news-mode in etc/ERC-NEWS,
F. Jason Park <=
- master 56e1922281d 10/11: Revert "Add hook to regain nickname in ERC", F. Jason Park, 2023/06/12
- master bd969326e96 04/11: Add alias erc-buffer-do for erc-buffer-filter, F. Jason Park, 2023/06/12
- master 0f76bed4928 03/11: ; * lisp/erc/erc.el (erc-send-input-line-function): Doc., F. Jason Park, 2023/06/12
- master e560f9af8e8 06/11: Allow ERC modules to extend erc-nick-popup-alist, F. Jason Park, 2023/06/12
- master edfbdb3f165 11/11: Define missing groups for ERC modules, F. Jason Park, 2023/06/12