From c4186f9c7721ae00452f8378bb7d6be375881c62 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 15 Oct 2010 09:41:53 +0900 Subject: [PATCH 1/9] international/characters.el: Add category '|' (word breakable) to fullwidth characters. --- lisp/ChangeLog | 5 +++++ lisp/international/characters.el | 3 +++ 2 files changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6d3555975e..19135944b17 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-15 Kenichi Handa + + * international/characters.el: Add category '|' (word breakable) + to fullwidth characters. + 2010-10-14 Kenichi Handa * mail/rmail.el (rmail-show-message-1): Catch an error of diff --git a/lisp/international/characters.el b/lisp/international/characters.el index cf43bb1e6ca..e33f1449357 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -188,6 +188,9 @@ Combining diacritic or mark (Unicode General Category M)") 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) From 31daa5e17c73c0830ef5094eb38702450965a938 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 15 Oct 2010 16:49:11 +0900 Subject: [PATCH 2/9] Fix incorrect font metrics when the same font is opened with different pixelsizes. --- src/ChangeLog | 9 +++++++++ src/xftfont.c | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 40c0cb231e4..46913c8a8b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2010-10-15 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-13 Damyan Pepper Fix handling of font properties on Windows (bug#6303). diff --git a/src/xftfont.c b/src/xftfont.c index 197cc9c1f5b..71fd1475280 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -32,6 +32,7 @@ along with GNU Emacs. If not, see . */ #include "blockinput.h" #include "character.h" #include "charset.h" +#include "composite.h" #include "fontset.h" #include "font.h" #include "ftfont.h" @@ -702,6 +703,23 @@ xftfont_draw (s, from, to, x, y, with_background) 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 (f) FRAME_PTR f; @@ -796,6 +814,9 @@ syms_of_xftfont () 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); } From e499c64d970a726bb599ca6dcb9fd1a545e5bddc Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 15 Oct 2010 14:15:43 +0200 Subject: [PATCH 3/9] * net/tramp.el (tramp-open-connection-setup-interactive-shell): Suppress expansion of tabs to spaces. --- lisp/ChangeLog | 5 +++++ lisp/net/tramp.el | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 19135944b17..e0cbd35d5fc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-15 Michael Albinus + + * net/tramp.el (tramp-open-connection-setup-interactive-shell): + Suppress expansion of tabs to spaces. + 2010-10-15 Kenichi Handa * international/characters.el: Add category '|' (word breakable) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index d5d1606c617..01317ac3708 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -7013,9 +7013,7 @@ process to set up. VEC specifies the connection." ;; because we're running on a non-MULE Emacs. Let's try ;; stty, instead. (tramp-send-command vec "stty -onlcr" t)))) - ;; Dump stty settings in the traces. - (when (>= tramp-verbose 9) - (tramp-send-command vec "stty -a" t)) + (tramp-send-command vec "set +o vi +o emacs" t) ;; Check whether the output of "uname -sr" has been changed. If @@ -7086,11 +7084,20 @@ process to set up. VEC specifies the connection." (when (string-match "^IRIX64" (tramp-get-connection-property vec "uname" "")) (tramp-send-command vec "set +H" t)) + ;; On BSD-like systems, ?\t is expanded to spaces. Suppress this. + (when (string-match "BSD\\|Darwin" + (tramp-get-connection-property vec "uname" "")) + (tramp-send-command vec "stty -oxtabs" t)) + ;; Set `remote-tty' process property. (ignore-errors (let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\""))) (unless (zerop (length tty)) (process-put proc 'remote-tty tty)))) + ;; Dump stty settings in the traces. + (when (>= tramp-verbose 9) + (tramp-send-command vec "stty -a" t)) + ;; Set the environment. (tramp-message vec 5 "Setting default environment") From 8348910a636f3a40ca2bb1a6231d5aa5f0a1a8e7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 17 Oct 2010 13:30:22 -0400 Subject: [PATCH 4/9] * lisp/minibuffer.el (completion--replace): Move point where it belongs when there's a common suffix. Fixes: debbugs:7215 --- lisp/ChangeLog | 5 +++++ lisp/minibuffer.el | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e0cbd35d5fc..7c560c33b9d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-17 Stefan Monnier + + * minibuffer.el (completion--replace): Move point where it belongs + when there's a common suffix (bug#7215). + 2010-10-15 Michael Albinus * net/tramp.el (tramp-open-connection-setup-interactive-shell): diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index a4ab5261f7c..bc5a1d2e807 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -498,10 +498,11 @@ Moves point to the end of the new text." (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))) (defun completion--do-completion (&optional try-completion-function) "Do the completion and return a summary of what happened. From a7769c306046af407eade15b3fc85797b5aefd43 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 17 Oct 2010 14:59:58 -0400 Subject: [PATCH 5/9] (regexp-opt-group, regexp-opt-charset): Turn comments into docstrings --- lisp/emacs-lisp/regexp-opt.el | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 78eba19a253..f70ad4047a7 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -136,11 +136,10 @@ This means the number of non-shy regexp grouping constructs (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. @@ -234,9 +233,7 @@ This means the number of non-shy regexp grouping constructs (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. ;; From 5419963b85522629c972baba98c7e2cfef4bb014 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Mon, 18 Oct 2010 08:23:41 -0400 Subject: [PATCH 6/9] * src/s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225). --- src/ChangeLog | 4 ++++ src/s/cygwin.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 46913c8a8b0..d33f9dd4f0b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-10-18 Ken Brown + + * s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225). + 2010-10-15 Kenichi Handa Fix incorrect font metrics when the same font is opened with diff --git a/src/s/cygwin.h b/src/s/cygwin.h index 9ca5c67ce37..dcab55a91e1 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h @@ -132,6 +132,9 @@ along with GNU Emacs. If not, see . */ 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 + /* the end */ /* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b From a8c41b4c0d3b0a3e87f17bbcdd8ac12dae296b3a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 18 Oct 2010 13:28:20 -0400 Subject: [PATCH 7/9] Don't allow functions that display messages in unsafep. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * emacs-lisp/unsafep.el: Don't mark functions that display messages as safe. Suggested by Johan Bockgård. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/unsafep.el | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7c560c33b9d..eb26c3923bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-18 Chong Yidong + + * emacs-lisp/unsafep.el: Don't mark functions that display + messages as safe. Suggested by Johan Bockgård. + 2010-10-17 Stefan Monnier * minibuffer.el (completion--replace): Move point where it belongs diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index 851a1f7652b..a62f8de4010 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el @@ -101,15 +101,13 @@ in the parse.") (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 From e8b69dc2863ee79bef680cbd3837267f2481f005 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 18 Oct 2010 14:38:11 -0400 Subject: [PATCH 8/9] * lisp/repeat.el (repeat): Use read-key to ignore mouse-down events. Fixes: debbugs:6256 --- lisp/ChangeLog | 4 ++++ lisp/ps-print.el | 2 +- lisp/repeat.el | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eb26c3923bf..2f40d3565e0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-10-18 Stefan Monnier + + * repeat.el (repeat): Use read-key (bug#6256). + 2010-10-18 Chong Yidong * emacs-lisp/unsafep.el: Don't mark functions that display diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 0efac03f7d5..69b32e5d52d 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -6656,7 +6656,7 @@ If FACE is not a valid face name, use default face." ;; But autoload them here to make the separation invisible. ;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize -;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "9187df3473401876e0df4937c311fbaf") +;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "18a8bc30e8755ff27de7267f4bce3d99") ;;; Generated autoloads from ps-mule.el (defvar ps-multibyte-buffer nil "\ diff --git a/lisp/repeat.el b/lisp/repeat.el index 9abe15c7253..b82522ef855 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -335,7 +335,7 @@ recently executed command not bound to an input event\"." (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) From bca0f839a56a1edd8562ada5962b809323f39efc Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 19 Oct 2010 11:26:21 +0200 Subject: [PATCH 9/9] * net/tramp.el (tramp-do-file-attributes-with-stat) (tramp-do-directory-files-and-attributes-with-stat): Use "e0" in order to make stat results a float. Patch by Andreas Schwab . --- lisp/ChangeLog | 10 +++++++++- lisp/net/tramp.el | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f40d3565e0..4d04453791a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-10-19 Michael Albinus + + * net/tramp.el (tramp-do-file-attributes-with-stat) + (tramp-do-directory-files-and-attributes-with-stat): Use "e0" in + order to make stat results a float. Patch by Andreas Schwab + . + 2010-10-18 Stefan Monnier * repeat.el (repeat): Use read-key (bug#6256). @@ -15,7 +22,8 @@ 2010-10-15 Michael Albinus * net/tramp.el (tramp-open-connection-setup-interactive-shell): - Suppress expansion of tabs to spaces. + Suppress expansion of tabs to spaces. Reported by Dale Sedivec + . 2010-10-15 Kenichi Handa diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 01317ac3708..3ee5509276e 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2922,7 +2922,7 @@ target of the symlink differ." (format ;; On Opsware, pdksh (which is the true name of ksh there) doesn't ;; parse correctly the sequence "((". Therefore, we add a space. - "( (%s %s || %s -h %s) && %s -c '( (\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s.0 \"%%A\" t %%i.0 -1)' %s || echo nil)" + "( (%s %s || %s -h %s) && %s -c '( (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)' %s || echo nil)" (tramp-get-file-exists-command vec) (tramp-shell-quote-argument localname) (tramp-get-test-command vec) @@ -3378,7 +3378,7 @@ value of `default-file-modes', without execute permissions." ;; but it does not work on all remote systems. Therefore, we ;; quote the filenames via sed. "cd %s; echo \"(\"; (%s -a | sed -e s/\\$/\\\"/g -e s/^/\\\"/g | xargs " - "%s -c '(\"%%n\" (\"%%N\") %%h %s %s %%X.0 %%Y.0 %%Z.0 %%s.0 \"%%A\" t %%i.0 -1)'); " + "%s -c '(\"%%n\" (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)'); " "echo \")\"") (tramp-shell-quote-argument localname) (tramp-get-ls-command vec)