diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man/nano.1 | 46 | ||||
-rw-r--r-- | doc/man/nano.1.html | 64 | ||||
-rw-r--r-- | doc/man/nanorc.5 | 69 | ||||
-rw-r--r-- | doc/man/nanorc.5.html | 68 | ||||
-rw-r--r-- | doc/nanorc.sample.in | 6 | ||||
-rw-r--r-- | doc/syntax/nanorc.nanorc | 4 | ||||
-rw-r--r-- | doc/texinfo/nano.html | 107 | ||||
-rw-r--r-- | doc/texinfo/nano.info | 155 | ||||
-rw-r--r-- | doc/texinfo/nano.texi | 108 | ||||
-rw-r--r-- | doc/texinfo/texinfo.tex | 414 |
10 files changed, 624 insertions, 417 deletions
diff --git a/doc/man/nano.1 b/doc/man/nano.1 index 15837321..eb387dfa 100644 --- a/doc/man/nano.1 +++ b/doc/man/nano.1 @@ -1,4 +1,6 @@ .\" Hey, EMACS: -*- nroff -*- +.\" $Id: nano.1 4997 2014-06-20 15:56:31Z bens $ +.\" .\" Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, .\" 2009, 2010, 2013, 2014 Free Software Foundation, Inc. .\" @@ -18,8 +20,7 @@ .\" Documentation License along with this program. If not, see .\" <http://www.gnu.org/licenses/>. .\" -.\" $Id: nano.1 4846 2014-05-06 20:43:00Z bens $ -.TH NANO 1 "version 2.3.3" "April 2014" +.TH NANO 1 "version 2.3.5" "June 2014" .\" Please adjust this date whenever revising the manpage. .\" @@ -67,18 +68,17 @@ Use bold text instead of reverse video text. Convert typed tabs to spaces. .TP .B \-F (\-\-multibuffer) -Enable multiple file buffers, if available. +Enable multiple file buffers (if support for them has been compiled in). .TP .B \-G (\-\-locking) Enable vim-style file locking when editing files. .TP .B \-H (\-\-historylog) -Log search and replace strings to \fI~/.nano_history\fP, so they can be -retrieved in later sessions, if \fInanorc\fP support is available. +Log search and replace strings to \fI~/.nano/search_history\fP, so they can be +retrieved in later sessions. .TP .B \-I (\-\-ignorercfiles) -Don't look at \fISYSCONFDIR/nanorc\fP or \fI~/.nanorc\fP, if -\fInanorc\fP support is available. +Don't look at the system's \fBnanorc\fP nor at \fB~/.nanorc\fP. .TP .B \-K (\-\-rebindkeypad) Interpret the numeric keypad keys so that they all work properly. You @@ -106,10 +106,11 @@ Tab. .TP .B \-R (\-\-restricted) Restricted mode: don't read or write to any file not specified on the -command line; don't read any \fInanorc\fP files; don't allow suspending; +command line; don't read any \fInanorc\fP files nor history files; +don't allow suspending nor spell checking; don't allow a file to be appended to, prepended to, or saved under a -different name if it already has one; don't use backup files nor spell -checking. This restricted mode is also accessible by invoking \fBnano\fP +different name if it already has one; and don't use backup files. +This restricted mode is also accessible by invoking \fBnano\fP with any name beginning with 'r' (e.g. "rnano"). .TP .B \-S (\-\-smooth) @@ -131,9 +132,9 @@ Show the current version number and exit. Detect word boundaries more accurately by treating punctuation characters as part of a word. .TP -.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP) -Specify a specific syntax highlighting from the \fInanorc\fP to use, if -available. +.B \-Y \fIname\fP (\-\-syntax=\fIname\fP) +Specify the name of the syntax highlighting to use from among the ones +defined in the \fInanorc\fP files. .TP .B \-c (\-\-const) Constantly show the cursor position. Note that this overrides \fB\-U\fP. @@ -174,15 +175,15 @@ and will write to the pipe when the user saves the "file". This way \fBgpg\fR without having to write sensitive data to disk first. .TP .B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP) -Set operating directory. Makes \fBnano\fP set up something similar to a -chroot. +Set the operating directory. This makes \fBnano\fP set up something +similar to a chroot. .TP .B \-p (\-\-preserve) Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught by the terminal. .TP .B \-q (\-\-quiet) -Do not report errors in the \fInanorc\fP file nor ask them to be +Do not report errors in the \fInanorc\fP files nor ask them to be acknowledged by pressing Enter at startup. .TP .B \-r \fInumber\fP (\-\-fill=\fInumber\fP) @@ -200,10 +201,6 @@ Enable alternative spell checker command. Always save changed buffer without prompting. Same as Pico's \fB\-t\fP option. .TP -.B \-u (\-\-undo) -Enable the experimental generic-purpose undo/redo code. The default undo -and redo shortcuts are Meta-U and Meta-E, respectively. -.TP .B \-v (\-\-view) View-file (read-only) mode. .TP @@ -231,13 +228,14 @@ Ignored, for compatibility with Pico. .SH INITIALIZATION FILE \fBnano\fP will read initialization files in the following order: -\fISYSCONFDIR/nanorc\fP, then \fI~/.nanorc\fP. Please see -\fBnanorc(5)\fP and the example file \fBnanorc.sample\fP, both of which -should be provided with \fBnano\fP. +the system's \fBnanorc\fP (if it exists), and then the user's +\fB~/.nanorc\fP (if it exists). Please see +.BR nanorc (5) +for more information on the possible contents of those files. .SH NOTES If no alternative spell checker command is specified on the command -line or in one of the \fInanorc\fP files, \fBnano\fP will check the +line nor in one of the \fInanorc\fP files, \fBnano\fP will check the \fBSPELL\fP environment variable for one. In some cases \fBnano\fP will try to dump the buffer into an emergency diff --git a/doc/man/nano.1.html b/doc/man/nano.1.html index 283c1e02..a0bee81a 100644 --- a/doc/man/nano.1.html +++ b/doc/man/nano.1.html @@ -1,5 +1,5 @@ <!-- Creator : groff version 1.22.2 --> -<!-- CreationDate: Sat May 10 22:54:14 2014 --> +<!-- CreationDate: Wed Jul 2 22:42:47 2014 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -117,8 +117,8 @@ spaces.</p> <p style="margin-left:11%;"><b>−F (−−multibuffer)</b></p> -<p style="margin-left:22%;">Enable multiple file buffers, -if available.</p> +<p style="margin-left:22%;">Enable multiple file buffers +(if support for them has been compiled in).</p> <p style="margin-left:11%;"><b>−G (−−locking)</b></p> @@ -130,15 +130,14 @@ when editing files.</p> (−−historylog)</b></p> <p style="margin-left:22%;">Log search and replace strings -to <i>~/.nano_history</i>, so they can be retrieved in later -sessions, if <i>nanorc</i> support is available.</p> +to <i>~/.nano/search_history</i>, so they can be retrieved +in later sessions.</p> <p style="margin-left:11%;"><b>−I (−−ignorercfiles)</b></p> -<p style="margin-left:22%;">Don’t look at -<i>SYSCONFDIR/nanorc</i> or <i>~/.nanorc</i>, if -<i>nanorc</i> support is available.</p> +<p style="margin-left:22%;">Don’t look at the +system’s <b>nanorc</b> nor at <b>~/.nanorc</b>.</p> <p style="margin-left:11%;"><b>−K (−−rebindkeypad)</b></p> @@ -187,13 +186,13 @@ stands for a Tab.</p> <p style="margin-left:22%;">Restricted mode: don’t read or write to any file not specified on the command line; -don’t read any <i>nanorc</i> files; don’t allow -suspending; don’t allow a file to be appended to, -prepended to, or saved under a different name if it already -has one; don’t use backup files nor spell checking. -This restricted mode is also accessible by invoking -<b>nano</b> with any name beginning with ’r’ -(e.g. "rnano").</p> +don’t read any <i>nanorc</i> files nor history files; +don’t allow suspending nor spell checking; don’t +allow a file to be appended to, prepended to, or saved under +a different name if it already has one; and don’t use +backup files. This restricted mode is also accessible by +invoking <b>nano</b> with any name beginning with +’r’ (e.g. "rnano").</p> <p style="margin-left:11%;"><b>−S (−−smooth)</b></p> @@ -229,12 +228,12 @@ and exit.</p> accurately by treating punctuation characters as part of a word.</p> -<p style="margin-left:11%;"><b>−Y</b> <i>str</i> -<b>(−−syntax=</b><i>str</i><b>)</b></p> +<p style="margin-left:11%;"><b>−Y</b> <i>name</i> +<b>(−−syntax=</b><i>name</i><b>)</b></p> -<p style="margin-left:22%;">Specify a specific syntax -highlighting from the <i>nanorc</i> to use, if -available.</p> +<p style="margin-left:22%;">Specify the name of the syntax +highlighting to use from among the ones defined in the +<i>nanorc</i> files.</p> <p style="margin-left:11%;"><b>−c (−−const)</b></p> @@ -304,8 +303,9 @@ sensitive data to disk first.</p> <p style="margin-left:11%;"><b>−o</b> <i>dir</i> <b>(−−operatingdir=</b><i>dir</i><b>)</b></p> -<p style="margin-left:22%;">Set operating directory. Makes -<b>nano</b> set up something similar to a chroot.</p> +<p style="margin-left:22%;">Set the operating directory. +This makes <b>nano</b> set up something similar to a +chroot.</p> <p style="margin-left:11%;"><b>−p (−−preserve)</b></p> @@ -318,7 +318,7 @@ terminal.</p> (−−quiet)</b></p> <p style="margin-left:22%;">Do not report errors in the -<i>nanorc</i> file nor ask them to be acknowledged by +<i>nanorc</i> files nor ask them to be acknowledged by pressing Enter at startup.</p> <p style="margin-left:11%;"><b>−r</b> <i>number</i> @@ -345,13 +345,6 @@ checker command.</p> without prompting. Same as Pico’s <b>−t</b> option.</p> -<p style="margin-left:11%;"><b>−u -(−−undo)</b></p> - -<p style="margin-left:22%;">Enable the experimental -generic-purpose undo/redo code. The default undo and redo -shortcuts are Meta-U and Meta-E, respectively.</p> - <p style="margin-left:11%;"><b>−v (−−view)</b></p> @@ -400,10 +393,11 @@ Pico.</p> <p style="margin-left:11%; margin-top: 1em"><b>nano</b> -will read initialization files in the following order: -<i>SYSCONFDIR/nanorc</i>, then <i>~/.nanorc</i>. Please see -<b>nanorc(5)</b> and the example file <b>nanorc.sample</b>, -both of which should be provided with <b>nano</b>.</p> +will read initialization files in the following order: the +system’s <b>nanorc</b> (if it exists), and then the +user’s <b>~/.nanorc</b> (if it exists). Please see +<b>nanorc</b>(5) for more information on the possible +contents of those files.</p> <h2>NOTES <a name="NOTES"></a> @@ -412,7 +406,7 @@ both of which should be provided with <b>nano</b>.</p> <p style="margin-left:11%; margin-top: 1em">If no alternative spell checker command is specified on the -command line or in one of the <i>nanorc</i> files, +command line nor in one of the <i>nanorc</i> files, <b>nano</b> will check the <b>SPELL</b> environment variable for one.</p> diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5 index deb189ae..11b1baa4 100644 --- a/doc/man/nanorc.5 +++ b/doc/man/nanorc.5 @@ -1,4 +1,6 @@ .\" Hey, EMACS: -*- nroff -*- +.\" $Id: nanorc.5 5023 2014-06-27 16:27:52Z bens $ +.\" .\" Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, .\" 2013, 2014 Free Software Foundation, Inc. .\" @@ -18,8 +20,7 @@ .\" Documentation License along with this program. If not, see .\" <http://www.gnu.org/licenses/>. .\" -.\" $Id: nanorc.5 4852 2014-05-09 21:02:14Z bens $ -.TH NANORC 5 "version 2.3.3" "May 2014" +.TH NANORC 5 "version 2.3.5" "June 2014" .\" Please adjust this date whenever revising the manpage. .\" .SH NAME @@ -28,8 +29,8 @@ nanorc \- GNU nano's rcfile The \fInanorc\fP file contains the default settings for \fBnano\fP, a small and friendly editor. The file should be in Unix format, not in DOS or Mac format. During startup, \fBnano\fP will first read the -system-wide settings, from \fBSYSCONFDIR/nanorc\fP, and then the -user-specific settings, from \fB~/.nanorc\fP. +system-wide settings, from \fB/etc/nanorc\fP (the exact path might be +different), and then the user-specific settings, from \fB~/.nanorc\fP. .SH OPTIONS The configuration file accepts a series of \fBset\fP and \fBunset\fP @@ -52,7 +53,7 @@ The supported commands and arguments are: .TP 3 .B set/unset allow_insecure_backup When backing up files, allow the backup to succeed even if its permissions -can't be (re)set due to special OS considerations. You should +can't be (re)set due to special OS considerations. You should NOT enable this option unless you are sure you need it. .TP .B set/unset autoindent @@ -99,7 +100,7 @@ in the two help lines at the bottom of the screen. See \fBset titlecolor\fR for more details. .TP .B set/unset historylog -Enable the use of \fB~/.nano_history\fP for saving and reading +Enable the use of \fB~/.nano/search_history\fP for saving and reading search/replace strings. .TP .B set keycolor \fIfgcolor\fR,\fIbgcolor\fR @@ -168,7 +169,7 @@ keystroke instead of 25. .TP .B set/unset quiet \fBnano\fP will not report errors in the \fInanorc\fP file nor ask them -to be acknowledged by pressing Enter at startup. If this is used it +to be acknowledged by pressing Enter at startup. If this is used, it should be placed at the top of the file to be fully effective. .TP .B set quotestr "\fIstring\fP" @@ -218,7 +219,7 @@ Allow \fBnano\fP to be suspended. .TP .B set tabsize \fIn\fP Use a tab size of \fIn\fP columns. The value of \fIn\fP must be greater -than 0. The default value is 8. +than 0. The default value is 8. .TP .B set/unset tabstospaces Convert typed tabs to spaces. @@ -232,9 +233,6 @@ Valid color names for foreground and background are: .BR white , \ black , \ red , \ blue , \ green , \ yellow , \ magenta ", and " cyan . And either "\fIfgcolor\fR" or ",\fIbgcolor\fR" may be left out. .TP -.B set/unset undo -Enable the experimental generic-purpose undo/redo code. -.TP .B set/unset view Disallow file modification. .TP @@ -274,11 +272,11 @@ be compared against the very first line of the file to be edited, to determine whether this syntax should be used for that file. .TP .BR magic " [""\fIregex\fR"" ...] -For the currently defined syntax, add one or more regexes which +For the currently defined syntax, add one or more regexes which will be compared against the result of querying the \fBmagic\fP database about the file to be edited, to determine whether this syntax should be used for that file. This -functionality only works when \fBlibmagic\fP is installed on the +functionality only works when \fBlibmagic\fP is installed on the system and will be silently ignored otherwise. .TP .B color \fIfgcolor\fR,\fIbgcolor\fR """\fIregex\fR""" ... @@ -328,21 +326,21 @@ context of menu \fImenu\fP (or in all menus where the function exists by using \fBall\fP). .TP .BI unbind " key menu" -Unbinds the key \fIkey\fP from the menu named \fImenu\fP (or from all +Unbinds the key \fIkey\fP from the menu named \fImenu\fP (or from all menus where it exists by using \fBall\fP). .TP The format of \fIkey\fP should be one of: .TP -.B ^ +.B ^ followed by an alpha character or the word "Space". Example: ^C .TP -.B M- +.B M- followed by a printable character or the word "Space". Example: M-C .TP -.B F +.B F followed by a numeric value from 1 to 16. Example: F10 .TP @@ -367,7 +365,8 @@ Inserts a file into the current buffer (or into a new buffer when multibuffer is enabled). .TP .B whereis -Searches for text in the current buffer. +Searches for text in the current buffer -- or for filenames matching +a string in the current list in the file browser. .TP .B searchagain Repeats the last search command. @@ -464,6 +463,9 @@ Goes to the last line of the file. .B gotoline Goes to a specific line (and column if specified). .TP +.B gototext +Switches from targetting a line number to searching for text. +.TP .B findbracket Moves the cursor to the bracket (brace, parenthesis, etc.) that matches (pairs) with the one under the cursor. @@ -517,11 +519,22 @@ Shows the previous history entry in the prompt menus (e.g. search). .B nexthistory Shows the next history entry in the prompt menus (e.g. search). .TP -.B dontreplace -Switches back to searching instead of replacing. +.B flipreplace +Toggles between searching for something and replacing something. .TP -.B gototext -Searches for files matching a string in the file browser (reading or writing files). +.B flipexecute +Toggles between inserting a file and executing a command. +.TP +.B flipnewbuffer +Toggles between inserting into the current buffer and into a new +empty buffer. +.TP +.B tofiles +Starts the file browser, allowing to select a file from a list. +.TP +.B gotodir +Goes to a directory to be specified, allowing to browse anywhere +in the filesystem. .TP .B dosformat When writing a file, switches to writing a DOS format (CR/LF). @@ -585,7 +598,7 @@ Toggles whether typed tabs will be converted to spaces. Toggles whether a backup will be made of the file to be edited. .TP .B multibuffer -Toggles the use of multiple file buffers (if available). +Toggles the use of multiple file buffers (if support for them has been compiled in). .TP .B mouse Toggles mouse support. @@ -643,15 +656,17 @@ The 'search for a file' menu in the file browser. The 'go to directory' menu in the file browser. .TP .B all -A special name meaning: apply to all menus where this function exists. +A special name that encompasses all menus. +For \fBbind\fR it means all menus where the specified \fIfunction\fR exists; +for \fBunbind\fR it means all menus where the specified \fIkey\fR exists. .SH FILES .TP -.B SYSCONFDIR/nanorc -System-wide configuration file +.B /etc/nanorc +System-wide configuration file. .TP .B ~/.nanorc -Per-user configuration file +Per-user configuration file. .SH SEE ALSO .TP \fBnano\fP(1) diff --git a/doc/man/nanorc.5.html b/doc/man/nanorc.5.html index 90060c14..b292628e 100644 --- a/doc/man/nanorc.5.html +++ b/doc/man/nanorc.5.html @@ -1,5 +1,5 @@ <!-- Creator : groff version 1.22.2 --> -<!-- CreationDate: Sat May 10 22:54:14 2014 --> +<!-- CreationDate: Wed Jul 2 22:42:47 2014 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -50,8 +50,8 @@ GNU nano’s rcfile</p> <b>nano</b>, a small and friendly editor. The file should be in Unix format, not in DOS or Mac format. During startup, <b>nano</b> will first read the system-wide settings, from -<b>SYSCONFDIR/nanorc</b>, and then the user-specific -settings, from <b>~/.nanorc</b>.</p> +<b>/etc/nanorc</b> (the exact path might be different), and +then the user-specific settings, from <b>~/.nanorc</b>.</p> <h2>OPTIONS <a name="OPTIONS"></a> @@ -162,8 +162,8 @@ more details.</p> <p style="margin-left:11%;"><b>set/unset historylog</b></p> <p style="margin-left:15%;">Enable the use of -<b>~/.nano_history</b> for saving and reading search/replace -strings.</p> +<b>~/.nano/search_history</b> for saving and reading +search/replace strings.</p> <p style="margin-left:11%;"><b>set keycolor</b> <i>fgcolor</i>,<i>bgcolor</i></p> @@ -272,7 +272,7 @@ of 25.</p> <p style="margin-left:15%;"><b>nano</b> will not report errors in the <i>nanorc</i> file nor ask them to be -acknowledged by pressing Enter at startup. If this is used +acknowledged by pressing Enter at startup. If this is used, it should be placed at the top of the file to be fully effective.</p> @@ -374,11 +374,6 @@ and background are: and <b>cyan</b>. And either "<i>fgcolor</i>" or ",<i>bgcolor</i>" may be left out.</p> -<p style="margin-left:11%;"><b>set/unset undo</b></p> - -<p style="margin-left:15%;">Enable the experimental -generic-purpose undo/redo code.</p> - <p style="margin-left:11%;"><b>set/unset view</b></p> <p style="margin-left:15%;">Disallow file modification.</p> @@ -609,7 +604,8 @@ enabled).</p> <p style="margin-left:11%;"><b>whereis</b></p> <p style="margin-left:14%;">Searches for text in the -current buffer.</p> +current buffer -- or for filenames matching a string in the +current list in the file browser.</p> <p style="margin-left:11%;"><b>searchagain</b></p> @@ -766,6 +762,11 @@ file.</p> <p style="margin-left:14%;">Goes to a specific line (and column if specified).</p> +<p style="margin-left:11%;"><b>gototext</b></p> + +<p style="margin-left:14%;">Switches from targetting a line +number to searching for text.</p> + <p style="margin-left:11%;"><b>findbracket</b></p> <p style="margin-left:14%;">Moves the cursor to the bracket @@ -853,15 +854,31 @@ entry in the prompt menus (e.g. search).</p> <p style="margin-left:14%;">Shows the next history entry in the prompt menus (e.g. search).</p> -<p style="margin-left:11%;"><b>dontreplace</b></p> +<p style="margin-left:11%;"><b>flipreplace</b></p> -<p style="margin-left:14%;">Switches back to searching -instead of replacing.</p> +<p style="margin-left:14%;">Toggles between searching for +something and replacing something.</p> -<p style="margin-left:11%;"><b>gototext</b></p> +<p style="margin-left:11%;"><b>flipexecute</b></p> + +<p style="margin-left:14%;">Toggles between inserting a +file and executing a command.</p> + +<p style="margin-left:11%;"><b>flipnewbuffer</b></p> -<p style="margin-left:14%;">Searches for files matching a -string in the file browser (reading or writing files).</p> +<p style="margin-left:14%;">Toggles between inserting into +the current buffer and into a new empty buffer.</p> + +<p style="margin-left:11%;"><b>tofiles</b></p> + +<p style="margin-left:14%;">Starts the file browser, +allowing to select a file from a list.</p> + +<p style="margin-left:11%;"><b>gotodir</b></p> + +<p style="margin-left:14%;">Goes to a directory to be +specified, allowing to browse anywhere in the +filesystem.</p> <p style="margin-left:11%;"><b>dosformat</b></p> @@ -971,7 +988,7 @@ be made of the file to be edited.</p> <p style="margin-left:11%;"><b>multibuffer</b></p> <p style="margin-left:14%;">Toggles the use of multiple -file buffers (if available).</p> +file buffers (if support for them has been compiled in).</p> <p style="margin-left:11%;"><b>mouse</b></p> @@ -1060,8 +1077,10 @@ directory’ menu in the file browser.</p> <p style="margin-left:11%;"><b>all</b></p> -<p style="margin-left:14%;">A special name meaning: apply -to all menus where this function exists.</p> +<p style="margin-left:14%;">A special name that encompasses +all menus. For <b>bind</b> it means all menus where the +specified <i>function</i> exists; for <b>unbind</b> it means +all menus where the specified <i>key</i> exists.</p> <h2>FILES <a name="FILES"></a> @@ -1069,14 +1088,15 @@ to all menus where this function exists.</p> -<p style="margin-left:11%; margin-top: 1em"><b>SYSCONFDIR/nanorc</b></p> +<p style="margin-left:11%; margin-top: 1em"><b>/etc/nanorc</b></p> <p style="margin-left:22%;">System-wide configuration -file</p> +file.</p> <p style="margin-left:11%;"><b>~/.nanorc</b></p> -<p style="margin-left:22%;">Per-user configuration file</p> +<p style="margin-left:22%;">Per-user configuration +file.</p> <h2>SEE ALSO <a name="SEE ALSO"></a> diff --git a/doc/nanorc.sample.in b/doc/nanorc.sample.in index d2dc9661..beafe490 100644 --- a/doc/nanorc.sample.in +++ b/doc/nanorc.sample.in @@ -61,7 +61,7 @@ ## Enable vim-style lock-files. This is just to let a vim user know you ## are editing a file [s]he is trying to edit and vice versa. There are -## no plans to implement vim-style undo state in these files +## no plans to implement vim-style undo state in these files. # set locking ## The opening and closing brackets that can be found by bracket @@ -162,7 +162,7 @@ ## Convert typed tabs to spaces. # set tabstospaces -## Save automatically on exit, don't prompt. +## Save automatically on exit; don't prompt. # set tempfile ## Enable the new (EXPERIMENTAL) generic undo code, not just for line @@ -186,7 +186,7 @@ ## Paint the interface elements of nano. -## This is an example, by default there are no colors. +## This is an example; by default there are no colors. # set titlecolor brightwhite,blue # set statuscolor brightwhite,green # set keycolor green diff --git a/doc/syntax/nanorc.nanorc b/doc/syntax/nanorc.nanorc index 730b939f..fd66d6bc 100644 --- a/doc/syntax/nanorc.nanorc +++ b/doc/syntax/nanorc.nanorc @@ -9,8 +9,8 @@ icolor brightred "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|lint icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backwards|boldtext|casesensitive|const|cut|fill|historylog|locking|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|poslog|preserve|quickblank|quiet|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|suspend|tabsize|tabstospaces|tempfile|undo|view|wordbounds)\>" icolor yellow "^[[:space:]]*set[[:space:]]+(functioncolor|keycolor||statuscolor|titlecolor)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" icolor brightgreen "^[[:space:]]*set[[:space:]]+(backupdir|brackets|functioncolor|keycolor|matchbrackets|operatingdir|punct|quotestr|speller|statuscolor|titlecolor|whitespace)[[:space:]]+" -icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]+[[:alpha:]]+[[:space:]]*$" -icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]*$" +icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]+[[:alpha:]]+[[:space:]]*$" +icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space|[]]|[0-9_=+{}|;:'\",./<>\?-])|F([1-9]|1[0-6])|Ins|Del)[[:space:]]+[[:alpha:]]+[[:space:]]*$" icolor brightgreen "^[[:space:]]*extendsyntax[[:space:]]+[[:alpha:]]+[[:space:]]+(i?color|header|magic|linter)[[:space:]]+.*$" icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic|linter|extendsyntax)\>" diff --git a/doc/texinfo/nano.html b/doc/texinfo/nano.html index e68b9133..77162231 100644 --- a/doc/texinfo/nano.html +++ b/doc/texinfo/nano.html @@ -184,7 +184,7 @@ backups are enabled. </p> </dd> <dt><code>-F, --multibuffer</code></dt> -<dd><p>Enable multiple file buffers, if available. +<dd><p>Enable multiple file buffers (if support for them has been compiled in). </p> </dd> <dt><code>-G, --locking</code></dt> @@ -192,13 +192,12 @@ backups are enabled. </p> </dd> <dt><code>-H, --historylog</code></dt> -<dd><p>Log search and replace strings to ~/.nano_history, so they can be -retrieved in later sessions, if nanorc support is available. +<dd><p>Log search and replace strings to ~/.nano/search_history, so they can be +retrieved in later sessions. </p> </dd> <dt><code>-I, --ignorercfiles</code></dt> -<dd><p>Don’t look at SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is -available. +<dd><p>Don’t look at the system’s nanorc file nor at the user’s ~/.nanorc. </p> </dd> <dt><code>-K, --rebindkeypad</code></dt> @@ -220,8 +219,8 @@ won’t work properly with this option enabled. </p> </dd> <dt><code>-P, --poslog</code></dt> -<dd><p>Log and later read back the location of the cursor and place it -there again. +<dd><p>Log for each file the last location of the cursor, and read it +back upon reopening the file and place it there again. </p> </dd> <dt><code>-Q <str>, --quotestr=<str></code></dt> @@ -237,9 +236,10 @@ Note that <code>\t</code> above stands for a literal Tab character. </dd> <dt><code>-R, --restricted</code></dt> <dd><p>Restricted mode: don’t read or write to any file not specified on the -command line; don’t read any nanorc files; don’t allow suspending; don’t +command line; don’t read any nanorc files nor history files; don’t allow +suspending nor spell checking; don’t allow a file to be appended to, prepended to, or saved under a different -name if it already has one; don’t use backup files nor spell checking. +name if it already has one; and don’t use backup files. This restricted mode is also accessible by invoking <code>nano</code> with any name beginning with ’r’ (e.g. "rnano"). </p> @@ -268,9 +268,9 @@ keystroke instead of 25. Note that -c overrides this. characters as parts of words. </p> </dd> -<dt><code>-Y <str>, --syntax=<str></code></dt> -<dd><p>Specify a specific syntax from the nanorc to use for highlighting, if -available. See See <a href="#Syntax-Highlighting">Syntax Highlighting</a>, for more info. +<dt><code>-Y <name>, --syntax=<name></code></dt> +<dd><p>Specify a specific syntax from the nanorc files to use for highlighting. +See See <a href="#Syntax-Highlighting">Syntax Highlighting</a>, for more info. </p> </dd> <dt><code>-c, --const</code></dt> @@ -326,11 +326,11 @@ a chroot. </dd> <dt><code>-p, --preserve</code></dt> <dd><p>Preserve the ^Q (XON) and ^S (XOFF) sequences so data being sent to the -editor can be can be stopped and started. +editor can be stopped and started. </p> </dd> <dt><code>-q, --quiet</code></dt> -<dd><p>Do not report errors in the nanorc file and ask them to be acknowledged +<dd><p>Do not report errors in the nanorc file nor ask them to be acknowledged by pressing Enter at startup. </p> </dd> @@ -356,11 +356,6 @@ exiting, assume yes. This is most useful when using <code>nano</code> as the composer of a mailer program. </p> </dd> -<dt><code>-u, --undo</code></dt> -<dd><p>Enable the experimental generic-purpose undo/redo code. The default undo -and redo shortcuts are Meta-U and Meta-E, respectively. -</p> -</dd> <dt><code>-v, --view</code></dt> <dd><p>Don’t allow the contents of the file to be altered. Note that this option should NOT be used in place of correct file permissions to @@ -648,8 +643,8 @@ following global toggles are available: </p> </dd> <dt><code>Whitespace Display Toggle (Meta-P)</code></dt> -<dd><p>toggles whitespace display mode if you have a "whitespace" option in -your nanorc. See See <a href="#Whitespace">Whitespace</a>, for more info. +<dd><p>toggles whitespace-display mode. +See See <a href="#Whitespace">Whitespace</a>, for more info. </p> </dd> <dt><code>Tabs to Spaces Toggle (Meta-Q)</code></dt> @@ -691,8 +686,9 @@ Next: <a href="#The-File-Browser" accesskey="n" rel="next">The File Browser</a>, <p>The nanorc files contain the default settings for <code>nano</code>. They should be in Unix format, not in DOS or Mac format. During startup, -<code>nano</code> will first read the system-wide settings, from /etc/nanorc, -and then the user-specific settings, from ~/.nanorc. +<code>nano</code> will first read the system-wide settings, from /etc/nanorc +(the exact path might be different), and then the user-specific settings, +from ~/.nanorc. </p> <p>A nanorc file accepts a series of "set" and "unset" commands, which can be used to configure <code>nano</code> on startup without using command-line @@ -796,7 +792,8 @@ See "set titlecolor" for more details. </p> </dd> <dt><code>set/unset historylog</code></dt> -<dd><p>Enable ~/.nano_history for saving and reading search/replace strings. +<dd><p>Enable the use of ~/.nano/search_history for saving and reading +search/replace strings. </p> </dd> <dt><code>set keycolor fgcolor,bgcolor</code></dt> @@ -965,10 +962,6 @@ white, black, red, blue, green, yellow, magenta, and cyan. And either "fgcolor" or ",bgcolor" may be left out. </p> </dd> -<dt><code>set/unset undo</code></dt> -<dd><p>Enable the experimental generic-purpose undo/redo code. -</p> -</dd> <dt><code>set/unset view</code></dt> <dd><p>Disallow file modification. </p> @@ -1093,7 +1086,7 @@ nanorc file: </p> </dd> <dt><code>unbind key menu</code></dt> -<dd><p>Unbinds <code>key</code> from the specified <code>menu</code> +<dd><p>Unbinds <code>key</code> from <code>menu</code> (or from all menus where it exists by using <code>all</code>). </p> </dd> @@ -1144,7 +1137,8 @@ is enabled). </p> </dd> <dt><code>whereis</code></dt> -<dd><p>Searches for text in the current buffer. +<dd><p>Searches for text in the current buffer – or for filenames matching +a string in the current list in the file browser </p> </dd> <dt><code>searchagain</code></dt> @@ -1273,6 +1267,10 @@ syntax highlighting defines one). <dd><p>Goes to a specific line (and column if specified). </p> </dd> +<dt><code>gototext</code></dt> +<dd><p>Switches from targetting a line number to searching for text. +</p> +</dd> <dt><code>findbracket</code></dt> <dd><p>Moves the cursor to the bracket (brace, parenthesis, etc.) that matches (pairs) with the one under the cursor. @@ -1343,12 +1341,17 @@ syntax highlighting defines one). <dd><p>Shows the next history entry in the prompt menus (e.g. search). </p> </dd> -<dt><code>dontreplace</code></dt> -<dd><p>Switches back to searching instead of replacing. +<dt><code>flipreplace</code></dt> +<dd><p>Toggles between searching for something and replacing something. </p> </dd> -<dt><code>gototext</code></dt> -<dd><p>Searches for files matching a string in the file browser (reading or writing files). +<dt><code>flipexecute</code></dt> +<dd><p>Toggles between inserting a file and executing a command. +</p> +</dd> +<dt><code>flipnewbuffer</code></dt> +<dd><p>Toggles between inserting into the current buffer and into a new +empty buffer. </p> </dd> <dt><code>dosformat</code></dt> @@ -1371,6 +1374,15 @@ syntax highlighting defines one). <dd><p>When writing a file, creates a backup of the current file. </p> </dd> +<dt><code>tofiles</code></dt> +<dd><p>Starts the file browser, allowing to select a file from a list. +</p> +</dd> +<dt><code>gotodir</code></dt> +<dd><p>Goes to a directory to be specified, allowing to browse anywhere +in the filesystem. +</p> +</dd> <dt><code>firstfile</code></dt> <dd><p>Goes to the first file when using the file browser (reading or writing files). </p> @@ -1510,7 +1522,9 @@ position to the end of the line. </p> </dd> <dt><code>all</code></dt> -<dd><p>A special name meaning: apply to all menus where this function exists. +<dd><p>A special name that encompasses all menus. For <code>bind</code> it means +all menus where the specified <code>function</code> exists; for <code>unbind</code> +it means all menus where the specified <code>key</code> exists. </p></dd> </dl> @@ -1630,7 +1644,8 @@ familiar with compiling programs with autoconf support: </p> </dd> <dt><code>--disable-color</code></dt> -<dd><p>Disable support for syntax coloring of files using the nanorc file. +<dd><p>Disable support for the syntax coloring of files. This also eliminates +the -Y command-line option, which chooses a specific syntax. </p> </dd> <dt><code>--disable-extra</code></dt> @@ -1644,6 +1659,14 @@ but makes it difficult for new users to learn more than very basic things about using the editor. </p> </dd> +<dt><code>--disable-histories</code></dt> +<dd><p>Disable the code for the handling of the history files: the search and +replace strings that were used, and the cursor position at which each +file was closed. This also eliminates the -H and -P command-line +options, which switch on the logging of search/replace strings and +cursor positions. +</p> +</dd> <dt><code>--disable-justify</code></dt> <dd><p>Disable the justify and unjustify functions. </p> @@ -1661,7 +1684,8 @@ command-line option, which enables the mouse functionality. </dd> <dt><code>--disable-multibuffer</code></dt> <dd><p>Disable support for opening multiple files at a time and switching -between them on the fly. +between them on the fly. This also eliminates the -F command-line +option, which switches the use of multiple file buffers on. </p> </dd> <dt><code>--disable-nanorc</code></dt> @@ -1669,6 +1693,9 @@ between them on the fly. support, you can store custom settings in a system-wide and a per-user nanorc file rather than having to pass command-line options to get the desired behavior. See See <a href="#Nanorc-Files">Nanorc Files</a>, for more info. +Disabling this also eliminates the -I and -q command-line options; +the first inhibits the reading of nanorcfiles, and the second +suppresses warnings about errors in those files. </p> </dd> <dt><code>--disable-operatingdir</code></dt> @@ -1693,7 +1720,9 @@ command-line option, which enables long-line wrapping. <dt><code>--enable-tiny</code></dt> <dd><p>This option disables all the above. It also disables some of the larger internals of the editor, like the marking code and the cut-to-end-of-line -code. It also disables the function toggles. +code. It also disables the function toggles. By using the enabling +counterpart of the above options together with –enable-tiny, specific +features can be switched back on. </p> </dd> <dt><code>--enable-debug</code></dt> @@ -1702,7 +1731,7 @@ chances are you only want this feature when you’re working on the nano sou </p> </dd> <dt><code>--disable-nls</code></dt> -<dd><p>Disables Native Language support. This will disable use of the +<dd><p>Disables Native Language support. This will disable the use of any available GNU <code>nano</code> translations. </p> </dd> diff --git a/doc/texinfo/nano.info b/doc/texinfo/nano.info index abb3b3fe..1e7800ad 100644 --- a/doc/texinfo/nano.info +++ b/doc/texinfo/nano.info @@ -104,18 +104,18 @@ File: nano.info, Node: Command Line Options, Prev: Overview, Up: Introduction Convert typed tabs to spaces. '-F, --multibuffer' - Enable multiple file buffers, if available. + Enable multiple file buffers (if support for them has been compiled + in). '-G, --locking' Enable vim-style file locking when editing files. '-H, --historylog' - Log search and replace strings to ~/.nano_history, so they can be - retrieved in later sessions, if nanorc support is available. + Log search and replace strings to ~/.nano/search_history, so they + can be retrieved in later sessions. '-I, --ignorercfiles' - Don't look at SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is - available. + Don't look at the system's nanorc file nor at the user's ~/.nanorc. '-K, --rebindkeypad' Interpret the numeric keypad keys so that they all work properly. @@ -132,8 +132,8 @@ File: nano.info, Node: Command Line Options, Prev: Overview, Up: Introduction Use the blank line below the titlebar as extra editing space. '-P, --poslog' - Log and later read back the location of the cursor and place it - there again. + Log for each file the last location of the cursor, and read it back + upon reopening the file and place it there again. '-Q <str>, --quotestr=<str>' Set the quoting string for justifying. The default value is @@ -146,12 +146,12 @@ File: nano.info, Node: Command Line Options, Prev: Overview, Up: Introduction '-R, --restricted' Restricted mode: don't read or write to any file not specified on - the command line; don't read any nanorc files; don't allow - suspending; don't allow a file to be appended to, prepended to, or - saved under a different name if it already has one; don't use - backup files nor spell checking. This restricted mode is also - accessible by invoking 'nano' with any name beginning with 'r' - (e.g. "rnano"). + the command line; don't read any nanorc files nor history files; + don't allow suspending nor spell checking; don't allow a file to be + appended to, prepended to, or saved under a different name if it + already has one; and don't use backup files. This restricted mode + is also accessible by invoking 'nano' with any name beginning with + 'r' (e.g. "rnano"). '-S, --smooth' Enable smooth scrolling. Text will scroll line-by-line, instead of @@ -172,9 +172,9 @@ File: nano.info, Node: Command Line Options, Prev: Overview, Up: Introduction Detect word boundaries more accurately by treating punctuation characters as parts of words. -'-Y <str>, --syntax=<str>' - Specify a specific syntax from the nanorc to use for highlighting, - if available. See *Note Syntax Highlighting::, for more info. +'-Y <name>, --syntax=<name>' + Specify a specific syntax from the nanorc files to use for + highlighting. See *Note Syntax Highlighting::, for more info. '-c, --const' Constantly display the cursor position and line number on the @@ -222,10 +222,10 @@ File: nano.info, Node: Command Line Options, Prev: Overview, Up: Introduction '-p, --preserve' Preserve the ^Q (XON) and ^S (XOFF) sequences so data being sent to - the editor can be can be stopped and started. + the editor can be stopped and started. '-q, --quiet' - Do not report errors in the nanorc file and ask them to be + Do not report errors in the nanorc file nor ask them to be acknowledged by pressing Enter at startup. '-r <number>, --fill=<number>' @@ -247,11 +247,6 @@ File: nano.info, Node: Command Line Options, Prev: Overview, Up: Introduction when exiting, assume yes. This is most useful when using 'nano' as the composer of a mailer program. -'-u, --undo' - Enable the experimental generic-purpose undo/redo code. The - default undo and redo shortcuts are Meta-U and Meta-E, - respectively. - '-v, --view' Don't allow the contents of the file to be altered. Note that this option should NOT be used in place of correct file permissions to @@ -478,8 +473,8 @@ following global toggles are available: toggles the -O ('--morespace') command line option. 'Whitespace Display Toggle (Meta-P)' - toggles whitespace display mode if you have a "whitespace" option - in your nanorc. See *Note Whitespace::, for more info. + toggles whitespace-display mode. See *Note Whitespace::, for more + info. 'Tabs to Spaces Toggle (Meta-Q)' toggles the -E ('--tabstospaces') command line option. @@ -508,8 +503,9 @@ File: nano.info, Node: Nanorc Files, Next: The File Browser, Prev: Feature To The nanorc files contain the default settings for 'nano'. They should be in Unix format, not in DOS or Mac format. During startup, 'nano' -will first read the system-wide settings, from /etc/nanorc, and then the -user-specific settings, from ~/.nanorc. +will first read the system-wide settings, from /etc/nanorc (the exact +path might be different), and then the user-specific settings, from +~/.nanorc. A nanorc file accepts a series of "set" and "unset" commands, which can be used to configure 'nano' on startup without using command-line @@ -594,8 +590,8 @@ The supported settings in a nanorc file are: titlecolor" for more details. 'set/unset historylog' - Enable ~/.nano_history for saving and reading search/replace - strings. + Enable the use of ~/.nano/search_history for saving and reading + search/replace strings. 'set keycolor fgcolor,bgcolor' Specify the color combination to use for the shortcut key combos in @@ -730,9 +726,6 @@ The supported settings in a nanorc file are: green, yellow, magenta, and cyan. And either "fgcolor" or ",bgcolor" may be left out. -'set/unset undo' - Enable the experimental generic-purpose undo/redo code. - 'set/unset view' Disallow file modification. @@ -838,8 +831,8 @@ nanorc file: menus where the function exists by using 'all'). 'unbind key menu' - Unbinds 'key' from the specified 'menu' (or from all menus where it - exists by using 'all'). + Unbinds 'key' from 'menu' (or from all menus where it exists by + using 'all'). The format of 'key' should be one of: @@ -873,7 +866,8 @@ nanorc file: multibuffer is enabled). 'whereis' - Searches for text in the current buffer. + Searches for text in the current buffer - or for filenames matching + a string in the current list in the file browser 'searchagain' Repeats the last search command. @@ -972,6 +966,9 @@ nanorc file: 'gotoline' Goes to a specific line (and column if specified). +'gototext' + Switches from targetting a line number to searching for text. + 'findbracket' Moves the cursor to the bracket (brace, parenthesis, etc.) that matches (pairs) with the one under the cursor. @@ -1029,12 +1026,15 @@ nanorc file: 'nexthistory' Shows the next history entry in the prompt menus (e.g. search). -'dontreplace' - Switches back to searching instead of replacing. +'flipreplace' + Toggles between searching for something and replacing something. -'gototext' - Searches for files matching a string in the file browser (reading - or writing files). +'flipexecute' + Toggles between inserting a file and executing a command. + +'flipnewbuffer' + Toggles between inserting into the current buffer and into a new + empty buffer. 'dosformat' When writing a file, switches to writing a DOS format (CR/LF). @@ -1052,6 +1052,13 @@ nanorc file: 'backup' When writing a file, creates a backup of the current file. +'tofiles' + Starts the file browser, allowing to select a file from a list. + +'gotodir' + Goes to a directory to be specified, allowing to browse anywhere in + the filesystem. + 'firstfile' Goes to the first file when using the file browser (reading or writing files). @@ -1163,8 +1170,9 @@ nanorc file: The 'go to directory' menu in the file browser. 'all' - A special name meaning: apply to all menus where this function - exists. + A special name that encompasses all menus. For 'bind' it means all + menus where the specified 'function' exists; for 'unbind' it means + all menus where the specified 'key' exists. File: nano.info, Node: The File Browser, Next: Pico Compatibility, Prev: Nanorc Files, Up: Top @@ -1259,7 +1267,9 @@ familiar with compiling programs with autoconf support: Disable the mini file browser when reading or writing files. '--disable-color' - Disable support for syntax coloring of files using the nanorc file. + Disable support for the syntax coloring of files. This also + eliminates the -Y command-line option, which chooses a specific + syntax. '--disable-extra' Disable extra features. At the moment, this is just @@ -1270,6 +1280,13 @@ familiar with compiling programs with autoconf support: smaller, but makes it difficult for new users to learn more than very basic things about using the editor. +'--disable-histories' + Disable the code for the handling of the history files: the search + and replace strings that were used, and the cursor position at + which each file was closed. This also eliminates the -H and -P + command-line options, which switch on the logging of search/replace + strings and cursor positions. + '--disable-justify' Disable the justify and unjustify functions. @@ -1285,14 +1302,18 @@ familiar with compiling programs with autoconf support: '--disable-multibuffer' Disable support for opening multiple files at a time and switching - between them on the fly. + between them on the fly. This also eliminates the -F command-line + option, which switches the use of multiple file buffers on. '--disable-nanorc' Disable support for reading the nanorc files at startup. With such support, you can store custom settings in a system-wide and a per-user nanorc file rather than having to pass command-line options to get the desired behavior. See *Note Nanorc Files::, for - more info. + more info. Disabling this also eliminates the -I and -q + command-line options; the first inhibits the reading of + nanorcfiles, and the second suppresses warnings about errors in + those files. '--disable-operatingdir' Disable setting the operating directory. This also eliminates the @@ -1314,6 +1335,8 @@ familiar with compiling programs with autoconf support: This option disables all the above. It also disables some of the larger internals of the editor, like the marking code and the cut-to-end-of-line code. It also disables the function toggles. + By using the enabling counterpart of the above options together + with -enable-tiny, specific features can be switched back on. '--enable-debug' Enable support for runtime debug output. This can get pretty @@ -1321,7 +1344,7 @@ familiar with compiling programs with autoconf support: working on the nano source. '--disable-nls' - Disables Native Language support. This will disable use of the + Disables Native Language support. This will disable the use of any available GNU 'nano' translations. '--disable-wrapping-as-root' @@ -1350,25 +1373,25 @@ Node: Top199 Node: Introduction550 Node: Overview990 Node: Command Line Options1874 -Ref: Expert Mode8834 -Node: Editor Basics9791 -Node: Entering Text10071 -Node: Special Functions10397 -Node: The Cutbuffer11437 -Node: The Mark12124 -Node: The Titlebar12861 -Node: The Statusbar13577 -Node: Shortcut Lists14150 -Node: Using the Mouse14430 -Node: Online Help15023 -Node: Feature Toggles15399 -Node: Nanorc Files17510 -Node: Settings18732 -Ref: Whitespace25594 -Node: Syntax Highlighting25952 -Node: Rebinding Keys29553 -Node: The File Browser37504 -Node: Pico Compatibility38326 -Node: Building and Configure Options40986 +Ref: Expert Mode8719 +Node: Editor Basics9676 +Node: Entering Text9956 +Node: Special Functions10282 +Node: The Cutbuffer11322 +Node: The Mark12009 +Node: The Titlebar12746 +Node: The Statusbar13462 +Node: Shortcut Lists14035 +Node: Using the Mouse14315 +Node: Online Help14908 +Node: Feature Toggles15284 +Node: Nanorc Files17346 +Node: Settings18604 +Ref: Whitespace25405 +Node: Syntax Highlighting25763 +Node: Rebinding Keys29364 +Node: The File Browser37852 +Node: Pico Compatibility38674 +Node: Building and Configure Options41334 End Tag Table diff --git a/doc/texinfo/nano.texi b/doc/texinfo/nano.texi index 62d146ed..454e0aa7 100644 --- a/doc/texinfo/nano.texi +++ b/doc/texinfo/nano.texi @@ -7,9 +7,9 @@ @c This file has the new style title page commands. @c Run 'makeinfo' rather than 'texinfo-format-buffer'. @smallbook -@set EDITION 0.1 -@set VERSION 2.3.3 -@set UPDATED May 2014 +@set EDITION 0.2 +@set VERSION 2.3.5 +@set UPDATED June 2014 @dircategory Editors @direntry @@ -23,7 +23,7 @@ @titlepage @title GNU @code{nano} @subtitle a small and friendly text editor. -@subtitle version 2.3.3 +@subtitle version 2.3.5 @author Chris Allegretta @page @@ -148,18 +148,17 @@ Use bold text instead of reverse video text. Convert typed tabs to spaces. @item -F, --multibuffer -Enable multiple file buffers, if available. +Enable multiple file buffers (if support for them has been compiled in). @item -G, --locking Enable vim-style file locking when editing files. @item -H, --historylog -Log search and replace strings to ~/.nano_history, so they can be -retrieved in later sessions, if nanorc support is available. +Log search and replace strings to ~/.nano/search_history, so they can be +retrieved in later sessions. @item -I, --ignorercfiles -Don't look at SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is -available. +Don't look at the system's nanorc file nor at the user's ~/.nanorc. @item -K, --rebindkeypad Interpret the numeric keypad keys so that they all work properly. You @@ -176,8 +175,8 @@ Disable automatic conversion of files from DOS/Mac format. Use the blank line below the titlebar as extra editing space. @item -P, --poslog -Log and later read back the location of the cursor and place it -there again. +Log for each file the last location of the cursor, and read it +back upon reopening the file and place it there again. @item -Q <str>, --quotestr=<str> Set the quoting string for justifying. The default value is @@ -191,9 +190,10 @@ Note that @code{\t} above stands for a literal Tab character. @item -R, --restricted Restricted mode: don't read or write to any file not specified on the -command line; don't read any nanorc files; don't allow suspending; don't +command line; don't read any nanorc files nor history files; don't allow +suspending nor spell checking; don't allow a file to be appended to, prepended to, or saved under a different -name if it already has one; don't use backup files nor spell checking. +name if it already has one; and don't use backup files. This restricted mode is also accessible by invoking @code{nano} with any name beginning with 'r' (e.g. "rnano"). @@ -216,9 +216,9 @@ Show the current version number and exit. Detect word boundaries more accurately by treating punctuation characters as parts of words. -@item -Y <str>, --syntax=<str> -Specify a specific syntax from the nanorc to use for highlighting, if -available. See @xref{Syntax Highlighting}, for more info. +@item -Y <name>, --syntax=<name> +Specify a specific syntax from the nanorc files to use for highlighting. +See @xref{Syntax Highlighting}, for more info. @item -c, --const Constantly display the cursor position and line number on the statusbar. @@ -264,10 +264,10 @@ a chroot. @item -p, --preserve Preserve the ^Q (XON) and ^S (XOFF) sequences so data being sent to the -editor can be can be stopped and started. +editor can be stopped and started. @item -q, --quiet -Do not report errors in the nanorc file and ask them to be acknowledged +Do not report errors in the nanorc file nor ask them to be acknowledged by pressing Enter at startup. @item -r <number>, --fill=<number> @@ -289,10 +289,6 @@ Don't ask whether or not to save the current contents of the file when exiting, assume yes. This is most useful when using @code{nano} as the composer of a mailer program. -@item -u, --undo -Enable the experimental generic-purpose undo/redo code. The default undo -and redo shortcuts are Meta-U and Meta-E, respectively. - @item -v, --view Don't allow the contents of the file to be altered. Note that this option should NOT be used in place of correct file permissions to @@ -495,8 +491,8 @@ toggles the -N (@code{--noconvert}) command line option. toggles the -O (@code{--morespace}) command line option. @item Whitespace Display Toggle (Meta-P) -toggles whitespace display mode if you have a "whitespace" option in -your nanorc. See @xref{Whitespace}, for more info. +toggles whitespace-display mode. +See @xref{Whitespace}, for more info. @item Tabs to Spaces Toggle (Meta-Q) toggles the -E (@code{--tabstospaces}) command line option. @@ -525,8 +521,9 @@ toggles the -$ (@code{--softwrap}) command line option. The nanorc files contain the default settings for @code{nano}. They should be in Unix format, not in DOS or Mac format. During startup, -@code{nano} will first read the system-wide settings, from /etc/nanorc, -and then the user-specific settings, from ~/.nanorc. +@code{nano} will first read the system-wide settings, from /etc/nanorc +(the exact path might be different), and then the user-specific settings, +from ~/.nanorc. A nanorc file accepts a series of "set" and "unset" commands, which can be used to configure @code{nano} on startup without using command-line @@ -610,7 +607,8 @@ in the two help lines at the bottom of the screen. See "set titlecolor" for more details. @item set/unset historylog -Enable ~/.nano_history for saving and reading search/replace strings. +Enable the use of ~/.nano/search_history for saving and reading +search/replace strings. @item set keycolor fgcolor,bgcolor Specify the color combination to use for the shortcut key combos @@ -747,9 +745,6 @@ Valid color names for foreground and background are: white, black, red, blue, green, yellow, magenta, and cyan. And either "fgcolor" or ",bgcolor" may be left out. -@item set/unset undo -Enable the experimental generic-purpose undo/redo code. - @item set/unset view Disallow file modification. @@ -851,7 +846,7 @@ Rebinds @code{key} to @code{function} in the context of @code{menu} (or in all menus where the function exists by using @code{all}). @item unbind key menu -Unbinds @code{key} from the specified @code{menu} +Unbinds @code{key} from @code{menu} (or from all menus where it exists by using @code{all}). @end table @@ -895,7 +890,8 @@ Inserts a file into the current buffer (or into a new buffer when multibuffer is enabled). @item whereis -Searches for text in the current buffer. +Searches for text in the current buffer -- or for filenames matching +a string in the current list in the file browser @item searchagain Repeats the last search command. @@ -992,6 +988,9 @@ Goes to the last line of the file. @item gotoline Goes to a specific line (and column if specified). +@item gototext +Switches from targetting a line number to searching for text. + @item findbracket Moves the cursor to the bracket (brace, parenthesis, etc.) that matches (pairs) with the one under the cursor. @@ -1045,11 +1044,15 @@ Shows the previous history entry in the prompt menus (e.g. search). @item nexthistory Shows the next history entry in the prompt menus (e.g. search). -@item dontreplace -Switches back to searching instead of replacing. +@item flipreplace +Toggles between searching for something and replacing something. -@item gototext -Searches for files matching a string in the file browser (reading or writing files). +@item flipexecute +Toggles between inserting a file and executing a command. + +@item flipnewbuffer +Toggles between inserting into the current buffer and into a new +empty buffer. @item dosformat When writing a file, switches to writing a DOS format (CR/LF). @@ -1066,6 +1069,13 @@ When writing a file, 'prepends' (writes at the beginning) instead of overwriting @item backup When writing a file, creates a backup of the current file. +@item tofiles +Starts the file browser, allowing to select a file from a list. + +@item gotodir +Goes to a directory to be specified, allowing to browse anywhere +in the filesystem. + @item firstfile Goes to the first file when using the file browser (reading or writing files). @@ -1173,7 +1183,9 @@ The 'search for a file' menu in the file browser. The 'go to directory' menu in the file browser. @item all -A special name meaning: apply to all menus where this function exists. +A special name that encompasses all menus. For @code{bind} it means +all menus where the specified @code{function} exists; for @code{unbind} +it means all menus where the specified @code{key} exists. @end table @@ -1269,7 +1281,8 @@ The possible options to @code{./configure} are: Disable the mini file browser when reading or writing files. @item --disable-color -Disable support for syntax coloring of files using the nanorc file. +Disable support for the syntax coloring of files. This also eliminates +the -Y command-line option, which chooses a specific syntax. @item --disable-extra Disable extra features. At the moment, this is just easter-egg-type @@ -1280,6 +1293,13 @@ Disable the help function. Doing this makes the binary much smaller, but makes it difficult for new users to learn more than very basic things about using the editor. +@item --disable-histories +Disable the code for the handling of the history files: the search and +replace strings that were used, and the cursor position at which each +file was closed. This also eliminates the -H and -P command-line +options, which switch on the logging of search/replace strings and +cursor positions. + @item --disable-justify Disable the justify and unjustify functions. @@ -1294,13 +1314,17 @@ command-line option, which enables the mouse functionality. @item --disable-multibuffer Disable support for opening multiple files at a time and switching -between them on the fly. +between them on the fly. This also eliminates the -F command-line +option, which switches the use of multiple file buffers on. @item --disable-nanorc Disable support for reading the nanorc files at startup. With such support, you can store custom settings in a system-wide and a per-user nanorc file rather than having to pass command-line options to get the desired behavior. See @xref{Nanorc Files}, for more info. +Disabling this also eliminates the -I and -q command-line options; +the first inhibits the reading of nanorcfiles, and the second +suppresses warnings about errors in those files. @item --disable-operatingdir Disable setting the operating directory. This also eliminates the -o @@ -1320,14 +1344,16 @@ command-line option, which enables long-line wrapping. @item --enable-tiny This option disables all the above. It also disables some of the larger internals of the editor, like the marking code and the cut-to-end-of-line -code. It also disables the function toggles. +code. It also disables the function toggles. By using the enabling +counterpart of the above options together with --enable-tiny, specific +features can be switched back on. @item --enable-debug Enable support for runtime debug output. This can get pretty messy, so chances are you only want this feature when you're working on the nano source. @item --disable-nls -Disables Native Language support. This will disable use of the +Disables Native Language support. This will disable the use of any available GNU @code{nano} translations. @item --disable-wrapping-as-root diff --git a/doc/texinfo/texinfo.tex b/doc/texinfo/texinfo.tex index 85b68e79..85f184cc 100644 --- a/doc/texinfo/texinfo.tex +++ b/doc/texinfo/texinfo.tex @@ -3,11 +3,11 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2012-03-11.15} +\def\texinfoversion{2013-02-01.11} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -24,13 +24,14 @@ % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without -% restriction. (This has been our intent since Texinfo was invented.) +% restriction. This Exception is an additional permission under section 7 +% of the GNU General Public License, version 3 ("GPLv3"). % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: -% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or -% ftp://tug.org/tex/texinfo.tex -% (and all CTAN mirrors, see http://www.ctan.org). +% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or +% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or +% http://www.gnu.org/software/texinfo/ (the Texinfo home page) % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % @@ -594,7 +595,7 @@ \def\:{\spacefactor=1000 } % @* forces a line break. -\def\*{\hfil\break\hbox{}\ignorespaces} +\def\*{\unskip\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak @@ -1117,7 +1118,7 @@ where each line of input produces a line of output.} % #1 is a control sequence in which to do the replacements, % which we \xdef. \def\txiescapepdf#1{% - \ifx\pdfescapestring\relax + \ifx\pdfescapestring\thisisundefined % No primitive available; should we give a warning or log? % Many times it won't matter. \else @@ -1367,9 +1368,8 @@ output) for that.)} \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces - \ifx\p\space\else\addtokens{\filename}{\PP}% - \advance\filenamelength by 1 - \fi + \addtokens{\filename}{\PP}% + \advance\filenamelength by 1 \fi \nextsp} \def\getfilename#1{% @@ -1475,9 +1475,6 @@ output) for that.)} \def\ttsl{\setfontstyle{ttsl}} -% Default leading. -\newdimen\textleading \textleading = 13.2pt - % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. @@ -1489,6 +1486,7 @@ output) for that.)} % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % +\newdimen\textleading \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 @@ -1761,18 +1759,24 @@ end \fi\fi -% Set the font macro #1 to the font named #2, adding on the -% specified font prefix (normally `cm'). +% Set the font macro #1 to the font named \fontprefix#2. % #3 is the font's design size, #4 is a scale factor, #5 is the CMap -% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass -% empty to omit). +% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). +% Example: +% #1 = \textrm +% #2 = \rmshape +% #3 = 10 +% #4 = \mainmagstep +% #5 = OT1 +% \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble -% emacs-page end of cmaps +% +% (end of cmaps) % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix @@ -1782,7 +1786,7 @@ end \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} -\def\rmbshape{bx} %where the normal face is bold +\def\rmbshape{bx} % where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} @@ -1797,8 +1801,7 @@ end \def\scshape{csc} \def\scbshape{csc} -% Definitions for a main text size of 11pt. This is the default in -% Texinfo. +% Definitions for a main text size of 11pt. (The default in Texinfo.) % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). @@ -1923,7 +1926,7 @@ end \textleading = 13.2pt % line spacing for 11pt CM \textfonts % reset the current fonts \rm -} % end of 11pt text font size definitions +} % end of 11pt text font size definitions, \definetextfontsizexi % Definitions to make the main text be 10pt Computer Modern, with @@ -2055,7 +2058,7 @@ end \textleading = 12pt % line spacing for 10pt CM \textfonts % reset the current fonts \rm -} % end of 10pt text font size definitions +} % end of 10pt text font size definitions, \definetextfontsizex % We provide the user-level command @@ -2270,8 +2273,6 @@ end \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} - -\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft @@ -2280,6 +2281,9 @@ end \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright % +\let\markupsetuplqkbd \markupsetcodequoteleft +\let\markupsetuprqkbd \markupsetcodequoteright +% \let\markupsetuplqsamp \markupsetcodequoteleft \let\markupsetuprqsamp \markupsetcodequoteright % @@ -2289,8 +2293,6 @@ end \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright -\let\markupsetuplqkbd \markupsetnoligaturesquoteleft - % Allow an option to not use regular directed right quote/apostrophe % (char 0x27), but instead the undirected quote from cmtt (char 0x0d). % The undirected quote is ugly, so don't make it the default, but it @@ -2380,8 +2382,7 @@ end \aftersmartic } -% like \smartslanted except unconditionally uses \ttsl, and no ic. -% @var is set to this for defun arguments. +% Unconditional use \ttsl, and no ic. @var is set to this for defuns. \def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want @@ -2446,34 +2447,12 @@ end % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} -% definition of @key that produces a lozenge. Doesn't adjust to text size. -%\setfont\keyrm\rmshape{8}{1000}{OT1} -%\font\keysy=cmsy9 -%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% -% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% -% \vbox{\hrule\kern-0.4pt -% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% -% \kern-0.4pt\hrule}% -% \kern-.06em\raise0.4pt\hbox{\angleright}}}} +% @indicateurl is \samp, that is, with quotes. +\let\indicateurl=\samp -% definition of @key with no lozenge. If the current font is already -% monospace, don't change it; that way, we respect @kbdinputstyle. But -% if it isn't monospace, then use \tt. -% -\def\key#1{{\setupmarkupstyle{key}% - \nohyphenation - \ifmonospace\else\tt\fi - #1}\null} - -% ctrl is no longer a Texinfo command. -\def\ctrl #1{{\tt \rawbackslash \hat}#1} - -% @file, @option are the same as @samp. -\let\file=\samp -\let\option=\samp - -% @code is a modification of @t, -% which makes spaces the same size as normal in the surrounding text. +% @code (and similar) prints in typewriter, but with spaces the same +% size as normal in the surrounding text, without hyphenation, etc. +% This is a subroutine for that. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. @@ -2498,7 +2477,7 @@ end % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. - +% % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) @@ -2517,7 +2496,7 @@ end \let-\codedash \let_\codeunder \else - \let-\realdash + \let-\normaldash \let_\realunder \fi \codex @@ -2526,7 +2505,7 @@ end \def\codex #1{\tclose{#1}\endgroup} -\def\realdash{-} +\def\normaldash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ @@ -2541,9 +2520,9 @@ end } % An additional complication: the above will allow breaks after, e.g., -% each of the four underscores in __typeof__. This is undesirable in -% some manuals, especially if they don't have long identifiers in -% general. @allowcodebreaks provides a way to control this. +% each of the four underscores in __typeof__. This is bad. +% @allowcodebreaks provides a document-level way to turn breaking at - +% and _ on and off. % \newif\ifallowcodebreaks \allowcodebreakstrue @@ -2562,6 +2541,13 @@ end \fi\fi } +% For @command, @env, @file, @option quotes seem unnecessary, +% so use \code rather than \samp. +\let\command=\code +\let\env=\code +\let\file=\code +\let\option=\code + % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url @@ -2708,10 +2694,6 @@ end \let\email=\uref \fi -% @kbd is like @code, except that if the argument is just one @key command, -% then @kbd has no effect. -\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} - % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). @@ -2735,16 +2717,36 @@ end % Default is `distinct'. \kbdinputstyle distinct +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. +\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} + \def\xkey{\key} -\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% -\ifx\one\xkey\ifx\threex\three \key{#2}% -\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi -\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} +\def\kbdsub#1#2#3\par{% + \def\one{#1}\def\three{#3}\def\threex{??}% + \ifx\one\xkey\ifx\threex\three \key{#2}% + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi +} -% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. -\let\indicateurl=\code -\let\env=\code -\let\command=\code +% definition of @key that produces a lozenge. Doesn't adjust to text size. +%\setfont\keyrm\rmshape{8}{1000}{OT1} +%\font\keysy=cmsy9 +%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% +% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% +% \vbox{\hrule\kern-0.4pt +% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% +% \kern-0.4pt\hrule}% +% \kern-.06em\raise0.4pt\hbox{\angleright}}}} + +% definition of @key with no lozenge. If the current font is already +% monospace, don't change it; that way, we respect @kbdinputstyle. But +% if it isn't monospace, then use \tt. +% +\def\key#1{{\setupmarkupstyle{key}% + \nohyphenation + \ifmonospace\else\tt\fi + #1}\null} % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} @@ -2852,6 +2854,9 @@ end } } +% ctrl is no longer a Texinfo command, but leave this definition for fun. +\def\ctrl #1{{\tt \rawbackslash \hat}#1} + % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, % except specified as a normal braced arg, so no newlines to worry about. @@ -3142,12 +3147,17 @@ end % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% - \ifx\curfontstyle\bfstylename - % bold: - \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \ifmonospace + % typewriter: + \font\thisecfont = ectt\ecsize \space at \nominalsize \else - % regular: - \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi \fi \thisecfont } @@ -3260,6 +3270,20 @@ end \finishedtitlepagetrue } +% Settings used for typesetting titles: no hyphenation, no indentation, +% don't worry much about spacing, ragged right. This should be used +% inside a \vbox, and fonts need to be set appropriately first. Because +% it is always used for titles, nothing else, we call \rmisbold. \par +% should be specified before the end of the \vbox, since a vbox is a group. +% +\def\raggedtitlesettings{% + \rmisbold + \hyphenpenalty=10000 + \parindent=0pt + \tolerance=5000 + \ptexraggedright +} + % Macros to be used within @titlepage: \let\subtitlerm=\tenrm @@ -3267,7 +3291,7 @@ end \parseargdef\title{% \checkenv\titlepage - \leftline{\titlefonts\rmisbold #1} + \vbox{\titlefonts \raggedtitlesettings #1\par}% % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt @@ -4164,7 +4188,7 @@ end % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. - \let-\realdash \let_\normalunderscore + \let-\normaldash \let_\normalunderscore } } @@ -4204,7 +4228,7 @@ end } \def\ifsetfail{\doignore{ifset}} -% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been +% @ifclear VAR ... @end executes the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the @@ -4215,6 +4239,35 @@ end \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} +% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written +% without the @) is in fact defined. We can only feasibly check at the +% TeX level, so something like `mathcode' is going to considered +% defined even though it is not a Texinfo command. +% +\makecond{ifcommanddefined} +\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} +% +\def\doifcmddefined#1#2{{% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname #2\endcsname\relax + #1% If not defined, \let\next as above. + \fi + \expandafter + }\next +} +\def\ifcmddefinedfail{\doignore{ifcommanddefined}} + +% @ifcommandnotdefined CMD ... handled similar to @ifclear above. +\makecond{ifcommandnotdefined} +\def\ifcommandnotdefined{% + \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} +\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} + +% Set the `txicommandconditionals' variable, so documents have a way to +% test if the @ifcommand...defined conditionals are available. +\set txicommandconditionals + % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment @@ -4451,6 +4504,7 @@ end \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright + \definedummyword\lbracechar \definedummyword\leq \definedummyword\minus \definedummyword\ogonek @@ -4463,6 +4517,7 @@ end \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase + \definedummyword\rbracechar \definedummyword\result \definedummyword\textdegree % @@ -4514,6 +4569,7 @@ end \definedummyword\t % % Commands that take arguments. + \definedummyword\abbr \definedummyword\acronym \definedummyword\anchor \definedummyword\cite @@ -4525,7 +4581,9 @@ end \definedummyword\emph \definedummyword\env \definedummyword\file + \definedummyword\image \definedummyword\indicateurl + \definedummyword\inforef \definedummyword\kbd \definedummyword\key \definedummyword\math @@ -4572,7 +4630,10 @@ end % content at all. So for index sorting, we map @{ and @} to strings % starting with |, since that ASCII character is between ASCII { and }. \def\{{|a}% + \def\lbracechar{|a}% + % \def\}{|b}% + \def\rbracechar{|b}% % % Non-English letters. \def\AA{AA}% @@ -5533,14 +5594,6 @@ end % Define @majorheading, @heading and @subheading -% NOTE on use of \vbox for chapter headings, section headings, and such: -% 1) We use \vbox rather than the earlier \line to permit -% overlong headings to fold. -% 2) \hyphenpenalty is set to 10000 because hyphenation in a -% heading is obnoxious; this forbids it. -% 3) Likewise, headings look best if no \parindent is used, and -% if justification is not attempted. Hence \raggedright. - \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz @@ -5548,10 +5601,8 @@ end \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% - {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\ptexraggedright - \rmisbold #1\hfill}}% - \bigskip \par\penalty 200\relax + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip \nobreak \suppressfirstparagraphindent } @@ -5710,8 +5761,7 @@ end % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright - \hangindent=\wd0 \centerparametersmaybe + \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title @@ -5733,18 +5783,18 @@ end \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\ptexraggedright - \rmisbold #1\hfill}}\bigskip \par\nobreak + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt - \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% + \nobreak\bigskip \nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen @@ -6510,16 +6560,9 @@ end \makedispenvdef{quotation}{\quotationstart} % \def\quotationstart{% - {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \parindent=0pt - % - % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \indentedblockstart % same as \indentedblock, but increase right margin too. \ifx\nonarrowing\relax - \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing - \exdentamount = \lispnarrowing - \else - \let\nonarrowing = \relax \fi \parsearg\quotationlabel } @@ -6545,6 +6588,32 @@ end \fi } +% @indentedblock is like @quotation, but indents only on the left and +% has no optional argument. +% +\makedispenvdef{indentedblock}{\indentedblockstart} +% +\def\indentedblockstart{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip + \parindent=0pt + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi +} + +% Keep a nonzero parskip for the environment, since we're doing normal filling. +% +\def\Eindentedblock{% + \par + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallindentedblock{\Eindentedblock} + % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>} % If we want to allow any <char> as delimiter, @@ -7023,7 +7092,10 @@ end \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we - % want a way to get ttsl. Let's try @var for that. + % want a way to get ttsl. We used to recommend @var for that, so + % leave the code in, but it's strange for @var to lead to typewriter. + % Nowadays we recommend @code, since the difference between a ttsl hyphen + % and a tt hyphen is pretty tiny. @code also disables ?` !`. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 @@ -7807,7 +7879,7 @@ end \fi\fi } - +% % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed @@ -7817,16 +7889,21 @@ end \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} % -\newbox\topbox +\newbox\toprefbox \newbox\printedrefnamebox +\newbox\infofilenamebox \newbox\printedmanualbox % \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces % + % Get args without leading/trailing spaces. \def\printedrefname{\ignorespaces #3}% \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% % + \def\infofilename{\ignorespaces #4}% + \setbox\infofilenamebox = \hbox{\infofilename\unskip}% + % \def\printedmanual{\ignorespaces #5}% \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% % @@ -7861,11 +7938,18 @@ end \turnoffactive \makevalueexpandable % This expands tokens, so do it after making catcode changes, so _ - % etc. don't get their TeX definitions. + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. \getfilename{#4}% % + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. \edef\pdfxrefdest{#1}% - \txiescapepdf\pdfxrefdest + \ifx\pdfxrefdest\empty + \def\pdfxrefdest{Top}% no empty targets + \else + \txiescapepdf\pdfxrefdest % escape PDF special chars + \fi % \leavevmode \startlink attr{/Border [0 0 0]}% @@ -7898,7 +7982,7 @@ end \printedrefname \fi % - % if the user also gave the printed manual name (fifth arg), append + % If the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% @@ -7913,32 +7997,20 @@ end % this is a loss. Therefore, we give the text of the node name % again, so it is as if TeX is seeing it for the first time. % - % Cross-manual reference. Only include the "Section ``foo'' in" if - % the foo is neither missing or Top. Thus, @xref{,,,foo,The Foo Manual} - % outputs simply "see The Foo Manual". \ifdim \wd\printedmanualbox > 0pt - % What is the 7sp about? The idea is that we also want to omit - % the Section part if we would be printing "Top", since they are - % clearly trying to refer to the whole manual. But, this being - % TeX, we can't easily compare strings while ignoring the possible - % spaces before and after in the input. By adding the arbitrary - % 7sp, we make it much less likely that a real node name would - % happen to have the same width as "Top" (e.g., in a monospaced font). - % I hope it will never happen in practice. + % Cross-manual reference with a printed manual name. % - % For the same basic reason, we retypeset the "Top" at every - % reference, since the current font is indeterminate. + \crossmanualxref{\cite{\printedmanual\unskip}}% + % + \else\ifdim \wd\infofilenamebox > 0pt + % Cross-manual reference with only an info filename (arg 4), no + % printed manual name (arg 5). This is essentially the same as + % the case above; we output the filename, since we have nothing else. % - \setbox\topbox = \hbox{Top\kern7sp}% - \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% - \ifdim \wd2 > 7sp - \ifdim \wd2 = \wd\topbox \else - \putwordSection{} ``\printedrefname'' \putwordin{}\space - \fi - \fi - \cite{\printedmanual}% + \crossmanualxref{\code{\infofilename\unskip}}% + % \else - % Reference in this manual. + % Reference within this manual. % % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand @@ -7959,11 +8031,37 @@ end % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% - \fi + \fi\fi \fi \endlink \endgroup} +% Output a cross-manual xref to #1. Used just above (twice). +% +% Only include the text "Section ``foo'' in" if the foo is neither +% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply +% "see The Foo Manual", the idea being to refer to the whole manual. +% +% But, this being TeX, we can't easily compare our node name against the +% string "Top" while ignoring the possible spaces before and after in +% the input. By adding the arbitrary 7sp below, we make it much less +% likely that a real node name would have the same width as "Top" (e.g., +% in a monospaced font). Hopefully it will never happen in practice. +% +% For the same basic reason, we retypeset the "Top" at every +% reference, since the current font is indeterminate. +% +\def\crossmanualxref#1{% + \setbox\toprefbox = \hbox{Top\kern7sp}% + \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% + \ifdim \wd2 > 7sp % nonempty? + \ifdim \wd2 = \wd\toprefbox \else % same as Top? + \putwordSection{} ``\printedrefname'' \putwordin{}\space + \fi + \fi + #1% +} + % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly @@ -9895,22 +9993,26 @@ directory should work if nowhere else does.} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of -% the literal character `\'. -% -@def@normalturnoffactive{% - @let"=@normaldoublequote - @let$=@normaldollar %$ font-lock fix - @let+=@normalplus - @let<=@normalless - @let>=@normalgreater - @let\=@normalbackslash - @let^=@normalcaret - @let_=@normalunderscore - @let|=@normalverticalbar - @let~=@normaltilde - @markupsetuplqdefault - @markupsetuprqdefault - @unsepspaces +% the literal character `\'. Also revert - to its normal character, in +% case the active - from code has slipped in. +% +{@catcode`- = @active + @gdef@normalturnoffactive{% + @let-=@normaldash + @let"=@normaldoublequote + @let$=@normaldollar %$ font-lock fix + @let+=@normalplus + @let<=@normalless + @let>=@normalgreater + @let\=@normalbackslash + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let~=@normaltilde + @markupsetuplqdefault + @markupsetuprqdefault + @unsepspaces + } } % Make _ and + \other characters, temporarily. |