diff options
| author | Karoly Lorentey | 2007-04-22 12:12:29 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2007-04-22 12:12:29 +0000 |
| commit | e18c709364b095ea0be8ecabe458ac9a642a252f (patch) | |
| tree | efe814a842f932f387b3947c572bf43a548d17ef /lispref | |
| parent | 81088e260b086fe28f36964f32b6338210ec6fd8 (diff) | |
| parent | 9f25e707aaad5ed14a9448e9c5d345ff0bdbc5a7 (diff) | |
| download | emacs-e18c709364b095ea0be8ecabe458ac9a642a252f.tar.gz emacs-e18c709364b095ea0be8ecabe458ac9a642a252f.zip | |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-660
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-661
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-662
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-663
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-664
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-665
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-666
Fix read-only prompt problem in isearch
* emacs@sv.gnu.org/emacs--devo--0--patch-667
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-668
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-669
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-670
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-671
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-672
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-673
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-206
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-207
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-208
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-600
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/ChangeLog | 37 | ||||
| -rw-r--r-- | lispref/compile.texi | 13 | ||||
| -rw-r--r-- | lispref/display.texi | 27 | ||||
| -rw-r--r-- | lispref/elisp.texi | 2 | ||||
| -rw-r--r-- | lispref/markers.texi | 24 | ||||
| -rw-r--r-- | lispref/minibuf.texi | 11 | ||||
| -rw-r--r-- | lispref/modes.texi | 4 | ||||
| -rw-r--r-- | lispref/nonascii.texi | 7 | ||||
| -rw-r--r-- | lispref/os.texi | 10 | ||||
| -rw-r--r-- | lispref/sequences.texi | 8 | ||||
| -rw-r--r-- | lispref/strings.texi | 71 | ||||
| -rw-r--r-- | lispref/syntax.texi | 3 | ||||
| -rw-r--r-- | lispref/variables.texi | 19 |
13 files changed, 148 insertions, 88 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index bfae9080054..1510ec19e05 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,40 @@ | |||
| 1 | 2007-03-19 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * os.texi (Recording Input): recent-keys now gives 300 keys. | ||
| 4 | |||
| 5 | 2007-03-12 Glenn Morris <rgm@gnu.org> | ||
| 6 | |||
| 7 | * os.texi: Replace "daylight savings" with "daylight saving" | ||
| 8 | throughout. | ||
| 9 | |||
| 10 | 2007-03-05 Richard Stallman <rms@gnu.org> | ||
| 11 | |||
| 12 | * variables.texi (File Local Variables): Update | ||
| 13 | enable-local-variables values. | ||
| 14 | |||
| 15 | 2007-03-04 Richard Stallman <rms@gnu.org> | ||
| 16 | |||
| 17 | * syntax.texi (Control Parsing): Minor clarification. | ||
| 18 | |||
| 19 | * strings.texi (Formatting Strings): Clarify width, precision, flags. | ||
| 20 | |||
| 21 | * sequences.texi (Sequence Functions): Move string-bytes away, | ||
| 22 | add xref. | ||
| 23 | |||
| 24 | * nonascii.texi (Text Representations): Move string-bytes here. | ||
| 25 | |||
| 26 | * modes.texi (Major Mode Conventions): Fundamental mode is exception. | ||
| 27 | |||
| 28 | * minibuf.texi (Basic Completion): Minor clarification. | ||
| 29 | |||
| 30 | * markers.texi (The Mark): Clarify existence vs activation of mark. | ||
| 31 | Other cleanup. | ||
| 32 | |||
| 33 | * display.texi (Finding Overlays): Write better example. | ||
| 34 | |||
| 35 | * compile.texi (Eval During Compile): Clarify putting macros | ||
| 36 | in eval-when-compile. | ||
| 37 | |||
| 1 | 2007-02-25 Vinicius Jose Latorre <viniciusjl@ig.com.br> | 38 | 2007-02-25 Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 2 | 39 | ||
| 3 | * loading.texi (How Programs Do Loading): Fix anchor position at | 40 | * loading.texi (How Programs Do Loading): Fix anchor position at |
diff --git a/lispref/compile.texi b/lispref/compile.texi index 0d63887e1cc..4ed0eb8c1bf 100644 --- a/lispref/compile.texi +++ b/lispref/compile.texi | |||
| @@ -454,11 +454,10 @@ used to load it for compiling, but not executing. For example, | |||
| 454 | (require 'my-macro-package)) ;; only macros needed from this | 454 | (require 'my-macro-package)) ;; only macros needed from this |
| 455 | @end lisp | 455 | @end lisp |
| 456 | 456 | ||
| 457 | The same sort of thing goes for macros or @code{defalias}es defined | 457 | The same sort of thing goes for macros and @code{defsubst} functions |
| 458 | locally and only for use within the file. They can be defined while | 458 | defined locally and only for use within the file. They are needed for |
| 459 | compiling, but then not needed when executing. This is good for code | 459 | compiling the file, but in most cases they are not needed for |
| 460 | that's only a fallback for compatibility with other versions of Emacs. | 460 | execution of the compiled file. For example, |
| 461 | For example. | ||
| 462 | 461 | ||
| 463 | @lisp | 462 | @lisp |
| 464 | (eval-when-compile | 463 | (eval-when-compile |
| @@ -467,6 +466,10 @@ For example. | |||
| 467 | (compatibility code)))) | 466 | (compatibility code)))) |
| 468 | @end lisp | 467 | @end lisp |
| 469 | 468 | ||
| 469 | @noindent | ||
| 470 | This is often good for code that's only a fallback for compatibility | ||
| 471 | with other versions of Emacs. | ||
| 472 | |||
| 470 | @strong{Common Lisp Note:} At top level, @code{eval-when-compile} is analogous to the Common | 473 | @strong{Common Lisp Note:} At top level, @code{eval-when-compile} is analogous to the Common |
| 471 | Lisp idiom @code{(eval-when (compile eval) @dots{})}. Elsewhere, the | 474 | Lisp idiom @code{(eval-when (compile eval) @dots{})}. Elsewhere, the |
| 472 | Common Lisp @samp{#.} reader macro (but not when interpreting) is closer | 475 | Common Lisp @samp{#.} reader macro (but not when interpreting) is closer |
diff --git a/lispref/display.texi b/lispref/display.texi index 02491c422d9..f485829725a 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -1527,26 +1527,25 @@ end of an overlay, before @var{pos}. If there is none, it returns | |||
| 1527 | @code{(point-min)}. | 1527 | @code{(point-min)}. |
| 1528 | @end defun | 1528 | @end defun |
| 1529 | 1529 | ||
| 1530 | Here's a function which uses @code{next-overlay-change} to search | 1530 | As an example, here's a simplified (and inefficient) version of the |
| 1531 | for the next character which gets a given property @code{prop} from | 1531 | primitive function @code{next-single-char-property-change} |
| 1532 | either its overlays or its text properties (@pxref{Property Search}): | 1532 | (@pxref{Property Search}). It searches forward from position |
| 1533 | @var{pos} for the next position where the value of a given property | ||
| 1534 | @code{prop}, as obtained from either overlays or text properties, | ||
| 1535 | changes. | ||
| 1533 | 1536 | ||
| 1534 | @smallexample | 1537 | @smallexample |
| 1535 | (defun find-overlay-prop (prop) | 1538 | (defun next-single-char-property-change (position prop) |
| 1536 | (save-excursion | 1539 | (save-excursion |
| 1537 | (while (and (not (eobp)) | 1540 | (goto-char position) |
| 1538 | (not (get-char-property (point) prop))) | 1541 | (let ((propval (get-char-property (point) prop))) |
| 1539 | (goto-char (min (next-overlay-change (point)) | 1542 | (while (and (not (eobp)) |
| 1540 | (next-single-property-change (point) prop)))) | 1543 | (eq (get-char-property (point) prop) propval)) |
| 1544 | (goto-char (min (next-overlay-change (point)) | ||
| 1545 | (next-single-property-change (point) prop))))) | ||
| 1541 | (point))) | 1546 | (point))) |
| 1542 | @end smallexample | 1547 | @end smallexample |
| 1543 | 1548 | ||
| 1544 | Now you can search for a @code{happy} property like this: | ||
| 1545 | |||
| 1546 | @smallexample | ||
| 1547 | (find-overlay-prop 'happy) | ||
| 1548 | @end smallexample | ||
| 1549 | |||
| 1550 | @node Width | 1549 | @node Width |
| 1551 | @section Width | 1550 | @section Width |
| 1552 | 1551 | ||
diff --git a/lispref/elisp.texi b/lispref/elisp.texi index 3b99e9eff8e..fa9f93208e1 100644 --- a/lispref/elisp.texi +++ b/lispref/elisp.texi | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | @c Version of the manual and of Emacs. | 7 | @c Version of the manual and of Emacs. |
| 8 | @c Please remember to update the edition number in README as well. | 8 | @c Please remember to update the edition number in README as well. |
| 9 | @set VERSION 2.9 | 9 | @set VERSION 2.9 |
| 10 | @set EMACSVER 22.0.95 | 10 | @set EMACSVER 22.0.96 |
| 11 | 11 | ||
| 12 | @dircategory Emacs | 12 | @dircategory Emacs |
| 13 | @direntry | 13 | @direntry |
diff --git a/lispref/markers.texi b/lispref/markers.texi index e8e04479758..b955538fe03 100644 --- a/lispref/markers.texi +++ b/lispref/markers.texi | |||
| @@ -410,10 +410,10 @@ values of point and the mark as arguments to the command in an | |||
| 410 | interactive call, but permits other Lisp programs to specify arguments | 410 | interactive call, but permits other Lisp programs to specify arguments |
| 411 | explicitly. @xref{Interactive Codes}. | 411 | explicitly. @xref{Interactive Codes}. |
| 412 | 412 | ||
| 413 | Each buffer has its own value of the mark that is independent of the | 413 | Each buffer has a marker which represents the value of the mark in |
| 414 | value of the mark in other buffers. When a buffer is created, the mark | 414 | that buffer, independent of any other buffer. When a buffer is newly |
| 415 | exists but does not point anywhere. We consider this state as ``the | 415 | created, this marker exists but does not point anywhere. That means |
| 416 | absence of a mark in that buffer.'' | 416 | the mark ``doesn't exist'' in that buffer as yet. |
| 417 | 417 | ||
| 418 | Once the mark ``exists'' in a buffer, it normally never ceases to | 418 | Once the mark ``exists'' in a buffer, it normally never ceases to |
| 419 | exist. However, it may become @dfn{inactive}, if Transient Mark mode is | 419 | exist. However, it may become @dfn{inactive}, if Transient Mark mode is |
| @@ -452,10 +452,10 @@ inactivity of the mark, and returns the mark position anyway (or | |||
| 452 | @end defun | 452 | @end defun |
| 453 | 453 | ||
| 454 | @defun mark-marker | 454 | @defun mark-marker |
| 455 | This function returns the current buffer's mark. This is the very marker | 455 | This function returns the marker that represents the current buffer's |
| 456 | that records the mark location inside Emacs, not a copy. Therefore, | 456 | mark. It is not a copy, it is the marker used internally. Therefore, |
| 457 | changing this marker's position will directly affect the position of the mark. | 457 | changing this marker's position will directly affect the buffer's |
| 458 | Don't do it unless that is the effect you want. | 458 | mark. Don't do that unless that is the effect you want. |
| 459 | 459 | ||
| 460 | @example | 460 | @example |
| 461 | @group | 461 | @group |
| @@ -472,10 +472,10 @@ Don't do it unless that is the effect you want. | |||
| 472 | @end group | 472 | @end group |
| 473 | @end example | 473 | @end example |
| 474 | 474 | ||
| 475 | Like any marker, this marker can be set to point at any buffer you like. | 475 | Like any marker, this marker can be set to point at any buffer you |
| 476 | We don't recommend that you make it point at any buffer other than the | 476 | like. If you make it point at any buffer other than the one of which |
| 477 | one of which it is the mark. If you do, it will yield perfectly | 477 | it is the mark, it will yield perfectly consistent, but rather odd, |
| 478 | consistent, but rather odd, results. | 478 | results. We recommend that you not do it! |
| 479 | @end defun | 479 | @end defun |
| 480 | 480 | ||
| 481 | @ignore | 481 | @ignore |
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index de81e94e54e..1abbb148b85 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi | |||
| @@ -629,12 +629,11 @@ match. | |||
| 629 | If @var{collection} is an alist (@pxref{Association Lists}), the | 629 | If @var{collection} is an alist (@pxref{Association Lists}), the |
| 630 | permissible completions are the elements of the alist that are either | 630 | permissible completions are the elements of the alist that are either |
| 631 | strings, symbols, or conses whose @sc{car} is a string or symbol. | 631 | strings, symbols, or conses whose @sc{car} is a string or symbol. |
| 632 | Symbols are converted to strings using @code{symbol-name}. | 632 | Symbols are converted to strings using @code{symbol-name}. Other |
| 633 | Other elements of the alist are ignored. (Remember that in Emacs Lisp, | 633 | elements of the alist are ignored. (Remember that in Emacs Lisp, the |
| 634 | the elements of alists do not @emph{have} to be conses.) As all | 634 | elements of alists do not @emph{have} to be conses.) In particular, a |
| 635 | elements of the alist can be strings, this case actually includes | 635 | list of strings or symbols is allowed, even though we usually do not |
| 636 | lists of strings or symbols, even though we usually do not think of | 636 | think of such lists as alists. |
| 637 | such lists as alists. | ||
| 638 | 637 | ||
| 639 | @cindex obarray in completion | 638 | @cindex obarray in completion |
| 640 | If @var{collection} is an obarray (@pxref{Creating Symbols}), the names | 639 | If @var{collection} is an obarray (@pxref{Creating Symbols}), the names |
diff --git a/lispref/modes.texi b/lispref/modes.texi index cfa9e90d793..6eba02d5a0b 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -256,7 +256,9 @@ Fundamental mode. Rmail mode is a complicated and specialized mode. | |||
| 256 | The code for existing major modes follows various coding conventions, | 256 | The code for existing major modes follows various coding conventions, |
| 257 | including conventions for local keymap and syntax table initialization, | 257 | including conventions for local keymap and syntax table initialization, |
| 258 | global names, and hooks. Please follow these conventions when you | 258 | global names, and hooks. Please follow these conventions when you |
| 259 | define a new major mode. | 259 | define a new major mode. (Fundamental mode is an exception to many |
| 260 | of these conventions, because its definition is to present the global | ||
| 261 | state of Emacs.) | ||
| 260 | 262 | ||
| 261 | This list of conventions is only partial, because each major mode | 263 | This list of conventions is only partial, because each major mode |
| 262 | should aim for consistency in general with other Emacs major modes. | 264 | should aim for consistency in general with other Emacs major modes. |
diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index d733cc80860..3661079c56e 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi | |||
| @@ -111,6 +111,13 @@ out of range, the value is @code{nil}. | |||
| 111 | Return @code{t} if @var{string} is a multibyte string. | 111 | Return @code{t} if @var{string} is a multibyte string. |
| 112 | @end defun | 112 | @end defun |
| 113 | 113 | ||
| 114 | @defun string-bytes string | ||
| 115 | @cindex string, number of bytes | ||
| 116 | This function returns the number of bytes in @var{string}. | ||
| 117 | If @var{string} is a multibyte string, this can be greater than | ||
| 118 | @code{(length @var{string})}. | ||
| 119 | @end defun | ||
| 120 | |||
| 114 | @node Converting Representations | 121 | @node Converting Representations |
| 115 | @section Converting Text Representations | 122 | @section Converting Text Representations |
| 116 | 123 | ||
diff --git a/lispref/os.texi b/lispref/os.texi index 1ff0517891d..9fde03b650c 100644 --- a/lispref/os.texi +++ b/lispref/os.texi | |||
| @@ -1042,7 +1042,7 @@ The value has the form @code{(@var{offset} @var{name})}. Here | |||
| 1042 | @var{offset} is an integer giving the number of seconds ahead of UTC | 1042 | @var{offset} is an integer giving the number of seconds ahead of UTC |
| 1043 | (east of Greenwich). A negative value means west of Greenwich. The | 1043 | (east of Greenwich). A negative value means west of Greenwich. The |
| 1044 | second element, @var{name}, is a string giving the name of the time | 1044 | second element, @var{name}, is a string giving the name of the time |
| 1045 | zone. Both elements change when daylight savings time begins or ends; | 1045 | zone. Both elements change when daylight saving time begins or ends; |
| 1046 | if the user has specified a time zone that does not use a seasonal time | 1046 | if the user has specified a time zone that does not use a seasonal time |
| 1047 | adjustment, then the value is constant through time. | 1047 | adjustment, then the value is constant through time. |
| 1048 | 1048 | ||
| @@ -1125,7 +1125,7 @@ The year, an integer typically greater than 1900. | |||
| 1125 | The day of week, as an integer between 0 and 6, where 0 stands for | 1125 | The day of week, as an integer between 0 and 6, where 0 stands for |
| 1126 | Sunday. | 1126 | Sunday. |
| 1127 | @item dst | 1127 | @item dst |
| 1128 | @code{t} if daylight savings time is effect, otherwise @code{nil}. | 1128 | @code{t} if daylight saving time is effect, otherwise @code{nil}. |
| 1129 | @item zone | 1129 | @item zone |
| 1130 | An integer indicating the time zone, as the number of seconds east of | 1130 | An integer indicating the time zone, as the number of seconds east of |
| 1131 | Greenwich. | 1131 | Greenwich. |
| @@ -1145,11 +1145,11 @@ to stand for years above 1900, or years above 2000, you must alter them | |||
| 1145 | yourself before you call @code{encode-time}. | 1145 | yourself before you call @code{encode-time}. |
| 1146 | 1146 | ||
| 1147 | The optional argument @var{zone} defaults to the current time zone and | 1147 | The optional argument @var{zone} defaults to the current time zone and |
| 1148 | its daylight savings time rules. If specified, it can be either a list | 1148 | its daylight saving time rules. If specified, it can be either a list |
| 1149 | (as you would get from @code{current-time-zone}), a string as in the | 1149 | (as you would get from @code{current-time-zone}), a string as in the |
| 1150 | @code{TZ} environment variable, @code{t} for Universal Time, or an | 1150 | @code{TZ} environment variable, @code{t} for Universal Time, or an |
| 1151 | integer (as you would get from @code{decode-time}). The specified | 1151 | integer (as you would get from @code{decode-time}). The specified |
| 1152 | zone is used without any further alteration for daylight savings time. | 1152 | zone is used without any further alteration for daylight saving time. |
| 1153 | 1153 | ||
| 1154 | If you pass more than seven arguments to @code{encode-time}, the first | 1154 | If you pass more than seven arguments to @code{encode-time}, the first |
| 1155 | six are used as @var{seconds} through @var{year}, the last argument is | 1155 | six are used as @var{seconds} through @var{year}, the last argument is |
| @@ -1697,7 +1697,7 @@ is the character Emacs currently uses for quitting, usually @kbd{C-g}. | |||
| 1697 | @subsection Recording Input | 1697 | @subsection Recording Input |
| 1698 | 1698 | ||
| 1699 | @defun recent-keys | 1699 | @defun recent-keys |
| 1700 | This function returns a vector containing the last 100 input events from | 1700 | This function returns a vector containing the last 300 input events from |
| 1701 | the keyboard or mouse. All input events are included, whether or not | 1701 | the keyboard or mouse. All input events are included, whether or not |
| 1702 | they were used as parts of key sequences. Thus, you always get the last | 1702 | they were used as parts of key sequences. Thus, you always get the last |
| 1703 | 100 input events, not counting events generated by keyboard macros. | 1703 | 100 input events, not counting events generated by keyboard macros. |
diff --git a/lispref/sequences.texi b/lispref/sequences.texi index 8087b8051cb..ac5a16e261f 100644 --- a/lispref/sequences.texi +++ b/lispref/sequences.texi | |||
| @@ -111,12 +111,8 @@ Emacs character code. | |||
| 111 | @end example | 111 | @end example |
| 112 | @end defun | 112 | @end defun |
| 113 | 113 | ||
| 114 | @defun string-bytes string | 114 | @noindent |
| 115 | @cindex string, number of bytes | 115 | See also @code{string-bytes}, in @ref{Text Representations}. |
| 116 | This function returns the number of bytes in @var{string}. | ||
| 117 | If @var{string} is a multibyte string, this is greater than | ||
| 118 | @code{(length @var{string})}. | ||
| 119 | @end defun | ||
| 120 | 116 | ||
| 121 | @defun elt sequence index | 117 | @defun elt sequence index |
| 122 | @cindex elements of sequences | 118 | @cindex elements of sequences |
diff --git a/lispref/strings.texi b/lispref/strings.texi index e1824518abd..23f679d5bb9 100644 --- a/lispref/strings.texi +++ b/lispref/strings.texi | |||
| @@ -821,18 +821,19 @@ operation} error. | |||
| 821 | 821 | ||
| 822 | @cindex field width | 822 | @cindex field width |
| 823 | @cindex padding | 823 | @cindex padding |
| 824 | All the specification characters allow an optional ``width,'' which | 824 | A specification can have a @dfn{width}, which is a signed decimal |
| 825 | is a digit-string between the @samp{%} and the character. If the | 825 | number between the @samp{%} and the specification character. If the |
| 826 | printed representation of the object contains fewer characters than | 826 | printed representation of the object contains fewer characters than |
| 827 | this width, then it is padded. The padding is on the left if the | 827 | this width, @code{format} extends it with padding. The padding goes |
| 828 | width is positive (or starts with zero) and on the right if the | 828 | on the left if the width is positive (or starts with zero) and on the |
| 829 | width is negative. The padding character is normally a space, but if | 829 | right if the width is negative. The padding character is normally a |
| 830 | the width starts with a zero, zeros are used for padding. Some of | 830 | space, but it's @samp{0} if the width starts with a zero. |
| 831 | these conventions are ignored for specification characters for which | 831 | |
| 832 | they do not make sense. That is, @samp{%s}, @samp{%S} and @samp{%c} | 832 | Some of these conventions are ignored for specification characters |
| 833 | accept a width starting with 0, but still pad with @emph{spaces} on | 833 | for which they do not make sense. That is, @samp{%s}, @samp{%S} and |
| 834 | the left. Also, @samp{%%} accepts a width, but ignores it. Here are | 834 | @samp{%c} accept a width starting with 0, but still pad with |
| 835 | some examples of padding: | 835 | @emph{spaces} on the left. Also, @samp{%%} accepts a width, but |
| 836 | ignores it. Here are some examples of padding: | ||
| 836 | 837 | ||
| 837 | @example | 838 | @example |
| 838 | (format "%06d is padded on the left with zeros" 123) | 839 | (format "%06d is padded on the left with zeros" 123) |
| @@ -842,15 +843,16 @@ some examples of padding: | |||
| 842 | @result{} "123 is padded on the right" | 843 | @result{} "123 is padded on the right" |
| 843 | @end example | 844 | @end example |
| 844 | 845 | ||
| 846 | @noindent | ||
| 845 | If the width is too small, @code{format} does not truncate the | 847 | If the width is too small, @code{format} does not truncate the |
| 846 | object's printed representation. Thus, you can use a width to specify | 848 | object's printed representation. Thus, you can use a width to specify |
| 847 | a minimum spacing between columns with no risk of losing information. | 849 | a minimum spacing between columns with no risk of losing information. |
| 848 | 850 | ||
| 849 | In the following three examples, @samp{%7s} specifies a minimum width | 851 | In the following three examples, @samp{%7s} specifies a minimum |
| 850 | of 7. In the first case, the string inserted in place of @samp{%7s} has | 852 | width of 7. In the first case, the string inserted in place of |
| 851 | only 3 letters, so 4 blank spaces are inserted for padding. In the | 853 | @samp{%7s} has only 3 letters, it needs 4 blank spaces as padding. In |
| 852 | second case, the string @code{"specification"} is 13 letters wide but is | 854 | the second case, the string @code{"specification"} is 13 letters wide |
| 853 | not truncated. In the third case, the padding is on the right. | 855 | but is not truncated. In the third case, the padding is on the right. |
| 854 | 856 | ||
| 855 | @smallexample | 857 | @smallexample |
| 856 | @group | 858 | @group |
| @@ -873,32 +875,35 @@ not truncated. In the third case, the padding is on the right. | |||
| 873 | @end smallexample | 875 | @end smallexample |
| 874 | 876 | ||
| 875 | @cindex precision in format specifications | 877 | @cindex precision in format specifications |
| 876 | All the specification characters allow an optional ``precision'' | 878 | All the specification characters allow an optional @dfn{precision} |
| 877 | before the character (after the width, if present). The precision is | 879 | before the character (after the width, if present). The precision is |
| 878 | a decimal-point @samp{.} followed by a digit-string. For the | 880 | a decimal-point @samp{.} followed by a digit-string. For the |
| 879 | floating-point specifications (@samp{%e}, @samp{%f}, @samp{%g}), the | 881 | floating-point specifications (@samp{%e}, @samp{%f}, @samp{%g}), the |
| 880 | precision specifies how many decimal places to show; if zero, the | 882 | precision specifies how many decimal places to show; if zero, the |
| 881 | decimal-point itself is also omitted. For @samp{%s} and @samp{%S}, | 883 | decimal-point itself is also omitted. For @samp{%s} and @samp{%S}, |
| 882 | the precision truncates the string to the given width, so | 884 | the precision truncates the string to the given width, so @samp{%.3s} |
| 883 | @samp{%.3s} shows only the first three characters of the | 885 | shows only the first three characters of the representation for |
| 884 | representation for @var{object}. Precision is ignored for other | 886 | @var{object}. Precision has no effect for other specification |
| 885 | specification characters. | 887 | characters. |
| 886 | 888 | ||
| 887 | @cindex flags in format specifications | 889 | @cindex flags in format specifications |
| 888 | Immediately after the @samp{%} and before the optional width and | 890 | Immediately after the @samp{%} and before the optional width and |
| 889 | precision, you can put certain ``flag'' characters. | 891 | precision, you can put certain ``flag'' characters. |
| 890 | 892 | ||
| 891 | A space character inserts a space for positive numbers, a plus character | 893 | @samp{+} as a flag inserts a plus sign before a positive number, so |
| 892 | inserts a plus sign (otherwise nothing is inserted for positive | 894 | that it always has a sign. A space character as flag inserts a space |
| 893 | numbers). These flags are ignored except for @samp{%d}, @samp{%e}, | 895 | before a positive number. (Otherwise, positive numbers start with the |
| 894 | @samp{%f}, @samp{%g}, and if both flags are present the space is | 896 | first digit.) Either of these two flags ensures that positive numbers |
| 895 | ignored. | 897 | and negative numbers use the same number of columns. These flags are |
| 896 | 898 | ignored except for @samp{%d}, @samp{%e}, @samp{%f}, @samp{%g}, and if | |
| 897 | The flag @samp{#} indicates ``alternate form.'' For @samp{%o} it | 899 | both flags are used, the @samp{+} takes precedence. |
| 898 | ensures that the result begins with a 0. For @samp{%x} and @samp{%X} | 900 | |
| 899 | the result is prefixed with @samp{0x} or @samp{0X}. For @samp{%e}, | 901 | The flag @samp{#} specifies an ``alternate form'' which depends on |
| 900 | @samp{%f}, and @samp{%g} a decimal point is always shown even if the | 902 | the format in use. For @samp{%o} it ensures that the result begins |
| 901 | precision is zero. | 903 | with a @samp{0}. For @samp{%x} and @samp{%X}, it prefixes the result |
| 904 | with @samp{0x} or @samp{0X}. For @samp{%e}, @samp{%f}, and @samp{%g}, | ||
| 905 | the @samp{#} flag means include a decimal point even if the precision | ||
| 906 | is zero. | ||
| 902 | 907 | ||
| 903 | @node Case Conversion | 908 | @node Case Conversion |
| 904 | @comment node-name, next, previous, up | 909 | @comment node-name, next, previous, up |
diff --git a/lispref/syntax.texi b/lispref/syntax.texi index 85dcb83bd50..47f09944880 100644 --- a/lispref/syntax.texi +++ b/lispref/syntax.texi | |||
| @@ -873,7 +873,8 @@ can still override the syntax.) | |||
| 873 | @defopt parse-sexp-ignore-comments | 873 | @defopt parse-sexp-ignore-comments |
| 874 | @cindex skipping comments | 874 | @cindex skipping comments |
| 875 | If the value is non-@code{nil}, then comments are treated as | 875 | If the value is non-@code{nil}, then comments are treated as |
| 876 | whitespace by the functions in this section and by @code{forward-sexp}. | 876 | whitespace by the functions in this section and by @code{forward-sexp}, |
| 877 | @code{scan-lists} and @code{scan-sexps}. | ||
| 877 | @end defopt | 878 | @end defopt |
| 878 | 879 | ||
| 879 | @vindex parse-sexp-lookup-properties | 880 | @vindex parse-sexp-lookup-properties |
diff --git a/lispref/variables.texi b/lispref/variables.texi index 8d3e0bb5c25..56732d22db6 100644 --- a/lispref/variables.texi +++ b/lispref/variables.texi | |||
| @@ -1654,10 +1654,21 @@ This section describes the functions and variables that affect | |||
| 1654 | processing of file local variables. | 1654 | processing of file local variables. |
| 1655 | 1655 | ||
| 1656 | @defopt enable-local-variables | 1656 | @defopt enable-local-variables |
| 1657 | This variable controls whether to process file local variables. A | 1657 | This variable controls whether to process file local variables. |
| 1658 | value of @code{t} means to process them, querying the user if unsafe | 1658 | The possible values are: |
| 1659 | variables are encountered; @code{nil} means ignore them; anything else | 1659 | |
| 1660 | means to query the user for each file. The default value is @code{t}. | 1660 | @table @asis |
| 1661 | @item @code{t} (the default) | ||
| 1662 | Set the safe variables, and query (once) about any unsafe variables. | ||
| 1663 | @item @code{:safe} | ||
| 1664 | Set only the safe variables and do not query. | ||
| 1665 | @item @code{:all} | ||
| 1666 | Set all the variables and do not query. | ||
| 1667 | @item @code{nil} | ||
| 1668 | Don't set any variables. | ||
| 1669 | @item anything else | ||
| 1670 | Query (once) about all the variables. | ||
| 1671 | @end table | ||
| 1661 | @end defopt | 1672 | @end defopt |
| 1662 | 1673 | ||
| 1663 | @defun hack-local-variables &optional mode-only | 1674 | @defun hack-local-variables &optional mode-only |