aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2014-06-01 17:18:22 -0700
committerGlenn Morris <[email protected]>2014-06-01 17:18:22 -0700
commit953e106ac84587e765244995687b088969b5f6e1 (patch)
treea4d54b892e04b9123bc79ecffd69310f5807399e /doc
parenteed652d649d28e9dafdb01f9c7425d7d28899e0d (diff)
parentafca0e759015ebc753b0c343ac45ac476dd31e9d (diff)
Merge from emacs-24; up to 2014-05-29T17:16:[email protected]
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog7
-rw-r--r--doc/emacs/abbrevs.texi5
-rw-r--r--doc/emacs/macos.texi23
-rw-r--r--doc/lispref/ChangeLog8
-rw-r--r--doc/lispref/abbrevs.texi39
-rw-r--r--doc/lispref/functions.texi8
-rw-r--r--doc/lispref/hooks.texi2
-rw-r--r--doc/lispref/text.texi65
8 files changed, 89 insertions, 68 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index db310ea37b..2a46642f0d 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,10 @@
+2014-06-02 Glenn Morris <[email protected]>
+
+ * macos.texi (Mac / GNUstep Customization): Mention ns custom group.
+ (Customization options specific to Mac OS / GNUstep): Remove section.
+
+ * abbrevs.texi (Expanding Abbrevs): Update re abbrev-expand-function.
+
2014-05-26 Eli Zaretskii <[email protected]>
* frames.texi (Fonts): Clarify which frames are affected by
diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi
index 80a98ac316..4d46a5d8f5 100644
--- a/doc/emacs/abbrevs.texi
+++ b/doc/emacs/abbrevs.texi
@@ -206,8 +206,9 @@ to turn on Abbrev mode first. It may also be useful together with a
special set of abbrev definitions for making several global replacements at
once. This command is effective even if Abbrev mode is not enabled.
- Expanding any abbrev runs @code{abbrev-expand-functions}, a special
-hook. Functions in this special hook can make arbitrary changes to
+ The function @code{expand-abbrev} performs the expansion by calling
+the function that @code{abbrev-expand-function} specifies. By
+changing this function you can make arbitrary changes to
the abbrev expansion. @xref{Abbrev Expansion,,, elisp, The Emacs Lisp
Reference Manual}.
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index eb2d96e9af..2177ad4e21 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -90,9 +90,10 @@ of setting PATH is recommended on Mac OS X 10.5 and later, using the
@node Mac / GNUstep Customization
@section Mac / GNUstep Customization
-Emacs can be customized in several ways in addition to the standard
-customization buffers and the Options menu.
-
+There are a few customization options that are specific to the
+Nextstep port. For example, they affect things such as the modifier
+keys and the fullscreen behavior. To see all such options, use
+@kbd{M-x customize-group @key{RET} ns @key{RET}}.
@subsection Font and Color Panels
@@ -116,16 +117,14 @@ close the altered one.
Useful in this context is the listing of all faces obtained by
@kbd{M-x list-faces-display}.
-@subsection Customization options specific to Mac OS / GNUstep
-
-The following customization options are specific to the Nextstep port.
+@cindex Core Text, on Mac OS X
+In Mac OS X 10.5 and later, Emacs uses a Core Text based font backend
+by default. If you prefer the older font style, enter the following
+at the command-line before starting Emacs:
-@table @code
-@item ns-auto-hide-menu-bar
-Non-nil means the menu-bar is hidden by default, but appears if you
-move the mouse pointer over it. (Requires Mac OS X 10.6 or later.)
-
-@end table
+@example
+% defaults write org.gnu.Emacs FontBackend ns
+@end example
@node Mac / GNUstep Events
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index e810e75a80..9099d69ab3 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,11 @@
+2014-06-02 Glenn Morris <[email protected]>
+
+ * text.texi (Buffer Contents):
+ Update for filter-buffer-substring changes.
+
+ * abbrevs.texi (Abbrev Expansion): Update for expand-abbrev changes.
+ * functions.texi (Advising Functions): Standardize menu case.
+
2014-05-26 Eli Zaretskii <[email protected]>
* display.texi (Invisible Text): Clarify the description of
diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi
index 45c2c4c17f..73a3f5f1e0 100644
--- a/doc/lispref/abbrevs.texi
+++ b/doc/lispref/abbrevs.texi
@@ -257,13 +257,16 @@ as in @code{abbrev-symbol}.
@deffn Command expand-abbrev
This command expands the abbrev before point, if any. If point does not
-follow an abbrev, this command does nothing. The command returns the
-abbrev symbol if it did expansion, @code{nil} otherwise.
-
-If the abbrev symbol has a hook function that is a symbol whose
-@code{no-self-insert} property is non-@code{nil}, and if the hook
-function returns @code{nil} as its value, then @code{expand-abbrev}
-returns @code{nil} even though expansion did occur.
+follow an abbrev, this command does nothing. To do the expansion, it
+calls the function that is the value of the @code{abbrev-expand-function}
+variable, with no arguments, and returns whatever that function does.
+
+The default expansion function returns the abbrev symbol if it did
+expansion, and @code{nil} otherwise. If the abbrev symbol has a hook
+function that is a symbol whose @code{no-self-insert} property is
+non-@code{nil}, and if the hook function returns @code{nil} as its
+value, then the default expansion function returns @code{nil},
+even though expansion did occur.
@end deffn
@defun abbrev-insert abbrev &optional name start end
@@ -331,24 +334,21 @@ has already been unexpanded. This contains information left by
@code{expand-abbrev} for the sake of the @code{unexpand-abbrev} command.
@end defvar
-@defvar abbrev-expand-functions
-This is a wrapper hook (@pxref{Running Hooks}) run around the
-@code{expand-abbrev} function. Each function on this hook is called
-with a single argument: a function that performs the normal abbrev
-expansion. The hook function can hence do anything it wants before
-and after performing the expansion. It can also choose not to call
-its argument, thus overriding the default behavior; or it may even
-call it several times. The function should return the abbrev symbol
-if expansion took place.
+@defvar abbrev-expand-function
+The value of this variable is a function that @code{expand-abbrev}
+will call with no arguments to do the expansion. The function can do
+anything it wants before and after performing the expansion.
+It should return the abbrev symbol if expansion took place.
@end defvar
The following sample code shows a simple use of
-@code{abbrev-expand-functions}. It assumes that @code{foo-mode} is a
+@code{abbrev-expand-function}. It assumes that @code{foo-mode} is a
mode for editing certain files in which lines that start with @samp{#}
are comments. You want to use Text mode abbrevs for those lines. The
regular local abbrev table, @code{foo-mode-abbrev-table} is
appropriate for all other lines. @xref{Standard Abbrev Tables}, for the
definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}.
+@xref{Advising Functions}, for details of @code{add-function}.
@smallexample
(defun foo-mode-abbrev-expand-function (expand)
@@ -361,9 +361,8 @@ definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}.
(add-hook 'foo-mode-hook
#'(lambda ()
- (add-hook 'abbrev-expand-functions
- 'foo-mode-abbrev-expand-function
- nil t)))
+ (add-function :around (local 'abbrev-expand-function)
+ #'foo-mode-abbrev-expand-function)))
@end smallexample
@node Standard Abbrev Tables
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 52994a5585..91fdcc63cb 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1207,10 +1207,10 @@ specify how the two functions are composed, since there are many different
ways to do it. The added function is also called an @emph{advice}.
@menu
-* Core Advising Primitives:: Primitives to Manipulate Advices
-* Advising Named Functions:: Advising Named Functions
-* Advice combinators:: Ways to compose advices
-* Porting old advices:: Adapting code using the old defadvice
+* Core Advising Primitives:: Primitives to manipulate advice.
+* Advising Named Functions:: Advising named functions.
+* Advice combinators:: Ways to compose advice.
+* Porting old advices:: Adapting code using the old defadvice.
@end menu
@node Core Advising Primitives
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index 79704f3c50..9408174872 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -240,11 +240,9 @@ choose-completion-string-functions
completing-read-function
completion-annotate-function
completion-at-point-functions
-completion-in-region-functions
completion-list-insert-choice-function
deactivate-current-input-method-function
describe-current-input-method-function
-filter-buffer-substring-functions
font-lock-function
menu-bar-select-buffer-function
read-file-name-function
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 3c70f5f96b..4c3286adbf 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -220,15 +220,17 @@ the current buffer, as a string.
@end defun
@defun filter-buffer-substring start end &optional delete
-This function passes the buffer text between @var{start} and @var{end}
-through the filter functions specified by the wrapper hook
-@code{filter-buffer-substring-functions}, and returns the result. The
-obsolete variable @code{buffer-substring-filters} is also consulted.
-If both of these variables are @code{nil}, the value is the unaltered
-text from the buffer, i.e., what @code{buffer-substring} would
-return.
-
-If @var{delete} is non-@code{nil}, this function deletes the text
+This function filters the buffer text between @var{start} and @var{end}
+using a function specified by the variable
+@code{filter-buffer-substring-function}, and returns the result.
+
+The default filter function consults the obsolete wrapper hook
+@code{filter-buffer-substring-functions}, and the obsolete variable
+@code{buffer-substring-filters}. If both of these are @code{nil}, it
+returns the unaltered text from the buffer, i.e., what
+@code{buffer-substring} would return.
+
+If @var{delete} is non-@code{nil}, the function deletes the text
between @var{start} and @var{end} after copying it, like
@code{delete-and-extract-region}.
@@ -236,20 +238,29 @@ Lisp code should use this function instead of @code{buffer-substring},
@code{buffer-substring-no-properties},
or @code{delete-and-extract-region} when copying into user-accessible
data structures such as the kill-ring, X clipboard, and registers.
-Major and minor modes can add functions to
-@code{filter-buffer-substring-functions} to alter such text as it is
-copied out of the buffer.
+Major and minor modes can modify @code{filter-buffer-substring-function}
+to alter such text as it is copied out of the buffer.
@end defun
-@c FIXME: `filter-buffer-substring-function' should be documented.
+@defvar filter-buffer-substring-function
+The value of this variable is a function that @code{filter-buffer-substring}
+will call to do the actual work. The function receives three
+arguments, the same as those of @code{filter-buffer-substring},
+which it should treat as per the documentation of that function. It
+should return the filtered text (and optionally delete the source text).
+@end defvar
+
+@noindent The following two variables are obsoleted by
+@code{filter-buffer-substring-function}, but are still supported for
+backward compatibility.
+
@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},
-@var{start}, @var{end}, and @var{delete}. @var{fun} is a function
-that takes three arguments (@var{start}, @var{end}, and @var{delete}),
-and returns a string. In both cases, the @var{start}, @var{end}, and
-@var{delete} arguments are the same as those of
-@code{filter-buffer-substring}.
+This obsolete variable is a wrapper hook, whose members should be functions
+that accept four arguments: @var{fun}, @var{start}, @var{end}, and
+@var{delete}. @var{fun} is a function that takes three arguments
+(@var{start}, @var{end}, and @var{delete}), and returns a string. In
+both cases, the @var{start}, @var{end}, and @var{delete} arguments are
+the same as those of @code{filter-buffer-substring}.
The first hook function is passed a @var{fun} that is equivalent to
the default operation of @code{filter-buffer-substring}, i.e., it
@@ -263,14 +274,12 @@ hook functions acting in sequence.
@end defvar
@defvar buffer-substring-filters
-This variable is obsoleted by
-@code{filter-buffer-substring-functions}, but is still supported for
-backward compatibility. Its value should should be a list of
-functions which accept a single string argument and return another
-string. @code{filter-buffer-substring} passes the buffer substring to
-the first function in this list, and the return value of each function
-is passed to the next function. The return value of the last function
-is passed to @code{filter-buffer-substring-functions}.
+The value of this obsolete variable should be a list of functions
+that accept a single string argument and return another string.
+The default @code{filter-buffer-substring} function passes the buffer
+substring to the first function in this list, and the return value of
+each function is passed to the next function. The return value of the
+last function is passed to @code{filter-buffer-substring-functions}.
@end defvar
@defun current-word &optional strict really-word