aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-07-12 20:45:56 -0700
committerPaul Eggert2011-07-12 20:45:56 -0700
commit89bfafe5d3e767c2f014b2738196411f8ba39d28 (patch)
treeb7ac7e72d430cebfc414d143e98a664b113ad4b2
parent5adf60bc2313a220185c9f22d3d539a0dc51b228 (diff)
parentcd18e7e3f49c014b83ffa5f2e4391a58ded6a287 (diff)
downloademacs-89bfafe5d3e767c2f014b2738196411f8ba39d28.tar.gz
emacs-89bfafe5d3e767c2f014b2738196411f8ba39d28.zip
Merge from trunk.
-rw-r--r--doc/emacs/ChangeLog10
-rw-r--r--doc/emacs/display.texi4
-rw-r--r--doc/emacs/screen.texi30
-rw-r--r--doc/emacs/text.texi8
-rw-r--r--doc/lispref/ChangeLog19
-rw-r--r--doc/lispref/display.texi44
-rw-r--r--doc/lispref/elisp.texi1
-rw-r--r--doc/lispref/frames.texi6
-rw-r--r--doc/lispref/variables.texi45
-rw-r--r--etc/compilation.txt1
-rw-r--r--lisp/ChangeLog22
-rw-r--r--lisp/files.el6
-rw-r--r--lisp/mouse-sel.el31
-rw-r--r--lisp/progmodes/cc-vars.el3
-rw-r--r--src/ChangeLog40
-rw-r--r--src/alloc.c2
-rw-r--r--src/buffer.c1
-rw-r--r--src/character.c3
-rw-r--r--src/keymap.c8
-rw-r--r--src/window.c3
-rw-r--r--src/xselect.c11
21 files changed, 179 insertions, 119 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index d762ea11654..bd5cfdce66b 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,13 @@
12011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * text.texi (Table Recognition): Use "at point" instead of "under
4 point" (bug#4345).
5
6 * display.texi (Cursor Display): Mention `cursor-type'.
7
8 * screen.texi (Point): Clarify that it's only if you use a block
9 cursor that it appears to be on a character (bug#4345).
10
12011-07-12 Chong Yidong <cyd@stupidchicken.com> 112011-07-12 Chong Yidong <cyd@stupidchicken.com>
2 12
3 * misc.texi (Amusements): Move dissociated press here, from its 13 * misc.texi (Amusements): Move dissociated press here, from its
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 210b1b636a1..bfbfb355c9c 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1211,6 +1211,10 @@ terminal itself blinks the cursor, and Emacs has no control over it.)
1211You can control how the cursor appears when it blinks off by setting 1211You can control how the cursor appears when it blinks off by setting
1212the variable @code{blink-cursor-alist}. 1212the variable @code{blink-cursor-alist}.
1213 1213
1214@vindex cursor-type
1215 You can change the shape of the cursor from the default ``box'' look
1216to a bar by altering the @code{cursor-type} variable.
1217
1214@vindex visible-cursor 1218@vindex visible-cursor
1215 Some text terminals offer two different cursors: the normal cursor 1219 Some text terminals offer two different cursors: the normal cursor
1216and the very visible cursor, where the latter may be e.g. bigger or 1220and the very visible cursor, where the latter may be e.g. bigger or
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi
index 145687270ca..59f65fac8af 100644
--- a/doc/emacs/screen.texi
+++ b/doc/emacs/screen.texi
@@ -73,14 +73,14 @@ different places in the buffer; for example, you can place point by
73clicking mouse button 1 (normally the left button) at the desired 73clicking mouse button 1 (normally the left button) at the desired
74location. 74location.
75 75
76 While the cursor appears to be @emph{on} a character, you should 76 If you use a block cursor, the cursor appears to be @emph{on} a
77think of point as @emph{between} two characters; it points @emph{before} 77character, but you should think of point as @emph{between} two
78the character that appears under the cursor. For example, if your text 78characters; it points @emph{before} the character that appears under
79looks like @samp{frob} with the cursor over the @samp{b}, then point is 79the cursor. For example, if your text looks like @samp{frob} with the
80between the @samp{o} and the @samp{b}. If you insert the character 80cursor over the @samp{b}, then point is between the @samp{o} and the
81@samp{!} at that position, the result is @samp{fro!b}, with point 81@samp{b}. If you insert the character @samp{!} at that position, the
82between the @samp{!} and the @samp{b}. Thus, the cursor remains over 82result is @samp{fro!b}, with point between the @samp{!} and the
83the @samp{b}, as before. 83@samp{b}. Thus, the cursor remains over the @samp{b}, as before.
84 84
85 Sometimes people speak of ``the cursor'' when they mean ``point,'' or 85 Sometimes people speak of ``the cursor'' when they mean ``point,'' or
86speak of commands that move point as ``cursor motion'' commands. 86speak of commands that move point as ``cursor motion'' commands.
@@ -92,12 +92,14 @@ it again later. When Emacs displays multiple windows, each window has
92its own point location. If the same buffer appears in more than one 92its own point location. If the same buffer appears in more than one
93window, each window has its own point position in that buffer. 93window, each window has its own point position in that buffer.
94 94
95 On a graphical display, Emacs shows a cursor in each window; the 95 On a graphical display, Emacs shows a cursor in each window. The
96selected window's cursor is solid and blinking, and the other cursors 96selected window's cursor will be blinking. If you use the default,
97are hollow. On a text-only terminal, there is just one cursor, in the 97@code{box} cursor type, the selected window's cursor will be solid,
98selected window; even though the unselected windows have their own 98and the other cursors are hollow. On a text-only terminal, there is
99point positions, they do not display a cursor. @xref{Cursor Display}, 99just one cursor, in the selected window; even though the unselected
100for customizable variables that control cursor display. 100windows have their own point positions, they do not display a cursor.
101@xref{Cursor Display}, for customizable variables that control cursor
102display.
101 103
102@node Echo Area 104@node Echo Area
103@section The Echo Area 105@section The Echo Area
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index dbda771e6a3..e3f5c05d8da 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -2506,16 +2506,16 @@ Recognize tables within the current region and activate them.
2506Deactivate tables within the current region. 2506Deactivate tables within the current region.
2507@findex table-recognize-table 2507@findex table-recognize-table
2508@item M-x table-recognize-table 2508@item M-x table-recognize-table
2509Recognize the table under point and activate it. 2509Recognize the table at point and activate it.
2510@findex table-unrecognize-table 2510@findex table-unrecognize-table
2511@item M-x table-unrecognize-table 2511@item M-x table-unrecognize-table
2512Deactivate the table under point. 2512Deactivate the table at point.
2513@findex table-recognize-cell 2513@findex table-recognize-cell
2514@item M-x table-recognize-cell 2514@item M-x table-recognize-cell
2515Recognize the cell under point and activate it. 2515Recognize the cell at point and activate it.
2516@findex table-unrecognize-cell 2516@findex table-unrecognize-cell
2517@item M-x table-unrecognize-cell 2517@item M-x table-unrecognize-cell
2518Deactivate the cell under point. 2518Deactivate the cell at point.
2519@end table 2519@end table
2520 2520
2521 For another way of converting text into tables, see @ref{Table 2521 For another way of converting text into tables, see @ref{Table
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 4517faac80e..1d1730e078d 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,22 @@
12011-07-12 Chong Yidong <cyd@stupidchicken.com>
2
3 * display.texi (Face Attributes, Font Selection): Add references
4 to the Fonts node in the Emacs manual (Bug#4178).
5
62011-07-12 Chong Yidong <cyd@stupidchicken.com>
7
8 * display.texi (Window Systems): `window-system' is
9 terminal-local.
10
11 * frames.texi (Frame Parameters, Parameter Access): Don't mention
12 frame-local variables.
13
14 * variables.texi (Buffer-Local Variables): Don't mention obsolete
15 frame-local variables.
16 (Frame-Local Variables): Node deleted.
17
18 * elisp.texi (Top): Update node listing.
19
12011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org> 202011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 21
3 * elisp.texi: Change "inferiors" to "subnodes" in three places 22 * elisp.texi: Change "inferiors" to "subnodes" in three places
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index bc81c59f05f..10119e54670 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -1800,9 +1800,9 @@ height.
1800@cindex faces 1800@cindex faces
1801 1801
1802 A @dfn{face} is a collection of graphical attributes for displaying 1802 A @dfn{face} is a collection of graphical attributes for displaying
1803text: font family, foreground color, background color, optional 1803text: font, foreground color, background color, optional underlining,
1804underlining, and so on. Faces control how buffer text is displayed, 1804and so on. Faces control how buffer text is displayed, and how some
1805and how some parts of the frame, such as the mode-line, are displayed. 1805parts of the frame, such as the mode-line, are displayed.
1806@xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of 1806@xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of
1807faces Emacs normally comes with. 1807faces Emacs normally comes with.
1808 1808
@@ -2001,16 +2001,17 @@ attribute is ignored.
2001 2001
2002@table @code 2002@table @code
2003@item :family 2003@item :family
2004Font family name or fontset name (a string). If you specify a font 2004Font family or fontset (a string). @xref{Fonts,,, emacs, The GNU
2005family name, the wild-card characters @samp{*} and @samp{?} are 2005Emacs Manual}. If you specify a font family name, the wild-card
2006allowed. The function @code{font-family-list}, described below, 2006characters @samp{*} and @samp{?} are allowed. The function
2007returns a list of available family names. @xref{Fontsets}, for 2007@code{font-family-list}, described below, returns a list of available
2008information about fontsets. 2008family names. @xref{Fontsets}, for information about fontsets.
2009 2009
2010@item :foundry 2010@item :foundry
2011The name of the @dfn{font foundry} in which the font family specified 2011The name of the @dfn{font foundry} for the font family specified by
2012by the @code{:family} attribute is located (a string). The wild-card 2012the @code{:family} attribute (a string). The wild-card characters
2013characters @samp{*} and @samp{?} are allowed. 2013@samp{*} and @samp{?} are allowed. @xref{Fonts,,, emacs, The GNU
2014Emacs Manual}.
2014 2015
2015@item :width 2016@item :width
2016Relative proportionate character width, also known as the character 2017Relative proportionate character width, also known as the character
@@ -2684,14 +2685,15 @@ usually assign faces to around 400 to 600 characters at each call.
2684 Before Emacs can draw a character on a particular display, it must 2685 Before Emacs can draw a character on a particular display, it must
2685select a @dfn{font} for that character@footnote{In this context, the 2686select a @dfn{font} for that character@footnote{In this context, the
2686term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock 2687term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock
2687Mode}).}. Normally, Emacs automatically chooses a font based on the 2688Mode}).}. @xref{Fonts,,, emacs, The GNU Emacs Manual}. Normally,
2688faces assigned to that character---specifically, the face attributes 2689Emacs automatically chooses a font based on the faces assigned to that
2689@code{:family}, @code{:weight}, @code{:slant}, and @code{:width} 2690character---specifically, the face attributes @code{:family},
2690(@pxref{Face Attributes}). The choice of font also depends on the 2691@code{:weight}, @code{:slant}, and @code{:width} (@pxref{Face
2691character to be displayed; some fonts can only display a limited set 2692Attributes}). The choice of font also depends on the character to be
2692of characters. If no available font exactly fits the requirements, 2693displayed; some fonts can only display a limited set of characters.
2693Emacs looks for the @dfn{closest matching font}. The variables in 2694If no available font exactly fits the requirements, Emacs looks for
2694this section control how Emacs makes this selection. 2695the @dfn{closest matching font}. The variables in this section
2696control how Emacs makes this selection.
2695 2697
2696@defopt face-font-family-alternatives 2698@defopt face-font-family-alternatives
2697If a given family is specified but does not exist, this variable 2699If a given family is specified but does not exist, this variable
@@ -5910,8 +5912,8 @@ differently. An Emacs frame is a single window as far as X is
5910concerned; the individual Emacs windows are not known to X at all. 5912concerned; the individual Emacs windows are not known to X at all.
5911 5913
5912@defvar window-system 5914@defvar window-system
5913This frame-local variable tells Lisp programs what window system Emacs is using 5915This terminal-local variable tells Lisp programs what window system
5914for displaying the frame. The possible values are 5916Emacs is using for displaying the frame. The possible values are
5915 5917
5916@table @code 5918@table @code
5917@item x 5919@item x
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 4f8dce561a5..bb05f1b4a0b 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -430,7 +430,6 @@ Variables
430* File Local Variables:: Handling local variable lists in files. 430* File Local Variables:: Handling local variable lists in files.
431* Directory Local Variables:: Local variables common to all files in a 431* Directory Local Variables:: Local variables common to all files in a
432 directory. 432 directory.
433* Frame-Local Variables:: Frame-local bindings for variables.
434* Variable Aliases:: Variables that are aliases for other variables. 433* Variable Aliases:: Variables that are aliases for other variables.
435* Variables with Restricted Values:: Non-constant variables whose value can 434* Variables with Restricted Values:: Non-constant variables whose value can
436 @emph{not} be an arbitrary Lisp object. 435 @emph{not} be an arbitrary Lisp object.
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 9a30ba5fdb4..b6012a4dd53 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -337,9 +337,6 @@ parameters @code{foreground-color}, @code{background-color},
337If the terminal supports frame transparency, the parameter 337If the terminal supports frame transparency, the parameter
338@code{alpha} is also meaningful. 338@code{alpha} is also meaningful.
339 339
340 You can use frame parameters to define frame-local bindings for
341variables. @xref{Frame-Local Variables}.
342
343@menu 340@menu
344* Parameter Access:: How to change a frame's parameters. 341* Parameter Access:: How to change a frame's parameters.
345* Initial Parameters:: Specifying frame parameters when you make a frame. 342* Initial Parameters:: Specifying frame parameters when you make a frame.
@@ -374,9 +371,6 @@ elements of @var{alist}. Each element of @var{alist} has the form
374parameter. If you don't mention a parameter in @var{alist}, its value 371parameter. If you don't mention a parameter in @var{alist}, its value
375doesn't change. If @var{frame} is @code{nil}, it defaults to the selected 372doesn't change. If @var{frame} is @code{nil}, it defaults to the selected
376frame. 373frame.
377
378You can use this function to define frame-local bindings for
379variables, see @ref{Frame-Local Variables}.
380@end defun 374@end defun
381 375
382@defun set-frame-parameter frame parm value 376@defun set-frame-parameter frame parm value
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 4ec1779b732..3da09369882 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -39,7 +39,6 @@ representing the variable.
39* Buffer-Local Variables:: Variable values in effect only in one buffer. 39* Buffer-Local Variables:: Variable values in effect only in one buffer.
40* File Local Variables:: Handling local variable lists in files. 40* File Local Variables:: Handling local variable lists in files.
41* Directory Local Variables:: Local variables common to all files in a directory. 41* Directory Local Variables:: Local variables common to all files in a directory.
42* Frame-Local Variables:: Frame-local bindings for variables.
43* Variable Aliases:: Variables that are aliases for other variables. 42* Variable Aliases:: Variables that are aliases for other variables.
44* Variables with Restricted Values:: Non-constant variables whose value can 43* Variables with Restricted Values:: Non-constant variables whose value can
45 @emph{not} be an arbitrary Lisp object. 44 @emph{not} be an arbitrary Lisp object.
@@ -1187,8 +1186,7 @@ additional, unusual kinds of variable binding, such as
1187@dfn{buffer-local} bindings, which apply only in one buffer. Having 1186@dfn{buffer-local} bindings, which apply only in one buffer. Having
1188different values for a variable in different buffers is an important 1187different values for a variable in different buffers is an important
1189customization method. (Variables can also have bindings that are 1188customization method. (Variables can also have bindings that are
1190local to each terminal, or to each frame. @xref{Multiple Terminals}, 1189local to each terminal. @xref{Multiple Terminals}.)
1191and @xref{Frame-Local Variables}.)
1192 1190
1193@menu 1191@menu
1194* Intro to Buffer-Local:: Introduction and concepts. 1192* Intro to Buffer-Local:: Introduction and concepts.
@@ -1287,9 +1285,8 @@ buffer-local binding of buffer @samp{b}.
1287values when you visit the file. @xref{File Variables,,, emacs, The 1285values when you visit the file. @xref{File Variables,,, emacs, The
1288GNU Emacs Manual}. 1286GNU Emacs Manual}.
1289 1287
1290 A buffer-local variable cannot be made frame-local 1288 A buffer-local variable cannot be made terminal-local
1291(@pxref{Frame-Local Variables}) or terminal-local (@pxref{Multiple 1289(@pxref{Multiple Terminals}).
1292Terminals}).
1293 1290
1294@node Creating Buffer-Local 1291@node Creating Buffer-Local
1295@subsection Creating and Deleting Buffer-Local Bindings 1292@subsection Creating and Deleting Buffer-Local Bindings
@@ -1340,9 +1337,9 @@ is not current either on entry to or exit from the @code{let}. This is
1340because @code{let} does not distinguish between different kinds of 1337because @code{let} does not distinguish between different kinds of
1341bindings; it knows only which variable the binding was made for. 1338bindings; it knows only which variable the binding was made for.
1342 1339
1343If the variable is terminal-local (@pxref{Multiple Terminals}), or 1340If the variable is terminal-local (@pxref{Multiple Terminals}), this
1344frame-local (@pxref{Frame-Local Variables}), this function signals an 1341function signals an error. Such variables cannot have buffer-local
1345error. Such variables cannot have buffer-local bindings as well. 1342bindings as well.
1346 1343
1347@strong{Warning:} do not use @code{make-local-variable} for a hook 1344@strong{Warning:} do not use @code{make-local-variable} for a hook
1348variable. The hook variables are automatically made buffer-local as 1345variable. The hook variables are automatically made buffer-local as
@@ -1880,36 +1877,6 @@ modification times of the associated directory local variables file
1880updates this list. 1877updates this list.
1881@end defvar 1878@end defvar
1882 1879
1883@node Frame-Local Variables
1884@section Frame-Local Values for Variables
1885@cindex frame-local variables
1886
1887 In addition to buffer-local variable bindings (@pxref{Buffer-Local
1888Variables}), Emacs supports @dfn{frame-local} bindings. A frame-local
1889binding for a variable is in effect in a frame for which it was
1890defined.
1891
1892 In practice, frame-local variables have not proven very useful.
1893Ordinary frame parameters are generally used instead (@pxref{Frame
1894Parameters}). The function @code{make-variable-frame-local}, which
1895was used to define frame-local variables, has been deprecated since
1896Emacs 22.2. However, you can still define a frame-specific binding
1897for a variable @var{var} in frame @var{frame}, by setting the
1898@var{var} frame parameter for that frame:
1899
1900@lisp
1901 (modify-frame-parameters @var{frame} '((@var{var} . @var{value})))
1902@end lisp
1903
1904@noindent
1905This causes the variable @var{var} to be bound to the specified
1906@var{value} in the named @var{frame}. To check the frame-specific
1907values of such variables, use @code{frame-parameter}. @xref{Parameter
1908Access}.
1909
1910 Note that you cannot have a frame-local binding for a variable that
1911has a buffer-local binding.
1912
1913@node Variable Aliases 1880@node Variable Aliases
1914@section Variable Aliases 1881@section Variable Aliases
1915@cindex variable aliases 1882@cindex variable aliases
diff --git a/etc/compilation.txt b/etc/compilation.txt
index 0eb3fe1bda2..888c1f94c33 100644
--- a/etc/compilation.txt
+++ b/etc/compilation.txt
@@ -254,6 +254,7 @@ foo.c:8.23-45: Informational: message
254foo.c:8-23: message 254foo.c:8-23: message
255foo.c:8-45.3: message 255foo.c:8-45.3: message
256foo.c:8.23-9.1: message 256foo.c:8.23-9.1: message
257foo.el:3:1:Error: End of file during parsing
257jade:dbcommon.dsl:133:17:E: missing argument for function call 258jade:dbcommon.dsl:133:17:E: missing argument for function call
258G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found. 259G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
259file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found. 260file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7a9e0267c3e..19c80a65888 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,25 @@
12011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * files.el (after-find-file): Give a better error message when
4 trying to find a symlink that points to a file that doesn't exist
5 (bug#4398).
6
7 * progmodes/cc-vars.el: Remove (probably) misleading comment
8 (bug#4396).
9
102011-07-12 Johan Bockgård <bojohan@gnu.org>
11
12 * mouse-sel.el (mouse-sel-primary-overlay): Use the `region' face.
13
142011-07-12 Chong Yidong <cyd@stupidchicken.com>
15
16 * mouse-sel.el: Hack restoring functionality, while keeping
17 compatibility with 2010-07-03 changes to mouse selection.
18 (mouse-sel-primary-overlay): New var.
19 (mouse-sel-selection-alist): Use it.
20 (mouse-sel-mode): Doc fix; remove points that are default features
21 of mouse.el.
22
12011-07-12 Johan Bockgård <bojohan@gnu.org> 232011-07-12 Johan Bockgård <bojohan@gnu.org>
2 24
3 * progmodes/compile.el (compilation-error-regexp-alist-alist): 25 * progmodes/compile.el (compilation-error-regexp-alist-alist):
diff --git a/lisp/files.el b/lisp/files.el
index 1071adb6967..bf38ce39a07 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2060,7 +2060,11 @@ unless NOMODES is non-nil."
2060 ((not warn) nil) 2060 ((not warn) nil)
2061 ((and error (file-attributes buffer-file-name)) 2061 ((and error (file-attributes buffer-file-name))
2062 (setq buffer-read-only t) 2062 (setq buffer-read-only t)
2063 "File exists, but cannot be read") 2063 (if (and (file-symlink-p buffer-file-name)
2064 (not (file-exists-p
2065 (file-chase-links buffer-file-name))))
2066 "Symbolic link that points to nonexistent file"
2067 "File exists, but cannot be read"))
2064 ((not buffer-read-only) 2068 ((not buffer-read-only)
2065 (if (and warn 2069 (if (and warn
2066 ;; No need to warn if buffer is auto-saved 2070 ;; No need to warn if buffer is auto-saved
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el
index 1f601377ad4..50d221b6fa0 100644
--- a/lisp/mouse-sel.el
+++ b/lisp/mouse-sel.el
@@ -202,14 +202,10 @@ If nil, point will always be placed at the beginning of the region."
202With prefix ARG, turn Mouse Sel mode on if and only if ARG is positive. 202With prefix ARG, turn Mouse Sel mode on if and only if ARG is positive.
203Returns the new status of Mouse Sel mode (non-nil means on). 203Returns the new status of Mouse Sel mode (non-nil means on).
204 204
205When Mouse Sel mode is enabled, mouse selection is enhanced in various ways: 205When Mouse Sel mode is enabled, mouse selection is enhanced in
206various ways:
206 207
207- Clicking mouse-1 starts (cancels) selection, dragging extends it. 208- Double-clicking on symbol constituents selects symbols.
208
209- Clicking or dragging mouse-3 extends the selection as well.
210
211- Double-clicking on word constituents selects words.
212Double-clicking on symbol constituents selects symbols.
213Double-clicking on quotes or parentheses selects sexps. 209Double-clicking on quotes or parentheses selects sexps.
214Double-clicking on whitespace selects whitespace. 210Double-clicking on whitespace selects whitespace.
215Triple-clicking selects lines. 211Triple-clicking selects lines.
@@ -224,14 +220,8 @@ mouse-sel sets the variables `interprogram-cut-function' and
224- Clicking mouse-2 inserts the contents of the primary selection at 220- Clicking mouse-2 inserts the contents of the primary selection at
225the mouse position (or point, if `mouse-yank-at-point' is non-nil). 221the mouse position (or point, if `mouse-yank-at-point' is non-nil).
226 222
227- Pressing mouse-2 while selecting or extending copies selection 223- mouse-2 while selecting or extending copies selection to the
228to the kill ring. Pressing mouse-1 or mouse-3 kills it. 224kill ring; mouse-1 or mouse-3 kills it."
229
230- Double-clicking mouse-3 also kills selection.
231
232- M-mouse-1, M-mouse-2 & M-mouse-3 work similarly to mouse-1, mouse-2
233& mouse-3, but operate on the X secondary selection rather than the
234primary selection and region."
235 :global t 225 :global t
236 :group 'mouse-sel 226 :group 'mouse-sel
237 (if mouse-sel-mode 227 (if mouse-sel-mode
@@ -286,8 +276,17 @@ primary selection and region."
286 (setq mouse-secondary-overlay (make-overlay 1 1)) 276 (setq mouse-secondary-overlay (make-overlay 1 1))
287 (overlay-put mouse-secondary-overlay 'face 'secondary-selection)) 277 (overlay-put mouse-secondary-overlay 'face 'secondary-selection))
288 278
279(defconst mouse-sel-primary-overlay
280 (let ((ol (make-overlay (point-min) (point-min))))
281 (delete-overlay ol)
282 (overlay-put ol 'face 'region)
283 ol)
284 "An overlay which records the current primary selection.
285This is used by Mouse Sel mode only.")
286
289(defconst mouse-sel-selection-alist 287(defconst mouse-sel-selection-alist
290 '((SECONDARY mouse-secondary-overlay mouse-sel-secondary-thing)) 288 '((PRIMARY mouse-sel-primary-overlay mouse-sel-primary-thing)
289 (SECONDARY mouse-secondary-overlay mouse-sel-secondary-thing))
291 "Alist associating selections with variables. 290 "Alist associating selections with variables.
292Each element is of the form: 291Each element is of the form:
293 292
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index d2a5d117635..58dc1737c5a 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -1633,8 +1633,7 @@ as designated in the variable `c-file-style'.")
1633;; It isn't possible to specify a doc-string without specifying an 1633;; It isn't possible to specify a doc-string without specifying an
1634;; initial value with `defvar', so the following two variables have been 1634;; initial value with `defvar', so the following two variables have been
1635;; given doc-strings by setting the property `variable-documentation' 1635;; given doc-strings by setting the property `variable-documentation'
1636;; directly. C-h v will read this documentation only for versions of GNU 1636;; directly. It's really good not to have an initial value for
1637;; Emacs from 22.1. It's really good not to have an initial value for
1638;; variables like these that always should be dynamically bound, so it's 1637;; variables like these that always should be dynamically bound, so it's
1639;; worth the inconvenience. 1638;; worth the inconvenience.
1640 1639
diff --git a/src/ChangeLog b/src/ChangeLog
index 9513dfd8e64..fd1644c9b98 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -2,8 +2,6 @@
2 2
3 * image.c (png_load): Don't assume height * row_bytes fits in 'int'. 3 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
4 4
52011-07-12 Paul Eggert <eggert@cs.ucla.edu>
6
7 * bidi.c (bidi_dump_cached_states): Use pD to print ptrdiff_t. 5 * bidi.c (bidi_dump_cached_states): Use pD to print ptrdiff_t.
8 6
9 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug. 7 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
@@ -92,8 +90,8 @@
92 * bidi.c: Integer signedness and overflow fixes. 90 * bidi.c: Integer signedness and overflow fixes.
93 (bidi_cache_idx, bidi_cache_last_idx, bidi_cache_fetch_state) 91 (bidi_cache_idx, bidi_cache_last_idx, bidi_cache_fetch_state)
94 (bidi_cache_search, bidi_cache_find_level_change) 92 (bidi_cache_search, bidi_cache_find_level_change)
95 (bidi_cache_iterator_state, bidi_cache_find, bidi_find_other_level_edge) 93 (bidi_cache_iterator_state, bidi_cache_find)
96 (bidi_dump_cached_states): 94 (bidi_find_other_level_edge, bidi_dump_cached_states):
97 Don't arbitrarily limit cache indexes to int; use ptrdiff_t instead. 95 Don't arbitrarily limit cache indexes to int; use ptrdiff_t instead.
98 (bidi_cache_size): Use ptrdiff_t rather than size_t, as we prefer 96 (bidi_cache_size): Use ptrdiff_t rather than size_t, as we prefer
99 signed integers. 97 signed integers.
@@ -166,6 +164,40 @@
166 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally 164 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
167 well either way, and we prefer signed to unsigned. 165 well either way, and we prefer signed to unsigned.
168 166
1672011-07-13 Johan Bockgård <bojohan@gnu.org>
168
169 Fix execution of x selection hooks.
170 * xselect.c (Qx_lost_selection_functions)
171 (Qx_sent_selection_functions): New vars.
172 (syms_of_xselect): DEFSYM them.
173 (x_handle_selection_request): Pass Qx_sent_selection_functions
174 rather than Vx_sent_selection_functions to Frun_hook_with_args.
175 (x_handle_selection_clear,x_clear_frame_selections):
176 Pass Qx_lost_selection_functions rather than
177 Vx_lost_selection_functions to Frun_hook_with_args.
178
1792011-07-13 Paul Eggert <eggert@cs.ucla.edu>
180
181 * buffer.c (Fget_buffer_create): Initialized inhibit_shrinking.
182 The old code sometimes used this field without initializing it.
183
184 * alloc.c (gc_sweep): Don't read past end of array.
185 In theory, the old code could also have corrupted Emacs internals,
186 though it'd be very unlikely.
187
1882011-07-12 Andreas Schwab <schwab@linux-m68k.org>
189
190 * character.c (Fcharacterp): Don't advertise optional ignored
191 argument. (Bug#4026)
192
1932011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
194
195 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
196 key" (bug#4257).
197
198 * window.c (Fset_window_start): Doc fix (bug#4199).
199 (Fset_window_hscroll): Ditto.
200
1692011-07-12 Paul Eggert <eggert@cs.ucla.edu> 2012011-07-12 Paul Eggert <eggert@cs.ucla.edu>
170 202
171 Fix minor new problems caught by GCC 4.6.1. 203 Fix minor new problems caught by GCC 4.6.1.
diff --git a/src/alloc.c b/src/alloc.c
index f325b6ed449..eb356fd0e83 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5753,7 +5753,7 @@ gc_sweep (void)
5753 int ilim = (lim + BITS_PER_INT - 1) / BITS_PER_INT; 5753 int ilim = (lim + BITS_PER_INT - 1) / BITS_PER_INT;
5754 5754
5755 /* Scan the mark bits an int at a time. */ 5755 /* Scan the mark bits an int at a time. */
5756 for (i = 0; i <= ilim; i++) 5756 for (i = 0; i < ilim; i++)
5757 { 5757 {
5758 if (cblk->gcmarkbits[i] == -1) 5758 if (cblk->gcmarkbits[i] == -1)
5759 { 5759 {
diff --git a/src/buffer.c b/src/buffer.c
index 05e96e85112..7a94bc79be0 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -361,6 +361,7 @@ even if it is dead. The return value is never nil. */)
361 BUF_END_UNCHANGED (b) = 0; 361 BUF_END_UNCHANGED (b) = 0;
362 BUF_BEG_UNCHANGED (b) = 0; 362 BUF_BEG_UNCHANGED (b) = 0;
363 *(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */ 363 *(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */
364 b->text->inhibit_shrinking = 0;
364 365
365 b->newline_cache = 0; 366 b->newline_cache = 0;
366 b->width_run_cache = 0; 367 b->width_run_cache = 0;
diff --git a/src/character.c b/src/character.c
index 7fc5d647ff5..8e9b3e3775e 100644
--- a/src/character.c
+++ b/src/character.c
@@ -258,7 +258,8 @@ multibyte_char_to_unibyte_safe (int c)
258} 258}
259 259
260DEFUN ("characterp", Fcharacterp, Scharacterp, 1, 2, 0, 260DEFUN ("characterp", Fcharacterp, Scharacterp, 1, 2, 0,
261 doc: /* Return non-nil if OBJECT is a character. */) 261 doc: /* Return non-nil if OBJECT is a character.
262usage: (characterp OBJECT) */)
262 (Lisp_Object object, Lisp_Object ignore) 263 (Lisp_Object object, Lisp_Object ignore)
263{ 264{
264 return (CHARACTERP (object) ? Qt : Qnil); 265 return (CHARACTERP (object) ? Qt : Qnil);
diff --git a/src/keymap.c b/src/keymap.c
index d33af68be48..0169276bef9 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3712,11 +3712,11 @@ the same way. The "active" keymaps in each alist are used before
3712 Vemulation_mode_map_alists = Qnil; 3712 Vemulation_mode_map_alists = Qnil;
3713 3713
3714 DEFVAR_LISP ("where-is-preferred-modifier", Vwhere_is_preferred_modifier, 3714 DEFVAR_LISP ("where-is-preferred-modifier", Vwhere_is_preferred_modifier,
3715 doc: /* Preferred modifier to use for `where-is'. 3715 doc: /* Preferred modifier key to use for `where-is'.
3716When a single binding is requested, `where-is' will return one that 3716When a single binding is requested, `where-is' will return one that
3717uses this modifier if possible. If nil, or if no such binding exists, 3717uses this modifier key if possible. If nil, or if no such binding
3718bindings using keys without modifiers (or only with meta) will be 3718exists, bindings using keys without modifiers (or only with meta) will
3719preferred. */); 3719be preferred. */);
3720 Vwhere_is_preferred_modifier = Qnil; 3720 Vwhere_is_preferred_modifier = Qnil;
3721 where_is_preferred_modifier = 0; 3721 where_is_preferred_modifier = 0;
3722 3722
diff --git a/src/window.c b/src/window.c
index 154efe4a222..e390c13dce0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -683,6 +683,7 @@ WINDOW must be a live window and defaults to the selected one. */)
683 683
684DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, 684DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0,
685 doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL. 685 doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL.
686If WINDOW is nil, the selected window is used.
686Return NCOL. NCOL should be zero or positive. 687Return NCOL. NCOL should be zero or positive.
687 688
688Note that if `automatic-hscrolling' is non-nil, you cannot scroll the 689Note that if `automatic-hscrolling' is non-nil, you cannot scroll the
@@ -1410,7 +1411,7 @@ Return POS. */)
1410 1411
1411DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, 1412DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0,
1412 doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. 1413 doc: /* Make display in WINDOW start at position POS in WINDOW's buffer.
1413WINDOW defaults to the selected window. Return POS. 1414If WINDOW is nil, the selected window is used. Return POS.
1414Optional third arg NOFORCE non-nil inhibits next redisplay from 1415Optional third arg NOFORCE non-nil inhibits next redisplay from
1415overriding motion of point in order to display at this exact start. */) 1416overriding motion of point in order to display at this exact start. */)
1416 (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce) 1417 (Lisp_Object window, Lisp_Object pos, Lisp_Object noforce)
diff --git a/src/xselect.c b/src/xselect.c
index 93a5c8bfa02..f63977a73de 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -112,6 +112,7 @@ static Lisp_Object QUTF8_STRING; /* This is a type of selection. */
112static Lisp_Object Qcompound_text_with_extensions; 112static Lisp_Object Qcompound_text_with_extensions;
113 113
114static Lisp_Object Qforeign_selection; 114static Lisp_Object Qforeign_selection;
115static Lisp_Object Qx_lost_selection_functions, Qx_sent_selection_functions;
115 116
116/* If this is a smaller number than the max-request-size of the display, 117/* If this is a smaller number than the max-request-size of the display,
117 emacs will use INCR selection transfer when the selection is larger 118 emacs will use INCR selection transfer when the selection is larger
@@ -855,7 +856,7 @@ x_handle_selection_request (struct input_event *event)
855 && !EQ (Vx_sent_selection_functions, Qunbound)) 856 && !EQ (Vx_sent_selection_functions, Qunbound))
856 { 857 {
857 Lisp_Object args[4]; 858 Lisp_Object args[4];
858 args[0] = Vx_sent_selection_functions; 859 args[0] = Qx_sent_selection_functions;
859 args[1] = selection_symbol; 860 args[1] = selection_symbol;
860 args[2] = target_symbol; 861 args[2] = target_symbol;
861 args[3] = success ? Qt : Qnil; 862 args[3] = success ? Qt : Qnil;
@@ -979,7 +980,7 @@ x_handle_selection_clear (struct input_event *event)
979 /* Run the `x-lost-selection-functions' abnormal hook. */ 980 /* Run the `x-lost-selection-functions' abnormal hook. */
980 { 981 {
981 Lisp_Object args[2]; 982 Lisp_Object args[2];
982 args[0] = Vx_lost_selection_functions; 983 args[0] = Qx_lost_selection_functions;
983 args[1] = selection_symbol; 984 args[1] = selection_symbol;
984 Frun_hook_with_args (2, args); 985 Frun_hook_with_args (2, args);
985 } 986 }
@@ -1020,7 +1021,7 @@ x_clear_frame_selections (FRAME_PTR f)
1020 { 1021 {
1021 /* Run the `x-lost-selection-functions' abnormal hook. */ 1022 /* Run the `x-lost-selection-functions' abnormal hook. */
1022 Lisp_Object args[2]; 1023 Lisp_Object args[2];
1023 args[0] = Vx_lost_selection_functions; 1024 args[0] = Qx_lost_selection_functions;
1024 args[1] = Fcar (Fcar (t->Vselection_alist)); 1025 args[1] = Fcar (Fcar (t->Vselection_alist));
1025 Frun_hook_with_args (2, args); 1026 Frun_hook_with_args (2, args);
1026 1027
@@ -1033,7 +1034,7 @@ x_clear_frame_selections (FRAME_PTR f)
1033 && EQ (frame, XCAR (XCDR (XCDR (XCDR (XCAR (XCDR (rest)))))))) 1034 && EQ (frame, XCAR (XCDR (XCDR (XCDR (XCAR (XCDR (rest))))))))
1034 { 1035 {
1035 Lisp_Object args[2]; 1036 Lisp_Object args[2];
1036 args[0] = Vx_lost_selection_functions; 1037 args[0] = Qx_lost_selection_functions;
1037 args[1] = XCAR (XCAR (XCDR (rest))); 1038 args[1] = XCAR (XCAR (XCDR (rest)));
1038 Frun_hook_with_args (2, args); 1039 Frun_hook_with_args (2, args);
1039 XSETCDR (rest, XCDR (XCDR (rest))); 1040 XSETCDR (rest, XCDR (XCDR (rest)));
@@ -2682,4 +2683,6 @@ A value of 0 means wait as long as necessary. This is initialized from the
2682 DEFSYM (QNULL, "NULL"); 2683 DEFSYM (QNULL, "NULL");
2683 DEFSYM (Qcompound_text_with_extensions, "compound-text-with-extensions"); 2684 DEFSYM (Qcompound_text_with_extensions, "compound-text-with-extensions");
2684 DEFSYM (Qforeign_selection, "foreign-selection"); 2685 DEFSYM (Qforeign_selection, "foreign-selection");
2686 DEFSYM (Qx_lost_selection_functions, "x-lost-selection-functions");
2687 DEFSYM (Qx_sent_selection_functions, "x-sent-selection-functions");
2685} 2688}