summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2011-10-28 13:56:09 +0000
committerAlan Mackenzie <acm@muc.de>2011-10-28 13:56:09 +0000
commitc0f13227ab16ad9a87a16182e9d9ace5d2f7a6d9 (patch)
tree5b6aad37a5ab5a4d0591a0159b7041dba54f43b5
parent536610a433e6edc0b3f831272c4e0424ebebee46 (diff)
parent44b0122fbb0af5606471d9667ce6352696d259b8 (diff)
downloademacs-c0f13227ab16ad9a87a16182e9d9ace5d2f7a6d9.tar.gz
Merge in random stuff from savannah.
-rw-r--r--ChangeLog11
-rw-r--r--admin/FOR-RELEASE2
-rwxr-xr-xautogen/configure9
-rw-r--r--configure.in9
-rw-r--r--doc/emacs/ChangeLog18
-rw-r--r--doc/emacs/abbrevs.texi2
-rw-r--r--doc/emacs/buffers.texi5
-rw-r--r--doc/emacs/display.texi175
-rw-r--r--doc/emacs/emacs.texi3
-rw-r--r--doc/emacs/frames.texi121
-rw-r--r--doc/emacs/kmacro.texi2
-rw-r--r--doc/emacs/macos.texi2
-rw-r--r--doc/emacs/programs.texi2
-rw-r--r--doc/emacs/rmail.texi11
-rw-r--r--doc/emacs/search.texi4
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/modes.texi54
-rw-r--r--doc/misc/ChangeLog6
-rw-r--r--doc/misc/trampver.texi2
-rw-r--r--etc/NEWS52
-rw-r--r--lib-src/ChangeLog4
-rw-r--r--lib-src/emacsclient.c4
-rw-r--r--lisp/ChangeLog112
-rw-r--r--lisp/comint.el6
-rw-r--r--lisp/emacs-lisp/cl-extra.el14
-rw-r--r--lisp/emacs-lisp/cl-loaddefs.el26
-rw-r--r--lisp/emacs-lisp/cl.el54
-rw-r--r--lisp/emacs-lisp/derived.el2
-rw-r--r--lisp/emacs-lisp/easy-mmode.el11
-rw-r--r--lisp/facemenu.el2
-rw-r--r--lisp/files.el6
-rw-r--r--lisp/gnus/ChangeLog15
-rw-r--r--lisp/gnus/message.el6
-rw-r--r--lisp/gnus/mml.el4
-rw-r--r--lisp/ido.el8
-rw-r--r--lisp/info.el2
-rw-r--r--lisp/international/mule-conf.el2
-rw-r--r--lisp/isearch.el2
-rw-r--r--lisp/net/tramp-cache.el3
-rw-r--r--lisp/net/tramp-sh.el17
-rw-r--r--lisp/net/trampver.el4
-rw-r--r--lisp/notifications.el3
-rw-r--r--lisp/org/ChangeLog2
-rw-r--r--lisp/progmodes/octave-inf.el5
-rw-r--r--lisp/progmodes/octave-mod.el12
-rw-r--r--lisp/simple.el3
-rw-r--r--lisp/subr.el47
-rw-r--r--lisp/term/w32-win.el1
-rw-r--r--lisp/textmodes/reftex.el2
-rw-r--r--nt/ChangeLog9
-rw-r--r--nt/INSTALL2
-rw-r--r--nt/makefile.w32-in1
-rw-r--r--src/ChangeLog54
-rw-r--r--src/dispextern.h1
-rw-r--r--src/gnutls.c325
-rw-r--r--src/gnutls.h5
-rw-r--r--src/image.c2
-rw-r--r--src/intervals.c2
-rw-r--r--src/keyboard.c16
-rw-r--r--src/process.c8
-rw-r--r--src/sysdep.c5
-rw-r--r--src/w32.c6
-rw-r--r--src/w32fns.c15
-rw-r--r--src/w32font.c4
-rw-r--r--src/w32reg.c7
-rw-r--r--src/window.c40
66 files changed, 827 insertions, 548 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b9a7176b05..2cd3f8eef85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-10-25 Nali Toja <nalitoja@gmail.com> (tiny change)
+
+ * configure.in (HAVE_GNU_MAKE): Respect MAKE env-var. (Bug#9868)
+
+2011-10-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ * configure.in (LIB_PTHREAD): Prepend -lpthread to LIBS (Bug#9852)
+ if the library is found. Otherwise, later configure-time tests,
+ such as the test for pthread_sigmask, generate the wrong results
+ on some platforms. Problem reported for FreeBSD by Nali Toja.
+
2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 80a66be3fa4..01d488c97e3 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -153,7 +153,7 @@ ack.texi
anti.texi
arevert-xtra.texi cyd
basic.texi cyd
-buffers.texi
+buffers.texi cyd
building.texi
calendar.texi
cal-xtra.texi
diff --git a/autogen/configure b/autogen/configure
index fc906db6fea..5e31231ac3d 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -9360,7 +9360,7 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
$as_echo_n "checking whether we are using GNU Make... " >&6; }
HAVE_GNU_MAKE=no
- testval=`make --version 2>/dev/null | grep 'GNU Make'`
+ testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
if test "x$testval" != x; then
HAVE_GNU_MAKE=yes
else
@@ -10380,7 +10380,8 @@ fi
if test "$HAVE_PTHREAD" = yes; then
case "${canonical}" in
*-hpux*) ;;
- *) LIB_PTHREAD="-lpthread" ;;
+ *) LIB_PTHREAD="-lpthread"
+ LIBS="$LIB_PTHREAD $LIBS" ;;
esac
$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
@@ -22444,14 +22445,14 @@ echo
if test "$HAVE_NS" = "yes"; then
echo
- echo "You must run \"make install\" in order to test the built application.
+ echo "You must run \"${MAKE-make} install\" in order to test the built application.
The installed application will go to nextstep/Emacs.app and can be
run or moved from there."
if test "$EN_NS_SELF_CONTAINED" = "yes"; then
echo "The application will be fully self-contained."
else
echo "The lisp resources for the application will be installed under ${prefix}.
-You may need to run \"make install\" with sudo. The application will fail
+You may need to run \"${MAKE-make} install\" with sudo. The application will fail
to run if these resources are not installed."
fi
echo
diff --git a/configure.in b/configure.in
index 5b32e10853f..ee52bc9e976 100644
--- a/configure.in
+++ b/configure.in
@@ -1374,7 +1374,7 @@ dnl check for GNU Make if we have GCC and autodepend is on.
if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
AC_MSG_CHECKING([whether we are using GNU Make])
HAVE_GNU_MAKE=no
- testval=`make --version 2>/dev/null | grep 'GNU Make'`
+ testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
if test "x$testval" != x; then
HAVE_GNU_MAKE=yes
else
@@ -1723,7 +1723,8 @@ fi
if test "$HAVE_PTHREAD" = yes; then
case "${canonical}" in
*-hpux*) ;;
- *) LIB_PTHREAD="-lpthread" ;;
+ *) LIB_PTHREAD="-lpthread"
+ LIBS="$LIB_PTHREAD $LIBS" ;;
esac
AC_DEFINE(HAVE_PTHREAD, 1, [Define to 1 if you have pthread (-lpthread).])
fi
@@ -3739,14 +3740,14 @@ echo
if test "$HAVE_NS" = "yes"; then
echo
- echo "You must run \"make install\" in order to test the built application.
+ echo "You must run \"${MAKE-make} install\" in order to test the built application.
The installed application will go to nextstep/Emacs.app and can be
run or moved from there."
if test "$EN_NS_SELF_CONTAINED" = "yes"; then
echo "The application will be fully self-contained."
else
echo "The lisp resources for the application will be installed under ${prefix}.
-You may need to run \"make install\" with sudo. The application will fail
+You may need to run \"${MAKE-make} install\" with sudo. The application will fail
to run if these resources are not installed."
fi
echo
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 726f565e83e..9a501d38375 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,5 +1,23 @@
+2011-10-26 Juanma Barranquero <lekktu@gmail.com>
+
+ * emacs.texi (Top): Fix typo.
+
+2011-10-25 Glenn Morris <rgm@gnu.org>
+
+ * abbrevs.texi (Saving Abbrevs):
+ quietly-read-abbrev-file is not a command. (Bug#9866)
+
+2011-10-24 Chong Yidong <cyd@gnu.org>
+
+ * display.texi (Scrolling): Document scroll-up-line and
+ scroll-down-line. Document scroll-command property.
+ (Recentering): New node, split off from Scrolling.
+
2011-10-23 Chong Yidong <cyd@gnu.org>
+ * frames.texi (Scroll Bars): GTK uses right scroll bars now.
+ (Tool Bars): Copyedits.
+
* buffers.texi (Misc Buffer): Don't mention vc-toggle-read-only.
2011-10-22 Chong Yidong <cyd@gnu.org>
diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi
index d0833ea0854..2eafadf4841 100644
--- a/doc/emacs/abbrevs.texi
+++ b/doc/emacs/abbrevs.texi
@@ -286,8 +286,6 @@ sessions.
Write a file @var{file} describing all defined abbrevs.
@item M-x read-abbrev-file @key{RET} @var{file} @key{RET}
Read the file @var{file} and define abbrevs as specified therein.
-@item M-x quietly-read-abbrev-file @key{RET} @var{file} @key{RET}
-Similar but do not display a message about what is going on.
@item M-x define-abbrevs
Define abbrevs from definitions in current buffer.
@item M-x insert-abbrevs
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index aed5473ac15..302693aecef 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -229,9 +229,8 @@ have special commands to operate on the text; also by visiting a file
whose access control says you cannot write it.
@findex toggle-read-only
- If you wish to make changes in a read-only buffer, use the command
-@kbd{C-x C-q} (@code{toggle-read-only}). It makes a read-only buffer
-writable, and makes a writable buffer read-only. This works by
+ The command @kbd{C-x C-q} (@code{toggle-read-only}) makes a read-only
+buffer writable, and makes a writable buffer read-only. This works by
setting the variable @code{buffer-read-only}, which has a local value
in each buffer and makes the buffer read-only if its value is
non-@code{nil}.
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index b72e24bf243..8995b1242b1 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -13,6 +13,7 @@ the text is displayed.
@menu
* Scrolling:: Commands to move text up and down in a window.
+* Recentering:: A scroll command that centers the current line.
* Auto Scrolling:: Redisplay scrolls text automatically when needed.
* Horizontal Scrolling:: Moving text left and right in a window.
* Narrowing:: Restricting display and editing to a portion
@@ -48,15 +49,15 @@ portion of the buffer is displayed.
Scrolling ``forward'' or ``up'' advances the portion of the buffer
displayed in the window; equivalently, it moves the buffer text
upwards relative to the window. Scrolling ``backward'' or ``down''
-moves the displayed portion backwards, and moves the text downwards
-relative to the window. In Emacs, scrolling ``up'' or ``down'' refers
-to the direction that the text moves in the window, @emph{not} the
-direction that the window moves relative to the text; this terminology
-was taken up by Emacs before the modern meaning of ``scrolling up''
-and ``scrolling down'' became widely adopted. Hence the strange
-result that @key{PageDown} scrolls ``up'' in the Emacs sense. In this
-manual, we refer to scrolling ``forward'' and ``backward'' where
-possible, in order to minimize confusion.
+displays an earlier portion of the buffer, and moves the text
+downwards relative to the window.
+
+ In Emacs, scrolling ``up'' or ``down'' refers to the direction that
+the text moves in the window, @emph{not} the direction that the window
+moves relative to the text. This terminology was adopted by Emacs
+before the modern meaning of ``scrolling up'' and ``scrolling down''
+became widespread. Hence, the strange result that @key{PageDown}
+scrolls ``up'' in the Emacs sense.
The portion of a buffer displayed in a window always contains point.
If you move point past the bottom or top of the window, scrolling
@@ -64,11 +65,6 @@ occurs automatically to bring it back onscreen (@pxref{Auto
Scrolling}). You can also scroll explicitly with these commands:
@table @kbd
-@item C-l
-Scroll the selected window so that the current line is the center-most
-text line; on subsequent consecutive invocations, make the current
-line the top-most line, the bottom-most line, and so on in cyclic
-order; also, maybe redisplay the screen (@code{recenter-top-bottom}).
@item C-v
@itemx @key{next}
@itemx @key{PageDown}
@@ -77,6 +73,86 @@ Scroll forward by nearly a full window (@code{scroll-up-command}).
@itemx @key{prior}
@itemx @key{PageUp}
Scroll backward (@code{scroll-down-command}).
+@end table
+
+@kindex C-v
+@kindex M-v
+@kindex next
+@kindex prior
+@kindex PageDown
+@kindex PageUp
+@findex scroll-up-command
+@findex scroll-down-command
+ @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the
+whole window height. The effect is to take the two lines at the
+bottom of the window and put them at the top, followed by lines that
+were not previously visible. If point was in the text that scrolled
+off the top, it ends up on the window's new topmost line. The
+@key{next} (or @key{PageDown}) key is equivalent to @kbd{C-v}.
+
+ @kbd{M-v} (@code{scroll-down-command}) scrolls backward in a similar
+way. The @key{prior} (or @key{PageUp}) key is equivalent to
+@kbd{M-v}.
+
+@vindex next-screen-context-lines
+ The number of lines of overlap left by these scroll commands is
+controlled by the variable @code{next-screen-context-lines}, whose
+default value is 2. You can supply the commands with a numeric prefix
+argument, @var{n}, to scroll by @var{n} lines; Emacs attempts to leave
+point unchanged, so that the text and point move up or down together.
+@kbd{C-v} with a negative argument is like @kbd{M-v} and vice versa.
+
+@vindex scroll-error-top-bottom
+ By default, these commands signal an error (by beeping or flashing
+the screen) if no more scrolling is possible, because the window has
+reached the beginning or end of the buffer. If you change the
+variable @code{scroll-error-top-bottom} to @code{t}, the command moves
+point to the farthest possible position. If point is already there,
+the command signals an error.
+
+@vindex scroll-preserve-screen-position
+@cindex @code{scroll-command} property
+ Some users like scroll commands to keep point at the same screen
+position, so that scrolling back to the same screen conveniently
+returns point to its original position. You can enable this behavior
+via the variable @code{scroll-preserve-screen-position}. If the value
+is @code{t}, Emacs adjusts point to keep the cursor at the same screen
+position whenever a scroll command moves it off-window, rather than
+moving it to the topmost or bottommost line. With any other
+non-@code{nil} value, Emacs adjusts point this way even if the scroll
+command leaves point in the window. This variable affects all the
+scroll commands documented in this section, as well as scrolling with
+the mouse wheel (@pxref{Wheeled Mice}); in general, it affects any
+command that has a non-@code{nil} @code{scroll-command} property.
+@xref{Property Lists,,, elisp, The Emacs Lisp Reference Manual}.
+
+@vindex scroll-up
+@vindex scroll-down
+@findex scroll-up-line
+@findex scroll-down-line
+ The commands @kbd{M-x scroll-up} and @kbd{M-x scroll-down} behave
+similarly to @code{scroll-up-command} and @code{scroll-down-command},
+except they do not obey @code{scroll-error-top-bottom}. Prior to
+Emacs 24, these were the default commands for scrolling up and down.
+The commands @kbd{M-x scroll-up-line} and @kbd{M-x scroll-down-line}
+scroll the current window by one line at a time. If you intend to use
+any of these commands, you might want to give them key bindings
+(@pxref{Init Rebinding}).
+
+@node Recentering
+@section Recentering
+
+@table @kbd
+@item C-l
+Scroll the selected window so the current line is the center-most text
+line; on subsequent consecutive invocations, make the current line the
+top line, the bottom line, and so on in cyclic order. Possibly
+redisplay the screen too (@code{recenter-top-bottom}).
+
+@item M-x recenter
+Scroll the selected window so the current line is the center-most text
+line. Possibly redisplay the screen too.
+
@item C-M-l
Scroll heuristically to bring useful information onto the screen
(@code{reposition-window}).
@@ -107,14 +183,13 @@ non-zero value @var{n}, @kbd{C-l} always leaves at least @var{n}
screen lines between point and the top or bottom of the window
(@pxref{Auto Scrolling}).
- You can also supply @kbd{C-l} with a prefix argument. With a plain
-prefix argument, @kbd{C-u C-l}, Emacs simply recenters point. With a
-positive argument @var{n}, it scrolls to place point @var{n} lines
-down from the top of the window. An argument of zero puts point on
-the topmost line. A negative argument @var{-n} puts point @var{n}
-lines from the bottom of the window. When given an argument,
-@kbd{C-l} does not clear the screen or cycle through different screen
-positions.
+ You can also give @kbd{C-l} a prefix argument. A plain prefix
+argument, @kbd{C-u C-l}, simply recenters point. A positive argument
+@var{n} puts point @var{n} lines down from the top of the window. An
+argument of zero puts point on the topmost line. A negative argument
+@var{-n} puts point @var{n} lines from the bottom of the window. When
+given an argument, @kbd{C-l} does not clear the screen or cycle
+through different screen positions.
@vindex recenter-redisplay
If the variable @code{recenter-redisplay} has a non-@code{nil}
@@ -127,62 +202,6 @@ becomes garbled for any reason (@pxref{Screen Garbled}).
The more primitive command @kbd{M-x recenter} behaves like
@code{recenter-top-bottom}, but does not cycle among screen positions.
-@kindex C-v
-@kindex M-v
-@kindex next
-@kindex prior
-@kindex PageDown
-@kindex PageUp
-@findex scroll-up-command
-@findex scroll-down-command
- @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the
-whole window height. The effect is to take the two lines at the
-bottom of the window and put them at the top, followed by lines that
-were not previously visible. If point was in the text that scrolled
-off the top, it ends up on the window's new topmost line.
-
- Similarly, @kbd{M-v} (@code{scroll-down-command}) scrolls backward.
-
- We refer to @kbd{C-v} and @kbd{M-v} as @dfn{full-screen scroll
-commands}. The function key @key{next}, or @key{PageDown}, is
-equivalent to @kbd{C-v}; the function key @key{prior}, or
-@key{PageUp}, is equivalent to @kbd{M-v}.
-
-@vindex next-screen-context-lines
- The variable @code{next-screen-context-lines} controls the number of
-lines of overlap left by the full-screen scroll commands; by default,
-it is 2. You can supply these commands with a numeric prefix argument
-@var{n}. This scrolls the window by @var{n} lines, while attempting
-to leave point unchanged (so that the text and point move up or down
-together). @kbd{C-v} with a negative argument is like @kbd{M-v} and
-vice versa.
-
-@vindex scroll-error-top-bottom
- By default, the full-screen scroll commands signal an error (by
-beeping or flashing the screen) if no more scrolling is possible,
-because the window has reached the beginning or end of the buffer. If
-you change the variable @code{scroll-error-top-bottom} to @code{t},
-Emacs instead moves point to the farthest possible position. If point
-is already there, the command signals an error.
-
-@vindex scroll-preserve-screen-position
- Some users like scroll commands to keep point at the same screen
-position. Then, scrolling back to the same screen also conveniently
-returns point to its original position. You can enable this via the
-variable @code{scroll-preserve-screen-position}. If the value is
-@code{t}, Emacs adjusts point to keep it at the same vertical position
-within the window, rather than the window edge, whenever a scroll
-command moves it off the window. With any other non-@code{nil} value,
-Emacs adjusts point this way even if the scroll command leaves point
-in the window.
-
-@vindex scroll-up
-@vindex scroll-down
- The commands @code{scroll-up} and @code{scroll-down} behave
-similarly to @code{scroll-up-command} and @code{scroll-down-command},
-except they do not obey @code{scroll-error-top-bottom}. Prior to
-Emacs 24, these were the default commands for scrolling up and down.
-
@kindex C-M-l
@findex reposition-window
@kbd{C-M-l} (@code{reposition-window}) scrolls the current window
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index cad0e4db3c0..55fdb9ec875 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -295,7 +295,7 @@ Help
* Package Keywords:: Finding Lisp libraries by keywords (topics).
* Language Help:: Help relating to international language support.
* Misc Help:: Other help commands.
-* Help Files:: Commands to display auxilliary help files.
+* Help Files:: Commands to display auxiliary help files.
* Help Echo:: Help on active text and tooltips (`balloon help').
The Mark and the Region
@@ -342,6 +342,7 @@ Registers
Controlling the Display
* Scrolling:: Commands to move text up and down in a window.
+* Recentering:: A scrolling command that centers the current line.
* Auto Scrolling:: Redisplay scrolls text automatically when needed.
* Horizontal Scrolling:: Moving text left and right in a window.
* Narrowing:: Restricting display and editing to a portion
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 4c239d364f0..49222451cce 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -956,55 +956,43 @@ Parameters,,, elisp, The Emacs Lisp Reference Manual}.
@cindex Scroll Bar mode
@cindex mode, Scroll Bar
- On graphical displays, Emacs normally makes a @dfn{scroll bar} at
-the left of each Emacs window, running the height of the
-window.@footnote{Placing it at the left is usually more useful with
-overlapping frames with text starting at the left margin.}
-
- When Emacs is compiled with GTK+ support on the X Window System, or
-in operating systems such as Microsoft Windows or Mac OS, you can use
-the scroll bar as you do in other graphical applications. If you
-click @kbd{Mouse-1} on the scroll bar's up and down buttons, that
-scrolls the window by one line at a time. Clicking @kbd{Mouse-1}
-above or below the scroll bar's inner box scrolls the window by nearly
-the entire height of the window, like @kbd{M-v} and @kbd{C-v}
-respectively (@pxref{Moving Point}). Dragging the inner box with
-@kbd{Mouse-1} scrolls the window continuously.
-
- If Emacs is compiled without GTK+ support on the X Window System,
-the scroll bar behaves differently. The scroll bar's inner box is
-drawn to represent the portion of the buffer currently displayed, with
-the entire height of the scroll bar representing the entire length of
-the buffer. @kbd{Mouse-1} anywhere on the scroll bar scrolls forward
-like @kbd{C-v}, and @kbd{Mouse-3} scrolls backward like @kbd{M-v}.
-Clicking @kbd{Mouse-2} in the scroll bar lets you move or drag the
-inner box up and down.
-
- You can also click @kbd{C-Mouse-2} in the scroll bar to split a
-window vertically. The split occurs on the line where you click.
+ On graphical displays, there is a @dfn{scroll bar} on the side of
+each Emacs window. Clicking @kbd{Mouse-1} on the scroll bar's up and
+down buttons scrolls the window by one line at a time. Clicking
+@kbd{Mouse-1} above or below the scroll bar's inner box scrolls the
+window by nearly the entire height of the window, like @kbd{M-v} and
+@kbd{C-v} respectively (@pxref{Moving Point}). Dragging the inner box
+scrolls continuously.
+
+ If Emacs is compiled on the X Window System without X toolkit
+support, the scroll bar behaves differently. Clicking @kbd{Mouse-1}
+anywhere on the scroll bar scrolls forward like @kbd{C-v}, while
+@kbd{Mouse-3} scrolls backward like @kbd{M-v}. Clicking @kbd{Mouse-2}
+in the scroll bar lets you drag the inner box up and down.
@findex scroll-bar-mode
-@vindex scroll-bar-mode
- You can toggle the use of the scroll bar with the command @kbd{M-x
-scroll-bar-mode}. With a prefix argument, this command turns use of
-scroll bars on if and only if the argument is positive. This command
-applies to all frames, including frames yet to be created. Customize
-the variable @code{scroll-bar-mode} to control the use of scroll bars
-at startup. You can use it to specify that they are placed at the
-right of windows if you prefer that. You have to set this variable
-through the @samp{Customize} interface (@pxref{Easy Customization}),
-or it will not work properly. You can also use the X resource
-@samp{verticalScrollBars} to control the initial setting of Scroll Bar
-mode. @xref{Resources}.
-
@findex toggle-scroll-bar
- To enable or disable scroll bars for just the selected frame, use the
+ To toggle the use of scroll bars, type @kbd{M-x scroll-bar-mode}.
+This command applies to all frames, including frames yet to be
+created. To toggle scroll bars for just the selected frame, use the
command @kbd{M-x toggle-scroll-bar}.
+@vindex scroll-bar-mode
+ To control the use of scroll bars at startup, customize the variable
+@code{scroll-bar-mode}. Its value should be either @code{right} (put
+scroll bars on the right side of windows), @code{left} (put them on
+the left), or @code{nil} (disable scroll bars). By default, Emacs
+puts scroll bars on the right if it was compiled with GTK+ support on
+the X Window System, and on MS-Windows or Mac OS; Emacs puts scroll
+bars on the left if compiled on the X Window system without GTK+
+support (following the old convention for X applications).
+
@vindex scroll-bar-width
@cindex width of the scroll bar
- You can control the scroll bar width by changing the value of the
-@code{scroll-bar-width} frame parameter.
+ You can also use the X resource @samp{verticalScrollBars} to enable
+or disable the scroll bars (@pxref{Resources}). To control the scroll
+bar width, change the @code{scroll-bar-width} frame parameter
+(@pxref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}).
@node Wheeled Mice
@section Scrolling With ``Wheeled'' Mice
@@ -1082,36 +1070,33 @@ menus' visual appearance.
@cindex mode, Tool Bar
@cindex icons, toolbar
- The @dfn{tool bar} is a line (or lines) of icons at the top of the
-Emacs window, just below the menu bar. You can click on these icons
-with the mouse to do various jobs.
-
- The global tool bar contains general commands. Some major modes
-define their own tool bars to replace it. A few ``special'' modes
-that are not designed for ordinary editing remove some items from the
-global tool bar.
+ On graphical displays, Emacs puts a @dfn{tool bar} at the top of
+each frame, just below the menu bar. This is a row of icons which you
+can click on with the mouse to invoke various commands.
- Tool bars work only on a graphical display. The tool bar uses colored
-XPM icons if Emacs was built with XPM support. Otherwise, the tool
-bar uses monochrome icons (PBM or XBM format).
+ The global (default) tool bar contains general commands. Some major
+modes define their own tool bars; whenever a buffer with such a major
+mode is current, the mode's tool bar replaces the global tool bar.
@findex tool-bar-mode
@vindex tool-bar-mode
- You can turn display of tool bars on or off with @kbd{M-x
-tool-bar-mode} or by customizing the option @code{tool-bar-mode}.
+ To toggle the use of tool bars, type @kbd{M-x tool-bar-mode}. This
+command applies to all frames, including frames yet to be created. To
+control the use of tool bars at startup, customize the variable
+@code{tool-bar-mode}.
@vindex tool-bar-style
@cindex Tool Bar style
- When Emacs is compiled with GTK+ support, tool bars can have text and images.
-Customize @code{tool-bar-style} to select style. The default style is
-the same as for the desktop in the Gnome case. If no default is found,
-the tool bar uses just images.
+ When Emacs is compiled with GTK+ support, each tool bar item can
+consist of an image, or a text label, or both. By default, Emacs
+follows the Gnome desktop's tool bar style setting; if none is
+defined, it displays tool bar items as just images. To impose a
+specific tool bar style, customize the variable @code{tool-bar-style}.
@cindex Tool Bar position
- You can also control the placement of the tool bar for the GTK+ tool bar
-with the frame parameter @code{tool-bar-position}.
-For a detailed description of frame parameters and customization,
-see @ref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}.
+ You can also control the placement of the tool bar for the GTK+ tool
+bar with the frame parameter @code{tool-bar-position}. @xref{Frame
+Parameters,,, elisp, The Emacs Lisp Reference Manual}.
@node Dialog Boxes
@section Using Dialog Boxes
@@ -1186,11 +1171,11 @@ options for displaying tooltips, use @kbd{M-x customize-group
customizing the windows that display tooltips.
@vindex x-gtk-use-system-tooltips
- If Emacs is built with GTK support, it displays tooltips via GTK,
-using the default appearance of GTK tooltips. To disable this, change
-the variable @code{x-gtk-use-system-tooltips} to @code{nil}. If you
-do this, or if Emacs is built without GTK support, the @code{tooltip}
-face specifies most attributes of the tooltip text.
+ If Emacs is built with GTK+ support, it displays tooltips via GTK+,
+using the default appearance of GTK+ tooltips. To disable this,
+change the variable @code{x-gtk-use-system-tooltips} to @code{nil}.
+If you do this, or if Emacs is built without GTK+ support, the
+@code{tooltip} face specifies most attributes of the tooltip text.
@node Mouse Avoidance
@section Mouse Avoidance
diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi
index ac81377aec9..4676983fc67 100644
--- a/doc/emacs/kmacro.texi
+++ b/doc/emacs/kmacro.texi
@@ -147,7 +147,7 @@ beginning of the line and then executing the macro.
@findex kmacro-start-macro
@findex kmacro-end-macro
In addition to the @key{F3} and @key{F4} commands described above,
-Emacs also supports an older set of keybindings for defining and
+Emacs also supports an older set of key bindings for defining and
executing keyboard macros. To begin a macro definition, type @kbd{C-x
(} (@code{kmacro-start-macro}); as with @key{F3}, a prefix argument
appends this definition to the last keyboard macro. To end a macro
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index f4a5a2858cf..5a97fa8460b 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -36,7 +36,7 @@ Support}), but we hope to improve it in the future.
By default, the @key{alt} and @key{option} keys are the same as
@key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and
-Emacs provides a set of keybindings using this modifier key that mimic
+Emacs provides a set of key bindings using this modifier key that mimic
other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You
can change these bindings in the usual way (@pxref{Key Bindings}).
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 5745dd7c66c..2357902341e 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1441,7 +1441,7 @@ parsed, and move point there (@code{semantic-complete-jump}).
@kindex C-c , @key{SPC}
Display a list of possible completions for the symbol at point
(@code{semantic-complete-analyze-inline}). This also activates a set
-of special keybindings for choosing a completion: @key{RET} accepts
+of special key bindings for choosing a completion: @key{RET} accepts
the current completion, @kbd{M-n} and @kbd{M-p} cycle through possible
completions, @key{TAB} completes as far as possible and then cycles,
and @kbd{C-g} or any other key aborts completion.
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index 9e30b657284..71c23655608 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -1242,11 +1242,12 @@ coding system, the result should be readable.
@node Rmail Editing
@section Editing Within a Message
- Most of the usual Emacs keybindings are available in Rmail mode, though a
-few, such as @kbd{C-M-n} and @kbd{C-M-h}, are redefined by Rmail for
-other purposes. However, the Rmail buffer is normally read only, and
-most of the letters are redefined as Rmail commands. If you want to
-edit the text of a message, you must use the Rmail command @kbd{e}.
+ Most of the usual Emacs key bindings are available in Rmail mode,
+though a few, such as @kbd{C-M-n} and @kbd{C-M-h}, are redefined by
+Rmail for other purposes. However, the Rmail buffer is normally read
+only, and most of the letters are redefined as Rmail commands. If you
+want to edit the text of a message, you must use the Rmail command
+@kbd{e}.
@table @kbd
@item e
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 31b5aa37f83..a8bd1cdf18d 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -268,8 +268,8 @@ use it (@pxref{Rebinding}).
@vindex isearch-mode-map
When incremental search is active, you can type @kbd{C-h C-h} to
-access interactive help options, including a list of special
-keybindings. These keybindings are part of the keymap
+access interactive help options, including a list of special key
+bindings. These key bindings are part of the keymap
@code{isearch-mode-map} (@pxref{Keymaps}).
@node Isearch Yank
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 490280dae29..acc334ea000 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-26 Chong Yidong <cyd@gnu.org>
+
+ * modes.texi (Running Hooks): Document with-wrapper-hook.
+
2011-10-18 Chong Yidong <cyd@gnu.org>
* display.texi (Glyphless Chars): New node.
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index eb81ebc4acb..9d652901e53 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -84,8 +84,9 @@ its value is just a single function, not a list of functions.
@node Running Hooks
@subsection Running Hooks
- At the appropriate times, Emacs uses the @code{run-hooks} function
-and the other functions below to run particular hooks.
+ In this section, we document the @code{run-hooks} function, which is
+used to run a normal hook. We also document the functions for running
+various kinds of abnormal hooks.
@defun run-hooks &rest hookvars
This function takes one or more normal hook variable names as
@@ -108,28 +109,49 @@ be run as well.
@end defun
@defun run-hook-with-args hook &rest args
-This function is the way to run an abnormal hook and always call all
-of the hook functions. It calls each of the hook functions one by
-one, passing each of them the arguments @var{args}.
+This function runs an abnormal hook by calling all the hook functions in
+@var{hook}, passing each one the arguments @var{args}.
@end defun
@defun run-hook-with-args-until-failure hook &rest args
-This function is the way to run an abnormal hook until one of the hook
-functions fails. It calls each of the hook functions, passing each of
-them the arguments @var{args}, until some hook function returns
-@code{nil}. It then stops and returns @code{nil}. If none of the
-hook functions return @code{nil}, it returns a non-@code{nil} value.
+This function runs an abnormal hook by calling each hook function in
+turn, stopping if one of them ``fails'' by returning @code{nil}. Each
+hook function is passed the arguments @var{args}. If this function
+stops because one of the hook functions fails, it returns @code{nil};
+otherwise it returns a non-@code{nil} value.
@end defun
@defun run-hook-with-args-until-success hook &rest args
-This function is the way to run an abnormal hook until a hook function
-succeeds. It calls each of the hook functions, passing each of them
-the arguments @var{args}, until some hook function returns
-non-@code{nil}. Then it stops, and returns whatever was returned by
-the last hook function that was called. If all hook functions return
-@code{nil}, it returns @code{nil} as well.
+This function runs an abnormal hook by calling each hook function,
+stopping if one of them ``succeeds'' by returning a non-@code{nil}
+value. Each hook function is passed the arguments @var{args}. If this
+function stops because one of the hook functions returns a
+non-@code{nil} value, it returns that value; otherwise it returns
+@code{nil}.
@end defun
+@defmac with-wrapper-hook hook args &rest body
+This macro runs the abnormal hook @code{hook} as a series of nested
+``wrapper functions'' around the @var{body} forms. The effect is
+similar to nested @code{around} advices (@pxref{Around-Advice}).
+
+Each hook function must accept an argument list consisting of a function
+@var{fun}, followed by the additional arguments listed in @var{args}.
+The function @var{fun} passed to the very first hook function in
+@var{hook} does the same as @var{body}, if it is called with arguments
+@var{args}. The @var{fun} passed to each successive hook function is
+constructed from all the preceding hook functions (and @var{body}); if
+this @var{fun} is called with arguments @var{args}, it does what the
+@code{with-wrapper-hook} call would if the preceding hook functions were
+the only ones in @var{hook}.
+
+In the function definition of the hook function, @var{fun} can be called
+any number of times (including not calling it at all). This function
+definition is then used to construct the @var{fun} passed to the next
+hook function in @var{hook}, if any. The last or ``outermost''
+@var{fun} is called once to produce the effect.
+@end defmac
+
@node Setting Hooks
@subsection Setting Hooks
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 02c2d2b8750..6b0ef9c5d8b 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-23 Michael Albinus <michael.albinus@gmx.de>
+
+ Sync with Tramp 2.2.3.
+
+ * trampver.texi: Update release number.
+
2011-10-14 Glenn Morris <rgm@gnu.org>
* ert.texi (Introduction, How to Run Tests)
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 31d3ac0204f..63dc78dc4e8 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -8,7 +8,7 @@
@c In the Tramp CVS, the version number is auto-frobbed from
@c configure.ac, so you should edit that file and run
@c "autoconf && ./configure" to change the version number.
-@set trampver 2.2.3-pre
+@set trampver 2.2.3-24.1
@c Other flags from configuration
@set instprefix /usr/local
diff --git a/etc/NEWS b/etc/NEWS
index 68e5720330d..9e407133e8b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -230,14 +230,14 @@ cannot be encoded by the `terminal-coding-system'.
(U+2010 and U+2011).
** Improved GTK integration
-
++++
*** GTK scroll-bars are now placed on the right by default.
Use `set-scroll-bar-mode' to change this.
-
++++
*** GTK tool bars can have just text, just images or images and text.
Customize `tool-bar-style' to choose style. On a Gnome desktop, the default
is taken from the desktop settings.
-
+---
*** GTK tool bars can be placed on the left/right or top/bottom of the frame.
The frame-parameter tool-bar-position controls this. It takes the values
top, left, right or bottom. The Options => Show/Hide menu has entries
@@ -276,10 +276,6 @@ get and set the SELinux context of a file.
*** Tramp offers handlers for file-selinux-context and set-file-selinux-context
for remote machines which support SELinux.
-+++
-** The function format-time-string now supports the %N directive, for
-higher-resolution time stamps.
-
** Changes for exiting Emacs
+++
*** The function kill-emacs is now run upon receipt of the signals
@@ -295,24 +291,20 @@ consider if it is still appropriate to add it in the noninteractive case.
(bound to C-v/[next] and M-v/[prior]) do not signal errors at top/bottom
of buffer at first key-press (instead move to top/bottom of buffer)
when `scroll-error-top-bottom' is non-nil.
-
+++
*** New variable `scroll-error-top-bottom' (see above).
-
++++
*** New scrolling commands `scroll-up-line' and `scroll-down-line'
scroll a line instead of full screen.
-
+++
*** New property `scroll-command' should be set on a command's symbol to
define it as a scroll command affected by `scroll-preserve-screen-position'.
-
+++
*** If you customize `scroll-conservatively' to a value greater than 100,
Emacs will never recenter point in the window when it scrolls due to
cursor motion commands or commands that move point (e.f., `M-g M-g').
Previously, you needed to use `most-positive-fixnum' as the value of
`scroll-conservatively' to achieve the same effect.
-
---
*** ``Aggressive'' scrolling now honors the scroll margins.
If you customize `scroll-up-aggressively' or
@@ -374,7 +366,6 @@ Affected modes include dired, vc-dir, and log-edit. For example,
adding "(diff-mode . ((mode . whitespace)))" to .dir-locals.el will
turn on `whitespace-mode' for *vc-diff* buffers. Modes should call
`hack-dir-local-variables-non-file-buffer' to support this.
-
+++
*** Using "mode: MINOR-MODE" to enable a minor mode is deprecated.
Instead, use "eval: (minor-mode 1)".
@@ -1178,7 +1169,13 @@ must also be supplied.
** pre/post-command-hook are not reset to nil upon error.
Instead, the offending function is removed.
-** New low-level function run-hook-wrapped.
+** New hook types
+
+*** New function `run-hook-wrapped' for running an abnormal hook by
+passing the hook functions as arguments to a "wrapping" function.
++++
+*** New macro `with-wrapper-hook' for running an abnormal hook as a
+set of "wrapping" filters, similar to around advice.
** `server-eval-at' is provided to allow evaluating forms on different
Emacs server instances.
@@ -1192,6 +1189,10 @@ Also the debugger can now "continue" from an error, which means it will jump
to the error handler as if the debugger had not been invoked instead of
jumping all the way to the top-level.
++++
+** The function format-time-string now supports the %N directive, for
+higher-resolution time stamps.
+
** New function `read-char-choice' reads a restricted set of characters,
discarding any inputs not inside the set.
@@ -1217,15 +1218,22 @@ syntactic rules.
** frame-local variables cannot be let-bound any more.
+** Major and minor mode changes
+++
-** prog-mode is a new major-mode meant to be the parent of programming mode.
-The prog-mode-hook it defines can be used to enable features for
-programming modes. For example:
-(add-hook 'prog-mode-hook 'flyspell-prog-mode)
-enables on the fly spell checking for comments and strings for
-programming modes.
+*** `prog-mode' is a new major mode from which programming modes
+should be derived.
+
+**** `prog-mode-hook' can be used to enable features for programming
+modes, e.g. (add-hook 'prog-mode-hook 'flyspell-prog-mode) to enable
+on-the-fly spell checking for comments and strings.
-** define-minor-mode accepts a new keyword :variable.
+*** New hook `change-major-mode-after-body-hook', run by
+`run-mode-hooks' just before any other mode hooks.
+
+*** Enabled globalized minor modes can be disabled in specific modes,
+by running (FOO-mode-hook 0) via a mode hook.
+
+*** `define-minor-mode' accepts a new keyword :variable.
+++
** `delete-file' and `delete-directory' now accept optional arg TRASH.
@@ -1350,6 +1358,8 @@ with the USER_LIBS build variable.
** New make target `dist' to create binary distribution for MS Windows.
+** Function `w32-default-color-map' is now obsolete.
+
** On Nextstep/OSX, the menu bar can be hidden by customizing
ns-auto-hide-menu-bar.
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 984c4d6c880..a8f9a0ac4be 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-27 Juanma Barranquero <lekktu@gmail.com>
+
+ * emacsclient.c (w32_getenv): Silence compiler warnings.
+
2011-09-07 Glenn Morris <rgm@gnu.org>
* etags.c (Fortran_functions): Handle "elemental" functions.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index ece9dc65c49..76aa21884de 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -359,7 +359,7 @@ w32_getenv (char *envvar)
char *value;
DWORD dwType;
- if (value = getenv (envvar))
+ if ((value = getenv (envvar)))
/* Found in the environment. strdup it, because values returned
by getenv cannot be free'd. */
return xstrdup (value);
@@ -382,7 +382,7 @@ w32_getenv (char *envvar)
{
DWORD size;
- if (size = ExpandEnvironmentStrings (value, NULL, 0))
+ if ((size = ExpandEnvironmentStrings (value, NULL, 0)))
{
char *buffer = (char *) xmalloc (size);
if (ExpandEnvironmentStrings (value, buffer, size))
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 09e2e7dc1de..6aa1bddb9f3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,95 @@
+2011-10-27 Glenn Morris <rgm@gnu.org>
+
+ * emacs-lisp/cl-extra.el (most-positive-float, most-negative-float)
+ (least-positive-float, least-negative-float)
+ (least-positive-normalized-float, least-negative-normalized-float)
+ (float-epsilon, float-negative-epsilon):
+ Remove unnecessary declarations.
+
+ * emacs-lisp/cl-extra.el (cl-float-limits): Add doc string.
+ * emacs-lisp/cl.el (most-positive-float, most-negative-float)
+ (least-positive-float, least-negative-float)
+ (least-positive-normalized-float, least-negative-normalized-float)
+ (float-epsilon, float-negative-epsilon): Add doc-strings,
+ based on those in cl.texi.
+
+ * files.el (set-visited-file-name): If the major-mode changed,
+ reload the local variables. (Bug#9796)
+
+2011-10-27 Chong Yidong <cyd@gnu.org>
+
+ * subr.el (change-major-mode-after-body-hook): New hook.
+ (run-mode-hooks): Run it.
+
+ * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Use
+ change-major-mode-before-body-hook.
+
+ * simple.el (fundamental-mode):
+ * emacs-lisp/derived.el (define-derived-mode): Revert 2010-04-28
+ change introducing fundamental-mode-hook.
+
+2011-10-26 Juanma Barranquero <lekktu@gmail.com>
+
+ * term/w32-win.el (w32-default-color-map): Declare obsolete. (Bug#9785)
+
+2011-10-26 Michael Albinus <michael.albinus@gmx.de>
+
+ * ido.el (ido-file-name-all-completions-1): Do not require
+ tramp.el explicitely. (Bug#7583)
+
+2011-10-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/octave-mod.el:
+ * progmodes/octave-inf.el: Update maintainer.
+
+2011-10-26 Chong Yidong <cyd@gnu.org>
+
+ * subr.el (with-wrapper-hook): Rewrite doc.
+
+2011-10-25 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp-sh.el (tramp-sh-handle-file-directory-p): Return t for
+ filenames "/method:foo:". (Bug#9793)
+
+2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * comint.el (comint-get-old-input-default): Fix use-prompt-regexp case
+ (bug#9865).
+
+2011-10-24 Glenn Morris <rgm@gnu.org>
+
+ * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. (Bug#9819)
+
+2011-10-24 Michael Albinus <michael.albinus@gmx.de>
+
+ * notifications.el: Add the requirement of a running D-Bus session
+ bus to the Commentary.
+
+2011-10-24 Juri Linkov <juri@jurta.org>
+
+ * isearch.el (isearch-occur): Let-bind `search-spaces-regexp' to
+ `search-whitespace-regexp' only when `isearch-regexp' is non-nil.
+ (Bug#9364)
+
+2011-10-24 Juri Linkov <juri@jurta.org>
+
+ * info.el (Info-following-node-name-re): Add newline to the list
+ of allowed characters for leading space. (Bug#9824)
+
+2011-10-24 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/octave-inf.el (inferior-octave-mode-map): Fix C-c C-h binding.
+ * progmodes/octave-mod.el (octave-help): Remove.
+
+2011-10-23 Michael Albinus <michael.albinus@gmx.de>
+
+ Sync with Tramp 2.2.3.
+
+ * net/tramp-cache.el (top): Pacify byte-compiler using
+ `init-file-user' and `site-run-file'.
+
+ * net/trampver.el: Update release number.
+
2011-10-23 Chong Yidong <cyd@gnu.org>
* files.el (toggle-read-only): Remove obsolete comment about
@@ -7,16 +99,16 @@
for toggle-read-only. Note that this hasn't called vc-next-action
since 2008-05-02, though it wasn't documented at the time.
- * vc/ediff-init.el (ediff-toggle-read-only-function): Use
- toggle-read-only.
+ * vc/ediff-init.el (ediff-toggle-read-only-function):
+ Use toggle-read-only.
2011-10-22 Alan Mackenzie <bug-cc-mode@gnu.org>
Fix bug #9560, sporadic wrong indentation; improve instrumentation
of c-parse-state.
- * cc-engine.el (c-append-lower-brace-pair-to-state-cache): correct
- faulty logical expression.
+ * cc-engine.el (c-append-lower-brace-pair-to-state-cache):
+ correct faulty logical expression.
(c-parse-state-state, c-record-parse-state-state):
(c-replay-parse-state-state): New defvar/defuns.
(c-debug-parse-state): Use new functions.
@@ -30,8 +122,8 @@
* progmodes/idlwave.el (idlwave-mode):
* progmodes/vera-mode.el (vera-mode): No need to set
- require-final-newline; that's done in prog-mode. Suggested by
- Stefan Monnier.
+ require-final-newline; that's done in prog-mode.
+ Suggested by Stefan Monnier.
2011-10-21 Martin Rudalics <rudalics@gmx.at>
@@ -52,8 +144,8 @@
2011-10-21 Chong Yidong <cyd@gnu.org>
* progmodes/idlwave.el (idlwave-mode):
- * progmodes/vera-mode.el (vera-mode): Use
- mode-require-final-newline.
+ * progmodes/vera-mode.el (vera-mode):
+ Use mode-require-final-newline.
2011-10-20 Glenn Morris <rgm@gnu.org>
@@ -189,8 +281,8 @@
(global-whitespace-mode, global-whitespace-newline-mode):
* xt-mouse.el (xterm-mouse-mode): Doc fix.
- * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Fix
- autogenerated docstring.
+ * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
+ Fix autogenerated docstring.
2011-10-19 Juri Linkov <juri@jurta.org>
diff --git a/lisp/comint.el b/lisp/comint.el
index 591be5e2d9d..b91b82adb21 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -2151,8 +2151,10 @@ current line, if point is on an output field.
If `comint-use-prompt-regexp' is non-nil, then return
the current line with any initial string matching the regexp
`comint-prompt-regexp' removed."
- (let ((bof (field-beginning)))
- (if (null (get-char-property bof 'field)) ;Not `output'.
+ (let (bof)
+ (if (and (not comint-use-prompt-regexp)
+ ;; Make sure we're in an input rather than output field.
+ (null (get-char-property (setq bof (field-beginning)) 'field)))
(field-string-no-properties bof)
(comint-bol)
(buffer-substring-no-properties (point) (line-end-position)))))
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 7468a0237cf..8ea58b2e07c 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -480,17 +480,13 @@ If STATE is t, return a new state object seeded from the time of day."
(and (numberp res) (/= res (/ res 2)) res))
(arith-error nil)))
-(defvar most-positive-float)
-(defvar most-negative-float)
-(defvar least-positive-float)
-(defvar least-negative-float)
-(defvar least-positive-normalized-float)
-(defvar least-negative-normalized-float)
-(defvar float-epsilon)
-(defvar float-negative-epsilon)
-
;;;###autoload
(defun cl-float-limits ()
+ "Initialize the Common Lisp floating-point parameters.
+This sets the values of: `most-positive-float', `most-negative-float',
+`least-positive-float', `least-negative-float', `float-epsilon',
+`float-negative-epsilon', `least-positive-normalized-float', and
+`least-negative-normalized-float'."
(or most-positive-float (not (numberp '2e1))
(let ((x '2e0) y z)
;; Find maximum exponent (first two loops are optimizations)
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el
index d6512306ad1..1cd953d9e18 100644
--- a/lisp/emacs-lisp/cl-loaddefs.el
+++ b/lisp/emacs-lisp/cl-loaddefs.el
@@ -10,7 +10,7 @@
;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p
;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively
;;;;;; notevery notany every some mapcon mapcan mapl maplist map
-;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "26339d9571f9485bf34fa6d2ae38fc84")
+;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "15a5e127e1c9c9c3d1f398963b66cde7")
;;; Generated autoloads from cl-extra.el
(autoload 'coerce "cl-extra" "\
@@ -28,7 +28,7 @@ strings case-insensitively.
\(fn X Y)" nil nil)
(autoload 'cl-mapcar-many "cl-extra" "\
-Not documented
+
\(fn CL-FUNC CL-SEQS)" nil nil)
@@ -84,27 +84,27 @@ Return true if PREDICATE is false of some element of SEQ or SEQs.
(defalias 'cl-map-keymap 'map-keymap)
(autoload 'cl-map-keymap-recursively "cl-extra" "\
-Not documented
+
\(fn CL-FUNC-REC CL-MAP &optional CL-BASE)" nil nil)
(autoload 'cl-map-intervals "cl-extra" "\
-Not documented
+
\(fn CL-FUNC &optional CL-WHAT CL-PROP CL-START CL-END)" nil nil)
(autoload 'cl-map-overlays "cl-extra" "\
-Not documented
+
\(fn CL-FUNC &optional CL-BUFFER CL-START CL-END CL-ARG)" nil nil)
(autoload 'cl-set-frame-visible-p "cl-extra" "\
-Not documented
+
\(fn FRAME VAL)" nil nil)
(autoload 'cl-progv-before "cl-extra" "\
-Not documented
+
\(fn SYMS VALUES)" nil nil)
@@ -180,7 +180,11 @@ Return t if OBJECT is a random-state object.
\(fn OBJECT)" nil nil)
(autoload 'cl-float-limits "cl-extra" "\
-Not documented
+Initialize the Common Lisp floating-point parameters.
+This sets the values of: `most-positive-float', `most-negative-float',
+`least-positive-float', `least-negative-float', `float-epsilon',
+`float-negative-epsilon', `least-positive-normalized-float', and
+`least-negative-normalized-float'.
\(fn)" nil nil)
@@ -228,12 +232,12 @@ PROPLIST is a list of the sort returned by `symbol-plist'.
\(fn PROPLIST PROPNAME &optional DEFAULT)" nil nil)
(autoload 'cl-set-getf "cl-extra" "\
-Not documented
+
\(fn PLIST TAG VAL)" nil nil)
(autoload 'cl-do-remf "cl-extra" "\
-Not documented
+
\(fn PLIST TAG)" nil nil)
@@ -267,7 +271,7 @@ This also does some trivial optimizations to make the form prettier.
\(fn FORM &optional ENV)" nil nil)
(autoload 'cl-prettyexpand "cl-extra" "\
-Not documented
+
\(fn FORM &optional FULL)" nil nil)
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index 526475eb1bd..16eb31c1209 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -333,15 +333,51 @@ always returns nil."
(defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time)))
-;; The following are actually set by cl-float-limits.
-(defconst most-positive-float nil)
-(defconst most-negative-float nil)
-(defconst least-positive-float nil)
-(defconst least-negative-float nil)
-(defconst least-positive-normalized-float nil)
-(defconst least-negative-normalized-float nil)
-(defconst float-epsilon nil)
-(defconst float-negative-epsilon nil)
+(defconst most-positive-float nil
+ "The largest value that a Lisp float can hold.
+If your system supports infinities, this is the largest finite value.
+For IEEE machines, this is approximately 1.79e+308.
+Call `cl-float-limits' to set this.")
+
+(defconst most-negative-float nil
+ "The largest negative value that a Lisp float can hold.
+This is simply -`most-positive-float'.
+Call `cl-float-limits' to set this.")
+
+(defconst least-positive-float nil
+ "The smallest value greater than zero that a Lisp float can hold.
+For IEEE machines, it is about 4.94e-324 if denormals are supported,
+or 2.22e-308 if they are not.
+Call `cl-float-limits' to set this.")
+
+(defconst least-negative-float nil
+ "The smallest value less than zero that a Lisp float can hold.
+This is simply -`least-positive-float'.
+Call `cl-float-limits' to set this.")
+
+(defconst least-positive-normalized-float nil
+ "The smallest normalized Lisp float greater than zero.
+This is the smallest value for which IEEE denormalization does not lose
+precision. For IEEE machines, this value is about 2.22e-308.
+For machines that do not support the concept of denormalization
+and gradual underflow, this constant equals `least-positive-float'.
+Call `cl-float-limits' to set this.")
+
+(defconst least-negative-normalized-float nil
+ "The smallest normalized Lisp float less than zero.
+This is simply -`least-positive-normalized-float'.
+Call `cl-float-limits' to set this.")
+
+(defconst float-epsilon nil
+ "The smallest positive float that adds to 1.0 to give a distinct value.
+Adding a number less than this to 1.0 returns 1.0 due to roundoff.
+For IEEE machines, epsilon is about 2.22e-16.
+Call `cl-float-limits' to set this.")
+
+(defconst float-negative-epsilon nil
+ "The smallest positive float that subtracts from 1.0 to give a distinct value.
+For IEEE machines, it is about 1.11e-16.
+Call `cl-float-limits' to set this.")
;;; Sequence functions.
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 81932f9940a..55ea102ed2a 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -230,7 +230,7 @@ No problems result if this variable is not bound.
; Run the parent.
(delay-mode-hooks
- (,(or parent 'fundamental-mode))
+ (,(or parent 'kill-all-local-variables))
; Identify the child mode.
(setq major-mode (quote ,child))
(setq mode-name ,name)
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index b1cb0615e43..bf9f2c9d6ed 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -94,8 +94,9 @@ Optional LIGHTER is displayed in the modeline when the mode is on.
Optional KEYMAP is the default keymap bound to the mode keymap.
If non-nil, it should be a variable name (whose value is a keymap),
or an expression that returns either a keymap or a list of
- arguments for `easy-mmode-define-keymap'. If KEYMAP is not a symbol,
- this also defines the variable MODE-map.
+ arguments for `easy-mmode-define-keymap'. If you supply a KEYMAP
+ argument that is not a symbol, this macro defines the variable
+ MODE-map and gives it the value that KEYMAP specifies.
BODY contains code to execute each time the mode is enabled or disabled.
It is executed after toggling the mode, and before running MODE-hook.
@@ -367,11 +368,13 @@ See `%s' for more information on %s."
(progn
(add-hook 'after-change-major-mode-hook
',MODE-enable-in-buffers)
- (add-hook 'fundamental-mode-hook ',MODE-enable-in-buffers)
+ (add-hook 'change-major-mode-after-body-hook
+ ',MODE-enable-in-buffers)
(add-hook 'find-file-hook ',MODE-check-buffers)
(add-hook 'change-major-mode-hook ',MODE-cmhh))
(remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers)
- (remove-hook 'fundamental-mode-hook ',MODE-enable-in-buffers)
+ (remove-hook 'change-major-mode-after-body-hook
+ ',MODE-enable-in-buffers)
(remove-hook 'find-file-hook ',MODE-check-buffers)
(remove-hook 'change-major-mode-hook ',MODE-cmhh))
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 54b17d58f33..4f9db02b5e1 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -645,6 +645,8 @@ a list of colors that the current display can handle."
;; text in menu entries) and `SystemWindowText' (the default
;; color w32 uses for the text in windows and dialogs) may
;; be the same display color and be adjacent in the list.
+ ;; These system colors all have names prefixed with "System",
+ ;; which is hardcoded in w32fns.c (SYSTEM_COLOR_PREFIX).
;; This makes them different to any other color. Bug#9722
(not (and (eq system-type 'windows-nt)
(string-match-p "^System" (car (car l))))))
diff --git a/lisp/files.el b/lisp/files.el
index 3ed9bd5a272..40e2df14c1b 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3682,7 +3682,11 @@ the old visited file has been renamed to the new name FILENAME."
(get major-mode 'mode-class)
;; Don't change the mode if the local variable list specifies it.
(hack-local-variables t)
- (set-auto-mode t))
+ ;; TODO consider making normal-mode handle this case.
+ (let ((old major-mode))
+ (set-auto-mode t)
+ (or (eq old major-mode)
+ (hack-local-variables))))
(error nil)))
(defun write-file (filename &optional confirm)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 592d0671c26..7519252f037 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,8 +1,19 @@
+2011-10-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * message.el (message-completion-function): Make sure
+ message-tab-body-function is not attempted if one of
+ message-completion-alist fails to find a completion (bug#9158).
+
+2011-10-26 Daiki Ueno <ueno@unixuser.org>
+
+ * mml.el (mml-quote-region): Quote <#secure> tag.
+ (mml-generate-mime-1): Unquote <#secure> tag.
+
2011-10-20 Chong Yidong <cyd@gnu.org>
* gnus-cite.el (gnus-message-citation-mode): Doc fix (in Emacs 24,
calling a minor mode from Lisp with nil arg enables it, so we have to
- make the working a bit ambiguous here).
+ make the wording a bit ambiguous here).
2011-10-18 Teodor Zlatanov <tzz@lifelogs.com>
@@ -18548,7 +18559,7 @@
gnus-requst-update-info with explicit code to sync the in-memory
info read flags with the marks being sync'd to the backend.
- *gnus-util.el (gnus-pp): Add optional stream to match pp API.
+ * gnus-util.el (gnus-pp): Add optional stream to match pp API.
2004-09-28 Teodor Zlatanov <tzz@lifelogs.com>
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 948892d1e13..723f8fb72b5 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -7888,7 +7888,11 @@ those headers."
(let ((mail-abbrev-mode-regexp (caar alist)))
(not (mail-abbrev-in-expansion-header-p))))
(setq alist (cdr alist)))
- (cdar alist)))
+ (when (cdar alist)
+ (lexical-let ((fun (cdar alist)))
+ ;; Even if completion fails, return a non-nil value, so as to avoid
+ ;; falling back to message-tab-body-function.
+ (lambda () (funcall fun) 'completion-attempted)))))
(eval-and-compile
(condition-case nil
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 0d2ae2a845a..352fa329e3e 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -525,7 +525,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
;; Remove quotes from quoted tags.
(goto-char (point-min))
(while (re-search-forward
- "<#!+/?\\(part\\|multipart\\|external\\|mml\\)"
+ "<#!+/?\\(part\\|multipart\\|external\\|mml\\|secure\\)"
nil t)
(delete-region (+ (match-beginning 0) 2)
(+ (match-beginning 0) 3))))))
@@ -1232,7 +1232,7 @@ If not set, `default-directory' will be used."
(goto-char (point-min))
;; Quote parts.
(while (re-search-forward
- "<#!*/?\\(multipart\\|part\\|external\\|mml\\)" nil t)
+ "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)" nil t)
;; Insert ! after the #.
(goto-char (+ (match-beginning 0) 2))
(insert "!")))))
diff --git a/lisp/ido.el b/lisp/ido.el
index 88599013ce6..fda4c0316f7 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3457,8 +3457,6 @@ This is to make them appear as if they were \"virtual buffers\"."
(nconc ido-temp-list items)
(setq ido-temp-list items)))
-(declare-function tramp-tramp-file-p "tramp" (name))
-
(defun ido-file-name-all-completions-1 (dir)
(cond
((ido-nonreadable-directory-p dir) '())
@@ -3466,8 +3464,6 @@ This is to make them appear as if they were \"virtual buffers\"."
;; Caller must have done that if necessary.
((and ido-enable-tramp-completion
- (or (fboundp 'tramp-completion-mode-p)
- (require 'tramp nil t))
(string-match "\\`/[^/]+[:@]\\'" dir))
;; Strip method:user@host: part of tramp completions.
;; Tramp completions do not include leading slash.
@@ -3480,7 +3476,9 @@ This is to make them appear as if they were \"virtual buffers\"."
;; /ftp:user@host:./ => ok
(and
(not (string= "/ftp:" dir))
- (tramp-tramp-file-p dir)
+ (file-remote-p dir)
+ ;; tramp-ftp-file-name-p is available only when tramp
+ ;; has been loaded.
(fboundp 'tramp-ftp-file-name-p)
(funcall 'tramp-ftp-file-name-p dir)
(string-match ":\\'" dir)
diff --git a/lisp/info.el b/lisp/info.el
index 4ccbeba2a47..b8deb3c9c7f 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2015,7 +2015,7 @@ Submatch 1 is the complete node name.
Submatch 2 if non-nil is the parenthesized file name part of the node name.
Submatch 3 is the local part of the node name.
End of submatch 0, 1, and 3 are the same, so you can safely concat."
- (concat "[ \t]*" ;Skip leading space.
+ (concat "[ \t\n]*" ;Skip leading space.
"\\(\\(([^)]+)\\)?" ;Node name can start with a file name.
"\\([" (or allowedchars "^,\t\n") "]*" ;Any number of allowed chars.
"[" (or allowedchars "^,\t\n") " ]" ;The last char can't be a space.
diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el
index 9ba95e4d11a..870f2bece28 100644
--- a/lisp/international/mule-conf.el
+++ b/lisp/international/mule-conf.el
@@ -708,7 +708,7 @@
(define-charset-alias 'cp866u 'cp1125)
;; Fixme: C.f. iconv, http://czyborra.com/charsets/codepages.html
-;; shows this as not ASCII comptaible, with various graphics in
+;; shows this as not ASCII compatible, with various graphics in
;; 0x01-0x1F.
(define-charset 'cp437
"CP437 (MS-DOS United States, Australia, New Zealand, South Africa)"
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 6cfcce59672..6bb23916da3 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1452,7 +1452,7 @@ string. NLINES has the same meaning as in `occur'."
;; Set `search-upper-case' to nil to not call
;; `isearch-no-upper-case-p' in `occur-1'.
(search-upper-case nil)
- (search-spaces-regexp search-whitespace-regexp))
+ (search-spaces-regexp (if isearch-regexp search-whitespace-regexp)))
(occur regexp nlines)))
(declare-function hi-lock-read-face-name "hi-lock" ())
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 9397025cb60..b35ca3bbd18 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -383,7 +383,8 @@ for all methods. Resulting data are derived from connection history."
;; When "emacs -Q" has been called, both variables are nil.
;; We do not load the persistency file then, in order to
;; have a clean test environment.
- (or init-file-user site-run-file))
+ (or (and (boundp 'init-file-user) (symbol-value 'init-file-user))
+ (and (boundp 'site-run-file) (symbol-value 'site-run-file))))
(condition-case err
(with-temp-buffer
(insert-file-contents tramp-persistency-file-name)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 56424f79476..55732194bc8 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1594,17 +1594,14 @@ and gid of the corresponding user is taken. Both parameters must be integers."
(defun tramp-sh-handle-file-directory-p (filename)
"Like `file-directory-p' for Tramp files."
- ;; Care must be taken that this function returns `t' for symlinks
- ;; pointing to directories. Surely the most obvious implementation
- ;; would be `test -d', but that returns false for such symlinks.
- ;; CCC: Stefan Monnier says that `test -d' follows symlinks. And
- ;; I now think he's right. So we could be using `test -d', couldn't
- ;; we?
- ;;
- ;; Alternatives: `cd %s', `test -d %s'
(with-parsed-tramp-file-name filename nil
- (with-file-property v localname "file-directory-p"
- (tramp-run-test "-d" filename))))
+ ;; `file-directory-p' is used as predicate for filename completion.
+ ;; Sometimes, when a connection is not established yet, it is
+ ;; desirable to return t immediately for "/method:foo:". It can
+ ;; be expected that this is always a directory.
+ (or (zerop (length localname))
+ (with-file-property v localname "file-directory-p"
+ (tramp-run-test "-d" filename)))))
(defun tramp-sh-handle-file-writable-p (filename)
"Like `file-writable-p' for Tramp files."
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 5492441ac77..fc0c936c407 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -31,7 +31,7 @@
;; should be changed only there.
;;;###tramp-autoload
-(defconst tramp-version "2.2.3-pre"
+(defconst tramp-version "2.2.3-24.1"
"This version of Tramp.")
;;;###tramp-autoload
@@ -44,7 +44,7 @@
(= emacs-major-version 21)
(>= emacs-minor-version 4)))
"ok"
- (format "Tramp 2.2.3-pre is not fit for %s"
+ (format "Tramp 2.2.3-24.1 is not fit for %s"
(when (string-match "^.*$" (emacs-version))
(match-string 0 (emacs-version)))))))
(unless (string-match "\\`ok\\'" x) (error "%s" x)))
diff --git a/lisp/notifications.el b/lisp/notifications.el
index 42cd40df36b..a4e7fdd5425 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -30,6 +30,9 @@
;;
;; (require 'notifications)
+;; For proper usage, Emacs must be started in an environment with an
+;; active D-Bus session bus.
+
;;; Code:
(eval-when-compile
(require 'cl))
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 9fbeb9f1882..ae150621dc0 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1871,7 +1871,7 @@
* org-list.el (org-list-separating-blank-lines-number): Fix
confusion between point and item beginning. Now, if no
- information is avalaible, truly follow user preference when it
+ information is available, truly follow user preference when it
inserts blank lines manually.
(org-list-insert-item): Send correct argument to the preceding
function.
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index cb64b2436c6..421f476016e 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -4,7 +4,7 @@
;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
;; Author: John Eaton <jwe@bevo.che.wisc.edu>
-;; Maintainer: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
+;; Maintainer: FSF
;; Keywords: languages
;; Package: octave-mod
@@ -68,7 +68,8 @@ mode, set this to (\"-q\" \"--traditional\")."
(define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring)
(define-key map [menu-bar inout list-history]
'("List Input History" . inferior-octave-dynamic-list-input-ring))
- (define-key map "\C-c\C-h" 'octave-help)
+ ;; FIXME: free C-h so it can do the describe-prefix-bindings.
+ (define-key map "\C-c\C-h" 'info-lookup-symbol)
map)
"Keymap used in Inferior Octave mode.")
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index 183347cdeca..28e25a35c70 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -4,7 +4,7 @@
;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
;; Author: John Eaton <jwe@octave.org>
-;; Maintainer: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
+;; Maintainer: FSF
;; Keywords: languages
;; This file is part of GNU Emacs.
@@ -223,6 +223,7 @@ parenthetical grouping.")
(define-key map "\C-c]" 'smie-close-block)
(define-key map "\C-c/" 'smie-close-block)
(define-key map "\C-c\C-f" 'octave-insert-defun)
+ ;; FIXME: free C-h so it can do the describe-prefix-bindings.
(define-key map "\C-c\C-h" 'info-lookup-symbol)
(define-key map "\C-c\C-il" 'octave-send-line)
(define-key map "\C-c\C-ib" 'octave-send-block)
@@ -236,6 +237,7 @@ parenthetical grouping.")
(define-key map "\C-c\C-i\C-f" 'octave-send-defun)
(define-key map "\C-c\C-i\C-r" 'octave-send-region)
(define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer)
+ ;; FIXME: free C-h so it can do the describe-prefix-bindings.
(define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer)
(define-key map "\C-c\C-i\C-k" 'octave-kill-process)
map)
@@ -655,14 +657,6 @@ including a reproducible test case and send the message."
(easy-menu-add octave-mode-menu)
(octave-initialize-completions))
-
-(defvar info-lookup-mode)
-
-(defun octave-help ()
- "Get help on Octave symbols from the Octave info files.
-Look up symbol in the function, operator and variable indices of the info files."
- (let ((info-lookup-mode 'octave-mode))
- (call-interactively 'info-lookup-symbol)))
;;; Miscellaneous useful functions
diff --git a/lisp/simple.el b/lisp/simple.el
index 79de6aea3dd..90d22c817b0 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -349,7 +349,8 @@ location."
Other major modes are defined by comparison with this one."
(interactive)
(kill-all-local-variables)
- (run-mode-hooks 'fundamental-mode-hook))
+ (unless delay-mode-hooks
+ (run-hooks 'after-change-major-mode-hook)))
;; Special major modes to view specially formatted data rather than files.
diff --git a/lisp/subr.el b/lisp/subr.el
index 05ac198dd13..f3cd4dabe20 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -116,8 +116,6 @@ BODY should be a list of Lisp expressions.
;; depend on backquote.el.
(list 'function (cons 'lambda cdr)))
-;; Partial application of functions (similar to "currying").
-;; This function is here rather than in subr.el because it uses CL.
(defun apply-partially (fun &rest args)
"Return a function that is a partial application of FUN to ARGS.
ARGS is a list of the first N arguments to pass to FUN.
@@ -1366,18 +1364,26 @@ All symbols are bound before the VALUEFORMs are evalled."
,@(mapcar (lambda (binder) `(setq ,@binder)) binders)
,@body))
-(defmacro with-wrapper-hook (var args &rest body)
- "Run BODY wrapped with the VAR hook.
-VAR is a special hook: its functions are called with a first argument
-which is the \"original\" code (the BODY), so the hook function can wrap
-the original function, or call it any number of times (including not calling
-it at all). This is similar to an `around' advice.
-VAR is normally a symbol (a variable) in which case it is treated like
-a hook, with a buffer-local and a global part. But it can also be an
-arbitrary expression.
-ARGS is a list of variables which will be passed as additional arguments
-to each function, after the initial argument, and which the first argument
-expects to receive when called."
+(defmacro with-wrapper-hook (hook args &rest body)
+ "Run BODY, using wrapper functions from HOOK with additional ARGS.
+HOOK is an abnormal hook. Each hook function in HOOK \"wraps\"
+around the preceding ones, like a set of nested `around' advices.
+
+Each hook function should accept an argument list consisting of a
+function FUN, followed by the additional arguments in ARGS.
+
+The FUN passed to the first hook function in HOOK performs BODY,
+if it is called with arguments ARGS. The FUN passed to each
+successive hook function is defined based on the preceding hook
+functions; if called with arguments ARGS, it does what the
+`with-wrapper-hook' call would do if the preceding hook functions
+were the only ones present in HOOK.
+
+In the function definition of each hook function, FUN can be
+called any number of times (including not calling it at all).
+That function definition is then used to construct the FUN passed
+to the next hook function, if any. The last (or \"outermost\")
+FUN is then called once."
(declare (indent 2) (debug (form sexp body)))
;; We need those two gensyms because CL's lexical scoping is not available
;; for function arguments :-(
@@ -1406,11 +1412,11 @@ expects to receive when called."
;; Once there are no more functions on the hook, run
;; the original body.
(apply (lambda ,args ,@body) ,argssym)))))
- (funcall ,runrestofhook ,var
+ (funcall ,runrestofhook ,hook
;; The global part of the hook, if any.
- ,(if (symbolp var)
- `(if (local-variable-p ',var)
- (default-value ',var)))
+ ,(if (symbolp hook)
+ `(if (local-variable-p ',hook)
+ (default-value ',hook)))
(list ,@args)))))
(defun add-to-list (list-var element &optional append compare-fn)
@@ -1524,6 +1530,9 @@ if it is empty or a duplicate."
(make-variable-buffer-local 'delayed-mode-hooks)
(put 'delay-mode-hooks 'permanent-local t)
+(defvar change-major-mode-after-body-hook nil
+ "Normal hook run in major mode functions, before the mode hooks.")
+
(defvar after-change-major-mode-hook nil
"Normal hook run at the very end of major mode functions.")
@@ -1540,7 +1549,7 @@ FOO-mode-hook."
;; Normal case, just run the hook as before plus any delayed hooks.
(setq hooks (nconc (nreverse delayed-mode-hooks) hooks))
(setq delayed-mode-hooks nil)
- (apply 'run-hooks hooks)
+ (apply 'run-hooks (cons 'change-major-mode-after-body-hook hooks))
(run-hooks 'after-change-major-mode-hook)))
(defmacro delay-mode-hooks (&rest body)
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index e4bf031d422..b7f2a69e77b 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -85,6 +85,7 @@
(define-obsolete-function-alias 'w32-select-font 'x-select-font "23.1")
(defvar w32-color-map) ;; defined in w32fns.c
+(make-obsolete 'w32-default-color-map nil "24.1")
(declare-function w32-send-sys-command "w32fns.c")
(declare-function set-message-beep "w32console.c")
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 6f6993980db..cef8a3d1548 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -1522,7 +1522,7 @@ Valid actions are: readable, restore, read, kill, write."
;;; (while all
;;; (when (and (eq (car (car all)) 'bof)
;;; (not (file-regular-p (nth 1 (car all)))))
-;;; (message "File %s in saved parse info not avalable" (cdr (car all)))
+;;; (message "File %s in saved parse info not available" (cdr (car all)))
;;; (error "File not found"))
;;; (setq all (cdr all))))
)
diff --git a/nt/ChangeLog b/nt/ChangeLog
index fb3a168ebfe..08fd7677077 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,12 @@
+2011-10-25 Eli Zaretskii <eliz@gnu.org>
+
+ * makefile.w32-in (dist): Don't put the top-level INSTALL into the
+ distribution. (Bug#9861)
+
+2011-10-25 Christoph Scholtes <cschol2112@googlemail.com>
+
+ * INSTALL: Update URL for GTK download page.
+
2011-10-19 Eli Zaretskii <eliz@gnu.org>
* config.nt (HAVE_TZNAME, HAVE_DECL_TZNAME): Define.
diff --git a/nt/INSTALL b/nt/INSTALL
index b4a97011922..613610890ae 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -323,7 +323,7 @@
For PNG images, we recommend to use versions 1.4.x and later of
libpng, because previous versions had security issues. You can find
precompiled libraries and headers on the GTK download page for
- Windows (http://www.gtk.org/download-windows.html).
+ Windows (http://www.gtk.org/download/win32.php).
Versions 1.4.0 and later of libpng are binary incompatible with
earlier versions, so Emacs will only look for libpng libraries which
diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in
index 4e4e6eccbb7..07d9be2c117 100644
--- a/nt/makefile.w32-in
+++ b/nt/makefile.w32-in
@@ -263,7 +263,6 @@ dist: install-bin
$(CP) "$(INSTALL_DIR)/COPYING" $(TMP_DIST_DIR)
$(CP) "$(INSTALL_DIR)/README" $(TMP_DIST_DIR)
$(CP) "$(INSTALL_DIR)/README.W32" $(TMP_DIST_DIR)
- $(CP) "$(INSTALL_DIR)/INSTALL" $(TMP_DIST_DIR)
$(CP_DIR) "$(INSTALL_DIR)/bin" $(TMP_DIST_DIR)
$(CP_DIR) "$(INSTALL_DIR)/etc" $(TMP_DIST_DIR)
$(CP_DIR) "$(INSTALL_DIR)/info" $(TMP_DIST_DIR)
diff --git a/src/ChangeLog b/src/ChangeLog
index 3f9b5beeab6..0d421223228 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,57 @@
+2011-10-27 Juanma Barranquero <lekktu@gmail.com>
+
+ * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
+ (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
+ (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
+ (Fmove_to_window_line): Doc fix.
+
+2011-10-27 Chong Yidong <cyd@gnu.org>
+
+ * process.c (make_process): Set gnutls_state to NULL.
+
+ * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
+ non-NULL, regardless of GNUTLS_INITSTAGE.
+ (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
+ an error. Set process slots as soon as we allocate them.
+
+ * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
+
+2011-10-27 Chong Yidong <cyd@gnu.org>
+
+ * gnutls.c (emacs_gnutls_deinit): New function. Deallocate
+ credentials structures as well as calling gnutls_deinit.
+ (Fgnutls_deinit, Fgnutls_boot): Use it.
+
+ * process.c (make_process): Initialize GnuTLS credentials to NULL.
+ (deactivate_process): Call emacs_gnutls_deinit.
+
+2011-10-27 Juanma Barranquero <lekktu@gmail.com>
+
+ * image.c (x_create_x_image_and_pixmap):
+ * w32.c (sys_rename, w32_delayed_load):
+ * w32font.c (fill_in_logfont):
+ * w32reg.c (x_get_string_resource): Silence compiler warnings.
+
+2011-10-26 Juanma Barranquero <lekktu@gmail.com>
+
+ * w32fns.c (w32_default_color_map): New function,
+ extracted from Fw32_default_color_map.
+ (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
+
+2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
+
+2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * keyboard.c (test_undefined): New function (bug#9751).
+ (read_key_sequence): Use it to detect when a key is bound to `undefined'.
+
+2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
+
+ * sysdep.c (init_sys_modes): Fix the check for the controlling
+ terminal (Bug#6649).
+
2011-10-20 Eli Zaretskii <eliz@gnu.org>
* dispextern.h (struct bidi_it): New member next_en_type.
diff --git a/src/dispextern.h b/src/dispextern.h
index dd5f67d2d10..5c60a5499da 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3346,6 +3346,7 @@ extern int tty_capable_p (struct tty_display_info *, unsigned, unsigned long, un
extern void set_tty_color_mode (struct tty_display_info *, struct frame *);
extern struct terminal *get_named_tty (const char *);
EXFUN (Ftty_type, 1);
+EXFUN (Fcontrolling_tty_p, 1);
extern void create_tty_output (struct frame *);
extern struct terminal *init_tty (const char *, const char *, int);
extern void tty_append_glyph (struct it *);
diff --git a/src/gnutls.c b/src/gnutls.c
index 0743ef3f4ee..500f09432b1 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -464,6 +464,44 @@ gnutls_make_error (int err)
return make_number (err);
}
+Lisp_Object
+emacs_gnutls_deinit (Lisp_Object proc)
+{
+ int log_level;
+
+ CHECK_PROCESS (proc);
+
+ if (XPROCESS (proc)->gnutls_p == 0)
+ return Qnil;
+
+ log_level = XPROCESS (proc)->gnutls_log_level;
+
+ if (XPROCESS (proc)->gnutls_x509_cred)
+ {
+ GNUTLS_LOG (2, log_level, "Deallocating x509 credentials");
+ fn_gnutls_certificate_free_credentials (XPROCESS (proc)->gnutls_x509_cred);
+ XPROCESS (proc)->gnutls_x509_cred = NULL;
+ }
+
+ if (XPROCESS (proc)->gnutls_anon_cred)
+ {
+ GNUTLS_LOG (2, log_level, "Deallocating anon credentials");
+ fn_gnutls_anon_free_client_credentials (XPROCESS (proc)->gnutls_anon_cred);
+ XPROCESS (proc)->gnutls_anon_cred = NULL;
+ }
+
+ if (XPROCESS (proc)->gnutls_state)
+ {
+ fn_gnutls_deinit (XPROCESS (proc)->gnutls_state);
+ XPROCESS (proc)->gnutls_state = NULL;
+ if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_INIT)
+ GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_INIT - 1;
+ }
+
+ XPROCESS (proc)->gnutls_p = 0;
+ return Qt;
+}
+
DEFUN ("gnutls-get-initstage", Fgnutls_get_initstage, Sgnutls_get_initstage, 1, 1, 0,
doc: /* Return the GnuTLS init stage of process PROC.
See also `gnutls-boot'. */)
@@ -551,18 +589,7 @@ DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0,
See also `gnutls-init'. */)
(Lisp_Object proc)
{
- gnutls_session_t state;
-
- CHECK_PROCESS (proc);
- state = XPROCESS (proc)->gnutls_state;
-
- if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_INIT)
- {
- fn_gnutls_deinit (state);
- GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_INIT - 1;
- }
-
- return Qt;
+ return emacs_gnutls_deinit (proc);
}
DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0,
@@ -622,7 +649,7 @@ emacs_gnutls_global_deinit (void)
DEFUN ("gnutls-boot", Fgnutls_boot, Sgnutls_boot, 3, 3, 0,
doc: /* Initialize GnuTLS client for process PROC with TYPE+PROPLIST.
-Currently only client mode is supported. Returns a success/failure
+Currently only client mode is supported. Return a success/failure
value you can check with `gnutls-errorp'.
TYPE is a symbol, either `gnutls-anon' or `gnutls-x509pki'.
@@ -673,23 +700,13 @@ one trustfile (usually a CA bundle). */)
(Lisp_Object proc, Lisp_Object type, Lisp_Object proplist)
{
int ret = GNUTLS_E_SUCCESS;
-
int max_log_level = 0;
- /* TODO: GNUTLS_X509_FMT_DER is also an option. */
- int file_format = GNUTLS_X509_FMT_PEM;
-
- unsigned int gnutls_verify_flags = GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT;
- gnutls_x509_crt_t gnutls_verify_cert;
- unsigned int gnutls_verify_cert_list_size;
- const gnutls_datum_t *gnutls_verify_cert_list;
-
gnutls_session_t state;
- gnutls_certificate_credentials_t x509_cred;
- gnutls_anon_client_credentials_t anon_cred;
+ gnutls_certificate_credentials_t x509_cred = NULL;
+ gnutls_anon_client_credentials_t anon_cred = NULL;
Lisp_Object global_init;
char const *priority_string_ptr = "NORMAL"; /* default priority string. */
- Lisp_Object tail;
unsigned int peer_verification;
char* c_hostname;
@@ -701,7 +718,6 @@ one trustfile (usually a CA bundle). */)
/* Lisp_Object callbacks; */
Lisp_Object loglevel;
Lisp_Object hostname;
- Lisp_Object verify_flags;
/* Lisp_Object verify_error; */
Lisp_Object verify_hostname_error;
Lisp_Object prime_bits;
@@ -716,26 +732,25 @@ one trustfile (usually a CA bundle). */)
return gnutls_make_error (GNUTLS_EMACS_ERROR_NOT_LOADED);
}
+ if (!EQ (type, Qgnutls_x509pki) && !EQ (type, Qgnutls_anon))
+ {
+ error ("Invalid GnuTLS credential type");
+ return gnutls_make_error (GNUTLS_EMACS_ERROR_INVALID_TYPE);
+ }
+
hostname = Fplist_get (proplist, QCgnutls_bootprop_hostname);
priority_string = Fplist_get (proplist, QCgnutls_bootprop_priority);
trustfiles = Fplist_get (proplist, QCgnutls_bootprop_trustfiles);
keylist = Fplist_get (proplist, QCgnutls_bootprop_keylist);
crlfiles = Fplist_get (proplist, QCgnutls_bootprop_crlfiles);
- /* callbacks = Fplist_get (proplist, QCgnutls_bootprop_callbacks); */
loglevel = Fplist_get (proplist, QCgnutls_bootprop_loglevel);
- verify_flags = Fplist_get (proplist, QCgnutls_bootprop_verify_flags);
- /* verify_error = Fplist_get (proplist, QCgnutls_bootprop_verify_error); */
verify_hostname_error = Fplist_get (proplist, QCgnutls_bootprop_verify_hostname_error);
prime_bits = Fplist_get (proplist, QCgnutls_bootprop_min_prime_bits);
if (!STRINGP (hostname))
error ("gnutls-boot: invalid :hostname parameter");
-
c_hostname = SSDATA (hostname);
- state = XPROCESS (proc)->gnutls_state;
- XPROCESS (proc)->gnutls_p = 1;
-
if (NUMBERP (loglevel))
{
fn_gnutls_global_set_log_function (gnutls_log_function);
@@ -749,82 +764,56 @@ one trustfile (usually a CA bundle). */)
if (! NILP (Fgnutls_errorp (global_init)))
return global_init;
- /* deinit and free resources. */
- if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_CRED_ALLOC)
- {
- GNUTLS_LOG (1, max_log_level, "deallocating credentials");
-
- if (EQ (type, Qgnutls_x509pki))
- {
- GNUTLS_LOG (2, max_log_level, "deallocating x509 credentials");
- x509_cred = XPROCESS (proc)->gnutls_x509_cred;
- fn_gnutls_certificate_free_credentials (x509_cred);
- }
- else if (EQ (type, Qgnutls_anon))
- {
- GNUTLS_LOG (2, max_log_level, "deallocating anon credentials");
- anon_cred = XPROCESS (proc)->gnutls_anon_cred;
- fn_gnutls_anon_free_client_credentials (anon_cred);
- }
- else
- {
- error ("unknown credential type");
- ret = GNUTLS_EMACS_ERROR_INVALID_TYPE;
- }
-
- if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_INIT)
- {
- GNUTLS_LOG (1, max_log_level, "deallocating x509 credentials");
- Fgnutls_deinit (proc);
- }
- }
+ /* Before allocating new credentials, deallocate any credentials
+ that PROC might already have. */
+ emacs_gnutls_deinit (proc);
+ /* Mark PROC as a GnuTLS process. */
+ XPROCESS (proc)->gnutls_p = 1;
+ XPROCESS (proc)->gnutls_state = NULL;
+ XPROCESS (proc)->gnutls_x509_cred = NULL;
+ XPROCESS (proc)->gnutls_anon_cred = NULL;
+ XPROCESS (proc)->gnutls_cred_type = type;
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_EMPTY;
GNUTLS_LOG (1, max_log_level, "allocating credentials");
-
if (EQ (type, Qgnutls_x509pki))
{
+ Lisp_Object verify_flags;
+ unsigned int gnutls_verify_flags = GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT;
+
GNUTLS_LOG (2, max_log_level, "allocating x509 credentials");
- x509_cred = XPROCESS (proc)->gnutls_x509_cred;
fn_gnutls_certificate_allocate_credentials (&x509_cred);
+ XPROCESS (proc)->gnutls_x509_cred = x509_cred;
+ verify_flags = Fplist_get (proplist, QCgnutls_bootprop_verify_flags);
if (NUMBERP (verify_flags))
{
gnutls_verify_flags = XINT (verify_flags);
GNUTLS_LOG (2, max_log_level, "setting verification flags");
}
else if (NILP (verify_flags))
- {
- /* The default is already GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT. */
- GNUTLS_LOG (2, max_log_level, "using default verification flags");
- }
+ GNUTLS_LOG (2, max_log_level, "using default verification flags");
else
- {
- /* The default is already GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT. */
- GNUTLS_LOG (2, max_log_level, "ignoring invalid verify-flags");
- }
+ GNUTLS_LOG (2, max_log_level, "ignoring invalid verify-flags");
+
fn_gnutls_certificate_set_verify_flags (x509_cred, gnutls_verify_flags);
}
- else if (EQ (type, Qgnutls_anon))
+ else /* Qgnutls_anon: */
{
GNUTLS_LOG (2, max_log_level, "allocating anon credentials");
- anon_cred = XPROCESS (proc)->gnutls_anon_cred;
fn_gnutls_anon_allocate_client_credentials (&anon_cred);
- }
- else
- {
- error ("unknown credential type");
- ret = GNUTLS_EMACS_ERROR_INVALID_TYPE;
+ XPROCESS (proc)->gnutls_anon_cred = anon_cred;
}
- if (ret < GNUTLS_E_SUCCESS)
- return gnutls_make_error (ret);
-
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_CRED_ALLOC;
if (EQ (type, Qgnutls_x509pki))
{
+ /* TODO: GNUTLS_X509_FMT_DER is also an option. */
+ int file_format = GNUTLS_X509_FMT_PEM;
+ Lisp_Object tail;
+
for (tail = trustfiles; !NILP (tail); tail = Fcdr (tail))
{
Lisp_Object trustfile = Fcar (tail);
@@ -842,8 +831,8 @@ one trustfile (usually a CA bundle). */)
}
else
{
- error ("Sorry, GnuTLS can't use non-string trustfile %s",
- SDATA (trustfile));
+ emacs_gnutls_deinit (proc);
+ error ("Invalid trustfile");
}
}
@@ -855,17 +844,15 @@ one trustfile (usually a CA bundle). */)
GNUTLS_LOG2 (1, max_log_level, "setting the CRL file: ",
SSDATA (crlfile));
ret = fn_gnutls_certificate_set_x509_crl_file
- (x509_cred,
- SSDATA (crlfile),
- file_format);
+ (x509_cred, SSDATA (crlfile), file_format);
if (ret < GNUTLS_E_SUCCESS)
return gnutls_make_error (ret);
}
else
{
- error ("Sorry, GnuTLS can't use non-string CRL file %s",
- SDATA (crlfile));
+ emacs_gnutls_deinit (proc);
+ error ("Invalid CRL file");
}
}
@@ -880,45 +867,31 @@ one trustfile (usually a CA bundle). */)
GNUTLS_LOG2 (1, max_log_level, "setting the client cert file: ",
SSDATA (certfile));
ret = fn_gnutls_certificate_set_x509_key_file
- (x509_cred,
- SSDATA (certfile),
- SSDATA (keyfile),
- file_format);
+ (x509_cred, SSDATA (certfile), SSDATA (keyfile), file_format);
if (ret < GNUTLS_E_SUCCESS)
return gnutls_make_error (ret);
}
else
{
- if (STRINGP (keyfile))
- error ("Sorry, GnuTLS can't use non-string client cert file %s",
- SDATA (certfile));
- else
- error ("Sorry, GnuTLS can't use non-string client key file %s",
- SDATA (keyfile));
+ emacs_gnutls_deinit (proc);
+ error (STRINGP (keyfile) ? "Invalid client cert file"
+ : "Invalid client key file");
}
}
}
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_FILES;
-
GNUTLS_LOG (1, max_log_level, "gnutls callbacks");
-
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_CALLBACKS;
-#ifdef HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY
-#else
-#endif
+ /* Call gnutls_init here: */
GNUTLS_LOG (1, max_log_level, "gnutls_init");
-
ret = fn_gnutls_init (&state, GNUTLS_CLIENT);
-
+ XPROCESS (proc)->gnutls_state = state;
if (ret < GNUTLS_E_SUCCESS)
return gnutls_make_error (ret);
-
- XPROCESS (proc)->gnutls_state = state;
-
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_INIT;
if (STRINGP (priority_string))
@@ -934,46 +907,25 @@ one trustfile (usually a CA bundle). */)
}
GNUTLS_LOG (1, max_log_level, "setting the priority string");
-
ret = fn_gnutls_priority_set_direct (state,
priority_string_ptr,
NULL);
-
if (ret < GNUTLS_E_SUCCESS)
return gnutls_make_error (ret);
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_PRIORITY;
- if (!EQ (prime_bits, Qnil))
- {
- fn_gnutls_dh_set_prime_bits (state, XUINT (prime_bits));
- }
-
- if (EQ (type, Qgnutls_x509pki))
- {
- ret = fn_gnutls_credentials_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred);
- }
- else if (EQ (type, Qgnutls_anon))
- {
- ret = fn_gnutls_credentials_set (state, GNUTLS_CRD_ANON, anon_cred);
- }
- else
- {
- error ("unknown credential type");
- ret = GNUTLS_EMACS_ERROR_INVALID_TYPE;
- }
+ if (INTEGERP (prime_bits))
+ fn_gnutls_dh_set_prime_bits (state, XUINT (prime_bits));
+ ret = EQ (type, Qgnutls_x509pki)
+ ? fn_gnutls_credentials_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred)
+ : fn_gnutls_credentials_set (state, GNUTLS_CRD_ANON, anon_cred);
if (ret < GNUTLS_E_SUCCESS)
return gnutls_make_error (ret);
- XPROCESS (proc)->gnutls_anon_cred = anon_cred;
- XPROCESS (proc)->gnutls_x509_cred = x509_cred;
- XPROCESS (proc)->gnutls_cred_type = type;
-
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_CRED_SET;
-
ret = emacs_gnutls_handshake (XPROCESS (proc));
-
if (ret < GNUTLS_E_SUCCESS)
return gnutls_make_error (ret);
@@ -984,69 +936,71 @@ one trustfile (usually a CA bundle). */)
gnutls_x509_crt_check_hostname() against :hostname. */
ret = fn_gnutls_certificate_verify_peers2 (state, &peer_verification);
-
if (ret < GNUTLS_E_SUCCESS)
return gnutls_make_error (ret);
if (XINT (loglevel) > 0 && peer_verification & GNUTLS_CERT_INVALID)
- message ("%s certificate could not be verified.",
- c_hostname);
-
- if (peer_verification & GNUTLS_CERT_REVOKED)
- GNUTLS_LOG2 (1, max_log_level, "certificate was revoked (CRL):",
- c_hostname);
-
- if (peer_verification & GNUTLS_CERT_SIGNER_NOT_FOUND)
- GNUTLS_LOG2 (1, max_log_level, "certificate signer was not found:",
- c_hostname);
-
- if (peer_verification & GNUTLS_CERT_SIGNER_NOT_CA)
- GNUTLS_LOG2 (1, max_log_level, "certificate signer is not a CA:",
- c_hostname);
-
- if (peer_verification & GNUTLS_CERT_INSECURE_ALGORITHM)
- GNUTLS_LOG2 (1, max_log_level,
- "certificate was signed with an insecure algorithm:",
- c_hostname);
-
- if (peer_verification & GNUTLS_CERT_NOT_ACTIVATED)
- GNUTLS_LOG2 (1, max_log_level, "certificate is not yet activated:",
- c_hostname);
-
- if (peer_verification & GNUTLS_CERT_EXPIRED)
- GNUTLS_LOG2 (1, max_log_level, "certificate has expired:",
- c_hostname);
-
- if (peer_verification != 0)
- {
- if (NILP (verify_hostname_error))
- {
- GNUTLS_LOG2 (1, max_log_level, "certificate validation failed:",
- c_hostname);
- }
- else
- {
- error ("Certificate validation failed %s, verification code %d",
- c_hostname, peer_verification);
- }
- }
+ message ("%s certificate could not be verified.", c_hostname);
+
+ if (peer_verification & GNUTLS_CERT_REVOKED)
+ GNUTLS_LOG2 (1, max_log_level, "certificate was revoked (CRL):",
+ c_hostname);
+
+ if (peer_verification & GNUTLS_CERT_SIGNER_NOT_FOUND)
+ GNUTLS_LOG2 (1, max_log_level, "certificate signer was not found:",
+ c_hostname);
+
+ if (peer_verification & GNUTLS_CERT_SIGNER_NOT_CA)
+ GNUTLS_LOG2 (1, max_log_level, "certificate signer is not a CA:",
+ c_hostname);
+
+ if (peer_verification & GNUTLS_CERT_INSECURE_ALGORITHM)
+ GNUTLS_LOG2 (1, max_log_level,
+ "certificate was signed with an insecure algorithm:",
+ c_hostname);
+
+ if (peer_verification & GNUTLS_CERT_NOT_ACTIVATED)
+ GNUTLS_LOG2 (1, max_log_level, "certificate is not yet activated:",
+ c_hostname);
+
+ if (peer_verification & GNUTLS_CERT_EXPIRED)
+ GNUTLS_LOG2 (1, max_log_level, "certificate has expired:",
+ c_hostname);
+
+ if (peer_verification != 0)
+ {
+ if (NILP (verify_hostname_error))
+ GNUTLS_LOG2 (1, max_log_level, "certificate validation failed:",
+ c_hostname);
+ else
+ {
+ emacs_gnutls_deinit (proc);
+ error ("Certificate validation failed %s, verification code %d",
+ c_hostname, peer_verification);
+ }
+ }
/* Up to here the process is the same for X.509 certificates and
OpenPGP keys. From now on X.509 certificates are assumed. This
can be easily extended to work with openpgp keys as well. */
if (fn_gnutls_certificate_type_get (state) == GNUTLS_CRT_X509)
{
- ret = fn_gnutls_x509_crt_init (&gnutls_verify_cert);
+ gnutls_x509_crt_t gnutls_verify_cert;
+ const gnutls_datum_t *gnutls_verify_cert_list;
+ unsigned int gnutls_verify_cert_list_size;
+ ret = fn_gnutls_x509_crt_init (&gnutls_verify_cert);
if (ret < GNUTLS_E_SUCCESS)
return gnutls_make_error (ret);
gnutls_verify_cert_list =
fn_gnutls_certificate_get_peers (state, &gnutls_verify_cert_list_size);
- if (NULL == gnutls_verify_cert_list)
+ if (gnutls_verify_cert_list == NULL)
{
- error ("No x509 certificate was found!\n");
+ fn_gnutls_x509_crt_deinit (gnutls_verify_cert);
+ emacs_gnutls_deinit (proc);
+ error ("No x509 certificate was found\n");
}
/* We only check the first certificate in the given chain. */
@@ -1063,18 +1017,15 @@ one trustfile (usually a CA bundle). */)
if (!fn_gnutls_x509_crt_check_hostname (gnutls_verify_cert, c_hostname))
{
if (NILP (verify_hostname_error))
- {
- GNUTLS_LOG2 (1, max_log_level, "x509 certificate does not match:",
- c_hostname);
- }
+ GNUTLS_LOG2 (1, max_log_level, "x509 certificate does not match:",
+ c_hostname);
else
{
fn_gnutls_x509_crt_deinit (gnutls_verify_cert);
- error ("The x509 certificate does not match \"%s\"",
- c_hostname);
+ emacs_gnutls_deinit (proc);
+ error ("The x509 certificate does not match \"%s\"", c_hostname);
}
}
-
fn_gnutls_x509_crt_deinit (gnutls_verify_cert);
}
diff --git a/src/gnutls.h b/src/gnutls.h
index e2a9bc9eaea..076e9fdba9c 100644
--- a/src/gnutls.h
+++ b/src/gnutls.h
@@ -49,9 +49,9 @@ typedef enum
#define GNUTLS_PROCESS_USABLE(proc) (GNUTLS_INITSTAGE(proc) >= GNUTLS_STAGE_READY)
-#define GNUTLS_LOG(level, max, string) if (level <= max) { gnutls_log_function (level, "(Emacs) " string); }
+#define GNUTLS_LOG(level, max, string) do { if (level <= max) { gnutls_log_function (level, "(Emacs) " string); } } while (0)
-#define GNUTLS_LOG2(level, max, string, extra) if (level <= max) { gnutls_log_function2 (level, "(Emacs) " string, extra); }
+#define GNUTLS_LOG2(level, max, string, extra) do { if (level <= max) { gnutls_log_function2 (level, "(Emacs) " string, extra); } } while (0)
extern EMACS_INT
emacs_gnutls_write (struct Lisp_Process *proc, const char *buf, EMACS_INT nbyte);
@@ -60,6 +60,7 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, EMACS_INT nbyte);
extern int emacs_gnutls_record_check_pending (gnutls_session_t state);
extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err);
+extern Lisp_Object emacs_gnutls_deinit (Lisp_Object);
extern void syms_of_gnutls (void);
diff --git a/src/image.c b/src/image.c
index ef72745a72f..14c74f10607 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2015,7 +2015,7 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth,
/* Bitmaps with a depth less than 16 need a palette. */
/* BITMAPINFO structure already contains the first RGBQUAD. */
if (depth < 16)
- palette_colors = 1 << depth - 1;
+ palette_colors = 1 << (depth - 1);
*ximg = xmalloc (sizeof (XImage) + palette_colors * sizeof (RGBQUAD));
diff --git a/src/intervals.c b/src/intervals.c
index 2063655cdb9..1f3f8cf793e 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1723,8 +1723,6 @@ graft_intervals_into_buffer (INTERVAL source, EMACS_INT position,
BUF_INTERVALS (buffer)->position = BEG;
BUF_INTERVALS (buffer)->up_obj = 1;
- /* Explicitly free the old tree here? */
-
return;
}
diff --git a/src/keyboard.c b/src/keyboard.c
index 6f3bfd8c1e7..eb316947dcb 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8902,6 +8902,14 @@ keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey,
return 0;
}
+static int
+test_undefined (Lisp_Object binding)
+{
+ return (EQ (binding, Qundefined)
+ || (!NILP (binding) && SYMBOLP (binding)
+ && EQ (Fcommand_remapping (binding, Qnil, Qnil), Qundefined)));
+}
+
/* Read a sequence of keys that ends with a non prefix character,
storing it in KEYBUF, a buffer of size BUFSIZE.
Prompt with PROMPT.
@@ -9852,7 +9860,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
}
}
- if (first_binding < nmaps && NILP (submaps[first_binding])
+ if (first_binding < nmaps
+ && NILP (submaps[first_binding])
+ && !test_undefined (defs[first_binding])
&& indec.start >= t)
/* There is a binding and it's not a prefix.
(and it doesn't have any input-decode-map translation pending).
@@ -9879,7 +9889,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
/* If there's a binding (i.e.
first_binding >= nmaps) we don't want
to apply this function-key-mapping. */
- fkey.end + 1 == t && first_binding >= nmaps,
+ fkey.end + 1 == t
+ && (first_binding >= nmaps
+ || test_undefined (defs[first_binding])),
&diff, prompt);
UNGCPRO;
if (done)
diff --git a/src/process.c b/src/process.c
index 90ad9c21681..dc37ec5f961 100644
--- a/src/process.c
+++ b/src/process.c
@@ -642,6 +642,9 @@ make_process (Lisp_Object name)
p->gnutls_initstage = GNUTLS_STAGE_EMPTY;
p->gnutls_log_level = 0;
p->gnutls_p = 0;
+ p->gnutls_state = NULL;
+ p->gnutls_x509_cred = NULL;
+ p->gnutls_anon_cred = NULL;
#endif
/* If name is already in use, modify it until it is unused. */
@@ -3867,6 +3870,11 @@ deactivate_process (Lisp_Object proc)
register int inchannel, outchannel;
register struct Lisp_Process *p = XPROCESS (proc);
+#ifdef HAVE_GNUTLS
+ /* Delete GnuTLS structures in PROC, if any. */
+ emacs_gnutls_deinit (proc);
+#endif /* HAVE_GNUTLS */
+
inchannel = p->infd;
outchannel = p->outfd;
diff --git a/src/sysdep.c b/src/sysdep.c
index b0d5a1abbe3..d666f8dbb79 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -854,6 +854,7 @@ void
init_sys_modes (struct tty_display_info *tty_out)
{
struct emacs_tty tty;
+ Lisp_Object terminal;
Vtty_erase_char = Qnil;
@@ -907,7 +908,9 @@ init_sys_modes (struct tty_display_info *tty_out)
tty.main.c_cflag &= ~PARENB;/* Don't check parity */
}
#endif
- if (tty_out->input == stdin)
+
+ XSETTERMINAL(terminal, tty_out->terminal);
+ if (!NILP (Fcontrolling_tty_p (terminal)))
{
tty.main.c_cc[VINTR] = quit_char; /* C-g (usually) gives SIGINT */
/* Set up C-g for both SIGQUIT and SIGINT.
diff --git a/src/w32.c b/src/w32.c
index 91893ddfc61..42546fc8d49 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -2892,12 +2892,12 @@ sys_rename (const char * oldname, const char * newname)
int i = 0;
oldname = map_w32_filename (oldname, NULL);
- if (o = strrchr (oldname, '\\'))
+ if ((o = strrchr (oldname, '\\')))
o++;
else
o = (char *) oldname;
- if (p = strrchr (temp, '\\'))
+ if ((p = strrchr (temp, '\\')))
p++;
else
p = temp;
@@ -5756,7 +5756,7 @@ w32_delayed_load (Lisp_Object libraries, Lisp_Object library_id)
for (dlls = XCDR (dlls); CONSP (dlls); dlls = XCDR (dlls))
{
CHECK_STRING_CAR (dlls);
- if (library_dll = LoadLibrary (SDATA (XCAR (dlls))))
+ if ((library_dll = LoadLibrary (SDATA (XCAR (dlls)))))
{
found = XCAR (dlls);
break;
diff --git a/src/w32fns.c b/src/w32fns.c
index f48e5764b4c..2ecd6e91533 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -635,9 +635,8 @@ colormap_t w32_color_map[] =
{"LightGreen" , PALETTERGB (144,238,144)},
};
-DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color_map,
- 0, 0, 0, doc: /* Return the default color map. */)
- (void)
+static Lisp_Object
+w32_default_color_map (void)
{
int i;
colormap_t *pc = w32_color_map;
@@ -658,6 +657,13 @@ DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color_map,
return (cmap);
}
+DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color_map,
+ 0, 0, 0, doc: /* Return the default color map. */)
+ (void)
+{
+ return w32_default_color_map ();
+}
+
static Lisp_Object
w32_color_map_lookup (char *colorname)
{
@@ -683,7 +689,6 @@ w32_color_map_lookup (char *colorname)
QUIT;
}
-
UNBLOCK_INPUT;
return ret;
@@ -4768,7 +4773,7 @@ terminate Emacs if we can't open the connection.
UNGCPRO;
}
if (NILP (Vw32_color_map))
- Vw32_color_map = Fw32_default_color_map ();
+ Vw32_color_map = w32_default_color_map ();
/* Merge in system logical colors. */
add_system_logical_colors_to_map (&Vw32_color_map);
diff --git a/src/w32font.c b/src/w32font.c
index 985370c15c1..f47b7a46b1e 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -1916,10 +1916,10 @@ fill_in_logfont (FRAME_PTR f, LOGFONT *logfont, Lisp_Object font_spec)
int spacing = XINT (tmp);
if (spacing < FONT_SPACING_MONO)
logfont->lfPitchAndFamily
- = logfont->lfPitchAndFamily & 0xF0 | VARIABLE_PITCH;
+ = (logfont->lfPitchAndFamily & 0xF0) | VARIABLE_PITCH;
else
logfont->lfPitchAndFamily
- = logfont->lfPitchAndFamily & 0xF0 | FIXED_PITCH;
+ = (logfont->lfPitchAndFamily & 0xF0) | FIXED_PITCH;
}
/* Process EXTRA info. */
diff --git a/src/w32reg.c b/src/w32reg.c
index e1465be9e44..18374431062 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -147,9 +147,9 @@ x_get_string_resource (XrmDatabase rdb, char *name, char *class)
{
char *resource;
- if (resource = w32_get_rdb_resource (rdb, name))
+ if ((resource = w32_get_rdb_resource (rdb, name)))
return resource;
- if (resource = w32_get_rdb_resource (rdb, class))
+ if ((resource = w32_get_rdb_resource (rdb, class)))
return resource;
}
@@ -157,6 +157,5 @@ x_get_string_resource (XrmDatabase rdb, char *name, char *class)
/* --quick was passed, so this is a no-op. */
return NULL;
- return (w32_get_string_resource (name, class, REG_SZ));
+ return w32_get_string_resource (name, class, REG_SZ);
}
-
diff --git a/src/window.c b/src/window.c
index c3b4384137d..0c35b913789 100644
--- a/src/window.c
+++ b/src/window.c
@@ -175,10 +175,10 @@ WINDOW can be any window and defaults to the selected one. */)
}
DEFUN ("frame-root-window", Fframe_root_window, Sframe_root_window, 0, 1, 0,
- doc: /* Return the root window of FRAME_OR_WINDOW.
-If omitted, FRAME_OR_WINDOW defaults to the currently selected frame.
-Else if FRAME_OR_WINDOW denotes any window, return the root window of
-that window's frame. If FRAME_OR_WINDOW denotes a live frame, return
+ doc: /* Return the root window of FRAME-OR-WINDOW.
+If omitted, FRAME-OR-WINDOW defaults to the currently selected frame.
+Else if FRAME-OR-WINDOW denotes any window, return the root window of
+that window's frame. If FRAME-OR-WINDOW denotes a live frame, return
the root window of that frame. */)
(Lisp_Object frame_or_window)
{
@@ -220,10 +220,10 @@ WINDOW can be any window and defaults to the selected one. */)
/* Don't move this to window.el - this must be a safe routine. */
DEFUN ("frame-first-window", Fframe_first_window, Sframe_first_window, 0, 1, 0,
- doc: /* Return the topmost, leftmost live window on FRAME_OR_WINDOW.
-If omitted, FRAME_OR_WINDOW defaults to the currently selected frame.
-Else if FRAME_OR_WINDOW denotes any window, return the first window of
-that window's frame. If FRAME_OR_WINDOW denotes a live frame, return
+ doc: /* Return the topmost, leftmost live window on FRAME-OR-WINDOW.
+If omitted, FRAME-OR-WINDOW defaults to the currently selected frame.
+Else if FRAME-OR-WINDOW denotes any window, return the first window of
+that window's frame. If FRAME-OR-WINDOW denotes a live frame, return
the first window of that frame. */)
(Lisp_Object frame_or_window)
{
@@ -254,10 +254,10 @@ the first window of that frame. */)
DEFUN ("frame-selected-window", Fframe_selected_window,
Sframe_selected_window, 0, 1, 0,
- doc: /* Return the selected window of FRAME_OR_WINDOW.
-If omitted, FRAME_OR_WINDOW defaults to the currently selected frame.
-Else if FRAME_OR_WINDOW denotes any window, return the selected window
-of that window's frame. If FRAME_OR_WINDOW denotes a live frame, return
+ doc: /* Return the selected window of FRAME-OR-WINDOW.
+If omitted, FRAME-OR-WINDOW defaults to the currently selected frame.
+Else if FRAME-OR-WINDOW denotes any window, return the selected window
+of that window's frame. If FRAME-OR-WINDOW denotes a live frame, return
the selected window of that frame. */)
(Lisp_Object frame_or_window)
{
@@ -1297,7 +1297,7 @@ WINDOW must be a live window and defaults to the selected one.
This is updated by redisplay, when it runs to completion.
Simply changing the buffer text or setting `window-start'
does not update this value.
-Return nil if there is no recorded value. \(This can happen if the
+Return nil if there is no recorded value. (This can happen if the
last redisplay of WINDOW was preempted, and did not finish.)
If UPDATE is non-nil, compute the up-to-date position
if it isn't already recorded. */)
@@ -1688,7 +1688,7 @@ DEFUN ("window-parameters", Fwindow_parameters, Swindow_parameters,
0, 1, 0,
doc: /* Return the parameters of WINDOW and their values.
WINDOW defaults to the selected window. The return value is a list of
-elements of the form (PARAMETER . VALUE). */)
+elements of the form (PARAMETER . VALUE). */)
(Lisp_Object window)
{
return Fcopy_alist (decode_any_window (window)->window_parameters);
@@ -2193,7 +2193,7 @@ next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, in
DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0,
doc: /* Return window following WINDOW in cyclic ordering of windows.
-WINDOW must be a live window and defaults to the selected one. The
+WINDOW must be a live window and defaults to the selected one. The
optional arguments MINIBUF and ALL-FRAMES specify the set of windows to
consider.
@@ -3224,7 +3224,7 @@ temp_output_buffer_show (register Lisp_Object buf)
DEFUN ("internal-temp-output-buffer-show",
Ftemp_output_buffer_show, Stemp_output_buffer_show,
1, 1, 0,
- doc: /* Internal function for `with-output-to-temp-buffer''. */)
+ doc: /* Internal function for `with-output-to-temp-buffer'. */)
(Lisp_Object buf)
{
temp_output_buffer_show (buf);
@@ -3845,8 +3845,8 @@ set correctly. See the code of `split-window' for how this is done. */)
DEFUN ("delete-window-internal", Fdelete_window_internal, Sdelete_window_internal, 1, 1, 0,
doc: /* Remove WINDOW from its frame.
-WINDOW defaults to the selected window. Return nil. Signal an error
-when WINDOW is the only window on its frame. */)
+WINDOW defaults to the selected window. Return nil.
+Signal an error when WINDOW is the only window on its frame. */)
(register Lisp_Object window)
{
register Lisp_Object parent, sibling, frame, root;
@@ -5225,8 +5225,8 @@ any partial-height lines in the text display area. */)
DEFUN ("move-to-window-line", Fmove_to_window_line, Smove_to_window_line,
1, 1, "P",
doc: /* Position point relative to window.
-With no argument, position point at center of window.
-An argument specifies vertical position within the window;
+ARG nil means position point at center of window.
+Else, ARG specifies vertical position within the window;
zero means top of window, negative means relative to bottom of window. */)
(Lisp_Object arg)
{