aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2012-03-07 09:41:43 +0100
committerJoakim Verona2012-03-07 09:41:43 +0100
commit1e3a41b29b5bd263cde651d9f23517c8a29155dc (patch)
tree521dbc7d21eff3acefe3e74e2585f49923924534
parent28485daaf752ff5264ed2f6a32ec15588beaa929 (diff)
parent3266b56f817e562638f0ab7ca36fe5e01a44f831 (diff)
downloademacs-1e3a41b29b5bd263cde651d9f23517c8a29155dc.tar.gz
emacs-1e3a41b29b5bd263cde651d9f23517c8a29155dc.zip
upstream
-rw-r--r--admin/FOR-RELEASE4
-rw-r--r--doc/lispref/ChangeLog24
-rw-r--r--doc/lispref/markers.texi88
-rw-r--r--doc/lispref/text.texi75
-rw-r--r--lisp/ChangeLog33
-rw-r--r--lisp/cus-start.el2
-rw-r--r--lisp/files.el32
-rw-r--r--lisp/notifications.el59
-rw-r--r--lisp/progmodes/gdb-mi.el8
-rw-r--r--lisp/term/pc-win.el22
10 files changed, 220 insertions, 127 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 99b702ad30f..bfe831fa07f 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -211,14 +211,14 @@ lists.texi cyd
211loading.texi cyd 211loading.texi cyd
212macros.texi cyd 212macros.texi cyd
213maps.texi rgm 213maps.texi rgm
214markers.texi 214markers.texi rgm
215minibuf.texi 215minibuf.texi
216modes.texi cyd 216modes.texi cyd
217nonascii.texi 217nonascii.texi
218numbers.texi cyd 218numbers.texi cyd
219objects.texi cyd 219objects.texi cyd
220os.texi 220os.texi
221package.texi 221package.texi rgm
222positions.texi cyd 222positions.texi cyd
223processes.texi 223processes.texi
224searching.texi 224searching.texi
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 7f11c65f9e1..42ec24fac5f 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,27 @@
12012-03-07 Glenn Morris <rgm@gnu.org>
2
3 * markers.texi (The Region): Briefly mention use-empty-active-region
4 and region-active-p.
5 (Overview of Markers): Reword garbage collection, add cross-ref.
6 (The Mark): Tiny clarification re command loop and activate-mark-hook.
7
82012-03-07 Chong Yidong <cyd@gnu.org>
9
10 * text.texi (Buffer Contents): Don't duplicate explanation of
11 region arguments from Text node. Put doc of obsolete var
12 buffer-substring-filters back, since it is referred to.
13 (Low-Level Kill Ring): Yank now uses clipboard instead of primary
14 selection by default.
15
16 * markers.texi (The Mark): Fix typo.
17 (The Region): Copyedits.
18
192012-03-07 Glenn Morris <rgm@gnu.org>
20
21 * markers.texi (Overview of Markers): Copyedits.
22 (Creating Markers): Update approximate example buffer size.
23 (The Mark): Don't mention uninteresting return values.
24
12012-03-05 Chong Yidong <cyd@gnu.org> 252012-03-05 Chong Yidong <cyd@gnu.org>
2 26
3 * positions.texi (Text Lines): Document count-words. 27 * positions.texi (Text Lines): Document count-words.
diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi
index e8a009de401..25a9fc88fc5 100644
--- a/doc/lispref/markers.texi
+++ b/doc/lispref/markers.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/markers 5@setfilename ../../info/markers
6@node Markers, Text, Positions, Top 6@node Markers, Text, Positions, Top
@@ -27,8 +27,8 @@ deleted, so that it stays with the two characters on either side of it.
27@node Overview of Markers 27@node Overview of Markers
28@section Overview of Markers 28@section Overview of Markers
29 29
30 A marker specifies a buffer and a position in that buffer. The 30 A marker specifies a buffer and a position in that buffer. A
31marker can be used to represent a position in the functions that 31marker can be used to represent a position in functions that
32require one, just as an integer could be used. In that case, the 32require one, just as an integer could be used. In that case, the
33marker's buffer is normally ignored. Of course, a marker used in this 33marker's buffer is normally ignored. Of course, a marker used in this
34way usually points to a position in the buffer that the function 34way usually points to a position in the buffer that the function
@@ -38,12 +38,12 @@ operates on, but that is entirely the programmer's responsibility.
38 A marker has three attributes: the marker position, the marker 38 A marker has three attributes: the marker position, the marker
39buffer, and the insertion type. The marker position is an integer 39buffer, and the insertion type. The marker position is an integer
40that is equivalent (at a given time) to the marker as a position in 40that is equivalent (at a given time) to the marker as a position in
41that buffer. But the marker's position value can change often during 41that buffer. But the marker's position value can change during
42the life of the marker. Insertion and deletion of text in the buffer 42the life of the marker, and often does. Insertion and deletion of
43relocate the marker. The idea is that a marker positioned between two 43text in the buffer relocate the marker. The idea is that a marker
44characters remains between those two characters despite insertion and 44positioned between two characters remains between those two characters
45deletion elsewhere in the buffer. Relocation changes the integer 45despite insertion and deletion elsewhere in the buffer. Relocation
46equivalent of the marker. 46changes the integer equivalent of the marker.
47 47
48@cindex marker relocation 48@cindex marker relocation
49 Deleting text around a marker's position leaves the marker between the 49 Deleting text around a marker's position leaves the marker between the
@@ -58,12 +58,12 @@ with @code{insert-before-markers} (@pxref{Insertion}).
58relocate them if necessary. This slows processing in a buffer with a 58relocate them if necessary. This slows processing in a buffer with a
59large number of markers. For this reason, it is a good idea to make a 59large number of markers. For this reason, it is a good idea to make a
60marker point nowhere if you are sure you don't need it any more. 60marker point nowhere if you are sure you don't need it any more.
61Unreferenced markers are garbage collected eventually, but until then 61Markers that can no longer be accessed are eventually removed
62will continue to use time if they do point somewhere. 62(@pxref{Garbage Collection}).
63 63
64@cindex markers as numbers 64@cindex markers as numbers
65 Because it is common to perform arithmetic operations on a marker 65 Because it is common to perform arithmetic operations on a marker
66position, most of the arithmetic operations (including @code{+} and 66position, most of these operations (including @code{+} and
67@code{-}) accept markers as arguments. In such cases, the marker 67@code{-}) accept markers as arguments. In such cases, the marker
68stands for its current position. 68stands for its current position.
69 69
@@ -188,7 +188,7 @@ chapter.
188(point-min-marker) 188(point-min-marker)
189 @result{} #<marker at 1 in markers.texi> 189 @result{} #<marker at 1 in markers.texi>
190(point-max-marker) 190(point-max-marker)
191 @result{} #<marker at 15573 in markers.texi> 191 @result{} #<marker at 24080 in markers.texi>
192@end group 192@end group
193 193
194@group 194@group
@@ -229,8 +229,8 @@ buffer.
229@end group 229@end group
230 230
231@group 231@group
232(copy-marker 20000) 232(copy-marker 90000)
233 @result{} #<marker at 7572 in markers.texi> 233 @result{} #<marker at 24080 in markers.texi>
234@end group 234@end group
235@end example 235@end example
236 236
@@ -422,11 +422,11 @@ can request deactivation of the mark upon return to the editor command
422loop by setting the variable @code{deactivate-mark} to a 422loop by setting the variable @code{deactivate-mark} to a
423non-@code{nil} value. 423non-@code{nil} value.
424 424
425 If Transient Mode is enabled, certain editing commands that normally 425 If Transient Mark mode is enabled, certain editing commands that
426apply to text near point, apply instead to the region when the mark is 426normally apply to text near point, apply instead to the region when
427active. This is the main motivation for using Transient Mark mode. 427the mark is active. This is the main motivation for using Transient
428(Another is that this enables highlighting of the region when the mark 428Mark mode. (Another is that this enables highlighting of the region
429is active. @xref{Display}.) 429when the mark is active. @xref{Display}.)
430 430
431 In addition to the mark, each buffer has a @dfn{mark ring} which is a 431 In addition to the mark, each buffer has a @dfn{mark ring} which is a
432list of markers containing previous values of the mark. When editing 432list of markers containing previous values of the mark. When editing
@@ -509,7 +509,8 @@ example:
509This function sets the current buffer's mark to @var{position}, and 509This function sets the current buffer's mark to @var{position}, and
510pushes a copy of the previous mark onto @code{mark-ring}. If 510pushes a copy of the previous mark onto @code{mark-ring}. If
511@var{position} is @code{nil}, then the value of point is used. 511@var{position} is @code{nil}, then the value of point is used.
512@code{push-mark} returns @code{nil}. 512@c Doesn't seem relevant.
513@c @code{push-mark} returns @code{nil}.
513 514
514The function @code{push-mark} normally @emph{does not} activate the 515The function @code{push-mark} normally @emph{does not} activate the
515mark. To do that, specify @code{t} for the argument @var{activate}. 516mark. To do that, specify @code{t} for the argument @var{activate}.
@@ -523,8 +524,9 @@ This function pops off the top element of @code{mark-ring} and makes
523that mark become the buffer's actual mark. This does not move point in 524that mark become the buffer's actual mark. This does not move point in
524the buffer, and it does nothing if @code{mark-ring} is empty. It 525the buffer, and it does nothing if @code{mark-ring} is empty. It
525deactivates the mark. 526deactivates the mark.
526 527@c
527The return value is not meaningful. 528@c Seems even less relevant.
529@c The return value is not meaningful.
528@end defun 530@end defun
529 531
530@defopt transient-mark-mode 532@defopt transient-mark-mode
@@ -593,8 +595,16 @@ the function @code{use-region-p} for that (@pxref{The Region}).
593@defvarx deactivate-mark-hook 595@defvarx deactivate-mark-hook
594These normal hooks are run, respectively, when the mark becomes active 596These normal hooks are run, respectively, when the mark becomes active
595and when it becomes inactive. The hook @code{activate-mark-hook} is 597and when it becomes inactive. The hook @code{activate-mark-hook} is
596also run at the end of a command if the mark is active and it is 598also run at the end of the command loop if the mark is active and it
597possible that the region may have changed. 599is possible that the region may have changed.
600@ignore
601This piece of command_loop_1, run unless deactivating the mark:
602 if (current_buffer != prev_buffer || MODIFF != prev_modiff)
603 {
604 Lisp_Object hook = intern ("activate-mark-hook");
605 Frun_hooks (1, &hook);
606 }
607@end ignore
598@end defvar 608@end defvar
599 609
600@defun handle-shift-selection 610@defun handle-shift-selection
@@ -634,6 +644,9 @@ more marks than this are pushed onto the @code{mark-ring},
634@code{push-mark} discards an old mark when it adds a new one. 644@code{push-mark} discards an old mark when it adds a new one.
635@end defopt 645@end defopt
636 646
647@c There is also global-mark-ring-max, but this chapter explicitly
648@c does not talk about the global mark.
649
637@node The Region 650@node The Region
638@section The Region 651@section The Region
639@cindex region (between point and mark) 652@cindex region (between point and mark)
@@ -660,16 +673,23 @@ integer). This is the position of either point or the mark, whichever is
660larger. 673larger.
661@end defun 674@end defun
662 675
663 Few programs need to use the @code{region-beginning} and 676 Instead of using @code{region-beginning} and @code{region-end}, a
664@code{region-end} functions. A command designed to operate on a region 677command designed to operate on a region should normally use
665should normally use @code{interactive} with the @samp{r} specification 678@code{interactive} with the @samp{r} specification to find the
666to find the beginning and end of the region. This lets other Lisp 679beginning and end of the region. This lets other Lisp programs
667programs specify the bounds explicitly as arguments. (@xref{Interactive 680specify the bounds explicitly as arguments. @xref{Interactive Codes}.
668Codes}.)
669 681
670@defun use-region-p 682@defun use-region-p
671This function returns @code{t} if Transient Mark mode is enabled, the 683This function returns @code{t} if Transient Mark mode is enabled, the
672mark is active, and there's a valid region in the buffer. Commands 684mark is active, and there is a valid region in the buffer. This
673that operate on the region (instead of on text near point) when 685function is intended to be used by commands that operate on the
674there's an active mark should use this to test whether to do that. 686region, instead of on text near point, when the mark is active.
687
688A region is valid if it has a non-zero size, or if the user option
689@code{use-empty-active-region} is non-@code{nil} (by default, it is
690@code{nil}). The function @code{region-active-p} is similar to
691@code{use-region-p}, but considers all regions as valid. In most
692cases, you should not use @code{region-active-p}, since if the region
693is empty it is often more appropriate to operate on point.
675@end defun 694@end defun
695
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 416bfef4a60..88cb6a157f8 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -169,13 +169,9 @@ convert any portion of the text in the buffer into a string.
169@defun buffer-substring start end 169@defun buffer-substring start end
170This function returns a string containing a copy of the text of the 170This function returns a string containing a copy of the text of the
171region defined by positions @var{start} and @var{end} in the current 171region defined by positions @var{start} and @var{end} in the current
172buffer. If the arguments are not positions in the accessible portion of 172buffer. If the arguments are not positions in the accessible portion
173the buffer, @code{buffer-substring} signals an @code{args-out-of-range} 173of the buffer, @code{buffer-substring} signals an
174error. 174@code{args-out-of-range} error.
175
176It is not necessary for @var{start} to be less than @var{end}; the
177arguments can be given in either order. But most often the smaller
178argument is written first.
179 175
180Here's an example which assumes Font-Lock mode is not enabled: 176Here's an example which assumes Font-Lock mode is not enabled:
181 177
@@ -218,14 +214,20 @@ This is like @code{buffer-substring}, except that it does not copy text
218properties, just the characters themselves. @xref{Text Properties}. 214properties, just the characters themselves. @xref{Text Properties}.
219@end defun 215@end defun
220 216
217@defun buffer-string
218This function returns the contents of the entire accessible portion of
219the current buffer as a string. It is equivalent to
220@w{@code{(buffer-substring (point-min) (point-max))}}.
221@end defun
222
221@defun filter-buffer-substring start end &optional delete 223@defun filter-buffer-substring start end &optional delete
222This function passes the buffer text between @var{start} and @var{end} 224This function passes the buffer text between @var{start} and @var{end}
223through the filter functions specified by the wrapper hook 225through the filter functions specified by the wrapper hook
224@code{filter-buffer-substring-functions}, and returns the final 226@code{filter-buffer-substring-functions}, and returns the result. The
225result of applying all filters. The obsolete variable 227obsolete variable @code{buffer-substring-filters} is also consulted.
226@code{buffer-substring-filters} is also consulted. If both of these 228If both of these variables are @code{nil}, the value is the unaltered
227variables are @code{nil}, the value is the unaltered text from the 229text from the buffer, i.e.@: what @code{buffer-substring} would
228buffer, as @code{buffer-substring} would return. 230return.
229 231
230If @var{delete} is non-@code{nil}, this function deletes the text 232If @var{delete} is non-@code{nil}, this function deletes the text
231between @var{start} and @var{end} after copying it, like 233between @var{start} and @var{end} after copying it, like
@@ -260,30 +262,20 @@ this, and so on. The actual return value is the result of all the
260hook functions acting in sequence. 262hook functions acting in sequence.
261@end defvar 263@end defvar
262 264
263@defun buffer-string 265@defvar buffer-substring-filters
264This function returns the contents of the entire accessible portion of 266This variable is obsoleted by
265the current buffer as a string. It is equivalent to 267@code{filter-buffer-substring-functions}, but is still supported for
266 268backward compatibility. Its value should should be a list of
267@example 269functions which accept a single string argument and return another
268(buffer-substring (point-min) (point-max)) 270string. @code{filter-buffer-substring} passes the buffer substring to
269@end example 271the first function in this list, and the return value of each function
270 272is passed to the next function. The return value of the last function
271@example 273is passed to @code{filter-buffer-substring-functions}.
272@group 274@end defvar
273---------- Buffer: foo ----------
274This is the contents of buffer foo
275
276---------- Buffer: foo ----------
277
278(buffer-string)
279 @result{} "This is the contents of buffer foo\n"
280@end group
281@end example
282@end defun
283 275
284@defun current-word &optional strict really-word 276@defun current-word &optional strict really-word
285This function returns the symbol (or word) at or near point, as a string. 277This function returns the symbol (or word) at or near point, as a
286The return value includes no text properties. 278string. The return value includes no text properties.
287 279
288If the optional argument @var{really-word} is non-@code{nil}, it finds a 280If the optional argument @var{really-word} is non-@code{nil}, it finds a
289word; otherwise, it finds a symbol (which includes both word 281word; otherwise, it finds a symbol (which includes both word
@@ -1112,13 +1104,11 @@ case, the first string is used as the ``most recent kill'', and all
1112the other strings are pushed onto the kill ring, for easy access by 1104the other strings are pushed onto the kill ring, for easy access by
1113@code{yank-pop}. 1105@code{yank-pop}.
1114 1106
1115The normal use of this function is to get the window system's primary 1107The normal use of this function is to get the window system's
1116selection as the most recent kill, even if the selection belongs to 1108clipboard as the most recent kill, even if the selection belongs to
1117another application. @xref{Window System Selections}. However, if 1109another application. @xref{Window System Selections}. However, if
1118the selection was provided by the current Emacs session, this function 1110the clipboard contents come from the current Emacs session, this
1119should return @code{nil}. (If it is hard to tell whether Emacs or 1111function should return @code{nil}.
1120some other program provided the selection, it should be good enough to
1121use @code{string=} to compare it with the last text Emacs provided.)
1122@end defvar 1112@end defvar
1123 1113
1124@defvar interprogram-cut-function 1114@defvar interprogram-cut-function
@@ -1129,9 +1119,8 @@ programs, when you are using a window system. Its value should be
1129If the value is a function, @code{kill-new} and @code{kill-append} call 1119If the value is a function, @code{kill-new} and @code{kill-append} call
1130it with the new first element of the kill ring as the argument. 1120it with the new first element of the kill ring as the argument.
1131 1121
1132The normal use of this function is to set the window system's primary 1122The normal use of this function is to put newly killed text in the
1133selection from the newly killed text. 1123window system's clipboard. @xref{Window System Selections}.
1134@xref{Window System Selections}.
1135@end defvar 1124@end defvar
1136 1125
1137@node Internals of Kill Ring 1126@node Internals of Kill Ring
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6a9b1808cdf..d8342df4da5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,36 @@
12012-03-07 Michael Albinus <Michael.Albinus@alcatel-lucent.com>
2
3 Avoid superfluous registering of signals. (Bug#10807)
4
5 * notifications.el (notifications-on-action-object)
6 (notifications-on-close-object): New defvars.
7 (notifications-on-action-signal, notifications-on-closed-signal):
8 Unregister the signal if not needed any longer.
9 (notifications-notify): Register `notifications-action-signal' or
10 `notifications-closed-signal', if :on-action or :on-close has been
11 passed as argument.
12
132012-03-07 Chong Yidong <cyd@gnu.org>
14
15 * cus-start.el: Avoid x-select-enable-clipboard-manager warning on
16 non-X platforms.
17
182012-03-06 Glenn Morris <rgm@gnu.org>
19
20 * term/pc-win.el (x-selection-owner-p, x-own-selection-internal)
21 (x-disown-selection-internal, x-get-selection-internal):
22 Doc fix (add arglist signatures). (Bug#10783)
23
242012-03-06 Kaushik Srenevasan <ksrenevasan@gmail.com> (tiny change)
25
26 * progmodes/gdb-mi.el (gdb-breakpoints-list-handler-custom):
27 Handle breakpoints with no "type".
28
292012-03-06 Glenn Morris <rgm@gnu.org>
30
31 * files.el (locate-dominating-file): Add optional predicate argument.
32 (dir-locals-find-file): Make use of above change.
33
12012-03-06 Thien-Thi Nguyen <ttn@gnuvola.org> 342012-03-06 Thien-Thi Nguyen <ttn@gnuvola.org>
2 35
3 * info.el (Info-insert-dir): Also try "dir.gz". 36 * info.el (Info-insert-dir): Also try "dir.gz".
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index a2ac7aa91e6..fbba49951d1 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -502,6 +502,8 @@ since it could result in memory overflow and make Emacs crash."
502 (featurep 'ns)) 502 (featurep 'ns))
503 ((string-match "\\`x-.*gtk" (symbol-name symbol)) 503 ((string-match "\\`x-.*gtk" (symbol-name symbol))
504 (featurep 'gtk)) 504 (featurep 'gtk))
505 ((string-match "clipboard-manager" (symbol-name symbol))
506 (boundp 'x-select-enable-clipboard-manager))
505 ((string-match "\\`x-" (symbol-name symbol)) 507 ((string-match "\\`x-" (symbol-name symbol))
506 (fboundp 'x-create-frame)) 508 (fboundp 'x-create-frame))
507 ((string-match "selection" (symbol-name symbol)) 509 ((string-match "selection" (symbol-name symbol))
diff --git a/lisp/files.el b/lisp/files.el
index fae834daefe..1d54ef81869 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -877,13 +877,14 @@ or mount points potentially requiring authentication as a different user.")
877;; (setq dir nil)))) 877;; (setq dir nil))))
878;; nil))) 878;; nil)))
879 879
880(defun locate-dominating-file (file name) 880(defun locate-dominating-file (file name &optional predicate)
881 "Look up the directory hierarchy from FILE for a file named NAME. 881 "Look up the directory hierarchy from FILE for a file named NAME.
882Stop at the first parent directory containing a file NAME, 882Stop at the first parent directory containing a file NAME,
883and return the directory. Return nil if not found. 883and return the directory. Return nil if not found.
884 884
885This function only tests if FILE exists. If you care about whether 885Optional argument PREDICATE is a function of one argument, a file.
886it is readable, regular, etc., you should test the result." 886It should return non-nil if the file is acceptable. The default is
887`file-exists-p'; you might, e.g., want to use `file-readable-p' instead."
887 ;; We used to use the above locate-dominating-files code, but the 888 ;; We used to use the above locate-dominating-files code, but the
888 ;; directory-files call is very costly, so we're much better off doing 889 ;; directory-files call is very costly, so we're much better off doing
889 ;; multiple calls using the code in here. 890 ;; multiple calls using the code in here.
@@ -910,11 +911,8 @@ it is readable, regular, etc., you should test the result."
910 ;; (setq user (nth 2 (file-attributes file))) 911 ;; (setq user (nth 2 (file-attributes file)))
911 ;; (and prev-user (not (equal user prev-user)))) 912 ;; (and prev-user (not (equal user prev-user))))
912 (string-match locate-dominating-stop-dir-regexp file))) 913 (string-match locate-dominating-stop-dir-regexp file)))
913 ;; FIXME? maybe this function should (optionally?) 914 (setq try (funcall (or predicate 'file-exists-p)
914 ;; use file-readable-p instead. In many cases, an unreadable 915 (expand-file-name name file)))
915 ;; FILE is no better than a non-existent one.
916 ;; See eg dir-locals-find-file.
917 (setq try (file-exists-p (expand-file-name name file)))
918 (cond (try (setq root file)) 916 (cond (try (setq root file))
919 ((equal file (setq file (file-name-directory 917 ((equal file (setq file (file-name-directory
920 (directory-file-name file)))) 918 (directory-file-name file))))
@@ -3552,7 +3550,7 @@ across different environments and users.")
3552 "Find the directory-local variables for FILE. 3550 "Find the directory-local variables for FILE.
3553This searches upward in the directory tree from FILE. 3551This searches upward in the directory tree from FILE.
3554It stops at the first directory that has been registered in 3552It stops at the first directory that has been registered in
3555`dir-locals-directory-cache' or contains a `dir-locals-file'. 3553`dir-locals-directory-cache' or contains a readable `dir-locals-file'.
3556If it finds an entry in the cache, it checks that it is valid. 3554If it finds an entry in the cache, it checks that it is valid.
3557A cache entry with no modification time element (normally, one that 3555A cache entry with no modification time element (normally, one that
3558has been assigned directly using `dir-locals-set-directory-class', not 3556has been assigned directly using `dir-locals-set-directory-class', not
@@ -3570,17 +3568,15 @@ of no valid cache entry."
3570 (if (eq system-type 'ms-dos) 3568 (if (eq system-type 'ms-dos)
3571 (dosified-file-name dir-locals-file) 3569 (dosified-file-name dir-locals-file)
3572 dir-locals-file)) 3570 dir-locals-file))
3573 (locals-file (locate-dominating-file file dir-locals-file-name)) 3571 ;; FIXME? Is it right to silently ignore unreadable files?
3572 (locals-file (locate-dominating-file file dir-locals-file-name
3573 (lambda (file)
3574 (and (file-readable-p file)
3575 (file-regular-p file)))))
3574 (dir-elt nil)) 3576 (dir-elt nil))
3575 ;; `locate-dominating-file' may have abbreviated the name. 3577 ;; `locate-dominating-file' may have abbreviated the name.
3576 (and locals-file 3578 (if locals-file
3577 (setq locals-file (expand-file-name dir-locals-file-name locals-file)) 3579 (setq locals-file (expand-file-name dir-locals-file-name locals-file)))
3578 ;; FIXME? is it right to silently ignore an unreadable file?
3579 ;; Maybe we'd want to keep searching in that case.
3580 ;; That is a locate-dominating-file issue.
3581 (or (not (file-readable-p locals-file))
3582 (not (file-regular-p locals-file)))
3583 (setq locals-file nil))
3584 ;; Find the best cached value in `dir-locals-directory-cache'. 3580 ;; Find the best cached value in `dir-locals-directory-cache'.
3585 (dolist (elt dir-locals-directory-cache) 3581 (dolist (elt dir-locals-directory-cache)
3586 (when (and (eq t (compare-strings file nil (length (car elt)) 3582 (when (and (eq t (compare-strings file nil (length (car elt))
diff --git a/lisp/notifications.el b/lisp/notifications.el
index 1b75c2c5702..908cbcaabab 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -88,25 +88,26 @@
88(defvar notifications-on-action-map nil 88(defvar notifications-on-action-map nil
89 "Mapping between notification and action callback functions.") 89 "Mapping between notification and action callback functions.")
90 90
91(defvar notifications-on-action-object nil
92 "Object for registered on-action signal.")
93
91(defvar notifications-on-close-map nil 94(defvar notifications-on-close-map nil
92 "Mapping between notification and close callback functions.") 95 "Mapping between notification and close callback functions.")
93 96
97(defvar notifications-on-close-object nil
98 "Object for registered on-close signal.")
99
94(defun notifications-on-action-signal (id action) 100(defun notifications-on-action-signal (id action)
95 "Dispatch signals to callback functions from `notifications-on-action-map'." 101 "Dispatch signals to callback functions from `notifications-on-action-map'."
96 (let* ((unique-name (dbus-event-service-name last-input-event)) 102 (let* ((unique-name (dbus-event-service-name last-input-event))
97 (entry (assoc (cons unique-name id) notifications-on-action-map))) 103 (entry (assoc (cons unique-name id) notifications-on-action-map)))
98 (when entry 104 (when entry
99 (funcall (cadr entry) id action) 105 (funcall (cadr entry) id action)
100 (remove entry notifications-on-action-map)))) 106 (when (and (not (setq notifications-on-action-map
101 107 (remove entry notifications-on-action-map)))
102(when (fboundp 'dbus-register-signal) 108 notifications-on-action-object)
103 (dbus-register-signal 109 (dbus-unregister-object notifications-on-action-object)
104 :session 110 (setq notifications-on-action-object nil)))))
105 nil
106 notifications-path
107 notifications-interface
108 notifications-action-signal
109 'notifications-on-action-signal))
110 111
111(defun notifications-on-closed-signal (id &optional reason) 112(defun notifications-on-closed-signal (id &optional reason)
112 "Dispatch signals to callback functions from `notifications-on-closed-map'." 113 "Dispatch signals to callback functions from `notifications-on-closed-map'."
@@ -118,16 +119,11 @@
118 (when entry 119 (when entry
119 (funcall (cadr entry) 120 (funcall (cadr entry)
120 id (cadr (assoc reason notifications-closed-reason))) 121 id (cadr (assoc reason notifications-closed-reason)))
121 (remove entry notifications-on-close-map)))) 122 (when (and (not (setq notifications-on-close-map
122 123 (remove entry notifications-on-close-map)))
123(when (fboundp 'dbus-register-signal) 124 notifications-on-close-object)
124 (dbus-register-signal 125 (dbus-unregister-object notifications-on-close-object)
125 :session 126 (setq notifications-on-close-object nil)))))
126 nil
127 notifications-path
128 notifications-interface
129 notifications-closed-signal
130 'notifications-on-closed-signal))
131 127
132(defun notifications-notify (&rest params) 128(defun notifications-notify (&rest params)
133 "Send notification via D-Bus using the Freedesktop notification protocol. 129 "Send notification via D-Bus using the Freedesktop notification protocol.
@@ -287,10 +283,29 @@ used to manipulate the notification item with
287 (unique-name (dbus-get-name-owner :session notifications-service))) 283 (unique-name (dbus-get-name-owner :session notifications-service)))
288 (when on-action 284 (when on-action
289 (add-to-list 'notifications-on-action-map 285 (add-to-list 'notifications-on-action-map
290 (list (cons unique-name id) on-action))) 286 (list (cons unique-name id) on-action))
287 (unless notifications-on-action-object
288 (setq notifications-on-action-object
289 (dbus-register-signal
290 :session
291 nil
292 notifications-path
293 notifications-interface
294 notifications-action-signal
295 'notifications-on-action-signal))))
296
291 (when on-close 297 (when on-close
292 (add-to-list 'notifications-on-close-map 298 (add-to-list 'notifications-on-close-map
293 (list (cons unique-name id) on-close)))) 299 (list (cons unique-name id) on-close))
300 (unless notifications-on-close-object
301 (setq notifications-on-close-object
302 (dbus-register-signal
303 :session
304 nil
305 notifications-path
306 notifications-interface
307 notifications-closed-signal
308 'notifications-on-closed-signal)))))
294 309
295 ;; Return notification id 310 ;; Return notification id
296 id)) 311 id))
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 0c45c3f5e5d..8ea255e49dd 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -2397,15 +2397,15 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
2397 (gdb-table-add-row table 2397 (gdb-table-add-row table
2398 (list 2398 (list
2399 (bindat-get-field breakpoint 'number) 2399 (bindat-get-field breakpoint 'number)
2400 type 2400 (or type "")
2401 (bindat-get-field breakpoint 'disp) 2401 (or (bindat-get-field breakpoint 'disp) "")
2402 (let ((flag (bindat-get-field breakpoint 'enabled))) 2402 (let ((flag (bindat-get-field breakpoint 'enabled)))
2403 (if (string-equal flag "y") 2403 (if (string-equal flag "y")
2404 (propertize "y" 'font-lock-face font-lock-warning-face) 2404 (propertize "y" 'font-lock-face font-lock-warning-face)
2405 (propertize "n" 'font-lock-face font-lock-comment-face))) 2405 (propertize "n" 'font-lock-face font-lock-comment-face)))
2406 (bindat-get-field breakpoint 'addr) 2406 (bindat-get-field breakpoint 'addr)
2407 (bindat-get-field breakpoint 'times) 2407 (or (bindat-get-field breakpoint 'times) "")
2408 (if (string-match ".*watchpoint" type) 2408 (if (and type (string-match ".*watchpoint" type))
2409 (bindat-get-field breakpoint 'what) 2409 (bindat-get-field breakpoint 'what)
2410 (or pending at 2410 (or pending at
2411 (concat "in " 2411 (concat "in "
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index fc86d4179b6..b460e3b8a14 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -159,6 +159,12 @@ created."
159;; returned value matters. Also, by the way, recall that `ignore' is 159;; returned value matters. Also, by the way, recall that `ignore' is
160;; a useful function for returning 'nil regardless of argument. 160;; a useful function for returning 'nil regardless of argument.
161 161
162;; Note: Any re-definition in this file of a function that is defined
163;; in C on other platforms, should either have no doc-string, or one
164;; that is identical to the C version, but with the arglist signature
165;; at the end. Otherwise help-split-fundoc gets confused on other
166;; platforms. (Bug#10783)
167
162;; From src/xfns.c 168;; From src/xfns.c
163(defun x-list-fonts (pattern &optional face frame maximum width) 169(defun x-list-fonts (pattern &optional face frame maximum width)
164 (if (or (null width) (and (numberp width) (= width 1))) 170 (if (or (null width) (and (numberp width) (= width 1)))
@@ -261,7 +267,9 @@ TERMINAL should be a terminal object or a frame specifying the X
261server to query. If omitted or nil, that stands for the selected 267server to query. If omitted or nil, that stands for the selected
262frame's display, or the first available X display. 268frame's display, or the first available X display.
263 269
264On Nextstep, TERMINAL is unused." 270On Nextstep, TERMINAL is unused.
271
272\(fn &optional SELECTION TERMINAL)"
265 (if x-select-enable-clipboard 273 (if x-select-enable-clipboard
266 (let (text) 274 (let (text)
267 ;; Don't die if w16-get-clipboard-data signals an error. 275 ;; Don't die if w16-get-clipboard-data signals an error.
@@ -289,7 +297,9 @@ anything that the functions on `selection-converter-alist' know about.
289FRAME should be a frame that should own the selection. If omitted or 297FRAME should be a frame that should own the selection. If omitted or
290nil, it defaults to the selected frame. 298nil, it defaults to the selected frame.
291 299
292On Nextstep, FRAME is unused." 300On Nextstep, FRAME is unused.
301
302\(fn SELECTION VALUE &optional FRAME)"
293 (ignore-errors 303 (ignore-errors
294 (x-select-text value)) 304 (x-select-text value))
295 value) 305 value)
@@ -306,7 +316,9 @@ server to query. If omitted or nil, that stands for the selected
306frame's display, or the first available X display. 316frame's display, or the first available X display.
307 317
308On Nextstep, the TIME-OBJECT and TERMINAL arguments are unused. 318On Nextstep, the TIME-OBJECT and TERMINAL arguments are unused.
309On MS-DOS, all this does is return non-nil if we own the selection." 319On MS-DOS, all this does is return non-nil if we own the selection.
320
321\(fn SELECTION &optional TIME-OBJECT TERMINAL)"
310 (if (x-selection-owner-p selection) 322 (if (x-selection-owner-p selection)
311 t)) 323 t))
312 324
@@ -324,7 +336,9 @@ TERMINAL should be a terminal object or a frame specifying the X
324server to query. If omitted or nil, that stands for the selected 336server to query. If omitted or nil, that stands for the selected
325frame's display, or the first available X display. 337frame's display, or the first available X display.
326 338
327On Nextstep, TIME-STAMP and TERMINAL are unused." 339On Nextstep, TIME-STAMP and TERMINAL are unused.
340
341\(fn SELECTION-SYMBOL TARGET-TYPE &optional TIME-STAMP TERMINAL)"
328 (x-get-selection-value)) 342 (x-get-selection-value))
329 343
330;; From src/fontset.c: 344;; From src/fontset.c: