Now on revision 105542. ------------------------------------------------------------ revno: 105542 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Tue 2011-08-23 20:58:39 +0900 message: Fix default values of character properties. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2011-08-15 17:47:25 +0000 +++ admin/ChangeLog 2011-08-23 11:48:07 +0000 @@ -1,3 +1,17 @@ +2011-08-23 Kenichi Handa + + * unidata/unidata-gen.el (unidata-prop-alist): Provide default + values for name, general-category, canonical-combining-class, + mirrored, and bidi-class. Describe the meaning of value nil for + decimal-digit-value, digit-value, numeric-value, uppercase, + lowercase, titlecase, and mirroring. + (unidata-gen-table): Handle the case that default-value is a + list. Set default values of characters not listed in a table. + (unidata-get-name): Return an empty string if a value in a + char-table is nil. + (unidata-get-decomposition): Return a list of character itself if + a value in a char-table is nil. + 2011-08-15 Eli Zaretskii * unidata/bidimirror.awk: File removed. === modified file 'admin/unidata/unidata-gen.el' --- admin/unidata/unidata-gen.el 2011-07-06 22:43:48 +0000 +++ admin/unidata/unidata-gen.el 2011-08-23 11:48:07 +0000 @@ -146,7 +146,7 @@ (setq unidata-list (cdr table)))) ;; Alist of this form: -;; (PROP INDEX GENERATOR FILENAME DOCSTRING DESCRIBER VAL-LIST) +;; (PROP INDEX GENERATOR FILENAME DOCSTRING DESCRIBER DEFAULT VAL-LIST) ;; PROP: character property ;; INDEX: index to each element of unidata-list for PROP. ;; It may be a function that generates an alist of character codes @@ -155,14 +155,20 @@ ;; FILENAME: filename to store the char-table ;; DOCSTRING: docstring for the property ;; DESCRIBER: function to call to get a description string of property value -;; DEFAULT: the default value of the property +;; DEFAULT: the default value of the property. It may have the form +;; (VAL0 (FROM1 TO1 VAL1) ...) which indicates that the default +;; value is VAL0 except for characters in the ranges specified by +;; FROMn and TOn (incusive). The default value of characters +;; between FROMn and TOn is VALn. ;; VAL-LIST: list of specially ordered property values (defconst unidata-prop-alist '((name 1 unidata-gen-table-name "uni-name.el" "Unicode character name. -Property value is a string.") +Property value is a string." + nil + "") (general-category 2 unidata-gen-table-symbol "uni-category.el" "Unicode general category. @@ -170,7 +176,7 @@ Lu, Ll, Lt, Lm, Lo, Mn, Mc, Me, Nd, Nl, No, Pc, Pd, Ps, Pe, Pi, Pf, Po, Sm, Sc, Sk, So, Zs, Zl, Zp, Cc, Cf, Cs, Co, Cn" unidata-describe-general-category - nil + Cn ;; The order of elements must be in sync with unicode_category_t ;; in src/character.h. (Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd Ps Pe Pi Pf Po @@ -179,7 +185,8 @@ 3 unidata-gen-table-integer "uni-combining.el" "Unicode canonical combining class. Property value is an integer." - unidata-describe-canonical-combining-class) + unidata-describe-canonical-combining-class + 0) (bidi-class 4 unidata-gen-table-symbol "uni-bidi.el" "Unicode bidi class. @@ -187,7 +194,8 @@ L, LRE, LRO, R, AL, RLE, RLO, PDF, EN, ES, ET, AN, CS, NSM, BN, B, S, WS, ON" unidata-describe-bidi-class - L + (L (#x0600 #x06FF AL) (#x0590 #x05FF R) (#x07C0 #x08FF R) + (#xFB1D #xFB4F R) (#x10800 #x10FFF R) (#x1E800 #x1EFFF R)) ;; The order of elements must be in sync with bidi_type_t in ;; src/dispextern.h. (L R EN AN BN B AL LRE LRO RLE RLO PDF ES ET CS NSM S WS ON)) @@ -202,19 +210,24 @@ (decimal-digit-value 6 unidata-gen-table-integer "uni-decimal.el" "Unicode numeric value (decimal digit). -Property value is an integer.") +Property value is an integer 0..9, or nil. +The value nil stands for NaN \"Numeric_Value\".") (digit-value 7 unidata-gen-table-integer "uni-digit.el" "Unicode numeric value (digit). -Property value is an integer.") +Property value is an integer 0..9, or nil. +The value nil stands for NaN \"Numeric_Value\".") (numeric-value 8 unidata-gen-table-numeric "uni-numeric.el" "Unicode numeric value (numeric). -Property value is an integer or a floating point.") +Property value is an integer, a floating point, or nil. +The value nil stands for NaN \"Numeric_Value\".") (mirrored 9 unidata-gen-table-symbol "uni-mirrored.el" "Unicode bidi mirrored flag. -Property value is a symbol `Y' or `N'. See also the property `mirroring'.") +Property value is a symbol `Y' or `N'. See also the property `mirroring'." + nil + N) (old-name 10 unidata-gen-table-name "uni-old-name.el" "Unicode old names as published in Unicode 1.0. @@ -226,23 +239,30 @@ (uppercase 12 unidata-gen-table-character "uni-uppercase.el" "Unicode simple uppercase mapping. -Property value is a character." +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself." string) (lowercase 13 unidata-gen-table-character "uni-lowercase.el" "Unicode simple lowercase mapping. -Property value is a character." +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself." string) (titlecase 14 unidata-gen-table-character "uni-titlecase.el" "Unicode simple titlecase mapping. -Property value is a character." +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself." string) (mirroring unidata-gen-mirroring-list unidata-gen-table-character "uni-mirrored.el" "Unicode bidi-mirroring characters. -Property value is a character that has the corresponding mirroring image, -or nil for non-mirrored character."))) +Property value is a character that has the corresponding mirroring image or nil. +The value nil means that the actual property value of a character +is the character itself."))) ;; Functions to access the above data. (defsubst unidata-prop-index (prop) (nth 1 (assq prop unidata-prop-alist))) @@ -393,9 +413,18 @@ (while tail (setcar tail (cons (car tail) val-code)) (setq tail (cdr tail) val-code (1+ val-code))) - (setq default-value (unidata-encode-val val-list default-value)) - (set-char-table-range table t default-value) - (set-char-table-range table nil default-value) + (if (consp default-value) + (setq default-value (copy-sequence default-value)) + (setq default-value (list default-value))) + (setcar default-value + (unidata-encode-val val-list (car default-value))) + (set-char-table-range table t (car default-value)) + (set-char-table-range table nil (car default-value)) + (dolist (elm (cdr default-value)) + (setcar (nthcdr 2 elm) + (unidata-encode-val val-list (nth 2 elm))) + (set-char-table-range table (cons (car elm) (nth 1 elm)) (nth 2 elm))) + (setq tail unidata-list) (while tail (setq elt (car tail) tail (cdr tail)) @@ -419,17 +448,27 @@ (setq prev-range-data (cons (cons from to) val-code))))) (let* ((start (lsh (lsh range -7) 7)) (limit (+ start 127)) - str count new-val) - (fillarray vec 0) + str count new-val from to vcode) + (fillarray vec (car default-value)) + (dolist (elm (cdr default-value)) + (setq from (car elm) to (nth 1 elm)) + (when (and (<= from limit) + (or (>= from start) (>= to start))) + (setq from (max from start) + to (min to limit) + vcode (nth 2 elm)) + (while (<= from to) + (aset vec (- from start) vcode) + (setq from (1+ from))))) ;; See the comment above. (when (and prev-range-data (>= (cdr (car prev-range-data)) start)) - (let ((from (car (car prev-range-data))) - (to (cdr (car prev-range-data))) - (vcode (cdr prev-range-data))) - (while (<= from to) - (aset vec (- from start) vcode) - (setq from (1+ from))))) + (setq from (car (car prev-range-data)) + to (cdr (car prev-range-data)) + vcode (cdr prev-range-data)) + (while (<= from to) + (aset vec (- from start) vcode) + (setq from (1+ from)))) (setq prev-range-data nil) (if val-code (aset vec (- range start) val-code)) @@ -669,7 +708,7 @@ (aset table c name) (if (= c char) (setq val name)))) - val))) + (or val "")))) ((and (integerp val) (> val 0)) (let* ((symbol-table (aref (char-table-extra-slot table 4) 1)) @@ -695,7 +734,9 @@ ((eq sym 'CJK\ COMPATIBILITY\ IDEOGRAPH) (format "%s-%04X" sym char)) ((eq sym 'VARIATION\ SELECTOR) - (format "%s-%d" sym (+ (- char #xe0100) 17)))))))) + (format "%s-%d" sym (+ (- char #xe0100) 17)))))) + + (t ""))) ;; Store VAL as the name of CHAR in TABLE. @@ -707,6 +748,9 @@ (defun unidata-get-decomposition (char val table) (cond + ((not val) + (list char)) + ((consp val) val) @@ -747,7 +791,8 @@ (aset vec idx (nconc word-list tail-list))) (dotimes (i 128) (aset table (+ first-char i) (aref vec i))) - (aref vec (- char first-char))))) + (setq val (aref vec (- char first-char))) + (or val (list char))))) ;; Hangul syllable ((and (eq val 0) (>= char #xAC00) (<= char #xD7A3)) === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-23 09:31:54 +0000 +++ lisp/ChangeLog 2011-08-23 11:49:03 +0000 @@ -1,3 +1,21 @@ +2011-08-23 Kenichi Handa + + * international/charprop.el: + * international/uni-bidi.el: + * international/uni-category.el: + * international/uni-combining.el: + * international/uni-comment.el: + * international/uni-decimal.el: + * international/uni-decomposition.el: + * international/uni-digit.el: + * international/uni-lowercase.el: + * international/uni-mirrored.el: + * international/uni-name.el: + * international/uni-numeric.el: + * international/uni-old-name.el: + * international/uni-titlecase.el: + * international/uni-uppercase.el: Regenerate. + 2011-08-23 Martin Rudalics * help.el (help-window-setup): Fix message displayed when other === modified file 'lisp/international/charprop.el' --- lisp/international/charprop.el 2011-07-06 22:43:48 +0000 +++ lisp/international/charprop.el 2011-08-23 11:48:07 +0000 @@ -29,15 +29,18 @@ ;; FILE: uni-decimal.el (define-char-code-property 'decimal-digit-value "uni-decimal.el" "Unicode numeric value (decimal digit). -Property value is an integer.") +Property value is an integer 0..9, or nil. +The value nil stands for NaN \"Numeric_Value\".") ;; FILE: uni-digit.el (define-char-code-property 'digit-value "uni-digit.el" "Unicode numeric value (digit). -Property value is an integer.") +Property value is an integer 0..9, or nil. +The value nil stands for NaN \"Numeric_Value\".") ;; FILE: uni-numeric.el (define-char-code-property 'numeric-value "uni-numeric.el" "Unicode numeric value (numeric). -Property value is an integer or a floating point.") +Property value is an integer, a floating point, or nil. +The value nil stands for NaN \"Numeric_Value\".") ;; FILE: uni-mirrored.el (define-char-code-property 'mirrored "uni-mirrored.el" "Unicode bidi mirrored flag. @@ -53,20 +56,27 @@ ;; FILE: uni-uppercase.el (define-char-code-property 'uppercase "uni-uppercase.el" "Unicode simple uppercase mapping. -Property value is a character.") +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself.") ;; FILE: uni-lowercase.el (define-char-code-property 'lowercase "uni-lowercase.el" "Unicode simple lowercase mapping. -Property value is a character.") +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself.") ;; FILE: uni-titlecase.el (define-char-code-property 'titlecase "uni-titlecase.el" "Unicode simple titlecase mapping. -Property value is a character.") +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself.") ;; FILE: uni-mirrored.el (define-char-code-property 'mirroring "uni-mirrored.el" "Unicode bidi-mirroring characters. -Property value is a character that has the corresponding mirroring image, -or nil for non-mirrored character.") +Property value is a character that has the corresponding mirroring image or nil. +The value nil means that the actual property value of a character +is the character itself.") ;; Local Variables: ;; coding: utf-8 ;; no-byte-compile: t === modified file 'lisp/international/uni-bidi.el' Binary files lisp/international/uni-bidi.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-bidi.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-category.el' Binary files lisp/international/uni-category.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-category.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-combining.el' Binary files lisp/international/uni-combining.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-combining.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-comment.el' Binary files lisp/international/uni-comment.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-comment.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-decimal.el' Binary files lisp/international/uni-decimal.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-decimal.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-decomposition.el' Binary files lisp/international/uni-decomposition.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-decomposition.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-digit.el' Binary files lisp/international/uni-digit.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-digit.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-lowercase.el' Binary files lisp/international/uni-lowercase.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-lowercase.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-mirrored.el' Binary files lisp/international/uni-mirrored.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-mirrored.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-name.el' Binary files lisp/international/uni-name.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-name.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-numeric.el' Binary files lisp/international/uni-numeric.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-numeric.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-old-name.el' Binary files lisp/international/uni-old-name.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-old-name.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-titlecase.el' Binary files lisp/international/uni-titlecase.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-titlecase.el 2011-08-23 11:48:07 +0000 differ === modified file 'lisp/international/uni-uppercase.el' Binary files lisp/international/uni-uppercase.el 2011-07-06 22:43:48 +0000 and lisp/international/uni-uppercase.el 2011-08-23 11:48:07 +0000 differ === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-23 10:35:47 +0000 +++ src/ChangeLog 2011-08-23 11:49:03 +0000 @@ -1,3 +1,8 @@ +2011-08-22 Kenichi Handa + + * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a + extra slot even if the purpose is char-code-property-table. + 2011-08-23 Eli Zaretskii * xdisp.c (redisplay_window): When computing centering_position, === modified file 'src/chartab.c' --- src/chartab.c 2011-08-15 17:47:25 +0000 +++ src/chartab.c 2011-08-23 11:48:07 +0000 @@ -589,8 +589,6 @@ (Lisp_Object char_table, Lisp_Object n, Lisp_Object value) { CHECK_CHAR_TABLE (char_table); - if (EQ (XCHAR_TABLE (char_table)->purpose, Qchar_code_property_table)) - error ("Can't change extra-slot of char-code-property-table"); CHECK_NUMBER (n); if (XINT (n) < 0 || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table))) ------------------------------------------------------------ revno: 105541 fixes bug(s): http://debbugs.gnu.org/8874 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2011-08-23 13:35:47 +0300 message: Fix bug #8874 with recentering and header line under scroll-conservatively. src/xdisp.c (redisplay_window): When computing centering_position, account for the height of the header line. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-23 08:38:29 +0000 +++ src/ChangeLog 2011-08-23 10:35:47 +0000 @@ -1,5 +1,8 @@ 2011-08-23 Eli Zaretskii + * xdisp.c (redisplay_window): When computing centering_position, + account for the height of the header line. (Bug#8874) + * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos instead of CHAR_TO_BYTE. Fixes a crash when a completion candidate is selected by the mouse, and that candidate has a === modified file 'src/xdisp.c' --- src/xdisp.c 2011-08-23 07:01:25 +0000 +++ src/xdisp.c 2011-08-23 10:35:47 +0000 @@ -15244,7 +15244,8 @@ if (pt_offset) centering_position -= pt_offset; centering_position -= - FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0)); + FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0)) + + WINDOW_HEADER_LINE_HEIGHT (w); /* Don't let point enter the scroll margin near top of the window. */ if (centering_position < margin * FRAME_LINE_HEIGHT (f)) ------------------------------------------------------------ revno: 105540 committer: martin rudalics branch nick: trunk timestamp: Tue 2011-08-23 11:31:54 +0200 message: Fix message in help-window-setup (Bug#9341). * help.el (help-window-setup): Fix message displayed when other window is reused. (Bug#9341) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-23 05:25:17 +0000 +++ lisp/ChangeLog 2011-08-23 09:31:54 +0000 @@ -1,3 +1,8 @@ +2011-08-23 Martin Rudalics + + * help.el (help-window-setup): Fix message displayed when other + window is reused. (Bug#9341) + 2011-08-23 Stefan Monnier * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list. === modified file 'lisp/help.el' --- lisp/help.el 2011-06-13 13:14:42 +0000 +++ lisp/help.el 2011-08-23 09:31:54 +0000 @@ -1104,7 +1104,7 @@ ((eq help-value 'new-window) "Type \\[delete-other-windows] to delete the help window") ((eq help-value 'reuse-other-window) - "Type \\[switch-to-prev-buffer] RET to restore previous buffer")) + "Type \"q\" in other window to quit")) help-window 'other)) (t ;; Not much to say here. ------------------------------------------------------------ revno: 105539 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2011-08-23 11:38:29 +0300 message: Fix crashes with completion and composed characters. src/dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos instead of CHAR_TO_BYTE. Fixes a crash when a completion candidate is selected by the mouse, and that candidate has a composed character under the mouse. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-23 07:01:25 +0000 +++ src/ChangeLog 2011-08-23 08:38:29 +0000 @@ -1,5 +1,10 @@ 2011-08-23 Eli Zaretskii + * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos + instead of CHAR_TO_BYTE. Fixes a crash when a completion + candidate is selected by the mouse, and that candidate has a + composed character under the mouse. + * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel coordinates reported by pos-visible-in-window-p for a composed character in column zero. === modified file 'src/dispnew.c' --- src/dispnew.c 2011-08-05 11:04:44 +0000 +++ src/dispnew.c 2011-08-23 08:38:29 +0000 @@ -5307,7 +5307,8 @@ if (STRINGP (it.string)) BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos)); else - BYTEPOS (pos->pos) = CHAR_TO_BYTE (CHARPOS (pos->pos)); + BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (w->buffer), + CHARPOS (pos->pos)); } #ifdef HAVE_WINDOW_SYSTEM ------------------------------------------------------------ revno: 105538 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2011-08-23 10:01:25 +0300 message: Fix pos-visible-in-window-p for zero-column composed character. src/xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel coordinates reported by pos-visible-in-window-p for a composed character in column zero. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-23 03:09:59 +0000 +++ src/ChangeLog 2011-08-23 07:01:25 +0000 @@ -1,3 +1,9 @@ +2011-08-23 Eli Zaretskii + + * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel + coordinates reported by pos-visible-in-window-p for a composed + character in column zero. + 2011-08-23 Stefan Monnier * cmds.c (Fself_insert_command): Mention post-self-insert-hook. === modified file 'src/xdisp.c' --- src/xdisp.c 2011-08-22 17:00:40 +0000 +++ src/xdisp.c 2011-08-23 07:01:25 +0000 @@ -24064,6 +24064,8 @@ Lisp_Object gstring; struct font_metrics metrics; + it->nglyphs = 1; + gstring = composition_gstring_from_id (it->cmp_it.id); it->pixel_width = composition_gstring_width (gstring, it->cmp_it.from, it->cmp_it.to, ------------------------------------------------------------ revno: 105537 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9161 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2011-08-23 01:25:17 -0400 message: * lisp/shell.el (shell-completion-vars): Set pcomplete-arg-quote-list. * lisp/pcomplete.el (pcomplete-quote-argument): Fix thinko. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-23 05:21:09 +0000 +++ lisp/ChangeLog 2011-08-23 05:25:17 +0000 @@ -1,5 +1,8 @@ 2011-08-23 Stefan Monnier + * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list. + * pcomplete.el (pcomplete-quote-argument): Fix thinko (bug#9161). + * pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop. Mark obsolete. * shell.el (shell-parse-pcomplete-arguments): New function. === modified file 'lisp/pcomplete.el' --- lisp/pcomplete.el 2011-08-23 05:21:09 +0000 +++ lisp/pcomplete.el 2011-08-23 05:25:17 +0000 @@ -883,7 +883,7 @@ (or (run-hook-with-args-until-success 'pcomplete-quote-arg-hook filename index) (when (memq c pcomplete-arg-quote-list) - (string "\\" c)) + (string ?\\ c)) (char-to-string c)) (setq index (1+ index)))) filename === modified file 'lisp/shell.el' --- lisp/shell.el 2011-08-23 05:21:09 +0000 +++ lisp/shell.el 2011-08-23 05:25:17 +0000 @@ -412,6 +412,8 @@ shell-dynamic-complete-functions) (set (make-local-variable 'pcomplete-parse-arguments-function) #'shell-parse-pcomplete-arguments) + (set (make-local-variable 'pcomplete-arg-quote-list) + (append "\\ \t\n\r\"'`$|&;(){}[]<>#" nil)) (set (make-local-variable 'pcomplete-termination-string) (cond ((not comint-completion-addsuffix) "") ((stringp comint-completion-addsuffix) ------------------------------------------------------------ revno: 105536 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9160 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2011-08-23 01:21:09 -0400 message: * lisp/pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop. Mark obsolete. * lisp/shell.el (shell-parse-pcomplete-arguments): New function. (shell-completion-vars): Use it instead. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-22 22:10:21 +0000 +++ lisp/ChangeLog 2011-08-23 05:21:09 +0000 @@ -1,3 +1,10 @@ +2011-08-23 Stefan Monnier + + * pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop. + Mark obsolete. + * shell.el (shell-parse-pcomplete-arguments): New function. + (shell-completion-vars): Use it instead (bug#9160). + 2011-08-22 Stefan Monnier * progmodes/sh-script.el (sh-maybe-here-document): Disable magic in @@ -54,8 +61,8 @@ (font-lock-default-fontify-region) (font-lock-default-unfontify-region): Add docstrings (Bug#8624). - * progmodes/compile.el (compilation-error-properties): Fix - confusion between file struct and message struct (Bug#9319). + * progmodes/compile.el (compilation-error-properties): + Fix confusion between file struct and message struct (Bug#9319). (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to `ant' regexp. @@ -149,8 +156,8 @@ binding variables (bug#9298). Also clean up some unused autoloads. - * net/network-stream.el (network-stream-open-starttls): Support - using starttls.el without using gnutls-cli. + * net/network-stream.el (network-stream-open-starttls): + Support using starttls.el without using gnutls-cli. 2011-08-17 Juri Linkov === modified file 'lisp/pcomplete.el' --- lisp/pcomplete.el 2011-06-17 18:52:46 +0000 +++ lisp/pcomplete.el 2011-08-23 05:21:09 +0000 @@ -811,15 +811,19 @@ (while (< (point) end) (skip-chars-forward " \t\n") (push (point) begins) - (let ((skip t)) - (while skip - (skip-chars-forward "^ \t\n") - (if (eq (char-before) ?\\) - (skip-chars-forward " \t\n") - (setq skip nil)))) + (while + (progn + (skip-chars-forward "^ \t\n\\") + (when (eq (char-after) ?\\) + (forward-char 1) + (unless (eolp) + (forward-char 1) + t)))) (push (buffer-substring-no-properties (car begins) (point)) args)) (cons (nreverse args) (nreverse begins))))) +(make-obsolete 'pcomplete-parse-comint-arguments + 'comint-parse-pcomplete-arguments "24.1") (defun pcomplete-parse-arguments (&optional expand-p) "Parse the command line arguments. Most completions need this info." === modified file 'lisp/shell.el' --- lisp/shell.el 2011-06-17 18:52:46 +0000 +++ lisp/shell.el 2011-08-23 05:21:09 +0000 @@ -383,6 +383,21 @@ :group 'shell :type '(choice (const nil) regexp)) +(defun shell-parse-pcomplete-arguments () + "Parse whitespace separated arguments in the current region." + (let ((begin (save-excursion (shell-backward-command 1) (point))) + (end (point)) + begins args) + (save-excursion + (goto-char begin) + (while (< (point) end) + (skip-chars-forward " \t\n") + (push (point) begins) + (looking-at "\\(?:[^\s\t\n\\]\\|'[^']*'\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\"\\|\\\\.\\)*\\(?:\\\\\\|'[^']*\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\\)?") + (goto-char (match-end 0)) + (push (buffer-substring-no-properties (car begins) (point)) + args)) + (cons (nreverse args) (nreverse begins))))) (defun shell-completion-vars () "Setup completion vars for `shell-mode' and `read-shell-command'." @@ -396,8 +411,7 @@ (set (make-local-variable 'comint-dynamic-complete-functions) shell-dynamic-complete-functions) (set (make-local-variable 'pcomplete-parse-arguments-function) - ;; FIXME: This function should be moved to shell.el. - #'pcomplete-parse-comint-arguments) + #'shell-parse-pcomplete-arguments) (set (make-local-variable 'pcomplete-termination-string) (cond ((not comint-completion-addsuffix) "") ((stringp comint-completion-addsuffix) ------------------------------------------------------------ revno: 105535 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-08-22 23:09:59 -0400 message: * src/cmds.c (Fself_insert_command): Mention post-self-insert-hook. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-22 17:00:40 +0000 +++ src/ChangeLog 2011-08-23 03:09:59 +0000 @@ -1,3 +1,7 @@ +2011-08-23 Stefan Monnier + + * cmds.c (Fself_insert_command): Mention post-self-insert-hook. + 2011-08-22 Eli Zaretskii * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition, @@ -45,8 +49,8 @@ 2011-08-17 Chong Yidong * eval.c (internal_condition_case, internal_condition_case_1) - (internal_condition_case_2, internal_condition_case_n): Remove - unnecessary aborts (Bug#9081). + (internal_condition_case_2, internal_condition_case_n): + Remove unnecessary aborts (Bug#9081). 2011-08-17 Eli Zaretskii @@ -69,8 +73,8 @@ * unexcw.c ( __malloc_initialized): Declare external variable. (fixup_executable): Force the dumped emacs to reinitialize malloc. - * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo): New - variables. + * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo): + New variables. (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the dumped emacs. (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage @@ -172,8 +176,8 @@ * xdisp.c (iterate_out_of_display_property): xassert that IT->position is set to within IT->object's boundaries. Break from the loop as soon as EOB is reached; avoids infloops in redisplay - when IT->position is set up wrongly due to some bug. Set - IT->current to match the bidi iterator unconditionally. + when IT->position is set up wrongly due to some bug. + Set IT->current to match the bidi iterator unconditionally. (push_display_prop): Allow GET_FROM_STRING as IT->method on entry. Force push_it to save on the stack the current buffer/string position, to be restored by pop_it. Fix flags in @@ -196,8 +200,8 @@ 2011-08-08 Eli Zaretskii * xdisp.c (forward_to_next_line_start): Allow to use the - no-display-properties-and-no-overlays under bidi display. Set - disp_pos in the bidi iterator to avoid searches for display + no-display-properties-and-no-overlays under bidi display. + Set disp_pos in the bidi iterator to avoid searches for display properties and overlays. 2011-08-08 Chong Yidong @@ -235,7 +239,7 @@ * bidi.c : Now static. (bidi_initialize): Initialize bidi_cache_total_alloc. - *xdisp.c (display_line): Release buffer allocated for shelved bidi + * xdisp.c (display_line): Release buffer allocated for shelved bidi cache. (Bug#9221) * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total === modified file 'src/cmds.c' --- src/cmds.c 2011-06-24 21:25:22 +0000 +++ src/cmds.c 2011-08-23 03:09:59 +0000 @@ -271,7 +271,8 @@ Before insertion, `expand-abbrev' is executed if the inserted character does not have word syntax and the previous character in the buffer does. After insertion, the value of `auto-fill-function' is called if the -`auto-fill-chars' table has a non-nil value for the inserted character. */) +`auto-fill-chars' table has a non-nil value for the inserted character. +At the end, it runs `post-self-insert-hook'. */) (Lisp_Object n) { int remove_boundary = 1; ------------------------------------------------------------ revno: 105534 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9333 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-08-22 18:10:21 -0400 message: * lisp/progmodes/sh-script.el (sh-maybe-here-document): Disable magic in strings and comments. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-22 21:16:46 +0000 +++ lisp/ChangeLog 2011-08-22 22:10:21 +0000 @@ -1,5 +1,8 @@ 2011-08-22 Stefan Monnier + * progmodes/sh-script.el (sh-maybe-here-document): Disable magic in + strings and comments (bug#9333). + * emacs-lisp/debug.el (debug-arglist): New function. (debug-convert-byte-code): Use it. Handle lexical byte-codes. (debug-on-entry-1): Handle interpreted closures (bug#9120). === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2011-08-04 00:58:07 +0000 +++ lisp/progmodes/sh-script.el 2011-08-22 22:10:21 +0000 @@ -460,6 +460,7 @@ (define-key map "\C-c+" 'sh-add) (define-key map "\C-\M-x" 'sh-execute-region) (define-key map "\C-c\C-x" 'executable-interpret) + ;; FIXME: Use post-self-insert-hook. (define-key map "<" 'sh-maybe-here-document) (define-key map "(" 'skeleton-pair-insert-maybe) (define-key map "{" 'skeleton-pair-insert-maybe) @@ -3659,6 +3660,7 @@ (save-excursion (backward-char 2) (sh-quoted-p)) + (nth 8 (syntax-ppss)) (let ((tabs (if (string-match "\\`-" sh-here-document-word) (make-string (/ (current-indentation) tab-width) ?\t) "")) ------------------------------------------------------------ revno: 105533 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9120 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-08-22 17:16:46 -0400 message: * lisp/emacs-lisp/debug.el (debug-arglist): New function. (debug-convert-byte-code): Use it. Handle lexical byte-codes. (debug-on-entry-1): Handle interpreted closures. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-22 12:46:45 +0000 +++ lisp/ChangeLog 2011-08-22 21:16:46 +0000 @@ -1,3 +1,9 @@ +2011-08-22 Stefan Monnier + + * emacs-lisp/debug.el (debug-arglist): New function. + (debug-convert-byte-code): Use it. Handle lexical byte-codes. + (debug-on-entry-1): Handle interpreted closures (bug#9120). + 2011-08-22 Juri Linkov * progmodes/compile.el (compilation-mode-font-lock-keywords): === modified file 'lisp/emacs-lisp/debug.el' --- lisp/emacs-lisp/debug.el 2011-07-15 02:16:55 +0000 +++ lisp/emacs-lisp/debug.el 2011-08-22 21:16:46 +0000 @@ -778,6 +778,7 @@ (not (debugger-special-form-p symbol)))) t nil nil (symbol-name fn))) (list (if (equal val "") fn (intern val))))) + ;; FIXME: Use advice.el. (when (debugger-special-form-p function) (error "Function %s is a special form" function)) (if (or (symbolp (symbol-function function)) @@ -835,24 +836,30 @@ (message "Cancelling debug-on-entry for all functions") (mapcar 'cancel-debug-on-entry debug-function-list))) +(defun debug-arglist (definition) + ;; FIXME: copied from ad-arglist. + "Return the argument list of DEFINITION." + (require 'help-fns) + (help-function-arglist definition 'preserve-names)) + (defun debug-convert-byte-code (function) (let* ((defn (symbol-function function)) (macro (eq (car-safe defn) 'macro))) (when macro (setq defn (cdr defn))) - (unless (consp defn) - ;; Assume a compiled code object. - (let* ((contents (append defn nil)) + (when (byte-code-function-p defn) + (let* ((args (debug-arglist defn)) (body - (list (list 'byte-code (nth 1 contents) - (nth 2 contents) (nth 3 contents))))) - (if (nthcdr 5 contents) - (setq body (cons (list 'interactive (nth 5 contents)) body))) - (if (nth 4 contents) + `((,(if (memq '&rest args) #'apply #'funcall) + ,defn + ,@(remq '&rest (remq '&optional args)))))) + (if (> (length defn) 5) + (push `(interactive ,(aref defn 5)) body)) + (if (aref defn 4) ;; Use `documentation' here, to get the actual string, ;; in case the compiled function has a reference ;; to the .elc file. (setq body (cons (documentation function) body))) - (setq defn (cons 'lambda (cons (car contents) body)))) + (setq defn `(closure (t) ,args ,@body))) (when macro (setq defn (cons 'macro defn))) (fset function defn)))) @@ -861,11 +868,12 @@ (tail defn)) (when (eq (car-safe tail) 'macro) (setq tail (cdr tail))) - (if (not (eq (car-safe tail) 'lambda)) + (if (not (memq (car-safe tail) '(closure lambda))) ;; Only signal an error when we try to set debug-on-entry. ;; When we try to clear debug-on-entry, we are now done. (when flag (error "%s is not a user-defined Lisp function" function)) + (if (eq (car tail) 'closure) (setq tail (cdr tail))) (setq tail (cdr tail)) ;; Skip the docstring. (when (and (stringp (cadr tail)) (cddr tail)) @@ -875,9 +883,9 @@ (setq tail (cdr tail))) (unless (eq flag (equal (cadr tail) '(implement-debug-on-entry))) ;; Add/remove debug statement as needed. - (if flag - (setcdr tail (cons '(implement-debug-on-entry) (cdr tail))) - (setcdr tail (cddr tail))))) + (setcdr tail (if flag + (cons '(implement-debug-on-entry) (cdr tail)) + (cddr tail))))) defn)) (defun debugger-list-functions () ------------------------------------------------------------ revno: 105532 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2011-08-22 20:00:40 +0300 message: Fix vertical cursor motion under bidi on auto-composed characters. src/xdisp.c (BUFFER_POS_REACHED_P): If this is a composition, consider it a hit if to_charpos is anywhere in the range of the composed buffer positions. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-22 02:34:23 +0000 +++ src/ChangeLog 2011-08-22 17:00:40 +0000 @@ -1,3 +1,9 @@ +2011-08-22 Eli Zaretskii + + * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition, + consider it a hit if to_charpos is anywhere in the range of the + composed buffer positions. + 2011-08-22 Chong Yidong * image.c (gif_load): Don't assume that each subimage has the same === modified file 'src/xdisp.c' --- src/xdisp.c 2011-08-19 10:18:40 +0000 +++ src/xdisp.c 2011-08-22 17:00:40 +0000 @@ -7699,7 +7699,12 @@ ((op & MOVE_TO_POS) != 0 \ && BUFFERP (it->object) \ && (IT_CHARPOS (*it) == to_charpos \ - || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos)) \ + || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos) \ + || (it->what == IT_COMPOSITION \ + && ((IT_CHARPOS (*it) > to_charpos \ + && to_charpos >= it->cmp_it.charpos) \ + || (IT_CHARPOS (*it) < to_charpos \ + && to_charpos <= it->cmp_it.charpos)))) \ && (it->method == GET_FROM_BUFFER \ || (it->method == GET_FROM_DISPLAY_VECTOR \ && it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) ------------------------------------------------------------ revno: 105531 committer: Juri Linkov branch nick: trunk timestamp: Mon 2011-08-22 16:08:35 +0300 message: * etc/compilation.txt: Add more samples of output and non-output switches (bug#9319). diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-08-19 00:12:45 +0000 +++ etc/ChangeLog 2011-08-22 13:08:35 +0000 @@ -1,3 +1,8 @@ +2011-08-22 Juri Linkov + + * compilation.txt: Add more samples of output and non-output + switches (bug#9319). + 2011-08-19 Chong Yidong * themes/dichromacy-theme.el: === modified file 'etc/compilation.txt' --- etc/compilation.txt 2011-08-22 12:46:45 +0000 +++ etc/compilation.txt 2011-08-22 13:08:35 +0000 @@ -556,8 +556,10 @@ tool --output=foo.o foo.c tool --outfile foo.o foo.c tool --outfile=foo.o foo.c -tool --omega foo.c -tool --output-html-file foo.c +tool -omega foo.c foo2.c +tool -output-html-file foo.c foo2.c +tool --omega foo.c foo2.c +tool --output-html-file foo.c foo2.c Compilation started at Wed Jul 20 12:20:10 Compilation interrupt at Wed Jul 20 12:20:10 ------------------------------------------------------------ revno: 105530 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2011-08-22 15:58:37 +0300 message: Back out inadvertent changes in minibuffer.el. diff: === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2011-08-19 10:18:40 +0000 +++ lisp/minibuffer.el 2011-08-22 12:58:37 +0000 @@ -1119,27 +1119,13 @@ `(display (space :align-to ,column))) nil)))) (if (not (consp str)) - (put-text-property (point) - (progn - (insert (bidi-string-mark-left-to-right - str)) - (point)) + (put-text-property (point) (progn (insert str) (point)) 'mouse-face 'highlight) - (put-text-property (point) - (progn - (insert - (bidi-string-mark-left-to-right - (car str))) - (point)) + (put-text-property (point) (progn (insert (car str)) (point)) 'mouse-face 'highlight) - (add-text-properties (point) - (progn - (insert - (bidi-string-mark-left-to-right - (cadr str))) - (point)) + (add-text-properties (point) (progn (insert (cadr str)) (point)) '(mouse-face nil - face completions-annotations))) + face completions-annotations))) (cond ((eq completions-format 'vertical) ;; Vertical format ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.