Mercurial > hg > xemacs-beta
changeset 4598:8891b0477058
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 04 Feb 2009 12:35:45 +0000 |
parents | 4fc32a3a086e (diff) 7191a7b120f1 (current diff) |
children | 0347879667ed |
files | lisp/ChangeLog lisp/coding.el |
diffstat | 21 files changed, 242 insertions(+), 60 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jan 15 19:21:43 2009 +0000 +++ b/ChangeLog Wed Feb 04 12:35:45 2009 +0000 @@ -1,3 +1,8 @@ +2009-01-31 Stephen J. Turnbull <stephen@xemacs.org> + + * configure.ac: Adopt Martin's suggestion of declaring argv as + char ** (from <18643.15864.667930.542671@gargle.gargle.HOWL>). + 2008-12-29 Stephen J. Turnbull <stephen@xemacs.org> * configure.ac (xemacs_cc_cc_mismatch): Fix my syntax errors.
--- a/configure Thu Jan 15 19:21:43 2009 +0000 +++ b/configure Wed Feb 04 12:35:45 2009 +0000 @@ -11039,7 +11039,7 @@ runpath="$LD_RUN_PATH" elif test "$GCC" = "yes"; then ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c + echo "int main(int argc, char **argv) {return 0;}" > conftest.c xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' for arg in `eval "$xe_runpath_link" | grep ' -L'`; do case "$arg" in P,* | -L* | -R* ) @@ -19124,7 +19124,7 @@ runpath="$LD_RUN_PATH" elif test "$GCC" = "yes"; then ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c + echo "int main(int argc, char **argv) {return 0;}" > conftest.c xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' for arg in `eval "$xe_runpath_link" | grep ' -L'`; do case "$arg" in P,* | -L* | -R* ) @@ -30490,7 +30490,7 @@ runpath="$LD_RUN_PATH" elif test "$GCC" = "yes"; then ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c + echo "int main(int argc, char **argv) {return 0;}" > conftest.c xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' for arg in `eval "$xe_runpath_link" | grep ' -L'`; do case "$arg" in P,* | -L* | -R* ) @@ -34056,7 +34056,7 @@ } int -main (int argc, char *argv) +main (int argc, char **argv) { if (f2 (665, memset (alloca (1001), 0xFB, 1001), 776776776) != 42) return 1; @@ -34448,7 +34448,7 @@ #define MAP_FAILED -1 #endif -int main (int argc, char *argv) +int main (int argc, char **argv) { int fd = -1; caddr_t p;
--- a/configure.ac Thu Jan 15 19:21:43 2009 +0000 +++ b/configure.ac Wed Feb 04 12:35:45 2009 +0000 @@ -189,7 +189,7 @@ elif test "$GCC" = "yes"; then dnl Compute runpath from gcc's -v output ld_switch_run_save="$ld_switch_run"; ld_switch_run="" - echo "int main(int argc, char *argv[[]]) {return 0;}" > conftest.c + echo "int main(int argc, char **argv) {return 0;}" > conftest.c xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null' for arg in `eval "$xe_runpath_link" | grep ' -L'`; do case "$arg" in P,* | -L* | -R* ) @@ -4983,7 +4983,7 @@ } int -main (int argc, char *argv[]) +main (int argc, char **argv) { if (f2 (665, memset (alloca (1001), 0xFB, 1001), 776776776) != 42) return 1; @@ -5038,7 +5038,7 @@ #define MAP_FAILED -1 #endif -int main (int argc, char *argv[]) +int main (int argc, char **argv) { int fd = -1; caddr_t p;
--- a/lisp/ChangeLog Thu Jan 15 19:21:43 2009 +0000 +++ b/lisp/ChangeLog Wed Feb 04 12:35:45 2009 +0000 @@ -1,16 +1,53 @@ 2009-01-15 Aidan Kehoe <kehoea@parhasard.net> - * coding.el (force-coding-system-equivalency): + * coding.el (force-coding-system-equivalency): Move three functions that we don't want to advertise to being anonymous lambdas instead. * glyphs.el : Remove #'define-constant-glyph and some functions it uses, replace the latter with anonymous lambdas and the former and its uses with - a call to loop. + a call to loop. Do the same with #'define-obsolete-pointer-glyph and the functions - it uses. + it uses. (init-glyphs): Untern this symbol once the associated function has - been called; it's only needed at dump time, not at runtime. + been called; it's only needed at dump time, not at runtime. + +2009-02-04 Aidan Kehoe <kehoea@parhasard.net> + + * coding.el (query-coding-region): + Revert this to being a defun, add a compiler macro without + needless binding. + (query-coding-string): + Correct a bug here, string indices are zero- not one-based. + * mule/general-late.el (unicode-query-coding-skip-chars-arg): + Correct the algorithm used to initialise this variable. + +2009-02-04 Aidan Kehoe <kehoea@parhasard.net> + + * help.el (describe-function-1): + Distinguish between special forms and subrs; don't bind + autoload-file, #'symbol-file returns it like any other function + file name. + +2009-01-31 Aidan Kehoe <kehoea@parhasard.net> + + * mule/mule-cmds.el (finish-set-language-environment): + Treat control characters specially in the + invalid-sequence-coding-system handling, display them using the + caret notation. + +2009-01-31 Aidan Kehoe <kehoea@parhasard.net> + + * frame.el (display-graphic-p): + Call #'display-device on the DISPLAY argument, ensuring that the + argument to #'device-on-window-system-p is correct. + +2009-01-18 Ville Skyttä <scop@xemacs.org> + + * font.el (font-*-p): Docstring spelling fix. + (set-font-*-p): Ditto. + + * modeline.el (modeline-3d-p): Fix docstring copy-pasto. 2009-01-13 Aidan Kehoe <kehoea@parhasard.net>
--- a/lisp/coding.el Thu Jan 15 19:21:43 2009 +0000 +++ b/lisp/coding.el Wed Feb 04 12:35:45 2009 +0000 @@ -392,8 +392,8 @@ (values nil ranges) (values t nil)))))) -(defsubst query-coding-region (start end coding-system &optional buffer - errorp highlight) +(defun query-coding-region (start end coding-system &optional buffer + errorp highlight) "Work out whether CODING-SYSTEM can losslessly encode a region. START and END are the beginning and end of the region to check. @@ -417,7 +417,15 @@ #'default-query-coding-region) start end coding-system buffer errorp highlight)) -(defsubst query-coding-string (string coding-system &optional errorp highlight) +(define-compiler-macro query-coding-region (start end coding-system + &optional buffer errorp highlight) + `(funcall (or (coding-system-get ,coding-system 'query-coding-function) + #'default-query-coding-region) + ,start ,end ,coding-system ,@(append (if buffer (list buffer)) + (if errorp (list errorp)) + (if highlight (list highlight))))) + +(defun query-coding-string (string coding-system &optional errorp highlight) "Work out whether CODING-SYSTEM can losslessly encode STRING. CODING-SYSTEM is the coding system to check. @@ -436,9 +444,21 @@ `make-range-table'." (with-temp-buffer (insert string) - (query-coding-region (point-min) (point-max) coding-system (current-buffer) - ;; ### Will highlight work here? - errorp highlight))) + (multiple-value-bind (result ranges) + (query-coding-region (point-min) (point-max) coding-system + (current-buffer) errorp + ;; #### Highlight won't work here, + ;; query-coding-region may need to be modified. + highlight) + (unless result + ;; Sigh, string indices are zero-based, buffer offsets are + ;; one-based. + (map-range-table + #'(lambda (begin end value) + (remove-range-table begin end ranges) + (put-range-table (1- begin) (1- end) value ranges)) + ranges)) + (values result ranges)))) ;; Function docstring and API are taken from GNU coding.c version 1.353, GPLv2. (defun unencodable-char-position (start end coding-system
--- a/lisp/font.el Thu Jan 15 19:21:43 2009 +0000 +++ b/lisp/font.el Wed Feb 04 12:35:45 2009 +0000 @@ -216,13 +216,13 @@ "Bitmask for whether a font is to be rendered in %s or not." attr)) (defun ,(intern (format "font-%s-p" attr)) (fontobj) - ,(format "Whether FONTOBJ will be renderd in `%s' or not." attr) + ,(format "Whether FONTOBJ will be rendered in `%s' or not." attr) (if (/= 0 (logand (font-style fontobj) ,(intern (format "font-%s-mask" attr)))) t nil)) (defun ,(intern (format "set-font-%s-p" attr)) (fontobj val) - ,(format "Set whether FONTOBJ will be renderd in `%s' or not." + ,(format "Set whether FONTOBJ will be rendered in `%s' or not." attr) (cond (val
--- a/lisp/frame.el Thu Jan 15 19:21:43 2009 +0000 +++ b/lisp/frame.el Wed Feb 04 12:35:45 2009 +0000 @@ -1211,7 +1211,7 @@ that use a window system such as X, and false for text-only terminals. DISPLAY can be a frame, a device, a console, or nil (meaning the selected frame)." - (device-on-window-system-p display)) + (device-on-window-system-p (display-device display))) (defun display-images-p (&optional display) "Return non-nil if DISPLAY can display images.
--- a/lisp/help.el Thu Jan 15 19:21:43 2009 +0000 +++ b/lisp/help.el Wed Feb 04 12:35:45 2009 +0000 @@ -1371,7 +1371,7 @@ (princ function) (princ "' is ") (let* ((def function) - aliases file-name autoload-file kbd-macro-p fndef macrop) + aliases file-name kbd-macro-p fndef macrop) (while (and (symbolp def) (fboundp def)) (when (not (eq def function)) (setq aliases @@ -1403,11 +1403,17 @@ (an-p "an ") (t "a ")) "%s" - (if macro-p " macro" " function"))) + (cond + ((eq 'neither macro-p) + "") + (macrop " macro") + (t " function")))) string))))) (cond ((or (stringp def) (vectorp def)) (princ "a keyboard macro.") (setq kbd-macro-p t)) + ((special-form-p fndef) + (funcall int "built-in special form" nil 'neither)) ((subrp fndef) (funcall int "built-in" nil macrop)) ((compiled-function-p fndef) @@ -1417,7 +1423,6 @@ ((eq (car-safe fndef) 'mocklisp) (funcall int "mocklisp" nil macrop)) ((eq (car-safe def) 'autoload) - (setq autoload-file (elt def 1)) (funcall int "autoloaded Lisp" t (elt def 4))) ((and (symbolp def) (not (fboundp def))) (princ "a symbol with a void (unbound) function definition."))
--- a/lisp/modeline.el Thu Jan 15 19:21:43 2009 +0000 +++ b/lisp/modeline.el Wed Feb 04 12:35:45 2009 +0000 @@ -44,7 +44,7 @@ (specifier-instance modeline-shadow-thickness))) (and (integerp thickness) (> thickness 0))) - "Whether the default toolbar is globally visible. + "Whether the modeline is displayed with raised, 3-d appearance. This option only has an effect when set using `customize-set-variable', or through the Options menu." :group 'display
--- a/lisp/mule/general-late.el Thu Jan 15 19:21:43 2009 +0000 +++ b/lisp/mule/general-late.el Wed Feb 04 12:35:45 2009 +0000 @@ -71,7 +71,7 @@ unicode-query-coding-skip-chars-arg (eval-when-compile - (when-fboundp #'map-charset-chars + (when-fboundp 'map-charset-chars (loop for charset in (charset-list) with skip-chars-string = "" @@ -80,17 +80,16 @@ (map-charset-chars #'(lambda (begin end) (loop - while (/= end begin) + while (and begin (>= end begin)) do (when (= -1 (char-to-unicode begin)) - (setq this-charset-works nil) (return-from no-ucs-mapping)) (setq begin (int-to-char (1+ begin))))) charset) (setq skip-chars-string (concat skip-chars-string (charset-skip-chars-string charset)))) - finally return (skip-chars-quote skip-chars-string))))) + finally return skip-chars-string)))) ;; At this point in the dump, all the charsets have been loaded. Now, load ;; their Unicode mappings.
--- a/lisp/mule/mule-cmds.el Thu Jan 15 19:21:43 2009 +0000 +++ b/lisp/mule/mule-cmds.el Wed Feb 04 12:35:45 2009 +0000 @@ -771,17 +771,18 @@ (let ((invalid-sequence-coding-system (get-language-info language-name 'invalid-sequence-coding-system)) (disp-table (specifier-instance current-display-table)) - glyph) + glyph string) (when (consp invalid-sequence-coding-system) (setq invalid-sequence-coding-system (car invalid-sequence-coding-system))) (map-char-table #'(lambda (key entry) - (setq glyph (make-glyph - (vector - 'string :data - (decode-coding-string (string entry) - invalid-sequence-coding-system)))) + (setq string (decode-coding-string (string entry) + invalid-sequence-coding-system)) + ;; Treat control characters specially: + (when (string-match "^[\x00-\x1f\x80-\x9f]$" string) + (setq string (format "^%c" (+ ?@ (aref string 0))))) + (setq glyph (make-glyph (vector 'string :data string))) (set-glyph-face glyph 'unicode-invalid-sequence-warning-face) (put-char-table key glyph disp-table) nil)
--- a/src/ChangeLog Thu Jan 15 19:21:43 2009 +0000 +++ b/src/ChangeLog Wed Feb 04 12:35:45 2009 +0000 @@ -1,3 +1,29 @@ +2009-02-02 Stephen J. Turnbull <stephen@xemacs.org> + + * frame-x.c (x_init_frame_2): Update comment per new info from HT. + +2009-02-02 Stephen J. Turnbull <stephen@xemacs.org> + + * frame-x.c (x_init_frame_2): Placate openbox by calling + update_frame_icon. Suggested by Henry S. Thompson + <ht@inf.ed.ac.uk> in <f5btz7ghm5k@hildegard.inf.ed.ac.uk>. + +2009-01-31 Aidan Kehoe <kehoea@parhasard.net> + + * unicode.c (unicode_convert): + Correct little-endian UTF-16 surrogate handling. + +2009-01-16 Aidan Kehoe <kehoea@parhasard.net> + + * chartab.c (print_table_entry): + Print char table values correctly, eliminating some confusion + between symbols and strings. + +2009-01-10 Aidan Kehoe <kehoea@parhasard.net> + + * objects-msw.c (mswindows_font_spec_matches_charset_stage_2): + Accept msprinter as well as mswindows devices here. + 2008-12-30 Aidan Kehoe <kehoea@parhasard.net> * device-x.c (Fx_get_font_path): @@ -121,6 +147,17 @@ * input-method-xlib.c: Use Xt_RESOURCE. +2008-11-25 Stephen J. Turnbull <stephen@xemacs.org> + + * elhash.c (hash_table_data_validate): + * elhash.c (decode_hash_table_rehash_size): + * elhash.c (decode_hash_table_rehash_threshold): + Document side effects used in these functions. + +2008-11-20 Stephen J. Turnbull <stephen@xemacs.org> + + * console-x-impl.h (struct x_frame): Clarify comment. + 2008-11-01 Stephen J. Turnbull <stephen@xemacs.org> * regex.c (re_search_2): Fix at_dot by changing charpos to bytepos.
--- a/src/chartab.c Thu Jan 15 19:21:43 2009 +0000 +++ b/src/chartab.c Wed Feb 04 12:35:45 2009 +0000 @@ -317,7 +317,7 @@ a->first = 0; lisprange = encode_char_table_range (range); GCPRO1 (lisprange); - write_fmt_string_lisp (a->printcharfun, "%s %s", 2, lisprange, val); + write_fmt_string_lisp (a->printcharfun, "%s %S", 2, lisprange, val); UNGCPRO; return 0; }
--- a/src/console-x-impl.h Thu Jan 15 19:21:43 2009 +0000 +++ b/src/console-x-impl.h Wed Feb 04 12:35:45 2009 +0000 @@ -332,7 +332,7 @@ or partially hidden by another X window */ unsigned int totally_visible_p :1; - /* NB: Both of the following flags are derivable from the 'shell' + /* NB: Both of the following flags are derivable from the 'widget' field above, but it's easier if we also have them separately here. */ /* Are we a top-level frame? This means that our shell is a
--- a/src/elhash.c Thu Jan 15 19:21:43 2009 +0000 +++ b/src/elhash.c Wed Feb 04 12:35:45 2009 +0000 @@ -755,6 +755,7 @@ static double decode_hash_table_rehash_size (Lisp_Object rehash_size) { + /* -1.0 signals make_general_lisp_hash_table to use the default. */ return NILP (rehash_size) ? -1.0 : XFLOAT_DATA (rehash_size); } @@ -786,6 +787,7 @@ static double decode_hash_table_rehash_threshold (Lisp_Object rehash_threshold) { + /* -1.0 signals make_general_lisp_hash_table to use the default. */ return NILP (rehash_threshold) ? -1.0 : XFLOAT_DATA (rehash_threshold); } @@ -795,6 +797,7 @@ { int len; + /* Check for improper lists while getting length. */ GET_EXTERNAL_LIST_LENGTH (value, len); if (len & 1) @@ -804,6 +807,7 @@ value, Qhash_table, errb); return 0; } + return 1; }
--- a/src/frame-x.c Thu Jan 15 19:21:43 2009 +0000 +++ b/src/frame-x.c Wed Feb 04 12:35:45 2009 +0000 @@ -2160,6 +2160,15 @@ * We'll just need to be careful in the modeline specs. */ update_frame_title (f); + /* Henry S. Thompson: + * Must set icon resource before mapping frame, or some WMs may + * lose the icon (openbox). See <f5bhc3efb17@hildegard.inf.ed.ac.uk>. + * SJT: + * This probably means that the frame-icon library won't work with + * that WM. Late breaking news: it *does* work, so possibly the + * problem at initialization is due to a race condition. + */ + update_frame_icon (f); } static void
--- a/src/objects-msw.c Thu Jan 15 19:21:43 2009 +0000 +++ b/src/objects-msw.c Wed Feb 04 12:35:45 2009 +0000 @@ -2064,8 +2064,21 @@ else { HDC hdc = CreateCompatibleDC (NULL); - Lisp_Object font_list = DEVICE_MSWINDOWS_FONTLIST (d); - Lisp_Object truename; + Lisp_Object font_list = Qnil, truename; + + if (DEVICE_TYPE_P (d, mswindows)) + { + font_list = DEVICE_MSWINDOWS_FONTLIST (d); + } + else if (DEVICE_TYPE_P (d, msprinter)) + { + font_list = DEVICE_MSPRINTER_FONTLIST (d); + } + else + { + assert(0); + } + HFONT hfont = create_hfont_from_font_spec (the_nonreloc, hdc, Qnil, font_list, ERROR_ME_DEBUG_WARN,
--- a/src/unicode.c Thu Jan 15 19:21:43 2009 +0000 +++ b/src/unicode.c Wed Feb 04 12:35:45 2009 +0000 @@ -2115,23 +2115,47 @@ { int tempch; - if (!valid_utf_16_last_surrogate(ch & 0xFFFF)) - { - DECODE_ERROR_OCTET ((ch >> 24) & 0xFF, dst, data, - ignore_bom); - DECODE_ERROR_OCTET ((ch >> 16) & 0xFF, dst, data, - ignore_bom); - DECODE_ERROR_OCTET ((ch >> 8) & 0xFF, dst, data, - ignore_bom); - DECODE_ERROR_OCTET (ch & 0xFF, dst, data, - ignore_bom); - } - else + if (little_endian) { - tempch = utf_16_surrogates_to_code((ch >> 16), - (ch & 0xffff)); - decode_unicode_char(tempch, dst, data, ignore_bom); + if (!valid_utf_16_last_surrogate(ch >> 16)) + { + DECODE_ERROR_OCTET (ch & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 8) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 16) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 24) & 0xFF, dst, data, + ignore_bom); + } + else + { + tempch = utf_16_surrogates_to_code((ch & 0xffff), + (ch >> 16)); + decode_unicode_char(tempch, dst, data, ignore_bom); + } } + else + { + if (!valid_utf_16_last_surrogate(ch & 0xFFFF)) + { + DECODE_ERROR_OCTET ((ch >> 24) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 16) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 8) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET (ch & 0xFF, dst, data, + ignore_bom); + } + else + { + tempch = utf_16_surrogates_to_code((ch >> 16), + (ch & 0xffff)); + decode_unicode_char(tempch, dst, data, ignore_bom); + } + } + ch = 0; counter = 0; }
--- a/tests/ChangeLog Thu Jan 15 19:21:43 2009 +0000 +++ b/tests/ChangeLog Wed Feb 04 12:35:45 2009 +0000 @@ -1,3 +1,19 @@ +2009-01-31 Aidan Kehoe <kehoea@parhasard.net> + + * automated/mule-tests.el: + Test little-endian Unicode surrogates too. + +2009-01-18 Aidan Kehoe <kehoea@parhasard.net> + + * automated/lisp-tests.el: (char-table-with-string): + That was remiss of me, I should have checked before commiting that + last changed. Fixed, the char tables are now actually printed. + +2009-01-18 Aidan Kehoe <kehoea@parhasard.net> + + * automated/lisp-tests.el: + Check that a bug I fixed in char table printing is really gone. + 2009-01-11 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el ():
--- a/tests/automated/lisp-tests.el Thu Jan 15 19:21:43 2009 +0000 +++ b/tests/automated/lisp-tests.el Wed Feb 04 12:35:45 2009 +0000 @@ -1327,3 +1327,10 @@ printed-with-uninterned))) (Assert (null (string-match awkward-regexp printed-with-uninterned (1+ first-match-start))))) + +(let ((char-table-with-string #s(char-table data (?\x00 "text"))) + (char-table-with-symbol #s(char-table data (?\x00 text)))) + (Assert (not (string-equal (prin1-to-string char-table-with-string) + (prin1-to-string char-table-with-symbol))) + "Check that char table elements are quoted correctly when printing")) +
--- a/tests/automated/mule-tests.el Thu Jan 15 19:21:43 2009 +0000 +++ b/tests/automated/mule-tests.el Wed Feb 04 12:35:45 2009 +0000 @@ -446,12 +446,17 @@ (encode-coding-string xemacs-character 'ctext)))))) (loop - for (code-point encoded) - in '((#x10000 "\xd8\x00\xdc\x00") - (#x10FFFD "\xdb\xff\xdf\xfd")) - do (Assert (equal (encode-coding-string - (decode-char 'ucs code-point) 'utf-16) - encoded))) + for (code-point utf-16-big-endian utf-16-little-endian) + in '((#x10000 "\xd8\x00\xdc\x00" "\x00\xd8\x00\xdc") + (#x10FFFD "\xdb\xff\xdf\xfd" "\xff\xdb\xfd\xdf")) + do + (Assert (equal (encode-coding-string + (decode-char 'ucs code-point) 'utf-16) + utf-16-big-endian)) + (Assert (equal (encode-coding-string + (decode-char 'ucs code-point) 'utf-16-le) + utf-16-little-endian)) + ;;--------------------------------------------------------------- ;; Regression test for a couple of CCL-related bugs.