diff options
| -rw-r--r-- | doc/emacs/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/emacs/buffers.texi | 6 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 10 | ||||
| -rw-r--r-- | doc/lispref/backups.texi | 14 | ||||
| -rw-r--r-- | doc/lispref/buffers.texi | 40 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 8 | ||||
| -rw-r--r-- | etc/NEWS | 3 |
8 files changed, 52 insertions, 38 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 28d6d2865a8..4716c1cedb9 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-09-23 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * buffers.texi (Misc Buffer): Replace toggle-read-only with | ||
| 4 | read-only-mode. | ||
| 5 | |||
| 6 | * files.texi (Visiting): Likewise. | ||
| 7 | |||
| 1 | 2012-09-22 Paul Eggert <eggert@cs.ucla.edu> | 8 | 2012-09-22 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 9 | ||
| 3 | * trouble.texi (Crashing): Document ulimit -c. | 10 | * trouble.texi (Crashing): Document ulimit -c. |
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index 24bb0e83778..dfd8f792300 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi | |||
| @@ -212,7 +212,7 @@ unless they visit files: such buffers are used internally by Emacs. | |||
| 212 | 212 | ||
| 213 | @table @kbd | 213 | @table @kbd |
| 214 | @item C-x C-q | 214 | @item C-x C-q |
| 215 | Toggle read-only status of buffer (@code{toggle-read-only}). | 215 | Toggle read-only status of buffer (@code{read-only-mode}). |
| 216 | @item M-x rename-buffer @key{RET} @var{name} @key{RET} | 216 | @item M-x rename-buffer @key{RET} @var{name} @key{RET} |
| 217 | Change the name of the current buffer. | 217 | Change the name of the current buffer. |
| 218 | @item M-x rename-uniquely | 218 | @item M-x rename-uniquely |
| @@ -231,9 +231,9 @@ buffers are usually made by subsystems such as Dired and Rmail that | |||
| 231 | have special commands to operate on the text; also by visiting a file | 231 | have special commands to operate on the text; also by visiting a file |
| 232 | whose access control says you cannot write it. | 232 | whose access control says you cannot write it. |
| 233 | 233 | ||
| 234 | @findex toggle-read-only | 234 | @findex read-only-mode |
| 235 | @vindex view-read-only | 235 | @vindex view-read-only |
| 236 | The command @kbd{C-x C-q} (@code{toggle-read-only}) makes a read-only | 236 | The command @kbd{C-x C-q} (@code{read-only-mode}) makes a read-only |
| 237 | buffer writable, and makes a writable buffer read-only. This works by | 237 | buffer writable, and makes a writable buffer read-only. This works by |
| 238 | setting the variable @code{buffer-read-only}, which has a local value | 238 | setting the variable @code{buffer-read-only}, which has a local value |
| 239 | in each buffer and makes the buffer read-only if its value is | 239 | in each buffer and makes the buffer read-only if its value is |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 422100e27b9..c1cebc424ca 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -246,7 +246,7 @@ Archives}, for more about these features. | |||
| 246 | or that is marked read-only, Emacs makes the buffer read-only too, so | 246 | or that is marked read-only, Emacs makes the buffer read-only too, so |
| 247 | that you won't go ahead and make changes that you'll have trouble | 247 | that you won't go ahead and make changes that you'll have trouble |
| 248 | saving afterward. You can make the buffer writable with @kbd{C-x C-q} | 248 | saving afterward. You can make the buffer writable with @kbd{C-x C-q} |
| 249 | (@code{toggle-read-only}). @xref{Misc Buffer}. | 249 | (@code{read-only-mode}). @xref{Misc Buffer}. |
| 250 | 250 | ||
| 251 | @kindex C-x C-r | 251 | @kindex C-x C-r |
| 252 | @findex find-file-read-only | 252 | @findex find-file-read-only |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index b813ac6bb1c..82fb5eb4975 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2012-09-23 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * buffers.texi (Read Only Buffers): Document read-only-mode. | ||
| 4 | |||
| 5 | * keymaps.texi (Alias Menu Items): Replace toggle-read-only with | ||
| 6 | read-only-mode. | ||
| 7 | |||
| 8 | * backups.texi (Auto-Saving): Refer to Minor Mode Conventions for | ||
| 9 | calling conventions. | ||
| 10 | |||
| 1 | 2012-09-22 Chong Yidong <cyd@gnu.org> | 11 | 2012-09-22 Chong Yidong <cyd@gnu.org> |
| 2 | 12 | ||
| 3 | * searching.texi (Replacing Match): Minor clarification. | 13 | * searching.texi (Replacing Match): Minor clarification. |
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index 04aa28e9f04..935a49116cd 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi | |||
| @@ -441,12 +441,14 @@ buffer-auto-save-file-name | |||
| 441 | @end defvar | 441 | @end defvar |
| 442 | 442 | ||
| 443 | @deffn Command auto-save-mode arg | 443 | @deffn Command auto-save-mode arg |
| 444 | When used interactively without an argument, this command is a toggle | 444 | This is the mode command for Auto Save mode, a buffer-local minor |
| 445 | switch: it turns on auto-saving of the current buffer if it is off, | 445 | mode. When Auto Save mode is enabled, auto-saving is enabled in the |
| 446 | and vice versa. When called from Lisp with no argument, it turns | 446 | buffer. The calling convention is the same as for other minor mode |
| 447 | auto-saving on. With an argument @var{arg}, it turns auto-saving on | 447 | commands (@pxref{Minor Mode Conventions}). |
| 448 | if the value of @var{arg} is @code{t}, a nonempty list, or a positive | 448 | |
| 449 | integer; otherwise, it turns auto-saving off. | 449 | Unlike most minor modes, there is no @code{auto-save-mode} variable. |
| 450 | Auto Save mode is enabled if @code{buffer-auto-save-file-name} is | ||
| 451 | non-@code{nil} and @code{buffer-saved-size} (see below) is non-zero. | ||
| 450 | @end deffn | 452 | @end deffn |
| 451 | 453 | ||
| 452 | @defun auto-save-file-name-p filename | 454 | @defun auto-save-file-name-p filename |
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 6ad329f3a30..b9666a79f5b 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi | |||
| @@ -740,31 +740,25 @@ properties have no effect. If @code{inhibit-read-only} is a list, then | |||
| 740 | of the list (comparison is done with @code{eq}). | 740 | of the list (comparison is done with @code{eq}). |
| 741 | @end defvar | 741 | @end defvar |
| 742 | 742 | ||
| 743 | @deffn Command toggle-read-only &optional arg message | 743 | @deffn Command read-only-mode &optional arg |
| 744 | This command toggles whether the current buffer is read-only, by | 744 | This is the mode command for Read Only minor mode, a buffer-local |
| 745 | setting the variable @code{buffer-read-only}. If @var{arg} is | 745 | minor mode. When the mode is enabled, @code{buffer-read-only} is |
| 746 | non-@code{nil}, it should be a raw prefix argument; the command then | 746 | non-@code{nil} in the buffer; when disabled, @code{buffer-read-only} |
| 747 | makes the buffer read-only if the numeric value of that prefix | 747 | is @code{nil} in the buffer. The calling convention is the same as |
| 748 | argument is positive, and makes the buffer writable otherwise. | 748 | for other minor mode commands (@pxref{Minor Mode Conventions}). |
| 749 | @xref{Prefix Command Arguments}. | 749 | |
| 750 | 750 | This minor mode mainly serves as a wrapper for | |
| 751 | If called interactively, or if called from Lisp with @var{message} is | 751 | @code{buffer-read-only}; unlike most minor modes, there is no separate |
| 752 | non-@code{nil}, the command prints a message reporting the buffer's | 752 | @code{read-only-mode} variable. Even when Read Only mode is disabled, |
| 753 | new read-only status. | 753 | characters with non-@code{nil} @code{read-only} text properties remain |
| 754 | 754 | read-only. To temporarily ignore all read-only states, bind | |
| 755 | When making the buffer read-only, this command also enables View mode | 755 | @code{inhibit-read-only}, as described above. |
| 756 | |||
| 757 | When enabling Read Only mode, this mode command also enables View mode | ||
| 756 | if the option @code{view-read-only} is non-@code{nil}. @xref{Misc | 758 | if the option @code{view-read-only} is non-@code{nil}. @xref{Misc |
| 757 | Buffer,,Miscellaneous Buffer Operations, emacs, The GNU Emacs Manual}. | 759 | Buffer,,Miscellaneous Buffer Operations, emacs, The GNU Emacs Manual}. |
| 758 | When making the buffer writable, it disables View mode if View mode | 760 | When disabling Read Only mode, it disables View mode if View mode was |
| 759 | was enabled. | 761 | enabled. |
| 760 | |||
| 761 | Lisp programs should only call @code{toggle-read-only} if they really | ||
| 762 | intend to do the same thing as the user command, including possibly | ||
| 763 | enabling or disabling View mode. Note also that this command works by | ||
| 764 | setting @code{buffer-read-only}, so even if you make the buffer | ||
| 765 | writable, characters with non-@code{nil} @code{read-only} text | ||
| 766 | properties will remain read-only. To temporarily ignore all read-only | ||
| 767 | states, bind @code{inhibit-read-only}, as described above. | ||
| 768 | @end deffn | 762 | @end deffn |
| 769 | 763 | ||
| 770 | @defun barf-if-buffer-read-only | 764 | @defun barf-if-buffer-read-only |
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index f6ec0ae5e55..40dfcaea043 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -2288,12 +2288,12 @@ command but with different enable conditions. The best way to do this | |||
| 2288 | in Emacs now is with extended menu items; before that feature existed, | 2288 | in Emacs now is with extended menu items; before that feature existed, |
| 2289 | it could be done by defining alias commands and using them in menu | 2289 | it could be done by defining alias commands and using them in menu |
| 2290 | items. Here's an example that makes two aliases for | 2290 | items. Here's an example that makes two aliases for |
| 2291 | @code{toggle-read-only} and gives them different enable conditions: | 2291 | @code{read-only-mode} and gives them different enable conditions: |
| 2292 | 2292 | ||
| 2293 | @example | 2293 | @example |
| 2294 | (defalias 'make-read-only 'toggle-read-only) | 2294 | (defalias 'make-read-only 'read-only-mode) |
| 2295 | (put 'make-read-only 'menu-enable '(not buffer-read-only)) | 2295 | (put 'make-read-only 'menu-enable '(not buffer-read-only)) |
| 2296 | (defalias 'make-writable 'toggle-read-only) | 2296 | (defalias 'make-writable 'read-only-mode) |
| 2297 | (put 'make-writable 'menu-enable 'buffer-read-only) | 2297 | (put 'make-writable 'menu-enable 'buffer-read-only) |
| 2298 | @end example | 2298 | @end example |
| 2299 | 2299 | ||
| @@ -2310,7 +2310,7 @@ itself). To request this, give the alias symbol a non-@code{nil} | |||
| 2310 | 2310 | ||
| 2311 | @noindent | 2311 | @noindent |
| 2312 | causes menu items for @code{make-read-only} and @code{make-writable} to | 2312 | causes menu items for @code{make-read-only} and @code{make-writable} to |
| 2313 | show the keyboard bindings for @code{toggle-read-only}. | 2313 | show the keyboard bindings for @code{read-only-mode}. |
| 2314 | 2314 | ||
| 2315 | @node Toolkit Differences | 2315 | @node Toolkit Differences |
| 2316 | @subsubsection Toolkit Differences | 2316 | @subsubsection Toolkit Differences |
| @@ -94,7 +94,7 @@ respectively, without exiting from the prompt. | |||
| 94 | next and previous path separator, respectively. | 94 | next and previous path separator, respectively. |
| 95 | 95 | ||
| 96 | ** Mode line changes | 96 | ** Mode line changes |
| 97 | 97 | --- | |
| 98 | *** New option `mode-line-default-help-echo' specifies the help text | 98 | *** New option `mode-line-default-help-echo' specifies the help text |
| 99 | (shown in a tooltip or in the echo area) for any part of the mode line | 99 | (shown in a tooltip or in the echo area) for any part of the mode line |
| 100 | that does not have its own specialized help text. | 100 | that does not have its own specialized help text. |
| @@ -143,6 +143,7 @@ or expression to evaluate. | |||
| 143 | ** In the Package Menu, newly-available packages are listed as "new", | 143 | ** In the Package Menu, newly-available packages are listed as "new", |
| 144 | and sorted above the other "available" packages by default. | 144 | and sorted above the other "available" packages by default. |
| 145 | 145 | ||
| 146 | +++ | ||
| 146 | ** `C-x C-q' is now bound to the new minor mode `read-only-mode'. | 147 | ** `C-x C-q' is now bound to the new minor mode `read-only-mode'. |
| 147 | This minor mode replaces `toggle-read-only', which is now obsolete. | 148 | This minor mode replaces `toggle-read-only', which is now obsolete. |
| 148 | 149 | ||