# HG changeset patch # User Juanma Barranquero # Date 1287488647 -7200 # Node ID 1e7d8f405703073beff5a47501ef9ba8891f2eb9 # Parent e02e55f79038237d918546eab6bbbe5d2f1e9281# Parent f0ba7e7104ca21a5325fa37cdf9793bba0450df4 Merge changes from emacs-23 branch. diff -r e02e55f79038 -r 1e7d8f405703 lisp/ChangeLog --- a/lisp/ChangeLog Tue Oct 19 11:50:07 2010 +0200 +++ b/lisp/ChangeLog Tue Oct 19 13:44:07 2010 +0200 @@ -1,3 +1,22 @@ +2010-10-19 Stefan Monnier + + * repeat.el (repeat): Use read-key (bug#6256). + +2010-10-19 Chong Yidong + + * emacs-lisp/unsafep.el: Don't mark functions that display + messages as safe. Suggested by Johan Bockgård. + +2010-10-19 Stefan Monnier + + * minibuffer.el (completion--replace): Move point where it belongs + when there's a common suffix (bug#7215). + +2010-10-19 Kenichi Handa + + * international/characters.el: Add category '|' (word breakable) + to fullwidth characters. + 2010-10-19 Michael Albinus * net/tramp-sh.el (tramp-do-file-attributes-with-stat) diff -r e02e55f79038 -r 1e7d8f405703 lisp/emacs-lisp/regexp-opt.el --- a/lisp/emacs-lisp/regexp-opt.el Tue Oct 19 11:50:07 2010 +0200 +++ b/lisp/emacs-lisp/regexp-opt.el Tue Oct 19 13:44:07 2010 +0200 @@ -141,11 +141,10 @@ (require 'cl)) (defun regexp-opt-group (strings &optional paren lax) - ;; Return a regexp to match a string in the sorted list STRINGS. - ;; If PAREN non-nil, output regexp parentheses around returned regexp. - ;; If LAX non-nil, don't output parentheses if it doesn't require them. - ;; Merges keywords to avoid backtracking in Emacs' regexp matcher. - + "Return a regexp to match a string in the sorted list STRINGS. +If PAREN non-nil, output regexp parentheses around returned regexp. +If LAX non-nil, don't output parentheses if it doesn't require them. +Merges keywords to avoid backtracking in Emacs' regexp matcher." ;; The basic idea is to find the shortest common prefix or suffix, remove it ;; and recurse. If there is no prefix, we divide the list into two so that ;; \(at least) one half will have at least a one-character common prefix. @@ -239,9 +238,7 @@ (defun regexp-opt-charset (chars) - ;; - ;; Return a regexp to match a character in CHARS. - ;; + "Return a regexp to match a character in CHARS." ;; The basic idea is to find character ranges. Also we take care in the ;; position of character set meta characters in the character set regexp. ;; diff -r e02e55f79038 -r 1e7d8f405703 lisp/emacs-lisp/unsafep.el --- a/lisp/emacs-lisp/unsafep.el Tue Oct 19 11:50:07 2010 +0200 +++ b/lisp/emacs-lisp/unsafep.el Tue Oct 19 13:44:07 2010 +0200 @@ -101,15 +101,13 @@ (dolist (x '(;;Special forms and catch if or prog1 prog2 progn while unwind-protect ;;Safe subrs that have some side-effects - ding error message minibuffer-message random read-minibuffer - signal sleep-for string-match throw y-or-n-p yes-or-no-p + ding error random signal sleep-for string-match throw ;;Defsubst functions from subr.el caar cadr cdar cddr ;;Macros from subr.el - save-match-data unless when with-temp-message + save-match-data unless when ;;Functions from subr.el that have side effects - read-passwd split-string replace-regexp-in-string - play-sound-file)) + split-string replace-regexp-in-string play-sound-file)) (put x 'safe-function t)) ;;;###autoload diff -r e02e55f79038 -r 1e7d8f405703 lisp/international/characters.el --- a/lisp/international/characters.el Tue Oct 19 11:50:07 2010 +0200 +++ b/lisp/international/characters.el Tue Oct 19 13:44:07 2010 +0200 @@ -188,6 +188,9 @@ cp932-2-byte)) (map-charset-chars #'modify-category-entry l ?j)) +;; Fullwidth characters +(modify-category-entry '(#xff01 . #xff60) ?\|) + ;; Unicode equivalents of JISX0201-kana (let ((range '(#xff61 . #xff9f))) (modify-category-entry range ?k) diff -r e02e55f79038 -r 1e7d8f405703 lisp/minibuffer.el --- a/lisp/minibuffer.el Tue Oct 19 11:50:07 2010 +0200 +++ b/lisp/minibuffer.el Tue Oct 19 13:44:07 2010 +0200 @@ -508,10 +508,11 @@ (setq suffix-len (1+ suffix-len))) (unless (zerop suffix-len) (setq end (- end suffix-len)) - (setq newtext (substring newtext 0 (- suffix-len))))) - (goto-char beg) - (insert newtext) - (delete-region (point) (+ (point) (- end beg)))) + (setq newtext (substring newtext 0 (- suffix-len)))) + (goto-char beg) + (insert newtext) + (delete-region (point) (+ (point) (- end beg))) + (forward-char suffix-len))) (defcustom completion-cycle-threshold nil "Number of completion candidates below which cycling is used. diff -r e02e55f79038 -r 1e7d8f405703 lisp/repeat.el --- a/lisp/repeat.el Tue Oct 19 11:50:07 2010 +0200 +++ b/lisp/repeat.el Tue Oct 19 13:44:07 2010 +0200 @@ -335,7 +335,7 @@ (setq real-last-command 'repeat) (setq repeat-undo-count 1) (unwind-protect - (while (let ((evt (read-event))) ;FIXME: read-key maybe? + (while (let ((evt (read-key))) ;; For clicks, we need to strip the meta-data to ;; check the underlying event name. (eq (or (car-safe evt) evt) diff -r e02e55f79038 -r 1e7d8f405703 src/ChangeLog --- a/src/ChangeLog Tue Oct 19 11:50:07 2010 +0200 +++ b/src/ChangeLog Tue Oct 19 13:44:07 2010 +0200 @@ -1,3 +1,16 @@ +2010-10-19 Ken Brown + + * s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225). + +2010-10-19 Kenichi Handa + + Fix incorrect font metrics when the same font is opened with + different pixelsizes. + + * xftfont.c: Include composite.h. + (xftfont_shape): New function. + (syms_of_xftfont): Set xftfont_driver.shape. + 2010-10-18 Julien Danjou * frame.c (Fframe_pointer_visible_p): diff -r e02e55f79038 -r 1e7d8f405703 src/s/cygwin.h --- a/src/s/cygwin.h Tue Oct 19 11:50:07 2010 +0200 +++ b/src/s/cygwin.h Tue Oct 19 13:44:07 2010 +0200 @@ -101,5 +101,8 @@ returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */ #define G_SLICE_ALWAYS_MALLOC +/* Send signals to subprocesses by "typing" special chars at them. */ +#define SIGNALS_VIA_CHARACTERS + /* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b (do not change this comment) */ diff -r e02e55f79038 -r 1e7d8f405703 src/xftfont.c --- a/src/xftfont.c Tue Oct 19 11:50:07 2010 +0200 +++ b/src/xftfont.c Tue Oct 19 13:44:07 2010 +0200 @@ -32,6 +32,7 @@ #include "blockinput.h" #include "character.h" #include "charset.h" +#include "composite.h" #include "fontset.h" #include "font.h" #include "ftfont.h" @@ -664,6 +665,23 @@ return len; } +Lisp_Object +xftfont_shape (Lisp_Object lgstring) +{ + struct font *font; + struct xftfont_info *xftfont_info; + FT_Face ft_face; + Lisp_Object val; + + CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring), font); + xftfont_info = (struct xftfont_info *) font; + ft_face = XftLockFace (xftfont_info->xftfont); + xftfont_info->ft_size = ft_face->size; + val = ftfont_driver.shape (lgstring); + XftUnlockFace (xftfont_info->xftfont); + return val; +} + static int xftfont_end_for_frame (FRAME_PTR f) { @@ -753,6 +771,9 @@ xftfont_driver.draw = xftfont_draw; xftfont_driver.end_for_frame = xftfont_end_for_frame; xftfont_driver.cached_font_ok = xftfont_cached_font_ok; +#if defined (HAVE_M17N_FLT) && defined (HAVE_LIBOTF) + xftfont_driver.shape = xftfont_shape; +#endif register_font_driver (&xftfont_driver, NULL); }