Commit ca3fa302 authored by Juanma Barranquero's avatar Juanma Barranquero
Browse files

Merge changes from emacs-23 branch.

parents 3224b54d bca0f839
2010-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
* repeat.el (repeat): Use read-key (bug#6256).
2010-10-19 Chong Yidong <cyd@stupidchicken.com>
* emacs-lisp/unsafep.el: Don't mark functions that display
messages as safe. Suggested by Johan Bockgård.
2010-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (completion--replace): Move point where it belongs
when there's a common suffix (bug#7215).
2010-10-19 Kenichi Handa <handa@m17n.org>
* international/characters.el: Add category '|' (word breakable)
to fullwidth characters.
2010-10-19 Michael Albinus <michael.albinus@gmx.de>
 
* net/tramp-sh.el (tramp-do-file-attributes-with-stat)
......
......@@ -141,11 +141,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.
......@@ -239,9 +238,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.
;;
......
......@@ -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
......
......@@ -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)
......
......@@ -508,10 +508,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)))
(defcustom completion-cycle-threshold nil
"Number of completion candidates below which cycling is used.
......
......@@ -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)
......
2010-10-19 Ken Brown <kbrown@cornell.edu>
* s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225).
2010-10-19 Kenichi Handa <handa@m17n.org>
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 <julien@danjou.info>
 
* frame.c (Fframe_pointer_visible_p):
......
......@@ -101,5 +101,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
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) */
......@@ -32,6 +32,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#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 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b
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 @@ syms_of_xftfont (void)
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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment