diff options
| author | Paul Eggert | 2011-08-24 14:20:36 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-08-24 14:20:36 -0700 |
| commit | 011ba6eaacfa50cc9871d0cfea34e8f0a7a5bc43 (patch) | |
| tree | ced7a98ff1eb289559da6ebfda46a8e436640da6 | |
| parent | fe4496a6e27ac892283b8568adbd12831868cc54 (diff) | |
| parent | f22f4808a08e8f985d5e6175bbd13d5260e1ab1a (diff) | |
| download | emacs-011ba6eaacfa50cc9871d0cfea34e8f0a7a5bc43.tar.gz emacs-011ba6eaacfa50cc9871d0cfea34e8f0a7a5bc43.zip | |
Merge from trunk.
84 files changed, 1307 insertions, 556 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index bc38edfc8d4..17cbcbb3bdf 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2011-08-23 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * unidata/unidata-gen.el (unidata-prop-alist): Update the default | ||
| 4 | values of bidi-class according to DerivedBidiClass.txt from the | ||
| 5 | latest UCD. | ||
| 6 | |||
| 7 | 2011-08-23 Kenichi Handa <handa@m17n.org> | ||
| 8 | |||
| 9 | * unidata/unidata-gen.el (unidata-prop-alist): Provide default | ||
| 10 | values for name, general-category, canonical-combining-class, | ||
| 11 | mirrored, and bidi-class. Describe the meaning of value nil for | ||
| 12 | decimal-digit-value, digit-value, numeric-value, uppercase, | ||
| 13 | lowercase, titlecase, and mirroring. | ||
| 14 | (unidata-gen-table): Handle the case that default-value is a | ||
| 15 | list. Set default values of characters not listed in a table. | ||
| 16 | (unidata-get-name): Return an empty string if a value in a | ||
| 17 | char-table is nil. | ||
| 18 | (unidata-get-decomposition): Return a list of character itself if | ||
| 19 | a value in a char-table is nil. | ||
| 20 | |||
| 1 | 2011-08-15 Eli Zaretskii <eliz@gnu.org> | 21 | 2011-08-15 Eli Zaretskii <eliz@gnu.org> |
| 2 | 22 | ||
| 3 | * unidata/bidimirror.awk: File removed. | 23 | * unidata/bidimirror.awk: File removed. |
diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el index ab1dcd134ac..1002bb003af 100644 --- a/admin/unidata/unidata-gen.el +++ b/admin/unidata/unidata-gen.el | |||
| @@ -146,7 +146,7 @@ | |||
| 146 | (setq unidata-list (cdr table)))) | 146 | (setq unidata-list (cdr table)))) |
| 147 | 147 | ||
| 148 | ;; Alist of this form: | 148 | ;; Alist of this form: |
| 149 | ;; (PROP INDEX GENERATOR FILENAME DOCSTRING DESCRIBER VAL-LIST) | 149 | ;; (PROP INDEX GENERATOR FILENAME DOCSTRING DESCRIBER DEFAULT VAL-LIST) |
| 150 | ;; PROP: character property | 150 | ;; PROP: character property |
| 151 | ;; INDEX: index to each element of unidata-list for PROP. | 151 | ;; INDEX: index to each element of unidata-list for PROP. |
| 152 | ;; It may be a function that generates an alist of character codes | 152 | ;; It may be a function that generates an alist of character codes |
| @@ -155,14 +155,20 @@ | |||
| 155 | ;; FILENAME: filename to store the char-table | 155 | ;; FILENAME: filename to store the char-table |
| 156 | ;; DOCSTRING: docstring for the property | 156 | ;; DOCSTRING: docstring for the property |
| 157 | ;; DESCRIBER: function to call to get a description string of property value | 157 | ;; DESCRIBER: function to call to get a description string of property value |
| 158 | ;; DEFAULT: the default value of the property | 158 | ;; DEFAULT: the default value of the property. It may have the form |
| 159 | ;; (VAL0 (FROM1 TO1 VAL1) ...) which indicates that the default | ||
| 160 | ;; value is VAL0 except for characters in the ranges specified by | ||
| 161 | ;; FROMn and TOn (incusive). The default value of characters | ||
| 162 | ;; between FROMn and TOn is VALn. | ||
| 159 | ;; VAL-LIST: list of specially ordered property values | 163 | ;; VAL-LIST: list of specially ordered property values |
| 160 | 164 | ||
| 161 | (defconst unidata-prop-alist | 165 | (defconst unidata-prop-alist |
| 162 | '((name | 166 | '((name |
| 163 | 1 unidata-gen-table-name "uni-name.el" | 167 | 1 unidata-gen-table-name "uni-name.el" |
| 164 | "Unicode character name. | 168 | "Unicode character name. |
| 165 | Property value is a string.") | 169 | Property value is a string." |
| 170 | nil | ||
| 171 | "") | ||
| 166 | (general-category | 172 | (general-category |
| 167 | 2 unidata-gen-table-symbol "uni-category.el" | 173 | 2 unidata-gen-table-symbol "uni-category.el" |
| 168 | "Unicode general category. | 174 | "Unicode general category. |
| @@ -170,7 +176,7 @@ Property value is one of the following symbols: | |||
| 170 | Lu, Ll, Lt, Lm, Lo, Mn, Mc, Me, Nd, Nl, No, Pc, Pd, Ps, Pe, Pi, Pf, Po, | 176 | Lu, Ll, Lt, Lm, Lo, Mn, Mc, Me, Nd, Nl, No, Pc, Pd, Ps, Pe, Pi, Pf, Po, |
| 171 | Sm, Sc, Sk, So, Zs, Zl, Zp, Cc, Cf, Cs, Co, Cn" | 177 | Sm, Sc, Sk, So, Zs, Zl, Zp, Cc, Cf, Cs, Co, Cn" |
| 172 | unidata-describe-general-category | 178 | unidata-describe-general-category |
| 173 | nil | 179 | Cn |
| 174 | ;; The order of elements must be in sync with unicode_category_t | 180 | ;; The order of elements must be in sync with unicode_category_t |
| 175 | ;; in src/character.h. | 181 | ;; in src/character.h. |
| 176 | (Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd Ps Pe Pi Pf Po | 182 | (Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd Ps Pe Pi Pf Po |
| @@ -179,7 +185,8 @@ Property value is one of the following symbols: | |||
| 179 | 3 unidata-gen-table-integer "uni-combining.el" | 185 | 3 unidata-gen-table-integer "uni-combining.el" |
| 180 | "Unicode canonical combining class. | 186 | "Unicode canonical combining class. |
| 181 | Property value is an integer." | 187 | Property value is an integer." |
| 182 | unidata-describe-canonical-combining-class) | 188 | unidata-describe-canonical-combining-class |
| 189 | 0) | ||
| 183 | (bidi-class | 190 | (bidi-class |
| 184 | 4 unidata-gen-table-symbol "uni-bidi.el" | 191 | 4 unidata-gen-table-symbol "uni-bidi.el" |
| 185 | "Unicode bidi class. | 192 | "Unicode bidi class. |
| @@ -187,7 +194,12 @@ Property value is one of the following symbols: | |||
| 187 | L, LRE, LRO, R, AL, RLE, RLO, PDF, EN, ES, ET, | 194 | L, LRE, LRO, R, AL, RLE, RLO, PDF, EN, ES, ET, |
| 188 | AN, CS, NSM, BN, B, S, WS, ON" | 195 | AN, CS, NSM, BN, B, S, WS, ON" |
| 189 | unidata-describe-bidi-class | 196 | unidata-describe-bidi-class |
| 190 | L | 197 | ;; The assignment of default values to blocks of code points |
| 198 | ;; follows the file DerivedBidiClass.txt from the Unicode | ||
| 199 | ;; Character Database (UCD). | ||
| 200 | (L (#x0600 #x06FF AL) (#xFB50 #xFDFF AL) (#xFE70 #xFEFF AL) | ||
| 201 | (#x0590 #x05FF R) (#x07C0 #x08FF R) | ||
| 202 | (#xFB1D #xFB4F R) (#x10800 #x10FFF R) (#x1E800 #x1EFFF R)) | ||
| 191 | ;; The order of elements must be in sync with bidi_type_t in | 203 | ;; The order of elements must be in sync with bidi_type_t in |
| 192 | ;; src/dispextern.h. | 204 | ;; src/dispextern.h. |
| 193 | (L R EN AN BN B AL LRE LRO RLE RLO PDF ES ET CS NSM S WS ON)) | 205 | (L R EN AN BN B AL LRE LRO RLE RLO PDF ES ET CS NSM S WS ON)) |
| @@ -202,19 +214,24 @@ one of these symbols representing compatibility formatting tag: | |||
| 202 | (decimal-digit-value | 214 | (decimal-digit-value |
| 203 | 6 unidata-gen-table-integer "uni-decimal.el" | 215 | 6 unidata-gen-table-integer "uni-decimal.el" |
| 204 | "Unicode numeric value (decimal digit). | 216 | "Unicode numeric value (decimal digit). |
| 205 | Property value is an integer.") | 217 | Property value is an integer 0..9, or nil. |
| 218 | The value nil stands for NaN \"Numeric_Value\".") | ||
| 206 | (digit-value | 219 | (digit-value |
| 207 | 7 unidata-gen-table-integer "uni-digit.el" | 220 | 7 unidata-gen-table-integer "uni-digit.el" |
| 208 | "Unicode numeric value (digit). | 221 | "Unicode numeric value (digit). |
| 209 | Property value is an integer.") | 222 | Property value is an integer 0..9, or nil. |
| 223 | The value nil stands for NaN \"Numeric_Value\".") | ||
| 210 | (numeric-value | 224 | (numeric-value |
| 211 | 8 unidata-gen-table-numeric "uni-numeric.el" | 225 | 8 unidata-gen-table-numeric "uni-numeric.el" |
| 212 | "Unicode numeric value (numeric). | 226 | "Unicode numeric value (numeric). |
| 213 | Property value is an integer or a floating point.") | 227 | Property value is an integer, a floating point, or nil. |
| 228 | The value nil stands for NaN \"Numeric_Value\".") | ||
| 214 | (mirrored | 229 | (mirrored |
| 215 | 9 unidata-gen-table-symbol "uni-mirrored.el" | 230 | 9 unidata-gen-table-symbol "uni-mirrored.el" |
| 216 | "Unicode bidi mirrored flag. | 231 | "Unicode bidi mirrored flag. |
| 217 | Property value is a symbol `Y' or `N'. See also the property `mirroring'.") | 232 | Property value is a symbol `Y' or `N'. See also the property `mirroring'." |
| 233 | nil | ||
| 234 | N) | ||
| 218 | (old-name | 235 | (old-name |
| 219 | 10 unidata-gen-table-name "uni-old-name.el" | 236 | 10 unidata-gen-table-name "uni-old-name.el" |
| 220 | "Unicode old names as published in Unicode 1.0. | 237 | "Unicode old names as published in Unicode 1.0. |
| @@ -226,23 +243,30 @@ Property value is a string.") | |||
| 226 | (uppercase | 243 | (uppercase |
| 227 | 12 unidata-gen-table-character "uni-uppercase.el" | 244 | 12 unidata-gen-table-character "uni-uppercase.el" |
| 228 | "Unicode simple uppercase mapping. | 245 | "Unicode simple uppercase mapping. |
| 229 | Property value is a character." | 246 | Property value is a character or nil. |
| 247 | The value nil means that the actual property value of a character | ||
| 248 | is the character itself." | ||
| 230 | string) | 249 | string) |
| 231 | (lowercase | 250 | (lowercase |
| 232 | 13 unidata-gen-table-character "uni-lowercase.el" | 251 | 13 unidata-gen-table-character "uni-lowercase.el" |
| 233 | "Unicode simple lowercase mapping. | 252 | "Unicode simple lowercase mapping. |
| 234 | Property value is a character." | 253 | Property value is a character or nil. |
| 254 | The value nil means that the actual property value of a character | ||
| 255 | is the character itself." | ||
| 235 | string) | 256 | string) |
| 236 | (titlecase | 257 | (titlecase |
| 237 | 14 unidata-gen-table-character "uni-titlecase.el" | 258 | 14 unidata-gen-table-character "uni-titlecase.el" |
| 238 | "Unicode simple titlecase mapping. | 259 | "Unicode simple titlecase mapping. |
| 239 | Property value is a character." | 260 | Property value is a character or nil. |
| 261 | The value nil means that the actual property value of a character | ||
| 262 | is the character itself." | ||
| 240 | string) | 263 | string) |
| 241 | (mirroring | 264 | (mirroring |
| 242 | unidata-gen-mirroring-list unidata-gen-table-character "uni-mirrored.el" | 265 | unidata-gen-mirroring-list unidata-gen-table-character "uni-mirrored.el" |
| 243 | "Unicode bidi-mirroring characters. | 266 | "Unicode bidi-mirroring characters. |
| 244 | Property value is a character that has the corresponding mirroring image, | 267 | Property value is a character that has the corresponding mirroring image or nil. |
| 245 | or nil for non-mirrored character."))) | 268 | The value nil means that the actual property value of a character |
| 269 | is the character itself."))) | ||
| 246 | 270 | ||
| 247 | ;; Functions to access the above data. | 271 | ;; Functions to access the above data. |
| 248 | (defsubst unidata-prop-index (prop) (nth 1 (assq prop unidata-prop-alist))) | 272 | (defsubst unidata-prop-index (prop) (nth 1 (assq prop unidata-prop-alist))) |
| @@ -393,9 +417,18 @@ or nil for non-mirrored character."))) | |||
| 393 | (while tail | 417 | (while tail |
| 394 | (setcar tail (cons (car tail) val-code)) | 418 | (setcar tail (cons (car tail) val-code)) |
| 395 | (setq tail (cdr tail) val-code (1+ val-code))) | 419 | (setq tail (cdr tail) val-code (1+ val-code))) |
| 396 | (setq default-value (unidata-encode-val val-list default-value)) | 420 | (if (consp default-value) |
| 397 | (set-char-table-range table t default-value) | 421 | (setq default-value (copy-sequence default-value)) |
| 398 | (set-char-table-range table nil default-value) | 422 | (setq default-value (list default-value))) |
| 423 | (setcar default-value | ||
| 424 | (unidata-encode-val val-list (car default-value))) | ||
| 425 | (set-char-table-range table t (car default-value)) | ||
| 426 | (set-char-table-range table nil (car default-value)) | ||
| 427 | (dolist (elm (cdr default-value)) | ||
| 428 | (setcar (nthcdr 2 elm) | ||
| 429 | (unidata-encode-val val-list (nth 2 elm))) | ||
| 430 | (set-char-table-range table (cons (car elm) (nth 1 elm)) (nth 2 elm))) | ||
| 431 | |||
| 399 | (setq tail unidata-list) | 432 | (setq tail unidata-list) |
| 400 | (while tail | 433 | (while tail |
| 401 | (setq elt (car tail) tail (cdr tail)) | 434 | (setq elt (car tail) tail (cdr tail)) |
| @@ -419,17 +452,27 @@ or nil for non-mirrored character."))) | |||
| 419 | (setq prev-range-data (cons (cons from to) val-code))))) | 452 | (setq prev-range-data (cons (cons from to) val-code))))) |
| 420 | (let* ((start (lsh (lsh range -7) 7)) | 453 | (let* ((start (lsh (lsh range -7) 7)) |
| 421 | (limit (+ start 127)) | 454 | (limit (+ start 127)) |
| 422 | str count new-val) | 455 | str count new-val from to vcode) |
| 423 | (fillarray vec 0) | 456 | (fillarray vec (car default-value)) |
| 424 | ;; See the comment above. | 457 | (dolist (elm (cdr default-value)) |
| 425 | (when (and prev-range-data | 458 | (setq from (car elm) to (nth 1 elm)) |
| 426 | (>= (cdr (car prev-range-data)) start)) | 459 | (when (and (<= from limit) |
| 427 | (let ((from (car (car prev-range-data))) | 460 | (or (>= from start) (>= to start))) |
| 428 | (to (cdr (car prev-range-data))) | 461 | (setq from (max from start) |
| 429 | (vcode (cdr prev-range-data))) | 462 | to (min to limit) |
| 463 | vcode (nth 2 elm)) | ||
| 430 | (while (<= from to) | 464 | (while (<= from to) |
| 431 | (aset vec (- from start) vcode) | 465 | (aset vec (- from start) vcode) |
| 432 | (setq from (1+ from))))) | 466 | (setq from (1+ from))))) |
| 467 | ;; See the comment above. | ||
| 468 | (when (and prev-range-data | ||
| 469 | (>= (cdr (car prev-range-data)) start)) | ||
| 470 | (setq from (car (car prev-range-data)) | ||
| 471 | to (cdr (car prev-range-data)) | ||
| 472 | vcode (cdr prev-range-data)) | ||
| 473 | (while (<= from to) | ||
| 474 | (aset vec (- from start) vcode) | ||
| 475 | (setq from (1+ from)))) | ||
| 433 | (setq prev-range-data nil) | 476 | (setq prev-range-data nil) |
| 434 | (if val-code | 477 | (if val-code |
| 435 | (aset vec (- range start) val-code)) | 478 | (aset vec (- range start) val-code)) |
| @@ -669,7 +712,7 @@ or nil for non-mirrored character."))) | |||
| 669 | (aset table c name) | 712 | (aset table c name) |
| 670 | (if (= c char) | 713 | (if (= c char) |
| 671 | (setq val name)))) | 714 | (setq val name)))) |
| 672 | val))) | 715 | (or val "")))) |
| 673 | 716 | ||
| 674 | ((and (integerp val) (> val 0)) | 717 | ((and (integerp val) (> val 0)) |
| 675 | (let* ((symbol-table (aref (char-table-extra-slot table 4) 1)) | 718 | (let* ((symbol-table (aref (char-table-extra-slot table 4) 1)) |
| @@ -695,7 +738,9 @@ or nil for non-mirrored character."))) | |||
| 695 | ((eq sym 'CJK\ COMPATIBILITY\ IDEOGRAPH) | 738 | ((eq sym 'CJK\ COMPATIBILITY\ IDEOGRAPH) |
| 696 | (format "%s-%04X" sym char)) | 739 | (format "%s-%04X" sym char)) |
| 697 | ((eq sym 'VARIATION\ SELECTOR) | 740 | ((eq sym 'VARIATION\ SELECTOR) |
| 698 | (format "%s-%d" sym (+ (- char #xe0100) 17)))))))) | 741 | (format "%s-%d" sym (+ (- char #xe0100) 17)))))) |
| 742 | |||
| 743 | (t ""))) | ||
| 699 | 744 | ||
| 700 | ;; Store VAL as the name of CHAR in TABLE. | 745 | ;; Store VAL as the name of CHAR in TABLE. |
| 701 | 746 | ||
| @@ -707,6 +752,9 @@ or nil for non-mirrored character."))) | |||
| 707 | 752 | ||
| 708 | (defun unidata-get-decomposition (char val table) | 753 | (defun unidata-get-decomposition (char val table) |
| 709 | (cond | 754 | (cond |
| 755 | ((not val) | ||
| 756 | (list char)) | ||
| 757 | |||
| 710 | ((consp val) | 758 | ((consp val) |
| 711 | val) | 759 | val) |
| 712 | 760 | ||
| @@ -747,7 +795,8 @@ or nil for non-mirrored character."))) | |||
| 747 | (aset vec idx (nconc word-list tail-list))) | 795 | (aset vec idx (nconc word-list tail-list))) |
| 748 | (dotimes (i 128) | 796 | (dotimes (i 128) |
| 749 | (aset table (+ first-char i) (aref vec i))) | 797 | (aset table (+ first-char i) (aref vec i))) |
| 750 | (aref vec (- char first-char))))) | 798 | (setq val (aref vec (- char first-char))) |
| 799 | (or val (list char))))) | ||
| 751 | 800 | ||
| 752 | ;; Hangul syllable | 801 | ;; Hangul syllable |
| 753 | ((and (eq val 0) (>= char #xAC00) (<= char #xD7A3)) | 802 | ((and (eq val 0) (>= char #xAC00) (<= char #xD7A3)) |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 4cb4d0a6f50..4bf615328b1 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2011-08-24 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * display.texi (Bidirectional Display): Document return value in | ||
| 4 | buffers that are not bidi-reordered for display, and in unibyte | ||
| 5 | buffers. | ||
| 6 | |||
| 7 | 2011-08-23 Eli Zaretskii <eliz@gnu.org> | ||
| 8 | |||
| 9 | * nonascii.texi (Character Properties): Document the values for | ||
| 10 | unassigned codepoints. | ||
| 11 | |||
| 1 | 2011-08-18 Eli Zaretskii <eliz@gnu.org> | 12 | 2011-08-18 Eli Zaretskii <eliz@gnu.org> |
| 2 | 13 | ||
| 3 | * nonascii.texi (Character Properties): Document use of | 14 | * nonascii.texi (Character Properties): Document use of |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 8f7f4003411..0593eba8f05 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -6104,7 +6104,9 @@ omitted or @code{nil}, it defaults to the current buffer. If the | |||
| 6104 | buffer-local value of the variable @code{bidi-paragraph-direction} is | 6104 | buffer-local value of the variable @code{bidi-paragraph-direction} is |
| 6105 | non-@code{nil}, the returned value will be identical to that value; | 6105 | non-@code{nil}, the returned value will be identical to that value; |
| 6106 | otherwise, the returned value reflects the paragraph direction | 6106 | otherwise, the returned value reflects the paragraph direction |
| 6107 | determined dynamically by Emacs. | 6107 | determined dynamically by Emacs. For buffers whose value of |
| 6108 | @code{bidi-display-reordering} is @code{nil} as well as unibyte | ||
| 6109 | buffers, this function always returns @code{left-to-right}. | ||
| 6108 | @end defun | 6110 | @end defun |
| 6109 | 6111 | ||
| 6110 | @cindex layout on display, and bidirectional text | 6112 | @cindex layout on display, and bidirectional text |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 7b6d665b2ac..298c7c3d1a8 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -369,6 +369,12 @@ replacing each @samp{_} character with a dash @samp{-}. For example, | |||
| 369 | @code{canonical-combining-class}. However, sometimes we shorten the | 369 | @code{canonical-combining-class}. However, sometimes we shorten the |
| 370 | names to make their use easier. | 370 | names to make their use easier. |
| 371 | 371 | ||
| 372 | @cindex unassigned character codepoints | ||
| 373 | Some codepoints are left @dfn{unassigned} by the | ||
| 374 | @acronym{UCD}---they don't correspond to any character. The Unicode | ||
| 375 | Standard defines default values of properties for such codepoints; | ||
| 376 | they are mentioned below for each property. | ||
| 377 | |||
| 372 | Here is the full list of value types for all the character | 378 | Here is the full list of value types for all the character |
| 373 | properties that Emacs knows about: | 379 | properties that Emacs knows about: |
| 374 | 380 | ||
| @@ -376,24 +382,31 @@ properties that Emacs knows about: | |||
| 376 | @item name | 382 | @item name |
| 377 | Corresponds to the @code{Name} Unicode property. The value is a | 383 | Corresponds to the @code{Name} Unicode property. The value is a |
| 378 | string consisting of upper-case Latin letters A to Z, digits, spaces, | 384 | string consisting of upper-case Latin letters A to Z, digits, spaces, |
| 379 | and hyphen @samp{-} characters. | 385 | and hyphen @samp{-} characters. For unassigned codepoints, the value |
| 386 | is an empty string. | ||
| 380 | 387 | ||
| 381 | @cindex unicode general category | 388 | @cindex unicode general category |
| 382 | @item general-category | 389 | @item general-category |
| 383 | Corresponds to the @code{General_Category} Unicode property. The | 390 | Corresponds to the @code{General_Category} Unicode property. The |
| 384 | value is a symbol whose name is a 2-letter abbreviation of the | 391 | value is a symbol whose name is a 2-letter abbreviation of the |
| 385 | character's classification. | 392 | character's classification. For unassigned codepoints, the value |
| 393 | is @code{Cn}. | ||
| 386 | 394 | ||
| 387 | @item canonical-combining-class | 395 | @item canonical-combining-class |
| 388 | Corresponds to the @code{Canonical_Combining_Class} Unicode property. | 396 | Corresponds to the @code{Canonical_Combining_Class} Unicode property. |
| 389 | The value is an integer number. | 397 | The value is an integer number. For unassigned codepoints, the value |
| 398 | is zero. | ||
| 390 | 399 | ||
| 391 | @cindex bidirectional class of characters | 400 | @cindex bidirectional class of characters |
| 392 | @item bidi-class | 401 | @item bidi-class |
| 393 | Corresponds to the Unicode @code{Bidi_Class} property. The value is a | 402 | Corresponds to the Unicode @code{Bidi_Class} property. The value is a |
| 394 | symbol whose name is the Unicode @dfn{directional type} of the | 403 | symbol whose name is the Unicode @dfn{directional type} of the |
| 395 | character. Emacs uses this property when it reorders bidirectional | 404 | character. Emacs uses this property when it reorders bidirectional |
| 396 | text for display (@pxref{Bidirectional Display}). | 405 | text for display (@pxref{Bidirectional Display}). For unassigned |
| 406 | codepoints, the value depends on the code blocks to which the | ||
| 407 | codepoint belongs: most unassigned codepoints get the value of | ||
| 408 | @code{L} (strong L), but some get values of @code{AL} (Arabic letter) | ||
| 409 | or @code{R} (strong R). | ||
| 397 | 410 | ||
| 398 | @item decomposition | 411 | @item decomposition |
| 399 | Corresponds to the Unicode @code{Decomposition_Type} and | 412 | Corresponds to the Unicode @code{Decomposition_Type} and |
| @@ -405,19 +418,22 @@ Note that the Unicode spec writes these tag names inside | |||
| 405 | brackets; e.g., Unicode specifies @samp{<small>} where Emacs uses | 418 | brackets; e.g., Unicode specifies @samp{<small>} where Emacs uses |
| 406 | @samp{small}. | 419 | @samp{small}. |
| 407 | }; the other elements are characters that give the compatibility | 420 | }; the other elements are characters that give the compatibility |
| 408 | decomposition sequence of this character. | 421 | decomposition sequence of this character. For unassigned codepoints, |
| 422 | the value is the character itself. | ||
| 409 | 423 | ||
| 410 | @item decimal-digit-value | 424 | @item decimal-digit-value |
| 411 | Corresponds to the Unicode @code{Numeric_Value} property for | 425 | Corresponds to the Unicode @code{Numeric_Value} property for |
| 412 | characters whose @code{Numeric_Type} is @samp{Digit}. The value is an | 426 | characters whose @code{Numeric_Type} is @samp{Digit}. The value is an |
| 413 | integer number. | 427 | integer number. For unassigned codepoints, the value is @code{nil}, |
| 428 | which means @acronym{NaN}, or ``not-a-number''. | ||
| 414 | 429 | ||
| 415 | @item digit-value | 430 | @item digit-value |
| 416 | Corresponds to the Unicode @code{Numeric_Value} property for | 431 | Corresponds to the Unicode @code{Numeric_Value} property for |
| 417 | characters whose @code{Numeric_Type} is @samp{Decimal}. The value is | 432 | characters whose @code{Numeric_Type} is @samp{Decimal}. The value is |
| 418 | an integer number. Examples of such characters include compatibility | 433 | an integer number. Examples of such characters include compatibility |
| 419 | subscript and superscript digits, for which the value is the | 434 | subscript and superscript digits, for which the value is the |
| 420 | corresponding number. | 435 | corresponding number. For unassigned codepoints, the value is |
| 436 | @code{nil}, which means @acronym{NaN}. | ||
| 421 | 437 | ||
| 422 | @item numeric-value | 438 | @item numeric-value |
| 423 | Corresponds to the Unicode @code{Numeric_Value} property for | 439 | Corresponds to the Unicode @code{Numeric_Value} property for |
| @@ -426,12 +442,15 @@ this property is an integer or a floating-point number. Examples of | |||
| 426 | characters that have this property include fractions, subscripts, | 442 | characters that have this property include fractions, subscripts, |
| 427 | superscripts, Roman numerals, currency numerators, and encircled | 443 | superscripts, Roman numerals, currency numerators, and encircled |
| 428 | numbers. For example, the value of this property for the character | 444 | numbers. For example, the value of this property for the character |
| 429 | @code{U+2155} (@sc{vulgar fraction one fifth}) is @code{0.2}. | 445 | @code{U+2155} (@sc{vulgar fraction one fifth}) is @code{0.2}. For |
| 446 | unassigned codepoints, the value is @code{nil}, which means | ||
| 447 | @acronym{NaN}. | ||
| 430 | 448 | ||
| 431 | @cindex mirroring of characters | 449 | @cindex mirroring of characters |
| 432 | @item mirrored | 450 | @item mirrored |
| 433 | Corresponds to the Unicode @code{Bidi_Mirrored} property. The value | 451 | Corresponds to the Unicode @code{Bidi_Mirrored} property. The value |
| 434 | of this property is a symbol, either @code{Y} or @code{N}. | 452 | of this property is a symbol, either @code{Y} or @code{N}. For |
| 453 | unassigned codepoints, the value is @code{N}. | ||
| 435 | 454 | ||
| 436 | @item mirroring | 455 | @item mirroring |
| 437 | Corresponds to the Unicode @code{Bidi_Mirroring_Glyph} property. The | 456 | Corresponds to the Unicode @code{Bidi_Mirroring_Glyph} property. The |
| @@ -443,29 +462,33 @@ property; however, some characters whose @code{mirrored} property is | |||
| 443 | @code{Y} also have @code{nil} for @code{mirroring}, because no | 462 | @code{Y} also have @code{nil} for @code{mirroring}, because no |
| 444 | appropriate characters exist with mirrored glyphs. Emacs uses this | 463 | appropriate characters exist with mirrored glyphs. Emacs uses this |
| 445 | property to display mirror images of characters when appropriate | 464 | property to display mirror images of characters when appropriate |
| 446 | (@pxref{Bidirectional Display}). | 465 | (@pxref{Bidirectional Display}). For unassigned codepoints, the value |
| 466 | is @code{nil}. | ||
| 447 | 467 | ||
| 448 | @item old-name | 468 | @item old-name |
| 449 | Corresponds to the Unicode @code{Unicode_1_Name} property. The value | 469 | Corresponds to the Unicode @code{Unicode_1_Name} property. The value |
| 450 | is a string. | 470 | is a string. For unassigned codepoints, the value is an empty string. |
| 451 | 471 | ||
| 452 | @item iso-10646-comment | 472 | @item iso-10646-comment |
| 453 | Corresponds to the Unicode @code{ISO_Comment} property. The value is | 473 | Corresponds to the Unicode @code{ISO_Comment} property. The value is |
| 454 | a string. | 474 | a string. For unassigned codepoints, the value is an empty string. |
| 455 | 475 | ||
| 456 | @item uppercase | 476 | @item uppercase |
| 457 | Corresponds to the Unicode @code{Simple_Uppercase_Mapping} property. | 477 | Corresponds to the Unicode @code{Simple_Uppercase_Mapping} property. |
| 458 | The value of this property is a single character. | 478 | The value of this property is a single character. For unassigned |
| 479 | codepoints, the value is @code{nil}, which means the character itself. | ||
| 459 | 480 | ||
| 460 | @item lowercase | 481 | @item lowercase |
| 461 | Corresponds to the Unicode @code{Simple_Lowercase_Mapping} property. | 482 | Corresponds to the Unicode @code{Simple_Lowercase_Mapping} property. |
| 462 | The value of this property is a single character. | 483 | The value of this property is a single character. For unassigned |
| 484 | codepoints, the value is @code{nil}, which means the character itself. | ||
| 463 | 485 | ||
| 464 | @item titlecase | 486 | @item titlecase |
| 465 | Corresponds to the Unicode @code{Simple_Titlecase_Mapping} property. | 487 | Corresponds to the Unicode @code{Simple_Titlecase_Mapping} property. |
| 466 | @dfn{Title case} is a special form of a character used when the first | 488 | @dfn{Title case} is a special form of a character used when the first |
| 467 | character of a word needs to be capitalized. The value of this | 489 | character of a word needs to be capitalized. The value of this |
| 468 | property is a single character. | 490 | property is a single character. For unassigned codepoints, the value |
| 491 | is @code{nil}, which means the character itself. | ||
| 469 | @end table | 492 | @end table |
| 470 | 493 | ||
| 471 | @defun get-char-code-property char propname | 494 | @defun get-char-code-property char propname |
diff --git a/etc/ChangeLog b/etc/ChangeLog index c2f7e3cb0d2..092aa6fb387 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-08-24 Steve Chapel <schapel@laptop.stevechapel.com> (tiny change) | ||
| 2 | |||
| 3 | * refcards/refcard.tex: Add a few more commands. (Bug#9343) | ||
| 4 | |||
| 5 | 2011-08-22 Juri Linkov <juri@jurta.org> | ||
| 6 | |||
| 7 | * compilation.txt: Add more samples of output and non-output | ||
| 8 | switches (bug#9319). | ||
| 9 | |||
| 1 | 2011-08-19 Chong Yidong <cyd@stupidchicken.com> | 10 | 2011-08-19 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 11 | ||
| 3 | * themes/dichromacy-theme.el: | 12 | * themes/dichromacy-theme.el: |
| @@ -407,7 +407,7 @@ If non-nil, C-d, [delete], and DEL delete the region if it is active | |||
| 407 | and no prefix argument is given. If set to `kill', these commands | 407 | and no prefix argument is given. If set to `kill', these commands |
| 408 | kill instead. | 408 | kill instead. |
| 409 | 409 | ||
| 410 | *** New command `delete-forward-char', bound to C-d and [delete]. | 410 | *** New command `delete-forward-char', bound to [delete]. |
| 411 | This is meant for interactive use, and obeys `delete-active-region'. | 411 | This is meant for interactive use, and obeys `delete-active-region'. |
| 412 | The command `delete-char' does not obey `delete-active-region'. | 412 | The command `delete-char' does not obey `delete-active-region'. |
| 413 | 413 | ||
diff --git a/etc/compilation.txt b/etc/compilation.txt index 888c1f94c33..eeb09b1712c 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt | |||
| @@ -546,9 +546,20 @@ checking whether to build shared libraries... yes | |||
| 546 | checking whether -lc should be explicitly linked in... (cached) no | 546 | checking whether -lc should be explicitly linked in... (cached) no |
| 547 | checking For GLIB - version >= 2.0.0... yes (version 2.1.0) | 547 | checking For GLIB - version >= 2.0.0... yes (version 2.1.0) |
| 548 | checking FONTCONFIG_CFLAGS... | 548 | checking FONTCONFIG_CFLAGS... |
| 549 | g++ -o foo.o foo.cc | 549 | tool -o foo.o foo.c |
| 550 | tool1 -output=foo foo.x | 550 | tool -o=foo.o foo.c |
| 551 | tool2 --outfile foo foo.y | 551 | tool -output foo.o foo.c |
| 552 | tool -output=foo.o foo.c | ||
| 553 | tool -outfile foo.o foo.c | ||
| 554 | tool -outfile=foo.o foo.c | ||
| 555 | tool --output foo.o foo.c | ||
| 556 | tool --output=foo.o foo.c | ||
| 557 | tool --outfile foo.o foo.c | ||
| 558 | tool --outfile=foo.o foo.c | ||
| 559 | tool -omega foo.c foo2.c | ||
| 560 | tool -output-html-file foo.c foo2.c | ||
| 561 | tool --omega foo.c foo2.c | ||
| 562 | tool --output-html-file foo.c foo2.c | ||
| 552 | 563 | ||
| 553 | Compilation started at Wed Jul 20 12:20:10 | 564 | Compilation started at Wed Jul 20 12:20:10 |
| 554 | Compilation interrupt at Wed Jul 20 12:20:10 | 565 | Compilation interrupt at Wed Jul 20 12:20:10 |
diff --git a/etc/refcards/refcard.tex b/etc/refcards/refcard.tex index 52b9348db26..7d4f9dbfa89 100644 --- a/etc/refcards/refcard.tex +++ b/etc/refcards/refcard.tex | |||
| @@ -332,6 +332,7 @@ If Emacs is still searching, \kbd{C-g} cancels only the part not matched. | |||
| 332 | 332 | ||
| 333 | \shortcopyrightnotice | 333 | \shortcopyrightnotice |
| 334 | 334 | ||
| 335 | \newcolumn | ||
| 335 | \section{Motion} | 336 | \section{Motion} |
| 336 | 337 | ||
| 337 | \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr | 338 | \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr |
| @@ -352,7 +353,10 @@ If Emacs is still searching, \kbd{C-g} cancels only the part not matched. | |||
| 352 | \key{scroll to previous screen}{M-v} | 353 | \key{scroll to previous screen}{M-v} |
| 353 | \key{scroll left}{C-x <} | 354 | \key{scroll left}{C-x <} |
| 354 | \key{scroll right}{C-x >} | 355 | \key{scroll right}{C-x >} |
| 355 | \key{scroll current line to center of screen}{C-u C-l} | 356 | \key{scroll current line to center, top, bottom}{C-l} |
| 357 | |||
| 358 | \key{goto line}{M-g g} | ||
| 359 | \key{back to indentation}{M-m} | ||
| 356 | 360 | ||
| 357 | \section{Killing and Deleting} | 361 | \section{Killing and Deleting} |
| 358 | 362 | ||
| @@ -393,14 +397,15 @@ If Emacs is still searching, \kbd{C-g} cancels only the part not matched. | |||
| 393 | 397 | ||
| 394 | Valid responses in query-replace mode are | 398 | Valid responses in query-replace mode are |
| 395 | 399 | ||
| 396 | \key{{\bf replace} this one, go on to next}{SPC} | 400 | \key{{\bf replace} this one, go on to next}{SPC {\rm or} y} |
| 397 | \key{replace this one, don't move}{,} | 401 | \key{replace this one, don't move}{,} |
| 398 | \key{{\bf skip} to next without replacing}{DEL} | 402 | \key{{\bf skip} to next without replacing}{DEL {\rm or} n} |
| 399 | \key{replace all remaining matches}{!} | 403 | \key{replace all remaining matches}{!} |
| 400 | \key{{\bf back up} to the previous match}{^} | 404 | \key{{\bf back up} to the previous match}{^} |
| 401 | \key{{\bf exit} query-replace}{RET} | 405 | \key{{\bf exit} query-replace}{RET} |
| 402 | \key{enter recursive edit (\kbd{C-M-c} to exit)}{C-r} | 406 | \key{enter recursive edit (\kbd{C-M-c} to exit)}{C-r} |
| 403 | 407 | ||
| 408 | \newcolumn | ||
| 404 | \section{Multiple Windows} | 409 | \section{Multiple Windows} |
| 405 | 410 | ||
| 406 | When two commands are shown, the second is a similar command for a | 411 | When two commands are shown, the second is a similar command for a |
| @@ -438,6 +443,7 @@ frame instead of a window. | |||
| 438 | \key{indent {\bf region} (mode-dependent)}{C-M-\\} | 443 | \key{indent {\bf region} (mode-dependent)}{C-M-\\} |
| 439 | \key{indent {\bf sexp} (mode-dependent)}{C-M-q} | 444 | \key{indent {\bf sexp} (mode-dependent)}{C-M-q} |
| 440 | \key{indent region rigidly {\it arg\/} columns}{C-x TAB} | 445 | \key{indent region rigidly {\it arg\/} columns}{C-x TAB} |
| 446 | \key{indent for comment}{M-;} | ||
| 441 | 447 | ||
| 442 | \key{insert newline after point}{C-o} | 448 | \key{insert newline after point}{C-o} |
| 443 | \key{move rest of line vertically down}{C-M-o} | 449 | \key{move rest of line vertically down}{C-M-o} |
| @@ -536,6 +542,13 @@ minibuffer. Type \kbd{F10} to activate menu bar items on text terminals. | |||
| 536 | 542 | ||
| 537 | \key{expand previous word dynamically}{M-/} | 543 | \key{expand previous word dynamically}{M-/} |
| 538 | 544 | ||
| 545 | \section{Miscellaneous} | ||
| 546 | |||
| 547 | \key{numeric argument}{C-u {\it num}} | ||
| 548 | \key{negative argument}{M--} | ||
| 549 | \key{quoted insert}{C-q {\it char}} | ||
| 550 | |||
| 551 | \newcolumn | ||
| 539 | \section{Regular Expressions} | 552 | \section{Regular Expressions} |
| 540 | 553 | ||
| 541 | \key{any single character except a newline}{. {\rm(dot)}} | 554 | \key{any single character except a newline}{. {\rm(dot)}} |
| @@ -604,6 +617,7 @@ Other: | |||
| 604 | 617 | ||
| 605 | \endindentedkeys | 618 | \endindentedkeys |
| 606 | 619 | ||
| 620 | \newcolumn | ||
| 607 | \section{Registers} | 621 | \section{Registers} |
| 608 | 622 | ||
| 609 | \key{save region in register}{C-x r s} | 623 | \key{save region in register}{C-x r s} |
diff --git a/leim/ChangeLog b/leim/ChangeLog index 5309671651b..2dbccf9be39 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-08-20 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (OTHERS): | ||
| 4 | * makefile.w32-in (MISC): Add ipa-praat.elc. | ||
| 5 | |||
| 1 | 2011-07-23 Yair F <yair.f.lists@gmail.com> | 6 | 2011-07-23 Yair F <yair.f.lists@gmail.com> |
| 2 | 7 | ||
| 3 | * quail/hebrew.el ("hebrew"): Additional key mappings. | 8 | * quail/hebrew.el ("hebrew"): Additional key mappings. |
diff --git a/leim/Makefile.in b/leim/Makefile.in index 18eb8b62a96..87020616a57 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in | |||
| @@ -124,6 +124,7 @@ OTHERS= \ | |||
| 124 | ${srcdir}/quail/arabic.elc \ | 124 | ${srcdir}/quail/arabic.elc \ |
| 125 | ${srcdir}/quail/ethiopic.elc \ | 125 | ${srcdir}/quail/ethiopic.elc \ |
| 126 | ${srcdir}/quail/ipa.elc \ | 126 | ${srcdir}/quail/ipa.elc \ |
| 127 | ${srcdir}/quail/ipa-praat.elc \ | ||
| 127 | ${srcdir}/quail/hebrew.elc \ | 128 | ${srcdir}/quail/hebrew.elc \ |
| 128 | ${srcdir}/quail/georgian.elc \ | 129 | ${srcdir}/quail/georgian.elc \ |
| 129 | $(srcdir)/quail/persian.elc \ | 130 | $(srcdir)/quail/persian.elc \ |
diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in index 1ab14c72b3d..231384308f2 100644 --- a/leim/makefile.w32-in +++ b/leim/makefile.w32-in | |||
| @@ -118,6 +118,7 @@ MISC= \ | |||
| 118 | $(srcdir)/quail/arabic.elc \ | 118 | $(srcdir)/quail/arabic.elc \ |
| 119 | $(srcdir)/quail/ethiopic.elc \ | 119 | $(srcdir)/quail/ethiopic.elc \ |
| 120 | $(srcdir)/quail/ipa.elc \ | 120 | $(srcdir)/quail/ipa.elc \ |
| 121 | $(srcdir)/quail/ipa-praat.elc \ | ||
| 121 | $(srcdir)/quail/hebrew.elc \ | 122 | $(srcdir)/quail/hebrew.elc \ |
| 122 | $(srcdir)/quail/georgian.elc \ | 123 | $(srcdir)/quail/georgian.elc \ |
| 123 | $(srcdir)/quail/persian.elc \ | 124 | $(srcdir)/quail/persian.elc \ |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38c536af62c..762779cc01e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,218 @@ | |||
| 1 | 2011-08-24 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * proced.el (proced-marked): Inherit from `error' instead of | ||
| 4 | `font-lock-warning-face'. | ||
| 5 | |||
| 6 | * ibuffer.el (ibuffer-marked-face): Change default face from | ||
| 7 | `font-lock-warning-face' to `warning'. | ||
| 8 | (ibuffer-deletion-face): Change default face from | ||
| 9 | `font-lock-type-face' to `error'. | ||
| 10 | |||
| 11 | * battery.el (battery-update): Use the face `error' instead of | ||
| 12 | `font-lock-warning-face' (bug#6117). | ||
| 13 | |||
| 14 | 2011-08-24 Juri Linkov <juri@jurta.org> | ||
| 15 | |||
| 16 | * faces.el (success): Change face color from "Green3" to | ||
| 17 | "ForestGreen" on light background (bug#9353). | ||
| 18 | |||
| 19 | 2011-08-24 Chong Yidong <cyd@stupidchicken.com> | ||
| 20 | |||
| 21 | * window.el (quit-window): Renamed from quit-restore-window. Use | ||
| 22 | same arglist as old quit-window. | ||
| 23 | (frame-auto-delete): Doc fix. | ||
| 24 | |||
| 25 | * view.el (view-mode-exit): Use quit-window. | ||
| 26 | |||
| 27 | 2011-08-24 Juri Linkov <juri@jurta.org> | ||
| 28 | |||
| 29 | * isearch.el (isearch-ring-adjust1): Start visiting previous | ||
| 30 | search strings from the index 0 (-1 + 1) instead of 1 (0 + 1). | ||
| 31 | (isearch-repeat, isearch-edit-string): Call `isearch-ring-adjust1' | ||
| 32 | for empty search string (when the last search string is reused | ||
| 33 | automatically) to adjust the isearch ring to the last element and | ||
| 34 | prepare the correct index for further M-p commands (bug#9185). | ||
| 35 | |||
| 36 | 2011-08-24 Kenichi Handa <handa@m17n.org> | ||
| 37 | |||
| 38 | * international/ucs-normalize.el: If decomposition property of | ||
| 39 | CHAR is the default one (i.e. a list of CHAR itself), treat it as | ||
| 40 | nil. | ||
| 41 | (nfd, nfkd): Likewise. | ||
| 42 | |||
| 43 | 2011-08-24 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 44 | |||
| 45 | * mpc.el (mpc--proc-filter): Don't signal mpc-proc-error since signals | ||
| 46 | from process filters aren't reliably transmitted to the surrounding | ||
| 47 | accept-process-output. | ||
| 48 | (mpc-proc-check): New function. | ||
| 49 | (mpc-proc-sync): Use it (bug#8293) | ||
| 50 | |||
| 51 | 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 52 | |||
| 53 | * emacs-lisp/eieio.el (eieio-defmethod, eieio-defgeneric): | ||
| 54 | Add compatibility functions (bug#9313). | ||
| 55 | |||
| 56 | 2011-08-23 Eli Zaretskii <eliz@gnu.org> | ||
| 57 | |||
| 58 | * cus-start.el (all): Add entry for bidi-paragraph-direction. | ||
| 59 | |||
| 60 | * international/uni-bidi.el: Regenerated. | ||
| 61 | |||
| 62 | 2011-08-23 Kenichi Handa <handa@m17n.org> | ||
| 63 | |||
| 64 | * international/charprop.el: | ||
| 65 | * international/uni-bidi.el: | ||
| 66 | * international/uni-category.el: | ||
| 67 | * international/uni-combining.el: | ||
| 68 | * international/uni-comment.el: | ||
| 69 | * international/uni-decimal.el: | ||
| 70 | * international/uni-decomposition.el: | ||
| 71 | * international/uni-digit.el: | ||
| 72 | * international/uni-lowercase.el: | ||
| 73 | * international/uni-mirrored.el: | ||
| 74 | * international/uni-name.el: | ||
| 75 | * international/uni-numeric.el: | ||
| 76 | * international/uni-old-name.el: | ||
| 77 | * international/uni-titlecase.el: | ||
| 78 | * international/uni-uppercase.el: Regenerate. | ||
| 79 | |||
| 80 | 2011-08-23 Martin Rudalics <rudalics@gmx.at> | ||
| 81 | |||
| 82 | * help.el (help-window-setup): Fix message displayed when other | ||
| 83 | window is reused. (Bug#9341) | ||
| 84 | |||
| 85 | 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 86 | |||
| 87 | * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list. | ||
| 88 | * pcomplete.el (pcomplete-quote-argument): Fix thinko (bug#9161). | ||
| 89 | |||
| 90 | * pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop. | ||
| 91 | Mark obsolete. | ||
| 92 | * shell.el (shell-parse-pcomplete-arguments): New function. | ||
| 93 | (shell-completion-vars): Use it instead (bug#9160). | ||
| 94 | |||
| 95 | 2011-08-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 96 | |||
| 97 | * progmodes/sh-script.el (sh-maybe-here-document): Disable magic in | ||
| 98 | strings and comments (bug#9333). | ||
| 99 | |||
| 100 | * emacs-lisp/debug.el (debug-arglist): New function. | ||
| 101 | (debug-convert-byte-code): Use it. Handle lexical byte-codes. | ||
| 102 | (debug-on-entry-1): Handle interpreted closures (bug#9120). | ||
| 103 | |||
| 104 | 2011-08-22 Juri Linkov <juri@jurta.org> | ||
| 105 | |||
| 106 | * progmodes/compile.el (compilation-mode-font-lock-keywords): | ||
| 107 | Revert regexp that highlights output switches to its old | ||
| 108 | pre-2010-10-28 value and remove one `?' from it (bug#9319). | ||
| 109 | |||
| 110 | * progmodes/grep.el (grep-process-setup): Use `buffer-modified-p' | ||
| 111 | to check for empty output (bug#9226). | ||
| 112 | |||
| 113 | 2011-08-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 114 | |||
| 115 | * progmodes/scheme.el (scheme-mode-syntax-table): Don't use | ||
| 116 | symbol-constituent as the default, as that stops font-lock from | ||
| 117 | working properly (Bug#8843). | ||
| 118 | |||
| 119 | 2011-08-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 120 | |||
| 121 | * mail/smtpmail.el (smtpmail-via-smtp): Only bind | ||
| 122 | `coding-system-for-*' around the process open call to avoid | ||
| 123 | auth-source side effects. | ||
| 124 | (smtpmail-try-auth-methods): Expand the secret password. | ||
| 125 | (smtpmail-query-smtp-server): Allow `quit'-ing out in case the | ||
| 126 | probe hangs. | ||
| 127 | |||
| 128 | 2011-08-21 Chong Yidong <cyd@stupidchicken.com> | ||
| 129 | |||
| 130 | * term.el (term-mouse-paste): Yank primary selection (Bug#6845). | ||
| 131 | |||
| 132 | * emacs-lisp/find-func.el (find-function-noselect): New arg | ||
| 133 | lisp-only. | ||
| 134 | |||
| 135 | * emacs-lisp/edebug.el (edebug-instrument-function): Use it to | ||
| 136 | signal an error for built-in functions (Bug#6664). | ||
| 137 | |||
| 138 | 2011-08-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 139 | |||
| 140 | * mail/smtpmail.el (smtpmail-smtp-user): New variable. | ||
| 141 | (smtpmail-try-auth-methods): Use it. | ||
| 142 | |||
| 143 | 2011-08-21 Chong Yidong <cyd@stupidchicken.com> | ||
| 144 | |||
| 145 | * font-lock.el (font-lock-fontify-region) | ||
| 146 | (font-lock-unfontify-region, font-lock-default-fontify-buffer) | ||
| 147 | (font-lock-default-unfontify-buffer) | ||
| 148 | (font-lock-default-fontify-region) | ||
| 149 | (font-lock-default-unfontify-region): Add docstrings (Bug#8624). | ||
| 150 | |||
| 151 | * progmodes/compile.el (compilation-error-properties): | ||
| 152 | Fix confusion between file struct and message struct (Bug#9319). | ||
| 153 | (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to | ||
| 154 | `ant' regexp. | ||
| 155 | |||
| 156 | * net/browse-url.el (browse-url-firefox): Don't call | ||
| 157 | browse-url-firefox-sentinel unless using -remote (Bug#9328). | ||
| 158 | |||
| 159 | 2011-08-20 Glenn Morris <rgm@gnu.org> | ||
| 160 | |||
| 161 | * tutorial.el (help-with-tutorial): Avoid an error on short screens. | ||
| 162 | |||
| 163 | * tutorial.el (tutorial--default-keys): Update some default bindings. | ||
| 164 | |||
| 165 | * files.el (hack-local-variables): Fully ignore case for "mode:". | ||
| 166 | |||
| 167 | 2011-08-20 Alan Mackenzie <acm@muc.de> | ||
| 168 | |||
| 169 | Resolve invalid use of a regexp in regexp-opt. | ||
| 170 | |||
| 171 | * cc-fonts.el (c-complex-decl-matchers): Add in special detection | ||
| 172 | for a java annotation. | ||
| 173 | |||
| 174 | * cc-engine.el (c-forward-decl-or-cast-1): Add in special | ||
| 175 | detection for a java annotation. | ||
| 176 | |||
| 177 | * cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling | ||
| 178 | for java. | ||
| 179 | (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+". | ||
| 180 | |||
| 181 | 2011-08-20 Chong Yidong <cyd@stupidchicken.com> | ||
| 182 | |||
| 183 | * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix | ||
| 184 | (Bug#9274). | ||
| 185 | |||
| 186 | 2011-08-20 Alan Mackenzie <acm@muc.de> | ||
| 187 | |||
| 188 | * Fontify CPP expressions correctly when starting in the middle of | ||
| 189 | such a construct. Mainly for when jit-lock etc. starts a chunk | ||
| 190 | here. | ||
| 191 | |||
| 192 | * progmodes/cc-fonts.el (c-font-lock-context): new buffer local | ||
| 193 | variable. | ||
| 194 | (c-make-font-lock-search-form): new function, extracted from | ||
| 195 | c-make-font-lock-search-function. | ||
| 196 | (c-make-font-lock-search-function): Use the above function. | ||
| 197 | (c-make-font-lock-context-search-function): New function. | ||
| 198 | (c-cpp-matchers): Enhance the preprocessor expression case with | ||
| 199 | the above function | ||
| 200 | (c-font-lock-complex-decl-prepare): Test for being in a CPP form | ||
| 201 | which takes an expression. | ||
| 202 | |||
| 203 | * progmodes/cc-langs.el (c-cpp-expr-intro-re): New lang-variable. | ||
| 204 | |||
| 205 | 2011-08-20 Martin Rudalics <rudalics@gmx.at> | ||
| 206 | |||
| 207 | * window.el (display-buffer-reuse-window) | ||
| 208 | (display-buffer-pop-up-window): Don't reuse or split a side | ||
| 209 | window. | ||
| 210 | |||
| 211 | 2011-08-19 Glenn Morris <rgm@gnu.org> | ||
| 212 | |||
| 213 | * files.el (hack-local-variables-prop-line, hack-local-variables): | ||
| 214 | Downcase "Mode:". (Bug#9331) | ||
| 215 | |||
| 1 | 2011-08-18 Chong Yidong <cyd@stupidchicken.com> | 216 | 2011-08-18 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 217 | ||
| 3 | * international/characters.el: Add L and R categories. | 218 | * international/characters.el: Add L and R categories. |
| @@ -28,8 +243,8 @@ | |||
| 28 | binding variables (bug#9298). Also clean up some unused | 243 | binding variables (bug#9298). Also clean up some unused |
| 29 | autoloads. | 244 | autoloads. |
| 30 | 245 | ||
| 31 | * net/network-stream.el (network-stream-open-starttls): Support | 246 | * net/network-stream.el (network-stream-open-starttls): |
| 32 | using starttls.el without using gnutls-cli. | 247 | Support using starttls.el without using gnutls-cli. |
| 33 | 248 | ||
| 34 | 2011-08-17 Juri Linkov <juri@jurta.org> | 249 | 2011-08-17 Juri Linkov <juri@jurta.org> |
| 35 | 250 | ||
diff --git a/lisp/battery.el b/lisp/battery.el index d7d3045fa58..e0bba96b655 100644 --- a/lisp/battery.el +++ b/lisp/battery.el | |||
| @@ -199,7 +199,7 @@ seconds." | |||
| 199 | 'face | 199 | 'face |
| 200 | (and (<= (car (read-from-string (cdr (assq ?p data)))) | 200 | (and (<= (car (read-from-string (cdr (assq ?p data)))) |
| 201 | battery-load-critical) | 201 | battery-load-critical) |
| 202 | 'font-lock-warning-face) | 202 | 'error) |
| 203 | 'help-echo "Battery status information"))) | 203 | 'help-echo "Battery status information"))) |
| 204 | (force-mode-line-update)) | 204 | (force-mode-line-update)) |
| 205 | 205 | ||
diff --git a/lisp/bindings.el b/lisp/bindings.el index c4f9369219a..57bfeb60f82 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -834,6 +834,7 @@ if `inhibit-field-text-motion' is non-nil." | |||
| 834 | (setq i (1+ i)))) | 834 | (setq i (1+ i)))) |
| 835 | (define-key global-map [?\C-\M--] 'negative-argument) | 835 | (define-key global-map [?\C-\M--] 'negative-argument) |
| 836 | 836 | ||
| 837 | ;; Update tutorial--default-keys if you change these. | ||
| 837 | (define-key global-map "\177" 'delete-backward-char) | 838 | (define-key global-map "\177" 'delete-backward-char) |
| 838 | (define-key global-map "\C-d" 'delete-char) | 839 | (define-key global-map "\C-d" 'delete-char) |
| 839 | 840 | ||
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 389716b35b9..232c6c3808e 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -118,6 +118,13 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 118 | :standard (not noninteractive) | 118 | :standard (not noninteractive) |
| 119 | :initialize custom-initialize-delay | 119 | :initialize custom-initialize-delay |
| 120 | :set custom-set-minor-mode) | 120 | :set custom-set-minor-mode) |
| 121 | (bidi-paragraph-direction | ||
| 122 | paragraphs | ||
| 123 | (choice | ||
| 124 | (const :tag "Left to Right" left-to-right) | ||
| 125 | (const :tag "Right to Left" right-to-left) | ||
| 126 | (const :tag "Dynamic, according to paragraph text" nil)) | ||
| 127 | "24.1") | ||
| 121 | ;; callint.c | 128 | ;; callint.c |
| 122 | (mark-even-if-inactive editing-basics boolean) | 129 | (mark-even-if-inactive editing-basics boolean) |
| 123 | ;; callproc.c | 130 | ;; callproc.c |
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 157749500e7..8276030ccf8 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -778,6 +778,7 @@ Redefining FUNCTION also cancels it." | |||
| 778 | (not (debugger-special-form-p symbol)))) | 778 | (not (debugger-special-form-p symbol)))) |
| 779 | t nil nil (symbol-name fn))) | 779 | t nil nil (symbol-name fn))) |
| 780 | (list (if (equal val "") fn (intern val))))) | 780 | (list (if (equal val "") fn (intern val))))) |
| 781 | ;; FIXME: Use advice.el. | ||
| 781 | (when (debugger-special-form-p function) | 782 | (when (debugger-special-form-p function) |
| 782 | (error "Function %s is a special form" function)) | 783 | (error "Function %s is a special form" function)) |
| 783 | (if (or (symbolp (symbol-function function)) | 784 | (if (or (symbolp (symbol-function function)) |
| @@ -835,24 +836,30 @@ To specify a nil argument interactively, exit with an empty minibuffer." | |||
| 835 | (message "Cancelling debug-on-entry for all functions") | 836 | (message "Cancelling debug-on-entry for all functions") |
| 836 | (mapcar 'cancel-debug-on-entry debug-function-list))) | 837 | (mapcar 'cancel-debug-on-entry debug-function-list))) |
| 837 | 838 | ||
| 839 | (defun debug-arglist (definition) | ||
| 840 | ;; FIXME: copied from ad-arglist. | ||
| 841 | "Return the argument list of DEFINITION." | ||
| 842 | (require 'help-fns) | ||
| 843 | (help-function-arglist definition 'preserve-names)) | ||
| 844 | |||
| 838 | (defun debug-convert-byte-code (function) | 845 | (defun debug-convert-byte-code (function) |
| 839 | (let* ((defn (symbol-function function)) | 846 | (let* ((defn (symbol-function function)) |
| 840 | (macro (eq (car-safe defn) 'macro))) | 847 | (macro (eq (car-safe defn) 'macro))) |
| 841 | (when macro (setq defn (cdr defn))) | 848 | (when macro (setq defn (cdr defn))) |
| 842 | (unless (consp defn) | 849 | (when (byte-code-function-p defn) |
| 843 | ;; Assume a compiled code object. | 850 | (let* ((args (debug-arglist defn)) |
| 844 | (let* ((contents (append defn nil)) | ||
| 845 | (body | 851 | (body |
| 846 | (list (list 'byte-code (nth 1 contents) | 852 | `((,(if (memq '&rest args) #'apply #'funcall) |
| 847 | (nth 2 contents) (nth 3 contents))))) | 853 | ,defn |
| 848 | (if (nthcdr 5 contents) | 854 | ,@(remq '&rest (remq '&optional args)))))) |
| 849 | (setq body (cons (list 'interactive (nth 5 contents)) body))) | 855 | (if (> (length defn) 5) |
| 850 | (if (nth 4 contents) | 856 | (push `(interactive ,(aref defn 5)) body)) |
| 857 | (if (aref defn 4) | ||
| 851 | ;; Use `documentation' here, to get the actual string, | 858 | ;; Use `documentation' here, to get the actual string, |
| 852 | ;; in case the compiled function has a reference | 859 | ;; in case the compiled function has a reference |
| 853 | ;; to the .elc file. | 860 | ;; to the .elc file. |
| 854 | (setq body (cons (documentation function) body))) | 861 | (setq body (cons (documentation function) body))) |
| 855 | (setq defn (cons 'lambda (cons (car contents) body)))) | 862 | (setq defn `(closure (t) ,args ,@body))) |
| 856 | (when macro (setq defn (cons 'macro defn))) | 863 | (when macro (setq defn (cons 'macro defn))) |
| 857 | (fset function defn)))) | 864 | (fset function defn)))) |
| 858 | 865 | ||
| @@ -861,11 +868,12 @@ To specify a nil argument interactively, exit with an empty minibuffer." | |||
| 861 | (tail defn)) | 868 | (tail defn)) |
| 862 | (when (eq (car-safe tail) 'macro) | 869 | (when (eq (car-safe tail) 'macro) |
| 863 | (setq tail (cdr tail))) | 870 | (setq tail (cdr tail))) |
| 864 | (if (not (eq (car-safe tail) 'lambda)) | 871 | (if (not (memq (car-safe tail) '(closure lambda))) |
| 865 | ;; Only signal an error when we try to set debug-on-entry. | 872 | ;; Only signal an error when we try to set debug-on-entry. |
| 866 | ;; When we try to clear debug-on-entry, we are now done. | 873 | ;; When we try to clear debug-on-entry, we are now done. |
| 867 | (when flag | 874 | (when flag |
| 868 | (error "%s is not a user-defined Lisp function" function)) | 875 | (error "%s is not a user-defined Lisp function" function)) |
| 876 | (if (eq (car tail) 'closure) (setq tail (cdr tail))) | ||
| 869 | (setq tail (cdr tail)) | 877 | (setq tail (cdr tail)) |
| 870 | ;; Skip the docstring. | 878 | ;; Skip the docstring. |
| 871 | (when (and (stringp (cadr tail)) (cddr tail)) | 879 | (when (and (stringp (cadr tail)) (cddr tail)) |
| @@ -875,9 +883,9 @@ To specify a nil argument interactively, exit with an empty minibuffer." | |||
| 875 | (setq tail (cdr tail))) | 883 | (setq tail (cdr tail))) |
| 876 | (unless (eq flag (equal (cadr tail) '(implement-debug-on-entry))) | 884 | (unless (eq flag (equal (cadr tail) '(implement-debug-on-entry))) |
| 877 | ;; Add/remove debug statement as needed. | 885 | ;; Add/remove debug statement as needed. |
| 878 | (if flag | 886 | (setcdr tail (if flag |
| 879 | (setcdr tail (cons '(implement-debug-on-entry) (cdr tail))) | 887 | (cons '(implement-debug-on-entry) (cdr tail)) |
| 880 | (setcdr tail (cddr tail))))) | 888 | (cddr tail))))) |
| 881 | defn)) | 889 | defn)) |
| 882 | 890 | ||
| 883 | (defun debugger-list-functions () | 891 | (defun debugger-list-functions () |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index f84de0308bf..57d25c9e169 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -3408,7 +3408,7 @@ go to the end of the last sexp, or if that is the same point, then step." | |||
| 3408 | (message "%s is already instrumented." func) | 3408 | (message "%s is already instrumented." func) |
| 3409 | func) | 3409 | func) |
| 3410 | (t | 3410 | (t |
| 3411 | (let ((loc (find-function-noselect func))) | 3411 | (let ((loc (find-function-noselect func t))) |
| 3412 | (unless (cdr loc) | 3412 | (unless (cdr loc) |
| 3413 | (error "Could not find the definition in its file")) | 3413 | (error "Could not find the definition in its file")) |
| 3414 | (with-current-buffer (car loc) | 3414 | (with-current-buffer (car loc) |
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 83c09b6fe0f..f1fe9594fc0 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el | |||
| @@ -1312,20 +1312,20 @@ Summary: | |||
| 1312 | (defun eieio--defmethod (method kind argclass code) | 1312 | (defun eieio--defmethod (method kind argclass code) |
| 1313 | "Work part of the `defmethod' macro defining METHOD with ARGS." | 1313 | "Work part of the `defmethod' macro defining METHOD with ARGS." |
| 1314 | (let ((key | 1314 | (let ((key |
| 1315 | ;; find optional keys | 1315 | ;; find optional keys |
| 1316 | (cond ((or (eq ':BEFORE kind) | 1316 | (cond ((or (eq ':BEFORE kind) |
| 1317 | (eq ':before kind)) | 1317 | (eq ':before kind)) |
| 1318 | method-before) | 1318 | method-before) |
| 1319 | ((or (eq ':AFTER kind) | 1319 | ((or (eq ':AFTER kind) |
| 1320 | (eq ':after kind)) | 1320 | (eq ':after kind)) |
| 1321 | method-after) | 1321 | method-after) |
| 1322 | ((or (eq ':PRIMARY kind) | 1322 | ((or (eq ':PRIMARY kind) |
| 1323 | (eq ':primary kind)) | 1323 | (eq ':primary kind)) |
| 1324 | method-primary) | 1324 | method-primary) |
| 1325 | ((or (eq ':STATIC kind) | 1325 | ((or (eq ':STATIC kind) |
| 1326 | (eq ':static kind)) | 1326 | (eq ':static kind)) |
| 1327 | method-static) | 1327 | method-static) |
| 1328 | ;; Primary key | 1328 | ;; Primary key |
| 1329 | (t method-primary)))) | 1329 | (t method-primary)))) |
| 1330 | ;; Make sure there is a generic (when called from defclass). | 1330 | ;; Make sure there is a generic (when called from defclass). |
| 1331 | (eieio--defalias | 1331 | (eieio--defalias |
| @@ -1338,8 +1338,8 @@ Summary: | |||
| 1338 | ;; under the type `primary' which is a non-specific calling of the | 1338 | ;; under the type `primary' which is a non-specific calling of the |
| 1339 | ;; function. | 1339 | ;; function. |
| 1340 | (if argclass | 1340 | (if argclass |
| 1341 | (if (not (class-p argclass)) | 1341 | (if (not (class-p argclass)) |
| 1342 | (error "Unknown class type %s in method parameters" | 1342 | (error "Unknown class type %s in method parameters" |
| 1343 | argclass)) | 1343 | argclass)) |
| 1344 | (if (= key -1) | 1344 | (if (= key -1) |
| 1345 | (signal 'wrong-type-argument (list :static 'non-class-arg))) | 1345 | (signal 'wrong-type-argument (list :static 'non-class-arg))) |
| @@ -2864,6 +2864,106 @@ of `eq'." | |||
| 2864 | ) | 2864 | ) |
| 2865 | 2865 | ||
| 2866 | 2866 | ||
| 2867 | ;;; Obsolete backward compatibility functions. | ||
| 2868 | ;; Needed to run byte-code compiled with the EIEIO of Emacs-23. | ||
| 2869 | |||
| 2870 | (defun eieio-defmethod (method args) | ||
| 2871 | "Obsolete work part of an old version of the `defmethod' macro." | ||
| 2872 | (let ((key nil) (body nil) (firstarg nil) (argfix nil) (argclass nil) loopa) | ||
| 2873 | ;; find optional keys | ||
| 2874 | (setq key | ||
| 2875 | (cond ((or (eq ':BEFORE (car args)) | ||
| 2876 | (eq ':before (car args))) | ||
| 2877 | (setq args (cdr args)) | ||
| 2878 | method-before) | ||
| 2879 | ((or (eq ':AFTER (car args)) | ||
| 2880 | (eq ':after (car args))) | ||
| 2881 | (setq args (cdr args)) | ||
| 2882 | method-after) | ||
| 2883 | ((or (eq ':PRIMARY (car args)) | ||
| 2884 | (eq ':primary (car args))) | ||
| 2885 | (setq args (cdr args)) | ||
| 2886 | method-primary) | ||
| 2887 | ((or (eq ':STATIC (car args)) | ||
| 2888 | (eq ':static (car args))) | ||
| 2889 | (setq args (cdr args)) | ||
| 2890 | method-static) | ||
| 2891 | ;; Primary key | ||
| 2892 | (t method-primary))) | ||
| 2893 | ;; get body, and fix contents of args to be the arguments of the fn. | ||
| 2894 | (setq body (cdr args) | ||
| 2895 | args (car args)) | ||
| 2896 | (setq loopa args) | ||
| 2897 | ;; Create a fixed version of the arguments | ||
| 2898 | (while loopa | ||
| 2899 | (setq argfix (cons (if (listp (car loopa)) (car (car loopa)) (car loopa)) | ||
| 2900 | argfix)) | ||
| 2901 | (setq loopa (cdr loopa))) | ||
| 2902 | ;; make sure there is a generic | ||
| 2903 | (eieio-defgeneric | ||
| 2904 | method | ||
| 2905 | (if (stringp (car body)) | ||
| 2906 | (car body) (format "Generically created method `%s'." method))) | ||
| 2907 | ;; create symbol for property to bind to. If the first arg is of | ||
| 2908 | ;; the form (varname vartype) and `vartype' is a class, then | ||
| 2909 | ;; that class will be the type symbol. If not, then it will fall | ||
| 2910 | ;; under the type `primary' which is a non-specific calling of the | ||
| 2911 | ;; function. | ||
| 2912 | (setq firstarg (car args)) | ||
| 2913 | (if (listp firstarg) | ||
| 2914 | (progn | ||
| 2915 | (setq argclass (nth 1 firstarg)) | ||
| 2916 | (if (not (class-p argclass)) | ||
| 2917 | (error "Unknown class type %s in method parameters" | ||
| 2918 | (nth 1 firstarg)))) | ||
| 2919 | (if (= key -1) | ||
| 2920 | (signal 'wrong-type-argument (list :static 'non-class-arg))) | ||
| 2921 | ;; generics are higher | ||
| 2922 | (setq key (eieio-specialized-key-to-generic-key key))) | ||
| 2923 | ;; Put this lambda into the symbol so we can find it | ||
| 2924 | (if (byte-code-function-p (car-safe body)) | ||
| 2925 | (eieiomt-add method (car-safe body) key argclass) | ||
| 2926 | (eieiomt-add method (append (list 'lambda (reverse argfix)) body) | ||
| 2927 | key argclass)) | ||
| 2928 | ) | ||
| 2929 | |||
| 2930 | (when eieio-optimize-primary-methods-flag | ||
| 2931 | ;; Optimizing step: | ||
| 2932 | ;; | ||
| 2933 | ;; If this method, after this setup, only has primary methods, then | ||
| 2934 | ;; we can setup the generic that way. | ||
| 2935 | (if (generic-primary-only-p method) | ||
| 2936 | ;; If there is only one primary method, then we can go one more | ||
| 2937 | ;; optimization step. | ||
| 2938 | (if (generic-primary-only-one-p method) | ||
| 2939 | (eieio-defgeneric-reset-generic-form-primary-only-one method) | ||
| 2940 | (eieio-defgeneric-reset-generic-form-primary-only method)) | ||
| 2941 | (eieio-defgeneric-reset-generic-form method))) | ||
| 2942 | |||
| 2943 | method) | ||
| 2944 | (make-obsolete 'eieio-defmethod 'eieio--defmethod "24.1") | ||
| 2945 | |||
| 2946 | (defun eieio-defgeneric (method doc-string) | ||
| 2947 | "Obsolete work part of an old version of the `defgeneric' macro." | ||
| 2948 | (if (and (fboundp method) (not (generic-p method)) | ||
| 2949 | (or (byte-code-function-p (symbol-function method)) | ||
| 2950 | (not (eq 'autoload (car (symbol-function method))))) | ||
| 2951 | ) | ||
| 2952 | (error "You cannot create a generic/method over an existing symbol: %s" | ||
| 2953 | method)) | ||
| 2954 | ;; Don't do this over and over. | ||
| 2955 | (unless (fboundp 'method) | ||
| 2956 | ;; This defun tells emacs where the first definition of this | ||
| 2957 | ;; method is defined. | ||
| 2958 | `(defun ,method nil) | ||
| 2959 | ;; Make sure the method tables are installed. | ||
| 2960 | (eieiomt-install method) | ||
| 2961 | ;; Apply the actual body of this function. | ||
| 2962 | (fset method (eieio-defgeneric-form method doc-string)) | ||
| 2963 | ;; Return the method | ||
| 2964 | 'method)) | ||
| 2965 | (make-obsolete 'eieio-defgeneric nil "24.1") | ||
| 2966 | |||
| 2867 | ;;; Interfacing with edebug | 2967 | ;;; Interfacing with edebug |
| 2868 | ;; | 2968 | ;; |
| 2869 | (defun eieio-edebug-prin1-to-string (object &optional noescape) | 2969 | (defun eieio-edebug-prin1-to-string (object &optional noescape) |
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 0194af2e3a8..2c7208db8a3 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el | |||
| @@ -312,7 +312,7 @@ The search is done in the source for library LIBRARY." | |||
| 312 | (cons (current-buffer) nil)))))))) | 312 | (cons (current-buffer) nil)))))))) |
| 313 | 313 | ||
| 314 | ;;;###autoload | 314 | ;;;###autoload |
| 315 | (defun find-function-noselect (function) | 315 | (defun find-function-noselect (function &optional lisp-only) |
| 316 | "Return a pair (BUFFER . POINT) pointing to the definition of FUNCTION. | 316 | "Return a pair (BUFFER . POINT) pointing to the definition of FUNCTION. |
| 317 | 317 | ||
| 318 | Finds the source file containing the definition of FUNCTION | 318 | Finds the source file containing the definition of FUNCTION |
| @@ -320,6 +320,10 @@ in a buffer and the point of the definition. The buffer is | |||
| 320 | not selected. If the function definition can't be found in | 320 | not selected. If the function definition can't be found in |
| 321 | the buffer, returns (BUFFER). | 321 | the buffer, returns (BUFFER). |
| 322 | 322 | ||
| 323 | If FUNCTION is a built-in function, this function normally | ||
| 324 | attempts to find it in the Emacs C sources; however, if LISP-ONLY | ||
| 325 | is non-nil, signal an error instead. | ||
| 326 | |||
| 323 | If the file where FUNCTION is defined is not known, then it is | 327 | If the file where FUNCTION is defined is not known, then it is |
| 324 | searched for in `find-function-source-path' if non-nil, otherwise | 328 | searched for in `find-function-source-path' if non-nil, otherwise |
| 325 | in `load-path'." | 329 | in `load-path'." |
| @@ -345,6 +349,8 @@ in `load-path'." | |||
| 345 | (cond ((eq (car-safe def) 'autoload) | 349 | (cond ((eq (car-safe def) 'autoload) |
| 346 | (nth 1 def)) | 350 | (nth 1 def)) |
| 347 | ((subrp def) | 351 | ((subrp def) |
| 352 | (if lisp-only | ||
| 353 | (error "%s is a built-in function" function)) | ||
| 348 | (help-C-file-name def 'subr)) | 354 | (help-C-file-name def 'subr)) |
| 349 | ((symbol-file function 'defun))))) | 355 | ((symbol-file function 'defun))))) |
| 350 | (find-function-search-for-symbol function nil library)))) | 356 | (find-function-search-for-symbol function nil library)))) |
diff --git a/lisp/faces.el b/lisp/faces.el index 404bd7b6609..3c4a3330c81 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -2435,7 +2435,7 @@ It is used for characters of no fonts too." | |||
| 2435 | 2435 | ||
| 2436 | (defface success | 2436 | (defface success |
| 2437 | '((((class color) (min-colors 16) (background light)) | 2437 | '((((class color) (min-colors 16) (background light)) |
| 2438 | (:foreground "Green3" :weight bold)) | 2438 | (:foreground "ForestGreen" :weight bold)) |
| 2439 | (((class color) (min-colors 88) (background dark)) | 2439 | (((class color) (min-colors 88) (background dark)) |
| 2440 | (:foreground "Green1" :weight bold)) | 2440 | (:foreground "Green1" :weight bold)) |
| 2441 | (((class color) (min-colors 16) (background dark)) | 2441 | (((class color) (min-colors 16) (background dark)) |
diff --git a/lisp/files.el b/lisp/files.el index 6b8a352f20c..07188e152b3 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -3003,9 +3003,10 @@ mode, if there is one, otherwise nil." | |||
| 3003 | "-mode")))) | 3003 | "-mode")))) |
| 3004 | (or (equal keyname "coding") | 3004 | (or (equal keyname "coding") |
| 3005 | (condition-case nil | 3005 | (condition-case nil |
| 3006 | (push (cons (if (eq key 'eval) | 3006 | (push (cons (cond ((eq key 'eval) 'eval) |
| 3007 | 'eval | 3007 | ;; Downcase "Mode:". |
| 3008 | (indirect-variable key)) | 3008 | ((equal keyname "mode") 'mode) |
| 3009 | (t (indirect-variable key))) | ||
| 3009 | val) result) | 3010 | val) result) |
| 3010 | (error nil)))) | 3011 | (error nil)))) |
| 3011 | (skip-chars-forward " \t;"))) | 3012 | (skip-chars-forward " \t;"))) |
| @@ -3153,6 +3154,8 @@ major-mode." | |||
| 3153 | (var (let ((read-circle nil)) | 3154 | (var (let ((read-circle nil)) |
| 3154 | (read str))) | 3155 | (read str))) |
| 3155 | val val2) | 3156 | val val2) |
| 3157 | (and (equal (downcase (symbol-name var)) "mode") | ||
| 3158 | (setq var 'mode)) | ||
| 3156 | ;; Read the variable value. | 3159 | ;; Read the variable value. |
| 3157 | (skip-chars-forward "^:") | 3160 | (skip-chars-forward "^:") |
| 3158 | (forward-char 1) | 3161 | (forward-char 1) |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 9cf889e1aec..c37a9ae916e 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1018,14 +1018,20 @@ The region it returns may start or end in the middle of a line.") | |||
| 1018 | (funcall font-lock-unfontify-buffer-function)) | 1018 | (funcall font-lock-unfontify-buffer-function)) |
| 1019 | 1019 | ||
| 1020 | (defun font-lock-fontify-region (beg end &optional loudly) | 1020 | (defun font-lock-fontify-region (beg end &optional loudly) |
| 1021 | "Fontify the text between BEG and END. | ||
| 1022 | If LOUDLY is non-nil, print status messages while fontifying. | ||
| 1023 | This works by calling `font-lock-fontify-region-function'." | ||
| 1021 | (font-lock-set-defaults) | 1024 | (font-lock-set-defaults) |
| 1022 | (funcall font-lock-fontify-region-function beg end loudly)) | 1025 | (funcall font-lock-fontify-region-function beg end loudly)) |
| 1023 | 1026 | ||
| 1024 | (defun font-lock-unfontify-region (beg end) | 1027 | (defun font-lock-unfontify-region (beg end) |
| 1028 | "Unfontify the text between BEG and END. | ||
| 1029 | This works by calling `font-lock-unfontify-region-function'." | ||
| 1025 | (save-buffer-state | 1030 | (save-buffer-state |
| 1026 | (funcall font-lock-unfontify-region-function beg end))) | 1031 | (funcall font-lock-unfontify-region-function beg end))) |
| 1027 | 1032 | ||
| 1028 | (defun font-lock-default-fontify-buffer () | 1033 | (defun font-lock-default-fontify-buffer () |
| 1034 | "Fontify the whole buffer using `font-lock-fontify-region-function'." | ||
| 1029 | (let ((verbose (if (numberp font-lock-verbose) | 1035 | (let ((verbose (if (numberp font-lock-verbose) |
| 1030 | (> (buffer-size) font-lock-verbose) | 1036 | (> (buffer-size) font-lock-verbose) |
| 1031 | font-lock-verbose))) | 1037 | font-lock-verbose))) |
| @@ -1045,6 +1051,7 @@ The region it returns may start or end in the middle of a line.") | |||
| 1045 | (quit (font-lock-unfontify-buffer))))))) | 1051 | (quit (font-lock-unfontify-buffer))))))) |
| 1046 | 1052 | ||
| 1047 | (defun font-lock-default-unfontify-buffer () | 1053 | (defun font-lock-default-unfontify-buffer () |
| 1054 | "Unfontify the whole buffer using `font-lock-unfontify-region-function'." | ||
| 1048 | ;; Make sure we unfontify etc. in the whole buffer. | 1055 | ;; Make sure we unfontify etc. in the whole buffer. |
| 1049 | (save-restriction | 1056 | (save-restriction |
| 1050 | (widen) | 1057 | (widen) |
| @@ -1114,6 +1121,9 @@ Put first the functions more likely to cause a change and cheaper to compute.") | |||
| 1114 | changed)) | 1121 | changed)) |
| 1115 | 1122 | ||
| 1116 | (defun font-lock-default-fontify-region (beg end loudly) | 1123 | (defun font-lock-default-fontify-region (beg end loudly) |
| 1124 | "Fontify the text between BEG and END. | ||
| 1125 | If LOUDLY is non-nil, print status messages while fontifying. | ||
| 1126 | This function is the default `font-lock-fontify-region-function'." | ||
| 1117 | (save-buffer-state | 1127 | (save-buffer-state |
| 1118 | ;; Use the fontification syntax table, if any. | 1128 | ;; Use the fontification syntax table, if any. |
| 1119 | (with-syntax-table (or font-lock-syntax-table (syntax-table)) | 1129 | (with-syntax-table (or font-lock-syntax-table (syntax-table)) |
| @@ -1162,6 +1172,8 @@ This is used by `font-lock-default-unfontify-region' to decide | |||
| 1162 | what properties to clear before refontifying a region.") | 1172 | what properties to clear before refontifying a region.") |
| 1163 | 1173 | ||
| 1164 | (defun font-lock-default-unfontify-region (beg end) | 1174 | (defun font-lock-default-unfontify-region (beg end) |
| 1175 | "Unfontify the text between BEG and END. | ||
| 1176 | This function is the default `font-lock-unfontify-region-function'." | ||
| 1165 | (remove-list-of-text-properties | 1177 | (remove-list-of-text-properties |
| 1166 | beg end (append | 1178 | beg end (append |
| 1167 | font-lock-extra-managed-props | 1179 | font-lock-extra-managed-props |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 64ac50fe8f0..ad3e26f0f51 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,41 @@ | |||
| 1 | 2011-08-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * nnmail.el (nnmail-get-new-mail-1): If one mail source bugs out, | ||
| 4 | continue on and do the clean-up phase (bug#9188). | ||
| 5 | |||
| 6 | * gnus-sum.el (gnus-summary-expire-articles): When expiring articles, | ||
| 7 | just ignore groups that can't be opened instead of erroring out | ||
| 8 | (bug#9225). | ||
| 9 | |||
| 10 | * gnus-art.el (gnus-article-update-date-headers): Flip the default to | ||
| 11 | nil since some many people are fuddy-duddies. | ||
| 12 | |||
| 13 | * gnus-html.el (gnus-html-image-fetched): Don't cache zero-length | ||
| 14 | images. | ||
| 15 | |||
| 16 | * nntp.el (nntp-authinfo-file): Mark as obsolete -- use auth-source | ||
| 17 | instead. | ||
| 18 | |||
| 19 | * pop3.el (pop3-wait-for-messages): Don't use Gnus functions here. | ||
| 20 | |||
| 21 | * gnus-util.el (gnus-process-live-p): Copy over compat function. | ||
| 22 | |||
| 23 | * pop3.el (pop3-wait-for-messages): If the pop3 process dies, stop | ||
| 24 | processing. | ||
| 25 | |||
| 26 | * nntp.el (nntp-kill-buffer): Kill the process before killing the | ||
| 27 | buffer to avoid warnings. | ||
| 28 | |||
| 29 | 2011-08-20 Simon Josefsson <simon@josefsson.org> | ||
| 30 | |||
| 31 | * gnus-agent.el (gnus-agent-expire-done-message): Use %.f as format | ||
| 32 | specified to reduce precision. | ||
| 33 | |||
| 34 | 2011-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 35 | |||
| 36 | * nnimap.el (nnimap-transform-headers): Protect against (NIL ...) | ||
| 37 | bodystructures (bug#9314). | ||
| 38 | |||
| 1 | 2011-08-19 Katsumi Yamaoka <yamaoka@jpl.org> | 39 | 2011-08-19 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 40 | ||
| 3 | * gnus-art.el (gnus-insert-mime-button, gnus-mime-display-alternative): | 41 | * gnus-art.el (gnus-insert-mime-button, gnus-mime-display-alternative): |
| @@ -12,8 +50,29 @@ | |||
| 12 | `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't | 50 | `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't |
| 13 | available anymore. | 51 | available anymore. |
| 14 | 52 | ||
| 53 | 2011-08-12 Simon Josefsson <simon@josefsson.org> | ||
| 54 | |||
| 55 | * starttls.el (starttls-any-program-available): Define as obsolete | ||
| 56 | function. | ||
| 57 | |||
| 58 | 2011-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 59 | |||
| 60 | * gnus-util.el (gnus-y-or-n-p): Reinstate the message-clearing y-or-n-p | ||
| 61 | versions which Gnus use when appropriate. | ||
| 62 | |||
| 63 | * gnus-group.el (gnus-group-clear-data): Add a y-or-n query, since it's | ||
| 64 | a pretty destructive command. | ||
| 65 | |||
| 66 | * nnmail.el (nnmail-extra-headers): Clarify slightly (bug#9302). | ||
| 67 | |||
| 15 | 2011-08-17 Lars Magne Ingebrigtsen <larsi@gnus.org> | 68 | 2011-08-17 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 16 | 69 | ||
| 70 | * message.el (message-fix-before-sending): Make a different warning | ||
| 71 | about NUL characters (bug#9270). | ||
| 72 | |||
| 73 | * gnus-sum.el (gnus-auto-select-subject): Allow specifying a function | ||
| 74 | from custom (bug#9260). | ||
| 75 | |||
| 17 | * gnus-spec.el (gnus-lrm-string): Use 8206 instead of ?\x200e to make | 76 | * gnus-spec.el (gnus-lrm-string): Use 8206 instead of ?\x200e to make |
| 18 | things work in Emacs 22 and XEmacs, too. | 77 | things work in Emacs 22 and XEmacs, too. |
| 19 | 78 | ||
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 424c55c40f5..26222119b98 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el | |||
| @@ -3560,7 +3560,7 @@ articles in every agentized group? ")) | |||
| 3560 | units (cdr units))) | 3560 | units (cdr units))) |
| 3561 | 3561 | ||
| 3562 | (format "Expiry recovered %d NOV entries, deleted %d files,\ | 3562 | (format "Expiry recovered %d NOV entries, deleted %d files,\ |
| 3563 | and freed %f %s." | 3563 | and freed %.f %s." |
| 3564 | (nth 0 stats) | 3564 | (nth 0 stats) |
| 3565 | (nth 1 stats) | 3565 | (nth 1 stats) |
| 3566 | size (car units))) | 3566 | size (car units))) |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index c6e0180dadc..eaf0ed52f51 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -1039,7 +1039,7 @@ Some of these headers are updated automatically. See | |||
| 1039 | (item :tag "ISO8601 format" :value 'iso8601) | 1039 | (item :tag "ISO8601 format" :value 'iso8601) |
| 1040 | (item :tag "User-defined" :value 'user-defined))) | 1040 | (item :tag "User-defined" :value 'user-defined))) |
| 1041 | 1041 | ||
| 1042 | (defcustom gnus-article-update-date-headers 1 | 1042 | (defcustom gnus-article-update-date-headers nil |
| 1043 | "A number that says how often to update the date header (in seconds). | 1043 | "A number that says how often to update the date header (in seconds). |
| 1044 | If nil, don't update it at all." | 1044 | If nil, don't update it at all." |
| 1045 | :version "24.1" | 1045 | :version "24.1" |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 2a31ccd34f0..5ae29053b6f 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -3471,13 +3471,14 @@ sort in reverse order." | |||
| 3471 | "Clear all marks and read ranges from the current group. | 3471 | "Clear all marks and read ranges from the current group. |
| 3472 | Obeys the process/prefix convention." | 3472 | Obeys the process/prefix convention." |
| 3473 | (interactive "P") | 3473 | (interactive "P") |
| 3474 | (gnus-group-iterate arg | 3474 | (when (gnus-y-or-n-p "Really clear data? ") |
| 3475 | (lambda (group) | 3475 | (gnus-group-iterate arg |
| 3476 | (let (info) | 3476 | (lambda (group) |
| 3477 | (gnus-info-clear-data (setq info (gnus-get-info group))) | 3477 | (let (info) |
| 3478 | (gnus-get-unread-articles-in-group info (gnus-active group) t) | 3478 | (gnus-info-clear-data (setq info (gnus-get-info group))) |
| 3479 | (when (gnus-group-goto-group group) | 3479 | (gnus-get-unread-articles-in-group info (gnus-active group) t) |
| 3480 | (gnus-group-update-group-line)))))) | 3480 | (when (gnus-group-goto-group group) |
| 3481 | (gnus-group-update-group-line))))))) | ||
| 3481 | 3482 | ||
| 3482 | (defun gnus-group-clear-data-on-native-groups () | 3483 | (defun gnus-group-clear-data-on-native-groups () |
| 3483 | "Clear all marks and read ranges from all native groups." | 3484 | "Clear all marks and read ranges from all native groups." |
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index d3da6aab1b7..f443c4021e2 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el | |||
| @@ -399,15 +399,16 @@ Use ALT-TEXT for the image string." | |||
| 399 | (defun gnus-html-image-fetched (status buffer image) | 399 | (defun gnus-html-image-fetched (status buffer image) |
| 400 | "Callback function called when image has been fetched." | 400 | "Callback function called when image has been fetched." |
| 401 | (unless (plist-get status :error) | 401 | (unless (plist-get status :error) |
| 402 | (when gnus-html-image-automatic-caching | ||
| 403 | (url-store-in-cache (current-buffer))) | ||
| 404 | (when (and (or (search-forward "\n\n" nil t) | 402 | (when (and (or (search-forward "\n\n" nil t) |
| 405 | (search-forward "\r\n\r\n" nil t)) | 403 | (search-forward "\r\n\r\n" nil t)) |
| 406 | (buffer-live-p buffer)) | 404 | (not (eobp))) |
| 407 | (let ((data (buffer-substring (point) (point-max)))) | 405 | (when gnus-html-image-automatic-caching |
| 408 | (with-current-buffer buffer | 406 | (url-store-in-cache (current-buffer))) |
| 409 | (let ((inhibit-read-only t)) | 407 | (when (buffer-live-p buffer) |
| 410 | (gnus-html-put-image data (car image) (cadr image))))))) | 408 | (let ((data (buffer-substring (point) (point-max)))) |
| 409 | (with-current-buffer buffer | ||
| 410 | (let ((inhibit-read-only t)) | ||
| 411 | (gnus-html-put-image data (car image) (cadr image)))))))) | ||
| 411 | (kill-buffer (current-buffer))) | 412 | (kill-buffer (current-buffer))) |
| 412 | 413 | ||
| 413 | (defun gnus-html-get-image-data (url) | 414 | (defun gnus-html-get-image-data (url) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index cd4699e6107..c01f91973a0 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -375,7 +375,8 @@ place point on some subject line." | |||
| 375 | (const unread) | 375 | (const unread) |
| 376 | (const first) | 376 | (const first) |
| 377 | (const unseen) | 377 | (const unseen) |
| 378 | (const unseen-or-unread))) | 378 | (const unseen-or-unread) |
| 379 | (function :tag "Function to call"))) | ||
| 379 | 380 | ||
| 380 | (defcustom gnus-auto-select-next t | 381 | (defcustom gnus-auto-select-next t |
| 381 | "*If non-nil, offer to go to the next group from the end of the previous. | 382 | "*If non-nil, offer to go to the next group from the end of the previous. |
| @@ -10286,34 +10287,33 @@ This will be the case if the article has both been mailed and posted." | |||
| 10286 | ;; There are expirable articles in this group, so we run them | 10287 | ;; There are expirable articles in this group, so we run them |
| 10287 | ;; through the expiry process. | 10288 | ;; through the expiry process. |
| 10288 | (gnus-message 6 "Expiring articles...") | 10289 | (gnus-message 6 "Expiring articles...") |
| 10289 | (unless (gnus-check-group gnus-newsgroup-name) | 10290 | (when (gnus-check-group gnus-newsgroup-name) |
| 10290 | (error "Can't open server for %s" gnus-newsgroup-name)) | 10291 | ;; The list of articles that weren't expired is returned. |
| 10291 | ;; The list of articles that weren't expired is returned. | 10292 | (save-excursion |
| 10292 | (save-excursion | 10293 | (if expiry-wait |
| 10293 | (if expiry-wait | 10294 | (let ((nnmail-expiry-wait-function nil) |
| 10294 | (let ((nnmail-expiry-wait-function nil) | 10295 | (nnmail-expiry-wait expiry-wait)) |
| 10295 | (nnmail-expiry-wait expiry-wait)) | 10296 | (setq es (gnus-request-expire-articles |
| 10296 | (setq es (gnus-request-expire-articles | 10297 | expirable gnus-newsgroup-name))) |
| 10297 | expirable gnus-newsgroup-name))) | 10298 | (setq es (gnus-request-expire-articles |
| 10298 | (setq es (gnus-request-expire-articles | 10299 | expirable gnus-newsgroup-name))) |
| 10299 | expirable gnus-newsgroup-name))) | 10300 | (unless total |
| 10300 | (unless total | 10301 | (setq gnus-newsgroup-expirable es)) |
| 10301 | (setq gnus-newsgroup-expirable es)) | 10302 | ;; We go through the old list of expirable, and mark all |
| 10302 | ;; We go through the old list of expirable, and mark all | 10303 | ;; really expired articles as nonexistent. |
| 10303 | ;; really expired articles as nonexistent. | 10304 | (unless (eq es expirable) ;If nothing was expired, we don't mark. |
| 10304 | (unless (eq es expirable) ;If nothing was expired, we don't mark. | 10305 | (let ((gnus-use-cache nil)) |
| 10305 | (let ((gnus-use-cache nil)) | 10306 | (dolist (article expirable) |
| 10306 | (dolist (article expirable) | 10307 | (when (and (not (memq article es)) |
| 10307 | (when (and (not (memq article es)) | 10308 | (gnus-data-find article)) |
| 10308 | (gnus-data-find article)) | 10309 | (gnus-summary-mark-article article gnus-canceled-mark) |
| 10309 | (gnus-summary-mark-article article gnus-canceled-mark) | 10310 | (run-hook-with-args 'gnus-summary-article-expire-hook |
| 10310 | (run-hook-with-args 'gnus-summary-article-expire-hook | 10311 | 'delete |
| 10311 | 'delete | 10312 | (gnus-data-header |
| 10312 | (gnus-data-header | 10313 | (assoc article (gnus-data-list nil))) |
| 10313 | (assoc article (gnus-data-list nil))) | 10314 | gnus-newsgroup-name |
| 10314 | gnus-newsgroup-name | 10315 | nil |
| 10315 | nil | 10316 | nil))))))) |
| 10316 | nil)))))) | ||
| 10317 | (gnus-message 6 "Expiring articles...done"))))) | 10317 | (gnus-message 6 "Expiring articles...done"))))) |
| 10318 | 10318 | ||
| 10319 | (defun gnus-summary-expire-articles-now () | 10319 | (defun gnus-summary-expire-articles-now () |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 7155c7f9607..34953611966 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -388,57 +388,14 @@ TIME defaults to the current time." | |||
| 388 | (define-key keymap key (pop plist)) | 388 | (define-key keymap key (pop plist)) |
| 389 | (pop plist))))) | 389 | (pop plist))))) |
| 390 | 390 | ||
| 391 | ;; Two silly functions to ensure that all `y-or-n-p' questions clear | 391 | (defun gnus-y-or-n-p (prompt) |
| 392 | ;; the echo area. | 392 | (prog1 |
| 393 | ;; | 393 | (y-or-n-p prompt) |
| 394 | ;; Do we really need these functions? Workarounds for bugs in the corresponding | 394 | (message ""))) |
| 395 | ;; Emacs functions? Maybe these bugs are no longer present in any supported | 395 | (defun gnus-yes-or-no-p (prompt) |
| 396 | ;; (X)Emacs version? Alias them to the original functions and see if anyone | 396 | (prog1 |
| 397 | ;; reports a problem. If not, replace with original functions. --rsteib, | 397 | (yes-or-no-p prompt) |
| 398 | ;; 2007-12-14 | 398 | (message ""))) |
| 399 | ;; | ||
| 400 | ;; All supported Emacsen clear the echo area after `yes-or-no-p', so we can | ||
| 401 | ;; remove `yes-or-no-p'. RMS says that not clearing after `y-or-n-p' is | ||
| 402 | ;; intentional (see below), so we could remove `gnus-y-or-n-p' too. | ||
| 403 | ;; Objections? --rsteib, 2008-02-16 | ||
| 404 | ;; | ||
| 405 | ;; ,----[ http://thread.gmane.org/gmane.emacs.gnus.general/65099/focus=66070 ] | ||
| 406 | ;; | From: Richard Stallman | ||
| 407 | ;; | Subject: Re: Do we need gnus-yes-or-no-p and gnus-y-or-n-p? | ||
| 408 | ;; | To: Katsumi Yamaoka [...] | ||
| 409 | ;; | Cc: emacs-devel@[...], xemacs-beta@[...], ding@[...] | ||
| 410 | ;; | Date: Mon, 07 Jan 2008 12:16:05 -0500 | ||
| 411 | ;; | Message-ID: <E1JBva1-000528-VY@fencepost.gnu.org> | ||
| 412 | ;; | | ||
| 413 | ;; | The behavior of `y-or-n-p' that it doesn't clear the question | ||
| 414 | ;; | and the answer is not serious of course, but I feel it is not | ||
| 415 | ;; | cool. | ||
| 416 | ;; | | ||
| 417 | ;; | It is intentional. | ||
| 418 | ;; | | ||
| 419 | ;; | Currently, it is commented out in the trunk by Reiner Steib. He | ||
| 420 | ;; | also wrote the benefit of leaving the question and the answer in | ||
| 421 | ;; | the echo area as follows: | ||
| 422 | ;; | | ||
| 423 | ;; | (http://article.gmane.org/gmane.emacs.gnus.general/66061) | ||
| 424 | ;; | > In contrast to yes-or-no-p it is much easier to type y, n, | ||
| 425 | ;; | > SPC, DEL, etc accidentally, so it might be useful for the user | ||
| 426 | ;; | > to see what he has typed. | ||
| 427 | ;; | | ||
| 428 | ;; | Yes, that is the reason. | ||
| 429 | ;; `---- | ||
| 430 | |||
| 431 | ;; (defun gnus-y-or-n-p (prompt) | ||
| 432 | ;; (prog1 | ||
| 433 | ;; (y-or-n-p prompt) | ||
| 434 | ;; (message ""))) | ||
| 435 | ;; (defun gnus-yes-or-no-p (prompt) | ||
| 436 | ;; (prog1 | ||
| 437 | ;; (yes-or-no-p prompt) | ||
| 438 | ;; (message ""))) | ||
| 439 | |||
| 440 | (defalias 'gnus-y-or-n-p 'y-or-n-p) | ||
| 441 | (defalias 'gnus-yes-or-no-p 'yes-or-no-p) | ||
| 442 | 399 | ||
| 443 | ;; By Frank Schmitt <ich@Frank-Schmitt.net>. Allows to have | 400 | ;; By Frank Schmitt <ich@Frank-Schmitt.net>. Allows to have |
| 444 | ;; age-depending date representations. (e.g. just the time if it's | 401 | ;; age-depending date representations. (e.g. just the time if it's |
| @@ -1292,6 +1249,13 @@ This function saves the current buffer." | |||
| 1292 | (with-current-buffer gnus-group-buffer | 1249 | (with-current-buffer gnus-group-buffer |
| 1293 | (eq major-mode 'gnus-group-mode)))) | 1250 | (eq major-mode 'gnus-group-mode)))) |
| 1294 | 1251 | ||
| 1252 | (defun gnus-process-live-p (process) | ||
| 1253 | "Returns non-nil if PROCESS is alive. | ||
| 1254 | A process is considered alive if its status is `run', `open', | ||
| 1255 | `listen', `connect' or `stop'." | ||
| 1256 | (memq (process-status process) | ||
| 1257 | '(run open listen connect stop))) | ||
| 1258 | |||
| 1295 | (defun gnus-remove-if (predicate sequence &optional hash-table-p) | 1259 | (defun gnus-remove-if (predicate sequence &optional hash-table-p) |
| 1296 | "Return a copy of SEQUENCE with all items satisfying PREDICATE removed. | 1260 | "Return a copy of SEQUENCE with all items satisfying PREDICATE removed. |
| 1297 | SEQUENCE should be a list, a vector, or a string. Returns always a list. | 1261 | SEQUENCE should be a list, a vector, or a string. Returns always a list. |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index a157afe2ce6..52cef1925a2 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -4254,8 +4254,10 @@ conformance." | |||
| 4254 | "Invisible text found and made visible; continue sending? ") | 4254 | "Invisible text found and made visible; continue sending? ") |
| 4255 | (error "Invisible text found and made visible"))))) | 4255 | (error "Invisible text found and made visible"))))) |
| 4256 | (message-check 'illegible-text | 4256 | (message-check 'illegible-text |
| 4257 | (let (char found choice) | 4257 | (let (char found choice nul-chars) |
| 4258 | (message-goto-body) | 4258 | (message-goto-body) |
| 4259 | (setq nul-chars (save-excursion | ||
| 4260 | (search-forward "\000" nil t))) | ||
| 4259 | (while (progn | 4261 | (while (progn |
| 4260 | (skip-chars-forward mm-7bit-chars) | 4262 | (skip-chars-forward mm-7bit-chars) |
| 4261 | (when (get-text-property (point) 'no-illegible-text) | 4263 | (when (get-text-property (point) 'no-illegible-text) |
| @@ -4281,7 +4283,9 @@ conformance." | |||
| 4281 | (when found | 4283 | (when found |
| 4282 | (setq choice | 4284 | (setq choice |
| 4283 | (gnus-multiple-choice | 4285 | (gnus-multiple-choice |
| 4284 | "Non-printable characters found. Continue sending?" | 4286 | (if nul-chars |
| 4287 | "NUL characters found, which may cause problems. Continue sending?" | ||
| 4288 | "Non-printable characters found. Continue sending?") | ||
| 4285 | `((?d "Remove non-printable characters and send") | 4289 | `((?d "Remove non-printable characters and send") |
| 4286 | (?r ,(format | 4290 | (?r ,(format |
| 4287 | "Replace non-printable characters with \"%s\" and send" | 4291 | "Replace non-printable characters with \"%s\" and send" |
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index c940e06fbb6..2dbc465f8c9 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el | |||
| @@ -216,9 +216,10 @@ textual parts.") | |||
| 216 | (let ((structure (ignore-errors | 216 | (let ((structure (ignore-errors |
| 217 | (read (current-buffer))))) | 217 | (read (current-buffer))))) |
| 218 | (while (and (consp structure) | 218 | (while (and (consp structure) |
| 219 | (not (stringp (car structure)))) | 219 | (not (atom (car structure)))) |
| 220 | (setq structure (car structure))) | 220 | (setq structure (car structure))) |
| 221 | (setq lines (if (and | 221 | (setq lines (if (and |
| 222 | (stringp (car structure)) | ||
| 222 | (equal (upcase (nth 0 structure)) "MESSAGE") | 223 | (equal (upcase (nth 0 structure)) "MESSAGE") |
| 223 | (equal (upcase (nth 1 structure)) "RFC822")) | 224 | (equal (upcase (nth 1 structure)) "RFC822")) |
| 224 | (nth 9 structure) | 225 | (nth 9 structure) |
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 8906a036779..d83467a1ed5 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el | |||
| @@ -554,7 +554,9 @@ parameter. It should return nil, `warn' or `delete'." | |||
| 554 | (const delete))) | 554 | (const delete))) |
| 555 | 555 | ||
| 556 | (defcustom nnmail-extra-headers '(To Newsgroups) | 556 | (defcustom nnmail-extra-headers '(To Newsgroups) |
| 557 | "*Extra headers to parse." | 557 | "Extra headers to parse. |
| 558 | In addition to the standard headers, these extra headers will be | ||
| 559 | included in NOV headers (and the like) when backends parse headers." | ||
| 558 | :version "21.1" | 560 | :version "21.1" |
| 559 | :group 'nnmail | 561 | :group 'nnmail |
| 560 | :type '(repeat symbol)) | 562 | :type '(repeat symbol)) |
| @@ -1840,18 +1842,23 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." | |||
| 1840 | ;; and fetch the mail from each. | 1842 | ;; and fetch the mail from each. |
| 1841 | (while (setq source (pop fetching-sources)) | 1843 | (while (setq source (pop fetching-sources)) |
| 1842 | (when (setq new | 1844 | (when (setq new |
| 1843 | (mail-source-fetch | 1845 | (condition-case cond |
| 1844 | source | 1846 | (mail-source-fetch |
| 1845 | (gnus-byte-compile | 1847 | source |
| 1846 | `(lambda (file orig-file) | 1848 | (gnus-byte-compile |
| 1847 | (nnmail-split-incoming | 1849 | `(lambda (file orig-file) |
| 1848 | file ',(intern (format "%s-save-mail" method)) | 1850 | (nnmail-split-incoming |
| 1849 | ',spool-func | 1851 | file ',(intern (format "%s-save-mail" method)) |
| 1850 | (or in-group | 1852 | ',spool-func |
| 1851 | (if (equal file orig-file) | 1853 | (or in-group |
| 1852 | nil | 1854 | (if (equal file orig-file) |
| 1853 | (nnmail-get-split-group orig-file ',source))) | 1855 | nil |
| 1854 | ',(intern (format "%s-active-number" method))))))) | 1856 | (nnmail-get-split-group orig-file |
| 1857 | ',source))) | ||
| 1858 | ',(intern (format "%s-active-number" method)))))) | ||
| 1859 | ((error quit) | ||
| 1860 | (message "Mail source %s failed: %s" source cond) | ||
| 1861 | 0))) | ||
| 1855 | (incf total new) | 1862 | (incf total new) |
| 1856 | (incf i))) | 1863 | (incf i))) |
| 1857 | ;; If we did indeed read any incoming spools, we save all info. | 1864 | ;; If we did indeed read any incoming spools, we save all info. |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 986fd51a613..325aa67f80d 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -261,6 +261,8 @@ See `nnml-marks-is-evil' for more information.") | |||
| 261 | (const :format "" "password") | 261 | (const :format "" "password") |
| 262 | (string :format "Password: %v"))))))) | 262 | (string :format "Password: %v"))))))) |
| 263 | 263 | ||
| 264 | (make-obsolete 'nntp-authinfo-file nil "Emacs 24.1") | ||
| 265 | |||
| 264 | 266 | ||
| 265 | 267 | ||
| 266 | (defvoo nntp-connection-timeout nil | 268 | (defvoo nntp-connection-timeout nil |
| @@ -430,6 +432,9 @@ be restored and the command retried." | |||
| 430 | 432 | ||
| 431 | (defun nntp-kill-buffer (buffer) | 433 | (defun nntp-kill-buffer (buffer) |
| 432 | (when (buffer-name buffer) | 434 | (when (buffer-name buffer) |
| 435 | (let ((process (get-buffer-process buffer))) | ||
| 436 | (when process | ||
| 437 | (delete-process process))) | ||
| 433 | (kill-buffer buffer) | 438 | (kill-buffer buffer) |
| 434 | (nnheader-init-server-buffer))) | 439 | (nnheader-init-server-buffer))) |
| 435 | 440 | ||
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index e29ddb0d44e..54c21703836 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el | |||
| @@ -178,6 +178,8 @@ Use streaming commands." | |||
| 178 | 178 | ||
| 179 | (defun pop3-wait-for-messages (process count total-size) | 179 | (defun pop3-wait-for-messages (process count total-size) |
| 180 | (while (< (pop3-number-of-responses total-size) count) | 180 | (while (< (pop3-number-of-responses total-size) count) |
| 181 | (unless (memq (process-status process) '(open run)) | ||
| 182 | (error "pop3 process died")) | ||
| 181 | (when total-size | 183 | (when total-size |
| 182 | (message "pop3 retrieved %dKB (%d%%)" | 184 | (message "pop3 retrieved %dKB (%d%%)" |
| 183 | (truncate (/ (buffer-size) 1000)) | 185 | (truncate (/ (buffer-size) 1000)) |
diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el index c1caca90cf0..b995f7478ce 100644 --- a/lisp/gnus/starttls.el +++ b/lisp/gnus/starttls.el | |||
| @@ -301,6 +301,10 @@ GNUTLS requires a port number." | |||
| 301 | starttls-gnutls-program | 301 | starttls-gnutls-program |
| 302 | starttls-program))) | 302 | starttls-program))) |
| 303 | 303 | ||
| 304 | (defalias 'starttls-any-program-available 'starttls-available-p) | ||
| 305 | (make-obsolete 'starttls-any-program-available 'starttls-available-p | ||
| 306 | "2011-08-02") | ||
| 307 | |||
| 304 | (provide 'starttls) | 308 | (provide 'starttls) |
| 305 | 309 | ||
| 306 | ;;; starttls.el ends here | 310 | ;;; starttls.el ends here |
diff --git a/lisp/help.el b/lisp/help.el index e6496f625d1..710dc34ea89 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -1104,7 +1104,7 @@ This relies on `display-buffer-window' being correctly set up by | |||
| 1104 | ((eq help-value 'new-window) | 1104 | ((eq help-value 'new-window) |
| 1105 | "Type \\[delete-other-windows] to delete the help window") | 1105 | "Type \\[delete-other-windows] to delete the help window") |
| 1106 | ((eq help-value 'reuse-other-window) | 1106 | ((eq help-value 'reuse-other-window) |
| 1107 | "Type \\[switch-to-prev-buffer] RET to restore previous buffer")) | 1107 | "Type \"q\" in other window to quit")) |
| 1108 | help-window 'other)) | 1108 | help-window 'other)) |
| 1109 | (t | 1109 | (t |
| 1110 | ;; Not much to say here. | 1110 | ;; Not much to say here. |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 725192399ff..5a86508e144 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -356,12 +356,12 @@ directory, like `default-directory'." | |||
| 356 | :type 'hook | 356 | :type 'hook |
| 357 | :group 'ibuffer) | 357 | :group 'ibuffer) |
| 358 | 358 | ||
| 359 | (defcustom ibuffer-marked-face 'font-lock-warning-face | 359 | (defcustom ibuffer-marked-face 'warning |
| 360 | "Face used for displaying marked buffers." | 360 | "Face used for displaying marked buffers." |
| 361 | :type 'face | 361 | :type 'face |
| 362 | :group 'ibuffer) | 362 | :group 'ibuffer) |
| 363 | 363 | ||
| 364 | (defcustom ibuffer-deletion-face 'font-lock-type-face | 364 | (defcustom ibuffer-deletion-face 'error |
| 365 | "Face used for displaying buffers marked for deletion." | 365 | "Face used for displaying buffers marked for deletion." |
| 366 | :type 'face | 366 | :type 'face |
| 367 | :group 'ibuffer) | 367 | :group 'ibuffer) |
diff --git a/lisp/international/charprop.el b/lisp/international/charprop.el index 919666010b1..2424e87ae44 100644 --- a/lisp/international/charprop.el +++ b/lisp/international/charprop.el | |||
| @@ -29,15 +29,18 @@ one of these symbols representing compatibility formatting tag: | |||
| 29 | ;; FILE: uni-decimal.el | 29 | ;; FILE: uni-decimal.el |
| 30 | (define-char-code-property 'decimal-digit-value "uni-decimal.el" | 30 | (define-char-code-property 'decimal-digit-value "uni-decimal.el" |
| 31 | "Unicode numeric value (decimal digit). | 31 | "Unicode numeric value (decimal digit). |
| 32 | Property value is an integer.") | 32 | Property value is an integer 0..9, or nil. |
| 33 | The value nil stands for NaN \"Numeric_Value\".") | ||
| 33 | ;; FILE: uni-digit.el | 34 | ;; FILE: uni-digit.el |
| 34 | (define-char-code-property 'digit-value "uni-digit.el" | 35 | (define-char-code-property 'digit-value "uni-digit.el" |
| 35 | "Unicode numeric value (digit). | 36 | "Unicode numeric value (digit). |
| 36 | Property value is an integer.") | 37 | Property value is an integer 0..9, or nil. |
| 38 | The value nil stands for NaN \"Numeric_Value\".") | ||
| 37 | ;; FILE: uni-numeric.el | 39 | ;; FILE: uni-numeric.el |
| 38 | (define-char-code-property 'numeric-value "uni-numeric.el" | 40 | (define-char-code-property 'numeric-value "uni-numeric.el" |
| 39 | "Unicode numeric value (numeric). | 41 | "Unicode numeric value (numeric). |
| 40 | Property value is an integer or a floating point.") | 42 | Property value is an integer, a floating point, or nil. |
| 43 | The value nil stands for NaN \"Numeric_Value\".") | ||
| 41 | ;; FILE: uni-mirrored.el | 44 | ;; FILE: uni-mirrored.el |
| 42 | (define-char-code-property 'mirrored "uni-mirrored.el" | 45 | (define-char-code-property 'mirrored "uni-mirrored.el" |
| 43 | "Unicode bidi mirrored flag. | 46 | "Unicode bidi mirrored flag. |
| @@ -53,20 +56,27 @@ Property value is a string.") | |||
| 53 | ;; FILE: uni-uppercase.el | 56 | ;; FILE: uni-uppercase.el |
| 54 | (define-char-code-property 'uppercase "uni-uppercase.el" | 57 | (define-char-code-property 'uppercase "uni-uppercase.el" |
| 55 | "Unicode simple uppercase mapping. | 58 | "Unicode simple uppercase mapping. |
| 56 | Property value is a character.") | 59 | Property value is a character or nil. |
| 60 | The value nil means that the actual property value of a character | ||
| 61 | is the character itself.") | ||
| 57 | ;; FILE: uni-lowercase.el | 62 | ;; FILE: uni-lowercase.el |
| 58 | (define-char-code-property 'lowercase "uni-lowercase.el" | 63 | (define-char-code-property 'lowercase "uni-lowercase.el" |
| 59 | "Unicode simple lowercase mapping. | 64 | "Unicode simple lowercase mapping. |
| 60 | Property value is a character.") | 65 | Property value is a character or nil. |
| 66 | The value nil means that the actual property value of a character | ||
| 67 | is the character itself.") | ||
| 61 | ;; FILE: uni-titlecase.el | 68 | ;; FILE: uni-titlecase.el |
| 62 | (define-char-code-property 'titlecase "uni-titlecase.el" | 69 | (define-char-code-property 'titlecase "uni-titlecase.el" |
| 63 | "Unicode simple titlecase mapping. | 70 | "Unicode simple titlecase mapping. |
| 64 | Property value is a character.") | 71 | Property value is a character or nil. |
| 72 | The value nil means that the actual property value of a character | ||
| 73 | is the character itself.") | ||
| 65 | ;; FILE: uni-mirrored.el | 74 | ;; FILE: uni-mirrored.el |
| 66 | (define-char-code-property 'mirroring "uni-mirrored.el" | 75 | (define-char-code-property 'mirroring "uni-mirrored.el" |
| 67 | "Unicode bidi-mirroring characters. | 76 | "Unicode bidi-mirroring characters. |
| 68 | Property value is a character that has the corresponding mirroring image, | 77 | Property value is a character that has the corresponding mirroring image or nil. |
| 69 | or nil for non-mirrored character.") | 78 | The value nil means that the actual property value of a character |
| 79 | is the character itself.") | ||
| 70 | ;; Local Variables: | 80 | ;; Local Variables: |
| 71 | ;; coding: utf-8 | 81 | ;; coding: utf-8 |
| 72 | ;; no-byte-compile: t | 82 | ;; no-byte-compile: t |
diff --git a/lisp/international/ucs-normalize.el b/lisp/international/ucs-normalize.el index f83e0f7588f..df05b355b46 100644 --- a/lisp/international/ucs-normalize.el +++ b/lisp/international/ucs-normalize.el | |||
| @@ -139,14 +139,17 @@ | |||
| 139 | (defun nfd (char) | 139 | (defun nfd (char) |
| 140 | (let ((decomposition | 140 | (let ((decomposition |
| 141 | (get-char-code-property char 'decomposition))) | 141 | (get-char-code-property char 'decomposition))) |
| 142 | (if (and decomposition (numberp (car decomposition))) | 142 | (if (and decomposition (numberp (car decomposition)) |
| 143 | (or (> (length decomposition) 1) | ||
| 144 | (/= (car decomposition) char))) | ||
| 143 | decomposition))) | 145 | decomposition))) |
| 144 | 146 | ||
| 145 | (defun nfkd (char) | 147 | (defun nfkd (char) |
| 146 | (let ((decomposition | 148 | (let ((decomposition |
| 147 | (get-char-code-property char 'decomposition))) | 149 | (get-char-code-property char 'decomposition))) |
| 148 | (if (symbolp (car decomposition)) (cdr decomposition) | 150 | (if (symbolp (car decomposition)) (cdr decomposition) |
| 149 | decomposition))) | 151 | (if (or (> (length decomposition) 1) |
| 152 | (/= (car decomposition) char)) decomposition)))) | ||
| 150 | 153 | ||
| 151 | (defun hfs-nfd (char) | 154 | (defun hfs-nfd (char) |
| 152 | (when (or (and (>= char 0) (< char #x2000)) | 155 | (when (or (and (>= char 0) (< char #x2000)) |
| @@ -180,6 +183,9 @@ | |||
| 180 | (setq ccc (ucs-normalize-ccc char)) | 183 | (setq ccc (ucs-normalize-ccc char)) |
| 181 | (setq decomposition (get-char-code-property | 184 | (setq decomposition (get-char-code-property |
| 182 | char 'decomposition)) | 185 | char 'decomposition)) |
| 186 | (if (and (= (length decomposition) 1) | ||
| 187 | (= (car decomposition) char)) | ||
| 188 | (setq decomposition nil)) | ||
| 183 | (if (and ccc (/= 0 ccc)) (add-to-list 'combining-chars char)) | 189 | (if (and ccc (/= 0 ccc)) (add-to-list 'combining-chars char)) |
| 184 | (if (and (numberp (car decomposition)) | 190 | (if (and (numberp (car decomposition)) |
| 185 | (/= (ucs-normalize-ccc (car decomposition)) | 191 | (/= (ucs-normalize-ccc (car decomposition)) |
diff --git a/lisp/international/uni-bidi.el b/lisp/international/uni-bidi.el index e7682c6d8ff..4d86fc821fa 100644 --- a/lisp/international/uni-bidi.el +++ b/lisp/international/uni-bidi.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-category.el b/lisp/international/uni-category.el index a4455decc52..94b7c18b6e2 100644 --- a/lisp/international/uni-category.el +++ b/lisp/international/uni-category.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-combining.el b/lisp/international/uni-combining.el index 227b9d0af79..1437ff9acbd 100644 --- a/lisp/international/uni-combining.el +++ b/lisp/international/uni-combining.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-comment.el b/lisp/international/uni-comment.el index c9743064bd4..21ccfe3ffe7 100644 --- a/lisp/international/uni-comment.el +++ b/lisp/international/uni-comment.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-decimal.el b/lisp/international/uni-decimal.el index 2c424ffb5de..096257add20 100644 --- a/lisp/international/uni-decimal.el +++ b/lisp/international/uni-decimal.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-decomposition.el b/lisp/international/uni-decomposition.el index b0bf07bbe85..b9660cdab0a 100644 --- a/lisp/international/uni-decomposition.el +++ b/lisp/international/uni-decomposition.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-digit.el b/lisp/international/uni-digit.el index fc52fd8c28c..efb78b0e43d 100644 --- a/lisp/international/uni-digit.el +++ b/lisp/international/uni-digit.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-lowercase.el b/lisp/international/uni-lowercase.el index 41890018204..7afd9503cb3 100644 --- a/lisp/international/uni-lowercase.el +++ b/lisp/international/uni-lowercase.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-mirrored.el b/lisp/international/uni-mirrored.el index 006cf575591..e650166c24c 100644 --- a/lisp/international/uni-mirrored.el +++ b/lisp/international/uni-mirrored.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-name.el b/lisp/international/uni-name.el index 7fac18b278d..8b681631067 100644 --- a/lisp/international/uni-name.el +++ b/lisp/international/uni-name.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-numeric.el b/lisp/international/uni-numeric.el index d16e8c00870..a1865f1fb23 100644 --- a/lisp/international/uni-numeric.el +++ b/lisp/international/uni-numeric.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-old-name.el b/lisp/international/uni-old-name.el index 4e704e5cdd0..de2d67b9450 100644 --- a/lisp/international/uni-old-name.el +++ b/lisp/international/uni-old-name.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-titlecase.el b/lisp/international/uni-titlecase.el index b8098c81876..517edb20445 100644 --- a/lisp/international/uni-titlecase.el +++ b/lisp/international/uni-titlecase.el | |||
| Binary files differ | |||
diff --git a/lisp/international/uni-uppercase.el b/lisp/international/uni-uppercase.el index 899276eb725..fcb22d72470 100644 --- a/lisp/international/uni-uppercase.el +++ b/lisp/international/uni-uppercase.el | |||
| Binary files differ | |||
diff --git a/lisp/isearch.el b/lisp/isearch.el index 1942641fae9..7fcc31f188f 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -1191,19 +1191,17 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst | |||
| 1191 | isearch-word isearch-new-word)) | 1191 | isearch-word isearch-new-word)) |
| 1192 | 1192 | ||
| 1193 | ;; Empty isearch-string means use default. | 1193 | ;; Empty isearch-string means use default. |
| 1194 | (if (= 0 (length isearch-string)) | 1194 | (when (= 0 (length isearch-string)) |
| 1195 | (setq isearch-string (or (car (if isearch-regexp | 1195 | (setq isearch-string (or (car (if isearch-regexp |
| 1196 | regexp-search-ring | 1196 | regexp-search-ring |
| 1197 | search-ring)) | 1197 | search-ring)) |
| 1198 | "") | 1198 | "") |
| 1199 | 1199 | ||
| 1200 | isearch-message | 1200 | isearch-message |
| 1201 | (mapconcat 'isearch-text-char-description | 1201 | (mapconcat 'isearch-text-char-description |
| 1202 | isearch-string "")) | 1202 | isearch-string "")) |
| 1203 | ;; This used to set the last search string, | 1203 | ;; After taking the last element, adjust ring to previous one. |
| 1204 | ;; but I think it is not right to do that here. | 1204 | (isearch-ring-adjust1 nil))) |
| 1205 | ;; Only the string actually used should be saved. | ||
| 1206 | )) | ||
| 1207 | 1205 | ||
| 1208 | ;; This used to push the state as of before this C-s, but it adds | 1206 | ;; This used to push the state as of before this C-s, but it adds |
| 1209 | ;; an inconsistent state where part of variables are from the | 1207 | ;; an inconsistent state where part of variables are from the |
| @@ -1290,7 +1288,9 @@ Use `isearch-exit' to quit without signaling." | |||
| 1290 | isearch-message | 1288 | isearch-message |
| 1291 | (mapconcat 'isearch-text-char-description | 1289 | (mapconcat 'isearch-text-char-description |
| 1292 | isearch-string "") | 1290 | isearch-string "") |
| 1293 | isearch-case-fold-search isearch-last-case-fold-search)) | 1291 | isearch-case-fold-search isearch-last-case-fold-search) |
| 1292 | ;; After taking the last element, adjust ring to previous one. | ||
| 1293 | (isearch-ring-adjust1 nil)) | ||
| 1294 | ;; If already have what to search for, repeat it. | 1294 | ;; If already have what to search for, repeat it. |
| 1295 | (or isearch-success | 1295 | (or isearch-success |
| 1296 | (progn | 1296 | (progn |
| @@ -2071,7 +2071,7 @@ Isearch mode." | |||
| 2071 | () | 2071 | () |
| 2072 | (set yank-pointer-name | 2072 | (set yank-pointer-name |
| 2073 | (setq yank-pointer | 2073 | (setq yank-pointer |
| 2074 | (mod (+ (or yank-pointer 0) | 2074 | (mod (+ (or yank-pointer (if advance 0 -1)) |
| 2075 | (if advance -1 1)) | 2075 | (if advance -1 1)) |
| 2076 | length))) | 2076 | length))) |
| 2077 | (setq isearch-string (nth yank-pointer ring) | 2077 | (setq isearch-string (nth yank-pointer ring) |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 637d10135fa..40fbb072594 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -86,6 +86,11 @@ The default value would be \"smtp\" or 25." | |||
| 86 | :type '(choice (integer :tag "Port") (string :tag "Service")) | 86 | :type '(choice (integer :tag "Port") (string :tag "Service")) |
| 87 | :group 'smtpmail) | 87 | :group 'smtpmail) |
| 88 | 88 | ||
| 89 | (defcustom smtpmail-smtp-user nil | ||
| 90 | "User name to use when looking up credentials." | ||
| 91 | :type '(choice (const nil) string) | ||
| 92 | :group 'smtpmail) | ||
| 93 | |||
| 89 | (defcustom smtpmail-local-domain nil | 94 | (defcustom smtpmail-local-domain nil |
| 90 | "Local domain name without a host name. | 95 | "Local domain name without a host name. |
| 91 | If the function `system-name' returns the full internet address, | 96 | If the function `system-name' returns the full internet address, |
| @@ -490,6 +495,7 @@ The list is in preference order.") | |||
| 490 | (auth-source-search | 495 | (auth-source-search |
| 491 | :host host | 496 | :host host |
| 492 | :port port | 497 | :port port |
| 498 | :user smtpmail-smtp-user | ||
| 493 | :max 1 | 499 | :max 1 |
| 494 | :require (and ask-for-password | 500 | :require (and ask-for-password |
| 495 | '(:user :secret)) | 501 | '(:user :secret)) |
| @@ -499,6 +505,8 @@ The list is in preference order.") | |||
| 499 | (save-function (and ask-for-password | 505 | (save-function (and ask-for-password |
| 500 | (plist-get auth-info :save-function))) | 506 | (plist-get auth-info :save-function))) |
| 501 | ret) | 507 | ret) |
| 508 | (when (functionp password) | ||
| 509 | (setq password (funcall password))) | ||
| 502 | (when (and user | 510 | (when (and user |
| 503 | (not password)) | 511 | (not password)) |
| 504 | ;; The user has stored the user name, but not the password, so | 512 | ;; The user has stored the user name, but not the password, so |
| @@ -510,6 +518,7 @@ The list is in preference order.") | |||
| 510 | :max 1 | 518 | :max 1 |
| 511 | :host host | 519 | :host host |
| 512 | :port port | 520 | :port port |
| 521 | :user smtpmail-smtp-user | ||
| 513 | :require '(:user :secret) | 522 | :require '(:user :secret) |
| 514 | :create t)) | 523 | :create t)) |
| 515 | password (plist-get auth-info :secret))) | 524 | password (plist-get auth-info :secret))) |
| @@ -593,8 +602,10 @@ The list is in preference order.") | |||
| 593 | (push smtpmail-smtp-server ports)) | 602 | (push smtpmail-smtp-server ports)) |
| 594 | (while (and (not smtpmail-smtp-server) | 603 | (while (and (not smtpmail-smtp-server) |
| 595 | (setq port (pop ports))) | 604 | (setq port (pop ports))) |
| 596 | (when (setq stream (ignore-errors | 605 | (when (setq stream (condition-case () |
| 597 | (open-network-stream "smtp" nil server port))) | 606 | (open-network-stream "smtp" nil server port) |
| 607 | (quit nil) | ||
| 608 | (error nil))) | ||
| 598 | (customize-save-variable 'smtpmail-smtp-server server) | 609 | (customize-save-variable 'smtpmail-smtp-server server) |
| 599 | (customize-save-variable 'smtpmail-smtp-service port) | 610 | (customize-save-variable 'smtpmail-smtp-service port) |
| 600 | (delete-process stream))) | 611 | (delete-process stream))) |
| @@ -615,8 +626,6 @@ The list is in preference order.") | |||
| 615 | (and mail-specify-envelope-from | 626 | (and mail-specify-envelope-from |
| 616 | (mail-envelope-from)) | 627 | (mail-envelope-from)) |
| 617 | user-mail-address)) | 628 | user-mail-address)) |
| 618 | (coding-system-for-read 'binary) | ||
| 619 | (coding-system-for-write 'binary) | ||
| 620 | response-code | 629 | response-code |
| 621 | process-buffer | 630 | process-buffer |
| 622 | result | 631 | result |
| @@ -635,21 +644,23 @@ The list is in preference order.") | |||
| 635 | (erase-buffer)) | 644 | (erase-buffer)) |
| 636 | 645 | ||
| 637 | ;; open the connection to the server | 646 | ;; open the connection to the server |
| 638 | (setq result | 647 | (let ((coding-system-for-read 'binary) |
| 639 | (open-network-stream | 648 | (coding-system-for-write 'binary)) |
| 640 | "smtpmail" process-buffer host port | 649 | (setq result |
| 641 | :type smtpmail-stream-type | 650 | (open-network-stream |
| 642 | :return-list t | 651 | "smtpmail" process-buffer host port |
| 643 | :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn)) | 652 | :type smtpmail-stream-type |
| 644 | :end-of-command "^[0-9]+ .*\r\n" | 653 | :return-list t |
| 645 | :success "^2.*\n" | 654 | :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn)) |
| 646 | :always-query-capabilities t | 655 | :end-of-command "^[0-9]+ .*\r\n" |
| 647 | :starttls-function | 656 | :success "^2.*\n" |
| 648 | (lambda (capabilities) | 657 | :always-query-capabilities t |
| 649 | (and (string-match "-STARTTLS" capabilities) | 658 | :starttls-function |
| 650 | "STARTTLS\r\n")) | 659 | (lambda (capabilities) |
| 651 | :client-certificate t | 660 | (and (string-match "-STARTTLS" capabilities) |
| 652 | :use-starttls-if-possible t)) | 661 | "STARTTLS\r\n")) |
| 662 | :client-certificate t | ||
| 663 | :use-starttls-if-possible t))) | ||
| 653 | 664 | ||
| 654 | ;; If we couldn't access the server at all, we give up. | 665 | ;; If we couldn't access the server at all, we give up. |
| 655 | (unless (setq process (car result)) | 666 | (unless (setq process (car result)) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index b82147b97f1..313298de97e 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1119,27 +1119,13 @@ It also eliminates runs of equal strings." | |||
| 1119 | `(display (space :align-to ,column))) | 1119 | `(display (space :align-to ,column))) |
| 1120 | nil)))) | 1120 | nil)))) |
| 1121 | (if (not (consp str)) | 1121 | (if (not (consp str)) |
| 1122 | (put-text-property (point) | 1122 | (put-text-property (point) (progn (insert str) (point)) |
| 1123 | (progn | ||
| 1124 | (insert (bidi-string-mark-left-to-right | ||
| 1125 | str)) | ||
| 1126 | (point)) | ||
| 1127 | 'mouse-face 'highlight) | 1123 | 'mouse-face 'highlight) |
| 1128 | (put-text-property (point) | 1124 | (put-text-property (point) (progn (insert (car str)) (point)) |
| 1129 | (progn | ||
| 1130 | (insert | ||
| 1131 | (bidi-string-mark-left-to-right | ||
| 1132 | (car str))) | ||
| 1133 | (point)) | ||
| 1134 | 'mouse-face 'highlight) | 1125 | 'mouse-face 'highlight) |
| 1135 | (add-text-properties (point) | 1126 | (add-text-properties (point) (progn (insert (cadr str)) (point)) |
| 1136 | (progn | ||
| 1137 | (insert | ||
| 1138 | (bidi-string-mark-left-to-right | ||
| 1139 | (cadr str))) | ||
| 1140 | (point)) | ||
| 1141 | '(mouse-face nil | 1127 | '(mouse-face nil |
| 1142 | face completions-annotations))) | 1128 | face completions-annotations))) |
| 1143 | (cond | 1129 | (cond |
| 1144 | ((eq completions-format 'vertical) | 1130 | ((eq completions-format 'vertical) |
| 1145 | ;; Vertical format | 1131 | ;; Vertical format |
diff --git a/lisp/mpc.el b/lisp/mpc.el index 5319ea43898..932fb5926fd 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -246,11 +246,12 @@ and HOST defaults to localhost." | |||
| 246 | (process-put proc 'ready t) | 246 | (process-put proc 'ready t) |
| 247 | (unless (eq (match-end 0) (point-max)) | 247 | (unless (eq (match-end 0) (point-max)) |
| 248 | (error "Unexpected trailing text")) | 248 | (error "Unexpected trailing text")) |
| 249 | (let ((error (match-string 1))) | 249 | (let ((error-text (match-string 1))) |
| 250 | (delete-region (point) (point-max)) | 250 | (delete-region (point) (point-max)) |
| 251 | (let ((callback (process-get proc 'callback))) | 251 | (let ((callback (process-get proc 'callback))) |
| 252 | (process-put proc 'callback nil) | 252 | (process-put proc 'callback nil) |
| 253 | (if error (signal 'mpc-proc-error error)) | 253 | (if error-text |
| 254 | (process-put proc 'mpc-proc-error error-text)) | ||
| 254 | (funcall callback))))))))) | 255 | (funcall callback))))))))) |
| 255 | 256 | ||
| 256 | (defun mpc--proc-connect (host) | 257 | (defun mpc--proc-connect (host) |
| @@ -314,19 +315,23 @@ and HOST defaults to localhost." | |||
| 314 | mpc-proc) | 315 | mpc-proc) |
| 315 | (setq mpc-proc (mpc--proc-connect mpc-host)))) | 316 | (setq mpc-proc (mpc--proc-connect mpc-host)))) |
| 316 | 317 | ||
| 318 | (defun mpc-proc-check (proc) | ||
| 319 | (let ((error-text (process-get proc 'mpc-proc-error))) | ||
| 320 | (when error-text | ||
| 321 | (process-put proc 'mpc-proc-error nil) | ||
| 322 | (signal 'mpc-proc-error error-text)))) | ||
| 323 | |||
| 317 | (defun mpc-proc-sync (&optional proc) | 324 | (defun mpc-proc-sync (&optional proc) |
| 318 | "Wait for MPC process until it is idle again. | 325 | "Wait for MPC process until it is idle again. |
| 319 | Return the buffer in which the process is/was running." | 326 | Return the buffer in which the process is/was running." |
| 320 | (unless proc (setq proc (mpc-proc))) | 327 | (unless proc (setq proc (mpc-proc))) |
| 321 | (unwind-protect | 328 | (unwind-protect |
| 322 | (condition-case err | 329 | (progn |
| 323 | (progn | 330 | (while (and (not (process-get proc 'ready)) |
| 324 | (while (and (not (process-get proc 'ready)) | 331 | (accept-process-output proc))) |
| 325 | (accept-process-output proc))) | 332 | (mpc-proc-check proc) |
| 326 | (if (process-get proc 'ready) (process-buffer proc) | 333 | (if (process-get proc 'ready) (process-buffer proc) |
| 327 | ;; (delete-process proc) | 334 | (error "No response from MPD"))) |
| 328 | (error "No response from MPD"))) | ||
| 329 | (error (message "MPC: %s" err) (signal (car err) (cdr err)))) | ||
| 330 | (unless (process-get proc 'ready) | 335 | (unless (process-get proc 'ready) |
| 331 | ;; (debug) | 336 | ;; (debug) |
| 332 | (message "Killing hung process") | 337 | (message "Killing hung process") |
| @@ -358,13 +363,13 @@ which will be concatenated with proper quoting before passing them to MPD." | |||
| 358 | "\n"))) | 363 | "\n"))) |
| 359 | (if callback | 364 | (if callback |
| 360 | ;; (let ((buf (current-buffer))) | 365 | ;; (let ((buf (current-buffer))) |
| 361 | (process-put proc 'callback | 366 | (process-put proc 'callback |
| 362 | callback | 367 | callback |
| 363 | ;; (lambda () | 368 | ;; (lambda () |
| 364 | ;; (funcall callback | 369 | ;; (funcall callback |
| 365 | ;; (prog1 (current-buffer) | 370 | ;; (prog1 (current-buffer) |
| 366 | ;; (set-buffer buf))))) | 371 | ;; (set-buffer buf))))) |
| 367 | ) | 372 | ) |
| 368 | ;; If `callback' is nil, we're executing synchronously. | 373 | ;; If `callback' is nil, we're executing synchronously. |
| 369 | (process-put proc 'callback 'ignore) | 374 | (process-put proc 'callback 'ignore) |
| 370 | ;; This returns the process's buffer. | 375 | ;; This returns the process's buffer. |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index e18b42a275f..f9bc13e1e25 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -1103,26 +1103,32 @@ URL in a new window." | |||
| 1103 | (interactive (browse-url-interactive-arg "URL: ")) | 1103 | (interactive (browse-url-interactive-arg "URL: ")) |
| 1104 | (setq url (browse-url-encode-url url)) | 1104 | (setq url (browse-url-encode-url url)) |
| 1105 | (let* ((process-environment (browse-url-process-environment)) | 1105 | (let* ((process-environment (browse-url-process-environment)) |
| 1106 | (use-remote | ||
| 1107 | (not (memq system-type '(windows-nt ms-dos)))) | ||
| 1106 | (process | 1108 | (process |
| 1107 | (apply 'start-process | 1109 | (apply 'start-process |
| 1108 | (concat "firefox " url) nil | 1110 | (concat "firefox " url) nil |
| 1109 | browse-url-firefox-program | 1111 | browse-url-firefox-program |
| 1110 | (append | 1112 | (append |
| 1111 | browse-url-firefox-arguments | 1113 | browse-url-firefox-arguments |
| 1112 | (if (memq system-type '(windows-nt ms-dos)) | 1114 | (if use-remote |
| 1113 | (list url) | 1115 | (list "-remote" |
| 1114 | (list "-remote" | 1116 | (concat |
| 1115 | (concat "openURL(" | 1117 | "openURL(" |
| 1116 | url | 1118 | url |
| 1117 | (if (browse-url-maybe-new-window | 1119 | (if (browse-url-maybe-new-window new-window) |
| 1118 | new-window) | 1120 | (if browse-url-firefox-new-window-is-tab |
| 1119 | (if browse-url-firefox-new-window-is-tab | 1121 | ",new-tab" |
| 1120 | ",new-tab" | 1122 | ",new-window")) |
| 1121 | ",new-window")) | 1123 | ")")) |
| 1122 | ")"))))))) | 1124 | (list url)))))) |
| 1123 | (set-process-sentinel process | 1125 | ;; If we use -remote, the process exits with status code 2 if |
| 1124 | `(lambda (process change) | 1126 | ;; Firefox is not already running. The sentinel runs firefox |
| 1125 | (browse-url-firefox-sentinel process ,url))))) | 1127 | ;; directly if that happens. |
| 1128 | (when use-remote | ||
| 1129 | (set-process-sentinel process | ||
| 1130 | `(lambda (process change) | ||
| 1131 | (browse-url-firefox-sentinel process ,url)))))) | ||
| 1126 | 1132 | ||
| 1127 | (defun browse-url-firefox-sentinel (process url) | 1133 | (defun browse-url-firefox-sentinel (process url) |
| 1128 | "Handle a change to the process communicating with Firefox." | 1134 | "Handle a change to the process communicating with Firefox." |
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 46a82e3720d..bdf2dadd16c 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -811,15 +811,19 @@ this is `comint-dynamic-complete-functions'." | |||
| 811 | (while (< (point) end) | 811 | (while (< (point) end) |
| 812 | (skip-chars-forward " \t\n") | 812 | (skip-chars-forward " \t\n") |
| 813 | (push (point) begins) | 813 | (push (point) begins) |
| 814 | (let ((skip t)) | 814 | (while |
| 815 | (while skip | 815 | (progn |
| 816 | (skip-chars-forward "^ \t\n") | 816 | (skip-chars-forward "^ \t\n\\") |
| 817 | (if (eq (char-before) ?\\) | 817 | (when (eq (char-after) ?\\) |
| 818 | (skip-chars-forward " \t\n") | 818 | (forward-char 1) |
| 819 | (setq skip nil)))) | 819 | (unless (eolp) |
| 820 | (forward-char 1) | ||
| 821 | t)))) | ||
| 820 | (push (buffer-substring-no-properties (car begins) (point)) | 822 | (push (buffer-substring-no-properties (car begins) (point)) |
| 821 | args)) | 823 | args)) |
| 822 | (cons (nreverse args) (nreverse begins))))) | 824 | (cons (nreverse args) (nreverse begins))))) |
| 825 | (make-obsolete 'pcomplete-parse-comint-arguments | ||
| 826 | 'comint-parse-pcomplete-arguments "24.1") | ||
| 823 | 827 | ||
| 824 | (defun pcomplete-parse-arguments (&optional expand-p) | 828 | (defun pcomplete-parse-arguments (&optional expand-p) |
| 825 | "Parse the command line arguments. Most completions need this info." | 829 | "Parse the command line arguments. Most completions need this info." |
| @@ -879,7 +883,7 @@ Magic characters are those in `pcomplete-arg-quote-list'." | |||
| 879 | (or (run-hook-with-args-until-success | 883 | (or (run-hook-with-args-until-success |
| 880 | 'pcomplete-quote-arg-hook filename index) | 884 | 'pcomplete-quote-arg-hook filename index) |
| 881 | (when (memq c pcomplete-arg-quote-list) | 885 | (when (memq c pcomplete-arg-quote-list) |
| 882 | (string "\\" c)) | 886 | (string ?\\ c)) |
| 883 | (char-to-string c)) | 887 | (char-to-string c)) |
| 884 | (setq index (1+ index)))) | 888 | (setq index (1+ index)))) |
| 885 | filename | 889 | filename |
diff --git a/lisp/proced.el b/lisp/proced.el index 94ea579ebd8..e4987bd926c 100644 --- a/lisp/proced.el +++ b/lisp/proced.el | |||
| @@ -395,7 +395,7 @@ It is a list of lists (KEY PREDICATE REVERSE).") | |||
| 395 | :group 'proced-faces) | 395 | :group 'proced-faces) |
| 396 | 396 | ||
| 397 | (defface proced-marked | 397 | (defface proced-marked |
| 398 | '((t (:inherit font-lock-warning-face))) | 398 | '((t (:inherit error))) |
| 399 | "Face used for marked processes." | 399 | "Face used for marked processes." |
| 400 | :group 'proced-faces) | 400 | :group 'proced-faces) |
| 401 | 401 | ||
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 0d88f85d263..a1cbdc16560 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -6325,7 +6325,9 @@ comment at the start of cc-engine.el for more info." | |||
| 6325 | (let* ((start (point)) kwd-sym kwd-clause-end found-type) | 6325 | (let* ((start (point)) kwd-sym kwd-clause-end found-type) |
| 6326 | 6326 | ||
| 6327 | ;; Look for a specifier keyword clause. | 6327 | ;; Look for a specifier keyword clause. |
| 6328 | (when (looking-at c-prefix-spec-kwds-re) | 6328 | (when (or (looking-at c-prefix-spec-kwds-re) |
| 6329 | (and (c-major-mode-is 'java-mode) | ||
| 6330 | (looking-at "@[A-Za-z0-9]+"))) | ||
| 6329 | (if (looking-at c-typedef-key) | 6331 | (if (looking-at c-typedef-key) |
| 6330 | (setq at-typedef t)) | 6332 | (setq at-typedef t)) |
| 6331 | (setq kwd-sym (c-keyword-sym (match-string 1))) | 6333 | (setq kwd-sym (c-keyword-sym (match-string 1))) |
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 2277ba760ab..3d5dc30d823 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -199,10 +199,16 @@ | |||
| 199 | (set-face-foreground 'c-annotation-face "blue") | 199 | (set-face-foreground 'c-annotation-face "blue") |
| 200 | 200 | ||
| 201 | (eval-and-compile | 201 | (eval-and-compile |
| 202 | ;; We need the following functions during compilation since they're | 202 | ;; We need the following definitions during compilation since they're |
| 203 | ;; called when the `c-lang-defconst' initializers are evaluated. | 203 | ;; used when the `c-lang-defconst' initializers are evaluated. Define |
| 204 | ;; Define them at runtime too for the sake of derived modes. | 204 | ;; them at runtime too for the sake of derived modes. |
| 205 | 205 | ||
| 206 | ;; This indicates the "font locking context", and is set just before | ||
| 207 | ;; fontification is done. If non-nil, it says, e.g., point starts | ||
| 208 | ;; from within a #if preprocessor construct. | ||
| 209 | (defvar c-font-lock-context nil) | ||
| 210 | (make-variable-buffer-local 'c-font-lock-context) | ||
| 211 | |||
| 206 | (defmacro c-put-font-lock-face (from to face) | 212 | (defmacro c-put-font-lock-face (from to face) |
| 207 | ;; Put a face on a region (overriding any existing face) in the way | 213 | ;; Put a face on a region (overriding any existing face) in the way |
| 208 | ;; font-lock would do it. In XEmacs that means putting an | 214 | ;; font-lock would do it. In XEmacs that means putting an |
| @@ -283,6 +289,45 @@ | |||
| 283 | nil))))) | 289 | nil))))) |
| 284 | res)))) | 290 | res)))) |
| 285 | 291 | ||
| 292 | (defun c-make-font-lock-search-form (regexp highlights) | ||
| 293 | ;; Return a lisp form which will fontify every occurence of REGEXP | ||
| 294 | ;; (a regular expression, NOT a function) between POINT and `limit' | ||
| 295 | ;; with HIGHLIGHTS, a list of highlighters as specified on page | ||
| 296 | ;; "Search-based Fontification" in the elisp manual. | ||
| 297 | `(while (re-search-forward ,regexp limit t) | ||
| 298 | (unless (progn | ||
| 299 | (goto-char (match-beginning 0)) | ||
| 300 | (c-skip-comments-and-strings limit)) | ||
| 301 | (goto-char (match-end 0)) | ||
| 302 | ,@(mapcar | ||
| 303 | (lambda (highlight) | ||
| 304 | (if (integerp (car highlight)) | ||
| 305 | ;; e.g. highlight is (1 font-lock-type-face t) | ||
| 306 | (progn | ||
| 307 | (unless (eq (nth 2 highlight) t) | ||
| 308 | (error | ||
| 309 | "The override flag must currently be t in %s" | ||
| 310 | highlight)) | ||
| 311 | (when (nth 3 highlight) | ||
| 312 | (error | ||
| 313 | "The laxmatch flag may currently not be set in %s" | ||
| 314 | highlight)) | ||
| 315 | `(save-match-data | ||
| 316 | (c-put-font-lock-face | ||
| 317 | (match-beginning ,(car highlight)) | ||
| 318 | (match-end ,(car highlight)) | ||
| 319 | ,(elt highlight 1)))) | ||
| 320 | ;; highlight is an "ANCHORED HIGHLIGHER" of the form | ||
| 321 | ;; (ANCHORED-MATCHER PRE-FORM POST-FORM SUBEXP-HIGHLIGHTERS...) | ||
| 322 | (when (nth 3 highlight) | ||
| 323 | (error "Match highlights currently not supported in %s" | ||
| 324 | highlight)) | ||
| 325 | `(progn | ||
| 326 | ,(nth 1 highlight) | ||
| 327 | (save-match-data ,(car highlight)) | ||
| 328 | ,(nth 2 highlight)))) | ||
| 329 | highlights)))) | ||
| 330 | |||
| 286 | (defun c-make-font-lock-search-function (regexp &rest highlights) | 331 | (defun c-make-font-lock-search-function (regexp &rest highlights) |
| 287 | ;; This function makes a byte compiled function that works much like | 332 | ;; This function makes a byte compiled function that works much like |
| 288 | ;; a matcher element in `font-lock-keywords'. It cuts out a little | 333 | ;; a matcher element in `font-lock-keywords'. It cuts out a little |
| @@ -313,43 +358,101 @@ | |||
| 313 | ;; lambda more easily. | 358 | ;; lambda more easily. |
| 314 | (byte-compile | 359 | (byte-compile |
| 315 | `(lambda (limit) | 360 | `(lambda (limit) |
| 316 | (let (;; The font-lock package in Emacs is known to clobber | 361 | (let ( ;; The font-lock package in Emacs is known to clobber |
| 317 | ;; `parse-sexp-lookup-properties' (when it exists). | 362 | ;; `parse-sexp-lookup-properties' (when it exists). |
| 318 | (parse-sexp-lookup-properties | 363 | (parse-sexp-lookup-properties |
| 319 | (cc-eval-when-compile | 364 | (cc-eval-when-compile |
| 320 | (boundp 'parse-sexp-lookup-properties)))) | 365 | (boundp 'parse-sexp-lookup-properties)))) |
| 321 | (while (re-search-forward ,regexp limit t) | 366 | |
| 322 | (unless (progn | 367 | ;; (while (re-search-forward ,regexp limit t) |
| 323 | (goto-char (match-beginning 0)) | 368 | ;; (unless (progn |
| 324 | (c-skip-comments-and-strings limit)) | 369 | ;; (goto-char (match-beginning 0)) |
| 325 | (goto-char (match-end 0)) | 370 | ;; (c-skip-comments-and-strings limit)) |
| 326 | ,@(mapcar | 371 | ;; (goto-char (match-end 0)) |
| 327 | (lambda (highlight) | 372 | ;; ,@(mapcar |
| 328 | (if (integerp (car highlight)) | 373 | ;; (lambda (highlight) |
| 329 | (progn | 374 | ;; (if (integerp (car highlight)) |
| 330 | (unless (eq (nth 2 highlight) t) | 375 | ;; (progn |
| 331 | (error | 376 | ;; (unless (eq (nth 2 highlight) t) |
| 332 | "The override flag must currently be t in %s" | 377 | ;; (error |
| 333 | highlight)) | 378 | ;; "The override flag must currently be t in %s" |
| 334 | (when (nth 3 highlight) | 379 | ;; highlight)) |
| 335 | (error | 380 | ;; (when (nth 3 highlight) |
| 336 | "The laxmatch flag may currently not be set in %s" | 381 | ;; (error |
| 337 | highlight)) | 382 | ;; "The laxmatch flag may currently not be set in %s" |
| 338 | `(save-match-data | 383 | ;; highlight)) |
| 339 | (c-put-font-lock-face | 384 | ;; `(save-match-data |
| 340 | (match-beginning ,(car highlight)) | 385 | ;; (c-put-font-lock-face |
| 341 | (match-end ,(car highlight)) | 386 | ;; (match-beginning ,(car highlight)) |
| 342 | ,(elt highlight 1)))) | 387 | ;; (match-end ,(car highlight)) |
| 343 | (when (nth 3 highlight) | 388 | ;; ,(elt highlight 1)))) |
| 344 | (error "Match highlights currently not supported in %s" | 389 | ;; (when (nth 3 highlight) |
| 345 | highlight)) | 390 | ;; (error "Match highlights currently not supported in %s" |
| 346 | `(progn | 391 | ;; highlight)) |
| 347 | ,(nth 1 highlight) | 392 | ;; `(progn |
| 348 | (save-match-data ,(car highlight)) | 393 | ;; ,(nth 1 highlight) |
| 349 | ,(nth 2 highlight)))) | 394 | ;; (save-match-data ,(car highlight)) |
| 350 | highlights)))) | 395 | ;; ,(nth 2 highlight)))) |
| 396 | ;; highlights))) | ||
| 397 | ,(c-make-font-lock-search-form regexp highlights)) | ||
| 398 | |||
| 351 | nil))) | 399 | nil))) |
| 352 | 400 | ||
| 401 | (defun c-make-font-lock-context-search-function (normal &rest state-stanzas) | ||
| 402 | ;; This function makes a byte compiled function that works much like | ||
| 403 | ;; a matcher element in `font-lock-keywords', with the following | ||
| 404 | ;; enhancement: the generated function will test for particular "font | ||
| 405 | ;; lock contexts" at the start of the region, i.e. is this point in | ||
| 406 | ;; the middle of some particular construct? if so the generated | ||
| 407 | ;; function will first fontify the tail of the construct, before | ||
| 408 | ;; going into the main loop and fontify full constructs up to limit. | ||
| 409 | ;; | ||
| 410 | ;; The generated function takes one parameter called `limit', and | ||
| 411 | ;; will fontify the region between POINT and LIMIT. | ||
| 412 | ;; | ||
| 413 | ;; NORMAL is a list of the form (REGEXP HIGHLIGHTS .....), and is | ||
| 414 | ;; used to fontify the "regular" bit of the region. | ||
| 415 | ;; STATE-STANZAS is list of elements of the form (STATE LIM REGEXP | ||
| 416 | ;; HIGHLIGHTS), each element coding one possible font lock context. | ||
| 417 | |||
| 418 | ;; o - REGEXP is a font-lock regular expression (NOT a function), | ||
| 419 | ;; o - HIGHLIGHTS is a list of zero or more highlighters as defined | ||
| 420 | ;; on page "Search-based Fontification" in the elisp manual. As | ||
| 421 | ;; yet (2009-06), they must have OVERRIDE set, and may not have | ||
| 422 | ;; LAXMATCH set. | ||
| 423 | ;; | ||
| 424 | ;; o - STATE is the "font lock context" (e.g. in-cpp-expr) and is | ||
| 425 | ;; not quoted. | ||
| 426 | ;; o - LIM is a lisp form whose evaluation will yield the limit | ||
| 427 | ;; position in the buffer for fontification by this stanza. | ||
| 428 | ;; | ||
| 429 | ;; This function does not do any hidden buffer changes, but the | ||
| 430 | ;; generated functions will. (They are however used in places | ||
| 431 | ;; covered by the font-lock context.) | ||
| 432 | ;; | ||
| 433 | ;; Note: Replace `byte-compile' with `eval' to debug the generated | ||
| 434 | ;; lambda more easily. | ||
| 435 | (byte-compile | ||
| 436 | `(lambda (limit) | ||
| 437 | (let ( ;; The font-lock package in Emacs is known to clobber | ||
| 438 | ;; `parse-sexp-lookup-properties' (when it exists). | ||
| 439 | (parse-sexp-lookup-properties | ||
| 440 | (cc-eval-when-compile | ||
| 441 | (boundp 'parse-sexp-lookup-properties)))) | ||
| 442 | ,@(mapcar | ||
| 443 | (lambda (stanza) | ||
| 444 | (let ((state (car stanza)) | ||
| 445 | (lim (nth 1 stanza)) | ||
| 446 | (regexp (nth 2 stanza)) | ||
| 447 | (highlights (cdr (cddr stanza)))) | ||
| 448 | `(if (eq c-font-lock-context ',state) | ||
| 449 | (let ((limit ,lim)) | ||
| 450 | ,(c-make-font-lock-search-form | ||
| 451 | regexp highlights))))) | ||
| 452 | state-stanzas) | ||
| 453 | ,(c-make-font-lock-search-form (car normal) (cdr normal)) | ||
| 454 | nil)))) | ||
| 455 | |||
| 353 | ; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el. | 456 | ; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el. |
| 354 | ; '(progn | 457 | ; '(progn |
| 355 | (def-edebug-spec c-fontify-types-and-refs let*) | 458 | (def-edebug-spec c-fontify-types-and-refs let*) |
| @@ -494,19 +597,24 @@ stuff. Used on level 1 and higher." | |||
| 494 | (c-lang-const c-cpp-expr-directives))) | 597 | (c-lang-const c-cpp-expr-directives))) |
| 495 | (cef-re (c-make-keywords-re t | 598 | (cef-re (c-make-keywords-re t |
| 496 | (c-lang-const c-cpp-expr-functions)))) | 599 | (c-lang-const c-cpp-expr-functions)))) |
| 497 | `((,(c-make-font-lock-search-function | 600 | |
| 498 | (concat noncontinued-line-end | 601 | `((,(c-make-font-lock-context-search-function |
| 499 | (c-lang-const c-opt-cpp-prefix) | 602 | `(,(concat noncontinued-line-end |
| 500 | ced-re ; 1 + ncle-depth | 603 | (c-lang-const c-opt-cpp-prefix) |
| 501 | ;; Match the whole logical line to look | 604 | ced-re ; 1 + ncle-depth |
| 502 | ;; for the functions in. | 605 | ;; Match the whole logical line to look |
| 503 | "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*") | 606 | ;; for the functions in. |
| 504 | `((let ((limit (match-end 0))) | 607 | "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*") |
| 505 | (while (re-search-forward ,cef-re limit 'move) | 608 | ((let ((limit (match-end 0))) |
| 506 | (c-put-font-lock-face (match-beginning 1) | 609 | (while (re-search-forward ,cef-re limit 'move) |
| 507 | (match-end 1) | 610 | (c-put-font-lock-face (match-beginning 1) |
| 508 | c-preprocessor-face-name))) | 611 | (match-end 1) |
| 509 | (goto-char (match-end ,(1+ ncle-depth))))))))) | 612 | c-preprocessor-face-name))) |
| 613 | (goto-char (match-end ,(1+ ncle-depth))))) | ||
| 614 | `(in-cpp-expr | ||
| 615 | (save-excursion (c-end-of-macro) (point)) | ||
| 616 | ,cef-re | ||
| 617 | (1 c-preprocessor-face-name t))))))) | ||
| 510 | 618 | ||
| 511 | ;; Fontify the directive names. | 619 | ;; Fontify the directive names. |
| 512 | (,(c-make-font-lock-search-function | 620 | (,(c-make-font-lock-search-function |
| @@ -759,6 +867,12 @@ casts and declarations are fontified. Used on level 2 and higher." | |||
| 759 | (c-forward-syntactic-ws limit) | 867 | (c-forward-syntactic-ws limit) |
| 760 | (c-font-lock-declarators limit t (eq prop 'c-decl-type-start)))) | 868 | (c-font-lock-declarators limit t (eq prop 'c-decl-type-start)))) |
| 761 | 869 | ||
| 870 | (setq c-font-lock-context ;; (c-guess-font-lock-context) | ||
| 871 | (save-excursion | ||
| 872 | (if (and c-cpp-expr-intro-re | ||
| 873 | (c-beginning-of-macro) | ||
| 874 | (looking-at c-cpp-expr-intro-re)) | ||
| 875 | 'in-cpp-expr))) | ||
| 762 | nil) | 876 | nil) |
| 763 | 877 | ||
| 764 | (defun c-font-lock-<>-arglists (limit) | 878 | (defun c-font-lock-<>-arglists (limit) |
| @@ -1552,7 +1666,9 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'." | |||
| 1552 | (unless (c-skip-comments-and-strings limit) | 1666 | (unless (c-skip-comments-and-strings limit) |
| 1553 | (c-forward-syntactic-ws) | 1667 | (c-forward-syntactic-ws) |
| 1554 | ;; Handle prefix declaration specifiers. | 1668 | ;; Handle prefix declaration specifiers. |
| 1555 | (when (looking-at c-prefix-spec-kwds-re) | 1669 | (when (or (looking-at c-prefix-spec-kwds-re) |
| 1670 | (and (c-major-mode-is 'java-mode) | ||
| 1671 | (looking-at "@[A-Za-z0-9]+"))) | ||
| 1556 | (c-forward-keyword-clause 1)) | 1672 | (c-forward-keyword-clause 1)) |
| 1557 | ,(if (c-major-mode-is 'c++-mode) | 1673 | ,(if (c-major-mode-is 'c++-mode) |
| 1558 | `(when (and (c-forward-type) | 1674 | `(when (and (c-forward-type) |
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 35097242cb7..279c5e46c46 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -815,6 +815,16 @@ expression." | |||
| 815 | t (if (c-lang-const c-opt-cpp-prefix) | 815 | t (if (c-lang-const c-opt-cpp-prefix) |
| 816 | '("if" "elif"))) | 816 | '("if" "elif"))) |
| 817 | 817 | ||
| 818 | (c-lang-defconst c-cpp-expr-intro-re | ||
| 819 | "Regexp which matches the start of a CPP directive which contains an | ||
| 820 | expression, or nil if there aren't any in the language." | ||
| 821 | t (if (c-lang-const c-cpp-expr-directives) | ||
| 822 | (concat | ||
| 823 | (c-lang-const c-opt-cpp-prefix) | ||
| 824 | (c-make-keywords-re t (c-lang-const c-cpp-expr-directives))))) | ||
| 825 | (c-lang-defvar c-cpp-expr-intro-re | ||
| 826 | (c-lang-const c-cpp-expr-intro-re)) | ||
| 827 | |||
| 818 | (c-lang-defconst c-cpp-expr-functions | 828 | (c-lang-defconst c-cpp-expr-functions |
| 819 | "List of functions in cpp expressions." | 829 | "List of functions in cpp expressions." |
| 820 | t (if (c-lang-const c-opt-cpp-prefix) | 830 | t (if (c-lang-const c-opt-cpp-prefix) |
| @@ -1813,7 +1823,7 @@ will be handled." | |||
| 1813 | "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") | 1823 | "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") |
| 1814 | ;; Note: "const" is not used in Java, but it's still a reserved keyword. | 1824 | ;; Note: "const" is not used in Java, but it's still a reserved keyword. |
| 1815 | java '("abstract" "const" "final" "native" "private" "protected" "public" | 1825 | java '("abstract" "const" "final" "native" "private" "protected" "public" |
| 1816 | "static" "strictfp" "synchronized" "transient" "volatile" "@[A-Za-z0-9]+") | 1826 | "static" "strictfp" "synchronized" "transient" "volatile") |
| 1817 | pike '("final" "inline" "local" "nomask" "optional" "private" "protected" | 1827 | pike '("final" "inline" "local" "nomask" "optional" "private" "protected" |
| 1818 | "public" "static" "variant")) | 1828 | "public" "static" "variant")) |
| 1819 | 1829 | ||
| @@ -1899,10 +1909,7 @@ one of `c-type-list-kwds', `c-ref-list-kwds', | |||
| 1899 | 1909 | ||
| 1900 | (c-lang-defconst c-prefix-spec-kwds-re | 1910 | (c-lang-defconst c-prefix-spec-kwds-re |
| 1901 | ;; Adorned regexp of `c-prefix-spec-kwds'. | 1911 | ;; Adorned regexp of `c-prefix-spec-kwds'. |
| 1902 | t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)) | 1912 | t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))) |
| 1903 | java (replace-regexp-in-string | ||
| 1904 | "\\\\\\[" "[" | ||
| 1905 | (replace-regexp-in-string "\\\\\\+" "+" (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))))) | ||
| 1906 | 1913 | ||
| 1907 | (c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) | 1914 | (c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) |
| 1908 | 1915 | ||
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f3b873c8b1e..79fec080d57 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -145,7 +145,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) | |||
| 145 | 145 | ||
| 146 | (ant | 146 | (ant |
| 147 | "^[ \t]*\\[[^] \n]+\\][ \t]*\\([^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\)?\ | 147 | "^[ \t]*\\[[^] \n]+\\][ \t]*\\([^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\)?\ |
| 148 | \\( warning\\)?" 1 (2 . 4) (3 . 5) (4)) | 148 | \\( warning\\)?" 1 (2 . 4) (3 . 5) (6)) |
| 149 | 149 | ||
| 150 | (bash | 150 | (bash |
| 151 | "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) | 151 | "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) |
| @@ -523,7 +523,7 @@ you may also want to change `compilation-page-delimiter'.") | |||
| 523 | ;; Command output lines. Recognize `make[n]:' lines too. | 523 | ;; Command output lines. Recognize `make[n]:' lines too. |
| 524 | ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" | 524 | ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" |
| 525 | (1 font-lock-function-name-face) (3 compilation-line-face nil t)) | 525 | (1 font-lock-function-name-face) (3 compilation-line-face nil t)) |
| 526 | (" -\\(?:o[= ]?\\|-\\(?:outfile\\|output\\)[= ]\\)\\(\\S +\\)" . 1) | 526 | (" --?o\\(?:utfile\\|utput\\)?[= ]\\(\\S +\\)" . 1) |
| 527 | ("^Compilation \\(finished\\).*" | 527 | ("^Compilation \\(finished\\).*" |
| 528 | (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) | 528 | (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) |
| 529 | (1 compilation-info-face)) | 529 | (1 compilation-info-face)) |
| @@ -985,12 +985,15 @@ POS and RES.") | |||
| 985 | (let* ((prev | 985 | (let* ((prev |
| 986 | (or (get-text-property (1- prev-pos) 'compilation-message) | 986 | (or (get-text-property (1- prev-pos) 'compilation-message) |
| 987 | (get-text-property prev-pos 'compilation-message))) | 987 | (get-text-property prev-pos 'compilation-message))) |
| 988 | (prev-struct | 988 | (prev-file-struct |
| 989 | (car (nth 2 (car prev))))) | 989 | (and prev |
| 990 | (compilation--loc->file-struct | ||
| 991 | (compilation--message->loc prev))))) | ||
| 992 | |||
| 990 | ;; Construct FILE . DIR from that. | 993 | ;; Construct FILE . DIR from that. |
| 991 | (if prev-struct | 994 | (if prev-file-struct |
| 992 | (setq file (cons (car prev-struct) | 995 | (setq file (cons (caar prev-file-struct) |
| 993 | (cadr prev-struct)))))) | 996 | (cadr (car prev-file-struct))))))) |
| 994 | (unless file | 997 | (unless file |
| 995 | (setq file '("*unknown*"))))) | 998 | (setq file '("*unknown*"))))) |
| 996 | ;; All of these fields are optional, get them only if we have an index, and | 999 | ;; All of these fields are optional, get them only if we have an index, and |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 31100f3fac2..709f01444bf 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -463,9 +463,12 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." | |||
| 463 | (set (make-local-variable 'compilation-exit-message-function) | 463 | (set (make-local-variable 'compilation-exit-message-function) |
| 464 | (lambda (status code msg) | 464 | (lambda (status code msg) |
| 465 | (if (eq status 'exit) | 465 | (if (eq status 'exit) |
| 466 | (cond ((zerop code) | 466 | ;; This relies on the fact that `compilation-start' |
| 467 | ;; sets buffer-modified to nil before running the command, | ||
| 468 | ;; so the buffer is still unmodified if there is no output. | ||
| 469 | (cond ((and (zerop code) (buffer-modified-p)) | ||
| 467 | '("finished (matches found)\n" . "matched")) | 470 | '("finished (matches found)\n" . "matched")) |
| 468 | ((= code 1) | 471 | ((or (= code 1) (not (buffer-modified-p))) |
| 469 | '("finished with no matches found\n" . "no match")) | 472 | '("finished with no matches found\n" . "no match")) |
| 470 | (t | 473 | (t |
| 471 | (cons msg code))) | 474 | (cons msg code))) |
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index 4151e2bb79a..470b309434c 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el | |||
| @@ -55,24 +55,24 @@ | |||
| 55 | (defvar scheme-mode-syntax-table | 55 | (defvar scheme-mode-syntax-table |
| 56 | (let ((st (make-syntax-table)) | 56 | (let ((st (make-syntax-table)) |
| 57 | (i 0)) | 57 | (i 0)) |
| 58 | 58 | ;; Symbol constituents | |
| 59 | ;; Default is atom-constituent. | 59 | ;; We used to treat chars 128-256 as symbol-constituent, but they |
| 60 | (while (< i 256) | 60 | ;; should be valid word constituents (Bug#8843). Note that valid |
| 61 | ;; identifier characters are Scheme-implementation dependent. | ||
| 62 | (while (< i ?0) | ||
| 61 | (modify-syntax-entry i "_ " st) | 63 | (modify-syntax-entry i "_ " st) |
| 62 | (setq i (1+ i))) | 64 | (setq i (1+ i))) |
| 63 | 65 | (setq i (1+ ?9)) | |
| 64 | ;; Word components. | 66 | (while (< i ?A) |
| 65 | (setq i ?0) | 67 | (modify-syntax-entry i "_ " st) |
| 66 | (while (<= i ?9) | ||
| 67 | (modify-syntax-entry i "w " st) | ||
| 68 | (setq i (1+ i))) | 68 | (setq i (1+ i))) |
| 69 | (setq i ?A) | 69 | (setq i (1+ ?Z)) |
| 70 | (while (<= i ?Z) | 70 | (while (< i ?a) |
| 71 | (modify-syntax-entry i "w " st) | 71 | (modify-syntax-entry i "_ " st) |
| 72 | (setq i (1+ i))) | 72 | (setq i (1+ i))) |
| 73 | (setq i ?a) | 73 | (setq i (1+ ?z)) |
| 74 | (while (<= i ?z) | 74 | (while (< i 128) |
| 75 | (modify-syntax-entry i "w " st) | 75 | (modify-syntax-entry i "_ " st) |
| 76 | (setq i (1+ i))) | 76 | (setq i (1+ i))) |
| 77 | 77 | ||
| 78 | ;; Whitespace | 78 | ;; Whitespace |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 31a4fbaef4d..7b949134c6c 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -460,6 +460,7 @@ This is buffer-local in every such buffer.") | |||
| 460 | (define-key map "\C-c+" 'sh-add) | 460 | (define-key map "\C-c+" 'sh-add) |
| 461 | (define-key map "\C-\M-x" 'sh-execute-region) | 461 | (define-key map "\C-\M-x" 'sh-execute-region) |
| 462 | (define-key map "\C-c\C-x" 'executable-interpret) | 462 | (define-key map "\C-c\C-x" 'executable-interpret) |
| 463 | ;; FIXME: Use post-self-insert-hook. | ||
| 463 | (define-key map "<" 'sh-maybe-here-document) | 464 | (define-key map "<" 'sh-maybe-here-document) |
| 464 | (define-key map "(" 'skeleton-pair-insert-maybe) | 465 | (define-key map "(" 'skeleton-pair-insert-maybe) |
| 465 | (define-key map "{" 'skeleton-pair-insert-maybe) | 466 | (define-key map "{" 'skeleton-pair-insert-maybe) |
| @@ -3659,6 +3660,7 @@ The document is bounded by `sh-here-document-word'." | |||
| 3659 | (save-excursion | 3660 | (save-excursion |
| 3660 | (backward-char 2) | 3661 | (backward-char 2) |
| 3661 | (sh-quoted-p)) | 3662 | (sh-quoted-p)) |
| 3663 | (nth 8 (syntax-ppss)) | ||
| 3662 | (let ((tabs (if (string-match "\\`-" sh-here-document-word) | 3664 | (let ((tabs (if (string-match "\\`-" sh-here-document-word) |
| 3663 | (make-string (/ (current-indentation) tab-width) ?\t) | 3665 | (make-string (/ (current-indentation) tab-width) ?\t) |
| 3664 | "")) | 3666 | "")) |
diff --git a/lisp/shell.el b/lisp/shell.el index de811543ba0..01d1a688f0e 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -383,6 +383,21 @@ to `dirtrack-mode'." | |||
| 383 | :group 'shell | 383 | :group 'shell |
| 384 | :type '(choice (const nil) regexp)) | 384 | :type '(choice (const nil) regexp)) |
| 385 | 385 | ||
| 386 | (defun shell-parse-pcomplete-arguments () | ||
| 387 | "Parse whitespace separated arguments in the current region." | ||
| 388 | (let ((begin (save-excursion (shell-backward-command 1) (point))) | ||
| 389 | (end (point)) | ||
| 390 | begins args) | ||
| 391 | (save-excursion | ||
| 392 | (goto-char begin) | ||
| 393 | (while (< (point) end) | ||
| 394 | (skip-chars-forward " \t\n") | ||
| 395 | (push (point) begins) | ||
| 396 | (looking-at "\\(?:[^\s\t\n\\]\\|'[^']*'\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\"\\|\\\\.\\)*\\(?:\\\\\\|'[^']*\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\\)?") | ||
| 397 | (goto-char (match-end 0)) | ||
| 398 | (push (buffer-substring-no-properties (car begins) (point)) | ||
| 399 | args)) | ||
| 400 | (cons (nreverse args) (nreverse begins))))) | ||
| 386 | 401 | ||
| 387 | (defun shell-completion-vars () | 402 | (defun shell-completion-vars () |
| 388 | "Setup completion vars for `shell-mode' and `read-shell-command'." | 403 | "Setup completion vars for `shell-mode' and `read-shell-command'." |
| @@ -396,8 +411,9 @@ to `dirtrack-mode'." | |||
| 396 | (set (make-local-variable 'comint-dynamic-complete-functions) | 411 | (set (make-local-variable 'comint-dynamic-complete-functions) |
| 397 | shell-dynamic-complete-functions) | 412 | shell-dynamic-complete-functions) |
| 398 | (set (make-local-variable 'pcomplete-parse-arguments-function) | 413 | (set (make-local-variable 'pcomplete-parse-arguments-function) |
| 399 | ;; FIXME: This function should be moved to shell.el. | 414 | #'shell-parse-pcomplete-arguments) |
| 400 | #'pcomplete-parse-comint-arguments) | 415 | (set (make-local-variable 'pcomplete-arg-quote-list) |
| 416 | (append "\\ \t\n\r\"'`$|&;(){}[]<>#" nil)) | ||
| 401 | (set (make-local-variable 'pcomplete-termination-string) | 417 | (set (make-local-variable 'pcomplete-termination-string) |
| 402 | (cond ((not comint-completion-addsuffix) "") | 418 | (cond ((not comint-completion-addsuffix) "") |
| 403 | ((stringp comint-completion-addsuffix) | 419 | ((stringp comint-completion-addsuffix) |
diff --git a/lisp/startup.el b/lisp/startup.el index 0dee969fb5a..6c3bb397e9a 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -409,7 +409,7 @@ The regexp should not contain a starting \"\\`\" or a trailing | |||
| 409 | \"\\'\"; those are added automatically by callers.") | 409 | \"\\'\"; those are added automatically by callers.") |
| 410 | 410 | ||
| 411 | (defun normal-top-level-add-subdirs-to-load-path () | 411 | (defun normal-top-level-add-subdirs-to-load-path () |
| 412 | "Add all subdirectories of current directory to `load-path'. | 412 | "Add all subdirectories of `default-directory' to `load-path'. |
| 413 | More precisely, this uses only the subdirectories whose names | 413 | More precisely, this uses only the subdirectories whose names |
| 414 | start with letters or digits; it excludes any subdirectory named `RCS' | 414 | start with letters or digits; it excludes any subdirectory named `RCS' |
| 415 | or `CVS', and any subdirectory that contains a file named `.nosearch'." | 415 | or `CVS', and any subdirectory that contains a file named `.nosearch'." |
diff --git a/lisp/term.el b/lisp/term.el index 6d7f6f5c535..361ff685396 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -1227,9 +1227,9 @@ without any interpretation." | |||
| 1227 | (make-string 1 char) | 1227 | (make-string 1 char) |
| 1228 | (format "\e%c" char))))) | 1228 | (format "\e%c" char))))) |
| 1229 | 1229 | ||
| 1230 | (defun term-mouse-paste (click arg) | 1230 | (defun term-mouse-paste (click) |
| 1231 | "Insert the last stretch of killed text at the position clicked on." | 1231 | "Insert the primary selection at the position clicked on." |
| 1232 | (interactive "e\nP") | 1232 | (interactive "e") |
| 1233 | (if (featurep 'xemacs) | 1233 | (if (featurep 'xemacs) |
| 1234 | (term-send-raw-string | 1234 | (term-send-raw-string |
| 1235 | (or (condition-case () (x-get-selection) (error ())) | 1235 | (or (condition-case () (x-get-selection) (error ())) |
| @@ -1238,10 +1238,17 @@ without any interpretation." | |||
| 1238 | (run-hooks 'mouse-leave-buffer-hook) | 1238 | (run-hooks 'mouse-leave-buffer-hook) |
| 1239 | (setq this-command 'yank) | 1239 | (setq this-command 'yank) |
| 1240 | (mouse-set-point click) | 1240 | (mouse-set-point click) |
| 1241 | (term-send-raw-string (current-kill (cond | 1241 | (term-send-raw-string |
| 1242 | ((listp arg) 0) | 1242 | (or (cond ; From `mouse-yank-primary': |
| 1243 | ((eq arg '-) -1) | 1243 | ((eq system-type 'windows-nt) |
| 1244 | (t (1- arg))))))) | 1244 | (or (x-get-selection 'PRIMARY) |
| 1245 | (x-get-selection-value))) | ||
| 1246 | ((fboundp 'x-get-selection-value) | ||
| 1247 | (or (x-get-selection-value) | ||
| 1248 | (x-get-selection 'PRIMARY))) | ||
| 1249 | (t | ||
| 1250 | (x-get-selection 'PRIMARY))) | ||
| 1251 | (error "No selection is available"))))) | ||
| 1245 | 1252 | ||
| 1246 | (defun term-paste () | 1253 | (defun term-paste () |
| 1247 | "Insert the last stretch of killed text at point." | 1254 | "Insert the last stretch of killed text at point." |
diff --git a/lisp/tutorial.el b/lisp/tutorial.el index 77ef50843d3..c57ec33d2e2 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el | |||
| @@ -253,7 +253,7 @@ LEFT and RIGHT are the elements to compare." | |||
| 253 | ;; * INSERTING AND DELETING | 253 | ;; * INSERTING AND DELETING |
| 254 | ;; C-u 8 * to insert ********. | 254 | ;; C-u 8 * to insert ********. |
| 255 | (delete-backward-char "\d") | 255 | (delete-backward-char "\d") |
| 256 | (delete-forward-char [?\C-d]) | 256 | (delete-char [?\C-d]) |
| 257 | (backward-kill-word [?\M-\d]) | 257 | (backward-kill-word [?\M-\d]) |
| 258 | (kill-word [?\M-d]) | 258 | (kill-word [?\M-d]) |
| 259 | (kill-line [?\C-k]) | 259 | (kill-line [?\C-k]) |
| @@ -298,7 +298,7 @@ LEFT and RIGHT are the elements to compare." | |||
| 298 | (isearch-backward [?\C-r]) | 298 | (isearch-backward [?\C-r]) |
| 299 | 299 | ||
| 300 | ;; * MULTIPLE WINDOWS | 300 | ;; * MULTIPLE WINDOWS |
| 301 | (split-window-vertically [?\C-x ?2]) | 301 | (split-window-above-each-other [?\C-x ?2]) |
| 302 | (scroll-other-window [?\C-\M-v]) | 302 | (scroll-other-window [?\C-\M-v]) |
| 303 | (other-window [?\C-x ?o]) | 303 | (other-window [?\C-x ?o]) |
| 304 | (find-file-other-window [?\C-x ?4 ?\C-f]) | 304 | (find-file-other-window [?\C-x ?4 ?\C-f]) |
| @@ -889,6 +889,11 @@ Run the Viper tutorial? ")) | |||
| 889 | (search-forward ">>") | 889 | (search-forward ">>") |
| 890 | (replace-match "]"))) | 890 | (replace-match "]"))) |
| 891 | (beginning-of-line) | 891 | (beginning-of-line) |
| 892 | ;; FIXME: if the window is not tall, and especially if the | ||
| 893 | ;; big red "NOTICE: The main purpose..." text has been | ||
| 894 | ;; inserted at the start of the buffer, the "type C-v to | ||
| 895 | ;; move to the next screen" might not be visible on the | ||
| 896 | ;; first screen (n < 0). How will the novice know what to do? | ||
| 892 | (let ((n (- (window-height (selected-window)) | 897 | (let ((n (- (window-height (selected-window)) |
| 893 | (count-lines (point-min) (point)) | 898 | (count-lines (point-min) (point)) |
| 894 | 6))) | 899 | 6))) |
| @@ -897,7 +902,7 @@ Run the Viper tutorial? ")) | |||
| 897 | ;; For a short gap, we don't need the [...] line, | 902 | ;; For a short gap, we don't need the [...] line, |
| 898 | ;; so delete it. | 903 | ;; so delete it. |
| 899 | (delete-region (point) (progn (end-of-line) (point))) | 904 | (delete-region (point) (progn (end-of-line) (point))) |
| 900 | (newline n)) | 905 | (if (> n 0) (newline n))) |
| 901 | ;; Some people get confused by the large gap. | 906 | ;; Some people get confused by the large gap. |
| 902 | (newline (/ n 2)) | 907 | (newline (/ n 2)) |
| 903 | 908 | ||
diff --git a/lisp/view.el b/lisp/view.el index 21479a70a72..be011d217fc 100644 --- a/lisp/view.el +++ b/lisp/view.el | |||
| @@ -576,9 +576,9 @@ current buffer. " | |||
| 576 | (cond | 576 | (cond |
| 577 | ((or all-windows view-exits-all-viewing-windows) | 577 | ((or all-windows view-exits-all-viewing-windows) |
| 578 | (dolist (window (get-buffer-window-list)) | 578 | (dolist (window (get-buffer-window-list)) |
| 579 | (quit-restore-window window))) | 579 | (quit-window nil window))) |
| 580 | ((eq (window-buffer) (current-buffer)) | 580 | ((eq (window-buffer) (current-buffer)) |
| 581 | (quit-restore-window))) | 581 | (quit-window))) |
| 582 | 582 | ||
| 583 | (when exit-action | 583 | (when exit-action |
| 584 | (funcall exit-action buffer)) | 584 | (funcall exit-action buffer)) |
diff --git a/lisp/window.el b/lisp/window.el index eca3dcb435d..fb9d38c6503 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -2272,7 +2272,7 @@ another frame still exists. | |||
| 2272 | 2272 | ||
| 2273 | Functions quitting a window and consequently affected by this | 2273 | Functions quitting a window and consequently affected by this |
| 2274 | variable are `switch-to-prev-buffer', `delete-windows-on', | 2274 | variable are `switch-to-prev-buffer', `delete-windows-on', |
| 2275 | `replace-buffer-in-windows' and `quit-restore-window'." | 2275 | `replace-buffer-in-windows' and `quit-window'." |
| 2276 | :type '(choice | 2276 | :type '(choice |
| 2277 | (const :tag "Never" nil) | 2277 | (const :tag "Never" nil) |
| 2278 | (const :tag "Automatic" automatic) | 2278 | (const :tag "Automatic" automatic) |
| @@ -2907,21 +2907,17 @@ all window-local buffer lists." | |||
| 2907 | ;; Unrecord BUFFER in WINDOW. | 2907 | ;; Unrecord BUFFER in WINDOW. |
| 2908 | (unrecord-window-buffer window buffer))))) | 2908 | (unrecord-window-buffer window buffer))))) |
| 2909 | 2909 | ||
| 2910 | (defun quit-restore-window (&optional window kill) | 2910 | (defun quit-window (&optional kill window) |
| 2911 | "Quit WINDOW in some way. | 2911 | "Quit WINDOW and bury its buffer. |
| 2912 | WINDOW must be a live window and defaults to the selected window. | 2912 | WINDOW defaults to the selected window. |
| 2913 | Return nil. | 2913 | With a prefix argument, kill the buffer instead. |
| 2914 | 2914 | ||
| 2915 | According to information stored in WINDOW's `quit-restore' window | 2915 | According to information stored in WINDOW's `quit-restore' window |
| 2916 | parameter either \(1) delete WINDOW and its frame, \(2) delete | 2916 | parameter either \(1) delete WINDOW and its frame, \(2) delete |
| 2917 | WINDOW, \(3) restore the buffer previously displayed in WINDOW, | 2917 | WINDOW, \(3) restore the buffer previously displayed in WINDOW, |
| 2918 | or \(4) make WINDOW display some other buffer than the present | 2918 | or \(4) make WINDOW display some other buffer than the present |
| 2919 | one. If non-nil, reset `quit-restore' parameter to nil. | 2919 | one. If non-nil, reset `quit-restore' parameter to nil." |
| 2920 | 2920 | (interactive "P") | |
| 2921 | Optional argument KILL non-nil means in addition kill WINDOW's | ||
| 2922 | buffer. If KILL is nil, put WINDOW's buffer at the end of the | ||
| 2923 | buffer list. Interactively, KILL is the prefix argument." | ||
| 2924 | (interactive "i\nP") | ||
| 2925 | (setq window (window-normalize-live-window window)) | 2921 | (setq window (window-normalize-live-window window)) |
| 2926 | (let ((buffer (window-buffer window)) | 2922 | (let ((buffer (window-buffer window)) |
| 2927 | (quit-restore (window-parameter window 'quit-restore)) | 2923 | (quit-restore (window-parameter window 'quit-restore)) |
| @@ -2971,8 +2967,7 @@ buffer list. Interactively, KILL is the prefix argument." | |||
| 2971 | (switch-to-prev-buffer window 'bury-or-kill))) | 2967 | (switch-to-prev-buffer window 'bury-or-kill))) |
| 2972 | 2968 | ||
| 2973 | ;; Kill WINDOW's old-buffer if requested | 2969 | ;; Kill WINDOW's old-buffer if requested |
| 2974 | (when kill (kill-buffer buffer)) | 2970 | (if kill (kill-buffer buffer)))) |
| 2975 | nil)) | ||
| 2976 | 2971 | ||
| 2977 | ;;; Splitting windows. | 2972 | ;;; Splitting windows. |
| 2978 | (defsubst window-split-min-size (&optional horizontal) | 2973 | (defsubst window-split-min-size (&optional horizontal) |
| @@ -4763,8 +4758,10 @@ BUFFER, nil if none was found." | |||
| 4763 | (dolist (window (window-list-1 nil 'nomini method-frame)) | 4758 | (dolist (window (window-list-1 nil 'nomini method-frame)) |
| 4764 | (let ((window-buffer (window-buffer window))) | 4759 | (let ((window-buffer (window-buffer window))) |
| 4765 | (when (and (not (window-minibuffer-p window)) | 4760 | (when (and (not (window-minibuffer-p window)) |
| 4766 | ;; Don't reuse a side window. | 4761 | ;; Don't reuse a side window unless it shows the |
| 4767 | (or (not (eq (window-parameter window 'window-side) 'side)) | 4762 | ;; buffer already. |
| 4763 | (or (memq (window-parameter window 'window-side) | ||
| 4764 | '(nil none)) | ||
| 4768 | (eq window-buffer buffer)) | 4765 | (eq window-buffer buffer)) |
| 4769 | (or (not method-window) | 4766 | (or (not method-window) |
| 4770 | (and (eq method-window 'same) | 4767 | (and (eq method-window 'same) |
| @@ -5033,7 +5030,8 @@ description." | |||
| 5033 | ;; and must be neither a minibuffer window | 5030 | ;; and must be neither a minibuffer window |
| 5034 | (not (window-minibuffer-p window)) | 5031 | (not (window-minibuffer-p window)) |
| 5035 | ;; nor a side window. | 5032 | ;; nor a side window. |
| 5036 | (not (eq (window-parameter window 'window-side) 'side))) | 5033 | (memq (window-parameter window 'window-side) |
| 5034 | '(nil none))) | ||
| 5037 | (setq window | 5035 | (setq window |
| 5038 | (cond | 5036 | (cond |
| 5039 | ((memq side display-buffer-side-specifiers) | 5037 | ((memq side display-buffer-side-specifiers) |
| @@ -6079,9 +6077,6 @@ ignored. | |||
| 6079 | See also `same-window-regexps'." | 6077 | See also `same-window-regexps'." |
| 6080 | :type '(repeat (string :format "%v")) | 6078 | :type '(repeat (string :format "%v")) |
| 6081 | :group 'windows) | 6079 | :group 'windows) |
| 6082 | ;; (make-obsolete-variable | ||
| 6083 | ;; 'same-window-buffer-names | ||
| 6084 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6085 | 6080 | ||
| 6086 | (defcustom same-window-regexps nil | 6081 | (defcustom same-window-regexps nil |
| 6087 | "List of regexps saying which buffers should appear in the \"same\" window. | 6082 | "List of regexps saying which buffers should appear in the \"same\" window. |
| @@ -6097,9 +6092,6 @@ the buffer name. This is for compatibility with | |||
| 6097 | See also `same-window-buffer-names'." | 6092 | See also `same-window-buffer-names'." |
| 6098 | :type '(repeat (regexp :format "%v")) | 6093 | :type '(repeat (regexp :format "%v")) |
| 6099 | :group 'windows) | 6094 | :group 'windows) |
| 6100 | ;; (make-obsolete-variable | ||
| 6101 | ;; 'same-window-regexps | ||
| 6102 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6103 | 6095 | ||
| 6104 | (defun same-window-p (buffer-name) | 6096 | (defun same-window-p (buffer-name) |
| 6105 | "Return non-nil if a buffer named BUFFER-NAME would be shown in the \"same\" window. | 6097 | "Return non-nil if a buffer named BUFFER-NAME would be shown in the \"same\" window. |
| @@ -6124,8 +6116,6 @@ selected rather than \(as usual\) some other window. See | |||
| 6124 | (and (consp regexp) (stringp (car regexp)) | 6116 | (and (consp regexp) (stringp (car regexp)) |
| 6125 | (string-match-p (car regexp) buffer-name))) | 6117 | (string-match-p (car regexp) buffer-name))) |
| 6126 | (throw 'found t)))))))) | 6118 | (throw 'found t)))))))) |
| 6127 | ;; (make-obsolete | ||
| 6128 | ;; 'same-window-p "pass argument to buffer display function instead." "24.1") | ||
| 6129 | 6119 | ||
| 6130 | (defcustom special-display-frame-alist | 6120 | (defcustom special-display-frame-alist |
| 6131 | '((height . 14) (width . 80) (unsplittable . t)) | 6121 | '((height . 14) (width . 80) (unsplittable . t)) |
| @@ -6143,9 +6133,6 @@ These supersede the values given in `default-frame-alist'." | |||
| 6143 | (symbol :tag "Parameter") | 6133 | (symbol :tag "Parameter") |
| 6144 | (sexp :tag "Value"))) | 6134 | (sexp :tag "Value"))) |
| 6145 | :group 'frames) | 6135 | :group 'frames) |
| 6146 | ;; (make-obsolete-variable | ||
| 6147 | ;; 'special-display-frame-alist | ||
| 6148 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6149 | 6136 | ||
| 6150 | (defun special-display-popup-frame (buffer &optional args) | 6137 | (defun special-display-popup-frame (buffer &optional args) |
| 6151 | "Display BUFFER in a special frame and return the window chosen. | 6138 | "Display BUFFER in a special frame and return the window chosen. |
| @@ -6191,9 +6178,6 @@ and (cdr ARGS) as the rest of the arguments." | |||
| 6191 | (set-window-buffer (frame-selected-window frame) buffer) | 6178 | (set-window-buffer (frame-selected-window frame) buffer) |
| 6192 | (set-window-dedicated-p (frame-selected-window frame) t) | 6179 | (set-window-dedicated-p (frame-selected-window frame) t) |
| 6193 | (frame-selected-window frame)))))) | 6180 | (frame-selected-window frame)))))) |
| 6194 | ;; (make-obsolete | ||
| 6195 | ;; 'special-display-popup-frame | ||
| 6196 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6197 | 6181 | ||
| 6198 | (defcustom special-display-function 'special-display-popup-frame | 6182 | (defcustom special-display-function 'special-display-popup-frame |
| 6199 | "Function to call for displaying special buffers. | 6183 | "Function to call for displaying special buffers. |
| @@ -6210,9 +6194,6 @@ A buffer is special when its name is either listed in | |||
| 6210 | :type 'function | 6194 | :type 'function |
| 6211 | :group 'windows | 6195 | :group 'windows |
| 6212 | :group 'frames) | 6196 | :group 'frames) |
| 6213 | ;; (make-obsolete-variable | ||
| 6214 | ;; 'special-display-function | ||
| 6215 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6216 | 6197 | ||
| 6217 | (defcustom special-display-buffer-names nil | 6198 | (defcustom special-display-buffer-names nil |
| 6218 | "List of names of buffers that should be displayed specially. | 6199 | "List of names of buffers that should be displayed specially. |
| @@ -6277,9 +6258,6 @@ See also `special-display-regexps'." | |||
| 6277 | (repeat :tag "Arguments" (sexp))))) | 6258 | (repeat :tag "Arguments" (sexp))))) |
| 6278 | :group 'windows | 6259 | :group 'windows |
| 6279 | :group 'frames) | 6260 | :group 'frames) |
| 6280 | ;; (make-obsolete-variable | ||
| 6281 | ;; 'special-display-buffer-names | ||
| 6282 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6283 | 6261 | ||
| 6284 | ;;;###autoload | 6262 | ;;;###autoload |
| 6285 | (put 'special-display-buffer-names 'risky-local-variable t) | 6263 | (put 'special-display-buffer-names 'risky-local-variable t) |
| @@ -6348,9 +6326,6 @@ See also `special-display-buffer-names'." | |||
| 6348 | (repeat :tag "Arguments" (sexp))))) | 6326 | (repeat :tag "Arguments" (sexp))))) |
| 6349 | :group 'windows | 6327 | :group 'windows |
| 6350 | :group 'frames) | 6328 | :group 'frames) |
| 6351 | ;; (make-obsolete-variable | ||
| 6352 | ;; 'special-display-regexps | ||
| 6353 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6354 | 6329 | ||
| 6355 | (defun special-display-p (buffer-name) | 6330 | (defun special-display-p (buffer-name) |
| 6356 | "Return non-nil if a buffer named BUFFER-NAME gets a special frame. | 6331 | "Return non-nil if a buffer named BUFFER-NAME gets a special frame. |
| @@ -6378,9 +6353,6 @@ entry." | |||
| 6378 | ((and (consp regexp) (stringp (car regexp)) | 6353 | ((and (consp regexp) (stringp (car regexp)) |
| 6379 | (string-match-p (car regexp) buffer-name)) | 6354 | (string-match-p (car regexp) buffer-name)) |
| 6380 | (throw 'found (cdr regexp)))))))))) | 6355 | (throw 'found (cdr regexp)))))))))) |
| 6381 | ;; (make-obsolete | ||
| 6382 | ;; 'special-display-p | ||
| 6383 | ;; "pass argument to buffer display function instead." "24.1") | ||
| 6384 | 6356 | ||
| 6385 | (defcustom pop-up-frame-alist nil | 6357 | (defcustom pop-up-frame-alist nil |
| 6386 | "Alist of parameters for automatically generated new frames. | 6358 | "Alist of parameters for automatically generated new frames. |
| @@ -6400,9 +6372,6 @@ affected by this variable." | |||
| 6400 | (symbol :tag "Parameter") | 6372 | (symbol :tag "Parameter") |
| 6401 | (sexp :tag "Value"))) | 6373 | (sexp :tag "Value"))) |
| 6402 | :group 'frames) | 6374 | :group 'frames) |
| 6403 | ;; (make-obsolete-variable | ||
| 6404 | ;; 'pop-up-frame-alist | ||
| 6405 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6406 | 6375 | ||
| 6407 | (defcustom pop-up-frame-function | 6376 | (defcustom pop-up-frame-function |
| 6408 | (lambda () (make-frame pop-up-frame-alist)) | 6377 | (lambda () (make-frame pop-up-frame-alist)) |
| @@ -6412,9 +6381,6 @@ frame. The default value calls `make-frame' with the argument | |||
| 6412 | `pop-up-frame-alist'." | 6381 | `pop-up-frame-alist'." |
| 6413 | :type 'function | 6382 | :type 'function |
| 6414 | :group 'frames) | 6383 | :group 'frames) |
| 6415 | ;; (make-obsolete-variable | ||
| 6416 | ;; 'pop-up-frame-function | ||
| 6417 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6418 | 6384 | ||
| 6419 | (defcustom pop-up-frames nil | 6385 | (defcustom pop-up-frames nil |
| 6420 | "Whether `display-buffer' should make a separate frame. | 6386 | "Whether `display-buffer' should make a separate frame. |
| @@ -6428,9 +6394,6 @@ Any other non-nil value means always make a separate frame." | |||
| 6428 | (const :tag "Always" t)) | 6394 | (const :tag "Always" t)) |
| 6429 | :group 'windows | 6395 | :group 'windows |
| 6430 | :group 'frames) | 6396 | :group 'frames) |
| 6431 | ;; (make-obsolete-variable | ||
| 6432 | ;; 'pop-up-frames | ||
| 6433 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6434 | 6397 | ||
| 6435 | (defcustom display-buffer-reuse-frames nil | 6398 | (defcustom display-buffer-reuse-frames nil |
| 6436 | "Set and non-nil means `display-buffer' should reuse frames. | 6399 | "Set and non-nil means `display-buffer' should reuse frames. |
| @@ -6440,17 +6403,11 @@ that frame." | |||
| 6440 | :version "21.1" | 6403 | :version "21.1" |
| 6441 | :group 'windows | 6404 | :group 'windows |
| 6442 | :group 'frames) | 6405 | :group 'frames) |
| 6443 | ;; (make-obsolete-variable | ||
| 6444 | ;; 'display-buffer-reuse-frames | ||
| 6445 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6446 | 6406 | ||
| 6447 | (defcustom pop-up-windows t | 6407 | (defcustom pop-up-windows t |
| 6448 | "Non-nil means `display-buffer' should make a new window." | 6408 | "Non-nil means `display-buffer' should make a new window." |
| 6449 | :type 'boolean | 6409 | :type 'boolean |
| 6450 | :group 'windows) | 6410 | :group 'windows) |
| 6451 | ;; (make-obsolete-variable | ||
| 6452 | ;; 'pop-up-windows | ||
| 6453 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6454 | 6411 | ||
| 6455 | (defcustom split-window-preferred-function 'split-window-sensibly | 6412 | (defcustom split-window-preferred-function 'split-window-sensibly |
| 6456 | "Function called by `display-buffer' to split a window. | 6413 | "Function called by `display-buffer' to split a window. |
| @@ -6477,9 +6434,6 @@ not want to split the selected window." | |||
| 6477 | :type 'function | 6434 | :type 'function |
| 6478 | :version "23.1" | 6435 | :version "23.1" |
| 6479 | :group 'windows) | 6436 | :group 'windows) |
| 6480 | ;; (make-obsolete-variable | ||
| 6481 | ;; 'split-window-preferred-function | ||
| 6482 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6483 | 6437 | ||
| 6484 | (defcustom split-height-threshold 80 | 6438 | (defcustom split-height-threshold 80 |
| 6485 | "Minimum height for splitting a window to display a buffer. | 6439 | "Minimum height for splitting a window to display a buffer. |
| @@ -6491,9 +6445,6 @@ split it vertically disregarding the value of this variable." | |||
| 6491 | :type '(choice (const nil) (integer :tag "lines")) | 6445 | :type '(choice (const nil) (integer :tag "lines")) |
| 6492 | :version "23.1" | 6446 | :version "23.1" |
| 6493 | :group 'windows) | 6447 | :group 'windows) |
| 6494 | ;; (make-obsolete-variable | ||
| 6495 | ;; 'split-height-threshold | ||
| 6496 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6497 | 6448 | ||
| 6498 | (defcustom split-width-threshold 160 | 6449 | (defcustom split-width-threshold 160 |
| 6499 | "Minimum width for splitting a window to display a buffer. | 6450 | "Minimum width for splitting a window to display a buffer. |
| @@ -6503,9 +6454,6 @@ is nil, `display-buffer' cannot split windows horizontally." | |||
| 6503 | :type '(choice (const nil) (integer :tag "columns")) | 6454 | :type '(choice (const nil) (integer :tag "columns")) |
| 6504 | :version "23.1" | 6455 | :version "23.1" |
| 6505 | :group 'windows) | 6456 | :group 'windows) |
| 6506 | ;; (make-obsolete-variable | ||
| 6507 | ;; 'split-width-threshold | ||
| 6508 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6509 | 6457 | ||
| 6510 | (defcustom even-window-heights t | 6458 | (defcustom even-window-heights t |
| 6511 | "If non-nil `display-buffer' will try to even window heights. | 6459 | "If non-nil `display-buffer' will try to even window heights. |
| @@ -6514,17 +6462,11 @@ alone. Heights are evened only when `display-buffer' chooses a | |||
| 6514 | window that appears above or below the selected window." | 6462 | window that appears above or below the selected window." |
| 6515 | :type 'boolean | 6463 | :type 'boolean |
| 6516 | :group 'windows) | 6464 | :group 'windows) |
| 6517 | ;; (make-obsolete-variable | ||
| 6518 | ;; 'even-window-heights | ||
| 6519 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6520 | 6465 | ||
| 6521 | (defvar display-buffer-mark-dedicated nil | 6466 | (defvar display-buffer-mark-dedicated nil |
| 6522 | "Non-nil means `display-buffer' marks the windows it creates as dedicated. | 6467 | "Non-nil means `display-buffer' marks the windows it creates as dedicated. |
| 6523 | The actual non-nil value of this variable will be copied to the | 6468 | The actual non-nil value of this variable will be copied to the |
| 6524 | `window-dedicated-p' flag.") | 6469 | `window-dedicated-p' flag.") |
| 6525 | ;; (make-obsolete-variable | ||
| 6526 | ;; 'display-buffer-mark-dedicated | ||
| 6527 | ;; "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6528 | 6470 | ||
| 6529 | (defun window-splittable-p (window &optional horizontal) | 6471 | (defun window-splittable-p (window &optional horizontal) |
| 6530 | "Return non-nil if `split-window-sensibly' may split WINDOW. | 6472 | "Return non-nil if `split-window-sensibly' may split WINDOW. |
| @@ -6575,8 +6517,6 @@ hold: | |||
| 6575 | (max split-height-threshold | 6517 | (max split-height-threshold |
| 6576 | (* 2 (max window-min-height | 6518 | (* 2 (max window-min-height |
| 6577 | (if mode-line-format 2 1)))))))))) | 6519 | (if mode-line-format 2 1)))))))))) |
| 6578 | ;; (make-obsolete | ||
| 6579 | ;; 'window-splittable-p "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6580 | 6520 | ||
| 6581 | (defun split-window-sensibly (window) | 6521 | (defun split-window-sensibly (window) |
| 6582 | "Split WINDOW in a way suitable for `display-buffer'. | 6522 | "Split WINDOW in a way suitable for `display-buffer'. |
| @@ -6626,8 +6566,6 @@ split." | |||
| 6626 | (when (with-no-warnings (window-splittable-p window)) | 6566 | (when (with-no-warnings (window-splittable-p window)) |
| 6627 | (with-selected-window window | 6567 | (with-selected-window window |
| 6628 | (split-window-vertically))))))) | 6568 | (split-window-vertically))))))) |
| 6629 | ;; (make-obsolete | ||
| 6630 | ;; 'split-window-sensibly "use 2nd arg of `display-buffer' instead." "24.1") | ||
| 6631 | 6569 | ||
| 6632 | ;; Functions for converting Emacs 23 buffer display options to buffer | 6570 | ;; Functions for converting Emacs 23 buffer display options to buffer |
| 6633 | ;; display specifiers. | 6571 | ;; display specifiers. |
| @@ -7102,39 +7040,6 @@ Return non-nil if the window was shrunk, nil otherwise." | |||
| 7102 | (with-current-buffer buffer-to-kill | 7040 | (with-current-buffer buffer-to-kill |
| 7103 | (remove-hook 'kill-buffer-hook delete-window-hook t)))))) | 7041 | (remove-hook 'kill-buffer-hook delete-window-hook t)))))) |
| 7104 | 7042 | ||
| 7105 | (defun quit-window (&optional kill window) | ||
| 7106 | "Quit WINDOW and bury its buffer. | ||
| 7107 | With a prefix argument, kill the buffer instead. WINDOW defaults | ||
| 7108 | to the selected window. | ||
| 7109 | |||
| 7110 | If WINDOW is non-nil, dedicated, or a minibuffer window, delete | ||
| 7111 | it and, if it's alone on its frame, its frame too. Otherwise, or | ||
| 7112 | if deleting WINDOW fails in any of the preceding cases, display | ||
| 7113 | another buffer in WINDOW using `switch-to-buffer'. | ||
| 7114 | |||
| 7115 | Optional argument KILL non-nil means kill WINDOW's buffer. | ||
| 7116 | Otherwise, bury WINDOW's buffer, see `bury-buffer'." | ||
| 7117 | (interactive "P") | ||
| 7118 | (let ((buffer (window-buffer window))) | ||
| 7119 | (if (or window | ||
| 7120 | (window-minibuffer-p window) | ||
| 7121 | (window-dedicated-p window)) | ||
| 7122 | ;; WINDOW is either non-nil, a minibuffer window, or dedicated; | ||
| 7123 | ;; try to delete it. | ||
| 7124 | (let* ((window (or window (selected-window))) | ||
| 7125 | (frame (window-frame window))) | ||
| 7126 | (if (frame-root-window-p window) | ||
| 7127 | ;; WINDOW is alone on its frame. | ||
| 7128 | (delete-frame frame) | ||
| 7129 | ;; There are other windows on its frame, delete WINDOW. | ||
| 7130 | (delete-window window))) | ||
| 7131 | ;; Otherwise, switch to another buffer in the selected window. | ||
| 7132 | (switch-to-buffer nil)) | ||
| 7133 | |||
| 7134 | ;; Deal with the buffer. | ||
| 7135 | (if kill | ||
| 7136 | (kill-buffer buffer) | ||
| 7137 | (bury-buffer buffer)))) | ||
| 7138 | 7043 | ||
| 7139 | (defvar recenter-last-op nil | 7044 | (defvar recenter-last-op nil |
| 7140 | "Indicates the last recenter operation performed. | 7045 | "Indicates the last recenter operation performed. |
| @@ -7531,6 +7436,8 @@ Otherwise, consult the value of `truncate-partial-width-windows' | |||
| 7531 | (< (window-width window) t-p-w-w) | 7436 | (< (window-width window) t-p-w-w) |
| 7532 | t-p-w-w)))) | 7437 | t-p-w-w)))) |
| 7533 | 7438 | ||
| 7439 | ;; Some of these are in tutorial--default-keys, so update that if you | ||
| 7440 | ;; change these. | ||
| 7534 | (define-key ctl-x-map "0" 'delete-window) | 7441 | (define-key ctl-x-map "0" 'delete-window) |
| 7535 | (define-key ctl-x-map "1" 'delete-other-windows) | 7442 | (define-key ctl-x-map "1" 'delete-other-windows) |
| 7536 | (define-key ctl-x-map "2" 'split-window-above-each-other) | 7443 | (define-key ctl-x-map "2" 'split-window-above-each-other) |
diff --git a/src/ChangeLog b/src/ChangeLog index 922a8a33a9c..49d5325c224 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 2011-08-19 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-08-24 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Integer and memory overflow issues (Bug#9196). | 3 | Integer and memory overflow issues (Bug#9196). |
| 4 | 4 | ||
| @@ -422,6 +422,77 @@ | |||
| 422 | (gs_load): Use printmax_t to print the widest integers possible. | 422 | (gs_load): Use printmax_t to print the widest integers possible. |
| 423 | Check for integer overflow when computing image height and width. | 423 | Check for integer overflow when computing image height and width. |
| 424 | 424 | ||
| 425 | 2011-08-24 Eli Zaretskii <eliz@gnu.org> | ||
| 426 | |||
| 427 | * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte | ||
| 428 | buffers, return left-to-right. | ||
| 429 | (set_cursor_from_row): Consider candidate row a win if its glyph | ||
| 430 | represents a newline and point is on that newline. Fixes cursor | ||
| 431 | positioning on the newline at EOL of R2L text within L2R | ||
| 432 | paragraph, and vice versa. | ||
| 433 | (try_cursor_movement): Check continued rows, in addition to | ||
| 434 | continuation rows. Fixes unwarranted scroll when point enters a | ||
| 435 | continued line of R2L text within an L2R paragraph, or vice versa. | ||
| 436 | (cursor_row_p): Consider the case of point being equal to | ||
| 437 | MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving | ||
| 438 | from the end of a short line to the beginning of a continued line | ||
| 439 | of R2L text within L2R paragraph. | ||
| 440 | (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for | ||
| 441 | composed characters. | ||
| 442 | |||
| 443 | * bidi.c (bidi_check_type): Use xassert. | ||
| 444 | (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p | ||
| 445 | members. | ||
| 446 | |||
| 447 | 2011-08-23 Eli Zaretskii <eliz@gnu.org> | ||
| 448 | |||
| 449 | * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of | ||
| 450 | a character. | ||
| 451 | |||
| 452 | 2011-08-23 Chong Yidong <cyd@stupidchicken.com> | ||
| 453 | |||
| 454 | * nsfont.m (ns_otf_to_script): Fix typo. | ||
| 455 | |||
| 456 | 2011-08-22 Kenichi Handa <handa@m17n.org> | ||
| 457 | |||
| 458 | * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a | ||
| 459 | extra slot even if the purpose is char-code-property-table. | ||
| 460 | |||
| 461 | 2011-08-23 Eli Zaretskii <eliz@gnu.org> | ||
| 462 | |||
| 463 | * xdisp.c (redisplay_window): When computing centering_position, | ||
| 464 | account for the height of the header line. (Bug#8874) | ||
| 465 | |||
| 466 | * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos | ||
| 467 | instead of CHAR_TO_BYTE. Fixes a crash when a completion | ||
| 468 | candidate is selected by the mouse, and that candidate has a | ||
| 469 | composed character under the mouse. | ||
| 470 | |||
| 471 | * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel | ||
| 472 | coordinates reported by pos-visible-in-window-p for a composed | ||
| 473 | character in column zero. | ||
| 474 | |||
| 475 | 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 476 | |||
| 477 | * cmds.c (Fself_insert_command): Mention post-self-insert-hook. | ||
| 478 | |||
| 479 | 2011-08-22 Eli Zaretskii <eliz@gnu.org> | ||
| 480 | |||
| 481 | * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition, | ||
| 482 | consider it a hit if to_charpos is anywhere in the range of the | ||
| 483 | composed buffer positions. | ||
| 484 | |||
| 485 | 2011-08-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 486 | |||
| 487 | * image.c (gif_load): Don't assume that each subimage has the same | ||
| 488 | dimensions as the base image. Handle disposal method that is | ||
| 489 | "undefined" by the gif spec (Bug#9335). | ||
| 490 | |||
| 491 | 2011-08-20 Chong Yidong <cyd@stupidchicken.com> | ||
| 492 | |||
| 493 | * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329). | ||
| 494 | (Fcondition_case): Document `debug' symbol in error handler. | ||
| 495 | |||
| 425 | 2011-08-19 Eli Zaretskii <eliz@gnu.org> | 496 | 2011-08-19 Eli Zaretskii <eliz@gnu.org> |
| 426 | 497 | ||
| 427 | * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of | 498 | * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of |
| @@ -452,8 +523,8 @@ | |||
| 452 | 2011-08-17 Chong Yidong <cyd@stupidchicken.com> | 523 | 2011-08-17 Chong Yidong <cyd@stupidchicken.com> |
| 453 | 524 | ||
| 454 | * eval.c (internal_condition_case, internal_condition_case_1) | 525 | * eval.c (internal_condition_case, internal_condition_case_1) |
| 455 | (internal_condition_case_2, internal_condition_case_n): Remove | 526 | (internal_condition_case_2, internal_condition_case_n): |
| 456 | unnecessary aborts (Bug#9081). | 527 | Remove unnecessary aborts (Bug#9081). |
| 457 | 528 | ||
| 458 | 2011-08-17 Eli Zaretskii <eliz@gnu.org> | 529 | 2011-08-17 Eli Zaretskii <eliz@gnu.org> |
| 459 | 530 | ||
| @@ -476,8 +547,8 @@ | |||
| 476 | * unexcw.c ( __malloc_initialized): Declare external variable. | 547 | * unexcw.c ( __malloc_initialized): Declare external variable. |
| 477 | (fixup_executable): Force the dumped emacs to reinitialize malloc. | 548 | (fixup_executable): Force the dumped emacs to reinitialize malloc. |
| 478 | 549 | ||
| 479 | * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo): New | 550 | * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo): |
| 480 | variables. | 551 | New variables. |
| 481 | (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the | 552 | (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the |
| 482 | dumped emacs. | 553 | dumped emacs. |
| 483 | (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage | 554 | (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage |
| @@ -579,8 +650,8 @@ | |||
| 579 | * xdisp.c (iterate_out_of_display_property): xassert that | 650 | * xdisp.c (iterate_out_of_display_property): xassert that |
| 580 | IT->position is set to within IT->object's boundaries. Break from | 651 | IT->position is set to within IT->object's boundaries. Break from |
| 581 | the loop as soon as EOB is reached; avoids infloops in redisplay | 652 | the loop as soon as EOB is reached; avoids infloops in redisplay |
| 582 | when IT->position is set up wrongly due to some bug. Set | 653 | when IT->position is set up wrongly due to some bug. |
| 583 | IT->current to match the bidi iterator unconditionally. | 654 | Set IT->current to match the bidi iterator unconditionally. |
| 584 | (push_display_prop): Allow GET_FROM_STRING as IT->method on | 655 | (push_display_prop): Allow GET_FROM_STRING as IT->method on |
| 585 | entry. Force push_it to save on the stack the current | 656 | entry. Force push_it to save on the stack the current |
| 586 | buffer/string position, to be restored by pop_it. Fix flags in | 657 | buffer/string position, to be restored by pop_it. Fix flags in |
| @@ -603,8 +674,8 @@ | |||
| 603 | 2011-08-08 Eli Zaretskii <eliz@gnu.org> | 674 | 2011-08-08 Eli Zaretskii <eliz@gnu.org> |
| 604 | 675 | ||
| 605 | * xdisp.c (forward_to_next_line_start): Allow to use the | 676 | * xdisp.c (forward_to_next_line_start): Allow to use the |
| 606 | no-display-properties-and-no-overlays under bidi display. Set | 677 | no-display-properties-and-no-overlays under bidi display. |
| 607 | disp_pos in the bidi iterator to avoid searches for display | 678 | Set disp_pos in the bidi iterator to avoid searches for display |
| 608 | properties and overlays. | 679 | properties and overlays. |
| 609 | 680 | ||
| 610 | 2011-08-08 Chong Yidong <cyd@stupidchicken.com> | 681 | 2011-08-08 Chong Yidong <cyd@stupidchicken.com> |
| @@ -642,7 +713,7 @@ | |||
| 642 | * bidi.c <bidi_cache_total_alloc>: Now static. | 713 | * bidi.c <bidi_cache_total_alloc>: Now static. |
| 643 | (bidi_initialize): Initialize bidi_cache_total_alloc. | 714 | (bidi_initialize): Initialize bidi_cache_total_alloc. |
| 644 | 715 | ||
| 645 | *xdisp.c (display_line): Release buffer allocated for shelved bidi | 716 | * xdisp.c (display_line): Release buffer allocated for shelved bidi |
| 646 | cache. (Bug#9221) | 717 | cache. (Bug#9221) |
| 647 | 718 | ||
| 648 | * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total | 719 | * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total |
diff --git a/src/bidi.c b/src/bidi.c index 769a14f089b..433c2cea2dc 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -108,8 +108,12 @@ bidi_get_type (int ch, bidi_dir_t override) | |||
| 108 | abort (); | 108 | abort (); |
| 109 | 109 | ||
| 110 | default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); | 110 | default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); |
| 111 | if (default_type == 0) | 111 | /* Every valid character code, even those that are unassigned by the |
| 112 | default_type = STRONG_L; | 112 | UCD, have some bidi-class property, according to |
| 113 | DerivedBidiClass.txt file. Therefore, if we ever get UNKNOWN_BT | ||
| 114 | (= zero) code from CHAR_TABLE_REF, that's a bug. */ | ||
| 115 | if (default_type == UNKNOWN_BT) | ||
| 116 | abort (); | ||
| 113 | 117 | ||
| 114 | if (override == NEUTRAL_DIR) | 118 | if (override == NEUTRAL_DIR) |
| 115 | return default_type; | 119 | return default_type; |
| @@ -142,11 +146,10 @@ bidi_get_type (int ch, bidi_dir_t override) | |||
| 142 | } | 146 | } |
| 143 | } | 147 | } |
| 144 | 148 | ||
| 145 | static void | 149 | static inline void |
| 146 | bidi_check_type (bidi_type_t type) | 150 | bidi_check_type (bidi_type_t type) |
| 147 | { | 151 | { |
| 148 | if (type < UNKNOWN_BT || type > NEUTRAL_ON) | 152 | xassert (UNKNOWN_BT <= type && type <= NEUTRAL_ON); |
| 149 | abort (); | ||
| 150 | } | 153 | } |
| 151 | 154 | ||
| 152 | /* Given a bidi TYPE of a character, return its category. */ | 155 | /* Given a bidi TYPE of a character, return its category. */ |
| @@ -549,6 +552,8 @@ bidi_cache_iterator_state (struct bidi_it *bidi_it, int resolved) | |||
| 549 | bidi_cache[idx].next_for_neutral = bidi_it->next_for_neutral; | 552 | bidi_cache[idx].next_for_neutral = bidi_it->next_for_neutral; |
| 550 | bidi_cache[idx].next_for_ws = bidi_it->next_for_ws; | 553 | bidi_cache[idx].next_for_ws = bidi_it->next_for_ws; |
| 551 | bidi_cache[idx].ignore_bn_limit = bidi_it->ignore_bn_limit; | 554 | bidi_cache[idx].ignore_bn_limit = bidi_it->ignore_bn_limit; |
| 555 | bidi_cache[idx].disp_pos = bidi_it->disp_pos; | ||
| 556 | bidi_cache[idx].disp_prop_p = bidi_it->disp_prop_p; | ||
| 552 | } | 557 | } |
| 553 | 558 | ||
| 554 | bidi_cache_last_idx = idx; | 559 | bidi_cache_last_idx = idx; |
diff --git a/src/chartab.c b/src/chartab.c index 0cabaac4cf5..1d4ac04312a 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -589,8 +589,6 @@ DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot, | |||
| 589 | (Lisp_Object char_table, Lisp_Object n, Lisp_Object value) | 589 | (Lisp_Object char_table, Lisp_Object n, Lisp_Object value) |
| 590 | { | 590 | { |
| 591 | CHECK_CHAR_TABLE (char_table); | 591 | CHECK_CHAR_TABLE (char_table); |
| 592 | if (EQ (XCHAR_TABLE (char_table)->purpose, Qchar_code_property_table)) | ||
| 593 | error ("Can't change extra-slot of char-code-property-table"); | ||
| 594 | CHECK_NUMBER (n); | 592 | CHECK_NUMBER (n); |
| 595 | if (XINT (n) < 0 | 593 | if (XINT (n) < 0 |
| 596 | || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table))) | 594 | || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table))) |
diff --git a/src/cmds.c b/src/cmds.c index 2feaf313f23..5a155ac77a5 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -271,7 +271,8 @@ Whichever character you type to run this command is inserted. | |||
| 271 | Before insertion, `expand-abbrev' is executed if the inserted character does | 271 | Before insertion, `expand-abbrev' is executed if the inserted character does |
| 272 | not have word syntax and the previous character in the buffer does. | 272 | not have word syntax and the previous character in the buffer does. |
| 273 | After insertion, the value of `auto-fill-function' is called if the | 273 | After insertion, the value of `auto-fill-function' is called if the |
| 274 | `auto-fill-chars' table has a non-nil value for the inserted character. */) | 274 | `auto-fill-chars' table has a non-nil value for the inserted character. |
| 275 | At the end, it runs `post-self-insert-hook'. */) | ||
| 275 | (Lisp_Object n) | 276 | (Lisp_Object n) |
| 276 | { | 277 | { |
| 277 | int remove_boundary = 1; | 278 | int remove_boundary = 1; |
diff --git a/src/dispnew.c b/src/dispnew.c index 5fedbb75a3a..e96583e0025 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5314,7 +5314,8 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5314 | if (STRINGP (it.string)) | 5314 | if (STRINGP (it.string)) |
| 5315 | BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos)); | 5315 | BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos)); |
| 5316 | else | 5316 | else |
| 5317 | BYTEPOS (pos->pos) = CHAR_TO_BYTE (CHARPOS (pos->pos)); | 5317 | BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (w->buffer), |
| 5318 | CHARPOS (pos->pos)); | ||
| 5318 | } | 5319 | } |
| 5319 | 5320 | ||
| 5320 | #ifdef HAVE_WINDOW_SYSTEM | 5321 | #ifdef HAVE_WINDOW_SYSTEM |
diff --git a/src/eval.c b/src/eval.c index 8149683a104..e722b53fb72 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1358,8 +1358,12 @@ A handler is applicable to an error | |||
| 1358 | if CONDITION-NAME is one of the error's condition names. | 1358 | if CONDITION-NAME is one of the error's condition names. |
| 1359 | If an error happens, the first applicable handler is run. | 1359 | If an error happens, the first applicable handler is run. |
| 1360 | 1360 | ||
| 1361 | The car of a handler may be a list of condition names | 1361 | The car of a handler may be a list of condition names instead of a |
| 1362 | instead of a single condition name. Then it handles all of them. | 1362 | single condition name; then it handles all of them. If the special |
| 1363 | condition name `debug' is present in this list, it allows another | ||
| 1364 | condition in the list to run the debugger if `debug-on-error' and the | ||
| 1365 | other usual mechanisms says it should (otherwise, `condition-case' | ||
| 1366 | suppresses the debugger). | ||
| 1363 | 1367 | ||
| 1364 | When a handler handles an error, control returns to the `condition-case' | 1368 | When a handler handles an error, control returns to the `condition-case' |
| 1365 | and it executes the handler's BODY... | 1369 | and it executes the handler's BODY... |
| @@ -1700,6 +1704,10 @@ See also the function `condition-case'. */) | |||
| 1700 | && (!NILP (Vdebug_on_signal) | 1704 | && (!NILP (Vdebug_on_signal) |
| 1701 | /* If no handler is present now, try to run the debugger. */ | 1705 | /* If no handler is present now, try to run the debugger. */ |
| 1702 | || NILP (clause) | 1706 | || NILP (clause) |
| 1707 | /* A `debug' symbol in the handler list disables the normal | ||
| 1708 | suppression of the debugger. */ | ||
| 1709 | || (CONSP (clause) && CONSP (XCAR (clause)) | ||
| 1710 | && !NILP (Fmemq (Qdebug, XCAR (clause)))) | ||
| 1703 | /* Special handler that means "print a message and run debugger | 1711 | /* Special handler that means "print a message and run debugger |
| 1704 | if requested". */ | 1712 | if requested". */ |
| 1705 | || EQ (h->handler, Qerror))) | 1713 | || EQ (h->handler, Qerror))) |
diff --git a/src/image.c b/src/image.c index d10fdad1c54..d0d28bea582 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -7147,7 +7147,6 @@ gif_load (struct frame *f, struct image *img) | |||
| 7147 | ColorMapObject *gif_color_map; | 7147 | ColorMapObject *gif_color_map; |
| 7148 | unsigned long pixel_colors[256]; | 7148 | unsigned long pixel_colors[256]; |
| 7149 | GifFileType *gif; | 7149 | GifFileType *gif; |
| 7150 | int image_height, image_width; | ||
| 7151 | gif_memory_source memsrc; | 7150 | gif_memory_source memsrc; |
| 7152 | Lisp_Object specified_bg = image_spec_value (img->spec, QCbackground, NULL); | 7151 | Lisp_Object specified_bg = image_spec_value (img->spec, QCbackground, NULL); |
| 7153 | Lisp_Object specified_file = image_spec_value (img->spec, QCfile, NULL); | 7152 | Lisp_Object specified_file = image_spec_value (img->spec, QCfile, NULL); |
| @@ -7224,19 +7223,13 @@ gif_load (struct frame *f, struct image *img) | |||
| 7224 | } | 7223 | } |
| 7225 | } | 7224 | } |
| 7226 | 7225 | ||
| 7227 | img->corners[TOP_CORNER] = gif->SavedImages[idx].ImageDesc.Top; | 7226 | width = img->width = gif->SWidth; |
| 7228 | img->corners[LEFT_CORNER] = gif->SavedImages[idx].ImageDesc.Left; | 7227 | height = img->height = gif->SHeight; |
| 7229 | image_height = gif->SavedImages[idx].ImageDesc.Height; | ||
| 7230 | img->corners[BOT_CORNER] = img->corners[TOP_CORNER] + image_height; | ||
| 7231 | image_width = gif->SavedImages[idx].ImageDesc.Width; | ||
| 7232 | img->corners[RIGHT_CORNER] = img->corners[LEFT_CORNER] + image_width; | ||
| 7233 | 7228 | ||
| 7234 | width = img->width = max (gif->SWidth, | 7229 | img->corners[TOP_CORNER] = gif->SavedImages[0].ImageDesc.Top; |
| 7235 | max (gif->Image.Left + gif->Image.Width, | 7230 | img->corners[LEFT_CORNER] = gif->SavedImages[0].ImageDesc.Left; |
| 7236 | img->corners[RIGHT_CORNER])); | 7231 | img->corners[BOT_CORNER] = img->corners[TOP_CORNER] + height; |
| 7237 | height = img->height = max (gif->SHeight, | 7232 | img->corners[RIGHT_CORNER] = img->corners[LEFT_CORNER] + width; |
| 7238 | max (gif->Image.Top + gif->Image.Height, | ||
| 7239 | img->corners[BOT_CORNER])); | ||
| 7240 | 7233 | ||
| 7241 | if (!check_image_size (f, width, height)) | 7234 | if (!check_image_size (f, width, height)) |
| 7242 | { | 7235 | { |
| @@ -7291,6 +7284,10 @@ gif_load (struct frame *f, struct image *img) | |||
| 7291 | unsigned char *raster = (unsigned char *) subimage->RasterBits; | 7284 | unsigned char *raster = (unsigned char *) subimage->RasterBits; |
| 7292 | int transparency_color_index = -1; | 7285 | int transparency_color_index = -1; |
| 7293 | int disposal = 0; | 7286 | int disposal = 0; |
| 7287 | int subimg_width = subimage->ImageDesc.Width; | ||
| 7288 | int subimg_height = subimage->ImageDesc.Height; | ||
| 7289 | int subimg_top = subimage->ImageDesc.Top; | ||
| 7290 | int subimg_left = subimage->ImageDesc.Left; | ||
| 7294 | 7291 | ||
| 7295 | /* Find the Graphic Control Extension block for this sub-image. | 7292 | /* Find the Graphic Control Extension block for this sub-image. |
| 7296 | Extract the disposal method and transparency color. */ | 7293 | Extract the disposal method and transparency color. */ |
| @@ -7314,6 +7311,13 @@ gif_load (struct frame *f, struct image *img) | |||
| 7314 | if (j == 0) | 7311 | if (j == 0) |
| 7315 | disposal = 2; | 7312 | disposal = 2; |
| 7316 | 7313 | ||
| 7314 | /* For disposal == 0, the spec says "No disposal specified. The | ||
| 7315 | decoder is not required to take any action." In practice, it | ||
| 7316 | seems we need to treat this like "keep in place", see e.g. | ||
| 7317 | http://upload.wikimedia.org/wikipedia/commons/3/37/Clock.gif */ | ||
| 7318 | if (disposal == 0) | ||
| 7319 | disposal = 1; | ||
| 7320 | |||
| 7317 | /* Allocate subimage colors. */ | 7321 | /* Allocate subimage colors. */ |
| 7318 | memset (pixel_colors, 0, sizeof pixel_colors); | 7322 | memset (pixel_colors, 0, sizeof pixel_colors); |
| 7319 | gif_color_map = subimage->ImageDesc.ColorMap; | 7323 | gif_color_map = subimage->ImageDesc.ColorMap; |
| @@ -7341,34 +7345,34 @@ gif_load (struct frame *f, struct image *img) | |||
| 7341 | int row, pass; | 7345 | int row, pass; |
| 7342 | 7346 | ||
| 7343 | for (y = 0, row = interlace_start[0], pass = 0; | 7347 | for (y = 0, row = interlace_start[0], pass = 0; |
| 7344 | y < image_height; | 7348 | y < subimg_height; |
| 7345 | y++, row += interlace_increment[pass]) | 7349 | y++, row += interlace_increment[pass]) |
| 7346 | { | 7350 | { |
| 7347 | if (row >= image_height) | 7351 | if (row >= subimg_height) |
| 7348 | { | 7352 | { |
| 7349 | row = interlace_start[++pass]; | 7353 | row = interlace_start[++pass]; |
| 7350 | while (row >= image_height) | 7354 | while (row >= subimg_height) |
| 7351 | row = interlace_start[++pass]; | 7355 | row = interlace_start[++pass]; |
| 7352 | } | 7356 | } |
| 7353 | 7357 | ||
| 7354 | for (x = 0; x < image_width; x++) | 7358 | for (x = 0; x < subimg_width; x++) |
| 7355 | { | 7359 | { |
| 7356 | int c = raster[y * image_width + x]; | 7360 | int c = raster[y * subimg_width + x]; |
| 7357 | if (transparency_color_index != c || disposal != 1) | 7361 | if (transparency_color_index != c || disposal != 1) |
| 7358 | XPutPixel (ximg, x + img->corners[LEFT_CORNER], | 7362 | XPutPixel (ximg, x + subimg_left, row + subimg_top, |
| 7359 | row + img->corners[TOP_CORNER], pixel_colors[c]); | 7363 | pixel_colors[c]); |
| 7360 | } | 7364 | } |
| 7361 | } | 7365 | } |
| 7362 | } | 7366 | } |
| 7363 | else | 7367 | else |
| 7364 | { | 7368 | { |
| 7365 | for (y = 0; y < image_height; ++y) | 7369 | for (y = 0; y < subimg_height; ++y) |
| 7366 | for (x = 0; x < image_width; ++x) | 7370 | for (x = 0; x < subimg_width; ++x) |
| 7367 | { | 7371 | { |
| 7368 | int c = raster[y * image_width + x]; | 7372 | int c = raster[y * subimg_width + x]; |
| 7369 | if (transparency_color_index != c || disposal != 1) | 7373 | if (transparency_color_index != c || disposal != 1) |
| 7370 | XPutPixel (ximg, x + img->corners[LEFT_CORNER], | 7374 | XPutPixel (ximg, x + subimg_left, y + subimg_top, |
| 7371 | y + img->corners[TOP_CORNER], pixel_colors[c]); | 7375 | pixel_colors[c]); |
| 7372 | } | 7376 | } |
| 7373 | } | 7377 | } |
| 7374 | } | 7378 | } |
diff --git a/src/nsfont.m b/src/nsfont.m index 60f8c5321aa..c4d9123faef 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -303,7 +303,7 @@ static NSString | |||
| 303 | { | 303 | { |
| 304 | Lisp_Object script = assq_no_quit (XCAR (otf), Votf_script_alist); | 304 | Lisp_Object script = assq_no_quit (XCAR (otf), Votf_script_alist); |
| 305 | return CONSP (script) | 305 | return CONSP (script) |
| 306 | ? [NSString stringWithUTF8String: SDATA (SYMBOL_NAME XCDR ((script)))] | 306 | ? [NSString stringWithUTF8String: SDATA (SYMBOL_NAME (XCDR ((script))))] |
| 307 | : @""; | 307 | : @""; |
| 308 | } | 308 | } |
| 309 | 309 | ||
diff --git a/src/process.c b/src/process.c index 08da53b4a40..a8088322147 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5161,6 +5161,9 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5161 | p->decoding_carryover = coding->carryover_bytes; | 5161 | p->decoding_carryover = coding->carryover_bytes; |
| 5162 | } | 5162 | } |
| 5163 | if (SBYTES (text) > 0) | 5163 | if (SBYTES (text) > 0) |
| 5164 | /* FIXME: It's wrong to wrap or not based on debug-on-error, and | ||
| 5165 | sometimes it's simply wrong to wrap (e.g. when called from | ||
| 5166 | accept-process-output). */ | ||
| 5164 | internal_condition_case_1 (read_process_output_call, | 5167 | internal_condition_case_1 (read_process_output_call, |
| 5165 | Fcons (outstream, | 5168 | Fcons (outstream, |
| 5166 | Fcons (proc, Fcons (text, Qnil))), | 5169 | Fcons (proc, Fcons (text, Qnil))), |
diff --git a/src/xdisp.c b/src/xdisp.c index 86ad523dfdd..e7aee09682b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7696,7 +7696,12 @@ move_it_in_display_line_to (struct it *it, | |||
| 7696 | ((op & MOVE_TO_POS) != 0 \ | 7696 | ((op & MOVE_TO_POS) != 0 \ |
| 7697 | && BUFFERP (it->object) \ | 7697 | && BUFFERP (it->object) \ |
| 7698 | && (IT_CHARPOS (*it) == to_charpos \ | 7698 | && (IT_CHARPOS (*it) == to_charpos \ |
| 7699 | || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos)) \ | 7699 | || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos) \ |
| 7700 | || (it->what == IT_COMPOSITION \ | ||
| 7701 | && ((IT_CHARPOS (*it) > to_charpos \ | ||
| 7702 | && to_charpos >= it->cmp_it.charpos) \ | ||
| 7703 | || (IT_CHARPOS (*it) < to_charpos \ | ||
| 7704 | && to_charpos <= it->cmp_it.charpos)))) \ | ||
| 7700 | && (it->method == GET_FROM_BUFFER \ | 7705 | && (it->method == GET_FROM_BUFFER \ |
| 7701 | || (it->method == GET_FROM_DISPLAY_VECTOR \ | 7706 | || (it->method == GET_FROM_DISPLAY_VECTOR \ |
| 7702 | && it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) | 7707 | && it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) |
| @@ -13789,7 +13794,14 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 13789 | && glyph->charpos != pt_old))))) | 13794 | && glyph->charpos != pt_old))))) |
| 13790 | return 0; | 13795 | return 0; |
| 13791 | /* If this candidate gives an exact match, use that. */ | 13796 | /* If this candidate gives an exact match, use that. */ |
| 13792 | if (!(BUFFERP (glyph->object) && glyph->charpos == pt_old) | 13797 | if (!((BUFFERP (glyph->object) && glyph->charpos == pt_old) |
| 13798 | /* If this candidate is a glyph created for the | ||
| 13799 | terminating newline of a line, and point is on that | ||
| 13800 | newline, it wins because it's an exact match. */ | ||
| 13801 | || (!row->continued_p | ||
| 13802 | && INTEGERP (glyph->object) | ||
| 13803 | && glyph->charpos == 0 | ||
| 13804 | && pt_old == MATRIX_ROW_END_CHARPOS (row) - 1)) | ||
| 13793 | /* Otherwise, keep the candidate that comes from a row | 13805 | /* Otherwise, keep the candidate that comes from a row |
| 13794 | spanning less buffer positions. This may win when one or | 13806 | spanning less buffer positions. This may win when one or |
| 13795 | both candidate positions are on glyphs that came from | 13807 | both candidate positions are on glyphs that came from |
| @@ -14571,7 +14583,8 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 14571 | } | 14583 | } |
| 14572 | ++row; | 14584 | ++row; |
| 14573 | } | 14585 | } |
| 14574 | while ((MATRIX_ROW_CONTINUATION_LINE_P (row) | 14586 | while (((MATRIX_ROW_CONTINUATION_LINE_P (row) |
| 14587 | || row->continued_p) | ||
| 14575 | && MATRIX_ROW_BOTTOM_Y (row) <= last_y) | 14588 | && MATRIX_ROW_BOTTOM_Y (row) <= last_y) |
| 14576 | || (MATRIX_ROW_START_CHARPOS (row) == PT | 14589 | || (MATRIX_ROW_START_CHARPOS (row) == PT |
| 14577 | && MATRIX_ROW_BOTTOM_Y (row) < last_y)); | 14590 | && MATRIX_ROW_BOTTOM_Y (row) < last_y)); |
| @@ -15237,7 +15250,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15237 | if (pt_offset) | 15250 | if (pt_offset) |
| 15238 | centering_position -= pt_offset; | 15251 | centering_position -= pt_offset; |
| 15239 | centering_position -= | 15252 | centering_position -= |
| 15240 | FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0)); | 15253 | FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0)) |
| 15254 | + WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 15241 | /* Don't let point enter the scroll margin near top of | 15255 | /* Don't let point enter the scroll margin near top of |
| 15242 | the window. */ | 15256 | the window. */ |
| 15243 | if (centering_position < margin * FRAME_LINE_HEIGHT (f)) | 15257 | if (centering_position < margin * FRAME_LINE_HEIGHT (f)) |
| @@ -18001,7 +18015,8 @@ cursor_row_p (struct glyph_row *row) | |||
| 18001 | { | 18015 | { |
| 18002 | int result = 1; | 18016 | int result = 1; |
| 18003 | 18017 | ||
| 18004 | if (PT == CHARPOS (row->end.pos)) | 18018 | if (PT == CHARPOS (row->end.pos) |
| 18019 | || PT == MATRIX_ROW_END_CHARPOS (row)) | ||
| 18005 | { | 18020 | { |
| 18006 | /* Suppose the row ends on a string. | 18021 | /* Suppose the row ends on a string. |
| 18007 | Unless the row is continued, that means it ends on a newline | 18022 | Unless the row is continued, that means it ends on a newline |
| @@ -18396,10 +18411,10 @@ display_line (struct it *it) | |||
| 18396 | min_pos = current_pos; \ | 18411 | min_pos = current_pos; \ |
| 18397 | min_bpos = current_bpos; \ | 18412 | min_bpos = current_bpos; \ |
| 18398 | } \ | 18413 | } \ |
| 18399 | if (current_pos > max_pos) \ | 18414 | if (IT_CHARPOS (*it) > max_pos) \ |
| 18400 | { \ | 18415 | { \ |
| 18401 | max_pos = current_pos; \ | 18416 | max_pos = IT_CHARPOS (*it); \ |
| 18402 | max_bpos = current_bpos; \ | 18417 | max_bpos = IT_BYTEPOS (*it); \ |
| 18403 | } \ | 18418 | } \ |
| 18404 | } \ | 18419 | } \ |
| 18405 | while (0) | 18420 | while (0) |
| @@ -19006,7 +19021,8 @@ See also `bidi-paragraph-direction'. */) | |||
| 19006 | buf = XBUFFER (buffer); | 19021 | buf = XBUFFER (buffer); |
| 19007 | } | 19022 | } |
| 19008 | 19023 | ||
| 19009 | if (NILP (BVAR (buf, bidi_display_reordering))) | 19024 | if (NILP (BVAR (buf, bidi_display_reordering)) |
| 19025 | || NILP (BVAR (buf, enable_multibyte_characters))) | ||
| 19010 | return Qleft_to_right; | 19026 | return Qleft_to_right; |
| 19011 | else if (!NILP (BVAR (buf, bidi_paragraph_direction))) | 19027 | else if (!NILP (BVAR (buf, bidi_paragraph_direction))) |
| 19012 | return BVAR (buf, bidi_paragraph_direction); | 19028 | return BVAR (buf, bidi_paragraph_direction); |
| @@ -24057,6 +24073,8 @@ x_produce_glyphs (struct it *it) | |||
| 24057 | Lisp_Object gstring; | 24073 | Lisp_Object gstring; |
| 24058 | struct font_metrics metrics; | 24074 | struct font_metrics metrics; |
| 24059 | 24075 | ||
| 24076 | it->nglyphs = 1; | ||
| 24077 | |||
| 24060 | gstring = composition_gstring_from_id (it->cmp_it.id); | 24078 | gstring = composition_gstring_from_id (it->cmp_it.id); |
| 24061 | it->pixel_width | 24079 | it->pixel_width |
| 24062 | = composition_gstring_width (gstring, it->cmp_it.from, it->cmp_it.to, | 24080 | = composition_gstring_width (gstring, it->cmp_it.from, it->cmp_it.to, |