From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: find-file and friends doc string improvements Date: Fri, 9 Apr 2004 16:01:28 -0600 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <16503.7480.436692.391082@ihs.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1081548369 11698 80.91.224.253 (9 Apr 2004 22:06:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Apr 2004 22:06:09 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 10 00:05:59 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BC48M-0003cj-01 for ; Sat, 10 Apr 2004 00:05:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BC47k-0006PX-G0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Apr 2004 18:05:20 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BC47d-0006PD-Rf for bug-gnu-emacs@prep.ai.mit.edu; Fri, 09 Apr 2004 18:05:13 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BC45B-0005BZ-Hy for bug-gnu-emacs@prep.ai.mit.edu; Fri, 09 Apr 2004 18:03:13 -0400 Original-Received: from [130.59.10.2] (helo=chx400.switch.ch) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1BC44k-0004fe-0K for bug-gnu-emacs@prep.ai.mit.edu; Fri, 09 Apr 2004 18:02:14 -0400 Original-Received: from mail1.ihs.com ([170.207.70.222]) by chx400.switch.ch with esmtp (Exim 3.20 #1) id 1BC44i-0004cM-00 for gnu-emacs-bug@moderators.isc.org; Sat, 10 Apr 2004 00:02:12 +0200 Original-Received: from briard.ihs.com (esd80.ihs.com [170.207.51.80]) by mail1.ihs.com (8.12.10/8.12.10) with SMTP id i39M1F1o009140 for ; Fri, 9 Apr 2004 16:01:15 -0600 (MDT) Original-Received: from Mail.FU-Berlin.DE (Mail.fu-berlin.de [130.133.1.2]) by horus.isnic.is (8.12.9p2/8.12.9/isnic) with ESMTP id i38H6vgi032127 for ; Thu, 8 Apr 2004 17:06:58 GMT (envelope-from ihs_4664@yahoo.com) Original-Received: by Mail.FU-Berlin.DE (Exim 4.31) from curry.zedat.fu-berlin.de ([160.45.10.36]) for gnu-emacs-bug@moderators.isc.org with esmtp id <1BBczR-0001SZ-5a>; Thu, 08 Apr 2004 19:06:57 +0200 Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.fu-berlin.de with bsmtp id ; Thu, 8 Apr 2004 19:06:57 +0200 (MEST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: 170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 223 X-Orig-NNTP-Posting-Host: 170.207.51.80 X-Orig-X-Trace: news.uni-berlin.de 1081444016 91011797 I 170.207.51.80 ([82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-IHS-MailScanner: Found to be clean X-IHS-MailScanner-SpamCheck: X-IHS-MailScanner-Envelope-Sender: kevinr@ihs.com X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:7546 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:7546 find-file's doc string doesn't describe the effects of setting find-file-visit-truename or find-file-run-dired. Here's a patch that adds 2 short sentences to its doc string, and which provides references from the 5 related commands back to it. It also cleans up the find-alternate-file and -other-window doc strings, and adds a reference to buffer-read-only in toggle-read-only's doc string. 2004-04-08 Kevin Rodgers * lisp/files.el (find-file): Describe the effect of setting find-file-visit-truename and find-file-run-dired. (find-file-other-window, find-file-other-frame, find-file-read-only): Reference find-file. (find-file-read-only-other-window, find-file-read-only-other-frame): Reference find-file-read-only. (find-alternate-file, find-alternate-file-other-window): Describe consistenly. (toggle-read-only): Reference `buffer-read-only'. *** emacs-21.3/lisp/files.el Thu Oct 24 07:07:56 2002 --- emacs-21.3/lisp/files.el Thu Apr 8 10:44:43 2004 *************** *** 726,736 **** (defun find-file (filename &optional wildcards) "Edit file FILENAME. ! Switch to a buffer visiting file FILENAME, ! creating one if none already exists. ! Interactively, or if WILDCARDS is non-nil in a call from Lisp, ! expand wildcards (if any) and visit multiple files. Wildcard expansion ! can be suppressed by setting `find-file-wildcards'." (interactive "FFind file: \np") (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) --- 726,740 ---- (defun find-file (filename &optional wildcards) "Edit file FILENAME. ! Switch to a buffer visiting file FILENAME, creating one if none ! already exists. If `find-file-visit-truename' is set, a buffer ! visiting the same file under a different name will be selected. ! ! Interactively, or if WILDCARDS is non-nil in a call from Lisp, expand ! wildcards (if any) and visit multiple files. Wildcard expansion can ! be suppressed by setting `find-file-wildcards'. ! ! If `find-file-run-dired' is set, run \\[dired] when FILENAME is a directory." (interactive "FFind file: \np") (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) *************** *** 738,748 **** (switch-to-buffer value)))) (defun find-file-other-window (filename &optional wildcards) ! "Edit file FILENAME, in another window. ! May create a new window, or reuse an existing one. ! See the function `display-buffer'. ! Interactively, or if WILDCARDS is non-nil in a call from Lisp, ! expand wildcards (if any) and visit multiple files." (interactive "FFind file in other window: \np") (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) --- 742,753 ---- (switch-to-buffer value)))) (defun find-file-other-window (filename &optional wildcards) ! "Edit file FILENAME as with `find-file', in another window. ! May create a new window, or reuse an existing one. See the function ! `display-buffer'. ! ! Interactively, or if WILDCARDS is non-nil in a call from Lisp, expand ! wildcards (if any) and visit multiple files." (interactive "FFind file in other window: \np") (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) *************** *** 753,763 **** (switch-to-buffer-other-window value)))) (defun find-file-other-frame (filename &optional wildcards) ! "Edit file FILENAME, in another frame. ! May create a new frame, or reuse an existing one. ! See the function `display-buffer'. ! Interactively, or if WILDCARDS is non-nil in a call from Lisp, ! expand wildcards (if any) and visit multiple files." (interactive "FFind file in other frame: \np") (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) --- 758,769 ---- (switch-to-buffer-other-window value)))) (defun find-file-other-frame (filename &optional wildcards) ! "Edit file FILENAME as with `find-file', in another frame. ! May create a new frame, or reuse an existing one. See the function ! `display-buffer'. ! ! Interactively, or if WILDCARDS is non-nil in a call from Lisp, expand ! wildcards (if any) and visit multiple files." (interactive "FFind file in other frame: \np") (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) *************** *** 768,775 **** (switch-to-buffer-other-frame value)))) (defun find-file-read-only (filename &optional wildcards) ! "Edit file FILENAME but don't allow changes. ! Like `find-file' but marks buffer as read-only. Use \\[toggle-read-only] to permit editing." (interactive "fFind file read-only: \np") (find-file filename wildcards) --- 774,781 ---- (switch-to-buffer-other-frame value)))) (defun find-file-read-only (filename &optional wildcards) ! "Edit file FILENAME as with `find-file', but don't allow changes. ! Marks buffer as read-only. Use \\[toggle-read-only] to permit editing." (interactive "fFind file read-only: \np") (find-file filename wildcards) *************** *** 777,784 **** (current-buffer)) (defun find-file-read-only-other-window (filename &optional wildcards) ! "Edit file FILENAME in another window but don't allow changes. ! Like \\[find-file-other-window] but marks buffer as read-only. Use \\[toggle-read-only] to permit editing." (interactive "fFind file read-only other window: \np") (find-file-other-window filename wildcards) --- 783,790 ---- (current-buffer)) (defun find-file-read-only-other-window (filename &optional wildcards) ! "Edit file FILENAME as with `find-file-read-only', in another window. ! Like \\[find-file-other-window], but marks buffer as read-only. Use \\[toggle-read-only] to permit editing." (interactive "fFind file read-only other window: \np") (find-file-other-window filename wildcards) *************** *** 786,793 **** (current-buffer)) (defun find-file-read-only-other-frame (filename &optional wildcards) ! "Edit file FILENAME in another frame but don't allow changes. ! Like \\[find-file-other-frame] but marks buffer as read-only. Use \\[toggle-read-only] to permit editing." (interactive "fFind file read-only other frame: \np") (find-file-other-frame filename wildcards) --- 792,799 ---- (current-buffer)) (defun find-file-read-only-other-frame (filename &optional wildcards) ! "Edit file FILENAME as with `find-file-read-only', in another frame. ! Like \\[find-file-other-frame], but marks buffer as read-only. Use \\[toggle-read-only] to permit editing." (interactive "fFind file read-only other frame: \np") (find-file-other-frame filename wildcards) *************** *** 795,802 **** (current-buffer)) (defun find-alternate-file-other-window (filename) ! "Find file FILENAME as a replacement for the file in the next window. ! This command does not select that window." (interactive (save-selected-window (other-window 1) --- 801,808 ---- (current-buffer)) (defun find-alternate-file-other-window (filename) ! "Edit file FILENAME as a replacement for the buffer in the next window. ! This command does not select that window or kill its previous buffer." (interactive (save-selected-window (other-window 1) *************** *** 815,823 **** (find-alternate-file filename)))) (defun find-alternate-file (filename) ! "Find file FILENAME, select its buffer, kill previous buffer. If the current buffer now contains an empty file that you just visited ! \(presumably by mistake), use this command to visit the file you really want." (interactive (let ((file buffer-file-name) (file-name nil) --- 821,830 ---- (find-alternate-file filename)))) (defun find-alternate-file (filename) ! "Edit file FILENAME as a replacement for the buffer in the selected window. If the current buffer now contains an empty file that you just visited ! \(presumably by mistake), use this command to visit the file you really want. ! This command kills the previous buffer." (interactive (let ((file buffer-file-name) (file-name nil) *************** *** 2851,2857 **** (defun toggle-read-only (&optional arg) "Change whether this buffer is visiting its file read-only. ! With arg, set read-only iff arg is positive. If visiting file read-only and `view-read-only' is non-nil, enter view mode." (interactive "P") (cond --- 2858,2864 ---- (defun toggle-read-only (&optional arg) "Change whether this buffer is visiting its file read-only. ! With arg, set `buffer-read-only' iff arg is positive. If visiting file read-only and `view-read-only' is non-nil, enter view mode." (interactive "P") (cond -- Kevin Rodgers