# HG changeset patch # User Gerd Moellmann # Date 966526614 0 # Node ID 67bba5cea7bfc76110bedcd7a16d7fab526bf298 # Parent 27d71c4b6de1dcb3cb0ea46f90cd87e1afed1477 (view-emacs-news): Rewritten for new naming scheme for old NEWS files. diff -r 27d71c4b6de1 -r 67bba5cea7bf lisp/help.el --- a/lisp/help.el Thu Aug 17 14:17:37 2000 +0000 +++ b/lisp/help.el Thu Aug 17 15:36:54 2000 +0000 @@ -436,12 +436,19 @@ (defun view-emacs-news (&optional arg) "Display info on recent changes to Emacs. -With numeric argument display information on correspondingly older changes." +With numeric argument, display information on correspondingly older changes." (interactive "P") - (let* ((arg (if arg (prefix-numeric-value arg) 0))) - (find-file-read-only - (expand-file-name (concat (make-string arg ?O) "NEWS") - data-directory)))) + (let* ((arg (if arg (prefix-numeric-value arg) 0)) + (file (cond ((eq arg 0) "NEWS") + ((eq arg 1) "ONEWS") + (t + (nth (- arg 2) + (nreverse (directory-files data-directory + nil "^NEWS\\.[0-9]+$" + nil))))))) + (if file + (find-file-read-only (expand-file-name file data-directory)) + (error "No such old news")))) (defun view-emacs-FAQ () "Display the Emacs Frequently Asked Questions (FAQ) file."