diff options
| -rw-r--r-- | doc/lispref/ChangeLog | 15 | ||||
| -rw-r--r-- | doc/lispref/control.texi | 7 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/positions.texi | 12 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 13 | ||||
| -rw-r--r-- | doc/lispref/variables.texi | 3 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/misc/calc.texi | 2 | ||||
| -rw-r--r-- | doc/misc/gnus.texi | 5 | ||||
| -rw-r--r-- | lisp/ChangeLog | 19 | ||||
| -rw-r--r-- | lisp/language/indian.el | 6 | ||||
| -rw-r--r-- | lisp/vc-bzr.el | 40 | ||||
| -rw-r--r-- | src/ChangeLog | 28 | ||||
| -rw-r--r-- | src/dbusbind.c | 23 | ||||
| -rw-r--r-- | src/fontset.c | 4 | ||||
| -rw-r--r-- | src/keyboard.c | 8 |
17 files changed, 139 insertions, 58 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index e7467c20d25..6dfc203f638 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2010-01-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | Avoid dubious uses of save-excursions. | ||
| 4 | * positions.texi (Excursions): Recommend the use of | ||
| 5 | save-current-buffer if applicable. | ||
| 6 | * text.texi (Clickable Text): Fix the example code which used | ||
| 7 | save-excursion in a naive way which sometimes preserves point and | ||
| 8 | sometimes not. | ||
| 9 | * variables.texi (Creating Buffer-Local): | ||
| 10 | * os.texi (Session Management): | ||
| 11 | * display.texi (GIF Images): | ||
| 12 | * control.texi (Cleanups): Use (save|with)-current-buffer. | ||
| 13 | |||
| 1 | 2010-01-02 Eli Zaretskii <eliz@gnu.org> | 14 | 2010-01-02 Eli Zaretskii <eliz@gnu.org> |
| 2 | 15 | ||
| 3 | * modes.texi (Example Major Modes): Fix indentation. (Bug#5195) | 16 | * modes.texi (Example Major Modes): Fix indentation. (Bug#5195) |
| @@ -8375,7 +8388,7 @@ | |||
| 8375 | ;; End: | 8388 | ;; End: |
| 8376 | 8389 | ||
| 8377 | Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 8390 | Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
| 8378 | 2007, 2008, 2009 Free Software Foundation, Inc. | 8391 | 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 8379 | 8392 | ||
| 8380 | This file is part of GNU Emacs. | 8393 | This file is part of GNU Emacs. |
| 8381 | 8394 | ||
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 41f844b4e21..6d7c01d354b 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi | |||
| @@ -1255,9 +1255,8 @@ make sure to kill it before finishing: | |||
| 1255 | 1255 | ||
| 1256 | @smallexample | 1256 | @smallexample |
| 1257 | @group | 1257 | @group |
| 1258 | (save-excursion | 1258 | (let ((buffer (get-buffer-create " *temp*"))) |
| 1259 | (let ((buffer (get-buffer-create " *temp*"))) | 1259 | (with-current-buffer buffer |
| 1260 | (set-buffer buffer) | ||
| 1261 | (unwind-protect | 1260 | (unwind-protect |
| 1262 | @var{body-form} | 1261 | @var{body-form} |
| 1263 | (kill-buffer buffer)))) | 1262 | (kill-buffer buffer)))) |
| @@ -1269,7 +1268,7 @@ You might think that we could just as well write @code{(kill-buffer | |||
| 1269 | (current-buffer))} and dispense with the variable @code{buffer}. | 1268 | (current-buffer))} and dispense with the variable @code{buffer}. |
| 1270 | However, the way shown above is safer, if @var{body-form} happens to | 1269 | However, the way shown above is safer, if @var{body-form} happens to |
| 1271 | get an error after switching to a different buffer! (Alternatively, | 1270 | get an error after switching to a different buffer! (Alternatively, |
| 1272 | you could write another @code{save-excursion} around @var{body-form}, | 1271 | you could write a @code{save-current-buffer} around @var{body-form}, |
| 1273 | to ensure that the temporary buffer becomes current again in time to | 1272 | to ensure that the temporary buffer becomes current again in time to |
| 1274 | kill it.) | 1273 | kill it.) |
| 1275 | 1274 | ||
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 8feb8ea8c81..512d7d53019 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -4394,8 +4394,7 @@ every 0.1 seconds. | |||
| 4394 | (when (= idx max) | 4394 | (when (= idx max) |
| 4395 | (setq idx 0)) | 4395 | (setq idx 0)) |
| 4396 | (let ((img (create-image file nil :image idx))) | 4396 | (let ((img (create-image file nil :image idx))) |
| 4397 | (save-excursion | 4397 | (with-current-buffer buffer |
| 4398 | (set-buffer buffer) | ||
| 4399 | (goto-char (point-min)) | 4398 | (goto-char (point-min)) |
| 4400 | (unless first-time (delete-char 1)) | 4399 | (unless first-time (delete-char 1)) |
| 4401 | (insert-image img)) | 4400 | (insert-image img)) |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index ded70f4927b..8d62ab87499 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -2182,7 +2182,7 @@ Emacs is restarted by the session manager. | |||
| 2182 | 2182 | ||
| 2183 | @group | 2183 | @group |
| 2184 | (defun save-yourself-test () | 2184 | (defun save-yourself-test () |
| 2185 | (insert "(save-excursion | 2185 | (insert "(save-current-buffer |
| 2186 | (switch-to-buffer \"*scratch*\") | 2186 | (switch-to-buffer \"*scratch*\") |
| 2187 | (insert \"I am restored\"))") | 2187 | (insert \"I am restored\"))") |
| 2188 | nil) | 2188 | nil) |
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index deded596f81..3897efc6f2b 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi | |||
| @@ -806,7 +806,9 @@ after the completion of the excursion. | |||
| 806 | 806 | ||
| 807 | The forms for saving and restoring the configuration of windows are | 807 | The forms for saving and restoring the configuration of windows are |
| 808 | described elsewhere (see @ref{Window Configurations}, and @pxref{Frame | 808 | described elsewhere (see @ref{Window Configurations}, and @pxref{Frame |
| 809 | Configurations}). | 809 | Configurations}). When only the identity of the current buffer needs |
| 810 | to be saved and restored, it is preferable to use | ||
| 811 | @code{save-current-buffer} instead. | ||
| 810 | 812 | ||
| 811 | @defspec save-excursion body@dots{} | 813 | @defspec save-excursion body@dots{} |
| 812 | @cindex mark excursion | 814 | @cindex mark excursion |
| @@ -817,10 +819,10 @@ buffer and the values of point and the mark in it, evaluates | |||
| 817 | point and the mark. All three saved values are restored even in case of | 819 | point and the mark. All three saved values are restored even in case of |
| 818 | an abnormal exit via @code{throw} or error (@pxref{Nonlocal Exits}). | 820 | an abnormal exit via @code{throw} or error (@pxref{Nonlocal Exits}). |
| 819 | 821 | ||
| 820 | The @code{save-excursion} special form is the standard way to switch | 822 | The @code{save-excursion} special form is the standard way to move |
| 821 | buffers or move point within one part of a program and avoid affecting | 823 | point within one part of a program and avoid affecting the rest of the |
| 822 | the rest of the program. It is used more than 4000 times in the Lisp | 824 | program. It is used more than 4000 times in the Lisp sources |
| 823 | sources of Emacs. | 825 | of Emacs. |
| 824 | 826 | ||
| 825 | @code{save-excursion} does not save the values of point and the mark for | 827 | @code{save-excursion} does not save the values of point and the mark for |
| 826 | other buffers, so changes in other buffers remain in effect after | 828 | other buffers, so changes in other buffers remain in effect after |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 91b65017754..7c3f91c3fa8 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -3524,13 +3524,12 @@ following command: | |||
| 3524 | (defun dired-mouse-find-file-other-window (event) | 3524 | (defun dired-mouse-find-file-other-window (event) |
| 3525 | "In Dired, visit the file or directory name you click on." | 3525 | "In Dired, visit the file or directory name you click on." |
| 3526 | (interactive "e") | 3526 | (interactive "e") |
| 3527 | (let (window pos file) | 3527 | (let ((window (posn-window (event-end event))) |
| 3528 | (save-excursion | 3528 | (pos (posn-point (event-end event))) |
| 3529 | (setq window (posn-window (event-end event)) | 3529 | file) |
| 3530 | pos (posn-point (event-end event))) | 3530 | (if (not (windowp window)) |
| 3531 | (if (not (windowp window)) | 3531 | (error "No file chosen")) |
| 3532 | (error "No file chosen")) | 3532 | (with-current-buffer (window-buffer window) |
| 3533 | (set-buffer (window-buffer window)) | ||
| 3534 | (goto-char pos) | 3533 | (goto-char pos) |
| 3535 | (setq file (dired-get-file-for-visit))) | 3534 | (setq file (dired-get-file-for-visit))) |
| 3536 | (if (file-directory-p file) | 3535 | (if (file-directory-p file) |
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 4f9f9c17369..d8ab347eebf 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -1240,8 +1240,7 @@ foo | |||
| 1240 | 1240 | ||
| 1241 | @group | 1241 | @group |
| 1242 | ;; @r{In buffer @samp{b2}, the value hasn't changed.} | 1242 | ;; @r{In buffer @samp{b2}, the value hasn't changed.} |
| 1243 | (save-excursion | 1243 | (with-current-buffer "b2" |
| 1244 | (set-buffer "b2") | ||
| 1245 | foo) | 1244 | foo) |
| 1246 | @result{} 5 | 1245 | @result{} 5 |
| 1247 | @end group | 1246 | @end group |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 27c376f764c..cabec8f7fb1 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-01-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * gnus.texi (Posting Styles): Use with-current-buffer. | ||
| 4 | * calc.texi (Defining Simple Commands): Prefer save-current-buffer. | ||
| 5 | |||
| 1 | 2010-01-02 Kevin Ryde <user42@zip.com.au> | 6 | 2010-01-02 Kevin Ryde <user42@zip.com.au> |
| 2 | 7 | ||
| 3 | * eieio.texi (Naming Conventions): Correction to xref on elisp | 8 | * eieio.texi (Naming Conventions): Correction to xref on elisp |
| @@ -6512,7 +6517,7 @@ | |||
| 6512 | ;; End: | 6517 | ;; End: |
| 6513 | 6518 | ||
| 6514 | Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, | 6519 | Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, |
| 6515 | 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 6520 | 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 6516 | 6521 | ||
| 6517 | This file is part of GNU Emacs. | 6522 | This file is part of GNU Emacs. |
| 6518 | 6523 | ||
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index c88bb3e9ab8..e7c03197704 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi | |||
| @@ -31968,7 +31968,7 @@ the function with code that looks roughly like this: | |||
| 31968 | @smallexample | 31968 | @smallexample |
| 31969 | (let ((calc-command-flags nil)) | 31969 | (let ((calc-command-flags nil)) |
| 31970 | (unwind-protect | 31970 | (unwind-protect |
| 31971 | (save-excursion | 31971 | (save-current-buffer |
| 31972 | (calc-select-buffer) | 31972 | (calc-select-buffer) |
| 31973 | @emph{body of function} | 31973 | @emph{body of function} |
| 31974 | @emph{renumber stack} | 31974 | @emph{renumber stack} |
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index e90789d2494..a33a91ba6f1 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | @copying | 11 | @copying |
| 12 | Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | 12 | Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
| 13 | 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 13 | 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 14 | 14 | ||
| 15 | @quotation | 15 | @quotation |
| 16 | Permission is granted to copy, distribute and/or modify this document | 16 | Permission is granted to copy, distribute and/or modify this document |
| @@ -13449,8 +13449,7 @@ So here's a new example: | |||
| 13449 | (body "You are fired.\n\nSincerely, your boss.") | 13449 | (body "You are fired.\n\nSincerely, your boss.") |
| 13450 | (organization "Important Work, Inc")) | 13450 | (organization "Important Work, Inc")) |
| 13451 | ("nnml:.*" | 13451 | ("nnml:.*" |
| 13452 | (From (save-excursion | 13452 | (From (with-current-buffer gnus-article-buffer |
| 13453 | (set-buffer gnus-article-buffer) | ||
| 13454 | (message-fetch-field "to")))) | 13453 | (message-fetch-field "to")))) |
| 13455 | ("^nn.+:" | 13454 | ("^nn.+:" |
| 13456 | (signature-file "~/.mail-signature")))) | 13455 | (signature-file "~/.mail-signature")))) |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cfde9093e75..1b493440367 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,22 @@ | |||
| 1 | 2010-01-05 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * language/indian.el (malayalam-composable-pattern): Fix ZWNJ and | ||
| 4 | ZWJ. | ||
| 5 | |||
| 6 | 2010-01-05 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 7 | |||
| 8 | * vc-bzr.el (vc-bzr-diff): Obey vc-disable-async-diff. | ||
| 9 | |||
| 10 | 2010-01-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 11 | |||
| 12 | * vc-bzr.el (vc-bzr-state-heuristic): Make it work for lightweight | ||
| 13 | checkouts. (Bug#618) | ||
| 14 | (vc-bzr-log-view-mode): Also highlight the author. | ||
| 15 | (vc-bzr-shelve-map): Change binding for vc-bzr-shelve-apply-at-point. | ||
| 16 | (vc-bzr-shelve-menu-map): | ||
| 17 | (vc-bzr-dir-extra-headers): Improve menu and tooltip text. | ||
| 18 | (vc-bzr-shelve-apply): Make prompt more explicit. | ||
| 19 | |||
| 1 | 2010-01-02 Chong Yidong <cyd@stupidchicken.com> | 20 | 2010-01-02 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 21 | ||
| 3 | * net/browse-url.el (browse-url-encode-url): Don't escape commas. | 22 | * net/browse-url.el (browse-url-encode-url): Don't escape commas. |
diff --git a/lisp/language/indian.el b/lisp/language/indian.el index 82f24a0272f..b9ea94ab2d1 100644 --- a/lisp/language/indian.el +++ b/lisp/language/indian.el | |||
| @@ -153,8 +153,8 @@ South Indian language Malayalam is supported in this language environment.")) | |||
| 153 | ("a" . "\u0903") ; vowel modifier (post) | 153 | ("a" . "\u0903") ; vowel modifier (post) |
| 154 | ("S" . "\u0951") ; stress sign (above) | 154 | ("S" . "\u0951") ; stress sign (above) |
| 155 | ("s" . "\u0952") ; stress sign (below) | 155 | ("s" . "\u0952") ; stress sign (below) |
| 156 | ("J" . "\u200D") ; ZWJ | ||
| 157 | ("N" . "\u200C") ; ZWNJ | 156 | ("N" . "\u200C") ; ZWNJ |
| 157 | ("J" . "\u200D") ; ZWJ | ||
| 158 | ("X" . "[\u0900-\u097F]")))) ; all coverage | 158 | ("X" . "[\u0900-\u097F]")))) ; all coverage |
| 159 | (indian-compose-regexp | 159 | (indian-compose-regexp |
| 160 | (concat | 160 | (concat |
| @@ -195,8 +195,8 @@ South Indian language Malayalam is supported in this language environment.")) | |||
| 195 | ("b" . "[\u0D62-\u0D63]") ; belowbase matra | 195 | ("b" . "[\u0D62-\u0D63]") ; belowbase matra |
| 196 | ("a" . "[\u0D02-\u0D03]") ; abovebase sign | 196 | ("a" . "[\u0D02-\u0D03]") ; abovebase sign |
| 197 | ("H" . "\u0D4D") ; virama sign | 197 | ("H" . "\u0D4D") ; virama sign |
| 198 | ("N" . "\u200D") ; ZWJ | 198 | ("N" . "\u200C") ; ZWNJ |
| 199 | ("J" . "\u200C") ; ZWNJ | 199 | ("J" . "\u200D") ; ZWJ |
| 200 | ("X" . "[\u0D00-\u0D7F]")))) ; all coverage | 200 | ("X" . "[\u0D00-\u0D7F]")))) ; all coverage |
| 201 | (indian-compose-regexp | 201 | (indian-compose-regexp |
| 202 | (concat | 202 | (concat |
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index fff4eca57fa..fc62696af1d 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el | |||
| @@ -176,13 +176,13 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and | |||
| 176 | "\0" | 176 | "\0" |
| 177 | "[^\0]*\0" ;id? | 177 | "[^\0]*\0" ;id? |
| 178 | "\\([^\0]*\\)\0" ;"a/f/d", a=removed? | 178 | "\\([^\0]*\\)\0" ;"a/f/d", a=removed? |
| 179 | "[^\0]*\0" ;sha1 (empty if conflicted)? | 179 | "\\([^\0]*\\)\0" ;sha1 (empty if conflicted)? |
| 180 | "\\([^\0]*\\)\0" ;size? | 180 | "\\([^\0]*\\)\0" ;size?p |
| 181 | "[^\0]*\0" ;"y/n", executable? | 181 | "[^\0]*\0" ;"y/n", executable? |
| 182 | "[^\0]*\0" ;? | 182 | "[^\0]*\0" ;? |
| 183 | "\\([^\0]*\\)\0" ;"a/f/d" a=added? | 183 | "\\([^\0]*\\)\0" ;"a/f/d" a=added? |
| 184 | "\\([^\0]*\\)\0" ;sha1 again? | 184 | "\\([^\0]*\\)\0" ;sha1 again? |
| 185 | "[^\0]*\0" ;size again? | 185 | "\\([^\0]*\\)\0" ;size again? |
| 186 | "[^\0]*\0" ;"y/n", executable again? | 186 | "[^\0]*\0" ;"y/n", executable again? |
| 187 | "[^\0]*\0" ;last revid? | 187 | "[^\0]*\0" ;last revid? |
| 188 | ;; There are more fields when merges are pending. | 188 | ;; There are more fields when merges are pending. |
| @@ -194,11 +194,20 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and | |||
| 194 | ;; conflict markers). | 194 | ;; conflict markers). |
| 195 | (cond | 195 | (cond |
| 196 | ((eq (char-after (match-beginning 1)) ?a) 'removed) | 196 | ((eq (char-after (match-beginning 1)) ?a) 'removed) |
| 197 | ((eq (char-after (match-beginning 3)) ?a) 'added) | 197 | ((eq (char-after (match-beginning 4)) ?a) 'added) |
| 198 | ((and (eq (string-to-number (match-string 2)) | 198 | ((or (and (eq (string-to-number (match-string 3)) |
| 199 | (nth 7 (file-attributes file))) | 199 | (nth 7 (file-attributes file))) |
| 200 | (equal (match-string 4) | 200 | (equal (match-string 5) |
| 201 | (vc-bzr-sha1 file))) | 201 | (vc-bzr-sha1 file))) |
| 202 | (and | ||
| 203 | ;; It looks like for lightweight | ||
| 204 | ;; checkouts \2 is empty and we need to | ||
| 205 | ;; look for size in \6. | ||
| 206 | (eq (match-beginning 2) (match-end 2)) | ||
| 207 | (eq (string-to-number (match-string 6)) | ||
| 208 | (nth 7 (file-attributes file))) | ||
| 209 | (equal (match-string 5) | ||
| 210 | (vc-bzr-sha1 file)))) | ||
| 202 | 'up-to-date) | 211 | 'up-to-date) |
| 203 | (t 'edited)) | 212 | (t 'edited)) |
| 204 | 'unregistered)))) | 213 | 'unregistered)))) |
| @@ -475,7 +484,7 @@ REV non-nil gets an error." | |||
| 475 | (4 'change-log-list nil lax)))) | 484 | (4 'change-log-list nil lax)))) |
| 476 | (append `((,log-view-message-re . 'log-view-message-face)) | 485 | (append `((,log-view-message-re . 'log-view-message-face)) |
| 477 | ;; log-view-font-lock-keywords | 486 | ;; log-view-font-lock-keywords |
| 478 | '(("^ *committer: \ | 487 | '(("^ *\\(?:committer\\|author\\): \ |
| 479 | \\([^<(]+?\\)[ ]*[(<]\\([[:alnum:]_.+-]+@[[:alnum:]_.-]+\\)[>)]" | 488 | \\([^<(]+?\\)[ ]*[(<]\\([[:alnum:]_.+-]+@[[:alnum:]_.-]+\\)[>)]" |
| 480 | (1 'change-log-name) | 489 | (1 'change-log-name) |
| 481 | (2 'change-log-email)) | 490 | (2 'change-log-email)) |
| @@ -523,7 +532,8 @@ REV non-nil gets an error." | |||
| 523 | (defun vc-bzr-diff (files &optional rev1 rev2 buffer) | 532 | (defun vc-bzr-diff (files &optional rev1 rev2 buffer) |
| 524 | "VC bzr backend for diff." | 533 | "VC bzr backend for diff." |
| 525 | ;; `bzr diff' exits with code 1 if diff is non-empty. | 534 | ;; `bzr diff' exits with code 1 if diff is non-empty. |
| 526 | (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 'async files | 535 | (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") |
| 536 | (if vc-disable-async-diff 1 'async) files | ||
| 527 | "--diff-options" (mapconcat 'identity | 537 | "--diff-options" (mapconcat 'identity |
| 528 | (vc-switches 'bzr 'diff) | 538 | (vc-switches 'bzr 'diff) |
| 529 | " ") | 539 | " ") |
| @@ -732,7 +742,7 @@ stream. Standard error output is discarded." | |||
| 732 | (define-key map "\C-k" 'vc-bzr-shelve-delete-at-point) | 742 | (define-key map "\C-k" 'vc-bzr-shelve-delete-at-point) |
| 733 | ;; (define-key map "=" 'vc-bzr-shelve-show-at-point) | 743 | ;; (define-key map "=" 'vc-bzr-shelve-show-at-point) |
| 734 | ;; (define-key map "\C-m" 'vc-bzr-shelve-show-at-point) | 744 | ;; (define-key map "\C-m" 'vc-bzr-shelve-show-at-point) |
| 735 | (define-key map "A" 'vc-bzr-shelve-apply-at-point) | 745 | (define-key map "P" 'vc-bzr-shelve-apply-at-point) |
| 736 | map)) | 746 | map)) |
| 737 | 747 | ||
| 738 | (defvar vc-bzr-shelve-menu-map | 748 | (defvar vc-bzr-shelve-menu-map |
| @@ -740,9 +750,9 @@ stream. Standard error output is discarded." | |||
| 740 | (define-key map [de] | 750 | (define-key map [de] |
| 741 | '(menu-item "Delete shelf" vc-bzr-shelve-delete-at-point | 751 | '(menu-item "Delete shelf" vc-bzr-shelve-delete-at-point |
| 742 | :help "Delete the current shelf")) | 752 | :help "Delete the current shelf")) |
| 743 | (define-key map [ap] | 753 | (define-key map [po] |
| 744 | '(menu-item "Apply shelf" vc-bzr-shelve-apply-at-point | 754 | '(menu-item "Apply and remove shelf (pop)" vc-bzr-shelve-apply-at-point |
| 745 | :help "Apply the current shelf")) | 755 | :help "Apply the current shelf and remove it")) |
| 746 | ;; (define-key map [sh] | 756 | ;; (define-key map [sh] |
| 747 | ;; '(menu-item "Show shelve" vc-bzr-shelve-show-at-point | 757 | ;; '(menu-item "Show shelve" vc-bzr-shelve-show-at-point |
| 748 | ;; :help "Show the contents of the current shelve")) | 758 | ;; :help "Show the contents of the current shelve")) |
| @@ -800,7 +810,7 @@ stream. Standard error output is discarded." | |||
| 800 | (propertize x | 810 | (propertize x |
| 801 | 'face 'font-lock-variable-name-face | 811 | 'face 'font-lock-variable-name-face |
| 802 | 'mouse-face 'highlight | 812 | 'mouse-face 'highlight |
| 803 | 'help-echo "mouse-3: Show shelve menu\nA: Apply shelf\nC-k: Delete shelf" | 813 | 'help-echo "mouse-3: Show shelve menu\nP: Apply and remove shelf (pop)\nC-k: Delete shelf" |
| 804 | 'keymap vc-bzr-shelve-map)) | 814 | 'keymap vc-bzr-shelve-map)) |
| 805 | shelve "\n")) | 815 | shelve "\n")) |
| 806 | (concat | 816 | (concat |
| @@ -830,8 +840,8 @@ stream. Standard error output is discarded." | |||
| 830 | ;; (pop-to-buffer (current-buffer))) | 840 | ;; (pop-to-buffer (current-buffer))) |
| 831 | 841 | ||
| 832 | (defun vc-bzr-shelve-apply (name) | 842 | (defun vc-bzr-shelve-apply (name) |
| 833 | "Apply shelve NAME." | 843 | "Apply shelve NAME and remove it afterwards." |
| 834 | (interactive "sApply shelf: ") | 844 | (interactive "sApply (and remove) shelf: ") |
| 835 | (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" name) | 845 | (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" name) |
| 836 | (vc-resynch-buffer (vc-bzr-root default-directory) t t)) | 846 | (vc-resynch-buffer (vc-bzr-root default-directory) t t)) |
| 837 | 847 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index d355e79163e..afa404ca7c1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -8,6 +8,28 @@ | |||
| 8 | (xg_frame_resized, xg_frame_set_char_size): Call | 8 | (xg_frame_resized, xg_frame_set_char_size): Call |
| 9 | xg_clear_under_internal_border. | 9 | xg_clear_under_internal_border. |
| 10 | (xg_update_scrollbar_pos): Clear under old scroll bar position. | 10 | (xg_update_scrollbar_pos): Clear under old scroll bar position. |
| 11 | 2010-01-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 12 | |||
| 13 | * keyboard.c (read_key_sequence): Catch keyboard switch after | ||
| 14 | making a new tty frame (Bug#5095). | ||
| 15 | |||
| 16 | 2010-01-05 Kenichi Handa <handa@m17n.org> | ||
| 17 | |||
| 18 | * fontset.c (fontset_find_font): Fix getting the frame pointer. | ||
| 19 | |||
| 20 | 2010-01-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 21 | |||
| 22 | * dbusbind.c (xd_remove_watch): Avoid trying to convert a void* to | ||
| 23 | Lisp_Object, preferring to convert a lisp_Object to a void* instead. | ||
| 24 | (Fdbus_init_bus): Use XHASH to get a scalar value from a Lisp_Object. | ||
| 25 | |||
| 26 | 2010-01-03 Michael Albinus <michael.albinus@gmx.de> | ||
| 27 | |||
| 28 | * dbusbind.c (xd_add_watch): Improve debug message. | ||
| 29 | (xd_remove_watch): Improve debug message. If DATA is the session | ||
| 30 | bus, unset D-Bus session environment. | ||
| 31 | (Fdbus_init_bus): Pass the bus as argument to | ||
| 32 | dbus_connection_set_watch_functions. (Bug#5283) | ||
| 11 | 33 | ||
| 12 | 2010-01-01 Chong Yidong <cyd@stupidchicken.com> | 34 | 2010-01-01 Chong Yidong <cyd@stupidchicken.com> |
| 13 | 35 | ||
| @@ -155,7 +177,7 @@ | |||
| 155 | 2009-12-15 Michael Albinus <michael.albinus@gmx.de> | 177 | 2009-12-15 Michael Albinus <michael.albinus@gmx.de> |
| 156 | 178 | ||
| 157 | * dbusbind.c (xd_retrieve_arg): Reorder declarations in order to | 179 | * dbusbind.c (xd_retrieve_arg): Reorder declarations in order to |
| 158 | avoid compiler warnings. (Bug #5217). | 180 | avoid compiler warnings. (Bug #5217) |
| 159 | 181 | ||
| 160 | 2009-12-14 Kenichi Handa <handa@m17n.org> | 182 | 2009-12-14 Kenichi Handa <handa@m17n.org> |
| 161 | 183 | ||
| @@ -5330,7 +5352,7 @@ | |||
| 5330 | (XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros. Throw Qdbus_error. | 5352 | (XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros. Throw Qdbus_error. |
| 5331 | (xd_read_queued_messages): Catch Qdbus_error from the macros. | 5353 | (xd_read_queued_messages): Catch Qdbus_error from the macros. |
| 5332 | (all): Replace xsignal1, xsignal2, xsignal3 by the respective | 5354 | (all): Replace xsignal1, xsignal2, xsignal3 by the respective |
| 5333 | macro. (Bug#1186). | 5355 | macro. (Bug#1186) |
| 5334 | 5356 | ||
| 5335 | 2008-10-23 Ali Bahrami <ali_gnu@emvision.com> (tiny change) | 5357 | 2008-10-23 Ali Bahrami <ali_gnu@emvision.com> (tiny change) |
| 5336 | 5358 | ||
| @@ -21224,7 +21246,7 @@ See ChangeLog.10 for earlier changes. | |||
| 21224 | ;; add-log-time-zone-rule: t | 21246 | ;; add-log-time-zone-rule: t |
| 21225 | ;; End: | 21247 | ;; End: |
| 21226 | 21248 | ||
| 21227 | Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. | 21249 | Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 21228 | 21250 | ||
| 21229 | This file is part of GNU Emacs. | 21251 | This file is part of GNU Emacs. |
| 21230 | 21252 | ||
diff --git a/src/dbusbind.c b/src/dbusbind.c index 7c0be49ab77..974a01e8ead 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -761,14 +761,14 @@ xd_add_watch (watch, data) | |||
| 761 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) | 761 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) |
| 762 | { | 762 | { |
| 763 | #if HAVE_DBUS_WATCH_GET_UNIX_FD | 763 | #if HAVE_DBUS_WATCH_GET_UNIX_FD |
| 764 | /* TODO: Reverse these on Win32, which prefers the opposite. */ | 764 | /* TODO: Reverse these on Win32, which prefers the opposite. */ |
| 765 | int fd = dbus_watch_get_unix_fd(watch); | 765 | int fd = dbus_watch_get_unix_fd(watch); |
| 766 | if (fd == -1) | 766 | if (fd == -1) |
| 767 | fd = dbus_watch_get_socket(watch); | 767 | fd = dbus_watch_get_socket(watch); |
| 768 | #else | 768 | #else |
| 769 | int fd = dbus_watch_get_fd(watch); | 769 | int fd = dbus_watch_get_fd(watch); |
| 770 | #endif | 770 | #endif |
| 771 | XD_DEBUG_MESSAGE ("%d", fd); | 771 | XD_DEBUG_MESSAGE ("fd %d", fd); |
| 772 | 772 | ||
| 773 | if (fd == -1) | 773 | if (fd == -1) |
| 774 | return FALSE; | 774 | return FALSE; |
| @@ -781,7 +781,8 @@ xd_add_watch (watch, data) | |||
| 781 | return TRUE; | 781 | return TRUE; |
| 782 | } | 782 | } |
| 783 | 783 | ||
| 784 | /* Remove connection file descriptor from input_wait_mask. */ | 784 | /* Remove connection file descriptor from input_wait_mask. DATA is |
| 785 | the used bus, either QCdbus_system_bus or QCdbus_session_bus. */ | ||
| 785 | void | 786 | void |
| 786 | xd_remove_watch (watch, data) | 787 | xd_remove_watch (watch, data) |
| 787 | DBusWatch *watch; | 788 | DBusWatch *watch; |
| @@ -791,18 +792,25 @@ xd_remove_watch (watch, data) | |||
| 791 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) | 792 | if (dbus_watch_get_flags (watch) & DBUS_WATCH_READABLE) |
| 792 | { | 793 | { |
| 793 | #if HAVE_DBUS_WATCH_GET_UNIX_FD | 794 | #if HAVE_DBUS_WATCH_GET_UNIX_FD |
| 794 | /* TODO: Reverse these on Win32, which prefers the opposite. */ | 795 | /* TODO: Reverse these on Win32, which prefers the opposite. */ |
| 795 | int fd = dbus_watch_get_unix_fd(watch); | 796 | int fd = dbus_watch_get_unix_fd(watch); |
| 796 | if (fd == -1) | 797 | if (fd == -1) |
| 797 | fd = dbus_watch_get_socket(watch); | 798 | fd = dbus_watch_get_socket(watch); |
| 798 | #else | 799 | #else |
| 799 | int fd = dbus_watch_get_fd(watch); | 800 | int fd = dbus_watch_get_fd(watch); |
| 800 | #endif | 801 | #endif |
| 801 | XD_DEBUG_MESSAGE ("%d", fd); | 802 | XD_DEBUG_MESSAGE ("fd %d", fd); |
| 802 | 803 | ||
| 803 | if (fd == -1) | 804 | if (fd == -1) |
| 804 | return; | 805 | return; |
| 805 | 806 | ||
| 807 | /* Unset session environment. */ | ||
| 808 | if ((data != NULL) && (data == (void*) XHASH (QCdbus_session_bus))) | ||
| 809 | { | ||
| 810 | XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS"); | ||
| 811 | unsetenv ("DBUS_SESSION_BUS_ADDRESS"); | ||
| 812 | } | ||
| 813 | |||
| 806 | /* Remove the file descriptor from input_wait_mask. */ | 814 | /* Remove the file descriptor from input_wait_mask. */ |
| 807 | delete_keyboard_wait_descriptor (fd); | 815 | delete_keyboard_wait_descriptor (fd); |
| 808 | } | 816 | } |
| @@ -825,11 +833,12 @@ This is an internal function, it shall not be used outside dbus.el. */) | |||
| 825 | /* Open a connection to the bus. */ | 833 | /* Open a connection to the bus. */ |
| 826 | connection = xd_initialize (bus); | 834 | connection = xd_initialize (bus); |
| 827 | 835 | ||
| 828 | /* Add the watch functions. */ | 836 | /* Add the watch functions. We pass also the bus as data, in order |
| 837 | to distinguish between the busses in xd_remove_watch. */ | ||
| 829 | if (!dbus_connection_set_watch_functions (connection, | 838 | if (!dbus_connection_set_watch_functions (connection, |
| 830 | xd_add_watch, | 839 | xd_add_watch, |
| 831 | xd_remove_watch, | 840 | xd_remove_watch, |
| 832 | NULL, NULL, NULL)) | 841 | NULL, (void*) XHASH (bus), NULL)) |
| 833 | XD_SIGNAL1 (build_string ("Cannot add watch functions")); | 842 | XD_SIGNAL1 (build_string ("Cannot add watch functions")); |
| 834 | 843 | ||
| 835 | /* Return. */ | 844 | /* Return. */ |
diff --git a/src/fontset.c b/src/fontset.c index 30620e511c8..b62c779be70 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -533,8 +533,8 @@ fontset_find_font (fontset, c, face, id, fallback) | |||
| 533 | { | 533 | { |
| 534 | Lisp_Object vec, font_group; | 534 | Lisp_Object vec, font_group; |
| 535 | int i, charset_matched = 0, found_index; | 535 | int i, charset_matched = 0, found_index; |
| 536 | FRAME_PTR f = (FRAMEP (FONTSET_FRAME (fontset))) | 536 | FRAME_PTR f = (FRAMEP (FONTSET_FRAME (fontset)) |
| 537 | ? XFRAME (selected_frame) : XFRAME (FONTSET_FRAME (fontset)); | 537 | ? XFRAME (FONTSET_FRAME (fontset)) : XFRAME (selected_frame)); |
| 538 | Lisp_Object rfont_def; | 538 | Lisp_Object rfont_def; |
| 539 | 539 | ||
| 540 | font_group = fontset_get_font_group (fontset, fallback ? -1 : c); | 540 | font_group = fontset_get_font_group (fontset, fallback ? -1 : c); |
diff --git a/src/keyboard.c b/src/keyboard.c index 7a137ea0dca..13d13cd3276 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -9502,7 +9502,13 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9502 | key = read_char (NILP (prompt), nmaps, | 9502 | key = read_char (NILP (prompt), nmaps, |
| 9503 | (Lisp_Object *) submaps, last_nonmenu_event, | 9503 | (Lisp_Object *) submaps, last_nonmenu_event, |
| 9504 | &used_mouse_menu, NULL); | 9504 | &used_mouse_menu, NULL); |
| 9505 | if (INTEGERP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */ | 9505 | if ((INTEGERP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */ |
| 9506 | /* When switching to a new tty (with a new keyboard), | ||
| 9507 | read_char returns the new buffer, rather than -2 | ||
| 9508 | (Bug#5095). This is because `terminal-init-xterm' | ||
| 9509 | calls read-char, which eats the wrong_kboard_jmpbuf | ||
| 9510 | return. Any better way to fix this? -- cyd */ | ||
| 9511 | || (interrupted_kboard != current_kboard)) | ||
| 9506 | { | 9512 | { |
| 9507 | int found = 0; | 9513 | int found = 0; |
| 9508 | struct kboard *k; | 9514 | struct kboard *k; |