diff options
| author | Glenn Morris | 2014-03-11 23:52:54 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-03-11 23:52:54 -0700 |
| commit | e655facf8de655529d1710fad9c01cf1a1c66fdb (patch) | |
| tree | 51aba2bdce7adb6ecad0bbc9d18c07482d60cd5f | |
| parent | 8a51e8e417ea4bb54bca9fa1ad49f3806f642180 (diff) | |
| download | emacs-e655facf8de655529d1710fad9c01cf1a1c66fdb.tar.gz emacs-e655facf8de655529d1710fad9c01cf1a1c66fdb.zip | |
* doc/misc/octave-mode.texi (Using Octave Mode): Remove outdated stuff
about RET and indentation. E.g., octave-reindent-then-newline-and-indent
was removed three years ago.
When you delete commands, please use grep to check for references to them.
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/octave-mode.texi | 33 |
2 files changed, 5 insertions, 33 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 6e6146091f0..5458b6b407e 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-03-12 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * octave-mode.texi (Using Octave Mode): Remove outdated stuff | ||
| 4 | about RET and indentation. | ||
| 5 | |||
| 1 | 2014-03-03 Juanma Barranquero <lekktu@gmail.com> | 6 | 2014-03-03 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * gnus.texi: | 8 | * gnus.texi: |
diff --git a/doc/misc/octave-mode.texi b/doc/misc/octave-mode.texi index 6dde042a315..cc2e4c305cd 100644 --- a/doc/misc/octave-mode.texi +++ b/doc/misc/octave-mode.texi | |||
| @@ -148,39 +148,6 @@ and return values which have to be entered without parentheses | |||
| 148 | in one of your Emacs startup files. | 148 | in one of your Emacs startup files. |
| 149 | @end table | 149 | @end table |
| 150 | 150 | ||
| 151 | @c FIXME: `electric-indent-mode' is enabled by default in GNU Emacs 24.4. | ||
| 152 | A common problem is that the @key{RET} key does @emph{not} indent the | ||
| 153 | line to where the new text should go after inserting the newline. This | ||
| 154 | is because the standard Emacs convention is that @key{RET} (aka | ||
| 155 | @kbd{C-m}) just adds a newline, whereas @key{LFD} (aka @kbd{C-j}) adds a | ||
| 156 | newline and indents it. This is particularly inconvenient for users with | ||
| 157 | keyboards which do not have a special @key{LFD} key at all; in such | ||
| 158 | cases, it is typically more convenient to use @key{RET} as the @key{LFD} | ||
| 159 | key (rather than typing @kbd{C-j}). | ||
| 160 | |||
| 161 | You can make @key{RET} do this by adding | ||
| 162 | @lisp | ||
| 163 | (define-key octave-mode-map "\C-m" | ||
| 164 | 'octave-reindent-then-newline-and-indent) | ||
| 165 | @end lisp | ||
| 166 | @noindent | ||
| 167 | to one of your Emacs startup files. Another, more generally applicable | ||
| 168 | solution is | ||
| 169 | @lisp | ||
| 170 | (defun RET-behaves-as-LFD () | ||
| 171 | (let ((x (key-binding "\C-j"))) | ||
| 172 | (local-set-key "\C-m" x))) | ||
| 173 | (add-hook 'octave-mode-hook 'RET-behaves-as-LFD) | ||
| 174 | @end lisp | ||
| 175 | @noindent | ||
| 176 | (this works for all modes by adding to the startup hooks, without | ||
| 177 | having to know the particular binding of @key{RET} in that mode!). | ||
| 178 | Similar considerations apply for using @key{M-RET} as @key{M-LFD}. As | ||
| 179 | @email{bwarsaw@@cnri.reston.va.us, Barry A. Warsaw} says in the | ||
| 180 | documentation for his @code{cc-mode}, ``This is a very common | ||
| 181 | question. @code{:-)} If you want this to be the default behavior, | ||
| 182 | don't lobby me, lobby RMS!'' | ||
| 183 | |||
| 184 | The following variables can be used to customize Octave mode. | 151 | The following variables can be used to customize Octave mode. |
| 185 | 152 | ||
| 186 | @vtable @code | 153 | @vtable @code |