diff options
| author | Alan Mackenzie | 2010-01-19 11:43:25 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2010-01-19 11:43:25 +0000 |
| commit | f7247f5dfc26110d131b59158eb5dfa8de0d6f6e (patch) | |
| tree | d09db2b166c3e06328404b7aba18221bff2cbc84 | |
| parent | 9c34521302b71eee8415a3e341870e2297b8381a (diff) | |
| parent | 32d59dc3dbdc16c25f1f78659d3167c8f9670868 (diff) | |
| download | emacs-f7247f5dfc26110d131b59158eb5dfa8de0d6f6e.tar.gz emacs-f7247f5dfc26110d131b59158eb5dfa8de0d6f6e.zip | |
no message
53 files changed, 1163 insertions, 604 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-01-02 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * .bzrignore: Add more ignored patterns, including for the MS-DOS | ||
| 4 | build. | ||
| 5 | |||
| 1 | 2009-12-27 Karl Fogel <kfogel@red-bean> | 6 | 2009-12-27 Karl Fogel <kfogel@red-bean> |
| 2 | 7 | ||
| 3 | * INSTALL.BZR: Rename from INSTALL.CVS; edit to talk about Bazaar. | 8 | * INSTALL.BZR: Rename from INSTALL.CVS; edit to talk about Bazaar. |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 0f4abc7a984..6dfc203f638 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 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 | |||
| 14 | 2010-01-02 Eli Zaretskii <eliz@gnu.org> | ||
| 15 | |||
| 16 | * modes.texi (Example Major Modes): Fix indentation. (Bug#5195) | ||
| 17 | |||
| 18 | 2010-01-02 Chong Yidong <cyd@stupidchicken.com> | ||
| 19 | |||
| 20 | * nonascii.texi (Text Representations, Character Codes) | ||
| 21 | (Converting Representations, Explicit Encoding) | ||
| 22 | (Translation of Characters): Use hex notation consistently. | ||
| 23 | (Character Sets): Fix map-charset-chars doc (Bug#5197). | ||
| 24 | |||
| 1 | 2010-01-01 Chong Yidong <cyd@stupidchicken.com> | 25 | 2010-01-01 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 26 | ||
| 3 | * loading.texi (Where Defined): Make it clearer that these are | 27 | * loading.texi (Where Defined): Make it clearer that these are |
| @@ -8364,7 +8388,7 @@ | |||
| 8364 | ;; End: | 8388 | ;; End: |
| 8365 | 8389 | ||
| 8366 | Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 8390 | Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
| 8367 | 2007, 2008, 2009 Free Software Foundation, Inc. | 8391 | 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 8368 | 8392 | ||
| 8369 | This file is part of GNU Emacs. | 8393 | This file is part of GNU Emacs. |
| 8370 | 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/modes.texi b/doc/lispref/modes.texi index 1e7ef76ed55..c78ced0d67b 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -1062,8 +1062,8 @@ correspondingly more complicated. Here are excerpts from | |||
| 1062 | ;; @r{part of symbol names but not words.} | 1062 | ;; @r{part of symbol names but not words.} |
| 1063 | ;; @r{(The digit @samp{0} is @code{48} in the @acronym{ASCII} character set.)} | 1063 | ;; @r{(The digit @samp{0} is @code{48} in the @acronym{ASCII} character set.)} |
| 1064 | (while (< i ?0) | 1064 | (while (< i ?0) |
| 1065 | (modify-syntax-entry i "_ " table) | 1065 | (modify-syntax-entry i "_ " table) |
| 1066 | (setq i (1+ i))) | 1066 | (setq i (1+ i))) |
| 1067 | ;; @r{@dots{} similar code follows for other character ranges.} | 1067 | ;; @r{@dots{} similar code follows for other character ranges.} |
| 1068 | @end group | 1068 | @end group |
| 1069 | @group | 1069 | @group |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index d3bbc2c114f..59f790c90da 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -46,12 +46,12 @@ in most any known written language. | |||
| 46 | follows the @dfn{Unicode Standard}. The Unicode Standard assigns a | 46 | follows the @dfn{Unicode Standard}. The Unicode Standard assigns a |
| 47 | unique number, called a @dfn{codepoint}, to each and every character. | 47 | unique number, called a @dfn{codepoint}, to each and every character. |
| 48 | The range of codepoints defined by Unicode, or the Unicode | 48 | The range of codepoints defined by Unicode, or the Unicode |
| 49 | @dfn{codespace}, is @code{0..10FFFF} (in hex), inclusive. Emacs | 49 | @dfn{codespace}, is @code{0..#x10FFFF} (in hexadecimal notation), |
| 50 | extends this range with codepoints in the range @code{110000..3FFFFF}, | 50 | inclusive. Emacs extends this range with codepoints in the range |
| 51 | which it uses for representing characters that are not unified with | 51 | @code{#x110000..#x3FFFFF}, which it uses for representing characters |
| 52 | Unicode and raw 8-bit bytes that cannot be interpreted as characters | 52 | that are not unified with Unicode and @dfn{raw 8-bit bytes} that |
| 53 | (the latter occupy the range @code{3FFF80..3FFFFF}). Thus, a | 53 | cannot be interpreted as characters. Thus, a character codepoint in |
| 54 | character codepoint in Emacs is a 22-bit integer number. | 54 | Emacs is a 22-bit integer number. |
| 55 | 55 | ||
| 56 | @cindex internal representation of characters | 56 | @cindex internal representation of characters |
| 57 | @cindex characters, representation in buffers and strings | 57 | @cindex characters, representation in buffers and strings |
| @@ -189,8 +189,8 @@ of characters as @var{string}. If @var{string} is a multibyte string, | |||
| 189 | it is returned unchanged. The function assumes that @var{string} | 189 | it is returned unchanged. The function assumes that @var{string} |
| 190 | includes only @acronym{ASCII} characters and raw 8-bit bytes; the | 190 | includes only @acronym{ASCII} characters and raw 8-bit bytes; the |
| 191 | latter are converted to their multibyte representation corresponding | 191 | latter are converted to their multibyte representation corresponding |
| 192 | to the codepoints in the @code{3FFF80..3FFFFF} area (@pxref{Text | 192 | to the codepoints @code{#x3FFF80} through @code{#x3FFFFF}, inclusive |
| 193 | Representations, codepoints}). | 193 | (@pxref{Text Representations, codepoints}). |
| 194 | @end defun | 194 | @end defun |
| 195 | 195 | ||
| 196 | @defun string-to-unibyte string | 196 | @defun string-to-unibyte string |
| @@ -271,15 +271,19 @@ contains no text properties. | |||
| 271 | 271 | ||
| 272 | The unibyte and multibyte text representations use different | 272 | The unibyte and multibyte text representations use different |
| 273 | character codes. The valid character codes for unibyte representation | 273 | character codes. The valid character codes for unibyte representation |
| 274 | range from 0 to 255---the values that can fit in one byte. The valid | 274 | range from 0 to @code{#xFF} (255)---the values that can fit in one |
| 275 | character codes for multibyte representation range from 0 to 4194303 | 275 | byte. The valid character codes for multibyte representation range |
| 276 | (#x3FFFFF). In this code space, values 0 through 127 are for | 276 | from 0 to @code{#x3FFFFF}. In this code space, values 0 through |
| 277 | @acronym{ASCII} characters, and values 128 through 4194175 (#x3FFF7F) | 277 | @code{#x7F} (127) are for @acronym{ASCII} characters, and values |
| 278 | are for non-@acronym{ASCII} characters. Values 0 through 1114111 | 278 | @code{#x80} (128) through @code{#x3FFF7F} (4194175) are for |
| 279 | (#10FFFF) correspond to Unicode characters of the same codepoint; | 279 | non-@acronym{ASCII} characters. |
| 280 | values 1114112 (#110000) through 4194175 (#x3FFF7F) represent | 280 | |
| 281 | characters that are not unified with Unicode; and values 4194176 | 281 | Emacs character codes are a superset of the Unicode standard. |
| 282 | (#x3FFF80) through 4194303 (#x3FFFFF) represent eight-bit raw bytes. | 282 | Values 0 through @code{#x10FFFF} (1114111) correspond to Unicode |
| 283 | characters of the same codepoint; values @code{#x110000} (1114112) | ||
| 284 | through @code{#x3FFF7F} (4194175) represent characters that are not | ||
| 285 | unified with Unicode; and values @code{#x3FFF80} (4194176) through | ||
| 286 | @code{#x3FFFFF} (4194303) represent eight-bit raw bytes. | ||
| 283 | 287 | ||
| 284 | @defun characterp charcode | 288 | @defun characterp charcode |
| 285 | This returns @code{t} if @var{charcode} is a valid character, and | 289 | This returns @code{t} if @var{charcode} is a valid character, and |
| @@ -540,7 +544,7 @@ and strings. | |||
| 540 | @cindex @code{eight-bit}, a charset | 544 | @cindex @code{eight-bit}, a charset |
| 541 | Emacs defines several special character sets. The character set | 545 | Emacs defines several special character sets. The character set |
| 542 | @code{unicode} includes all the characters whose Emacs code points are | 546 | @code{unicode} includes all the characters whose Emacs code points are |
| 543 | in the range @code{0..10FFFF}. The character set @code{emacs} | 547 | in the range @code{0..#x10FFFF}. The character set @code{emacs} |
| 544 | includes all @acronym{ASCII} and non-@acronym{ASCII} characters. | 548 | includes all @acronym{ASCII} and non-@acronym{ASCII} characters. |
| 545 | Finally, the @code{eight-bit} charset includes the 8-bit raw bytes; | 549 | Finally, the @code{eight-bit} charset includes the 8-bit raw bytes; |
| 546 | Emacs uses it to represent raw bytes encountered in text. | 550 | Emacs uses it to represent raw bytes encountered in text. |
| @@ -628,12 +632,12 @@ that fits the second argument of @code{decode-char} above. If | |||
| 628 | The following function comes in handy for applying a certain | 632 | The following function comes in handy for applying a certain |
| 629 | function to all or part of the characters in a charset: | 633 | function to all or part of the characters in a charset: |
| 630 | 634 | ||
| 631 | @defun map-charset-chars function charset &optional arg from to | 635 | @defun map-charset-chars function charset &optional arg from-code to-code |
| 632 | Call @var{function} for characters in @var{charset}. @var{function} | 636 | Call @var{function} for characters in @var{charset}. @var{function} |
| 633 | is called with two arguments. The first one is a cons cell | 637 | is called with two arguments. The first one is a cons cell |
| 634 | @code{(@var{from} . @var{to})}, where @var{from} and @var{to} | 638 | @code{(@var{from} . @var{to})}, where @var{from} and @var{to} |
| 635 | indicate a range of characters contained in charset. The second | 639 | indicate a range of characters contained in charset. The second |
| 636 | argument is the optional argument @var{arg}. | 640 | argument passed to @var{function} is @var{arg}. |
| 637 | 641 | ||
| 638 | By default, the range of codepoints passed to @var{function} includes | 642 | By default, the range of codepoints passed to @var{function} includes |
| 639 | all the characters in @var{charset}, but optional arguments | 643 | all the characters in @var{charset}, but optional arguments |
| @@ -751,7 +755,7 @@ This variable automatically becomes buffer-local when set. | |||
| 751 | 755 | ||
| 752 | @defun make-translation-table-from-vector vec | 756 | @defun make-translation-table-from-vector vec |
| 753 | This function returns a translation table made from @var{vec} that is | 757 | This function returns a translation table made from @var{vec} that is |
| 754 | an array of 256 elements to map byte values 0 through 255 to | 758 | an array of 256 elements to map bytes (values 0 through #xFF) to |
| 755 | characters. Elements may be @code{nil} for untranslated bytes. The | 759 | characters. Elements may be @code{nil} for untranslated bytes. The |
| 756 | returned table has a translation table for reverse mapping in the | 760 | returned table has a translation table for reverse mapping in the |
| 757 | first extra slot, and the value @code{1} in the second extra slot. | 761 | first extra slot, and the value @code{1} in the second extra slot. |
| @@ -1562,10 +1566,10 @@ in this section. | |||
| 1562 | text. They logically consist of a series of byte values; that is, a | 1566 | text. They logically consist of a series of byte values; that is, a |
| 1563 | series of @acronym{ASCII} and eight-bit characters. In unibyte | 1567 | series of @acronym{ASCII} and eight-bit characters. In unibyte |
| 1564 | buffers and strings, these characters have codes in the range 0 | 1568 | buffers and strings, these characters have codes in the range 0 |
| 1565 | through 255. In a multibyte buffer or string, eight-bit characters | 1569 | through #xFF (255). In a multibyte buffer or string, eight-bit |
| 1566 | have character codes higher than 255 (@pxref{Text Representations}), | 1570 | characters have character codes higher than #xFF (@pxref{Text |
| 1567 | but Emacs transparently converts them to their single-byte values when | 1571 | Representations}), but Emacs transparently converts them to their |
| 1568 | you encode or decode such text. | 1572 | single-byte values when you encode or decode such text. |
| 1569 | 1573 | ||
| 1570 | The usual way to read a file into a buffer as a sequence of bytes, so | 1574 | The usual way to read a file into a buffer as a sequence of bytes, so |
| 1571 | you can decode the contents explicitly, is with | 1575 | you can decode the contents explicitly, is with |
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 75561a0ba21..cabec8f7fb1 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 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 | |||
| 6 | 2010-01-02 Kevin Ryde <user42@zip.com.au> | ||
| 7 | |||
| 8 | * eieio.texi (Naming Conventions): Correction to xref on elisp | ||
| 9 | coding conventions, is "Tips" node not "Standards". | ||
| 10 | |||
| 1 | 2009-12-24 Chong Yidong <cyd@stupidchicken.com> | 11 | 2009-12-24 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 12 | ||
| 3 | * calc.texi (General Mode Commands): Calc file should be in .emacs.d. | 13 | * calc.texi (General Mode Commands): Calc file should be in .emacs.d. |
| @@ -6507,7 +6517,7 @@ | |||
| 6507 | ;; End: | 6517 | ;; End: |
| 6508 | 6518 | ||
| 6509 | Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, | 6519 | Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, |
| 6510 | 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 6520 | 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 6511 | 6521 | ||
| 6512 | This file is part of GNU Emacs. | 6522 | This file is part of GNU Emacs. |
| 6513 | 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/eieio.texi b/doc/misc/eieio.texi index c8a34bbd160..06ff1677f0f 100755 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | @copying | 11 | @copying |
| 12 | This manual documents EIEIO, an object framework for Emacs Lisp. | 12 | This manual documents EIEIO, an object framework for Emacs Lisp. |
| 13 | 13 | ||
| 14 | Copyright @copyright{} 2007, 2008, 2009 Free Software Foundation, Inc. | 14 | Copyright @copyright{} 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 15 | 15 | ||
| 16 | @quotation | 16 | @quotation |
| 17 | Permission is granted to copy, distribute and/or modify this document | 17 | Permission is granted to copy, distribute and/or modify this document |
| @@ -1776,11 +1776,11 @@ This signal is called when an attempt to reference @var{slot} in | |||
| 1776 | @comment node-name, next, previous, up | 1776 | @comment node-name, next, previous, up |
| 1777 | @chapter Naming Conventions | 1777 | @chapter Naming Conventions |
| 1778 | 1778 | ||
| 1779 | @pxref{Standards,,,elisp,GNU Emacs Lisp Reference Manual}, for a | 1779 | @xref{Tips,,Tips and Conventions,elisp,GNU Emacs Lisp Reference |
| 1780 | description of Emacs Lisp programming conventions. These conventions | 1780 | Manual}, for a description of Emacs Lisp programming conventions. |
| 1781 | help ensure that Emacs packages work nicely one another, so an | 1781 | These conventions help ensure that Emacs packages work nicely one |
| 1782 | @eieio{}-based program should follow them. Here are some conventions | 1782 | another, so an @eieio{}-based program should follow them. Here are |
| 1783 | that apply specifically to @eieio{}-based programs: | 1783 | some conventions that apply specifically to @eieio{}-based programs: |
| 1784 | 1784 | ||
| 1785 | @itemize | 1785 | @itemize |
| 1786 | 1786 | ||
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/etc/ChangeLog b/etc/ChangeLog index 4c84ab70607..176076f066a 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-01-01 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * NEWS: Fix typos. | ||
| 4 | |||
| 1 | 2009-12-15 Glenn Morris <rgm@gnu.org> | 5 | 2009-12-15 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * CONTRIBUTE (Coding Standards): Update URL. | 7 | * CONTRIBUTE (Coding Standards): Update URL. |
| @@ -301,8 +305,8 @@ | |||
| 301 | 305 | ||
| 302 | 2009-05-15 Sven Joachim <svenjoac@gmx.de> | 306 | 2009-05-15 Sven Joachim <svenjoac@gmx.de> |
| 303 | 307 | ||
| 304 | * refcards/de-refcard.tex: Merge changes from refcard.tex. | 308 | * refcards/de-refcard.tex: Merge changes from refcard.tex. |
| 305 | Change `Paragraph' to `Absatz'. | 309 | Change `Paragraph' to `Absatz'. |
| 306 | 310 | ||
| 307 | 2009-04-09 Glenn Morris <rgm@gnu.org> | 311 | 2009-04-09 Glenn Morris <rgm@gnu.org> |
| 308 | 312 | ||
| @@ -182,7 +182,7 @@ that file exists. | |||
| 182 | 182 | ||
| 183 | ** The bookmark menu has a narrowing search via bookmark-bmenu-search. | 183 | ** The bookmark menu has a narrowing search via bookmark-bmenu-search. |
| 184 | 184 | ||
| 185 | ** LaTeX mode now provides completion (via completion-at-point) | 185 | ** LaTeX mode now provides completion (via completion-at-point). |
| 186 | 186 | ||
| 187 | ** sym-comp.el is now declared obsolete, superceded by completion-at-point. | 187 | ** sym-comp.el is now declared obsolete, superceded by completion-at-point. |
| 188 | 188 | ||
| @@ -235,8 +235,9 @@ on the page edge advances to the next/previous page. | |||
| 235 | 235 | ||
| 236 | ** GDB-UI | 236 | ** GDB-UI |
| 237 | 237 | ||
| 238 | *** Toolbar functionality for reverse debugging. Display of STL collections as | 238 | *** Toolbar functionality for reverse debugging. Display of STL |
| 239 | watch expressions. These features require GDB 7.0 or later. | 239 | collections as watch expressions. These features require GDB 7.0 |
| 240 | or later. | ||
| 240 | 241 | ||
| 241 | ** Grep | 242 | ** Grep |
| 242 | +++ | 243 | +++ |
| @@ -586,7 +587,7 @@ a GIF library. | |||
| 586 | 587 | ||
| 587 | *** Emacs now supports multi-page TIFF images. | 588 | *** Emacs now supports multi-page TIFF images. |
| 588 | 589 | ||
| 589 | ** New NeXTSTEP-based port | 590 | ** New NeXTSTEP-based port. |
| 590 | This provides support for GNUstep (via the GNUstep libraries) and Mac | 591 | This provides support for GNUstep (via the GNUstep libraries) and Mac |
| 591 | OS X (via the Cocoa libraries). | 592 | OS X (via the Cocoa libraries). |
| 592 | 593 | ||
| @@ -617,7 +618,7 @@ emacs-devel@gnu.org to inform the Emacs developers. | |||
| 617 | *** Old GNU/Linux systems based on libc version 5. | 618 | *** Old GNU/Linux systems based on libc version 5. |
| 618 | 619 | ||
| 619 | *** Old FreeBSD, NetBSD, and OpenBSD systems based on the COFF | 620 | *** Old FreeBSD, NetBSD, and OpenBSD systems based on the COFF |
| 620 | executable format. | 621 | executable format. |
| 621 | 622 | ||
| 622 | *** Solaris versions 2.6 and below. | 623 | *** Solaris versions 2.6 and below. |
| 623 | 624 | ||
| @@ -1187,23 +1188,23 @@ specifies what to do when a buffer is visited, killed, or written. | |||
| 1187 | ** Abbrev has been rewritten in Elisp and extended with more flexibility. | 1188 | ** Abbrev has been rewritten in Elisp and extended with more flexibility. |
| 1188 | 1189 | ||
| 1189 | *** New functions: abbrev-get, abbrev-put, abbrev-table-get, abbrev-table-put, | 1190 | *** New functions: abbrev-get, abbrev-put, abbrev-table-get, abbrev-table-put, |
| 1190 | abbrev-table-p, abbrev-insert, abbrev-table-menu. | 1191 | abbrev-table-p, abbrev-insert, abbrev-table-menu. |
| 1191 | 1192 | ||
| 1192 | *** Special hook `abbrev-expand-functions' obsoletes `pre-abbrev-expand-hook'. | 1193 | *** Special hook `abbrev-expand-functions' obsoletes `pre-abbrev-expand-hook'. |
| 1193 | 1194 | ||
| 1194 | *** `make-abbrev-table', `define-abbrev', `define-abbrev-table' all take | 1195 | *** `make-abbrev-table', `define-abbrev', `define-abbrev-table' all take |
| 1195 | extra arguments for arbitrary properties. | 1196 | extra arguments for arbitrary properties. |
| 1196 | 1197 | ||
| 1197 | *** New variable `abbrev-minor-mode-table-alist'. | 1198 | *** New variable `abbrev-minor-mode-table-alist'. |
| 1198 | 1199 | ||
| 1199 | *** `local-abbrev-table' can hold a list of abbrev-tables. | 1200 | *** `local-abbrev-table' can hold a list of abbrev-tables. |
| 1200 | 1201 | ||
| 1201 | *** Abbrevs have now the following special properties: | 1202 | *** Abbrevs have now the following special properties: |
| 1202 | `:count', `:system', `:enable-function', `:case-fixed'. | 1203 | `:count', `:system', `:enable-function', `:case-fixed'. |
| 1203 | 1204 | ||
| 1204 | *** Abbrev-tables have now the following special properties: | 1205 | *** Abbrev-tables have now the following special properties: |
| 1205 | `:parents', `:case-fixed', `:enable-function', `:regexp', | 1206 | `:parents', `:case-fixed', `:enable-function', `:regexp', |
| 1206 | `abbrev-table-modiff'. | 1207 | `abbrev-table-modiff'. |
| 1207 | 1208 | ||
| 1208 | ** Apropos | 1209 | ** Apropos |
| 1209 | 1210 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65877141083..e64fa66c490 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,190 @@ | |||
| 1 | 2010-01-06 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * font-setting.el (font-setting-change-default-font): Use user-spec | ||
| 4 | instead of name. | ||
| 5 | |||
| 6 | 2010-01-06 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 7 | |||
| 8 | * vc-bzr.el (vc-bzr-after-dir-status): Ignore pending merges. | ||
| 9 | |||
| 10 | 2010-01-05 Tom Tromey <tromey@redhat.com> | ||
| 11 | |||
| 12 | * progmodes/python.el (python-font-lock-keywords): Handle | ||
| 13 | qualified decorators (Bug#881). | ||
| 14 | |||
| 15 | 2010-01-05 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 16 | |||
| 17 | * vc-bzr.el (vc-bzr-working-revision): Fix looking for a revision | ||
| 18 | in a lightweight checkout. | ||
| 19 | |||
| 20 | 2010-01-05 Kenichi Handa <handa@m17n.org> | ||
| 21 | |||
| 22 | * language/indian.el (malayalam-composable-pattern): Fix ZWNJ and | ||
| 23 | ZWJ. | ||
| 24 | |||
| 25 | 2010-01-05 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 26 | |||
| 27 | * vc-bzr.el (vc-bzr-diff): Obey vc-disable-async-diff. | ||
| 28 | |||
| 29 | 2010-01-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 30 | |||
| 31 | * vc-bzr.el (vc-bzr-state-heuristic): Make it work for lightweight | ||
| 32 | checkouts. (Bug#618) | ||
| 33 | (vc-bzr-log-view-mode): Also highlight the author. | ||
| 34 | (vc-bzr-shelve-map): Change binding for vc-bzr-shelve-apply-at-point. | ||
| 35 | (vc-bzr-shelve-menu-map): | ||
| 36 | (vc-bzr-dir-extra-headers): Improve menu and tooltip text. | ||
| 37 | (vc-bzr-shelve-apply): Make prompt more explicit. | ||
| 38 | |||
| 39 | 2010-01-02 Chong Yidong <cyd@stupidchicken.com> | ||
| 40 | |||
| 41 | * net/browse-url.el (browse-url-encode-url): Don't escape commas. | ||
| 42 | They are valid characters in URL paths (rfc3986), and at least | ||
| 43 | Firefox does not understand the encoded version (Bug#3166). | ||
| 44 | |||
| 45 | 2010-01-02 Daniel Elliott <danelliottster@gmail.com> (tiny change) | ||
| 46 | |||
| 47 | * progmodes/octave-mod.el (octave-end-keywords) | ||
| 48 | (octave-block-begin-or-end-regexp, octave-block-match-alist): Add | ||
| 49 | "end" keyword (Bug#3061). | ||
| 50 | (octave-end-as-array-index-p): New function. | ||
| 51 | (calculate-octave-indent): Use it. | ||
| 52 | |||
| 53 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> | ||
| 54 | |||
| 55 | * bookmark.el: Consistently put the text property on the bookmark name. | ||
| 56 | (bookmark-bmenu-marks-width): Bump back to 2, to include | ||
| 57 | annotation marks. | ||
| 58 | (bookmark-bmenu-hide-filenames): Adjust for above, and put the text | ||
| 59 | property on the bookmark name, instead of not putting it at all. | ||
| 60 | (bookmark-bmenu-list): Fix where we put the text property. | ||
| 61 | |||
| 62 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> | ||
| 63 | |||
| 64 | * bookmark.el (bookmark-bmenu-save): Just depend on the new logic | ||
| 65 | for showing buffer modified state (as added in the previous change). | ||
| 66 | |||
| 67 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> | ||
| 68 | |||
| 69 | * bookmark.el: Show modified state of bookmark buffer more accurately. | ||
| 70 | (bookmark-bmenu-list): Initialize buffer-modified-p properly. | ||
| 71 | (bookmark-send-edited-annotation): Mark bookmark-alist as modified. | ||
| 72 | (with-buffer-modified-unmodified): New macro. | ||
| 73 | (bookmark-bmenu-show-filenames, bookmark-bmenu-hide-filenames) | ||
| 74 | (bookmark-bmenu-mark, bookmark-bmenu-unmark, bookmark-bmenu-delete): | ||
| 75 | Use new macro to preserve the buffer modified state. | ||
| 76 | |||
| 77 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> | ||
| 78 | |||
| 79 | * bookmark.el (bookmark-bmenu-select, bookmark-bmenu-1-window, | ||
| 80 | (bookmark-bmenu-2-window, bookmark-bmenu-this-window) | ||
| 81 | (bookmark-bmenu-other-window, bookmark-bmenu-switch-other-window) | ||
| 82 | (bookmark-bmenu-show-annotation, bookmark-bmenu-edit-annotation) | ||
| 83 | (bookmark-bmenu-rename, bookmark-bmenu-locate) | ||
| 84 | (bookmark-bmenu-relocate, bookmark-bmenu-goto-bookmark): Remove | ||
| 85 | unnecessary calls to `bookmark-bmenu-ensure-position'. | ||
| 86 | |||
| 87 | 2010-01-02 Eli Zaretskii <eliz@gnu.org> | ||
| 88 | |||
| 89 | * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Make | ||
| 90 | the lines in the generated doc string shorter. (Bug#4668) | ||
| 91 | |||
| 92 | 2010-01-02 Ryan Yeske <rcyeske@gmail.com> | ||
| 93 | |||
| 94 | * net/rcirc.el: Add follow-link binding (Bug#4738). | ||
| 95 | |||
| 96 | 2010-01-02 Eli Zaretskii <eliz@gnu.org> | ||
| 97 | |||
| 98 | * Makefile.in (bzr-update): Renamed from cvs-update. | ||
| 99 | (cvs-update): New target for backward compatibility. | ||
| 100 | |||
| 101 | * makefile.w32-in (bzr-update): Renamed from cvs-update. | ||
| 102 | (cvs-update): New target for backward compatibility. | ||
| 103 | |||
| 104 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> | ||
| 105 | |||
| 106 | * bookmark.el: Remove gratuitous gratitude. | ||
| 107 | |||
| 108 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> | ||
| 109 | |||
| 110 | * bookmark.el (bookmark-bmenu-any-marks): New function | ||
| 111 | (bookmark-bmenu-save): Clear buffer modification if no marks. | ||
| 112 | |||
| 113 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> | ||
| 114 | |||
| 115 | * bookmark.el (bookmark-bmenu-marks-width): Define to 1, not 2. | ||
| 116 | (bookmark-bmenu-list, bookmark-bmenu-bookmark): Calculate property | ||
| 117 | positions by using `bookmark-bmenu-marks-width', instead of hardcoding. | ||
| 118 | This fixes the `bookmark-bmenu-execute-deletions' bug reported here: | ||
| 119 | |||
| 120 | http://lists.gnu.org/archive/html/emacs-devel/2009-12/msg00819.html | ||
| 121 | From: Sun Yijiang <sunyijiang {_AT_} gmail.com> | ||
| 122 | To: emacs-devel {_AT_} gnu.org | ||
| 123 | Subject: bookmark.el bug report | ||
| 124 | Date: Mon, 28 Dec 2009 14:19:16 +0800 | ||
| 125 | Message-ID: 5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.com | ||
| 126 | |||
| 127 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> | ||
| 128 | |||
| 129 | * bookmark.el: Improvements suggested by Drew Adams: | ||
| 130 | (bookmark-bmenu-ensure-position): New name for | ||
| 131 | `bookmark-bmenu-check-position'. Just ensure the position, | ||
| 132 | don't return any meaningful value. | ||
| 133 | (bookmark-bmenu-header-height, bookmark-bmenu-marks-width): | ||
| 134 | New constants. | ||
| 135 | |||
| 136 | 2010-01-02 Juanma Barranquero <lekktu@gmail.com> | ||
| 137 | |||
| 138 | * bookmark.el (bookmarks-already-loaded): Doc fix (don't use `iff'). | ||
| 139 | (bookmark-yank-point, bookmark-bmenu-check-position): | ||
| 140 | Fix typos in docstrings. | ||
| 141 | (bookmark-save-flag, bookmark-bmenu-toggle-filenames) | ||
| 142 | (bookmark-name-from-full-record, bookmark-get-position) | ||
| 143 | (bookmark-set-position, bookmark-set, bookmark-handle-bookmark) | ||
| 144 | (bookmark-delete, bookmark-save, bookmark-save, bookmark-bmenu-mode): | ||
| 145 | Remove useless quoting of parenthesis, etc. in docstrings. | ||
| 146 | |||
| 147 | * ediff-mult.el (ediff-prepare-meta-buffer): Fix typo in help message. | ||
| 148 | (ediff-append-custom-diff): Fix typo in error message. | ||
| 149 | (ediff-meta-mark-equal-files): Fix typos in messages. | ||
| 150 | |||
| 151 | * mpc.el (mpc-playlist-delete): Fix typo in error messages. | ||
| 152 | |||
| 153 | * cedet/semantic/db-typecache.el (semanticdb-typecache-find-default): | ||
| 154 | Fix typo in docstring. | ||
| 155 | |||
| 156 | * net/imap-hash.el (imap-hash-make): Doc fix. | ||
| 157 | (imap-hash-test): Fix typo in error message; reflow docstring. | ||
| 158 | (imap-hash-p, imap-hash-get, imap-hash-put, imap-hash-make-message) | ||
| 159 | (imap-hash-count, imap-hash-server, imap-hash-port, imap-hash-ssl) | ||
| 160 | (imap-hash-mailbox, imap-hash-user, imap-hash-password): | ||
| 161 | Fix typos in docstrings. | ||
| 162 | (imap-hash-open-connection): Fix typo in error message. | ||
| 163 | |||
| 164 | * play/gomoku.el (gomoku): Fix typos in docstring. | ||
| 165 | |||
| 166 | * progmodes/gdb-ui.el (gdb-location-alist): Reflow docstring. | ||
| 167 | (gdb-jsonify-buffer): Fix typos in docstring. | ||
| 168 | (gdb-goto-breakpoint): Fix typo in error message. | ||
| 169 | ("Display Other Windows"): Fix typo in help message. | ||
| 170 | (gdb-speedbar-expand-node): Fix typo in question. | ||
| 171 | |||
| 172 | * progmodes/idlw-help.el (idlwave-help-browse-url-available) | ||
| 173 | (idlwave-html-system-help-location, idlwave-html-help-location) | ||
| 174 | (idlwave-help-browser-function, idlwave-help-browser-generic-program) | ||
| 175 | (idlwave-help-browser-generic-args, idlwave-help-directory) | ||
| 176 | (idlwave-html-help-is-available, idlwave-help-mode-line-indicator) | ||
| 177 | (idlwave-help-mode-map, idlwave-help-mode, idlwave-do-context-help) | ||
| 178 | (idlwave-online-help, idlwave-help-html-link) | ||
| 179 | (idlwave-help-show-help-frame, idlwave-help-assistant-command): | ||
| 180 | Fix typos in docstrings. | ||
| 181 | (idlwave-help-with-source, idlwave-help-find-routine-definition): | ||
| 182 | Reflow docstrings. | ||
| 183 | (idlwave-help-assistant-start): Fix typo in error message. | ||
| 184 | |||
| 185 | * progmodes/octave-mod.el (octave-mode, octave-electric-semi) | ||
| 186 | (octave-electric-space): Fix typos in docstrings. | ||
| 187 | |||
| 1 | 2010-01-01 Chong Yidong <cyd@stupidchicken.com> | 188 | 2010-01-01 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 189 | ||
| 3 | * files.el (minibuffer-with-setup-hook): Doc fix (Bug#5149). | 190 | * files.el (minibuffer-with-setup-hook): Doc fix (Bug#5149). |
| @@ -17,7 +204,7 @@ | |||
| 17 | 204 | ||
| 18 | Show working revision correctly for mercurial. | 205 | Show working revision correctly for mercurial. |
| 19 | * vc-hg.el (vc-hg-working-revision): Use hg parent instead of | 206 | * vc-hg.el (vc-hg-working-revision): Use hg parent instead of |
| 20 | hg log as suggested by Alex Harsanyi <alexharsanyi@gmail.com>, | 207 | hg log as suggested by Alex Harsanyi <alexharsanyi@gmail.com>. |
| 21 | 208 | ||
| 22 | 2009-12-29 Juanma Barranquero <lekktu@gmail.com> | 209 | 2009-12-29 Juanma Barranquero <lekktu@gmail.com> |
| 23 | 210 | ||
| @@ -70,8 +257,7 @@ | |||
| 70 | been a secret. (Further to bug#3717.) | 257 | been a secret. (Further to bug#3717.) |
| 71 | (Man-bgproc-sentinel): When "-k foo" produces no output show error | 258 | (Man-bgproc-sentinel): When "-k foo" produces no output show error |
| 72 | "no matches" rather than "Can't find manpage", as the latter reads | 259 | "no matches" rather than "Can't find manpage", as the latter reads |
| 73 | like -k was interpreted as a page name, which is not so. (My | 260 | like -k was interpreted as a page name, which is not so. (Bug#5431) |
| 74 | bug#5431.) | ||
| 75 | 261 | ||
| 76 | 2009-12-26 Michael Albinus <michael.albinus@gmx.de> | 262 | 2009-12-26 Michael Albinus <michael.albinus@gmx.de> |
| 77 | 263 | ||
diff --git a/lisp/Makefile.in b/lisp/Makefile.in index dfa3a98871e..93e75bc51ef 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in | |||
| @@ -165,8 +165,11 @@ update-subdirs: doit | |||
| 165 | 165 | ||
| 166 | updates: update-subdirs autoloads finder-data custom-deps | 166 | updates: update-subdirs autoloads finder-data custom-deps |
| 167 | 167 | ||
| 168 | # This is useful after "cvs up". | 168 | # This is useful after "bzr up". |
| 169 | cvs-update: recompile autoloads finder-data custom-deps | 169 | bzr-update: recompile autoloads finder-data custom-deps |
| 170 | |||
| 171 | # For backwards compatibility: | ||
| 172 | cvs-update: bzr-update | ||
| 170 | 173 | ||
| 171 | # Update the AUTHORS file. | 174 | # Update the AUTHORS file. |
| 172 | 175 | ||
diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 4614eef493d..38f4478cbb4 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el | |||
| @@ -30,51 +30,6 @@ | |||
| 30 | ;; can navigate your way to that location by providing the string. | 30 | ;; can navigate your way to that location by providing the string. |
| 31 | ;; See the "User Variables" section for customizations. | 31 | ;; See the "User Variables" section for customizations. |
| 32 | 32 | ||
| 33 | ;; Thanks to David Bremner <bremner@cs.sfu.ca> for thinking of and | ||
| 34 | ;; then implementing the bookmark-current-bookmark idea. He even | ||
| 35 | ;; sent *patches*, bless his soul... | ||
| 36 | |||
| 37 | ;; Thanks to Gregory M. Saunders <saunders@cis.ohio-state.edu> for | ||
| 38 | ;; fixing and improving bookmark-time-to-save-p. | ||
| 39 | |||
| 40 | ;; Thanks go to Andrew V. Klein <avk@cig.mot.com> for the code that | ||
| 41 | ;; sorts the alist before presenting it to the user (in bookmark-bmenu-list | ||
| 42 | ;; and the menu-bar). | ||
| 43 | |||
| 44 | ;; And much thanks to David Hughes <djh@harston.cv.com> for many small | ||
| 45 | ;; suggestions and the code to implement them (like | ||
| 46 | ;; bookmark-bmenu-check-position, and some of the Lucid compatibility | ||
| 47 | ;; stuff). | ||
| 48 | |||
| 49 | ;; Kudos (whatever they are) go to Jim Blandy <jimb@red-bean.com> | ||
| 50 | ;; for his eminently sensible suggestion to separate bookmark-jump | ||
| 51 | ;; into bookmark-jump and bookmark-jump-noselect, which made many | ||
| 52 | ;; other things cleaner as well. | ||
| 53 | |||
| 54 | ;; Thanks to Roland McGrath for encouragement and help with defining | ||
| 55 | ;; autoloads on the menu-bar. | ||
| 56 | |||
| 57 | ;; Jonathan Stigelman <stig@hackvan.com> gave patches for default | ||
| 58 | ;; values in bookmark-jump and bookmark-set. Everybody please keep | ||
| 59 | ;; all the keystrokes they save thereby and send them to him at the | ||
| 60 | ;; end of each year :-) (No, seriously, thanks Jonathan!) | ||
| 61 | |||
| 62 | ;; Buckets of gratitude to John Grabowski <johng@media.mit.edu> for | ||
| 63 | ;; thinking up the annotations feature and implementing it so well. | ||
| 64 | |||
| 65 | ;; Based on info-bookmark.el, by Karl Fogel and Ken Olstad | ||
| 66 | ;; <olstad@msc.edu>. | ||
| 67 | |||
| 68 | ;; Thanks to Mikio Nakajima <PBC01764@niftyserve.or.jp> for many bugs | ||
| 69 | ;; reported and fixed. | ||
| 70 | |||
| 71 | ;; Thank you, Michael Kifer, for contributing the XEmacs support. | ||
| 72 | |||
| 73 | ;; Enough with the credits already, get on to the good stuff: | ||
| 74 | |||
| 75 | ;; FAVORITE CHINESE RESTAURANT: | ||
| 76 | ;; Boy, that's a tough one. Probably Hong Min, or maybe Emperor's | ||
| 77 | ;; Choice (both in Chicago's Chinatown). Well, both. How about you? | ||
| 78 | 33 | ||
| 79 | ;;; Code: | 34 | ;;; Code: |
| 80 | 35 | ||
| @@ -107,17 +62,17 @@ | |||
| 107 | (defcustom bookmark-save-flag t | 62 | (defcustom bookmark-save-flag t |
| 108 | "Controls when Emacs saves bookmarks to a file. | 63 | "Controls when Emacs saves bookmarks to a file. |
| 109 | --> nil means never save bookmarks, except when `bookmark-save' is | 64 | --> nil means never save bookmarks, except when `bookmark-save' is |
| 110 | explicitly called \(\\[bookmark-save]\). | 65 | explicitly called (\\[bookmark-save]). |
| 111 | --> t means save bookmarks when Emacs is killed. | 66 | --> t means save bookmarks when Emacs is killed. |
| 112 | --> Otherwise, it should be a number that is the frequency with which | 67 | --> Otherwise, it should be a number that is the frequency with which |
| 113 | the bookmark list is saved \(i.e.: the number of times which | 68 | the bookmark list is saved (i.e.: the number of times which |
| 114 | Emacs' bookmark list may be modified before it is automatically | 69 | Emacs' bookmark list may be modified before it is automatically |
| 115 | saved.\). If it is a number, Emacs will also automatically save | 70 | saved.). If it is a number, Emacs will also automatically save |
| 116 | bookmarks when it is killed. | 71 | bookmarks when it is killed. |
| 117 | 72 | ||
| 118 | Therefore, the way to get it to save every time you make or delete a | 73 | Therefore, the way to get it to save every time you make or delete a |
| 119 | bookmark is to set this variable to 1 \(or 0, which produces the same | 74 | bookmark is to set this variable to 1 (or 0, which produces the same |
| 120 | behavior.\) | 75 | behavior.) |
| 121 | 76 | ||
| 122 | To specify the file in which to save them, modify the variable | 77 | To specify the file in which to save them, modify the variable |
| 123 | `bookmark-default-file', which is `~/.emacs.bmk' by default." | 78 | `bookmark-default-file', which is `~/.emacs.bmk' by default." |
| @@ -174,6 +129,13 @@ recently set ones come first, oldest ones come last)." | |||
| 174 | :group 'bookmark) | 129 | :group 'bookmark) |
| 175 | 130 | ||
| 176 | 131 | ||
| 132 | (defconst bookmark-bmenu-header-height 2 | ||
| 133 | "Number of lines used for the *Bookmark List* header.") | ||
| 134 | |||
| 135 | (defconst bookmark-bmenu-marks-width 2 | ||
| 136 | "Number of columns (chars) used for the *Bookmark List* marks column, | ||
| 137 | including the annotations column.") | ||
| 138 | |||
| 177 | (defcustom bookmark-bmenu-file-column 30 | 139 | (defcustom bookmark-bmenu-file-column 30 |
| 178 | "Column at which to display filenames in a buffer listing bookmarks. | 140 | "Column at which to display filenames in a buffer listing bookmarks. |
| 179 | You can toggle whether files are shown with \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-toggle-filenames]." | 141 | You can toggle whether files are shown with \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-toggle-filenames]." |
| @@ -186,7 +148,7 @@ You can toggle whether files are shown with \\<bookmark-bmenu-mode-map>\\[bookma | |||
| 186 | This may result in truncated bookmark names. To disable this, put the | 148 | This may result in truncated bookmark names. To disable this, put the |
| 187 | following in your `.emacs' file: | 149 | following in your `.emacs' file: |
| 188 | 150 | ||
| 189 | \(setq bookmark-bmenu-toggle-filenames nil\)" | 151 | \(setq bookmark-bmenu-toggle-filenames nil)" |
| 190 | :type 'boolean | 152 | :type 'boolean |
| 191 | :group 'bookmark) | 153 | :group 'bookmark) |
| 192 | 154 | ||
| @@ -292,7 +254,7 @@ or the deprecated form (BOOKMARK-NAME PARAM-ALIST). | |||
| 292 | for instance. HANDLER must accept a bookmark as argument.") | 254 | for instance. HANDLER must accept a bookmark as argument.") |
| 293 | 255 | ||
| 294 | (defvar bookmarks-already-loaded nil | 256 | (defvar bookmarks-already-loaded nil |
| 295 | "Non-nil iff bookmarks have been loaded from `bookmark-default-file'.") | 257 | "Non-nil if and only if bookmarks have been loaded from `bookmark-default-file'.") |
| 296 | 258 | ||
| 297 | 259 | ||
| 298 | ;; more stuff added by db. | 260 | ;; more stuff added by db. |
| @@ -322,21 +284,28 @@ the source buffer for that information; see `bookmark-yank-word' and | |||
| 322 | 284 | ||
| 323 | (defvar bookmark-yank-point 0 | 285 | (defvar bookmark-yank-point 0 |
| 324 | "The next point from which to pull source text for `bookmark-yank-word'. | 286 | "The next point from which to pull source text for `bookmark-yank-word'. |
| 325 | This point is in `bookmark-curent-buffer'.") | 287 | This point is in `bookmark-current-buffer'.") |
| 326 | 288 | ||
| 327 | 289 | ||
| 328 | (defvar bookmark-quit-flag nil | 290 | (defvar bookmark-quit-flag nil |
| 329 | "Non nil make `bookmark-bmenu-search' quit immediately.") | 291 | "Non nil make `bookmark-bmenu-search' quit immediately.") |
| 330 | 292 | ||
| 331 | ;; Helper functions. | 293 | ;; Helper functions and macros. |
| 332 | 294 | ||
| 333 | ;; Only functions on this page and the next one (file formats) need to | 295 | (defmacro with-buffer-modified-unmodified (&rest body) |
| 334 | ;; know anything about the format of bookmark-alist entries. | 296 | "Run BODY while preserving the buffer's `buffer-modified-p' state." |
| 297 | (let ((was-modified (make-symbol "was-modified"))) | ||
| 298 | `(let ((,was-modified (buffer-modified-p))) | ||
| 299 | (unwind-protect | ||
| 300 | (progn ,@body) | ||
| 301 | (set-buffer-modified-p ,was-modified))))) | ||
| 302 | |||
| 303 | ;; Only functions below, in this page and the next one (file formats), | ||
| 304 | ;; need to know anything about the format of bookmark-alist entries. | ||
| 335 | ;; Everyone else should go through them. | 305 | ;; Everyone else should go through them. |
| 336 | 306 | ||
| 337 | |||
| 338 | (defun bookmark-name-from-full-record (full-record) | 307 | (defun bookmark-name-from-full-record (full-record) |
| 339 | "Return name of FULL-RECORD \(an alist element instead of a string\)." | 308 | "Return name of FULL-RECORD (an alist element instead of a string)." |
| 340 | (car full-record)) | 309 | (car full-record)) |
| 341 | 310 | ||
| 342 | 311 | ||
| @@ -414,13 +383,13 @@ BOOKMARK may be a bookmark name (a string) or a bookmark record." | |||
| 414 | 383 | ||
| 415 | 384 | ||
| 416 | (defun bookmark-get-position (bookmark) | 385 | (defun bookmark-get-position (bookmark) |
| 417 | "Return the position \(i.e.: point\) of BOOKMARK, or nil if none. | 386 | "Return the position (i.e.: point) of BOOKMARK, or nil if none. |
| 418 | BOOKMARK may be a bookmark name (a string) or a bookmark record." | 387 | BOOKMARK may be a bookmark name (a string) or a bookmark record." |
| 419 | (bookmark-prop-get bookmark 'position)) | 388 | (bookmark-prop-get bookmark 'position)) |
| 420 | 389 | ||
| 421 | 390 | ||
| 422 | (defun bookmark-set-position (bookmark position) | 391 | (defun bookmark-set-position (bookmark position) |
| 423 | "Set the position \(i.e.: point\) of BOOKMARK to POSITION. | 392 | "Set the position (i.e.: point) of BOOKMARK to POSITION. |
| 424 | BOOKMARK may be a bookmark name (a string) or a bookmark record." | 393 | BOOKMARK may be a bookmark name (a string) or a bookmark record." |
| 425 | (bookmark-prop-set bookmark 'position position)) | 394 | (bookmark-prop-set bookmark 'position position)) |
| 426 | 395 | ||
| @@ -800,9 +769,9 @@ this helps you use a single bookmark name to track progress through a | |||
| 800 | large document. If there is no prior bookmark for this document, then | 769 | large document. If there is no prior bookmark for this document, then |
| 801 | C-u inserts an appropriate name based on the buffer or file. | 770 | C-u inserts an appropriate name based on the buffer or file. |
| 802 | 771 | ||
| 803 | Use \\[bookmark-delete] to remove bookmarks \(you give it a name and | 772 | Use \\[bookmark-delete] to remove bookmarks (you give it a name and |
| 804 | it removes only the first instance of a bookmark with that name from | 773 | it removes only the first instance of a bookmark with that name from |
| 805 | the list of bookmarks.\)" | 774 | the list of bookmarks.)" |
| 806 | (interactive (list nil current-prefix-arg)) | 775 | (interactive (list nil current-prefix-arg)) |
| 807 | (let* ((record (bookmark-make-record)) | 776 | (let* ((record (bookmark-make-record)) |
| 808 | (default (car record))) | 777 | (default (car record))) |
| @@ -905,6 +874,8 @@ Lines beginning with `#' are ignored." | |||
| 905 | (let ((annotation (buffer-substring-no-properties (point-min) (point-max))) | 874 | (let ((annotation (buffer-substring-no-properties (point-min) (point-max))) |
| 906 | (bookmark bookmark-annotation-name)) | 875 | (bookmark bookmark-annotation-name)) |
| 907 | (bookmark-set-annotation bookmark annotation) | 876 | (bookmark-set-annotation bookmark annotation) |
| 877 | (setq bookmark-alist-modification-count | ||
| 878 | (1+ bookmark-alist-modification-count)) | ||
| 908 | (bookmark-bmenu-surreptitiously-rebuild-list)) | 879 | (bookmark-bmenu-surreptitiously-rebuild-list)) |
| 909 | (kill-buffer (current-buffer))) | 880 | (kill-buffer (current-buffer))) |
| 910 | 881 | ||
| @@ -953,7 +924,7 @@ If the buffer is associated with a file or directory, use that name." | |||
| 953 | (defun bookmark-yank-word () | 924 | (defun bookmark-yank-word () |
| 954 | "Get the next word from buffer `bookmark-current-buffer' and append | 925 | "Get the next word from buffer `bookmark-current-buffer' and append |
| 955 | it to the name of the bookmark currently being set, advancing | 926 | it to the name of the bookmark currently being set, advancing |
| 956 | `bookmark-yank-point' by one word." | 927 | `bookmark-yank-point' by one word." |
| 957 | (interactive) | 928 | (interactive) |
| 958 | (let ((string (with-current-buffer bookmark-current-buffer | 929 | (let ((string (with-current-buffer bookmark-current-buffer |
| 959 | (goto-char bookmark-yank-point) | 930 | (goto-char bookmark-yank-point) |
| @@ -1125,7 +1096,7 @@ that file no longer exists, then offer interactively to relocate BOOKMARK." | |||
| 1125 | 'bookmark-default-handler) | 1096 | 'bookmark-default-handler) |
| 1126 | (bookmark-get-bookmark bookmark))) | 1097 | (bookmark-get-bookmark bookmark))) |
| 1127 | (message | 1098 | (message |
| 1128 | "Bookmark not relocated; consider removing it \(%s\)." | 1099 | "Bookmark not relocated; consider removing it (%s)." |
| 1129 | bookmark) | 1100 | bookmark) |
| 1130 | (signal (car err) (cdr err)))))))))) | 1101 | (signal (car err) (cdr err)))))))))) |
| 1131 | ;; Added by db. | 1102 | ;; Added by db. |
| @@ -1248,7 +1219,7 @@ name." | |||
| 1248 | "New name: " | 1219 | "New name: " |
| 1249 | nil | 1220 | nil |
| 1250 | (let ((now-map (copy-keymap minibuffer-local-map))) | 1221 | (let ((now-map (copy-keymap minibuffer-local-map))) |
| 1251 | (define-key now-map "\C-w" 'bookmark-yank-word) | 1222 | (define-key now-map "\C-w" 'bookmark-yank-word) |
| 1252 | now-map) | 1223 | now-map) |
| 1253 | nil | 1224 | nil |
| 1254 | 'bookmark-history)))) | 1225 | 'bookmark-history)))) |
| @@ -1290,8 +1261,8 @@ BOOKMARK is a bookmark name (a string), not a bookmark record. | |||
| 1290 | 1261 | ||
| 1291 | Removes only the first instance of a bookmark with that name. If | 1262 | Removes only the first instance of a bookmark with that name. If |
| 1292 | there are one or more other bookmarks with the same name, they will | 1263 | there are one or more other bookmarks with the same name, they will |
| 1293 | not be deleted. Defaults to the \"current\" bookmark \(that is, the | 1264 | not be deleted. Defaults to the \"current\" bookmark (that is, the |
| 1294 | one most recently used in this file, if any\). | 1265 | one most recently used in this file, if any). |
| 1295 | Optional second arg BATCH means don't update the bookmark list buffer, | 1266 | Optional second arg BATCH means don't update the bookmark list buffer, |
| 1296 | probably because we were called from there." | 1267 | probably because we were called from there." |
| 1297 | (interactive | 1268 | (interactive |
| @@ -1342,7 +1313,7 @@ Don't use this in Lisp programs; use `bookmark-save' instead." | |||
| 1342 | "Save currently defined bookmarks. | 1313 | "Save currently defined bookmarks. |
| 1343 | Saves by default in the file defined by the variable | 1314 | Saves by default in the file defined by the variable |
| 1344 | `bookmark-default-file'. With a prefix arg, save it in file FILE | 1315 | `bookmark-default-file'. With a prefix arg, save it in file FILE |
| 1345 | \(second argument\). | 1316 | \(second argument). |
| 1346 | 1317 | ||
| 1347 | If you are calling this from Lisp, the two arguments are PARG and | 1318 | If you are calling this from Lisp, the two arguments are PARG and |
| 1348 | FILE, and if you just want it to write to the default file, then | 1319 | FILE, and if you just want it to write to the default file, then |
| @@ -1351,7 +1322,7 @@ instead. If you pass in one argument, and it is non-nil, then the | |||
| 1351 | user will be interactively queried for a file to save in. | 1322 | user will be interactively queried for a file to save in. |
| 1352 | 1323 | ||
| 1353 | When you want to load in the bookmarks from a file, use | 1324 | When you want to load in the bookmarks from a file, use |
| 1354 | \`bookmark-load\', \\[bookmark-load]. That function will prompt you | 1325 | `bookmark-load', \\[bookmark-load]. That function will prompt you |
| 1355 | for a file, defaulting to the file defined by variable | 1326 | for a file, defaulting to the file defined by variable |
| 1356 | `bookmark-default-file'." | 1327 | `bookmark-default-file'." |
| 1357 | (interactive "P") | 1328 | (interactive "P") |
| @@ -1389,7 +1360,7 @@ for a file, defaulting to the file defined by variable | |||
| 1389 | ;; Rather than a single call to `pp' we make one per bookmark. | 1360 | ;; Rather than a single call to `pp' we make one per bookmark. |
| 1390 | ;; Apparently `pp' has a poor algorithmic complexity, so this | 1361 | ;; Apparently `pp' has a poor algorithmic complexity, so this |
| 1391 | ;; scales a lot better. bug#4485. | 1362 | ;; scales a lot better. bug#4485. |
| 1392 | (dolist (i bookmark-alist) (pp i (current-buffer))) | 1363 | (dolist (i bookmark-alist) (pp i (current-buffer))) |
| 1393 | (insert ")") | 1364 | (insert ")") |
| 1394 | (let ((version-control | 1365 | (let ((version-control |
| 1395 | (cond | 1366 | (cond |
| @@ -1586,14 +1557,16 @@ deletion, or > if it is flagged for displaying." | |||
| 1586 | " *" " ") | 1557 | " *" " ") |
| 1587 | name) | 1558 | name) |
| 1588 | (setq end (point)) | 1559 | (setq end (point)) |
| 1589 | (put-text-property start (+ 2 start) 'bookmark-name-prop name) | 1560 | (put-text-property |
| 1561 | (+ bookmark-bmenu-marks-width start) end 'bookmark-name-prop name) | ||
| 1590 | (when (display-mouse-p) | 1562 | (when (display-mouse-p) |
| 1591 | (add-text-properties | 1563 | (add-text-properties |
| 1592 | (+ 2 start) end | 1564 | (+ bookmark-bmenu-marks-width start) end |
| 1593 | '(mouse-face highlight | 1565 | '(mouse-face highlight |
| 1594 | follow-link t | 1566 | follow-link t |
| 1595 | help-echo "mouse-2: go to this bookmark in other window"))) | 1567 | help-echo "mouse-2: go to this bookmark in other window"))) |
| 1596 | (insert "\n"))) | 1568 | (insert "\n"))) |
| 1569 | (set-buffer-modified-p (not (= bookmark-alist-modification-count 0))) | ||
| 1597 | (goto-char (point-min)) | 1570 | (goto-char (point-min)) |
| 1598 | (forward-line 2) | 1571 | (forward-line 2) |
| 1599 | (bookmark-bmenu-mode) | 1572 | (bookmark-bmenu-mode) |
| @@ -1625,8 +1598,8 @@ Bookmark names preceded by a \"*\" have annotations. | |||
| 1625 | \\[bookmark-bmenu-other-window] -- select this bookmark in another window, | 1598 | \\[bookmark-bmenu-other-window] -- select this bookmark in another window, |
| 1626 | so the bookmark menu bookmark remains visible in its window. | 1599 | so the bookmark menu bookmark remains visible in its window. |
| 1627 | \\[bookmark-bmenu-switch-other-window] -- switch the other window to this bookmark. | 1600 | \\[bookmark-bmenu-switch-other-window] -- switch the other window to this bookmark. |
| 1628 | \\[bookmark-bmenu-rename] -- rename this bookmark \(prompts for new name\). | 1601 | \\[bookmark-bmenu-rename] -- rename this bookmark (prompts for new name). |
| 1629 | \\[bookmark-bmenu-relocate] -- relocate this bookmark's file \(prompts for new file\). | 1602 | \\[bookmark-bmenu-relocate] -- relocate this bookmark's file (prompts for new file). |
| 1630 | \\[bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down. | 1603 | \\[bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down. |
| 1631 | \\[bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up. | 1604 | \\[bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up. |
| 1632 | \\[bookmark-bmenu-execute-deletions] -- delete bookmarks marked with `\\[bookmark-bmenu-delete]'. | 1605 | \\[bookmark-bmenu-execute-deletions] -- delete bookmarks marked with `\\[bookmark-bmenu-delete]'. |
| @@ -1672,26 +1645,27 @@ Non-nil FORCE forces a redisplay showing the filenames. FORCE is used | |||
| 1672 | mainly for debugging, and should not be necessary in normal use." | 1645 | mainly for debugging, and should not be necessary in normal use." |
| 1673 | (if (and (not force) bookmark-bmenu-toggle-filenames) | 1646 | (if (and (not force) bookmark-bmenu-toggle-filenames) |
| 1674 | nil ;already shown, so do nothing | 1647 | nil ;already shown, so do nothing |
| 1675 | (save-excursion | 1648 | (with-buffer-modified-unmodified |
| 1676 | (save-window-excursion | 1649 | (save-excursion |
| 1677 | (goto-char (point-min)) | 1650 | (save-window-excursion |
| 1678 | (forward-line 2) | 1651 | (goto-char (point-min)) |
| 1679 | (setq bookmark-bmenu-hidden-bookmarks ()) | 1652 | (forward-line 2) |
| 1680 | (let ((inhibit-read-only t)) | 1653 | (setq bookmark-bmenu-hidden-bookmarks ()) |
| 1681 | (while (< (point) (point-max)) | 1654 | (let ((inhibit-read-only t)) |
| 1682 | (let ((bmrk (bookmark-bmenu-bookmark))) | 1655 | (while (< (point) (point-max)) |
| 1683 | (push bmrk bookmark-bmenu-hidden-bookmarks) | 1656 | (let ((bmrk (bookmark-bmenu-bookmark))) |
| 1684 | (let ((start (save-excursion (end-of-line) (point)))) | 1657 | (push bmrk bookmark-bmenu-hidden-bookmarks) |
| 1685 | (move-to-column bookmark-bmenu-file-column t) | 1658 | (let ((start (save-excursion (end-of-line) (point)))) |
| 1686 | ;; Strip off `mouse-face' from the white spaces region. | 1659 | (move-to-column bookmark-bmenu-file-column t) |
| 1687 | (if (display-mouse-p) | 1660 | ;; Strip off `mouse-face' from the white spaces region. |
| 1688 | (remove-text-properties start (point) | 1661 | (if (display-mouse-p) |
| 1689 | '(mouse-face nil help-echo nil)))) | 1662 | (remove-text-properties start (point) |
| 1690 | (delete-region (point) (progn (end-of-line) (point))) | 1663 | '(mouse-face nil help-echo nil)))) |
| 1691 | (insert " ") | 1664 | (delete-region (point) (progn (end-of-line) (point))) |
| 1692 | ;; Pass the NO-HISTORY arg: | 1665 | (insert " ") |
| 1693 | (bookmark-insert-location bmrk t) | 1666 | ;; Pass the NO-HISTORY arg: |
| 1694 | (forward-line 1)))))))) | 1667 | (bookmark-insert-location bmrk t) |
| 1668 | (forward-line 1))))))))) | ||
| 1695 | 1669 | ||
| 1696 | 1670 | ||
| 1697 | (defun bookmark-bmenu-hide-filenames (&optional force) | 1671 | (defun bookmark-bmenu-hide-filenames (&optional force) |
| @@ -1700,59 +1674,47 @@ Non-nil FORCE forces a redisplay showing the filenames. FORCE is used | |||
| 1700 | mainly for debugging, and should not be necessary in normal use." | 1674 | mainly for debugging, and should not be necessary in normal use." |
| 1701 | (when (and (not force) bookmark-bmenu-toggle-filenames) | 1675 | (when (and (not force) bookmark-bmenu-toggle-filenames) |
| 1702 | ;; nothing to hide if above is nil | 1676 | ;; nothing to hide if above is nil |
| 1703 | (save-excursion | 1677 | (with-buffer-modified-unmodified |
| 1704 | (goto-char (point-min)) | 1678 | (save-excursion |
| 1705 | (forward-line 2) | 1679 | (goto-char (point-min)) |
| 1706 | (setq bookmark-bmenu-hidden-bookmarks | 1680 | (forward-line 2) |
| 1707 | (nreverse bookmark-bmenu-hidden-bookmarks)) | 1681 | (setq bookmark-bmenu-hidden-bookmarks |
| 1708 | (let ((inhibit-read-only t) | 1682 | (nreverse bookmark-bmenu-hidden-bookmarks)) |
| 1709 | (column (save-excursion | 1683 | (let ((inhibit-read-only t)) |
| 1710 | (goto-char (point-min)) | 1684 | (while bookmark-bmenu-hidden-bookmarks |
| 1711 | (search-forward "Bookmark") | 1685 | (move-to-column bookmark-bmenu-marks-width t) |
| 1712 | (backward-word 1) | 1686 | (bookmark-kill-line) |
| 1713 | (current-column)))) | 1687 | (let ((name (pop bookmark-bmenu-hidden-bookmarks)) |
| 1714 | (while bookmark-bmenu-hidden-bookmarks | 1688 | (start (point))) |
| 1715 | (move-to-column column t) | 1689 | (insert name) |
| 1716 | (bookmark-kill-line) | 1690 | (put-text-property start (point) 'bookmark-name-prop name) |
| 1717 | (let ((name (pop bookmark-bmenu-hidden-bookmarks)) | 1691 | (if (display-mouse-p) |
| 1718 | (start (point))) | 1692 | (add-text-properties |
| 1719 | (insert name) | 1693 | start (point) |
| 1720 | (if (display-mouse-p) | 1694 | '(mouse-face |
| 1721 | (add-text-properties | 1695 | highlight follow-link t help-echo |
| 1722 | start (point) | 1696 | "mouse-2: go to this bookmark in other window")))) |
| 1723 | '(mouse-face highlight | 1697 | (forward-line 1))))))) |
| 1724 | follow-link t | 1698 | |
| 1725 | help-echo | 1699 | |
| 1726 | "mouse-2: go to this bookmark in other window")))) | 1700 | (defun bookmark-bmenu-ensure-position () |
| 1727 | (forward-line 1)))))) | ||
| 1728 | |||
| 1729 | |||
| 1730 | (defun bookmark-bmenu-check-position () | ||
| 1731 | "If point is not on a bookmark line, move it to one. | 1701 | "If point is not on a bookmark line, move it to one. |
| 1732 | If before the first bookmark line, move it to the first. | 1702 | If before the first bookmark line, move to the first; if after the |
| 1733 | If after the last, move it to the last. | 1703 | last full line, move to the last full line. The return value is undefined." |
| 1734 | Return `bookmark-alist'" | 1704 | (cond ((< (count-lines (point-min) (point)) bookmark-bmenu-header-height) |
| 1735 | ;; FIXME: The doc string originally implied that this returns nil if | ||
| 1736 | ;; not on a bookmark, which is false. Is there any real reason to | ||
| 1737 | ;; return `bookmark-alist'? This seems to be called in a few places | ||
| 1738 | ;; as a check of whether point is on a bookmark line. Those | ||
| 1739 | ;; "checks" are in fact no-ops, since this never returns nil. | ||
| 1740 | ;; -dadams, 2009-10-10 | ||
| 1741 | (cond ((< (count-lines (point-min) (point)) 2) | ||
| 1742 | (goto-char (point-min)) | 1705 | (goto-char (point-min)) |
| 1743 | (forward-line 2) | 1706 | (forward-line bookmark-bmenu-header-height)) |
| 1744 | bookmark-alist) | ||
| 1745 | ((and (bolp) (eobp)) | 1707 | ((and (bolp) (eobp)) |
| 1746 | (beginning-of-line 0) | 1708 | (beginning-of-line 0)))) |
| 1747 | bookmark-alist) | ||
| 1748 | (t | ||
| 1749 | bookmark-alist))) | ||
| 1750 | 1709 | ||
| 1751 | 1710 | ||
| 1752 | (defun bookmark-bmenu-bookmark () | 1711 | (defun bookmark-bmenu-bookmark () |
| 1753 | "Return the bookmark for this line in an interactive bookmark list buffer." | 1712 | "Return the bookmark for this line in an interactive bookmark list buffer." |
| 1754 | (when (bookmark-bmenu-check-position) | 1713 | (bookmark-bmenu-ensure-position) |
| 1755 | (get-text-property (line-beginning-position) 'bookmark-name-prop))) | 1714 | (save-excursion |
| 1715 | (beginning-of-line) | ||
| 1716 | (forward-char bookmark-bmenu-marks-width) | ||
| 1717 | (get-text-property (point) 'bookmark-name-prop))) | ||
| 1756 | 1718 | ||
| 1757 | 1719 | ||
| 1758 | (defun bookmark-show-annotation (bookmark) | 1720 | (defun bookmark-show-annotation (bookmark) |
| @@ -1796,44 +1758,58 @@ if an annotation exists." | |||
| 1796 | "Mark bookmark on this line to be displayed by \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-select]." | 1758 | "Mark bookmark on this line to be displayed by \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-select]." |
| 1797 | (interactive) | 1759 | (interactive) |
| 1798 | (beginning-of-line) | 1760 | (beginning-of-line) |
| 1799 | (if (bookmark-bmenu-check-position) | 1761 | (bookmark-bmenu-ensure-position) |
| 1800 | (let ((inhibit-read-only t)) | 1762 | (with-buffer-modified-unmodified |
| 1801 | (delete-char 1) | 1763 | (let ((inhibit-read-only t)) |
| 1802 | (insert ?>) | 1764 | (delete-char 1) |
| 1803 | (forward-line 1) | 1765 | (insert ?>) |
| 1804 | (bookmark-bmenu-check-position)))) | 1766 | (forward-line 1) |
| 1767 | (bookmark-bmenu-ensure-position)))) | ||
| 1805 | 1768 | ||
| 1806 | 1769 | ||
| 1807 | (defun bookmark-bmenu-select () | 1770 | (defun bookmark-bmenu-select () |
| 1808 | "Select this line's bookmark; also display bookmarks marked with `>'. | 1771 | "Select this line's bookmark; also display bookmarks marked with `>'. |
| 1809 | You can mark bookmarks with the \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-mark] command." | 1772 | You can mark bookmarks with the \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-mark] command." |
| 1810 | (interactive) | 1773 | (interactive) |
| 1811 | (if (bookmark-bmenu-check-position) | 1774 | (let ((bmrk (bookmark-bmenu-bookmark)) |
| 1812 | (let ((bmrk (bookmark-bmenu-bookmark)) | 1775 | (menu (current-buffer)) |
| 1813 | (menu (current-buffer)) | 1776 | (others ()) |
| 1814 | (others ()) | 1777 | tem) |
| 1815 | tem) | 1778 | (goto-char (point-min)) |
| 1816 | (goto-char (point-min)) | 1779 | (while (re-search-forward "^>" nil t) |
| 1817 | (while (re-search-forward "^>" nil t) | 1780 | (setq tem (bookmark-bmenu-bookmark)) |
| 1818 | (setq tem (bookmark-bmenu-bookmark)) | 1781 | (let ((inhibit-read-only t)) |
| 1819 | (let ((inhibit-read-only t)) | 1782 | (delete-char -1) |
| 1820 | (delete-char -1) | 1783 | (insert ?\s)) |
| 1821 | (insert ?\s)) | 1784 | (or (string-equal tem bmrk) |
| 1822 | (or (string-equal tem bmrk) | 1785 | (member tem others) |
| 1823 | (member tem others) | 1786 | (setq others (cons tem others)))) |
| 1824 | (setq others (cons tem others)))) | 1787 | (setq others (nreverse others) |
| 1825 | (setq others (nreverse others) | 1788 | tem (/ (1- (frame-height)) (1+ (length others)))) |
| 1826 | tem (/ (1- (frame-height)) (1+ (length others)))) | 1789 | (delete-other-windows) |
| 1827 | (delete-other-windows) | 1790 | (bookmark-jump bmrk) |
| 1828 | (bookmark-jump bmrk) | 1791 | (bury-buffer menu) |
| 1829 | (bury-buffer menu) | 1792 | (if others |
| 1830 | (if others | 1793 | (while others |
| 1831 | (while others | 1794 | (split-window nil tem) |
| 1832 | (split-window nil tem) | 1795 | (other-window 1) |
| 1833 | (other-window 1) | 1796 | (bookmark-jump (car others)) |
| 1834 | (bookmark-jump (car others)) | 1797 | (setq others (cdr others))) |
| 1835 | (setq others (cdr others))) | 1798 | (other-window 1)))) |
| 1836 | (other-window 1))))) | 1799 | |
| 1800 | |||
| 1801 | (defun bookmark-bmenu-any-marks () | ||
| 1802 | "Return non-nil if any bookmarks are marked in the marks column." | ||
| 1803 | (save-excursion | ||
| 1804 | (goto-char (point-min)) | ||
| 1805 | (bookmark-bmenu-ensure-position) | ||
| 1806 | (catch 'found-mark | ||
| 1807 | (while (not (eobp)) | ||
| 1808 | (beginning-of-line) | ||
| 1809 | (if (looking-at "^\\S-") | ||
| 1810 | (throw 'found-mark t) | ||
| 1811 | (forward-line 1))) | ||
| 1812 | nil))) | ||
| 1837 | 1813 | ||
| 1838 | 1814 | ||
| 1839 | (defun bookmark-bmenu-save (parg) | 1815 | (defun bookmark-bmenu-save (parg) |
| @@ -1842,57 +1818,53 @@ With a prefix arg, prompts for a file to save them in." | |||
| 1842 | (interactive "P") | 1818 | (interactive "P") |
| 1843 | (save-excursion | 1819 | (save-excursion |
| 1844 | (save-window-excursion | 1820 | (save-window-excursion |
| 1845 | (bookmark-save parg)))) | 1821 | (bookmark-save parg) |
| 1822 | (set-buffer-modified-p nil)))) | ||
| 1846 | 1823 | ||
| 1847 | 1824 | ||
| 1848 | (defun bookmark-bmenu-load () | 1825 | (defun bookmark-bmenu-load () |
| 1849 | "Load the bookmark file and rebuild the bookmark menu-buffer." | 1826 | "Load the bookmark file and rebuild the bookmark menu-buffer." |
| 1850 | (interactive) | 1827 | (interactive) |
| 1851 | (if (bookmark-bmenu-check-position) | 1828 | (bookmark-bmenu-ensure-position) |
| 1852 | (save-excursion | 1829 | (save-excursion |
| 1853 | (save-window-excursion | 1830 | (save-window-excursion |
| 1854 | ;; This will call `bookmark-bmenu-list' | 1831 | ;; This will call `bookmark-bmenu-list' |
| 1855 | (call-interactively 'bookmark-load))))) | 1832 | (call-interactively 'bookmark-load)))) |
| 1856 | 1833 | ||
| 1857 | 1834 | ||
| 1858 | (defun bookmark-bmenu-1-window () | 1835 | (defun bookmark-bmenu-1-window () |
| 1859 | "Select this line's bookmark, alone, in full frame." | 1836 | "Select this line's bookmark, alone, in full frame." |
| 1860 | (interactive) | 1837 | (interactive) |
| 1861 | (if (bookmark-bmenu-check-position) | 1838 | (bookmark-jump (bookmark-bmenu-bookmark)) |
| 1862 | (progn | 1839 | (bury-buffer (other-buffer)) |
| 1863 | (bookmark-jump (bookmark-bmenu-bookmark)) | 1840 | (delete-other-windows)) |
| 1864 | (bury-buffer (other-buffer)) | ||
| 1865 | (delete-other-windows)))) | ||
| 1866 | 1841 | ||
| 1867 | 1842 | ||
| 1868 | (defun bookmark-bmenu-2-window () | 1843 | (defun bookmark-bmenu-2-window () |
| 1869 | "Select this line's bookmark, with previous buffer in second window." | 1844 | "Select this line's bookmark, with previous buffer in second window." |
| 1870 | (interactive) | 1845 | (interactive) |
| 1871 | (if (bookmark-bmenu-check-position) | 1846 | (let ((bmrk (bookmark-bmenu-bookmark)) |
| 1872 | (let ((bmrk (bookmark-bmenu-bookmark)) | 1847 | (menu (current-buffer)) |
| 1873 | (menu (current-buffer)) | 1848 | (pop-up-windows t)) |
| 1874 | (pop-up-windows t)) | 1849 | (delete-other-windows) |
| 1875 | (delete-other-windows) | 1850 | (switch-to-buffer (other-buffer)) |
| 1876 | (switch-to-buffer (other-buffer)) | 1851 | (let ((bookmark-automatically-show-annotations nil)) ;FIXME: needed? |
| 1877 | (let ((bookmark-automatically-show-annotations nil)) ;FIXME: needed? | 1852 | (bookmark--jump-via bmrk 'pop-to-buffer)) |
| 1878 | (bookmark--jump-via bmrk 'pop-to-buffer)) | 1853 | (bury-buffer menu))) |
| 1879 | (bury-buffer menu)))) | ||
| 1880 | 1854 | ||
| 1881 | 1855 | ||
| 1882 | (defun bookmark-bmenu-this-window () | 1856 | (defun bookmark-bmenu-this-window () |
| 1883 | "Select this line's bookmark in this window." | 1857 | "Select this line's bookmark in this window." |
| 1884 | (interactive) | 1858 | (interactive) |
| 1885 | (if (bookmark-bmenu-check-position) | 1859 | (bookmark-jump (bookmark-bmenu-bookmark))) |
| 1886 | (bookmark-jump (bookmark-bmenu-bookmark)))) | ||
| 1887 | 1860 | ||
| 1888 | 1861 | ||
| 1889 | (defun bookmark-bmenu-other-window () | 1862 | (defun bookmark-bmenu-other-window () |
| 1890 | "Select this line's bookmark in other window, leaving bookmark menu visible." | 1863 | "Select this line's bookmark in other window, leaving bookmark menu visible." |
| 1891 | (interactive) | 1864 | (interactive) |
| 1892 | (let ((bookmark (bookmark-bmenu-bookmark))) | 1865 | (let ((bookmark (bookmark-bmenu-bookmark))) |
| 1893 | (if (bookmark-bmenu-check-position) | 1866 | (let ((bookmark-automatically-show-annotations t)) ;FIXME: needed? |
| 1894 | (let ((bookmark-automatically-show-annotations t)) ;FIXME: needed? | 1867 | (bookmark--jump-via bookmark 'switch-to-buffer-other-window)))) |
| 1895 | (bookmark--jump-via bookmark 'switch-to-buffer-other-window))))) | ||
| 1896 | 1868 | ||
| 1897 | 1869 | ||
| 1898 | (defun bookmark-bmenu-switch-other-window () | 1870 | (defun bookmark-bmenu-switch-other-window () |
| @@ -1903,9 +1875,8 @@ The current window remains selected." | |||
| 1903 | (pop-up-windows t) | 1875 | (pop-up-windows t) |
| 1904 | same-window-buffer-names | 1876 | same-window-buffer-names |
| 1905 | same-window-regexps) | 1877 | same-window-regexps) |
| 1906 | (if (bookmark-bmenu-check-position) | 1878 | (let ((bookmark-automatically-show-annotations t)) ;FIXME: needed? |
| 1907 | (let ((bookmark-automatically-show-annotations t)) ;FIXME: needed? | 1879 | (bookmark--jump-via bookmark 'display-buffer)))) |
| 1908 | (bookmark--jump-via bookmark 'display-buffer))))) | ||
| 1909 | 1880 | ||
| 1910 | (defun bookmark-bmenu-other-window-with-mouse (event) | 1881 | (defun bookmark-bmenu-other-window-with-mouse (event) |
| 1911 | "Select bookmark at the mouse pointer in other window, leaving bookmark menu visible." | 1882 | "Select bookmark at the mouse pointer in other window, leaving bookmark menu visible." |
| @@ -1920,8 +1891,7 @@ The current window remains selected." | |||
| 1920 | "Show the annotation for the current bookmark in another window." | 1891 | "Show the annotation for the current bookmark in another window." |
| 1921 | (interactive) | 1892 | (interactive) |
| 1922 | (let ((bookmark (bookmark-bmenu-bookmark))) | 1893 | (let ((bookmark (bookmark-bmenu-bookmark))) |
| 1923 | (if (bookmark-bmenu-check-position) | 1894 | (bookmark-show-annotation bookmark))) |
| 1924 | (bookmark-show-annotation bookmark)))) | ||
| 1925 | 1895 | ||
| 1926 | 1896 | ||
| 1927 | (defun bookmark-bmenu-show-all-annotations () | 1897 | (defun bookmark-bmenu-show-all-annotations () |
| @@ -1934,8 +1904,7 @@ The current window remains selected." | |||
| 1934 | "Edit the annotation for the current bookmark in another window." | 1904 | "Edit the annotation for the current bookmark in another window." |
| 1935 | (interactive) | 1905 | (interactive) |
| 1936 | (let ((bookmark (bookmark-bmenu-bookmark))) | 1906 | (let ((bookmark (bookmark-bmenu-bookmark))) |
| 1937 | (if (bookmark-bmenu-check-position) | 1907 | (bookmark-edit-annotation bookmark))) |
| 1938 | (bookmark-edit-annotation bookmark)))) | ||
| 1939 | 1908 | ||
| 1940 | 1909 | ||
| 1941 | (defun bookmark-bmenu-unmark (&optional backup) | 1910 | (defun bookmark-bmenu-unmark (&optional backup) |
| @@ -1943,27 +1912,26 @@ The current window remains selected." | |||
| 1943 | Optional BACKUP means move up." | 1912 | Optional BACKUP means move up." |
| 1944 | (interactive "P") | 1913 | (interactive "P") |
| 1945 | (beginning-of-line) | 1914 | (beginning-of-line) |
| 1946 | (if (bookmark-bmenu-check-position) | 1915 | (bookmark-bmenu-ensure-position) |
| 1947 | (progn | 1916 | (with-buffer-modified-unmodified |
| 1948 | (let ((inhibit-read-only t)) | 1917 | (let ((inhibit-read-only t)) |
| 1949 | (delete-char 1) | 1918 | (delete-char 1) |
| 1950 | ;; any flags to reset according to circumstances? How about a | 1919 | ;; any flags to reset according to circumstances? How about a |
| 1951 | ;; flag indicating whether this bookmark is being visited? | 1920 | ;; flag indicating whether this bookmark is being visited? |
| 1952 | ;; well, we don't have this now, so maybe later. | 1921 | ;; well, we don't have this now, so maybe later. |
| 1953 | (insert " ")) | 1922 | (insert " ")) |
| 1954 | (forward-line (if backup -1 1)) | 1923 | (forward-line (if backup -1 1)) |
| 1955 | (bookmark-bmenu-check-position)))) | 1924 | (bookmark-bmenu-ensure-position))) |
| 1956 | 1925 | ||
| 1957 | 1926 | ||
| 1958 | (defun bookmark-bmenu-backup-unmark () | 1927 | (defun bookmark-bmenu-backup-unmark () |
| 1959 | "Move up and cancel all requested operations on bookmark on line above." | 1928 | "Move up and cancel all requested operations on bookmark on line above." |
| 1960 | (interactive) | 1929 | (interactive) |
| 1961 | (forward-line -1) | 1930 | (forward-line -1) |
| 1962 | (if (bookmark-bmenu-check-position) | 1931 | (bookmark-bmenu-ensure-position) |
| 1963 | (progn | 1932 | (bookmark-bmenu-unmark) |
| 1964 | (bookmark-bmenu-unmark) | 1933 | (forward-line -1) |
| 1965 | (forward-line -1) | 1934 | (bookmark-bmenu-ensure-position)) |
| 1966 | (bookmark-bmenu-check-position)))) | ||
| 1967 | 1935 | ||
| 1968 | 1936 | ||
| 1969 | (defun bookmark-bmenu-delete () | 1937 | (defun bookmark-bmenu-delete () |
| @@ -1971,12 +1939,13 @@ Optional BACKUP means move up." | |||
| 1971 | To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-execute-deletions]." | 1939 | To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-execute-deletions]." |
| 1972 | (interactive) | 1940 | (interactive) |
| 1973 | (beginning-of-line) | 1941 | (beginning-of-line) |
| 1974 | (if (bookmark-bmenu-check-position) | 1942 | (bookmark-bmenu-ensure-position) |
| 1975 | (let ((inhibit-read-only t)) | 1943 | (with-buffer-modified-unmodified |
| 1976 | (delete-char 1) | 1944 | (let ((inhibit-read-only t)) |
| 1977 | (insert ?D) | 1945 | (delete-char 1) |
| 1978 | (forward-line 1) | 1946 | (insert ?D) |
| 1979 | (bookmark-bmenu-check-position)))) | 1947 | (forward-line 1) |
| 1948 | (bookmark-bmenu-ensure-position)))) | ||
| 1980 | 1949 | ||
| 1981 | 1950 | ||
| 1982 | (defun bookmark-bmenu-delete-backwards () | 1951 | (defun bookmark-bmenu-delete-backwards () |
| @@ -1985,9 +1954,9 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\ | |||
| 1985 | (interactive) | 1954 | (interactive) |
| 1986 | (bookmark-bmenu-delete) | 1955 | (bookmark-bmenu-delete) |
| 1987 | (forward-line -2) | 1956 | (forward-line -2) |
| 1988 | (if (bookmark-bmenu-check-position) | 1957 | (bookmark-bmenu-ensure-position) |
| 1989 | (forward-line 1)) | 1958 | (forward-line 1) |
| 1990 | (bookmark-bmenu-check-position)) | 1959 | (bookmark-bmenu-ensure-position)) |
| 1991 | 1960 | ||
| 1992 | 1961 | ||
| 1993 | (defun bookmark-bmenu-execute-deletions () | 1962 | (defun bookmark-bmenu-execute-deletions () |
| @@ -2022,29 +1991,26 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\ | |||
| 2022 | (defun bookmark-bmenu-rename () | 1991 | (defun bookmark-bmenu-rename () |
| 2023 | "Rename bookmark on current line. Prompts for a new name." | 1992 | "Rename bookmark on current line. Prompts for a new name." |
| 2024 | (interactive) | 1993 | (interactive) |
| 2025 | (if (bookmark-bmenu-check-position) | 1994 | (let ((bmrk (bookmark-bmenu-bookmark)) |
| 2026 | (let ((bmrk (bookmark-bmenu-bookmark)) | 1995 | (thispoint (point))) |
| 2027 | (thispoint (point))) | 1996 | (bookmark-rename bmrk) |
| 2028 | (bookmark-rename bmrk) | 1997 | (goto-char thispoint))) |
| 2029 | (goto-char thispoint)))) | ||
| 2030 | 1998 | ||
| 2031 | 1999 | ||
| 2032 | (defun bookmark-bmenu-locate () | 2000 | (defun bookmark-bmenu-locate () |
| 2033 | "Display location of this bookmark. Displays in the minibuffer." | 2001 | "Display location of this bookmark. Displays in the minibuffer." |
| 2034 | (interactive) | 2002 | (interactive) |
| 2035 | (if (bookmark-bmenu-check-position) | 2003 | (let ((bmrk (bookmark-bmenu-bookmark))) |
| 2036 | (let ((bmrk (bookmark-bmenu-bookmark))) | 2004 | (message "%s" (bookmark-location bmrk)))) |
| 2037 | (message "%s" (bookmark-location bmrk))))) | ||
| 2038 | 2005 | ||
| 2039 | (defun bookmark-bmenu-relocate () | 2006 | (defun bookmark-bmenu-relocate () |
| 2040 | "Change the file path of the bookmark on the current line, | 2007 | "Change the file path of the bookmark on the current line, |
| 2041 | prompting with completion for the new path." | 2008 | prompting with completion for the new path." |
| 2042 | (interactive) | 2009 | (interactive) |
| 2043 | (if (bookmark-bmenu-check-position) | 2010 | (let ((bmrk (bookmark-bmenu-bookmark)) |
| 2044 | (let ((bmrk (bookmark-bmenu-bookmark)) | 2011 | (thispoint (point))) |
| 2045 | (thispoint (point))) | 2012 | (bookmark-relocate bmrk) |
| 2046 | (bookmark-relocate bmrk) | 2013 | (goto-char thispoint))) |
| 2047 | (goto-char thispoint)))) | ||
| 2048 | 2014 | ||
| 2049 | ;;; Bookmark-bmenu search | 2015 | ;;; Bookmark-bmenu search |
| 2050 | 2016 | ||
| @@ -2101,15 +2067,14 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\ | |||
| 2101 | (when bookmark-quit-flag ; C-g hit restore menu list. | 2067 | (when bookmark-quit-flag ; C-g hit restore menu list. |
| 2102 | (bookmark-bmenu-list) (bookmark-bmenu-goto-bookmark bmk)) | 2068 | (bookmark-bmenu-list) (bookmark-bmenu-goto-bookmark bmk)) |
| 2103 | (setq bookmark-quit-flag nil)))) | 2069 | (setq bookmark-quit-flag nil)))) |
| 2104 | 2070 | ||
| 2105 | (defun bookmark-bmenu-goto-bookmark (name) | 2071 | (defun bookmark-bmenu-goto-bookmark (name) |
| 2106 | "Move point to bookmark with name NAME." | 2072 | "Move point to bookmark with name NAME." |
| 2107 | (goto-char (point-min)) | 2073 | (goto-char (point-min)) |
| 2108 | (bookmark-bmenu-check-position) | ||
| 2109 | (while (not (equal name (bookmark-bmenu-bookmark))) | 2074 | (while (not (equal name (bookmark-bmenu-bookmark))) |
| 2110 | (forward-line 1)) | 2075 | (forward-line 1)) |
| 2111 | (forward-line 0)) | 2076 | (forward-line 0)) |
| 2112 | 2077 | ||
| 2113 | 2078 | ||
| 2114 | 2079 | ||
| 2115 | ;;; Menu bar stuff. Prefix is "bookmark-menu". | 2080 | ;;; Menu bar stuff. Prefix is "bookmark-menu". |
diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el index 25e253351fa..f89ad4c83d1 100644 --- a/lisp/cedet/semantic/db-typecache.el +++ b/lisp/cedet/semantic/db-typecache.el | |||
| @@ -111,7 +111,7 @@ Said object must support `semantic-reset' methods.") | |||
| 111 | ) | 111 | ) |
| 112 | (object-add-to-list cache 'dependants dep))) | 112 | (object-add-to-list cache 'dependants dep))) |
| 113 | 113 | ||
| 114 | (defun semanticdb-typecache-length(thing) | 114 | (defun semanticdb-typecache-length (thing) |
| 115 | "How long is THING? | 115 | "How long is THING? |
| 116 | Debugging function." | 116 | Debugging function." |
| 117 | (cond ((semanticdb-typecache-child-p thing) | 117 | (cond ((semanticdb-typecache-child-p thing) |
| @@ -383,7 +383,7 @@ FIND-FILE-MATCH is non-nil to force all found tags to be loaded into a buffer.") | |||
| 383 | (defun semanticdb-typecache-find-default (type &optional path find-file-match) | 383 | (defun semanticdb-typecache-find-default (type &optional path find-file-match) |
| 384 | "Default implementation of `semanticdb-typecache-find'. | 384 | "Default implementation of `semanticdb-typecache-find'. |
| 385 | TYPE is the datatype to find. | 385 | TYPE is the datatype to find. |
| 386 | PATH is the search path.. which should be one table object. | 386 | PATH is the search path, which should be one table object. |
| 387 | If FIND-FILE-MATCH is non-nil, then force the file belonging to the | 387 | If FIND-FILE-MATCH is non-nil, then force the file belonging to the |
| 388 | found tag to be loaded." | 388 | found tag to be loaded." |
| 389 | (semanticdb-typecache-find-method (or path semanticdb-current-table) | 389 | (semanticdb-typecache-find-method (or path semanticdb-current-table) |
diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index a00ff7e9740..28ee5582bb1 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el | |||
| @@ -330,7 +330,7 @@ buffers." | |||
| 330 | ;; This nil is a placeholder for eq-indicator. It is either nil or =. | 330 | ;; This nil is a placeholder for eq-indicator. It is either nil or =. |
| 331 | ;; If it is discovered that this file is = to some other | 331 | ;; If it is discovered that this file is = to some other |
| 332 | ;; file in the same session, eq-indicator is changed to `='. | 332 | ;; file in the same session, eq-indicator is changed to `='. |
| 333 | ;; Curently, the eq-indicator is used only for 2 and 3-file jobs. | 333 | ;; Currently, the eq-indicator is used only for 2 and 3-file jobs. |
| 334 | (defun ediff-make-new-meta-list-element (obj1 obj2 obj3) | 334 | (defun ediff-make-new-meta-list-element (obj1 obj2 obj3) |
| 335 | (list nil nil (list obj1 nil) (list obj2 nil) (list obj3 nil))) | 335 | (list nil nil (list obj1 nil) (list obj2 nil) (list obj3 nil))) |
| 336 | 336 | ||
| @@ -879,7 +879,7 @@ behavior." | |||
| 879 | (define-key ediff-meta-buffer-map | 879 | (define-key ediff-meta-buffer-map |
| 880 | [menu-bar ediff-meta-mode ediff-mark-for-operation-at-pos] | 880 | [menu-bar ediff-meta-mode ediff-mark-for-operation-at-pos] |
| 881 | '(menu-item "Mark for group operation" ediff-mark-for-operation-at-pos | 881 | '(menu-item "Mark for group operation" ediff-mark-for-operation-at-pos |
| 882 | :help "Mark session for a group operation. With prefix arg, unmark.")) | 882 | :help "Mark session for a group operation. With prefix arg, unmark")) |
| 883 | 883 | ||
| 884 | (define-key ediff-meta-buffer-map | 884 | (define-key ediff-meta-buffer-map |
| 885 | [menu-bar ediff-meta-mode ediff-unmark-all-for-hiding] | 885 | [menu-bar ediff-meta-mode ediff-unmark-all-for-hiding] |
| @@ -1739,7 +1739,7 @@ Useful commands: | |||
| 1739 | (insert "\n"))) | 1739 | (insert "\n"))) |
| 1740 | (t | 1740 | (t |
| 1741 | (ediff-kill-buffer-carefully meta-diff-buff) | 1741 | (ediff-kill-buffer-carefully meta-diff-buff) |
| 1742 | (error "Session %d compares versions of file. Such session must be active to enable multifile patch collection" sessionNum ))) | 1742 | (error "Session %d compares versions of file. Such session must be active to enable multifile patch collection" sessionNum ))) |
| 1743 | )) | 1743 | )) |
| 1744 | 1744 | ||
| 1745 | (defun ediff-collect-custom-diffs () | 1745 | (defun ediff-collect-custom-diffs () |
| @@ -2421,7 +2421,7 @@ for operation, or simply indicate which are equal files. If it is nil, then | |||
| 2421 | (let ((list (cdr ediff-meta-list)) | 2421 | (let ((list (cdr ediff-meta-list)) |
| 2422 | marked1 marked2 marked3 | 2422 | marked1 marked2 marked3 |
| 2423 | fileinfo1 fileinfo2 fileinfo3 elt) | 2423 | fileinfo1 fileinfo2 fileinfo3 elt) |
| 2424 | (message "Comparing files ...") | 2424 | (message "Comparing files...") |
| 2425 | (while (setq elt (car list)) | 2425 | (while (setq elt (car list)) |
| 2426 | (setq fileinfo1 (ediff-get-session-objA elt) | 2426 | (setq fileinfo1 (ediff-get-session-objA elt) |
| 2427 | fileinfo2 (ediff-get-session-objB elt) | 2427 | fileinfo2 (ediff-get-session-objB elt) |
| @@ -2448,7 +2448,7 @@ for operation, or simply indicate which are equal files. If it is nil, then | |||
| 2448 | (ediff-mark-session-for-operation elt 'mark)) | 2448 | (ediff-mark-session-for-operation elt 'mark)) |
| 2449 | )) | 2449 | )) |
| 2450 | (setq list (cdr list))) | 2450 | (setq list (cdr list))) |
| 2451 | (message "Comparing files ... Done")) | 2451 | (message "Comparing files... Done")) |
| 2452 | (setq ediff-recurse-to-subdirectories nil) | 2452 | (setq ediff-recurse-to-subdirectories nil) |
| 2453 | (ediff-update-meta-buffer (current-buffer) 'must-redraw)) | 2453 | (ediff-update-meta-buffer (current-buffer) 'must-redraw)) |
| 2454 | 2454 | ||
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index bc97b07ddc3..704f8b15ebf 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -326,9 +326,13 @@ call another major mode in their body." | |||
| 326 | (make-variable-buffer-local ',MODE-major-mode) | 326 | (make-variable-buffer-local ',MODE-major-mode) |
| 327 | ;; The actual global minor-mode | 327 | ;; The actual global minor-mode |
| 328 | (define-minor-mode ,global-mode | 328 | (define-minor-mode ,global-mode |
| 329 | ;; Very short lines to avoid too long lines in the generated | ||
| 330 | ;; doc string. | ||
| 329 | ,(format "Toggle %s in every possible buffer. | 331 | ,(format "Toggle %s in every possible buffer. |
| 330 | With prefix ARG, turn %s on if and only if ARG is positive. | 332 | With prefix ARG, turn %s on if and only if |
| 331 | %s is enabled in all buffers where `%s' would do it. | 333 | ARG is positive. |
| 334 | %s is enabled in all buffers where | ||
| 335 | \`%s' would do it. | ||
| 332 | See `%s' for more information on %s." | 336 | See `%s' for more information on %s." |
| 333 | pretty-name pretty-global-name pretty-name turn-on | 337 | pretty-name pretty-global-name pretty-name turn-on |
| 334 | mode pretty-name) | 338 | mode pretty-name) |
diff --git a/lisp/font-setting.el b/lisp/font-setting.el index a0446e55e50..23c169f36fe 100644 --- a/lisp/font-setting.el +++ b/lisp/font-setting.el | |||
| @@ -57,7 +57,7 @@ current form for the frame (i.e. hinting or somesuch changed)." | |||
| 57 | (if (display-graphic-p f) | 57 | (if (display-graphic-p f) |
| 58 | (let* ((frame-font | 58 | (let* ((frame-font |
| 59 | (or (font-get (face-attribute 'default :font f | 59 | (or (font-get (face-attribute 'default :font f |
| 60 | 'default) :name) | 60 | 'default) :user-spec) |
| 61 | (frame-parameter f 'font-parameter))) | 61 | (frame-parameter f 'font-parameter))) |
| 62 | (font-to-set | 62 | (font-to-set |
| 63 | (if set-font new-font | 63 | (if set-font new-font |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 159f7c7e825..2e90bf6e824 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2010-01-06 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * gnus-art.el (gnus-article-describe-bindings): Work for prefix keys. | ||
| 4 | |||
| 5 | * message.el (message-check-news-header-syntax): Protect against a | ||
| 6 | string that `rfc822-addresses' returns when parsing fails. | ||
| 7 | |||
| 8 | 2010-01-06 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 9 | |||
| 10 | * gnus-util.el (gnus-invisible-p, gnus-next-char-property-change) | ||
| 11 | (gnus-previous-char-property-change): New functions. | ||
| 12 | |||
| 13 | * gnus-sum.el (gnus-forward-line-ignore-invisible): Use them. | ||
| 14 | |||
| 15 | 2010-01-05 Andreas Schwab <schwab@linux-m68k.org> | ||
| 16 | |||
| 17 | * gnus-sum.el (gnus-forward-line-ignore-invisible): New function. | ||
| 18 | (gnus-summary-recenter): Use it instead of forward-line. (Bug#5257) | ||
| 19 | |||
| 20 | 2010-01-02 Chong Yidong <cyd@stupidchicken.com> | ||
| 21 | |||
| 22 | * message.el (message-exchange-point-and-mark): Rework last change to | ||
| 23 | avoid using optional arg of exchange-point-and-mark, for backward | ||
| 24 | compatibility. | ||
| 25 | |||
| 26 | 2010-01-01 Chong Yidong <cyd@stupidchicken.com> | ||
| 27 | |||
| 28 | * message.el (message-exchange-point-and-mark): Call | ||
| 29 | exchange-point-and-mark with an argument rather than setting | ||
| 30 | mark-active by hand (Bug#5175). | ||
| 31 | |||
| 1 | 2009-12-18 Katsumi Yamaoka <yamaoka@jpl.org> | 32 | 2009-12-18 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 33 | ||
| 3 | * nntp.el (nntp-service-to-port): Work for service expressed with | 34 | * nntp.el (nntp-service-to-port): Work for service expressed with |
| @@ -13776,7 +13807,7 @@ | |||
| 13776 | 13807 | ||
| 13777 | See ChangeLog.2 for earlier changes. | 13808 | See ChangeLog.2 for earlier changes. |
| 13778 | 13809 | ||
| 13779 | Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 13810 | Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 13780 | 13811 | ||
| 13781 | This file is part of GNU Emacs. | 13812 | This file is part of GNU Emacs. |
| 13782 | 13813 | ||
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 6bc84e42225..dcb63883997 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -6477,10 +6477,17 @@ then we display only bindings that start with that prefix." | |||
| 6477 | (let ((keymap (copy-keymap gnus-article-mode-map)) | 6477 | (let ((keymap (copy-keymap gnus-article-mode-map)) |
| 6478 | (map (copy-keymap gnus-article-send-map)) | 6478 | (map (copy-keymap gnus-article-send-map)) |
| 6479 | (sumkeys (where-is-internal 'gnus-article-read-summary-keys)) | 6479 | (sumkeys (where-is-internal 'gnus-article-read-summary-keys)) |
| 6480 | agent draft) | 6480 | parent agent draft) |
| 6481 | (define-key keymap "S" map) | 6481 | (define-key keymap "S" map) |
| 6482 | (define-key map [t] nil) | 6482 | (define-key map [t] nil) |
| 6483 | (with-current-buffer gnus-article-current-summary | 6483 | (with-current-buffer gnus-article-current-summary |
| 6484 | (set-keymap-parent | ||
| 6485 | keymap | ||
| 6486 | (if (setq parent (keymap-parent gnus-article-mode-map)) | ||
| 6487 | (prog1 | ||
| 6488 | (setq parent (copy-keymap parent)) | ||
| 6489 | (set-keymap-parent parent (current-local-map))) | ||
| 6490 | (current-local-map))) | ||
| 6484 | (set-keymap-parent map (key-binding "S")) | 6491 | (set-keymap-parent map (key-binding "S")) |
| 6485 | (let (key def gnus-pick-mode) | 6492 | (let (key def gnus-pick-mode) |
| 6486 | (while sumkeys | 6493 | (while sumkeys |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 658193bd508..86244a9ca8f 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -6727,6 +6727,26 @@ Also do horizontal recentering." | |||
| 6727 | 6727 | ||
| 6728 | (put 'gnus-recenter 'isearch-scroll t) | 6728 | (put 'gnus-recenter 'isearch-scroll t) |
| 6729 | 6729 | ||
| 6730 | (defun gnus-forward-line-ignore-invisible (n) | ||
| 6731 | "Move N lines forward (backward if N is negative). | ||
| 6732 | Like forward-line, but skip over (and don't count) invisible lines." | ||
| 6733 | (let (done) | ||
| 6734 | (while (and (> n 0) (not done)) | ||
| 6735 | ;; If the following character is currently invisible, | ||
| 6736 | ;; skip all characters with that same `invisible' property value. | ||
| 6737 | (while (gnus-invisible-p (point)) | ||
| 6738 | (goto-char (gnus-next-char-property-change (point)))) | ||
| 6739 | (forward-line 1) | ||
| 6740 | (if (eobp) | ||
| 6741 | (setq done t) | ||
| 6742 | (setq n (1- n)))) | ||
| 6743 | (while (and (< n 0) (not done)) | ||
| 6744 | (forward-line -1) | ||
| 6745 | (if (bobp) (setq done t) | ||
| 6746 | (setq n (1+ n)) | ||
| 6747 | (while (and (not (bobp)) (gnus-invisible-p (1- (point)))) | ||
| 6748 | (goto-char (gnus-previous-char-property-change (point)))))))) | ||
| 6749 | |||
| 6730 | (defun gnus-summary-recenter () | 6750 | (defun gnus-summary-recenter () |
| 6731 | "Center point in the summary window. | 6751 | "Center point in the summary window. |
| 6732 | If `gnus-auto-center-summary' is nil, or the article buffer isn't | 6752 | If `gnus-auto-center-summary' is nil, or the article buffer isn't |
| @@ -6742,16 +6762,19 @@ displayed, no centering will be performed." | |||
| 6742 | gnus-auto-center-summary | 6762 | gnus-auto-center-summary |
| 6743 | (/ (1- (window-height)) 2))))) | 6763 | (/ (1- (window-height)) 2))))) |
| 6744 | (height (1- (window-height))) | 6764 | (height (1- (window-height))) |
| 6745 | (bottom (save-excursion (goto-char (point-max)) | 6765 | (bottom (save-excursion |
| 6746 | (forward-line (- height)) | 6766 | (goto-char (point-max)) |
| 6747 | (point))) | 6767 | (gnus-forward-line-ignore-invisible (- height)) |
| 6768 | (point))) | ||
| 6748 | (window (get-buffer-window (current-buffer)))) | 6769 | (window (get-buffer-window (current-buffer)))) |
| 6749 | (when (get-buffer-window gnus-article-buffer) | 6770 | (when (get-buffer-window gnus-article-buffer) |
| 6750 | ;; Only do recentering when the article buffer is displayed, | 6771 | ;; Only do recentering when the article buffer is displayed, |
| 6751 | ;; Set the window start to either `bottom', which is the biggest | 6772 | ;; Set the window start to either `bottom', which is the biggest |
| 6752 | ;; possible valid number, or the second line from the top, | 6773 | ;; possible valid number, or the second line from the top, |
| 6753 | ;; whichever is the least. | 6774 | ;; whichever is the least. |
| 6754 | (let ((top-pos (save-excursion (forward-line (- top)) (point)))) | 6775 | (let ((top-pos (save-excursion |
| 6776 | (gnus-forward-line-ignore-invisible (- top)) | ||
| 6777 | (point)))) | ||
| 6755 | (if (> bottom top-pos) | 6778 | (if (> bottom top-pos) |
| 6756 | ;; Keep the second line from the top visible | 6779 | ;; Keep the second line from the top visible |
| 6757 | (set-window-start window top-pos) | 6780 | (set-window-start window top-pos) |
| @@ -6760,12 +6783,12 @@ displayed, no centering will be performed." | |||
| 6760 | ;; visible, or revert to using TOP-POS. | 6783 | ;; visible, or revert to using TOP-POS. |
| 6761 | (save-excursion | 6784 | (save-excursion |
| 6762 | (goto-char (point-max)) | 6785 | (goto-char (point-max)) |
| 6763 | (forward-line -1) | 6786 | (gnus-forward-line-ignore-invisible -1) |
| 6764 | (let ((last-line-start (point))) | 6787 | (let ((last-line-start (point))) |
| 6765 | (goto-char bottom) | 6788 | (goto-char bottom) |
| 6766 | (set-window-start window (point) t) | 6789 | (set-window-start window (point) t) |
| 6767 | (when (not (pos-visible-in-window-p last-line-start window)) | 6790 | (when (not (pos-visible-in-window-p last-line-start window)) |
| 6768 | (forward-line 1) | 6791 | (gnus-forward-line-ignore-invisible 1) |
| 6769 | (set-window-start window (min (point) top-pos) t))))))) | 6792 | (set-window-start window (min (point) top-pos) t))))))) |
| 6770 | ;; Do horizontal recentering while we're at it. | 6793 | ;; Do horizontal recentering while we're at it. |
| 6771 | (when (and (get-buffer-window (current-buffer) t) | 6794 | (when (and (get-buffer-window (current-buffer) t) |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 28a8c5dbed4..f5679ee850f 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -969,6 +969,29 @@ If there's no subdirectory, delete DIRECTORY as well." | |||
| 969 | (overlay-get overlay 'face)) | 969 | (overlay-get overlay 'face)) |
| 970 | (overlays-at pos))))))) | 970 | (overlays-at pos))))))) |
| 971 | 971 | ||
| 972 | (if (fboundp 'invisible-p) | ||
| 973 | (defalias 'gnus-invisible-p 'invisible-p) | ||
| 974 | ;; for Emacs < 22.2, and XEmacs. | ||
| 975 | (defun gnus-invisible-p (pos) | ||
| 976 | "Return non-nil if the character after POS is currently invisible." | ||
| 977 | (let ((prop (get-char-property pos 'invisible))) | ||
| 978 | (if (eq buffer-invisibility-spec t) | ||
| 979 | prop | ||
| 980 | (or (memq prop buffer-invisibility-spec) | ||
| 981 | (assq prop buffer-invisibility-spec)))))) | ||
| 982 | |||
| 983 | ;; Note: the optional 2nd argument has a different meaning between | ||
| 984 | ;; Emacs and XEmacs. | ||
| 985 | ;; (next-char-property-change POSITION &optional LIMIT) | ||
| 986 | ;; (next-extent-change POS &optional OBJECT) | ||
| 987 | (defalias 'gnus-next-char-property-change | ||
| 988 | (if (fboundp 'next-extent-change) | ||
| 989 | 'next-extent-change 'next-char-property-change)) | ||
| 990 | |||
| 991 | (defalias 'gnus-previous-char-property-change | ||
| 992 | (if (fboundp 'previous-extent-change) | ||
| 993 | 'previous-extent-change 'previous-char-property-change)) | ||
| 994 | |||
| 972 | ;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 | 995 | ;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 |
| 973 | ;; The primary idea here is to try to protect internal datastructures | 996 | ;; The primary idea here is to try to protect internal datastructures |
| 974 | ;; from becoming corrupted when the user hits C-g, or if a hook or | 997 | ;; from becoming corrupted when the user hits C-g, or if a hook or |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 8726614b678..941fa92b8b3 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -5077,7 +5077,8 @@ Otherwise, generate and save a value for `canlock-password' first." | |||
| 5077 | "Denied posting -- the From looks strange: \"%s\"." from) | 5077 | "Denied posting -- the From looks strange: \"%s\"." from) |
| 5078 | nil) | 5078 | nil) |
| 5079 | ((let ((addresses (rfc822-addresses from))) | 5079 | ((let ((addresses (rfc822-addresses from))) |
| 5080 | (while (and addresses | 5080 | ;; `rfc822-addresses' returns a string if parsing fails. |
| 5081 | (while (and (consp addresses) | ||
| 5081 | (not (eq (string-to-char (car addresses)) ?\())) | 5082 | (not (eq (string-to-char (car addresses)) ?\())) |
| 5082 | (setq addresses (cdr addresses))) | 5083 | (setq addresses (cdr addresses))) |
| 5083 | addresses) | 5084 | addresses) |
| @@ -7505,10 +7506,8 @@ which specify the range to operate on." | |||
| 7505 | 7506 | ||
| 7506 | (defun message-exchange-point-and-mark () | 7507 | (defun message-exchange-point-and-mark () |
| 7507 | "Exchange point and mark, but don't activate region if it was inactive." | 7508 | "Exchange point and mark, but don't activate region if it was inactive." |
| 7508 | (unless (prog1 | 7509 | (goto-char (prog1 (mark t) |
| 7509 | (message-mark-active-p) | 7510 | (set-marker (mark-marker) (point))))) |
| 7510 | (exchange-point-and-mark)) | ||
| 7511 | (setq mark-active nil))) | ||
| 7512 | 7511 | ||
| 7513 | (defalias 'message-make-overlay 'make-overlay) | 7512 | (defalias 'message-make-overlay 'make-overlay) |
| 7514 | (defalias 'message-delete-overlay 'delete-overlay) | 7513 | (defalias 'message-delete-overlay 'delete-overlay) |
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/makefile.w32-in b/lisp/makefile.w32-in index ab079ea360c..aebf60030ae 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in | |||
| @@ -233,8 +233,11 @@ update-subdirs-SH: doit | |||
| 233 | 233 | ||
| 234 | updates: update-subdirs autoloads mh-autoloads finder-data custom-deps | 234 | updates: update-subdirs autoloads mh-autoloads finder-data custom-deps |
| 235 | 235 | ||
| 236 | # This is useful after "cvs up". | 236 | # This is useful after "bzr up". |
| 237 | cvs-update: recompile autoloads finder-data custom-deps | 237 | bzr-update: recompile autoloads finder-data custom-deps |
| 238 | |||
| 239 | # For backwards compatibility: | ||
| 240 | cvs-update: bzr-update | ||
| 238 | 241 | ||
| 239 | # Update the AUTHORS file. | 242 | # Update the AUTHORS file. |
| 240 | 243 | ||
diff --git a/lisp/mpc.el b/lisp/mpc.el index b099d039ebb..6b290704622 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -1728,7 +1728,7 @@ A value of t means the main playlist.") | |||
| 1728 | "Remove the selected songs from the playlist." | 1728 | "Remove the selected songs from the playlist." |
| 1729 | (interactive) | 1729 | (interactive) |
| 1730 | (unless mpc-songs-playlist | 1730 | (unless mpc-songs-playlist |
| 1731 | (error "The selected songs aren't part of a playlist.")) | 1731 | (error "The selected songs aren't part of a playlist")) |
| 1732 | (let ((song-poss (mapcar #'cdr (mpc-songs-selection)))) | 1732 | (let ((song-poss (mapcar #'cdr (mpc-songs-selection)))) |
| 1733 | (mpc-cmd-delete song-poss mpc-songs-playlist) | 1733 | (mpc-cmd-delete song-poss mpc-songs-playlist) |
| 1734 | (mpc-songs-refresh) | 1734 | (mpc-songs-refresh) |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index e52f4cb924a..5619108241c 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -613,7 +613,7 @@ down (this *won't* always work)." | |||
| 613 | 613 | ||
| 614 | (defun browse-url-url-encode-chars (text chars) | 614 | (defun browse-url-url-encode-chars (text chars) |
| 615 | "URL-encode the chars in TEXT that match CHARS. | 615 | "URL-encode the chars in TEXT that match CHARS. |
| 616 | CHARS is a regexp-like character alternative (e.g., \"[,)$]\")." | 616 | CHARS is a regexp-like character alternative (e.g., \"[)$]\")." |
| 617 | (let ((encoded-text (copy-sequence text)) | 617 | (let ((encoded-text (copy-sequence text)) |
| 618 | (s 0)) | 618 | (s 0)) |
| 619 | (while (setq s (string-match chars encoded-text s)) | 619 | (while (setq s (string-match chars encoded-text s)) |
| @@ -626,10 +626,12 @@ CHARS is a regexp-like character alternative (e.g., \"[,)$]\")." | |||
| 626 | 626 | ||
| 627 | (defun browse-url-encode-url (url) | 627 | (defun browse-url-encode-url (url) |
| 628 | "Escape annoying characters in URL. | 628 | "Escape annoying characters in URL. |
| 629 | The annoying characters are those that can mislead a webbrowser | 629 | The annoying characters are those that can mislead a web browser |
| 630 | regarding its parameter treatment. For instance, `,' can | 630 | regarding its parameter treatment." |
| 631 | be misleading because it could be used to separate URLs." | 631 | ;; FIXME: Is there an actual example of a web browser getting |
| 632 | (browse-url-url-encode-chars url "[,)$]")) | 632 | ;; confused? (This used to encode commas, but at least Firefox |
| 633 | ;; handles commas correctly and doesn't accept encoded commas.) | ||
| 634 | (browse-url-url-encode-chars url "[)$]")) | ||
| 633 | 635 | ||
| 634 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 636 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 635 | ;; URL input | 637 | ;; URL input |
diff --git a/lisp/net/imap-hash.el b/lisp/net/imap-hash.el index 47ed4f33914..b0ee31f8fe8 100644 --- a/lisp/net/imap-hash.el +++ b/lisp/net/imap-hash.el | |||
| @@ -67,16 +67,16 @@ | |||
| 67 | (imap-hash-remove-cr-followed-by-lf)))) | 67 | (imap-hash-remove-cr-followed-by-lf)))) |
| 68 | 68 | ||
| 69 | (defun imap-hash-make (server port mailbox &optional user password ssl) | 69 | (defun imap-hash-make (server port mailbox &optional user password ssl) |
| 70 | "Makes a new imap-hash object using SERVER, PORT, and MAILBOX. | 70 | "Make a new imap-hash object using SERVER, PORT, and MAILBOX. |
| 71 | SSL, USER, PASSWORD are optional. | 71 | USER, PASSWORD and SSL are optional. |
| 72 | The test is set to t, meaning all messages are considered." | 72 | The test is set to t, meaning all messages are considered." |
| 73 | (when (and server port mailbox) | 73 | (when (and server port mailbox) |
| 74 | (list :server server :port port :mailbox mailbox | 74 | (list :server server :port port :mailbox mailbox |
| 75 | :ssl ssl :user user :password password | 75 | :ssl ssl :user user :password password |
| 76 | :test t))) | 76 | :test t))) |
| 77 | 77 | ||
| 78 | (defun imap-hash-p (iht) | 78 | (defun imap-hash-p (iht) |
| 79 | "Checks whether IHT is a valid imap-hash." | 79 | "Check whether IHT is a valid imap-hash." |
| 80 | (and | 80 | (and |
| 81 | (imap-hash-server iht) | 81 | (imap-hash-server iht) |
| 82 | (imap-hash-port iht) | 82 | (imap-hash-port iht) |
| @@ -95,7 +95,7 @@ The test is set to t, meaning all messages are considered." | |||
| 95 | (defun imap-hash-get (key iht &optional refetch) | 95 | (defun imap-hash-get (key iht &optional refetch) |
| 96 | "Get the value for KEY in the imap-hash IHT. | 96 | "Get the value for KEY in the imap-hash IHT. |
| 97 | Requires either `imap-hash-fetch' to be called beforehand | 97 | Requires either `imap-hash-fetch' to be called beforehand |
| 98 | (e.g. by `imap-hash-map'), or REFETCH to be t. | 98 | \(e.g. by `imap-hash-map'), or REFETCH to be t. |
| 99 | Returns a list of the headers (an alist, see `imap-hash-map') and | 99 | Returns a list of the headers (an alist, see `imap-hash-map') and |
| 100 | the body of the message as a string. | 100 | the body of the message as a string. |
| 101 | Also see `imap-hash-test'." | 101 | Also see `imap-hash-test'." |
| @@ -106,13 +106,13 @@ Also see `imap-hash-test'." | |||
| 106 | (list | 106 | (list |
| 107 | (imap-hash-get-headers | 107 | (imap-hash-get-headers |
| 108 | (imap-hash-data-headers details)) | 108 | (imap-hash-data-headers details)) |
| 109 | (imap-hash-get-body | 109 | (imap-hash-get-body |
| 110 | (imap-hash-data-body details)))))) | 110 | (imap-hash-data-body details)))))) |
| 111 | 111 | ||
| 112 | (defun imap-hash-put (value iht &optional key) | 112 | (defun imap-hash-put (value iht &optional key) |
| 113 | "Put VALUE in the imap-hash IHT. Returns the new key. | 113 | "Put VALUE in the imap-hash IHT. Return the new key. |
| 114 | If KEY is given, removes it. | 114 | If KEY is given, removes it. |
| 115 | VALUE can be a list of the headers (an alist, see `imap-hash-map') | 115 | VALUE can be a list of the headers (an alist, see `imap-hash-map') |
| 116 | and the body of the message as a string. It can also be a uid, | 116 | and the body of the message as a string. It can also be a uid, |
| 117 | in which case `imap-hash-get' will be called to get the value. | 117 | in which case `imap-hash-get' will be called to get the value. |
| 118 | Also see `imap-hash-test'." | 118 | Also see `imap-hash-test'." |
| @@ -121,19 +121,19 @@ Also see `imap-hash-test'." | |||
| 121 | newuid) | 121 | newuid) |
| 122 | (when value | 122 | (when value |
| 123 | (with-temp-buffer | 123 | (with-temp-buffer |
| 124 | (funcall 'imap-hash-make-message | 124 | (funcall 'imap-hash-make-message |
| 125 | (nth 0 value) | 125 | (nth 0 value) |
| 126 | (nth 1 value) | 126 | (nth 1 value) |
| 127 | nil) | 127 | nil) |
| 128 | (setq newuid (nth 1 (imap-message-append | 128 | (setq newuid (nth 1 (imap-message-append |
| 129 | (imap-hash-mailbox iht) | 129 | (imap-hash-mailbox iht) |
| 130 | (current-buffer) nil nil server-buffer))) | 130 | (current-buffer) nil nil server-buffer))) |
| 131 | (when key (imap-hash-rem key iht)))) | 131 | (when key (imap-hash-rem key iht)))) |
| 132 | newuid)) | 132 | newuid)) |
| 133 | 133 | ||
| 134 | (defun imap-hash-make-message (headers body &optional overrides) | 134 | (defun imap-hash-make-message (headers body &optional overrides) |
| 135 | "Make a message with HEADERS and BODY suitable for `imap-append', | 135 | "Make a message with HEADERS and BODY suitable for `imap-append', |
| 136 | using `message-setup'.. | 136 | using `message-setup'. |
| 137 | Look in the alist OVERRIDES for header overrides as per `imap-hash-headers'." | 137 | Look in the alist OVERRIDES for header overrides as per `imap-hash-headers'." |
| 138 | ;; don't insert a signature no matter what | 138 | ;; don't insert a signature no matter what |
| 139 | (let (message-signature) | 139 | (let (message-signature) |
| @@ -154,7 +154,7 @@ Look in the alist OVERRIDES for header overrides as per `imap-hash-headers'." | |||
| 154 | (defun imap-hash-rem (key iht) | 154 | (defun imap-hash-rem (key iht) |
| 155 | "Remove KEY in the imap-hash IHT. | 155 | "Remove KEY in the imap-hash IHT. |
| 156 | Also see `imap-hash-test'. Requires `imap-hash-fetch' to have | 156 | Also see `imap-hash-test'. Requires `imap-hash-fetch' to have |
| 157 | been called and the imap-hash server buffer to be current, | 157 | been called and the imap-hash server buffer to be current, |
| 158 | so it's best to use it inside `imap-hash-map'. | 158 | so it's best to use it inside `imap-hash-map'. |
| 159 | The key will not be found on the next `imap-hash-map' call." | 159 | The key will not be found on the next `imap-hash-map' call." |
| 160 | (with-current-buffer (imap-hash-get-buffer iht) | 160 | (with-current-buffer (imap-hash-get-buffer iht) |
| @@ -172,7 +172,7 @@ Also see `imap-hash-test'." | |||
| 172 | (with-temp-buffer | 172 | (with-temp-buffer |
| 173 | (insert (or text-headers "")) | 173 | (insert (or text-headers "")) |
| 174 | (imap-hash-remove-cr-followed-by-lf) | 174 | (imap-hash-remove-cr-followed-by-lf) |
| 175 | (mapcar (lambda (header) | 175 | (mapcar (lambda (header) |
| 176 | (cons header | 176 | (cons header |
| 177 | (message-fetch-field (format "%s" header)))) | 177 | (message-fetch-field (format "%s" header)))) |
| 178 | imap-hash-headers))) | 178 | imap-hash-headers))) |
| @@ -199,11 +199,11 @@ Also see `imap-hash-test'." | |||
| 199 | (headers (imap-hash-data-headers details)) | 199 | (headers (imap-hash-data-headers details)) |
| 200 | (hlist (imap-hash-get-headers headers)) | 200 | (hlist (imap-hash-get-headers headers)) |
| 201 | (runit (cond | 201 | (runit (cond |
| 202 | ((stringp test) | 202 | ((stringp test) |
| 203 | (string-match | 203 | (string-match |
| 204 | test | 204 | test |
| 205 | (format "%s" (aget hlist 'Subject)))) | 205 | (format "%s" (aget hlist 'Subject)))) |
| 206 | ((functionp test) | 206 | ((functionp test) |
| 207 | (funcall test hlist)) | 207 | (funcall test hlist)) |
| 208 | ;; otherwise, return test itself | 208 | ;; otherwise, return test itself |
| 209 | (t test)))) | 209 | (t test)))) |
| @@ -218,7 +218,7 @@ Also see `imap-hash-test'." | |||
| 218 | "UID"))))) | 218 | "UID"))))) |
| 219 | 219 | ||
| 220 | (defun imap-hash-count (iht) | 220 | (defun imap-hash-count (iht) |
| 221 | "Counts the number of messages in the imap-hash IHT. | 221 | "Count the number of messages in the imap-hash IHT. |
| 222 | Also see `imap-hash-test'. It uses `imap-hash-map' so just use that | 222 | Also see `imap-hash-test'. It uses `imap-hash-map' so just use that |
| 223 | function if you want to do more than count the elements." | 223 | function if you want to do more than count the elements." |
| 224 | (length (imap-hash-map (lambda (a b c)) iht t))) | 224 | (length (imap-hash-map (lambda (a b c)) iht t))) |
| @@ -226,36 +226,36 @@ function if you want to do more than count the elements." | |||
| 226 | (defalias 'imap-hash-size 'imap-hash-count) | 226 | (defalias 'imap-hash-size 'imap-hash-count) |
| 227 | 227 | ||
| 228 | (defun imap-hash-test (iht) | 228 | (defun imap-hash-test (iht) |
| 229 | "Returns the test used by `imap-hash-map' for IHT. | 229 | "Return the test used by `imap-hash-map' for IHT. |
| 230 | When the test is t, any key will be a candidate. | 230 | When the test is t, any key will be a candidate. |
| 231 | When the test is a string, messages will be filtered on that string as a regexp | 231 | When the test is a string, messages will be filtered on that string as a |
| 232 | against the subject. | 232 | regexp against the subject. |
| 233 | When the test is a function, messages will be filtered with it. | 233 | When the test is a function, messages will be filtered with it. |
| 234 | The function is passed the message headers (see `imap-hash-get-headers')." | 234 | The function is passed the message headers (see `imap-hash-get-headers')." |
| 235 | (plist-get iht :test)) | 235 | (plist-get iht :test)) |
| 236 | 236 | ||
| 237 | (defun imap-hash-server (iht) | 237 | (defun imap-hash-server (iht) |
| 238 | "Returns the server used by the imap-hash IHT." | 238 | "Return the server used by the imap-hash IHT." |
| 239 | (plist-get iht :server)) | 239 | (plist-get iht :server)) |
| 240 | 240 | ||
| 241 | (defun imap-hash-port (iht) | 241 | (defun imap-hash-port (iht) |
| 242 | "Returns the port used by the imap-hash IHT." | 242 | "Return the port used by the imap-hash IHT." |
| 243 | (plist-get iht :port)) | 243 | (plist-get iht :port)) |
| 244 | 244 | ||
| 245 | (defun imap-hash-ssl (iht) | 245 | (defun imap-hash-ssl (iht) |
| 246 | "Returns the SSL need for the imap-hash IHT." | 246 | "Return the SSL need for the imap-hash IHT." |
| 247 | (plist-get iht :ssl)) | 247 | (plist-get iht :ssl)) |
| 248 | 248 | ||
| 249 | (defun imap-hash-mailbox (iht) | 249 | (defun imap-hash-mailbox (iht) |
| 250 | "Returns the mailbox used by the imap-hash IHT." | 250 | "Return the mailbox used by the imap-hash IHT." |
| 251 | (plist-get iht :mailbox)) | 251 | (plist-get iht :mailbox)) |
| 252 | 252 | ||
| 253 | (defun imap-hash-user (iht) | 253 | (defun imap-hash-user (iht) |
| 254 | "Returns the username used by the imap-hash IHT." | 254 | "Return the username used by the imap-hash IHT." |
| 255 | (plist-get iht :user)) | 255 | (plist-get iht :user)) |
| 256 | 256 | ||
| 257 | (defun imap-hash-password (iht) | 257 | (defun imap-hash-password (iht) |
| 258 | "Returns the password used by the imap-hash IHT." | 258 | "Return the password used by the imap-hash IHT." |
| 259 | (plist-get iht :password)) | 259 | (plist-get iht :password)) |
| 260 | 260 | ||
| 261 | (defun imap-hash-open-connection (iht) | 261 | (defun imap-hash-open-connection (iht) |
| @@ -263,16 +263,16 @@ The function is passed the message headers (see `imap-hash-get-headers')." | |||
| 263 | (let* ((server (imap-hash-server iht)) | 263 | (let* ((server (imap-hash-server iht)) |
| 264 | (port (imap-hash-port iht)) | 264 | (port (imap-hash-port iht)) |
| 265 | (ssl-need (imap-hash-ssl iht)) | 265 | (ssl-need (imap-hash-ssl iht)) |
| 266 | (auth-need (not (and (imap-hash-user iht) | 266 | (auth-need (not (and (imap-hash-user iht) |
| 267 | (imap-hash-password iht)))) | 267 | (imap-hash-password iht)))) |
| 268 | ;; this will not be needed if auth-need is t | 268 | ;; this will not be needed if auth-need is t |
| 269 | (auth-info (when auth-need | 269 | (auth-info (when auth-need |
| 270 | (auth-source-user-or-password | 270 | (auth-source-user-or-password |
| 271 | '("login" "password") | 271 | '("login" "password") |
| 272 | server port))) | 272 | server port))) |
| 273 | (auth-user (or (imap-hash-user iht) | 273 | (auth-user (or (imap-hash-user iht) |
| 274 | (nth 0 auth-info))) | 274 | (nth 0 auth-info))) |
| 275 | (auth-passwd (or (imap-hash-password iht) | 275 | (auth-passwd (or (imap-hash-password iht) |
| 276 | (nth 1 auth-info))) | 276 | (nth 1 auth-info))) |
| 277 | (imap-logout-timeout nil)) | 277 | (imap-logout-timeout nil)) |
| 278 | 278 | ||
| @@ -283,7 +283,7 @@ The function is passed the message headers (see `imap-hash-get-headers')." | |||
| 283 | ;; (debug "after opening server: opened+state" (imap-opened (current-buffer)) imap-state) | 283 | ;; (debug "after opening server: opened+state" (imap-opened (current-buffer)) imap-state) |
| 284 | ;; (debug "authenticating" auth-user auth-passwd) | 284 | ;; (debug "authenticating" auth-user auth-passwd) |
| 285 | (if (not (imap-capability 'IMAP4rev1)) | 285 | (if (not (imap-capability 'IMAP4rev1)) |
| 286 | (error "IMAP server does not support IMAP4r1, it won't work, sorry.") | 286 | (error "IMAP server does not support IMAP4r1, it won't work, sorry") |
| 287 | (imap-authenticate auth-user auth-passwd) | 287 | (imap-authenticate auth-user auth-passwd) |
| 288 | (imap-id) | 288 | (imap-id) |
| 289 | ;; (debug "after authenticating: opened+state" (imap-opened (current-buffer)) imap-state) | 289 | ;; (debug "after authenticating: opened+state" (imap-opened (current-buffer)) imap-state) |
| @@ -314,8 +314,8 @@ The function is passed the message headers (see `imap-hash-get-headers')." | |||
| 314 | "Fetch all the messages for imap-hash IHT. | 314 | "Fetch all the messages for imap-hash IHT. |
| 315 | Get only the headers if HEADERS-ONLY is not nil." | 315 | Get only the headers if HEADERS-ONLY is not nil." |
| 316 | (with-current-buffer (imap-hash-get-buffer iht) | 316 | (with-current-buffer (imap-hash-get-buffer iht) |
| 317 | (let ((range (if messages | 317 | (let ((range (if messages |
| 318 | (list | 318 | (list |
| 319 | (imap-range-to-message-set messages) | 319 | (imap-range-to-message-set messages) |
| 320 | (imap-range-to-message-set messages)) | 320 | (imap-range-to-message-set messages)) |
| 321 | '("1:*" . "1,*:*")))) | 321 | '("1:*" . "1,*:*")))) |
| @@ -329,9 +329,9 @@ Get only the headers if HEADERS-ONLY is not nil." | |||
| 329 | (imap-fetch-safe range | 329 | (imap-fetch-safe range |
| 330 | (concat (format "(UID RFC822.SIZE BODY %s " | 330 | (concat (format "(UID RFC822.SIZE BODY %s " |
| 331 | (if headers-only "" "BODY.PEEK[TEXT]")) | 331 | (if headers-only "" "BODY.PEEK[TEXT]")) |
| 332 | (format "BODY.PEEK[HEADER.FIELDS %s])" | 332 | (format "BODY.PEEK[HEADER.FIELDS %s])" |
| 333 | imap-hash-headers)))))) | 333 | imap-hash-headers)))))) |
| 334 | 334 | ||
| 335 | (provide 'imap-hash) | 335 | (provide 'imap-hash) |
| 336 | ;;; imap-hash.el ends here | 336 | ;;; imap-hash.el ends here |
| 337 | 337 | ||
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index d1f54c9909d..e4aaef94983 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -836,6 +836,7 @@ If SILENT is non-nil, do not print the message in any irc buffer." | |||
| 836 | 836 | ||
| 837 | (define-key rcirc-browse-url-map (kbd "RET") 'rcirc-browse-url-at-point) | 837 | (define-key rcirc-browse-url-map (kbd "RET") 'rcirc-browse-url-at-point) |
| 838 | (define-key rcirc-browse-url-map (kbd "<mouse-2>") 'rcirc-browse-url-at-mouse) | 838 | (define-key rcirc-browse-url-map (kbd "<mouse-2>") 'rcirc-browse-url-at-mouse) |
| 839 | (define-key rcirc-browse-url-map [follow-link] 'mouse-face) | ||
| 839 | 840 | ||
| 840 | (defvar rcirc-short-buffer-name nil | 841 | (defvar rcirc-short-buffer-name nil |
| 841 | "Generated abbreviation to use to indicate buffer activity.") | 842 | "Generated abbreviation to use to indicate buffer activity.") |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index cc125d28238..5d612f022fa 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-01-01 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * org.el (org-get-outline-path, org-speed-command-help): | ||
| 4 | Fix typos in error messages. | ||
| 5 | |||
| 1 | 2009-12-14 Juri Linkov <juri@jurta.org> | 6 | 2009-12-14 Juri Linkov <juri@jurta.org> |
| 2 | 7 | ||
| 3 | * org-html.el (org-export-html-style-include-default): | 8 | * org-html.el (org-export-html-style-include-default): |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 325a5248dc6..5988c07e987 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -9019,7 +9019,7 @@ avoiding backtracing." | |||
| 9019 | (if fastp | 9019 | (if fastp |
| 9020 | (progn | 9020 | (progn |
| 9021 | (if (> level 19) | 9021 | (if (> level 19) |
| 9022 | (error "Outline path failure, more than 19 levels.")) | 9022 | (error "Outline path failure, more than 19 levels")) |
| 9023 | (loop for i from level upto 19 do | 9023 | (loop for i from level upto 19 do |
| 9024 | (aset org-olpa i nil)) | 9024 | (aset org-olpa i nil)) |
| 9025 | (prog1 | 9025 | (prog1 |
| @@ -10502,7 +10502,7 @@ scheduling will use the corresponding date." | |||
| 10502 | (org-add-log-setup 'redeadline nil old-date 'findpos | 10502 | (org-add-log-setup 'redeadline nil old-date 'findpos |
| 10503 | org-log-redeadline)) | 10503 | org-log-redeadline)) |
| 10504 | (message "Deadline on %s" org-last-inserted-timestamp))))) | 10504 | (message "Deadline on %s" org-last-inserted-timestamp))))) |
| 10505 | 10505 | ||
| 10506 | (defun org-schedule (&optional remove time) | 10506 | (defun org-schedule (&optional remove time) |
| 10507 | "Insert the SCHEDULED: string with a timestamp to schedule a TODO item. | 10507 | "Insert the SCHEDULED: string with a timestamp to schedule a TODO item. |
| 10508 | With argument REMOVE, remove any scheduling date from the item. | 10508 | With argument REMOVE, remove any scheduling date from the item. |
| @@ -14985,7 +14985,7 @@ Some of the options can be changed using the variable | |||
| 14985 | "Show the available speed commands." | 14985 | "Show the available speed commands." |
| 14986 | (interactive) | 14986 | (interactive) |
| 14987 | (if (not org-use-speed-commands) | 14987 | (if (not org-use-speed-commands) |
| 14988 | (error "Speed commands are not activated, customize `org-use-speed-commands'.") | 14988 | (error "Speed commands are not activated, customize `org-use-speed-commands'") |
| 14989 | (with-output-to-temp-buffer "*Help*" | 14989 | (with-output-to-temp-buffer "*Help*" |
| 14990 | (princ "User-defined Speed commands\n===========================\n") | 14990 | (princ "User-defined Speed commands\n===========================\n") |
| 14991 | (mapc 'org-print-speed-command org-speed-commands-user) | 14991 | (mapc 'org-print-speed-command org-speed-commands-user) |
| @@ -15028,7 +15028,7 @@ overwritten, and the table is not marked as requiring realignment." | |||
| 15028 | (setq this-command org-speed-command) | 15028 | (setq this-command org-speed-command) |
| 15029 | (call-interactively org-speed-command)) | 15029 | (call-interactively org-speed-command)) |
| 15030 | ((functionp org-speed-command) | 15030 | ((functionp org-speed-command) |
| 15031 | (funcall org-speed-command)) | 15031 | (funcall org-speed-command)) |
| 15032 | ((and org-speed-command (listp org-speed-command)) | 15032 | ((and org-speed-command (listp org-speed-command)) |
| 15033 | (eval org-speed-command)) | 15033 | (eval org-speed-command)) |
| 15034 | (t (let (org-use-speed-commands) | 15034 | (t (let (org-use-speed-commands) |
| @@ -16188,7 +16188,7 @@ Your bug report will be posted to the Org-mode mailing list. | |||
| 16188 | (save-excursion | 16188 | (save-excursion |
| 16189 | (if (re-search-backward "^\\(Subject: \\)Org-mode version \\(.*?\\);[ \t]*\\(.*\\)" nil t) | 16189 | (if (re-search-backward "^\\(Subject: \\)Org-mode version \\(.*?\\);[ \t]*\\(.*\\)" nil t) |
| 16190 | (replace-match "\\1Bug: \\3 [\\2]"))))) | 16190 | (replace-match "\\1Bug: \\3 [\\2]"))))) |
| 16191 | 16191 | ||
| 16192 | 16192 | ||
| 16193 | (defun org-install-agenda-files-menu () | 16193 | (defun org-install-agenda-files-menu () |
| 16194 | (let ((bl (buffer-list))) | 16194 | (let ((bl (buffer-list))) |
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index 19e1a925d51..520f6c151da 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el | |||
| @@ -730,12 +730,12 @@ that DVAL has been added on SQUARE." | |||
| 730 | (defun gomoku (&optional n m) | 730 | (defun gomoku (&optional n m) |
| 731 | "Start a Gomoku game between you and Emacs. | 731 | "Start a Gomoku game between you and Emacs. |
| 732 | 732 | ||
| 733 | If a game is in progress, this command allow you to resume it. | 733 | If a game is in progress, this command allows you to resume it. |
| 734 | If optional arguments N and M are given, an N by M board is used. | 734 | If optional arguments N and M are given, an N by M board is used. |
| 735 | If prefix arg is given for N, M is prompted for. | 735 | If prefix arg is given for N, M is prompted for. |
| 736 | 736 | ||
| 737 | You and Emacs play in turn by marking a free square. You mark it with X | 737 | You and Emacs play in turn by marking a free square. You mark it with X |
| 738 | and Emacs marks it with O. The winner is the first to get five contiguous | 738 | and Emacs marks it with O. The winner is the first to get five contiguous |
| 739 | marks horizontally, vertically or in diagonal. | 739 | marks horizontally, vertically or in diagonal. |
| 740 | 740 | ||
| 741 | You play by moving the cursor over the square you choose and hitting | 741 | You play by moving the cursor over the square you choose and hitting |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 2987e6680a9..3efa13d03ae 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -140,8 +140,8 @@ address for root variables.") | |||
| 140 | (defvar gdb-server-prefix nil) | 140 | (defvar gdb-server-prefix nil) |
| 141 | (defvar gdb-flush-pending-output nil) | 141 | (defvar gdb-flush-pending-output nil) |
| 142 | (defvar gdb-location-alist nil | 142 | (defvar gdb-location-alist nil |
| 143 | "Alist of breakpoint numbers and full filenames. Only used for files that | 143 | "Alist of breakpoint numbers and full filenames. |
| 144 | Emacs can't find.") | 144 | Only used for files that Emacs can't find.") |
| 145 | (defvar gdb-active-process nil | 145 | (defvar gdb-active-process nil |
| 146 | "GUD tooltips display variable values when t, and macro definitions otherwise.") | 146 | "GUD tooltips display variable values when t, and macro definitions otherwise.") |
| 147 | (defvar gdb-recording nil | 147 | (defvar gdb-recording nil |
| @@ -520,7 +520,7 @@ otherwise do not." | |||
| 520 | (not (display-graphic-p))))) | 520 | (not (display-graphic-p))))) |
| 521 | 521 | ||
| 522 | ;; If expr is a macro for a function don't print because of possible dangerous | 522 | ;; If expr is a macro for a function don't print because of possible dangerous |
| 523 | ;; side-effects. Also printing a function within a tooltip generates an | 523 | ;; side-effects. Also printing a function within a tooltip generates an |
| 524 | ;; unexpected starting annotation (phase error). | 524 | ;; unexpected starting annotation (phase error). |
| 525 | (defun gdb-tooltip-print-1 (expr) | 525 | (defun gdb-tooltip-print-1 (expr) |
| 526 | (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) | 526 | (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) |
| @@ -1079,7 +1079,7 @@ INDENT is the current indentation depth." | |||
| 1079 | (if (or (<= (string-to-number children) gdb-max-children) | 1079 | (if (or (<= (string-to-number children) gdb-max-children) |
| 1080 | (y-or-n-p | 1080 | (y-or-n-p |
| 1081 | (format | 1081 | (format |
| 1082 | "%s has %s children. Continue? " expr children))) | 1082 | "%s has %s children. Continue? " expr children))) |
| 1083 | (if (and (eq (buffer-local-value | 1083 | (if (and (eq (buffer-local-value |
| 1084 | 'gud-minor-mode gud-comint-buffer) 'gdba) | 1084 | 'gud-minor-mode gud-comint-buffer) 'gdba) |
| 1085 | (string-equal gdb-version "pre-6.4")) | 1085 | (string-equal gdb-version "pre-6.4")) |
| @@ -1488,7 +1488,7 @@ not GDB." | |||
| 1488 | (let ((gud-running nil)) | 1488 | (let ((gud-running nil)) |
| 1489 | (gdb-invalidate-frames) | 1489 | (gdb-invalidate-frames) |
| 1490 | (unless (or gdb-register-names | 1490 | (unless (or gdb-register-names |
| 1491 | (string-equal gdb-version "pre-6.4")) | 1491 | (string-equal gdb-version "pre-6.4")) |
| 1492 | (gdb-enqueue-input | 1492 | (gdb-enqueue-input |
| 1493 | (list "server interpreter mi -data-list-register-names\n" | 1493 | (list "server interpreter mi -data-list-register-names\n" |
| 1494 | 'gdb-get-register-names)))) | 1494 | 'gdb-get-register-names)))) |
| @@ -1815,13 +1815,13 @@ Field names are wrapped in double quotes and equal signs are | |||
| 1815 | replaced with semicolons. | 1815 | replaced with semicolons. |
| 1816 | 1816 | ||
| 1817 | If FIX-KEY is non-nil, strip all \"FIX-KEY=\" occurences from | 1817 | If FIX-KEY is non-nil, strip all \"FIX-KEY=\" occurences from |
| 1818 | partial output. This is used to get rid of useless keys in lists | 1818 | partial output. This is used to get rid of useless keys in lists |
| 1819 | in MI messages, e.g.: [key=.., key=..]. -stack-list-frames and | 1819 | in MI messages, e.g.: [key=.., key=..]. -stack-list-frames and |
| 1820 | -break-info are examples of MI commands which issue such | 1820 | -break-info are examples of MI commands which issue such |
| 1821 | responses. | 1821 | responses. |
| 1822 | 1822 | ||
| 1823 | If FIX-LIST is non-nil, \"FIX-LIST={..}\" is replaced with | 1823 | If FIX-LIST is non-nil, \"FIX-LIST={..}\" is replaced with |
| 1824 | \"FIX-LIST=[..]\" prior to parsing. This is used to fix broken | 1824 | \"FIX-LIST=[..]\" prior to parsing. This is used to fix broken |
| 1825 | -break-info output when it contains breakpoint script field | 1825 | -break-info output when it contains breakpoint script field |
| 1826 | incompatible with GDB/MI output syntax." | 1826 | incompatible with GDB/MI output syntax." |
| 1827 | (save-excursion | 1827 | (save-excursion |
| @@ -1897,7 +1897,7 @@ FIX-KEY and FIX-KEY work as in `gdb-jsonify-buffer'." | |||
| 1897 | ;; annotation rule binding of whatever gdb sends to tell us this command | 1897 | ;; annotation rule binding of whatever gdb sends to tell us this command |
| 1898 | ;; might have changed it's output. | 1898 | ;; might have changed it's output. |
| 1899 | ;; | 1899 | ;; |
| 1900 | ;; NAME is the function name. DEMAND-PREDICATE tests if output is really needed. | 1900 | ;; NAME is the function name. DEMAND-PREDICATE tests if output is really needed. |
| 1901 | ;; GDB-COMMAND is a string of such. OUTPUT-HANDLER is the function bound to the | 1901 | ;; GDB-COMMAND is a string of such. OUTPUT-HANDLER is the function bound to the |
| 1902 | ;; input in the input queue (see comment about ``gdb communications'' above). | 1902 | ;; input in the input queue (see comment about ``gdb communications'' above). |
| 1903 | 1903 | ||
| @@ -2270,7 +2270,7 @@ corresponding to the mode line clicked." | |||
| 2270 | 2270 | ||
| 2271 | (defmacro gdb-propertize-header (name buffer help-echo mouse-face face) | 2271 | (defmacro gdb-propertize-header (name buffer help-echo mouse-face face) |
| 2272 | `(propertize ,name | 2272 | `(propertize ,name |
| 2273 | 'help-echo ,help-echo | 2273 | 'help-echo ,help-echo |
| 2274 | 'mouse-face ',mouse-face | 2274 | 'mouse-face ',mouse-face |
| 2275 | 'face ',face | 2275 | 'face ',face |
| 2276 | 'local-map | 2276 | 'local-map |
| @@ -2389,7 +2389,7 @@ corresponding to the mode line clicked." | |||
| 2389 | (goto-char (point-min)) | 2389 | (goto-char (point-min)) |
| 2390 | (forward-line (1- (string-to-number line))) | 2390 | (forward-line (1- (string-to-number line))) |
| 2391 | (set-window-point window (point)))))) | 2391 | (set-window-point window (point)))))) |
| 2392 | (error "No location specified.")))) | 2392 | (error "No location specified")))) |
| 2393 | 2393 | ||
| 2394 | 2394 | ||
| 2395 | ;; Frames buffer. This displays a perpetually correct backtrace | 2395 | ;; Frames buffer. This displays a perpetually correct backtrace |
| @@ -3284,7 +3284,7 @@ another GDB command e.g pwd, to see new frames") | |||
| 3284 | :button (:toggle . gdb-use-separate-io-buffer))) | 3284 | :button (:toggle . gdb-use-separate-io-buffer))) |
| 3285 | (define-key menu [gdb-many-windows] | 3285 | (define-key menu [gdb-many-windows] |
| 3286 | '(menu-item "Display Other Windows" gdb-many-windows | 3286 | '(menu-item "Display Other Windows" gdb-many-windows |
| 3287 | :help "Toggle display of locals, stack and breakpoint information" | 3287 | :help "Toggle display of locals, stack and breakpoint information." |
| 3288 | :button (:toggle . gdb-many-windows))) | 3288 | :button (:toggle . gdb-many-windows))) |
| 3289 | (define-key menu [gdb-restore-windows] | 3289 | (define-key menu [gdb-restore-windows] |
| 3290 | '(menu-item "Restore Window Layout" gdb-restore-windows | 3290 | '(menu-item "Restore Window Layout" gdb-restore-windows |
| @@ -4029,7 +4029,7 @@ from=\"\\(.*?\\)\"\\)") | |||
| 4029 | 4029 | ||
| 4030 | ;; Locals buffer. | 4030 | ;; Locals buffer. |
| 4031 | ;; | 4031 | ;; |
| 4032 | ;; uses "-stack-list-locals --simple-values". Needs GDB 6.1 onwards. | 4032 | ;; uses "-stack-list-locals --simple-values". Needs GDB 6.1 onwards. |
| 4033 | (gdb-set-buffer-rules 'gdb-locals-buffer | 4033 | (gdb-set-buffer-rules 'gdb-locals-buffer |
| 4034 | 'gdb-locals-buffer-name | 4034 | 'gdb-locals-buffer-name |
| 4035 | 'gdb-locals-mode) | 4035 | 'gdb-locals-mode) |
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index 4cf275b3e6f..b73f8154fc4 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | 41 | ||
| 42 | ;;; Code: | 42 | ;;; Code: |
| 43 | (defvar idlwave-help-browse-url-available t | 43 | (defvar idlwave-help-browse-url-available t |
| 44 | "Whether browse-url is available") | 44 | "Whether browse-url is available.") |
| 45 | 45 | ||
| 46 | (require 'browse-url) | 46 | (require 'browse-url) |
| 47 | 47 | ||
| @@ -58,9 +58,9 @@ | |||
| 58 | (if idlwave-html-help-pre-v6 "#" "#wp")) | 58 | (if idlwave-html-help-pre-v6 "#" "#wp")) |
| 59 | 59 | ||
| 60 | (defcustom idlwave-html-system-help-location "help/online_help/" | 60 | (defcustom idlwave-html-system-help-location "help/online_help/" |
| 61 | "The directory, relative to idlwave-system-directory, where the idl | 61 | "The directory, relative to `idlwave-system-directory', where the IDL |
| 62 | HTML help files live, for IDL 6.2 and later. This location, if found, | 62 | HTML help files live, for IDL 6.2 and later. This location, if found, |
| 63 | is used in preference to the old idlwave-html-help-location." | 63 | is used in preference to the old `idlwave-html-help-location'." |
| 64 | :group 'idlwave-online-help | 64 | :group 'idlwave-online-help |
| 65 | :type 'directory) | 65 | :type 'directory) |
| 66 | 66 | ||
| @@ -69,7 +69,7 @@ is used in preference to the old idlwave-html-help-location." | |||
| 69 | nil | 69 | nil |
| 70 | "/usr/local/etc/") | 70 | "/usr/local/etc/") |
| 71 | "The directory where the idl_html_help/ dir lives. Obsolete for IDL | 71 | "The directory where the idl_html_help/ dir lives. Obsolete for IDL |
| 72 | 6.2 or later (see idlwave-html-system-help-location)." | 72 | 6.2 or later (see `idlwave-html-system-help-location')." |
| 73 | :group 'idlwave-online-help | 73 | :group 'idlwave-online-help |
| 74 | :type 'directory) | 74 | :type 'directory) |
| 75 | 75 | ||
| @@ -82,13 +82,13 @@ is used in preference to the old idlwave-html-help-location." | |||
| 82 | :type 'boolean) | 82 | :type 'boolean) |
| 83 | 83 | ||
| 84 | (defcustom idlwave-help-browser-function browse-url-browser-function | 84 | (defcustom idlwave-help-browser-function browse-url-browser-function |
| 85 | "Function to use to display html help. | 85 | "Function to use to display HTML help. |
| 86 | Defaults to `browse-url-browser-function', which see." | 86 | Defaults to `browse-url-browser-function', which see." |
| 87 | :group 'idlwave-online-help | 87 | :group 'idlwave-online-help |
| 88 | :type 'function) | 88 | :type 'function) |
| 89 | 89 | ||
| 90 | (defcustom idlwave-help-browser-generic-program browse-url-generic-program | 90 | (defcustom idlwave-help-browser-generic-program browse-url-generic-program |
| 91 | "Program to run if using browse-url-generic-program." | 91 | "Program to run if using `browse-url-generic-program'." |
| 92 | :group 'idlwave-online-help | 92 | :group 'idlwave-online-help |
| 93 | :type 'string) | 93 | :type 'string) |
| 94 | 94 | ||
| @@ -97,7 +97,7 @@ Defaults to `browse-url-browser-function', which see." | |||
| 97 | (defcustom idlwave-help-browser-generic-args | 97 | (defcustom idlwave-help-browser-generic-args |
| 98 | (if (boundp 'browse-url-generic-args) | 98 | (if (boundp 'browse-url-generic-args) |
| 99 | browse-url-generic-args "") | 99 | browse-url-generic-args "") |
| 100 | "Program args to use if using browse-url-generic-program." | 100 | "Program args to use if using `browse-url-generic-program'." |
| 101 | :group 'idlwave-online-help | 101 | :group 'idlwave-online-help |
| 102 | :type 'string) | 102 | :type 'string) |
| 103 | 103 | ||
| @@ -112,7 +112,7 @@ must be explicitly set non-nil in order for the variable | |||
| 112 | :type 'boolean) | 112 | :type 'boolean) |
| 113 | 113 | ||
| 114 | (defvar idlwave-help-directory "" | 114 | (defvar idlwave-help-directory "" |
| 115 | "Obsolete variable. See idlwave-html-help-location.") | 115 | "Obsolete variable. See `idlwave-html-help-location'.") |
| 116 | 116 | ||
| 117 | (defcustom idlwave-help-use-dedicated-frame t | 117 | (defcustom idlwave-help-use-dedicated-frame t |
| 118 | "*Non-nil means, use a separate frame for Online Help if possible." | 118 | "*Non-nil means, use a separate frame for Online Help if possible." |
| @@ -210,10 +210,10 @@ support." | |||
| 210 | "The default width of the help frame.") | 210 | "The default width of the help frame.") |
| 211 | 211 | ||
| 212 | (defvar idlwave-html-help-is-available nil | 212 | (defvar idlwave-html-help-is-available nil |
| 213 | "Is the system online help text avaiable?") | 213 | "Is the system online help text available?") |
| 214 | 214 | ||
| 215 | (defvar idlwave-help-mode-line-indicator "" | 215 | (defvar idlwave-help-mode-line-indicator "" |
| 216 | "Used for the special mode line in the idlwave-help-mode.") | 216 | "Used for the special mode line in the `idlwave-help-mode'.") |
| 217 | 217 | ||
| 218 | (defvar idlwave-help-window-configuration nil) | 218 | (defvar idlwave-help-window-configuration nil) |
| 219 | (defvar idlwave-help-special-topic-words nil) ; defined by get_rinfo | 219 | (defvar idlwave-help-special-topic-words nil) ; defined by get_rinfo |
| @@ -221,7 +221,7 @@ support." | |||
| 221 | ;; Define the key bindings for the Help application | 221 | ;; Define the key bindings for the Help application |
| 222 | 222 | ||
| 223 | (defvar idlwave-help-mode-map (make-sparse-keymap) | 223 | (defvar idlwave-help-mode-map (make-sparse-keymap) |
| 224 | "The keymap used in idlwave-help-mode.") | 224 | "The keymap used in `idlwave-help-mode'.") |
| 225 | 225 | ||
| 226 | (define-key idlwave-help-mode-map "q" 'idlwave-help-quit) | 226 | (define-key idlwave-help-mode-map "q" 'idlwave-help-quit) |
| 227 | (define-key idlwave-help-mode-map "w" 'widen) | 227 | (define-key idlwave-help-mode-map "w" 'widen) |
| @@ -303,7 +303,7 @@ When the hep text is a source file, the following commands are available | |||
| 303 | Fontification: [F]ontify the buffer like source code | 303 | Fontification: [F]ontify the buffer like source code |
| 304 | Jump: [h] to function doclib header | 304 | Jump: [h] to function doclib header |
| 305 | [H] to file doclib header | 305 | [H] to file doclib header |
| 306 | [.] back and forward between header and definition | 306 | [.] back and forth between header and definition |
| 307 | 307 | ||
| 308 | Here are all keybindings. | 308 | Here are all keybindings. |
| 309 | \\{idlwave-help-mode-map}" | 309 | \\{idlwave-help-mode-map}" |
| @@ -367,7 +367,7 @@ Here are all keybindings. | |||
| 367 | (defvar idlwave-experimental) | 367 | (defvar idlwave-experimental) |
| 368 | (defvar idlwave-last-context-help-pos) | 368 | (defvar idlwave-last-context-help-pos) |
| 369 | (defun idlwave-do-context-help (&optional arg) | 369 | (defun idlwave-do-context-help (&optional arg) |
| 370 | "Wrapper around the call to idlwave-context-help1. | 370 | "Wrapper around the call to `idlwave-do-context-help1'. |
| 371 | It collects and prints the diagnostics messages." | 371 | It collects and prints the diagnostics messages." |
| 372 | (let ((marker (list (current-buffer) (point))) | 372 | (let ((marker (list (current-buffer) (point))) |
| 373 | (idlwave-help-diagnostics nil)) | 373 | (idlwave-help-diagnostics nil)) |
| @@ -766,7 +766,7 @@ if passed as a function. See `idlwave-help-use-dedicated-frame'." | |||
| 766 | "Display HTML or other special help on a certain topic. | 766 | "Display HTML or other special help on a certain topic. |
| 767 | Either loads an HTML link, if LINK is non-nil, or gets special-help on | 767 | Either loads an HTML link, if LINK is non-nil, or gets special-help on |
| 768 | the optional arguments, if any special help is defined. If LINK is | 768 | the optional arguments, if any special help is defined. If LINK is |
| 769 | `t', first look up the optional arguments in the routine info list to | 769 | t, first look up the optional arguments in the routine info list to |
| 770 | see if a link is set for it. Try extra help functions if necessary." | 770 | see if a link is set for it. Try extra help functions if necessary." |
| 771 | ;; Lookup link | 771 | ;; Lookup link |
| 772 | (if (eq link t) | 772 | (if (eq link t) |
| @@ -817,7 +817,7 @@ see if a link is set for it. Try extra help functions if necessary." | |||
| 817 | (select-window cw))) | 817 | (select-window cw))) |
| 818 | 818 | ||
| 819 | (defun idlwave-help-html-link (link) | 819 | (defun idlwave-help-html-link (link) |
| 820 | "Get html help on a given LINK." | 820 | "Get HTML help on a given LINK." |
| 821 | (let ((browse-url-browser-function idlwave-help-browser-function) | 821 | (let ((browse-url-browser-function idlwave-help-browser-function) |
| 822 | (help-loc (idlwave-html-help-location)) | 822 | (help-loc (idlwave-html-help-location)) |
| 823 | (browse-url-generic-program idlwave-help-browser-generic-program) | 823 | (browse-url-generic-program idlwave-help-browser-generic-program) |
| @@ -847,14 +847,14 @@ see if a link is set for it. Try extra help functions if necessary." | |||
| 847 | (defvar idlwave-current-tags-buffer) | 847 | (defvar idlwave-current-tags-buffer) |
| 848 | (defvar idlwave-current-tags-class) | 848 | (defvar idlwave-current-tags-class) |
| 849 | (defun idlwave-help-with-source (name type class keyword) | 849 | (defun idlwave-help-with-source (name type class keyword) |
| 850 | "Provide help for routines not documented in the IDL manuals. Works | 850 | "Provide help for routines not documented in the IDL manuals. |
| 851 | by loading the routine source file into the help buffer. Depending on | 851 | Works by loading the routine source file into the help buffer. |
| 852 | the value of `idlwave-help-source-try-header', it attempts to show the | 852 | Depending on the value of `idlwave-help-source-try-header', it |
| 853 | routine definition or the header description. If | 853 | attempts to show the routine definition or the header description. |
| 854 | `idlwave-help-do-class-struct-tag' is non-nil, keyword is a tag to | 854 | If `idlwave-help-do-class-struct-tag' is non-nil, keyword is a tag |
| 855 | show help on from the class definition structure. If | 855 | to show help on from the class definition structure. |
| 856 | `idlwave-help-do-struct-tag' is non-nil, show help from the matching | 856 | If `idlwave-help-do-struct-tag' is non-nil, show help from the |
| 857 | structure tag definition. | 857 | matching structure tag definition. |
| 858 | 858 | ||
| 859 | This function can be used as `idlwave-extra-help-function'." | 859 | This function can be used as `idlwave-extra-help-function'." |
| 860 | (let* ((class-struct-tag idlwave-help-do-class-struct-tag) | 860 | (let* ((class-struct-tag idlwave-help-do-class-struct-tag) |
| @@ -953,7 +953,8 @@ This function can be used as `idlwave-extra-help-function'." | |||
| 953 | 953 | ||
| 954 | (defun idlwave-help-find-routine-definition (name type class keyword) | 954 | (defun idlwave-help-find-routine-definition (name type class keyword) |
| 955 | "Find the definition of routine CLASS::NAME in current buffer. | 955 | "Find the definition of routine CLASS::NAME in current buffer. |
| 956 | KEYWORD is ignored. Returns the point of match if successful, nil otherwise." | 956 | Returns the point of match if successful, nil otherwise. |
| 957 | KEYWORD is ignored." | ||
| 957 | (save-excursion | 958 | (save-excursion |
| 958 | (goto-char (point-max)) | 959 | (goto-char (point-max)) |
| 959 | (if (re-search-backward | 960 | (if (re-search-backward |
| @@ -1199,7 +1200,7 @@ Useful when source code is displayed as help. See the option | |||
| 1199 | "(help location unknown)"))) | 1200 | "(help location unknown)"))) |
| 1200 | 1201 | ||
| 1201 | (defun idlwave-help-show-help-frame () | 1202 | (defun idlwave-help-show-help-frame () |
| 1202 | "Show the help frame, creating it if necessary" | 1203 | "Show the help frame, creating it if necessary." |
| 1203 | ;; Use a special frame for this | 1204 | ;; Use a special frame for this |
| 1204 | (unless (frame-live-p idlwave-help-frame) | 1205 | (unless (frame-live-p idlwave-help-frame) |
| 1205 | (setq idlwave-help-frame | 1206 | (setq idlwave-help-frame |
| @@ -1254,7 +1255,7 @@ Useful when source code is displayed as help. See the option | |||
| 1254 | (if (memq system-type '(ms-dos windows-nt)) | 1255 | (if (memq system-type '(ms-dos windows-nt)) |
| 1255 | "bin/bin.x86/idl_assistant.exe" | 1256 | "bin/bin.x86/idl_assistant.exe" |
| 1256 | "bin/idl_assistant") | 1257 | "bin/idl_assistant") |
| 1257 | "The command, rooted at idlwave-system-directory, which invokes the | 1258 | "The command, rooted at `idlwave-system-directory', which invokes the |
| 1258 | IDL assistant.") | 1259 | IDL assistant.") |
| 1259 | 1260 | ||
| 1260 | (defun idlwave-help-assistant-available () | 1261 | (defun idlwave-help-assistant-available () |
| @@ -1293,7 +1294,7 @@ IDL assistant.") | |||
| 1293 | (unless (accept-process-output idlwave-help-assistant-process 15) | 1294 | (unless (accept-process-output idlwave-help-assistant-process 15) |
| 1294 | (error "Failed binding IDL_ASSISTANT socket")) | 1295 | (error "Failed binding IDL_ASSISTANT socket")) |
| 1295 | (if (not port) | 1296 | (if (not port) |
| 1296 | (error "Unable to open IDL_ASSISTANT.") | 1297 | (error "Unable to open IDL_ASSISTANT") |
| 1297 | (set-process-filter idlwave-help-assistant-process nil) | 1298 | (set-process-filter idlwave-help-assistant-process nil) |
| 1298 | (setq idlwave-help-assistant-socket | 1299 | (setq idlwave-help-assistant-socket |
| 1299 | (open-network-stream "IDL_ASSISTANT_SOCK" | 1300 | (open-network-stream "IDL_ASSISTANT_SOCK" |
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index ab3c7781868..5c5e9851dcb 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el | |||
| @@ -101,11 +101,9 @@ All Octave abbrevs start with a grave accent (`)." | |||
| 101 | '("do" "for" "function" "if" "switch" "try" "unwind_protect" "while")) | 101 | '("do" "for" "function" "if" "switch" "try" "unwind_protect" "while")) |
| 102 | (defvar octave-else-keywords | 102 | (defvar octave-else-keywords |
| 103 | '("case" "catch" "else" "elseif" "otherwise" "unwind_protect_cleanup")) | 103 | '("case" "catch" "else" "elseif" "otherwise" "unwind_protect_cleanup")) |
| 104 | ;; FIXME: only use specific "end" tokens here to avoid confusion when "end" | ||
| 105 | ;; is used in indexing (the real fix is much more complex). | ||
| 106 | (defvar octave-end-keywords | 104 | (defvar octave-end-keywords |
| 107 | '("endfor" "endfunction" "endif" "endswitch" "end_try_catch" | 105 | '("endfor" "endfunction" "endif" "endswitch" "end_try_catch" |
| 108 | "end_unwind_protect" "endwhile" "until")) | 106 | "end_unwind_protect" "endwhile" "until" "end")) |
| 109 | 107 | ||
| 110 | (defvar octave-reserved-words | 108 | (defvar octave-reserved-words |
| 111 | (append octave-begin-keywords | 109 | (append octave-begin-keywords |
| @@ -342,17 +340,15 @@ newline or semicolon after an else or end keyword." | |||
| 342 | (concat octave-block-begin-regexp "\\|" octave-block-end-regexp)) | 340 | (concat octave-block-begin-regexp "\\|" octave-block-end-regexp)) |
| 343 | (defvar octave-block-else-or-end-regexp | 341 | (defvar octave-block-else-or-end-regexp |
| 344 | (concat octave-block-else-regexp "\\|" octave-block-end-regexp)) | 342 | (concat octave-block-else-regexp "\\|" octave-block-end-regexp)) |
| 345 | ;; FIXME: only use specific "end" tokens here to avoid confusion when "end" | ||
| 346 | ;; is used in indexing (the real fix is much more complex). | ||
| 347 | (defvar octave-block-match-alist | 343 | (defvar octave-block-match-alist |
| 348 | '(("do" . ("until")) | 344 | '(("do" . ("until")) |
| 349 | ("for" . ("endfor")) | 345 | ("for" . ("endfor" "end")) |
| 350 | ("function" . ("endfunction")) | 346 | ("function" . ("endfunction")) |
| 351 | ("if" . ("else" "elseif" "endif")) | 347 | ("if" . ("else" "elseif" "endif" "end")) |
| 352 | ("switch" . ("case" "otherwise" "endswitch")) | 348 | ("switch" . ("case" "otherwise" "endswitch" "end")) |
| 353 | ("try" . ("catch" "end_try_catch")) | 349 | ("try" . ("catch" "end_try_catch")) |
| 354 | ("unwind_protect" . ("unwind_protect_cleanup" "end_unwind_protect")) | 350 | ("unwind_protect" . ("unwind_protect_cleanup" "end_unwind_protect")) |
| 355 | ("while" . ("endwhile"))) | 351 | ("while" . ("endwhile" "end"))) |
| 356 | "Alist with Octave's matching block keywords. | 352 | "Alist with Octave's matching block keywords. |
| 357 | Has Octave's begin keywords as keys and a list of the matching else or | 353 | Has Octave's begin keywords as keys and a list of the matching else or |
| 358 | end keywords as associated values.") | 354 | end keywords as associated values.") |
| @@ -410,7 +406,7 @@ Non-nil means always go to the next Octave code line after sending." | |||
| 410 | 406 | ||
| 411 | This mode makes it easier to write Octave code by helping with | 407 | This mode makes it easier to write Octave code by helping with |
| 412 | indentation, doing some of the typing for you (with Abbrev mode) and by | 408 | indentation, doing some of the typing for you (with Abbrev mode) and by |
| 413 | showing keywords, comments, strings, etc.. in different faces (with | 409 | showing keywords, comments, strings, etc. in different faces (with |
| 414 | Font Lock mode on terminals that support it). | 410 | Font Lock mode on terminals that support it). |
| 415 | 411 | ||
| 416 | Octave itself is a high-level language, primarily intended for numerical | 412 | Octave itself is a high-level language, primarily intended for numerical |
| @@ -680,7 +676,10 @@ level." | |||
| 680 | (if (= bot (point)) | 676 | (if (= bot (point)) |
| 681 | (setq icol (+ icol octave-block-offset)))) | 677 | (setq icol (+ icol octave-block-offset)))) |
| 682 | ((octave-looking-at-kw octave-block-end-regexp) | 678 | ((octave-looking-at-kw octave-block-end-regexp) |
| 683 | (if (not (= bot (point))) | 679 | (if (and (not (= bot (point))) |
| 680 | ;; special case for `end' keyword, | ||
| 681 | ;; applied to all keywords | ||
| 682 | (not (octave-end-as-array-index-p))) | ||
| 684 | (setq icol (- icol | 683 | (setq icol (- icol |
| 685 | (octave-block-end-offset))))))) | 684 | (octave-block-end-offset))))))) |
| 686 | (forward-char))) | 685 | (forward-char))) |
| @@ -702,6 +701,15 @@ level." | |||
| 702 | (setq icol (list comment-column icol))))) | 701 | (setq icol (list comment-column icol))))) |
| 703 | icol)) | 702 | icol)) |
| 704 | 703 | ||
| 704 | ;; FIXME: this should probably also make sure we are actually looking | ||
| 705 | ;; at the "end" keyword. | ||
| 706 | (defun octave-end-as-array-index-p () | ||
| 707 | (save-excursion | ||
| 708 | (condition-case nil | ||
| 709 | ;; Check if point is between parens | ||
| 710 | (progn (up-list 1) t) | ||
| 711 | (error nil)))) | ||
| 712 | |||
| 705 | (defun octave-block-end-offset () | 713 | (defun octave-block-end-offset () |
| 706 | (save-excursion | 714 | (save-excursion |
| 707 | (octave-backward-up-block 1) | 715 | (octave-backward-up-block 1) |
| @@ -1260,7 +1268,7 @@ If Abbrev mode is on, expand abbrevs first." | |||
| 1260 | (defun octave-electric-semi () | 1268 | (defun octave-electric-semi () |
| 1261 | "Insert a semicolon in Octave mode. | 1269 | "Insert a semicolon in Octave mode. |
| 1262 | Maybe expand abbrevs and blink matching block open keywords. | 1270 | Maybe expand abbrevs and blink matching block open keywords. |
| 1263 | Reindent the line of `octave-auto-indent' is non-nil. | 1271 | Reindent the line if `octave-auto-indent' is non-nil. |
| 1264 | Insert a newline if `octave-auto-newline' is non-nil." | 1272 | Insert a newline if `octave-auto-newline' is non-nil." |
| 1265 | (interactive) | 1273 | (interactive) |
| 1266 | (if (not (octave-not-in-string-or-comment-p)) | 1274 | (if (not (octave-not-in-string-or-comment-p)) |
| @@ -1277,7 +1285,7 @@ Insert a newline if `octave-auto-newline' is non-nil." | |||
| 1277 | (defun octave-electric-space () | 1285 | (defun octave-electric-space () |
| 1278 | "Insert a space in Octave mode. | 1286 | "Insert a space in Octave mode. |
| 1279 | Maybe expand abbrevs and blink matching block open keywords. | 1287 | Maybe expand abbrevs and blink matching block open keywords. |
| 1280 | Reindent the line of `octave-auto-indent' is non-nil." | 1288 | Reindent the line if `octave-auto-indent' is non-nil." |
| 1281 | (interactive) | 1289 | (interactive) |
| 1282 | (setq last-command-event ? ) | 1290 | (setq last-command-event ? ) |
| 1283 | (if (and octave-auto-indent | 1291 | (if (and octave-auto-indent |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 104ea26689f..94124ad54f0 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; python.el --- silly walks for Python -*- coding: iso-8859-1 -*- | 1 | ;;; python.el --- silly walks for Python -*- coding: iso-8859-1 -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 | 3 | ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Dave Love <fx@gnu.org> | 6 | ;; Author: Dave Love <fx@gnu.org> |
| @@ -112,7 +112,9 @@ | |||
| 112 | ;; Top-level assignments are worth highlighting. | 112 | ;; Top-level assignments are worth highlighting. |
| 113 | (,(rx line-start (group (1+ (or word ?_))) (0+ space) "=") | 113 | (,(rx line-start (group (1+ (or word ?_))) (0+ space) "=") |
| 114 | (1 font-lock-variable-name-face)) | 114 | (1 font-lock-variable-name-face)) |
| 115 | (,(rx line-start (* (any " \t")) (group "@" (1+ (or word ?_)))) ; decorators | 115 | ;; Decorators. |
| 116 | (,(rx line-start (* (any " \t")) (group "@" (1+ (or word ?_)) | ||
| 117 | (0+ "." (1+ (or word ?_))))) | ||
| 116 | (1 font-lock-type-face)) | 118 | (1 font-lock-type-face)) |
| 117 | ;; Built-ins. (The next three blocks are from | 119 | ;; Built-ins. (The next three blocks are from |
| 118 | ;; `__builtin__.__dict__.keys()' in Python 2.5.1.) These patterns | 120 | ;; `__builtin__.__dict__.keys()' in Python 2.5.1.) These patterns |
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index fff4eca57fa..f140671be12 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)))) |
| @@ -347,9 +356,19 @@ If any error occurred in running `bzr status', then return nil." | |||
| 347 | (if (file-exists-p location-fname) | 356 | (if (file-exists-p location-fname) |
| 348 | (with-temp-buffer | 357 | (with-temp-buffer |
| 349 | (insert-file-contents location-fname) | 358 | (insert-file-contents location-fname) |
| 350 | (when (re-search-forward "file://\(.+\)" nil t) | 359 | ;; If the lightweight checkout points to a |
| 351 | (setq branch-format-file (match-string 1)) | 360 | ;; location in the local file system, then we can |
| 352 | (file-exists-p branch-format-file))) | 361 | ;; look there for the version information. |
| 362 | (when (re-search-forward "file://\\(.+\\)" nil t) | ||
| 363 | (let ((l-c-parent-dir (match-string 1))) | ||
| 364 | (setq branch-format-file | ||
| 365 | (expand-file-name vc-bzr-admin-branch-format-file | ||
| 366 | l-c-parent-dir)) | ||
| 367 | (setq lastrev-file | ||
| 368 | (expand-file-name vc-bzr-admin-lastrev l-c-parent-dir)) | ||
| 369 | ;; FIXME: maybe it's overkill to check if both these files exist. | ||
| 370 | (and (file-exists-p branch-format-file) | ||
| 371 | (file-exists-p lastrev-file))))) | ||
| 353 | t))) | 372 | t))) |
| 354 | (with-temp-buffer | 373 | (with-temp-buffer |
| 355 | (insert-file-contents branch-format-file) | 374 | (insert-file-contents branch-format-file) |
| @@ -475,7 +494,7 @@ REV non-nil gets an error." | |||
| 475 | (4 'change-log-list nil lax)))) | 494 | (4 'change-log-list nil lax)))) |
| 476 | (append `((,log-view-message-re . 'log-view-message-face)) | 495 | (append `((,log-view-message-re . 'log-view-message-face)) |
| 477 | ;; log-view-font-lock-keywords | 496 | ;; log-view-font-lock-keywords |
| 478 | '(("^ *committer: \ | 497 | '(("^ *\\(?:committer\\|author\\): \ |
| 479 | \\([^<(]+?\\)[ ]*[(<]\\([[:alnum:]_.+-]+@[[:alnum:]_.-]+\\)[>)]" | 498 | \\([^<(]+?\\)[ ]*[(<]\\([[:alnum:]_.+-]+@[[:alnum:]_.-]+\\)[>)]" |
| 480 | (1 'change-log-name) | 499 | (1 'change-log-name) |
| 481 | (2 'change-log-email)) | 500 | (2 'change-log-email)) |
| @@ -523,7 +542,8 @@ REV non-nil gets an error." | |||
| 523 | (defun vc-bzr-diff (files &optional rev1 rev2 buffer) | 542 | (defun vc-bzr-diff (files &optional rev1 rev2 buffer) |
| 524 | "VC bzr backend for diff." | 543 | "VC bzr backend for diff." |
| 525 | ;; `bzr diff' exits with code 1 if diff is non-empty. | 544 | ;; `bzr diff' exits with code 1 if diff is non-empty. |
| 526 | (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 'async files | 545 | (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") |
| 546 | (if vc-disable-async-diff 1 'async) files | ||
| 527 | "--diff-options" (mapconcat 'identity | 547 | "--diff-options" (mapconcat 'identity |
| 528 | (vc-switches 'bzr 'diff) | 548 | (vc-switches 'bzr 'diff) |
| 529 | " ") | 549 | " ") |
| @@ -651,7 +671,6 @@ stream. Standard error output is discarded." | |||
| 651 | ;; For conflicts, should we list the .THIS/.BASE/.OTHER? | 671 | ;; For conflicts, should we list the .THIS/.BASE/.OTHER? |
| 652 | ("C " . conflict) | 672 | ("C " . conflict) |
| 653 | ("? " . unregistered) | 673 | ("? " . unregistered) |
| 654 | ("? " . unregistered) | ||
| 655 | ;; No such state, but we need to distinguish this case. | 674 | ;; No such state, but we need to distinguish this case. |
| 656 | ("R " . renamed) | 675 | ("R " . renamed) |
| 657 | ;; For a non existent file FOO, the output is: | 676 | ;; For a non existent file FOO, the output is: |
| @@ -663,6 +682,8 @@ stream. Standard error output is discarded." | |||
| 663 | ;; FIXME: maybe this warning can be put in the vc-dir header... | 682 | ;; FIXME: maybe this warning can be put in the vc-dir header... |
| 664 | ("wor" . not-found) | 683 | ("wor" . not-found) |
| 665 | ;; Ignore "P " and "P." for pending patches. | 684 | ;; Ignore "P " and "P." for pending patches. |
| 685 | ("P " . not-found) | ||
| 686 | ("P. " . not-found) | ||
| 666 | )) | 687 | )) |
| 667 | (translated nil) | 688 | (translated nil) |
| 668 | (result nil)) | 689 | (result nil)) |
| @@ -732,7 +753,7 @@ stream. Standard error output is discarded." | |||
| 732 | (define-key map "\C-k" 'vc-bzr-shelve-delete-at-point) | 753 | (define-key map "\C-k" 'vc-bzr-shelve-delete-at-point) |
| 733 | ;; (define-key map "=" 'vc-bzr-shelve-show-at-point) | 754 | ;; (define-key map "=" 'vc-bzr-shelve-show-at-point) |
| 734 | ;; (define-key map "\C-m" 'vc-bzr-shelve-show-at-point) | 755 | ;; (define-key map "\C-m" 'vc-bzr-shelve-show-at-point) |
| 735 | (define-key map "A" 'vc-bzr-shelve-apply-at-point) | 756 | (define-key map "P" 'vc-bzr-shelve-apply-at-point) |
| 736 | map)) | 757 | map)) |
| 737 | 758 | ||
| 738 | (defvar vc-bzr-shelve-menu-map | 759 | (defvar vc-bzr-shelve-menu-map |
| @@ -740,9 +761,9 @@ stream. Standard error output is discarded." | |||
| 740 | (define-key map [de] | 761 | (define-key map [de] |
| 741 | '(menu-item "Delete shelf" vc-bzr-shelve-delete-at-point | 762 | '(menu-item "Delete shelf" vc-bzr-shelve-delete-at-point |
| 742 | :help "Delete the current shelf")) | 763 | :help "Delete the current shelf")) |
| 743 | (define-key map [ap] | 764 | (define-key map [po] |
| 744 | '(menu-item "Apply shelf" vc-bzr-shelve-apply-at-point | 765 | '(menu-item "Apply and remove shelf (pop)" vc-bzr-shelve-apply-at-point |
| 745 | :help "Apply the current shelf")) | 766 | :help "Apply the current shelf and remove it")) |
| 746 | ;; (define-key map [sh] | 767 | ;; (define-key map [sh] |
| 747 | ;; '(menu-item "Show shelve" vc-bzr-shelve-show-at-point | 768 | ;; '(menu-item "Show shelve" vc-bzr-shelve-show-at-point |
| 748 | ;; :help "Show the contents of the current shelve")) | 769 | ;; :help "Show the contents of the current shelve")) |
| @@ -800,7 +821,7 @@ stream. Standard error output is discarded." | |||
| 800 | (propertize x | 821 | (propertize x |
| 801 | 'face 'font-lock-variable-name-face | 822 | 'face 'font-lock-variable-name-face |
| 802 | 'mouse-face 'highlight | 823 | 'mouse-face 'highlight |
| 803 | 'help-echo "mouse-3: Show shelve menu\nA: Apply shelf\nC-k: Delete shelf" | 824 | 'help-echo "mouse-3: Show shelve menu\nP: Apply and remove shelf (pop)\nC-k: Delete shelf" |
| 804 | 'keymap vc-bzr-shelve-map)) | 825 | 'keymap vc-bzr-shelve-map)) |
| 805 | shelve "\n")) | 826 | shelve "\n")) |
| 806 | (concat | 827 | (concat |
| @@ -830,8 +851,8 @@ stream. Standard error output is discarded." | |||
| 830 | ;; (pop-to-buffer (current-buffer))) | 851 | ;; (pop-to-buffer (current-buffer))) |
| 831 | 852 | ||
| 832 | (defun vc-bzr-shelve-apply (name) | 853 | (defun vc-bzr-shelve-apply (name) |
| 833 | "Apply shelve NAME." | 854 | "Apply shelve NAME and remove it afterwards." |
| 834 | (interactive "sApply shelf: ") | 855 | (interactive "sApply (and remove) shelf: ") |
| 835 | (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" name) | 856 | (vc-bzr-command "unshelve" "*vc-bzr-shelve*" 0 nil "--apply" name) |
| 836 | (vc-resynch-buffer (vc-bzr-root default-directory) t t)) | 857 | (vc-resynch-buffer (vc-bzr-root default-directory) t t)) |
| 837 | 858 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 2da31448bed..0946148b9a6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -5,8 +5,68 @@ | |||
| 5 | `signal_after_change_p' to `coherent_change_p', and make the | 5 | `signal_after_change_p' to `coherent_change_p', and make the |
| 6 | invocation of `modify_region' conditional on it. | 6 | invocation of `modify_region' conditional on it. |
| 7 | 7 | ||
| 8 | 2010-01-06 David Reitter <david.reitter@gmail.com> | ||
| 9 | |||
| 10 | * nsfns.m (ns_get_screen): Rewrite, returning NULL for non-NS. | ||
| 11 | (Fns_display_usable_bounds): Rewrite, computing bounds properly | ||
| 12 | (Bug#3233). | ||
| 13 | |||
| 14 | 2010-01-06 Jan Djärv <jan.h.d@swipnet.se> | ||
| 15 | |||
| 16 | * font.c (font_open_entity): Enable chache and call cached_font_ok | ||
| 17 | for the driver if defined. | ||
| 18 | (QCuser_spec): New symbol. | ||
| 19 | (font_spec_from_name): Save name as user-spec. | ||
| 20 | (font_load_for_lface): Keep user-spec instead of name. | ||
| 21 | (font_open_by_name): Save name as user-spec. | ||
| 22 | (syms_of_font): Initialize QCuser_spec. | ||
| 23 | (font_clear_prop): Clear name if it exists in font (bug#5157). | ||
| 24 | |||
| 25 | * xftfont.c (xftfont_open): Call xftfont_add_rendering_parameters. | ||
| 26 | (xftfont_add_rendering_parameters, xftfont_cached_font_ok): New. | ||
| 27 | (syms_of_xftfont): Initialize xftfont_driver.cached_font_ok. | ||
| 28 | |||
| 29 | * font.h (struct font_driver): Add cached_font_ok. | ||
| 30 | |||
| 31 | * xterm.c (x_clear_frame): Queue draw for scroll bars. | ||
| 32 | |||
| 33 | 2010-01-05 Jan Djärv <jan.h.d@swipnet.se> | ||
| 34 | |||
| 35 | * xterm.c (x_new_font): Move code for setting rows/cols before | ||
| 36 | resizing ... | ||
| 37 | (x_set_window_size): ... to here. bug #2568. | ||
| 38 | |||
| 39 | * gtkutil.c (xg_clear_under_internal_border): New function. | ||
| 40 | (xg_frame_resized, xg_frame_set_char_size): Call | ||
| 41 | xg_clear_under_internal_border. | ||
| 42 | (xg_update_scrollbar_pos): Clear under old scroll bar position. | ||
| 43 | 2010-01-05 Chong Yidong <cyd@stupidchicken.com> | ||
| 44 | |||
| 45 | * keyboard.c (read_key_sequence): Catch keyboard switch after | ||
| 46 | making a new tty frame (Bug#5095). | ||
| 47 | |||
| 48 | 2010-01-05 Kenichi Handa <handa@m17n.org> | ||
| 49 | |||
| 50 | * fontset.c (fontset_find_font): Fix getting the frame pointer. | ||
| 51 | |||
| 52 | 2010-01-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 53 | |||
| 54 | * dbusbind.c (xd_remove_watch): Avoid trying to convert a void* to | ||
| 55 | Lisp_Object, preferring to convert a lisp_Object to a void* instead. | ||
| 56 | (Fdbus_init_bus): Use XHASH to get a scalar value from a Lisp_Object. | ||
| 57 | |||
| 58 | 2010-01-03 Michael Albinus <michael.albinus@gmx.de> | ||
| 59 | |||
| 60 | * dbusbind.c (xd_add_watch): Improve debug message. | ||
| 61 | (xd_remove_watch): Improve debug message. If DATA is the session | ||
| 62 | bus, unset D-Bus session environment. | ||
| 63 | (Fdbus_init_bus): Pass the bus as argument to | ||
| 64 | dbus_connection_set_watch_functions. (Bug#5283) | ||
| 65 | |||
| 8 | 2010-01-01 Chong Yidong <cyd@stupidchicken.com> | 66 | 2010-01-01 Chong Yidong <cyd@stupidchicken.com> |
| 9 | 67 | ||
| 68 | * nsterm.m (ns_get_color): Fix buffer overflow (Bug#4763). | ||
| 69 | |||
| 10 | * lread.c (syms_of_lread): Make it clearer that these are the | 70 | * lread.c (syms_of_lread): Make it clearer that these are the |
| 11 | names of loaded files (Bug#5068). | 71 | names of loaded files (Bug#5068). |
| 12 | 72 | ||
| @@ -149,7 +209,7 @@ | |||
| 149 | 2009-12-15 Michael Albinus <michael.albinus@gmx.de> | 209 | 2009-12-15 Michael Albinus <michael.albinus@gmx.de> |
| 150 | 210 | ||
| 151 | * dbusbind.c (xd_retrieve_arg): Reorder declarations in order to | 211 | * dbusbind.c (xd_retrieve_arg): Reorder declarations in order to |
| 152 | avoid compiler warnings. (Bug #5217). | 212 | avoid compiler warnings. (Bug #5217) |
| 153 | 213 | ||
| 154 | 2009-12-14 Kenichi Handa <handa@m17n.org> | 214 | 2009-12-14 Kenichi Handa <handa@m17n.org> |
| 155 | 215 | ||
| @@ -5324,7 +5384,7 @@ | |||
| 5324 | (XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros. Throw Qdbus_error. | 5384 | (XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros. Throw Qdbus_error. |
| 5325 | (xd_read_queued_messages): Catch Qdbus_error from the macros. | 5385 | (xd_read_queued_messages): Catch Qdbus_error from the macros. |
| 5326 | (all): Replace xsignal1, xsignal2, xsignal3 by the respective | 5386 | (all): Replace xsignal1, xsignal2, xsignal3 by the respective |
| 5327 | macro. (Bug#1186). | 5387 | macro. (Bug#1186) |
| 5328 | 5388 | ||
| 5329 | 2008-10-23 Ali Bahrami <ali_gnu@emvision.com> (tiny change) | 5389 | 2008-10-23 Ali Bahrami <ali_gnu@emvision.com> (tiny change) |
| 5330 | 5390 | ||
| @@ -21218,7 +21278,7 @@ See ChangeLog.10 for earlier changes. | |||
| 21218 | ;; add-log-time-zone-rule: t | 21278 | ;; add-log-time-zone-rule: t |
| 21219 | ;; End: | 21279 | ;; End: |
| 21220 | 21280 | ||
| 21221 | Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. | 21281 | Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
| 21222 | 21282 | ||
| 21223 | This file is part of GNU Emacs. | 21283 | This file is part of GNU Emacs. |
| 21224 | 21284 | ||
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/font.c b/src/font.c index 3a8f73a6b03..2141fe651c3 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -143,6 +143,8 @@ Lisp_Object Qc, Qm, Qp, Qd; | |||
| 143 | characters; used in xfont.c and ftfont.c. */ | 143 | characters; used in xfont.c and ftfont.c. */ |
| 144 | Lisp_Object Qja, Qko; | 144 | Lisp_Object Qja, Qko; |
| 145 | 145 | ||
| 146 | Lisp_Object QCuser_spec; | ||
| 147 | |||
| 146 | Lisp_Object Vfont_encoding_alist; | 148 | Lisp_Object Vfont_encoding_alist; |
| 147 | 149 | ||
| 148 | /* Alist of font registry symbol and the corresponding charsets | 150 | /* Alist of font registry symbol and the corresponding charsets |
| @@ -2989,16 +2991,6 @@ font_open_entity (f, entity, pixel_size) | |||
| 2989 | else if (CONSP (Vface_font_rescale_alist)) | 2991 | else if (CONSP (Vface_font_rescale_alist)) |
| 2990 | scaled_pixel_size = pixel_size * font_rescale_ratio (entity); | 2992 | scaled_pixel_size = pixel_size * font_rescale_ratio (entity); |
| 2991 | 2993 | ||
| 2992 | #if 0 | ||
| 2993 | /* This doesn't work if you have changed hinting or any other parameter. | ||
| 2994 | We need to make a new object in every case to be sure. */ | ||
| 2995 | for (objlist = AREF (entity, FONT_OBJLIST_INDEX); CONSP (objlist); | ||
| 2996 | objlist = XCDR (objlist)) | ||
| 2997 | if (! NILP (AREF (XCAR (objlist), FONT_TYPE_INDEX)) | ||
| 2998 | && XFONT_OBJECT (XCAR (objlist))->pixel_size == pixel_size) | ||
| 2999 | return XCAR (objlist); | ||
| 3000 | #endif | ||
| 3001 | |||
| 3002 | val = AREF (entity, FONT_TYPE_INDEX); | 2994 | val = AREF (entity, FONT_TYPE_INDEX); |
| 3003 | for (driver_list = f->font_driver_list; | 2995 | for (driver_list = f->font_driver_list; |
| 3004 | driver_list && ! EQ (driver_list->driver->type, val); | 2996 | driver_list && ! EQ (driver_list->driver->type, val); |
| @@ -3006,6 +2998,19 @@ font_open_entity (f, entity, pixel_size) | |||
| 3006 | if (! driver_list) | 2998 | if (! driver_list) |
| 3007 | return Qnil; | 2999 | return Qnil; |
| 3008 | 3000 | ||
| 3001 | for (objlist = AREF (entity, FONT_OBJLIST_INDEX); CONSP (objlist); | ||
| 3002 | objlist = XCDR (objlist)) | ||
| 3003 | { | ||
| 3004 | Lisp_Object fn = XCAR (objlist); | ||
| 3005 | if (! NILP (AREF (fn, FONT_TYPE_INDEX)) | ||
| 3006 | && XFONT_OBJECT (fn)->pixel_size == pixel_size) | ||
| 3007 | { | ||
| 3008 | if (driver_list->driver->cached_font_ok == NULL | ||
| 3009 | || driver_list->driver->cached_font_ok (f, fn, entity)) | ||
| 3010 | return fn; | ||
| 3011 | } | ||
| 3012 | } | ||
| 3013 | |||
| 3009 | font_object = driver_list->driver->open (f, entity, scaled_pixel_size); | 3014 | font_object = driver_list->driver->open (f, entity, scaled_pixel_size); |
| 3010 | if (!NILP (font_object)) | 3015 | if (!NILP (font_object)) |
| 3011 | ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size)); | 3016 | ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size)); |
| @@ -3161,6 +3166,7 @@ font_spec_from_name (font_name) | |||
| 3161 | if (font_parse_name ((char *) SDATA (font_name), spec) == -1) | 3166 | if (font_parse_name ((char *) SDATA (font_name), spec) == -1) |
| 3162 | return Qnil; | 3167 | return Qnil; |
| 3163 | font_put_extra (spec, QCname, font_name); | 3168 | font_put_extra (spec, QCname, font_name); |
| 3169 | font_put_extra (spec, QCuser_spec, font_name); | ||
| 3164 | return spec; | 3170 | return spec; |
| 3165 | } | 3171 | } |
| 3166 | 3172 | ||
| @@ -3174,14 +3180,13 @@ font_clear_prop (attrs, prop) | |||
| 3174 | 3180 | ||
| 3175 | if (! FONTP (font)) | 3181 | if (! FONTP (font)) |
| 3176 | return; | 3182 | return; |
| 3177 | #if 0 | 3183 | |
| 3178 | if (! NILP (Ffont_get (font, QCname))) | 3184 | if (! NILP (Ffont_get (font, QCname))) |
| 3179 | { | 3185 | { |
| 3180 | font = Fcopy_font_spec (font); | 3186 | font = Fcopy_font_spec (font); |
| 3181 | font_put_extra (font, QCname, Qnil); | 3187 | font_put_extra (font, QCname, Qnil); |
| 3182 | } | 3188 | } |
| 3183 | 3189 | ||
| 3184 | #endif | ||
| 3185 | if (NILP (AREF (font, prop)) | 3190 | if (NILP (AREF (font, prop)) |
| 3186 | && prop != FONT_FAMILY_INDEX | 3191 | && prop != FONT_FAMILY_INDEX |
| 3187 | && prop != FONT_FOUNDRY_INDEX | 3192 | && prop != FONT_FOUNDRY_INDEX |
| @@ -3539,8 +3544,8 @@ font_load_for_lface (f, attrs, spec) | |||
| 3539 | entity = font_open_for_lface (f, entity, attrs, spec); | 3544 | entity = font_open_for_lface (f, entity, attrs, spec); |
| 3540 | if (!NILP (entity)) | 3545 | if (!NILP (entity)) |
| 3541 | { | 3546 | { |
| 3542 | name = Ffont_get (spec, QCname); | 3547 | name = Ffont_get (spec, QCuser_spec); |
| 3543 | if (STRINGP (name)) font_put_extra (entity, QCname, name); | 3548 | if (STRINGP (name)) font_put_extra (entity, QCuser_spec, name); |
| 3544 | } | 3549 | } |
| 3545 | return entity; | 3550 | return entity; |
| 3546 | } | 3551 | } |
| @@ -3614,7 +3619,7 @@ font_open_by_name (f, name) | |||
| 3614 | ret = font_open_by_spec (f, spec); | 3619 | ret = font_open_by_spec (f, spec); |
| 3615 | /* Do not loose name originally put in. */ | 3620 | /* Do not loose name originally put in. */ |
| 3616 | if (!NILP (ret)) | 3621 | if (!NILP (ret)) |
| 3617 | font_put_extra (ret, QCname, args[1]); | 3622 | font_put_extra (ret, QCuser_spec, args[1]); |
| 3618 | 3623 | ||
| 3619 | return ret; | 3624 | return ret; |
| 3620 | } | 3625 | } |
| @@ -5269,6 +5274,8 @@ syms_of_font () | |||
| 5269 | DEFSYM (Qja, "ja"); | 5274 | DEFSYM (Qja, "ja"); |
| 5270 | DEFSYM (Qko, "ko"); | 5275 | DEFSYM (Qko, "ko"); |
| 5271 | 5276 | ||
| 5277 | DEFSYM (QCuser_spec, "user-spec"); | ||
| 5278 | |||
| 5272 | staticpro (&null_vector); | 5279 | staticpro (&null_vector); |
| 5273 | null_vector = Fmake_vector (make_number (0), Qnil); | 5280 | null_vector = Fmake_vector (make_number (0), Qnil); |
| 5274 | 5281 | ||
diff --git a/src/font.h b/src/font.h index 1a09df2558c..798676d546e 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -689,6 +689,14 @@ struct font_driver | |||
| 689 | int c, unsigned variations[256])); | 689 | int c, unsigned variations[256])); |
| 690 | 690 | ||
| 691 | void (*filter_properties) P_ ((Lisp_Object font, Lisp_Object properties)); | 691 | void (*filter_properties) P_ ((Lisp_Object font, Lisp_Object properties)); |
| 692 | |||
| 693 | /* Optional. | ||
| 694 | |||
| 695 | Return non-zero if FONT_OBJECT can be used as a (cached) font | ||
| 696 | for ENTITY on frame F. */ | ||
| 697 | int (*cached_font_ok) P_ ((struct frame *f, | ||
| 698 | Lisp_Object font_object, | ||
| 699 | Lisp_Object entity)); | ||
| 692 | }; | 700 | }; |
| 693 | 701 | ||
| 694 | 702 | ||
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/gtkutil.c b/src/gtkutil.c index cd9c930c7c2..1dab467a0ac 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -568,6 +568,42 @@ xg_set_geometry (f) | |||
| 568 | f->left_pos, f->top_pos); | 568 | f->left_pos, f->top_pos); |
| 569 | } | 569 | } |
| 570 | 570 | ||
| 571 | /* Clear under internal border if any. As we use a mix of Gtk+ and X calls | ||
| 572 | and use a GtkFixed widget, this doesn't happen automatically. */ | ||
| 573 | |||
| 574 | static void | ||
| 575 | xg_clear_under_internal_border (f) | ||
| 576 | FRAME_PTR f; | ||
| 577 | { | ||
| 578 | if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0) | ||
| 579 | { | ||
| 580 | GtkWidget *wfixed = f->output_data.x->edit_widget; | ||
| 581 | gtk_widget_queue_draw (wfixed); | ||
| 582 | gdk_window_process_all_updates (); | ||
| 583 | x_clear_area (FRAME_X_DISPLAY (f), | ||
| 584 | FRAME_X_WINDOW (f), | ||
| 585 | 0, 0, | ||
| 586 | FRAME_PIXEL_WIDTH (f), | ||
| 587 | FRAME_INTERNAL_BORDER_WIDTH (f), 0); | ||
| 588 | x_clear_area (FRAME_X_DISPLAY (f), | ||
| 589 | FRAME_X_WINDOW (f), | ||
| 590 | 0, 0, | ||
| 591 | FRAME_INTERNAL_BORDER_WIDTH (f), | ||
| 592 | FRAME_PIXEL_HEIGHT (f), 0); | ||
| 593 | x_clear_area (FRAME_X_DISPLAY (f), | ||
| 594 | FRAME_X_WINDOW (f), | ||
| 595 | 0, FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f), | ||
| 596 | FRAME_PIXEL_WIDTH (f), | ||
| 597 | FRAME_INTERNAL_BORDER_WIDTH (f), 0); | ||
| 598 | x_clear_area (FRAME_X_DISPLAY (f), | ||
| 599 | FRAME_X_WINDOW (f), | ||
| 600 | FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f), | ||
| 601 | 0, | ||
| 602 | FRAME_INTERNAL_BORDER_WIDTH (f), | ||
| 603 | FRAME_PIXEL_HEIGHT (f), 0); | ||
| 604 | } | ||
| 605 | } | ||
| 606 | |||
| 571 | /* Function to handle resize of our frame. As we have a Gtk+ tool bar | 607 | /* Function to handle resize of our frame. As we have a Gtk+ tool bar |
| 572 | and a Gtk+ menu bar, we get resize events for the edit part of the | 608 | and a Gtk+ menu bar, we get resize events for the edit part of the |
| 573 | frame only. We let Gtk+ deal with the Gtk+ parts. | 609 | frame only. We let Gtk+ deal with the Gtk+ parts. |
| @@ -584,8 +620,8 @@ xg_frame_resized (f, pixelwidth, pixelheight) | |||
| 584 | if (pixelwidth == -1 && pixelheight == -1) | 620 | if (pixelwidth == -1 && pixelheight == -1) |
| 585 | { | 621 | { |
| 586 | if (FRAME_GTK_WIDGET (f) && GTK_WIDGET_MAPPED (FRAME_GTK_WIDGET (f))) | 622 | if (FRAME_GTK_WIDGET (f) && GTK_WIDGET_MAPPED (FRAME_GTK_WIDGET (f))) |
| 587 | gdk_window_get_geometry(FRAME_GTK_WIDGET (f)->window, 0, 0, | 623 | gdk_window_get_geometry (FRAME_GTK_WIDGET (f)->window, 0, 0, |
| 588 | &pixelwidth, &pixelheight, 0); | 624 | &pixelwidth, &pixelheight, 0); |
| 589 | else return; | 625 | else return; |
| 590 | } | 626 | } |
| 591 | 627 | ||
| @@ -601,6 +637,7 @@ xg_frame_resized (f, pixelwidth, pixelheight) | |||
| 601 | FRAME_PIXEL_WIDTH (f) = pixelwidth; | 637 | FRAME_PIXEL_WIDTH (f) = pixelwidth; |
| 602 | FRAME_PIXEL_HEIGHT (f) = pixelheight; | 638 | FRAME_PIXEL_HEIGHT (f) = pixelheight; |
| 603 | 639 | ||
| 640 | xg_clear_under_internal_border (f); | ||
| 604 | change_frame_size (f, rows, columns, 0, 1, 0); | 641 | change_frame_size (f, rows, columns, 0, 1, 0); |
| 605 | SET_FRAME_GARBAGED (f); | 642 | SET_FRAME_GARBAGED (f); |
| 606 | cancel_mouse_face (f); | 643 | cancel_mouse_face (f); |
| @@ -637,6 +674,10 @@ xg_frame_set_char_size (f, cols, rows) | |||
| 637 | after calculating that value. */ | 674 | after calculating that value. */ |
| 638 | pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols); | 675 | pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols); |
| 639 | 676 | ||
| 677 | |||
| 678 | /* Do this before resize, as we don't know yet if we will be resized. */ | ||
| 679 | xg_clear_under_internal_border (f); | ||
| 680 | |||
| 640 | /* Must resize our top level widget. Font size may have changed, | 681 | /* Must resize our top level widget. Font size may have changed, |
| 641 | but not rows/cols. */ | 682 | but not rows/cols. */ |
| 642 | gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), | 683 | gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), |
| @@ -3201,15 +3242,43 @@ xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height) | |||
| 3201 | { | 3242 | { |
| 3202 | GtkWidget *wfixed = f->output_data.x->edit_widget; | 3243 | GtkWidget *wfixed = f->output_data.x->edit_widget; |
| 3203 | GtkWidget *wparent = gtk_widget_get_parent (wscroll); | 3244 | GtkWidget *wparent = gtk_widget_get_parent (wscroll); |
| 3245 | GtkFixed *wf = GTK_FIXED (wfixed); | ||
| 3246 | |||
| 3247 | /* Clear out old position. */ | ||
| 3248 | GList *iter; | ||
| 3249 | int oldx = -1, oldy = -1, oldw, oldh; | ||
| 3250 | for (iter = wf->children; iter; iter = iter->next) | ||
| 3251 | if (((GtkFixedChild *)iter->data)->widget == wparent) | ||
| 3252 | { | ||
| 3253 | GtkFixedChild *ch = (GtkFixedChild *)iter->data; | ||
| 3254 | if (ch->x != left || ch->y != top) | ||
| 3255 | { | ||
| 3256 | oldx = ch->x; | ||
| 3257 | oldy = ch->y; | ||
| 3258 | gtk_widget_get_size_request (wscroll, &oldw, &oldh); | ||
| 3259 | } | ||
| 3260 | break; | ||
| 3261 | } | ||
| 3204 | 3262 | ||
| 3205 | /* Move and resize to new values. */ | 3263 | /* Move and resize to new values. */ |
| 3206 | gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top); | 3264 | gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top); |
| 3207 | gtk_widget_set_size_request (wscroll, width, height); | 3265 | gtk_widget_set_size_request (wscroll, width, height); |
| 3208 | gtk_widget_queue_draw (wparent); | 3266 | gtk_widget_queue_draw (wfixed); |
| 3209 | gdk_window_process_all_updates (); | 3267 | gdk_window_process_all_updates (); |
| 3268 | if (oldx != -1) | ||
| 3269 | { | ||
| 3270 | /* Clear under old scroll bar position. This must be done after | ||
| 3271 | the gtk_widget_queue_draw and gdk_window_process_all_updates | ||
| 3272 | above. */ | ||
| 3273 | x_clear_area (FRAME_X_DISPLAY (f), | ||
| 3274 | FRAME_X_WINDOW (f), | ||
| 3275 | oldx, oldy, oldw, oldh, 0); | ||
| 3276 | } | ||
| 3277 | |||
| 3210 | /* GTK does not redraw until the main loop is entered again, but | 3278 | /* GTK does not redraw until the main loop is entered again, but |
| 3211 | if there are no X events pending we will not enter it. So we sync | 3279 | if there are no X events pending we will not enter it. So we sync |
| 3212 | here to get some events. */ | 3280 | here to get some events. */ |
| 3281 | |||
| 3213 | x_sync (f); | 3282 | x_sync (f); |
| 3214 | SET_FRAME_GARBAGED (f); | 3283 | SET_FRAME_GARBAGED (f); |
| 3215 | cancel_mouse_face (f); | 3284 | cancel_mouse_face (f); |
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; |
diff --git a/src/nsfns.m b/src/nsfns.m index 642ff794c05..08564c7216c 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -206,30 +206,28 @@ ns_get_window (Lisp_Object maybeFrame) | |||
| 206 | static NSScreen * | 206 | static NSScreen * |
| 207 | ns_get_screen (Lisp_Object screen) | 207 | ns_get_screen (Lisp_Object screen) |
| 208 | { | 208 | { |
| 209 | struct terminal *terminal = get_terminal (screen, 1); | 209 | struct frame *f; |
| 210 | struct terminal *terminal; | ||
| 211 | |||
| 212 | if (EQ (Qt, screen)) /* not documented */ | ||
| 213 | return [NSScreen mainScreen]; | ||
| 214 | |||
| 215 | terminal = get_terminal (screen, 1); | ||
| 210 | if (terminal->type != output_ns) | 216 | if (terminal->type != output_ns) |
| 211 | // Not sure if this special case for nil is needed. It does seem to be | 217 | return NULL; |
| 212 | // important in xfns.c for the make-frame call in frame-initialize, | 218 | |
| 213 | // so let's keep it here for now. | 219 | if (NILP (screen)) |
| 214 | return (NILP (screen) ? [NSScreen mainScreen] : NULL); | 220 | f = SELECTED_FRAME (); |
| 221 | else if (FRAMEP (screen)) | ||
| 222 | f = XFRAME (screen); | ||
| 215 | else | 223 | else |
| 216 | { | 224 | { |
| 217 | struct ns_display_info *dpyinfo = terminal->display_info.ns; | 225 | struct ns_display_info *dpyinfo = terminal->display_info.ns; |
| 218 | struct frame *f = dpyinfo->x_focus_frame; | 226 | f = (dpyinfo->x_focus_frame || dpyinfo->x_highlight_frame); |
| 219 | if (!f) | ||
| 220 | f = dpyinfo->x_highlight_frame; | ||
| 221 | if (!f) | ||
| 222 | return NULL; | ||
| 223 | else | ||
| 224 | { | ||
| 225 | id window = nil; | ||
| 226 | Lisp_Object frame; | ||
| 227 | eassert (FRAME_NS_P (f)); | ||
| 228 | XSETFRAME (frame, f); | ||
| 229 | window = ns_get_window (frame); | ||
| 230 | return window ? [window screen] : NULL; | ||
| 231 | } | ||
| 232 | } | 227 | } |
| 228 | |||
| 229 | return ((f && FRAME_NS_P (f)) ? [[FRAME_NS_VIEW (f) window] screen] | ||
| 230 | : NULL); | ||
| 233 | } | 231 | } |
| 234 | 232 | ||
| 235 | 233 | ||
| @@ -2325,15 +2323,21 @@ that stands for the selected frame's display. */) | |||
| 2325 | Lisp_Object display; | 2323 | Lisp_Object display; |
| 2326 | { | 2324 | { |
| 2327 | int top; | 2325 | int top; |
| 2326 | NSScreen *screen; | ||
| 2328 | NSRect vScreen; | 2327 | NSRect vScreen; |
| 2329 | 2328 | ||
| 2330 | check_ns (); | 2329 | check_ns (); |
| 2331 | vScreen = [ns_get_screen (display) visibleFrame]; | 2330 | screen = ns_get_screen (display); |
| 2332 | top = vScreen.origin.y == 0.0 ? | 2331 | if (!screen) |
| 2333 | (int) [ns_get_screen (display) frame].size.height - vScreen.size.height : 0; | 2332 | return Qnil; |
| 2333 | |||
| 2334 | vScreen = [screen visibleFrame]; | ||
| 2334 | 2335 | ||
| 2336 | /* NS coordinate system is upside-down. | ||
| 2337 | Transform to screen-specific coordinates. */ | ||
| 2335 | return list4 (make_number ((int) vScreen.origin.x), | 2338 | return list4 (make_number ((int) vScreen.origin.x), |
| 2336 | make_number (top), | 2339 | make_number ((int) [screen frame].size.height |
| 2340 | - vScreen.size.height - vScreen.origin.y), | ||
| 2337 | make_number ((int) vScreen.size.width), | 2341 | make_number ((int) vScreen.size.width), |
| 2338 | make_number ((int) vScreen.size.height)); | 2342 | make_number ((int) vScreen.size.height)); |
| 2339 | } | 2343 | } |
diff --git a/src/nsterm.m b/src/nsterm.m index 9256c084e28..2eebbf86643 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -1346,7 +1346,8 @@ ns_get_color (const char *name, NSColor **col) | |||
| 1346 | } | 1346 | } |
| 1347 | else if (!strncmp(name, "rgb:", 4)) /* A newer X11 format -- rgb:r/g/b */ | 1347 | else if (!strncmp(name, "rgb:", 4)) /* A newer X11 format -- rgb:r/g/b */ |
| 1348 | { | 1348 | { |
| 1349 | strcpy(hex, name + 4); | 1349 | strncpy (hex, name + 4, 19); |
| 1350 | hex[19] = '\0'; | ||
| 1350 | scaling = (strlen(hex) - 2) / 3; | 1351 | scaling = (strlen(hex) - 2) / 3; |
| 1351 | } | 1352 | } |
| 1352 | else if (name[0] == '#') /* An old X11 format; convert to newer */ | 1353 | else if (name[0] == '#') /* An old X11 format; convert to newer */ |
diff --git a/src/xftfont.c b/src/xftfont.c index 82701ce0afe..26294ff16a6 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -237,6 +237,56 @@ xftfont_fix_match (pat, match) | |||
| 237 | } | 237 | } |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | static void | ||
| 241 | xftfont_add_rendering_parameters (pat, entity) | ||
| 242 | FcPattern *pat; | ||
| 243 | Lisp_Object entity; | ||
| 244 | { | ||
| 245 | Lisp_Object tail; | ||
| 246 | int ival; | ||
| 247 | |||
| 248 | for (tail = AREF (entity, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR (tail)) | ||
| 249 | { | ||
| 250 | Lisp_Object key = XCAR (XCAR (tail)); | ||
| 251 | Lisp_Object val = XCDR (XCAR (tail)); | ||
| 252 | |||
| 253 | if (EQ (key, QCantialias)) | ||
| 254 | FcPatternAddBool (pat, FC_ANTIALIAS, NILP (val) ? FcFalse : FcTrue); | ||
| 255 | else if (EQ (key, QChinting)) | ||
| 256 | FcPatternAddBool (pat, FC_HINTING, NILP (val) ? FcFalse : FcTrue); | ||
| 257 | else if (EQ (key, QCautohint)) | ||
| 258 | FcPatternAddBool (pat, FC_AUTOHINT, NILP (val) ? FcFalse : FcTrue); | ||
| 259 | else if (EQ (key, QChintstyle)) | ||
| 260 | { | ||
| 261 | if (INTEGERP (val)) | ||
| 262 | FcPatternAddInteger (pat, FC_HINT_STYLE, XINT (val)); | ||
| 263 | else if (SYMBOLP (val) | ||
| 264 | && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival)) | ||
| 265 | FcPatternAddInteger (pat, FC_HINT_STYLE, ival); | ||
| 266 | } | ||
| 267 | else if (EQ (key, QCrgba)) | ||
| 268 | { | ||
| 269 | if (INTEGERP (val)) | ||
| 270 | FcPatternAddInteger (pat, FC_RGBA, XINT (val)); | ||
| 271 | else if (SYMBOLP (val) | ||
| 272 | && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival)) | ||
| 273 | FcPatternAddInteger (pat, FC_RGBA, ival); | ||
| 274 | } | ||
| 275 | else if (EQ (key, QClcdfilter)) | ||
| 276 | { | ||
| 277 | if (INTEGERP (val)) | ||
| 278 | FcPatternAddInteger (pat, FC_LCD_FILTER, ival = XINT (val)); | ||
| 279 | else if (SYMBOLP (val) | ||
| 280 | && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival)) | ||
| 281 | FcPatternAddInteger (pat, FC_LCD_FILTER, ival); | ||
| 282 | } | ||
| 283 | #ifdef FC_EMBOLDEN | ||
| 284 | else if (EQ (key, QCembolden)) | ||
| 285 | FcPatternAddBool (pat, FC_EMBOLDEN, NILP (val) ? FcFalse : FcTrue); | ||
| 286 | #endif | ||
| 287 | } | ||
| 288 | } | ||
| 289 | |||
| 240 | static Lisp_Object | 290 | static Lisp_Object |
| 241 | xftfont_open (f, entity, pixel_size) | 291 | xftfont_open (f, entity, pixel_size) |
| 242 | FRAME_PTR f; | 292 | FRAME_PTR f; |
| @@ -245,7 +295,7 @@ xftfont_open (f, entity, pixel_size) | |||
| 245 | { | 295 | { |
| 246 | FcResult result; | 296 | FcResult result; |
| 247 | Display *display = FRAME_X_DISPLAY (f); | 297 | Display *display = FRAME_X_DISPLAY (f); |
| 248 | Lisp_Object val, filename, index, tail, font_object; | 298 | Lisp_Object val, filename, index, font_object; |
| 249 | FcPattern *pat = NULL, *match; | 299 | FcPattern *pat = NULL, *match; |
| 250 | struct xftfont_info *xftfont_info = NULL; | 300 | struct xftfont_info *xftfont_info = NULL; |
| 251 | struct font *font; | 301 | struct font *font; |
| @@ -253,7 +303,7 @@ xftfont_open (f, entity, pixel_size) | |||
| 253 | XftFont *xftfont = NULL; | 303 | XftFont *xftfont = NULL; |
| 254 | int spacing; | 304 | int spacing; |
| 255 | char name[256]; | 305 | char name[256]; |
| 256 | int len, i, ival; | 306 | int len, i; |
| 257 | XGlyphInfo extents; | 307 | XGlyphInfo extents; |
| 258 | FT_Face ft_face; | 308 | FT_Face ft_face; |
| 259 | FcMatrix *matrix; | 309 | FcMatrix *matrix; |
| @@ -297,46 +347,7 @@ xftfont_open (f, entity, pixel_size) | |||
| 297 | over 10x20-ISO8859-1.pcf.gz). */ | 347 | over 10x20-ISO8859-1.pcf.gz). */ |
| 298 | FcPatternAddCharSet (pat, FC_CHARSET, ftfont_get_fc_charset (entity)); | 348 | FcPatternAddCharSet (pat, FC_CHARSET, ftfont_get_fc_charset (entity)); |
| 299 | 349 | ||
| 300 | for (tail = AREF (entity, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR (tail)) | 350 | xftfont_add_rendering_parameters (pat, entity); |
| 301 | { | ||
| 302 | Lisp_Object key, val; | ||
| 303 | |||
| 304 | key = XCAR (XCAR (tail)), val = XCDR (XCAR (tail)); | ||
| 305 | if (EQ (key, QCantialias)) | ||
| 306 | FcPatternAddBool (pat, FC_ANTIALIAS, NILP (val) ? FcFalse : FcTrue); | ||
| 307 | else if (EQ (key, QChinting)) | ||
| 308 | FcPatternAddBool (pat, FC_HINTING, NILP (val) ? FcFalse : FcTrue); | ||
| 309 | else if (EQ (key, QCautohint)) | ||
| 310 | FcPatternAddBool (pat, FC_AUTOHINT, NILP (val) ? FcFalse : FcTrue); | ||
| 311 | else if (EQ (key, QChintstyle)) | ||
| 312 | { | ||
| 313 | if (INTEGERP (val)) | ||
| 314 | FcPatternAddInteger (pat, FC_HINT_STYLE, XINT (val)); | ||
| 315 | else if (SYMBOLP (val) | ||
| 316 | && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival)) | ||
| 317 | FcPatternAddInteger (pat, FC_HINT_STYLE, ival); | ||
| 318 | } | ||
| 319 | else if (EQ (key, QCrgba)) | ||
| 320 | { | ||
| 321 | if (INTEGERP (val)) | ||
| 322 | FcPatternAddInteger (pat, FC_RGBA, XINT (val)); | ||
| 323 | else if (SYMBOLP (val) | ||
| 324 | && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival)) | ||
| 325 | FcPatternAddInteger (pat, FC_RGBA, ival); | ||
| 326 | } | ||
| 327 | else if (EQ (key, QClcdfilter)) | ||
| 328 | { | ||
| 329 | if (INTEGERP (val)) | ||
| 330 | FcPatternAddInteger (pat, FC_LCD_FILTER, ival = XINT (val)); | ||
| 331 | else if (SYMBOLP (val) | ||
| 332 | && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival)) | ||
| 333 | FcPatternAddInteger (pat, FC_LCD_FILTER, ival); | ||
| 334 | } | ||
| 335 | #ifdef FC_EMBOLDEN | ||
| 336 | else if (EQ (key, QCembolden)) | ||
| 337 | FcPatternAddBool (pat, FC_EMBOLDEN, NILP (val) ? FcFalse : FcTrue); | ||
| 338 | #endif | ||
| 339 | } | ||
| 340 | 351 | ||
| 341 | FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename)); | 352 | FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename)); |
| 342 | FcPatternAddInteger (pat, FC_INDEX, XINT (index)); | 353 | FcPatternAddInteger (pat, FC_INDEX, XINT (index)); |
| @@ -712,6 +723,53 @@ xftfont_end_for_frame (f) | |||
| 712 | return 0; | 723 | return 0; |
| 713 | } | 724 | } |
| 714 | 725 | ||
| 726 | static int | ||
| 727 | xftfont_cached_font_ok (f, font_object, entity) | ||
| 728 | struct frame *f; | ||
| 729 | Lisp_Object font_object; | ||
| 730 | Lisp_Object entity; | ||
| 731 | |||
| 732 | { | ||
| 733 | struct xftfont_info *info = (struct xftfont_info *) XFONT_OBJECT (font_object); | ||
| 734 | FcPattern *oldpat = info->xftfont->pattern; | ||
| 735 | Display *display = FRAME_X_DISPLAY (f); | ||
| 736 | FcPattern *pat = FcPatternCreate (); | ||
| 737 | FcBool b1, b2; | ||
| 738 | int ok = 0, i1, i2, r1, r2; | ||
| 739 | |||
| 740 | xftfont_add_rendering_parameters (pat, entity); | ||
| 741 | XftDefaultSubstitute (display, FRAME_X_SCREEN_NUMBER (f), pat); | ||
| 742 | |||
| 743 | r1 = FcPatternGetBool (pat, FC_ANTIALIAS, 0, &b1); | ||
| 744 | r2 = FcPatternGetBool (oldpat, FC_ANTIALIAS, 0, &b2); | ||
| 745 | if (r1 != r2 || b1 != b2) goto out; | ||
| 746 | r1 = FcPatternGetBool (pat, FC_HINTING, 0, &b1); | ||
| 747 | r2 = FcPatternGetBool (oldpat, FC_HINTING, 0, &b2); | ||
| 748 | if (r1 != r2 || b1 != b2) goto out; | ||
| 749 | r1 = FcPatternGetBool (pat, FC_AUTOHINT, 0, &b1); | ||
| 750 | r2 = FcPatternGetBool (oldpat, FC_AUTOHINT, 0, &b2); | ||
| 751 | if (r1 != r2 || b1 != b2) goto out; | ||
| 752 | #ifdef FC_EMBOLDEN | ||
| 753 | r1 = FcPatternGetBool (pat, FC_EMBOLDEN, 0, &b1); | ||
| 754 | r2 = FcPatternGetBool (oldpat, FC_EMBOLDEN, 0, &b2); | ||
| 755 | if (r1 != r2 || b1 != b2) goto out; | ||
| 756 | #endif | ||
| 757 | r1 = FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &i1); | ||
| 758 | r2 = FcPatternGetInteger (oldpat, FC_HINT_STYLE, 0, &i2); | ||
| 759 | if (r1 != r2 || i1 != i2) goto out; | ||
| 760 | r1 = FcPatternGetInteger (pat, FC_LCD_FILTER, 0, &i1); | ||
| 761 | r2 = FcPatternGetInteger (oldpat, FC_LCD_FILTER, 0, &i2); | ||
| 762 | if (r1 != r2 || i1 != i2) goto out; | ||
| 763 | r1 = FcPatternGetInteger (pat, FC_RGBA, 0, &i1); | ||
| 764 | r2 = FcPatternGetInteger (oldpat, FC_RGBA, 0, &i2); | ||
| 765 | if (r1 != r2 || i1 != i2) goto out; | ||
| 766 | |||
| 767 | ok = 1; | ||
| 768 | out: | ||
| 769 | FcPatternDestroy (pat); | ||
| 770 | return ok; | ||
| 771 | } | ||
| 772 | |||
| 715 | void | 773 | void |
| 716 | syms_of_xftfont () | 774 | syms_of_xftfont () |
| 717 | { | 775 | { |
| @@ -737,6 +795,7 @@ syms_of_xftfont () | |||
| 737 | xftfont_driver.text_extents = xftfont_text_extents; | 795 | xftfont_driver.text_extents = xftfont_text_extents; |
| 738 | xftfont_driver.draw = xftfont_draw; | 796 | xftfont_driver.draw = xftfont_draw; |
| 739 | xftfont_driver.end_for_frame = xftfont_end_for_frame; | 797 | xftfont_driver.end_for_frame = xftfont_end_for_frame; |
| 798 | xftfont_driver.cached_font_ok = xftfont_cached_font_ok; | ||
| 740 | 799 | ||
| 741 | register_font_driver (&xftfont_driver, NULL); | 800 | register_font_driver (&xftfont_driver, NULL); |
| 742 | } | 801 | } |
diff --git a/src/xterm.c b/src/xterm.c index 7f9f6f3c05e..efd30f4a601 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2951,6 +2951,12 @@ x_clear_frame (struct frame *f) | |||
| 2951 | colors or something like that, then they should be notified. */ | 2951 | colors or something like that, then they should be notified. */ |
| 2952 | x_scroll_bar_clear (f); | 2952 | x_scroll_bar_clear (f); |
| 2953 | 2953 | ||
| 2954 | #if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS) | ||
| 2955 | /* Make sure scroll bars are redrawn. As they aren't redrawn by | ||
| 2956 | redisplay, do it here. */ | ||
| 2957 | gtk_widget_queue_draw (FRAME_GTK_WIDGET (f)); | ||
| 2958 | #endif | ||
| 2959 | |||
| 2954 | XFlush (FRAME_X_DISPLAY (f)); | 2960 | XFlush (FRAME_X_DISPLAY (f)); |
| 2955 | 2961 | ||
| 2956 | UNBLOCK_INPUT; | 2962 | UNBLOCK_INPUT; |
| @@ -8064,32 +8070,7 @@ x_new_font (f, font_object, fontset) | |||
| 8064 | doing it because it's done in Fx_show_tip, and it leads to | 8070 | doing it because it's done in Fx_show_tip, and it leads to |
| 8065 | problems because the tip frame has no widget. */ | 8071 | problems because the tip frame has no widget. */ |
| 8066 | if (NILP (tip_frame) || XFRAME (tip_frame) != f) | 8072 | if (NILP (tip_frame) || XFRAME (tip_frame) != f) |
| 8067 | { | 8073 | x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); |
| 8068 | int rows, cols; | ||
| 8069 | |||
| 8070 | /* When the frame is maximized/fullscreen or running under for | ||
| 8071 | example Xmonad, x_set_window_size will be a no-op. | ||
| 8072 | In that case, the right thing to do is extend rows/cols to | ||
| 8073 | the current frame size. We do that first if x_set_window_size | ||
| 8074 | turns out to not be a no-op (there is no way to know). | ||
| 8075 | The size will be adjusted again if the frame gets a | ||
| 8076 | ConfigureNotify event as a result of x_set_window_size. */ | ||
| 8077 | int pixelh = FRAME_PIXEL_HEIGHT (f); | ||
| 8078 | #ifdef USE_X_TOOLKIT | ||
| 8079 | /* The menu bar is not part of text lines. The tool bar | ||
| 8080 | is however. */ | ||
| 8081 | pixelh -= FRAME_MENUBAR_HEIGHT (f); | ||
| 8082 | #endif | ||
| 8083 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelh); | ||
| 8084 | /* Update f->scroll_bar_actual_width because it is used in | ||
| 8085 | FRAME_PIXEL_WIDTH_TO_TEXT_COLS. */ | ||
| 8086 | f->scroll_bar_actual_width | ||
| 8087 | = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f); | ||
| 8088 | cols = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, FRAME_PIXEL_WIDTH (f)); | ||
| 8089 | |||
| 8090 | change_frame_size (f, rows, cols, 0, 1, 0); | ||
| 8091 | x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f)); | ||
| 8092 | } | ||
| 8093 | } | 8074 | } |
| 8094 | 8075 | ||
| 8095 | #ifdef HAVE_X_I18N | 8076 | #ifdef HAVE_X_I18N |
| @@ -8977,6 +8958,32 @@ x_set_window_size (f, change_gravity, cols, rows) | |||
| 8977 | { | 8958 | { |
| 8978 | BLOCK_INPUT; | 8959 | BLOCK_INPUT; |
| 8979 | 8960 | ||
| 8961 | if (NILP (tip_frame) || XFRAME (tip_frame) != f) | ||
| 8962 | { | ||
| 8963 | int r, c; | ||
| 8964 | |||
| 8965 | /* When the frame is maximized/fullscreen or running under for | ||
| 8966 | example Xmonad, x_set_window_size_1 will be a no-op. | ||
| 8967 | In that case, the right thing to do is extend rows/cols to | ||
| 8968 | the current frame size. We do that first if x_set_window_size_1 | ||
| 8969 | turns out to not be a no-op (there is no way to know). | ||
| 8970 | The size will be adjusted again if the frame gets a | ||
| 8971 | ConfigureNotify event as a result of x_set_window_size. */ | ||
| 8972 | int pixelh = FRAME_PIXEL_HEIGHT (f); | ||
| 8973 | #ifdef USE_X_TOOLKIT | ||
| 8974 | /* The menu bar is not part of text lines. The tool bar | ||
| 8975 | is however. */ | ||
| 8976 | pixelh -= FRAME_MENUBAR_HEIGHT (f); | ||
| 8977 | #endif | ||
| 8978 | r = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelh); | ||
| 8979 | /* Update f->scroll_bar_actual_width because it is used in | ||
| 8980 | FRAME_PIXEL_WIDTH_TO_TEXT_COLS. */ | ||
| 8981 | f->scroll_bar_actual_width | ||
| 8982 | = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f); | ||
| 8983 | c = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, FRAME_PIXEL_WIDTH (f)); | ||
| 8984 | change_frame_size (f, r, c, 0, 1, 0); | ||
| 8985 | } | ||
| 8986 | |||
| 8980 | #ifdef USE_GTK | 8987 | #ifdef USE_GTK |
| 8981 | if (FRAME_GTK_WIDGET (f)) | 8988 | if (FRAME_GTK_WIDGET (f)) |
| 8982 | xg_frame_set_char_size (f, cols, rows); | 8989 | xg_frame_set_char_size (f, cols, rows); |