diff options
author | Tom Tromey <tromey@redhat.com> | 2013-08-19 21:53:07 -0600 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-08-19 21:53:07 -0600 |
commit | 6d75555c5cc3d2a629646cee7629e67530fa7a36 (patch) | |
tree | 3852804dd234ad613ea8691332e10b92c027e87d /doc/lispref | |
parent | cc231cbe45d27a1906d268fb72d3b4105a2e9c65 (diff) | |
parent | 8c2f38aaab7a7a2f0605416fc2ee38701e41ab61 (diff) | |
download | emacs-6d75555c5cc3d2a629646cee7629e67530fa7a36.tar.gz |
merge from trunk
Diffstat (limited to 'doc/lispref')
-rw-r--r-- | doc/lispref/ChangeLog | 118 | ||||
-rw-r--r-- | doc/lispref/Makefile.in | 90 | ||||
-rw-r--r-- | doc/lispref/control.texi | 56 | ||||
-rw-r--r-- | doc/lispref/display.texi | 14 | ||||
-rw-r--r-- | doc/lispref/edebug.texi | 4 | ||||
-rw-r--r-- | doc/lispref/elisp.texi | 1 | ||||
-rw-r--r-- | doc/lispref/errors.texi | 11 | ||||
-rw-r--r-- | doc/lispref/frames.texi | 6 | ||||
-rw-r--r-- | doc/lispref/functions.texi | 1 | ||||
-rw-r--r-- | doc/lispref/lists.texi | 15 | ||||
-rw-r--r-- | doc/lispref/markers.texi | 26 | ||||
-rw-r--r-- | doc/lispref/modes.texi | 6 | ||||
-rw-r--r-- | doc/lispref/nonascii.texi | 51 | ||||
-rw-r--r-- | doc/lispref/positions.texi | 21 | ||||
-rw-r--r-- | doc/lispref/text.texi | 45 | ||||
-rw-r--r-- | doc/lispref/variables.texi | 1 | ||||
-rw-r--r-- | doc/lispref/windows.texi | 17 |
17 files changed, 390 insertions, 93 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 32717946b04..3f9d23a5476 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,121 @@ +2013-08-18 Xue Fuqiao <xfq.free@gmail.com> + + * positions.texi (Positions): Improve indexing. + +2013-08-18 Eli Zaretskii <eliz@gnu.org> + + * markers.texi (The Region): Improve indexing. + +2013-08-17 Xue Fuqiao <xfq.free@gmail.com> + + * modes.texi (SMIE, SMIE Grammar, SMIE Indentation): Add some indexes. + + * text.texi (Maintaining Undo): Mention interactive call of + buffer-disable-undo. + (Filling): Add cross-reference for hard newlines. + (Sorting): Fix indentation. + (Columns): Comment out undefined behavior. + (Case Changes): Fix an `args-out-of-range' error in the example. + +2013-08-16 Xue Fuqiao <xfq.free@gmail.com> + + * text.texi (Insertion): Refine. + (Margins): Add an index. + (Undo): Doc fix for `buffer-undo-list'. + + * positions.texi (Character Motion): + * markers.texi (Moving Markers): + (Creating Markers): Comment out undefined behavior. + +2013-08-15 Xue Fuqiao <xfq.free@gmail.com> + + * markers.texi (The Region): Add/move indexes. + +2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * display.texi (ImageMagick Images): Mention :content-type and + `image-content-type-suffixes'. + +2013-08-13 Xue Fuqiao <xfq.free@gmail.com> + + * positions.texi (Word Motion): Remove redundant sentence. + +2013-08-13 Glenn Morris <rgm@gnu.org> + + * lists.texi (List Elements): + Undocument behavior of nth and nthcdr with n < 0. (Bug#15059) + +2013-08-13 Xue Fuqiao <xfq.free@gmail.com> + + * frames.texi (Display Feature Testing): Add indexes. + +2013-08-12 Glenn Morris <rgm@gnu.org> + + * Makefile.in (prefix, datarootdir, datadir, PACKAGE_TARNAME) + (docdir, dvidir, htmldir, pdfdir, psdir, GZIP_PROG, INSTALL) + (INSTALL_DATA): New, set by configure. + (HTML_OPTS, DVI_TARGETS, HTML_TARGETS, PDF_TARGETS, PS_TARGETS): + New variables. + (.SUFFIXES): Add .ps and .dvi. + (.dvi.ps): New suffix rule. + (dvi, html, pdf, ps): Use *_TARGETS variables. + (elisp.html): Use HTML_OPTS. + (elisp.ps): Remove explicit rule. + (.PHONY): install-dvi, install-html, install-pdf, install-ps + ,install-doc, uninstall-dvi, uninstall-html, uninstall-pdf, + uninstall-ps, and uninstall-doc. + (install-dvi, install-html, install-pdf, install-ps, install-doc) + (uninstall-dvi, uninstall-html, uninstall-ps, uninstall-pdf) + (uninstall-doc): New rules. + (clean): Use DVI_TARGETS, HTML_TARGETS, PDF_TARGETS, PS_TARGETS. + +2013-08-10 Xue Fuqiao <xfq.free@gmail.com> + + * edebug.texi (Instrumenting Macro Calls): Use @defmac for macros. + +2013-08-09 Xue Fuqiao <xfq.free@gmail.com> + + * control.texi (Error Symbols): Minor fix for previous change. + +2013-08-09 Stefan Monnier <monnier@iro.umontreal.ca> + + * errors.texi (Standard Errors): Don't refer to `error-conditions'. + + * control.texi (Signaling Errors): Refer to define-error. + (Error Symbols): Add `define-error'. + +2013-08-06 Dmitry Antipov <dmantipov@yandex.ru> + + * positions.texi (Motion by Screen Lines): + * display.texi (Truncation): Rename `cache-long-line-scans' + to `cache-long-scans'. + +2013-08-05 Xue Fuqiao <xfq.free@gmail.com> + + * windows.texi (Window Start and End): Add an index. + +2013-08-02 Xue Fuqiao <xfq.free@gmail.com> + + * display.texi (Face Functions): Add an index. + + * variables.texi (Variable Aliases): Add an index. + + * functions.texi (Defining Functions): Add an index. + + * nonascii.texi (Coding System Basics): Add an index. + +2013-07-31 Xue Fuqiao <xfq.free@gmail.com> + + * nonascii.texi (Non-ASCII Characters): Update menu. + (Disabling Multibyte): Move here from doc/emacs/mule.texi. Fix cross-references. + + * elisp.texi (Top): Update menu. + +2013-07-30 Xue Fuqiao <xfq.free@gmail.com> + + * windows.texi (Window History): Mention the default value of + switch-to-visible-buffer. Add cross-references. + 2013-07-24 Michael Albinus <michael.albinus@gmx.de> * errors.texi (Standard Errors): Fix typo. diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in index 4c1d63ab5c8..675cac7949d 100644 --- a/doc/lispref/Makefile.in +++ b/doc/lispref/Makefile.in @@ -33,12 +33,29 @@ texinfodir = $(srcdir)/../misc # Directory with emacsver.texi. emacsdir = $(srcdir)/../emacs +prefix = @prefix@ +datarootdir = @datarootdir@ +datadir = @datadir@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +docdir = @docdir@ +dvidir = @dvidir@ +htmldir = @htmldir@ +pdfdir = @pdfdir@ +psdir = @psdir@ + MKDIR_P = @MKDIR_P@ +GZIP_PROG = @GZIP_PROG@ + +HTML_OPTS = --no-split --html + INFO_EXT=@INFO_EXT@ # Options used only when making info output. INFO_OPTS=@INFO_OPTS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ + MAKEINFO = @MAKEINFO@ MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir) TEXI2DVI = texi2dvi @@ -48,6 +65,11 @@ DVIPS = dvips ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(emacsdir):$(TEXINPUTS)" \ MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)" +DVI_TARGETS = elisp.dvi +HTML_TARGETS = elisp.html +PDF_TARGETS = elisp.pdf +PS_TARGETS = elisp.ps + # List of all the texinfo files in the manual: srcs = \ @@ -109,11 +131,16 @@ mkinfodir = @${MKDIR_P} ${buildinfodir} .PHONY: info dvi pdf ps +.SUFFIXES: .ps .dvi + +.dvi.ps: + $(DVIPS) -o $@ $< + info: $(buildinfodir)/elisp$(INFO_EXT) -dvi: elisp.dvi -html: elisp.html -pdf: elisp.pdf -ps: elisp.ps +dvi: $(DVI_TARGETS) +html: $(HTML_TARGETS) +pdf: $(PDF_TARGETS) +ps: $(PS_TARGETS) ## Note: "<" is not portable in ordinary make rules. $(buildinfodir)/elisp$(INFO_EXT): $(srcs) @@ -124,10 +151,7 @@ elisp.dvi: $(srcs) $(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi elisp.html: $(srcs) - $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $(srcdir)/elisp.texi - -elisp.ps: elisp.dvi - $(DVIPS) -o $@ elisp.dvi + $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $(srcdir)/elisp.texi elisp.pdf: $(srcs) $(ENVADD) $(TEXI2PDF) $(srcdir)/elisp.texi @@ -141,9 +165,8 @@ mostlyclean: rm -f elisp[12]* vol[12].tmp clean: mostlyclean - rm -f elisp.dvi elisp.pdf elisp.ps + rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS) rm -f vol[12].dvi vol[12].pdf vol[12].ps - rm -rf elisp.html rm -f emacs-lispref-${version}.tar* distclean: clean @@ -176,4 +199,51 @@ dist: tar -cf emacs-lispref-${version}.tar emacs-lispref-${version} rm -rf emacs-lispref-${version} +.PHONY: install-dvi install-html install-pdf install-ps install-doc + +install-dvi: dvi + umask 022; $(MKDIR_P) $(DESTDIR)$(dvidir) + $(INSTALL_DATA) $(DVI_TARGETS) $(DESTDIR)$(dvidir) +install-html: html + umask 022; $(MKDIR_P) $(DESTDIR)$(htmldir) + $(INSTALL_DATA) $(HTML_TARGETS) $(DESTDIR)$(htmldir) +install-pdf: pdf + umask 022;$(MKDIR_P) $(DESTDIR)$(pdfdir) + $(INSTALL_DATA) $(PDF_TARGETS) $(DESTDIR)$(pdfdir) +install-ps: ps + umask 022; $(MKDIR_P) $(DESTDIR)$(psdir) + for file in $(PS_TARGETS); do \ + $(INSTALL_DATA) $${file} $(DESTDIR)$(psdir); \ + [ -n "${GZIP_PROG}" ] || continue; \ + rm -f $(DESTDIR)$(psdir)/$${file}.gz; \ + ${GZIP_PROG} -9n $(DESTDIR)$(psdir)/$${file}; \ + done + +## Top-level Makefile installs the info pages. +install-doc: install-dvi install-html install-pdf install-ps + + +.PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps uninstall-doc + +uninstall-dvi: + for file in $(DVI_TARGETS); do \ + rm -f $(DESTDIR)$(dvidir)/$${file}; \ + done +uninstall-html: + for file in $(HTML_TARGETS); do \ + rm -f $(DESTDIR)$(htmldir)/$${file}; \ + done +uninstall-ps: + ext= ; [ -n "${GZIP_PROG}" ] && ext=.gz; \ + for file in $(PS_TARGETS); do \ + rm -f $(DESTDIR)$(psdir)/$${file}$${ext}; \ + done +uninstall-pdf: + for file in $(PDF_TARGETS); do \ + rm -f $(DESTDIR)$(pdfdir)/$${file}; \ + done + +uninstall-doc: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps + + ### Makefile ends here diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 9ee01299260..70eabcd84a4 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -890,9 +890,8 @@ argument @var{data} is a list of additional Lisp objects relevant to the circumstances of the error. The argument @var{error-symbol} must be an @dfn{error symbol}---a symbol -bearing a property @code{error-conditions} whose value is a list of -condition names. This is how Emacs Lisp classifies different sorts of -errors. @xref{Error Symbols}, for a description of error symbols, +defined with @code{define-error}. This is how Emacs Lisp classifies different +sorts of errors. @xref{Error Symbols}, for a description of error symbols, error conditions and condition names. If the error is not handled, the two arguments are used in printing @@ -1118,8 +1117,8 @@ Here are examples of handlers: @end example Each error that occurs has an @dfn{error symbol} that describes what -kind of error it is. The @code{error-conditions} property of this -symbol is a list of condition names (@pxref{Error Symbols}). Emacs +kind of error it is, and which describes also a list of condition names +(@pxref{Error Symbols}). Emacs searches all the active @code{condition-case} forms for a handler that specifies one or more of these condition names; the innermost matching @code{condition-case} handles the error. Within this @@ -1259,6 +1258,7 @@ should be robust if one does occur. Note that this macro uses @cindex condition name @cindex user-defined error @kindex error-conditions +@kindex define-error When you signal an error, you specify an @dfn{error symbol} to specify the kind of error you have in mind. Each error has one and only one @@ -1275,42 +1275,38 @@ Thus, each error has one or more condition names: @code{error}, the error symbol if that is distinct from @code{error}, and perhaps some intermediate classifications. - In order for a symbol to be an error symbol, it must have an -@code{error-conditions} property which gives a list of condition names. -This list defines the conditions that this kind of error belongs to. -(The error symbol itself, and the symbol @code{error}, should always be -members of this list.) Thus, the hierarchy of condition names is -defined by the @code{error-conditions} properties of the error symbols. -Because quitting is not considered an error, the value of the -@code{error-conditions} property of @code{quit} is just @code{(quit)}. +@defun define-error name message &optional parent + In order for a symbol to be an error symbol, it must be defined with +@code{define-error} which takes a parent condition (defaults to @code{error}). +This parent defines the conditions that this kind of error belongs to. +The transitive set of parents always includes the error symbol itself, and the +symbol @code{error}. Because quitting is not considered an error, the set of +parents of @code{quit} is just @code{(quit)}. +@end defun @cindex peculiar error - In addition to the @code{error-conditions} list, the error symbol -should have an @code{error-message} property whose value is a string to -be printed when that error is signaled but not handled. If the -error symbol has no @code{error-message} property or if the -@code{error-message} property exists, but is not a string, the error -message @samp{peculiar error} is used. @xref{Definition of signal}. + In addition to its parents, the error symbol has a @var{message} which +is a string to be printed when that error is signaled but not handled. If that +message is not valid, the error message @samp{peculiar error} is used. +@xref{Definition of signal}. + +Internally, the set of parents is stored in the @code{error-conditions} +property of the error symbol and the message is stored in the +@code{error-message} property of the error symbol. Here is how we define a new error symbol, @code{new-error}: @example @group -(put 'new-error - 'error-conditions - '(error my-own-errors new-error)) -@result{} (error my-own-errors new-error) -@end group -@group -(put 'new-error 'error-message "A new error") -@result{} "A new error" +(define-error 'new-error "A new error" 'my-own-errors) @end group @end example @noindent -This error has three condition names: @code{new-error}, the narrowest +This error has several condition names: @code{new-error}, the narrowest classification; @code{my-own-errors}, which we imagine is a wider -classification; and @code{error}, which is the widest of all. +classification; and all the conditions of @code{my-own-errors} which should +include @code{error}, which is the widest of all. The error string should start with a capital letter but it should not end with a period. This is for consistency with the rest of Emacs. @@ -1326,7 +1322,7 @@ your code can do this: @end group @end example - This error can be handled through any of the three condition names. + This error can be handled through any of its condition names. This example handles @code{new-error} and any other errors in the class @code{my-own-errors}: diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 44fbc66a60e..ff9d98170d1 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -217,9 +217,9 @@ over the @code{line-prefix} variable. @xref{Special Properties}. continuation to display them, computing the continuation lines can make redisplay slow. The column computation and indentation functions also become slow. Then you might find it advisable to set -@code{cache-long-line-scans} to @code{t}. +@code{cache-long-scans} to @code{t}. -@defvar cache-long-line-scans +@defvar cache-long-scans If this variable is non-@code{nil}, various indentation and motion functions, and Emacs redisplay, cache the results of scanning the buffer, and consult the cache to avoid rescanning regions of the buffer @@ -1243,6 +1243,7 @@ Type RET when done reading @node Overlays @section Overlays @cindex overlays +@c FIXME: mention intervals in this section? You can use @dfn{overlays} to alter the appearance of a buffer's text on the screen, for the sake of presentation features. An overlay is an @@ -2738,6 +2739,7 @@ differently from the default face. @end defun @cindex face alias +@cindex alias, for faces A @dfn{face alias} provides an equivalent name for a face. You can define a face alias by giving the alias symbol the @code{face-alias} property, with a value of the target face name. The following example @@ -4662,6 +4664,14 @@ and if @code{:height} is set it will have precedence over wish. @code{:max-width} and @code{:max-height} will always preserve the aspect ratio. +@item :format +ImageMagick tries to auto-detect the image type, but it isn't always +able to. By using @code{:format-type}, we can give ImageMagick a hint +to try to help it. It's used in conjunction with the +@code{image-format-suffixes} variable, which provides a mapping from +content types to file name suffixes. This is then given to +ImageMagick as a file name hint. + @item :rotation Specifies a rotation angle in degrees. diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 8e394b5d92d..8384c31a380 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -1132,14 +1132,14 @@ from the macro definition with @code{def-edebug-spec}. Adding definitions in Lisp, but @code{def-edebug-spec} makes it possible to define Edebug specifications for special forms implemented in C. -@deffn Macro def-edebug-spec macro specification +@defmac def-edebug-spec macro specification Specify which expressions of a call to macro @var{macro} are forms to be evaluated. @var{specification} should be the edebug specification. Neither argument is evaluated. The @var{macro} argument can actually be any symbol, not just a macro name. -@end deffn +@end defmac Here is a table of the possibilities for @var{specification} and how each directs processing of arguments. diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 9c013140999..e05253638d7 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -1195,6 +1195,7 @@ Text Properties Non-@acronym{ASCII} Characters * Text Representations:: How Emacs represents text. +* Disabling Multibyte:: Controlling whether to use multibyte characters. * Converting Representations:: Converting unibyte to multibyte and vice versa. * Selecting a Representation:: Treating a byte sequence as unibyte or multi. * Character Codes:: How unibyte and multibyte relate to diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi index 87cfcfa532c..8a10fbf0c47 100644 --- a/doc/lispref/errors.texi +++ b/doc/lispref/errors.texi @@ -7,12 +7,11 @@ @appendix Standard Errors @cindex standard errors - Here is a list of the more important error symbols in standard Emacs, -grouped by concept. The list includes each symbol's message (on the -@code{error-message} property of the symbol) and a cross reference to a -description of how the error can occur. + Here is a list of the more important error symbols in standard Emacs, grouped +by concept. The list includes each symbol's message and a cross reference +to a description of how the error can occur. - Each error symbol has an @code{error-conditions} property that is a + Each error symbol has an set of parent error conditions that is a list of symbols. Normally this list includes the error symbol itself and the symbol @code{error}. Occasionally it includes additional symbols, which are intermediate classifications, narrower than @@ -24,8 +23,6 @@ conditions, that means it has none. As a special exception, the error symbol @code{quit} does not have the condition @code{error}, because quitting is not considered an error. -@c You can grep for "(put 'foo 'error-conditions ...) to find -@c examples defined in Lisp. E.g., soap-client.el, sasl.el. Most of these error symbols are defined in C (mainly @file{data.c}), but some are defined in Lisp. For example, the file @file{userlock.el} defines the @code{file-locked} and @code{file-supersession} errors. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 01d2d1d6c45..370098c8b62 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -446,7 +446,7 @@ default parameters by supplying their own parameters. If you invoke Emacs with command-line options that specify frame appearance, those options take effect by adding elements to either @code{initial-frame-alist} or @code{default-frame-alist}. Options -which affect just the initial frame, such as @samp{-geometry} and +which affect just the initial frame, such as @samp{--geometry} and @samp{--maximized}, add to @code{initial-frame-alist}; the others add to @code{default-frame-alist}. @pxref{Emacs Invocation,, Command Line Arguments for Emacs Invocation, emacs, The GNU Emacs Manual}. @@ -1362,7 +1362,7 @@ Terminals}. @node Input Focus @section Input Focus @cindex input focus -@c @cindex selected frame Duplicates selected-frame +@c @cindex selected frame Duplicates selected-frame, same for selected-window. At any time, one frame in Emacs is the @dfn{selected frame}. The selected window always resides on the selected frame. @@ -2391,6 +2391,7 @@ displays returned by @code{display-mm-height} and @code{display-mm-width} in case the system provides incorrect values. @end defopt +@cindex backing store @defun display-backing-store &optional display This function returns the backing store capability of the display. Backing store means recording the pixels of windows (and parts of @@ -2402,6 +2403,7 @@ Values can be the symbols @code{always}, @code{when-mapped}, or when the question is inapplicable to a certain kind of display. @end defun +@cindex SaveUnder feature @defun display-save-under &optional display This function returns non-@code{nil} if the display supports the SaveUnder feature. That feature is used by pop-up windows diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index fcd345ef83b..39a9ff6b62c 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -580,6 +580,7 @@ redefinition from unintentional redefinition. @end defmac @cindex function aliases +@cindex alias, for functions @defun defalias name definition &optional doc @anchor{Definition of defalias} This function defines the symbol @var{name} as a function, with diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index 14601de1814..9daf01cd0a2 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi @@ -270,8 +270,10 @@ are numbered starting with zero, so the @sc{car} of @var{list} is element number zero. If the length of @var{list} is @var{n} or less, the value is @code{nil}. -If @var{n} is negative, @code{nth} returns the first element of -@var{list}. +@c Behavior for -ve n undefined since 2013/08; see bug#15059. +@ignore +If @var{n} is negative, @code{nth} returns the first element of @var{list}. +@end ignore @example @group @@ -281,10 +283,6 @@ If @var{n} is negative, @code{nth} returns the first element of @group (nth 10 '(1 2 3 4)) @result{} nil -@end group -@group -(nth -3 '(1 2 3 4)) - @result{} 1 (nth n x) @equiv{} (car (nthcdr n x)) @end group @@ -300,7 +298,8 @@ This function returns the @var{n}th @sc{cdr} of @var{list}. In other words, it skips past the first @var{n} links of @var{list} and returns what follows. -If @var{n} is zero or negative, @code{nthcdr} returns all of +@c "or negative" removed 2013/08; see bug#15059. +If @var{n} is zero, @code{nthcdr} returns all of @var{list}. If the length of @var{list} is @var{n} or less, @code{nthcdr} returns @code{nil}. @@ -314,7 +313,7 @@ If @var{n} is zero or negative, @code{nthcdr} returns all of @result{} nil @end group @group -(nthcdr -3 '(1 2 3 4)) +(nthcdr 0 '(1 2 3 4)) @result{} (1 2 3 4) @end group @end example diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi index cae14ab9a78..d94908994e9 100644 --- a/doc/lispref/markers.texi +++ b/doc/lispref/markers.texi @@ -216,11 +216,14 @@ new marker that points to the same place and the same buffer as does The new marker's insertion type is specified by the argument @var{insertion-type}. @xref{Marker Insertion Types}. +@c This behavior used to be documented until 2013/08. +@ignore If passed an integer argument less than 1, @code{copy-marker} returns a new marker that points to the beginning of the current buffer. If passed an integer argument greater than the length of the buffer, @code{copy-marker} returns a new marker that points to the end of the buffer. +@end ignore @example @group @@ -279,6 +282,8 @@ This function returns the position that @var{marker} points to, or This function returns the buffer that @var{marker} points into, or @code{nil} if it points nowhere. +@c FIXME: The `buffer' argument of `set-marker' already defaults to +@c the current buffer, why use `(current-buffer)' explicitly here? @example @group (setq m (make-marker)) @@ -349,11 +354,15 @@ This function moves @var{marker} to @var{position} in @var{buffer}. If @var{buffer} is not provided, it defaults to the current buffer. +@c This behavior used to be documented until 2013/08. +@ignore If @var{position} is less than 1, @code{set-marker} moves @var{marker} to the beginning of the buffer. If @var{position} is greater than the size of the buffer (@pxref{Point}), @code{set-marker} moves marker to -the end of the buffer. If @var{position} is @code{nil} or a marker -that points nowhere, then @var{marker} is set to point nowhere. +the end of the buffer. +@end ignore +If @var{position} is @code{nil} or a marker that points nowhere, then +@var{marker} is set to point nowhere. The value returned is @var{marker}. @@ -384,7 +393,7 @@ This is another name for @code{set-marker}. @node The Mark @section The Mark @cindex mark, the -@cindex mark ring +@c @cindex the mark? Each buffer has a special marker, which is designated @dfn{the mark}. When a buffer is newly created, this marker exists but does @@ -423,6 +432,7 @@ the mark is active. This is the main motivation for using Transient Mark mode. (Another is that this enables highlighting of the region when the mark is active. @xref{Display}.) +@cindex mark ring In addition to the mark, each buffer has a @dfn{mark ring} which is a list of markers containing previous values of the mark. When editing commands change the mark, they should normally save the old value of the @@ -644,7 +654,12 @@ more marks than this are pushed onto the @code{mark-ring}, @node The Region @section The Region -@cindex region (between point and mark) +@c The index entry must be just ``region'' to make it the first hit +@c when the user types ``i region RET'', because otherwise the Info +@c reader will present substring matches in alphabetical order, +@c putting this one near the end, with something utterly unrelated as +@c the first hit. +@cindex region The text between point and the mark is known as @dfn{the region}. Various functions operate on text delimited by point and the mark, but @@ -668,6 +683,7 @@ integer). This is the position of either point or the mark, whichever is larger. @end defun +@c FIXME: Mention it in tips.texi? Instead of using @code{region-beginning} and @code{region-end}, a command designed to operate on a region should normally use @code{interactive} with the @samp{r} specification to find the @@ -680,6 +696,8 @@ mark is active, and there is a valid region in the buffer. This function is intended to be used by commands that operate on the region, instead of on text near point, when the mark is active. +@cindex empty region +@vindex use-empty-active-region A region is valid if it has a non-zero size, or if the user option @code{use-empty-active-region} is non-@code{nil} (by default, it is @code{nil}). The function @code{region-active-p} is similar to diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 59729380ea7..180fef7241d 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -3381,6 +3381,7 @@ of Lisp sexps and adapts it to non-Lisp languages. @node SMIE @subsection Simple Minded Indentation Engine +@cindex SMIE SMIE is a package that provides a generic navigation and indentation engine. Based on a very simple parser using an ``operator precedence @@ -3548,6 +3549,8 @@ simply ignored. @node SMIE Grammar @subsubsection Defining the Grammar of a Language +@cindex SMIE grammar +@cindex grammar, SMIE The usual way to define the SMIE grammar of a language is by defining a new global variable that holds the precedence table by @@ -3623,6 +3626,8 @@ formally as left associative. @node SMIE Lexer @subsubsection Defining Tokens +@cindex SMIE lexer +@cindex defining tokens, SMIE SMIE comes with a predefined lexical analyzer which uses syntax tables in the following way: any sequence of characters that have word or @@ -3757,6 +3762,7 @@ surrounding text to find ad-hoc clues. @node SMIE Indentation @subsubsection Specifying Indentation Rules +@cindex indentation rules, SMIE Based on the provided grammar, SMIE will be able to provide automatic indentation without any extra effort. But in practice, this default diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index b8b62325bb4..090310c5545 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -13,6 +13,7 @@ how they are stored in strings and buffers. @menu * Text Representations:: How Emacs represents text. +* Disabling Multibyte:: Controlling whether to use multibyte characters. * Converting Representations:: Converting unibyte to multibyte and vice versa. * Selecting a Representation:: Treating a byte sequence as unibyte or multi. * Character Codes:: How unibyte and multibyte relate to @@ -140,6 +141,55 @@ This function concatenates all its argument @var{bytes} and makes the result a unibyte string. @end defun +@node Disabling Multibyte +@section Disabling Multibyte Characters +@cindex disabling multibyte + + By default, Emacs starts in multibyte mode: it stores the contents +of buffers and strings using an internal encoding that represents +non-@acronym{ASCII} characters using multi-byte sequences. Multibyte +mode allows you to use all the supported languages and scripts without +limitations. + +@cindex turn multibyte support on or off + Under very special circumstances, you may want to disable multibyte +character support, for a specific buffer. +When multibyte characters are disabled in a buffer, we call +that @dfn{unibyte mode}. In unibyte mode, each character in the +buffer has a character code ranging from 0 through 255 (0377 octal); 0 +through 127 (0177 octal) represent @acronym{ASCII} characters, and 128 +(0200 octal) through 255 (0377 octal) represent non-@acronym{ASCII} +characters. + + To edit a particular file in unibyte representation, visit it using +@code{find-file-literally}. @xref{Visiting Functions}. You can +convert a multibyte buffer to unibyte by saving it to a file, killing +the buffer, and visiting the file again with +@code{find-file-literally}. Alternatively, you can use @kbd{C-x +@key{RET} c} (@code{universal-coding-system-argument}) and specify +@samp{raw-text} as the coding system with which to visit or save a +file. @xref{Text Coding, , Specifying a Coding System for File Text, +emacs, GNU Emacs Manual}. Unlike @code{find-file-literally}, finding +a file as @samp{raw-text} doesn't disable format conversion, +uncompression, or auto mode selection. + +@c See http://debbugs.gnu.org/11226 for lack of unibyte tooltip. +@vindex enable-multibyte-characters +The buffer-local variable @code{enable-multibyte-characters} is +non-@code{nil} in multibyte buffers, and @code{nil} in unibyte ones. +The mode line also indicates whether a buffer is multibyte or not. +With a graphical display, in a multibyte buffer, the portion of the +mode line that indicates the character set has a tooltip that (amongst +other things) says that the buffer is multibyte. In a unibyte buffer, +the character set indicator is absent. Thus, in a unibyte buffer +(when using a graphical display) there is normally nothing before the +indication of the visited file's end-of-line convention (colon, +backslash, etc.), unless you are using an input method. + +@findex toggle-enable-multibyte-characters +You can turn off multibyte support in a specific buffer by invoking the +command @code{toggle-enable-multibyte-characters} in that buffer. + @node Converting Representations @section Converting Text Representations @@ -962,6 +1012,7 @@ The value of the @code{:mime-charset} property is also defined as an alias for the coding system. @end defun +@cindex alias, for coding systems @defun coding-system-aliases coding-system This function returns the list of aliases of @var{coding-system}. @end defun diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index e8b6166f63c..69f1b80c431 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -5,6 +5,7 @@ @node Positions @chapter Positions @cindex position (in buffer) +@cindex buffer position A @dfn{position} is the index of a character in the text of a buffer. More precisely, a position identifies the place between two characters @@ -146,9 +147,13 @@ that. @deffn Command goto-char position This function sets point in the current buffer to the value -@var{position}. If @var{position} is less than 1, it moves point to the -beginning of the buffer. If @var{position} is greater than the length -of the buffer, it moves point to the end. +@var{position}. +@c This behavior used to be documented until 2013/08. +@ignore +If @var{position} is less than 1, it moves point to the beginning of +the buffer. If @var{position} is greater than the length of the +buffer, it moves point to the end. +@end ignore If narrowing is in effect, @var{position} still counts from the beginning of the buffer, but point cannot go outside the accessible @@ -191,8 +196,8 @@ whether a given character is part of a word. @xref{Syntax Tables}. @deffn Command forward-word &optional count This function moves point forward @var{count} words (or backward if -@var{count} is negative). If @var{count} is @code{nil}, it moves -forward one word. +@var{count} is negative). If @var{count} is omitted or @code{nil}, it +defaults to 1. ``Moving one word'' means moving until point crosses a word-constituent character and then encounters a word-separator @@ -210,7 +215,7 @@ If @code{inhibit-field-text-motion} is non-@code{nil}, this function ignores field boundaries. In an interactive call, @var{count} is specified by the numeric prefix -argument. If @var{count} is omitted or @code{nil}, it defaults to 1. +argument. @end deffn @deffn Command backward-word &optional count @@ -483,7 +488,7 @@ Display}. These functions scan text to determine where screen lines break, and thus take time proportional to the distance scanned. If you intend to use them heavily, Emacs provides caches which may improve the -performance of your code. @xref{Truncation, cache-long-line-scans}. +performance of your code. @xref{Truncation, cache-long-scans}. @defun vertical-motion count &optional window This function moves point to the start of the screen line @var{count} @@ -805,7 +810,7 @@ thousands of times in the Lisp sources of Emacs. buffer, use @code{save-current-buffer} or @code{with-current-buffer} instead (@pxref{Current Buffer}). If you need to save or restore window configurations, see the forms described in @ref{Window -Configurations} and in @ref{Frame Configurations}. +Configurations} and in @ref{Frame Configurations}. @c frameset? @defspec save-excursion body@dots{} @cindex mark excursion diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 7cace70ad07..c4250f2f0ba 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -240,6 +240,7 @@ Major and minor modes can add functions to copied out of the buffer. @end defun +@c FIXME: `filter-buffer-substring-function' should be documented. @defvar filter-buffer-substring-functions This variable is a wrapper hook (@pxref{Running Hooks}), whose members should be functions that accept four arguments: @var{fun}, @@ -365,7 +366,8 @@ not relocate the marker, depending on the marker's insertion type the inserted text, regardless of the markers' insertion type. Insertion functions signal an error if the current buffer is -read-only or if they insert within read-only text. +read-only (@pxref{Read Only Buffers}) or if they insert within +read-only text (@pxref{Special Properties}). These functions copy text characters from strings and buffers along with their properties. The inserted characters have exactly the same @@ -421,10 +423,10 @@ insertion point. @xref{Sticky Properties}. @defun insert-buffer-substring from-buffer-or-name &optional start end This function inserts a portion of buffer @var{from-buffer-or-name} -(which must already exist) into the current buffer before point. The -text inserted is the region between @var{start} and @var{end}. (These -arguments default to the beginning and end of the accessible portion of -that buffer.) This function returns @code{nil}. +into the current buffer before point. The text inserted is the region +between @var{start} (inclusive) and @var{end} (exclusive). (These +arguments default to the beginning and end of the accessible portion +of that buffer.) This function returns @code{nil}. In this example, the form is executed with buffer @samp{bar} as the current buffer. We assume that buffer @samp{bar} is initially empty. @@ -482,6 +484,7 @@ it except to install it on a keymap. In an interactive call, @var{count} is the numeric prefix argument. +@c FIXME: This variable is obsolete since 23.1. Self-insertion translates the input character through @code{translation-table-for-input}. @xref{Translation of Characters}. @@ -776,6 +779,7 @@ is deleted. If point is on a nonblank line, the command deletes all blank lines immediately following it. A blank line is defined as a line containing only tabs and spaces. +@c and the Newline character? @code{delete-blank-lines} returns @code{nil}. @end deffn @@ -920,6 +924,7 @@ processes the text according to @code{yank-handled-properties} and text anyway.) @end defun +@c FIXME: Add an index for yank-handler. If you put a @code{yank-handler} text property on all or part of a string, that alters how @code{insert-for-yank} inserts the string. If different parts of the string have different @code{yank-handler} @@ -1284,8 +1289,8 @@ This is an extensible undo item, which is undone by calling @item (apply @var{delta} @var{beg} @var{end} @var{funname} . @var{args}) This is an extensible undo item, which records a change limited to the range @var{beg} to @var{end}, which increased the size of the buffer -by @var{delta}. It is undone by calling @var{funname} with arguments -@var{args}. +by @var{delta} characters. It is undone by calling @var{funname} with +arguments @var{args}. This kind of element enables undo limited to a region to determine whether the element pertains to that region. @@ -1376,7 +1381,8 @@ possible to undo either previous changes or any subsequent changes. If the undo list of @var{buffer-or-name} is already disabled, this function has no effect. -This function returns @code{nil}. +In an interactive call, BUFFER-OR-NAME is the current buffer. You +cannot specify any other buffer. This function returns @code{nil}. @end deffn As editing continues, undo lists get longer and longer. To prevent @@ -1493,6 +1499,7 @@ the header lines. If @var{citation-regexp} is a string, it is used as a regular expression; if it matches the beginning of a line, that line is treated as a citation marker. +@c FIXME: "That mode" is confusing. It isn't a major/minor mode. Ordinarily, @code{fill-individual-paragraphs} regards each change in indentation as starting a new paragraph. If @code{fill-individual-varying-indent} is non-@code{nil}, then only @@ -1606,11 +1613,13 @@ Manual}. @defvar use-hard-newlines If this variable is non-@code{nil}, the filling functions do not delete newlines that have the @code{hard} text property. These ``hard -newlines'' act as paragraph separators. +newlines'' act as paragraph separators. @xref{Hard and Soft +Newlines,, Hard and Soft Newlines, emacs, The GNU Emacs Manual}. @end defvar @node Margins @section Margins for Filling +@cindex margins, filling @defopt fill-prefix This buffer-local variable, if non-@code{nil}, specifies a string of @@ -1800,6 +1809,7 @@ prefix or @code{nil}, meaning it has failed to determine a prefix. @cindex filling, automatic @cindex Auto Fill mode +@c FIXME: I don't think any of the variables below is a/an normal/abnormal hook. Auto Fill mode is a minor mode that fills lines automatically as text is inserted. This section describes the hook used by Auto Fill mode. For a description of functions that you can call explicitly to fill and @@ -1941,10 +1951,10 @@ its @code{sort-subr} call looks like this: @group (sort-subr reverse (function - (lambda () - (while (and (not (eobp)) - (looking-at paragraph-separate)) - (forward-line 1)))) + (lambda () + (while (and (not (eobp)) + (looking-at paragraph-separate)) + (forward-line 1)))) 'forward-paragraph) @end group @end example @@ -2130,9 +2140,12 @@ line and point. When called interactively, @var{column} is the value of prefix numeric argument. If @var{column} is not an integer, an error is signaled. +@c This behavior used to be documented until 2013/08. +@ignore If column @var{column} is beyond the end of the line, point moves to the end of the line. If @var{column} is negative, point moves to the beginning of the line. +@end ignore If it is impossible to move to column @var{column} because that is in the middle of a multicolumn character such as a tab, point moves to the @@ -2341,6 +2354,8 @@ code. For example, if @var{count} is 3, this command adds 3 columns of indentation to each of the lines beginning in the region specified. +@c FIXME: I suggest using message-indent-citation as the example, or +@c just remove this paragraph. --xfq In Mail mode, @kbd{C-c C-y} (@code{mail-yank-original}) uses @code{indent-rigidly} to indent the text copied from the message being replied to. @@ -2518,7 +2533,7 @@ This is the contents of the 5th foo. @end group @group -(capitalize-region 1 44) +(capitalize-region 1 37) @result{} nil ---------- Buffer: foo ---------- @@ -3024,6 +3039,7 @@ Point}. @table @code @cindex property category of text character +@c FIXME: Isn't @kindex for keyboard commands? @kindex category @r{(text property)} @item category If a character has a @code{category} property, we call it the @@ -4012,6 +4028,7 @@ A rectangle is represented by a list of strings. This represents a window configuration to restore in one frame, and a position to jump to in the current buffer. +@c FIXME: Mention frameset here. @item @code{(@var{frame-configuration} @var{position})} This represents a frame configuration to restore, and a position to jump to in the current buffer. diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 4a38fa9ccd5..557add738ba 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1838,6 +1838,7 @@ updates this list. @node Variable Aliases @section Variable Aliases @cindex variable aliases +@cindex alias, for variables It is sometimes useful to make two variables synonyms, so that both variables always have the same value, and changing either one also diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 1f65f687014..13c9ca53222 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -2244,8 +2244,9 @@ window and defaults to the selected one. Each list element has the form @code{(@var{buffer} @var{window-start} @var{window-pos})}, where @var{buffer} is a buffer previously shown in -the window, @var{window-start} is the window start position when that -buffer was last shown, and @var{window-pos} is the point position when +the window, @var{window-start} is the window start position +(@pxref{Window Start and End}) when that buffer was last shown, and +@var{window-pos} is the point position (@pxref{Window Point}) when that buffer was last shown in @var{window}. The list is ordered so that earlier elements correspond to more @@ -2328,10 +2329,11 @@ same frame. The following option can be used to override this behavior. @defopt switch-to-visible-buffer If this variable is non-@code{nil}, @code{switch-to-prev-buffer} and @code{switch-to-next-buffer} may switch to a buffer that is already -visible on the same frame, provided the buffer was shown in the relevant -window before. If it is @code{nil}, @code{switch-to-prev-buffer} and -@code{switch-to-next-buffer} always try to avoid switching to a buffer -that is already visible in another window on the same frame. +visible on the same frame, provided the buffer was shown in the +relevant window before. If it is @code{nil}, +@code{switch-to-prev-buffer} and @code{switch-to-next-buffer} always +try to avoid switching to a buffer that is already visible in another +window on the same frame. The default is @code{t}. @end defopt @@ -2362,6 +2364,7 @@ showing another buffer in that frame's only window. The function @code{replace-buffer-in-windows} (@pxref{Buffers and Windows}) which is called when a buffer gets killed, deletes the window in case (1) and behaves like @code{delete-windows-on} otherwise. +@c FIXME: Does replace-buffer-in-windows _delete_ a window in case (1)? When @code{bury-buffer} (@pxref{The Buffer List}) operates on the selected window (which shows the buffer that shall be buried), it @@ -2566,6 +2569,7 @@ so @code{window-point} will stay behind text inserted there. @node Window Start and End @section The Window Start and End Positions @cindex window start position +@cindex display-start position Each window maintains a marker used to keep track of a buffer position that specifies where in the buffer display should start. This position @@ -3191,6 +3195,7 @@ The value returned is @var{columns}. Here is how you can determine whether a given position @var{position} is off the screen due to horizontal scrolling: +@c FIXME: Maybe hscroll-on-screen-p is a better name? @example @group (defun hscroll-on-screen (window position) |