Commit 96e05507 authored by Glenn Morris's avatar Glenn Morris
Browse files

Merge from emacs-24; up to 2012-11-13T18:57:26Z!dgutov@yandex.ru

parents 3d082a26 cdc5d88c
2012-11-16 Martin Rudalics <rudalics@gmx.at>
* windows.texi (Choosing Window): Rewrite description of
display-buffer-alist (Bug#12167).
(Display Action Functions): Mention inhibit-switch-frame. Fix
description of display-buffer-below-selected. Reorder actions.
Add example (Bug#12848).
2012-11-16 Glenn Morris <rgm@gnu.org>
* display.texi (Face Attributes): Fix :underline COLOR description.
(Attribute Functions): Update for set-face-underline rename.
Tweak descriptions of face-underline-p, face-inverse-video-p.
* keymaps.texi (Searching Keymaps, Tool Bar): Untabify examples,
so they align better in info.
(Active Keymaps, Searching Keymaps, Controlling Active Maps):
Document set-temporary-overlay-map.
2012-11-15 Stefan Monnier <monnier@iro.umontreal.ca>
* keymaps.texi (Translation Keymaps): Add a subsection "Interaction
......
......@@ -2009,12 +2009,11 @@ Don't underline.
Underline with the foreground color of the face.
@item @var{color}
Underline in color @var{color}; which should be either a string
specifying a color, or the symbol @code{foreground-color}, meaning the
foreground color of the face.
Underline in color @var{color}, a string specifying a color.
@item @code{(:color @var{color} :style @var{style})}
@var{color} is as described above. Omitting the attribute
@var{color} is either a string, or the symbol @code{foreground-color},
meaning the foreground color of the face. Omitting the attribute
@code{:color} means to use the foreground color of the face.
@var{style} should be a symbol @code{line} or @code{wave}, meaning to
use a straight or wavy line. Omitting the attribute @code{:style}
......@@ -2404,7 +2403,7 @@ This sets the @code{:slant} attribute of @var{face} to @var{normal} if
@var{italic-p} is @code{nil}, and to @var{italic} otherwise.
@end defun
@defun set-face-underline-p face underline &optional frame
@defun set-face-underline face underline &optional frame
This sets the @code{:underline} attribute of @var{face} to
@var{underline}.
@end defun
......@@ -2467,12 +2466,16 @@ attribute of @var{face} is @code{italic} or @code{oblique}, and
@code{nil} otherwise.
@end defun
@c Note the weasel words. A face that inherits from an underlined
@c face but does not specify :underline will return nil.
@defun face-underline-p face &optional frame
This function returns the @code{:underline} attribute of face @var{face}.
This function returns non-@code{nil} if face @var{face} specifies
a non-@code{nil} @code{:underline} attribute.
@end defun
@defun face-inverse-video-p face &optional frame
This function returns the @code{:inverse-video} attribute of face @var{face}.
This function returns non-@code{nil} if face @var{face} specifies
a non-@code{nil} @code{:inverse-video} attribute.
@end defun
@node Displaying Faces
......
......@@ -664,7 +664,9 @@ additional active keymaps through the variable
The highest precedence normal keymap comes from the @code{keymap}
text or overlay property. If that is non-@code{nil}, it is the first
keymap to be processed, in normal circumstances.
keymap to be processed, in normal circumstances. Next comes
any keymap added by the function @code{set-temporary-overlay-map}.
@xref{Controlling Active Maps}.
However, there are also special ways for programs to substitute
other keymaps for some of those. The variable
......@@ -753,12 +755,13 @@ them:
(overriding-local-map
(@var{find-in} overriding-local-map))
((or (@var{find-in} (get-char-property (point) 'keymap))
(@var{find-in-any} emulation-mode-map-alists)
(@var{find-in-any} minor-mode-overriding-map-alist)
(@var{find-in-any} minor-mode-map-alist)
(if (get-text-property (point) 'local-map)
(@var{find-in} (get-char-property (point) 'local-map))
(@var{find-in} (current-local-map))))))
(@var{find-in} @var{temp-map})
(@var{find-in-any} emulation-mode-map-alists)
(@var{find-in-any} minor-mode-overriding-map-alist)
(@var{find-in-any} minor-mode-map-alist)
(if (get-text-property (point) 'local-map)
(@var{find-in} (get-char-property (point) 'local-map))
(@var{find-in} (current-local-map))))))
(@var{find-in} (current-global-map)))
@end lisp
......@@ -770,7 +773,8 @@ Lookup}.) If the key sequence starts with a mouse event, or a
symbolic prefix event followed by a mouse event, that event's position
is used instead of point and the current buffer. Mouse events on an
embedded string use non-@code{nil} text properties from that string
instead of the buffer.
instead of the buffer. @var{temp-map} is a pseudo variable that
represents the effect of a @code{set-temporary-overlay-map} call.
When a match is found (@pxref{Key Lookup}), if the binding in the
keymap is a function, the search is over. However if the keymap entry
......@@ -950,6 +954,21 @@ are used before @code{minor-mode-map-alist} and
@code{minor-mode-overriding-map-alist}.
@end defvar
@defun set-temporary-overlay-map keymap &optional keep
This function adds @var{keymap} as a temporary keymap that takes
precedence over most other keymaps. It does not take precedence over
the ``overriding'' maps (see above); and unlike them, if no match for
a key is found in @var{keymap}, the search continues.
Normally, @var{keymap} is used only once. If the optional argument
@var{pred} is @code{t}, the map stays active if a key from @var{keymap}
is used. @var{pred} can also be a function of no arguments: if it returns
non-@code{nil} then @var{keymap} stays active.
For a pseudo-Lisp description of exactly how and when this keymap applies,
@pxref{Searching Keymaps}.
@end defun
@node Key Lookup
@section Key Lookup
@cindex key lookup
......@@ -2648,8 +2667,8 @@ By default, the global map binds @code{[tool-bar]} as follows:
@example
(global-set-key [tool-bar]
`(menu-item ,(purecopy "tool bar") ignore
:filter tool-bar-make-keymap))
`(menu-item ,(purecopy "tool bar") ignore
:filter tool-bar-make-keymap))
@end example
@noindent
......
......@@ -1766,6 +1766,7 @@ Like @code{switch-to-buffer}, this function updates the buffer list
unless @var{norecord} is non-@code{nil}.
@end deffn
@node Choosing Window
@section Choosing a Window for Display
......@@ -1851,10 +1852,14 @@ default value is empty, i.e. @code{(nil . nil)}.
@end defvar
@defopt display-buffer-alist
The value of this option is an alist mapping regular expressions to
display actions. If the name of the buffer passed to
@code{display-buffer} matches a regular expression in this alist, then
@code{display-buffer} uses the corresponding display action.
The value of this option is an alist mapping conditions to display
actions. Each condition may be either a regular expression matching a
buffer name or a function that takes two arguments - a buffer name and
the @var{action} argument passed to @code{display-buffer}. If the name
of the buffer passed to @code{display-buffer} either matches a regular
expression in this alist or the function specified by a condition
returns non-@code{nil}, then @code{display-buffer} uses the
corresponding display action to display the buffer.
@end defopt
@defopt display-buffer-base-action
......@@ -1868,6 +1873,7 @@ This display action specifies the fallback behavior for
@code{display-buffer} if no other display actions are given.
@end defvr
@node Display Action Functions
@section Action Functions for @code{display-buffer}
......@@ -1911,8 +1917,9 @@ normally searches just the selected frame; however, if the variable
@code{pop-up-frames} is non-@code{nil}, it searches all frames on the
current terminal. @xref{Choosing Window Options}.
If this function chooses a window on another frame, it makes that
frame visible and raises it if necessary.
If this function chooses a window on another frame, it makes that frame
visible and, unless @var{alist} contains an @code{inhibit-switch-frame}
entry (@pxref{Choosing Window Options}), raises that frame if necessary.
@end defun
@defun display-buffer-pop-up-frame buffer alist
......@@ -1976,16 +1983,12 @@ reason (e.g. if there is just one frame and it has an
@code{unsplittable} frame parameter; @pxref{Buffer Parameters}).
@end defun
@defun display-buffer-use-some-window buffer alist
This function tries to display @var{buffer} by choosing an existing
window and displaying the buffer in that window. It can fail if all
windows are dedicated to another buffer (@pxref{Dedicated Windows}).
@end defun
@defun display-buffer-below-selected buffer alist
This function tries to display @var{buffer} in a window below the
selected window. This means to either split the selected window or
reuse the window below the selected one.
selected window. This means to either split the selected window or use
the window below the selected one. If it does create a new window, it
will also adjust its size provided @var{alist} contains a suitable
@code{window-height} or @code{window-width} entry, see above.
@end defun
@defun display-buffer-in-previous-window buffer alist
......@@ -2001,6 +2004,83 @@ specified by that entry will override any other window found by the
methods above, even if that window never showed @var{buffer} before.
@end defun
@defun display-buffer-use-some-window buffer alist
This function tries to display @var{buffer} by choosing an existing
window and displaying the buffer in that window. It can fail if all
windows are dedicated to another buffer (@pxref{Dedicated Windows}).
@end defun
To illustrate the use of action functions, consider the following
example.
@example
@group
(display-buffer
(get-buffer-create "*foo*")
'((display-buffer-reuse-window
display-buffer-pop-up-window
display-buffer-pop-up-frame)
(reusable-frames . 0)
(window-height . 10) (window-width . 40)))
@end group
@end example
@noindent
Evaluating the form above will cause @code{display-buffer} to proceed as
follows: If `*foo*' already appears on a visible or iconified frame, it
will reuse its window. Otherwise, it will try to pop up a new window
or, if that is impossible, a new frame. If all these steps fail, it
will try to use some existing window.
Furthermore, @code{display-buffer} will try to adjust a reused window
(provided `*foo*' was put by @code{display-buffer} there before) or a
popped-up window as follows: If the window is part of a vertical
combination, it will set its height to ten lines. Note that if, instead
of the number ``10'', we specified the function
@code{fit-window-to-buffer}, @code{display-buffer} would come up with a
one-line window to fit the empty buffer. If the window is part of a
horizontal combination, it sets its width to 40 columns. Whether a new
window is vertically or horizontally combined depends on the shape of
the window split and the values of
@code{split-window-preferred-function}, @code{split-height-threshold}
and @code{split-width-threshold} (@pxref{Choosing Window Options}).
Now suppose we combine this call with a preexisting setup for
`display-buffer-alist' as follows.
@example
@group
(let ((display-buffer-alist
(cons
'("\\*foo\\*"
(display-buffer-reuse-window display-buffer-below-selected)
(reusable-frames)
(window-height . 5))
display-buffer-alist)))
(display-buffer
(get-buffer-create "*foo*")
'((display-buffer-reuse-window
display-buffer-pop-up-window
display-buffer-pop-up-frame)
(reusable-frames . 0)
(window-height . 10) (window-width . 40))))
@end group
@end example
@noindent
Evaluating this form will cause @code{display-buffer} to first try
reusing a window showing @code{*foo*} on the selected frame.
If no such window exists, it will try to split the selected window or,
if that is impossible, use the window below the selected window.
If there's no window below the selected one, or the window below the
selected one is dedicated to its buffer, @code{display-buffer} will
proceed as described in the previous example. Note, however, that when
it tries to adjust the height of any reused or popped-up window, it will
in any case try to set its number of lines to ``5'' since that value
overrides the corresponding specification in the @var{action} argument
of @code{display-buffer}.
@node Choosing Window Options
@section Additional Options for Displaying Buffers
......
2012-11-16 Glenn Morris <rgm@gnu.org>
* cl.texi (Function Bindings): Clarify that cl-flet is lexical.
(Obsolete Macros): Move example here from Function Bindings.
* erc.texi: Use @code{nil} rather than just "nil".
(Modules): Undocument obsolete "hecomplete".
Add "notifications".
(Connecting): Add brief section on passwords.
(Options): Make a start by adding erc-hide-list, erc-lurker-hide-list.
2012-11-13 Glenn Morris <rgm@gnu.org>
* flymake.texi (Customizable variables)
......
......@@ -1292,28 +1292,14 @@ it were a @code{cl-defun} form. The function @var{name} is defined
accordingly for the duration of the body of the @code{cl-flet}; then
the old function definition, or lack thereof, is restored.
You can use @code{cl-flet} to disable or modify the behavior of a
function in a temporary fashion. (Compare this with the idea
of advising functions.
You can use @code{cl-flet} to disable or modify the behavior of
functions (including Emacs primitives) in a temporary, localized fashion.
(Compare this with the idea of advising functions.
@xref{Advising Functions,,,elisp,GNU Emacs Lisp Reference Manual}.)
This will even work on Emacs primitives, although note that some calls
to primitive functions internal to Emacs are made without going
through the symbol's function cell, and so will not be affected by
@code{cl-flet}. For example,
@example
(cl-flet ((message (&rest args) (push args saved-msgs)))
(do-something))
@end example
This code attempts to replace the built-in function @code{message}
with a function that simply saves the messages in a list rather
than displaying them. The original definition of @code{message}
will be restored after @code{do-something} exits. This code will
work fine on messages generated by other Lisp code, but messages
generated directly inside Emacs will not be caught since they make
direct C-language calls to the message routines rather than going
through the Lisp @code{message} function.
The bindings are lexical in scope. This means that all references to
the named functions must appear physically within the body of the
@code{cl-flet} form.
Functions defined by @code{cl-flet} may use the full Common Lisp
argument notation supported by @code{cl-defun}; also, the function
......@@ -1321,7 +1307,8 @@ body is enclosed in an implicit block as if by @code{cl-defun}.
@xref{Program Structure}.
Note that the @file{cl.el} version of this macro behaves slightly
differently. @xref{Obsolete Macros}.
differently. In particular, its binding is dynamic rather than
lexical. @xref{Obsolete Macros}.
@end defmac
@defmac cl-labels (bindings@dots{}) forms@dots{}
......@@ -4863,6 +4850,25 @@ time before Emacs had lexical binding). The result is
that @code{flet} affects indirect calls to a function as well as calls
directly inside the @code{flet} form itself.
This will even work on Emacs primitives, although note that some calls
to primitive functions internal to Emacs are made without going
through the symbol's function cell, and so will not be affected by
@code{flet}. For example,
@example
(flet ((message (&rest args) (push args saved-msgs)))
(do-something))
@end example
This code attempts to replace the built-in function @code{message}
with a function that simply saves the messages in a list rather
than displaying them. The original definition of @code{message}
will be restored after @code{do-something} exits. This code will
work fine on messages generated by other Lisp code, but messages
generated directly inside Emacs will not be caught since they make
direct C-language calls to the message routines rather than going
through the Lisp @code{message} function.
@c Bug#411.
Note that many primitives (e.g.@: @code{+}) have special byte-compile
handling. Attempts to redefine such functions using @code{flet} will
......
......@@ -390,11 +390,6 @@ Complete nicknames and commands (programmable)
@item fill
Wrap long lines
@cindex modules, hecomplete
@item hecomplete
Complete nicknames and commands (old). This is the old module---you
might prefer the ``completion'' module instead.
@cindex modules, identd
@item identd
Launch an identd server on port 8113
......@@ -427,6 +422,11 @@ Don't display non-IRC commands after evaluation
@item notify
Notify when the online status of certain users changes
@cindex modules, notifications
@item notifications
Send you a notification when you get a private message,
or your nickname is mentioned
@cindex modules, page
@item page
Process CTCP PAGE requests from IRC
......@@ -530,7 +530,7 @@ parameters.
@defun erc-compute-server &optional server
Return an IRC server name.
This tries a number of increasingly more default methods until a non-nil
This tries a number of increasingly more default methods until a non-@code{nil}
value is found.
@itemize @bullet
......@@ -542,7 +542,7 @@ value is found.
@end defun
@defopt erc-server nil
@defopt erc-server
IRC server to use if one is not provided.
@end defopt
......@@ -551,7 +551,7 @@ IRC server to use if one is not provided.
@defun erc-compute-port &optional port
Return a port for an IRC server.
This tries a number of increasingly more default methods until a non-nil
This tries a number of increasingly more default methods until a non-@code{nil}
value is found.
@itemize @bullet
......@@ -574,7 +574,7 @@ This can be either a string or a number.
Return user's IRC nick.
This tries a number of increasingly more default methods until a
non-nil value is found.
non-@code{nil} value is found.
@itemize
@item @var{nick} (the argument passed to this function)
......@@ -598,19 +598,43 @@ The string to append to the nick if it is already in use.
@end defopt
@defopt erc-try-new-nick-p
If the nickname you chose isn't available, and this option is non-nil,
If the nickname you chose isn't available, and this option is non-@code{nil},
ERC should automatically attempt to connect with another nickname.
You can manually set another nickname with the /NICK command.
@end defopt
@subheading Password
@cindex password
@defopt erc-prompt-for-password
If non-@code{nil} (the default), @kbd{M-x erc} prompts for a password.
@end defopt
If you prefer, you can set this option to @code{nil} and use the
@code{auth-source} mechanism to store your password. For instance, if
you use @file{~/.authinfo} as your auth-source backend, then put
something like the following in that file:
@example
machine irc.example.net login "#fsf" password sEcReT
@end example
@noindent
ERC also consults @code{auth-source} to find any channel keys required
for the channels that you wish to autojoin, as specified by the
variable @code{erc-autojoin-channels-alist}.
For more details, @pxref{Top,,auth-source, auth, Emacs auth-source Library}.
@subheading Full name
@defun erc-compute-full-name &optional full-name
Return user's full name.
This tries a number of increasingly more default methods until a
non-nil value is found.
non-@code{nil} value is found.
@itemize @bullet
@item @var{full-name} (the argument passed to this function)
......@@ -713,10 +737,24 @@ stuff, to the current ERC buffer."
@c PRE5_4: (Node) Document every ERC option (module options go in
@c previous chapter)
This section has not yet been written. For now, the easiest way to
check out the available options for ERC is to do
This section is extremely incomplete. For now, the easiest way to
check out all the available options for ERC is to do
@kbd{M-x customize-group erc RET}.
@defopt erc-hide-list
If non, @code{nil}, this is a list of IRC message types to hide, e.g.
@example
(setq erc-hide-list '("JOIN" "PART" "QUIT"))
@end example
@end defopt
@defopt erc-lurker-hide-list
Like @code{erc-hide-list}, but only applies to messages sent by
lurkers. The function @code{erc-lurker-p} determines whether a given
nickname is considerd a lurker.
@end defopt
@node Getting Help and Reporting Bugs
@chapter Getting Help and Reporting Bugs
......
......@@ -361,6 +361,8 @@ provide the old non-prefixed names. Some exceptions are listed below.
+++
*** `cl-flet' is not like `flet' (which is deprecated).
Instead it obeys the behavior of Common-Lisp's `flet'.
In particular, in cl-flet function definitions are lexically scoped,
whereas in flet the scoping is dynamic.
+++
*** `cl-labels' is slightly different from `labels'.
......@@ -475,12 +477,18 @@ The global binding for `M-=', `count-words-region' is in effect.
** ERC
*** New package `erc-desktop-notifications.el', which can send a notification
when you receive a private message or your nickname is mentioned.
+++
*** New module "notifications", which can send a notification when you
receive a private message or your nickname is mentioned.
+++
*** ERC will look up server/channel names via auth-source and use any
channel keys found.
+++
*** New option `erc-lurker-hide-list', similar to `erc-hide-list', but
only applies to messages sent by lurkers.
+++
** Flymake uses fringe bitmaps to indicate errors and warnings.
See `flymake-fringe-indicator-position', `flymake-error-bitmap' and
......@@ -668,8 +676,7 @@ enabled, applies to all applicable major modes.
** winner-mode-hook now runs when the mode is disabled, as well as when it is
enabled.
** FIXME something happened to ses.el, 2012-04-17.
+++
** Hooks renamed to avoid obsolete "-hooks" suffix:
*** semantic-lex-reset-hooks -> semantic-lex-reset-functions
*** semantic-change-hooks -> semantic-change-functions
......@@ -849,6 +856,12 @@ in the presence of quoting, such as file completion in shell buffers.
*** New function `completion-table-subvert' to use an existing completion
table, but with a different prefix.
FIXME?
*** There are several other completion-table- functions that never got
added to NEWS or documented: completion-table-case-fold (24.1),
completion-table-with-context (23,1), completion-table-with-terminator (23.1),
completion-table-with-predicate (23.1), completion-table-in-turn (23.1)
** Debugger changes
+++
......@@ -879,8 +892,12 @@ now accept a third argument to avoid choosing the selected window.
*** `temp-buffer-resize-mode' no longer resizes windows that have been
reused.
*** New function `fit-frame-to-buffer' and new options
`fit-frame-to-buffer' and `fit-frame-to-buffer-bottom-margin'.
*** New command `fit-frame-to-buffer' adjusts the frame height to
fit the contents.
*** The command `fit-window-to-buffer' can adjust the frame height
if the new option `fit-frame-to-buffer' is non-nil.
+++
*** New option switch-to-buffer-preserve-window-point to restore a
window's point when switching buffers.
......@@ -968,7 +985,9 @@ describing the cycle.
*** `function-get' fetches a function property, following aliases.
+++
*** `posnp' tests if an object is a `posn'.
*** `set-temporary-overlay-map' sets up a temporary overlay map.
+++
*** `set-temporary-overlay-map' sets up a temporary keymap that
takes precedence over most other maps for a short while (normally one key).
+++
*** `system-users' returns the user names on the system.
+++
......@@ -982,8 +1001,8 @@ describing the cycle.
+++
** New fringe bitmap `exclamation-mark'.
+++
** Face underlining can now use a wave.
See the "Face Attributes" section of the Elisp manual.
** The following functions and variables are obsolete:
---
......
2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/cl-lib.el: Set more meaningful version number.
2012-11-16 Martin Rudalics <rudalics@gmx.at>
* window.el (enlarge-window, shrink-window): Don't mention return
value in doc-string (Bug#12896).
(window--display-buffer): Don't resize frames - it won't work
with all window managers and defeat pop-up-frame-alist.
(display-buffer-alist): In doc-string explain that CONDITION can
be a function and which arguments are passed to it (Bug#12854).
(display-buffer-assq-regexp): New argument ACTION. Handle lambda
expressions (Bug#12854).
(display-buffer): Pass ACTION argument to
display-buffer-assq-regexp.
2012-11-16 Glenn Morris <rgm@gnu.org>
* window.el (fit-frame-to-buffer-bottom-margin)
(fit-frame-to-buffer, fit-window-to-buffer): Doc fixes.
* faces.el (face-underline-p): Use face-attribute-specified-or.
2012-11-16 Juanma Barranquero <lekktu@gmail.com>
* emacs-lisp/cl-macs.el (cl-loop, cl-do, cl-do*): Doc fixes.
2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/cl-macs.el (cl-flet, cl-flet*): Fix docstring (bug#12895).
2012-11-16 Glenn Morris <rgm@gnu.org>
* eshell/em-cmpl.el (eshell-pcomplete): New command. (Bug#12838)
(eshell-cmpl-initialize): Bind eshell-pcomplete to TAB, C-i.
* faces.el (face-underline-p): Doc fix. Handle :underline being
things other than `t' (a string, a list).
(face-inverse-video-p): Doc fix.
(set-face-underline): Rename it back from set-face-underline-p.
Doc fix. Allow interactive input of values other than t.
(read-face-attribute): Apply formatting to :underline,
since like :box and :stipple it can take list values.
* term.el (ansi-term): Don't let C-x escape-char binding
clobber the more standard C-c binding. (Bug#12842)
* subr.el (set-temporary-overlay-map): Doc fix.
2012-11-16 Martin Rudalics <rudalics@gmx.at>
* window.el (record-window-buffer)
(display-buffer-record-window): When copying the markers to
window-point preserve window-point-insertion-type. (Bug#12588)
2012-11-16 Glenn Morris <rgm@gnu.org>
* emacs-lisp/eieio-datadebug.el (eieio-debug-methodinvoke):
* net/tramp-gvfs.el (tramp-gvfs-dbus-event-error):