# HG changeset patch # User Katsumi Yamaoka # Date 1267328998 0 # Node ID fb6d984c76bf095952ac6f95f4e3b24885ab089b # Parent 09e9c811517310e35e0942d17d43739ecd75576f# Parent 2da9673fc4489502bea3a95d9cc24e5ada1d737e Merge from mainline. diff -r 09e9c8115173 -r fb6d984c76bf doc/lispref/ChangeLog --- a/doc/lispref/ChangeLog Sat Feb 27 13:17:05 2010 +0000 +++ b/doc/lispref/ChangeLog Sun Feb 28 03:49:58 2010 +0000 @@ -1,3 +1,7 @@ +2010-02-27 Chong Yidong + + * display.texi (Low-Level Font): Document :otf font-spec property. + 2010-02-01 Stefan Monnier * display.texi (Line Height): Avoid obsolete special default variables diff -r 09e9c8115173 -r fb6d984c76bf doc/lispref/display.texi --- a/doc/lispref/display.texi Sat Feb 27 13:17:05 2010 +0000 +++ b/doc/lispref/display.texi Sun Feb 28 03:49:58 2010 +0000 @@ -3068,6 +3068,26 @@ @item :script The script that the font must support (a symbol). + +@item :otf +The font must be an OpenType font that supports these OpenType +features, provided Emacs is compiled with support for @samp{libotf} (a +library for performing complex text layout in certain scripts). The +value must be a list of the form + +@smallexample +@code{(@var{script-tag} @var{langsys-tag} @var{gsub} @var{gpos})} +@end smallexample + +where @var{script-tag} is the OpenType script tag symbol; +@var{langsys-tag} is the OpenType language system tag symbol, or +@code{nil} to use the default language system; @code{gsub} is a list +of OpenType GSUB feature tag symbols, or @code{nil} if none is +required; and @code{gpos} is a list of OpenType GPOS feature tag +symbols, or @code{nil} if none is required. If @code{gsub} or +@code{gpos} is a list, a @code{nil} element in that list means that +the font must not match any of the remaining tag symbols. The +@code{gpos} element may be omitted. @end table @end defun diff -r 09e9c8115173 -r fb6d984c76bf lisp/ChangeLog --- a/lisp/ChangeLog Sat Feb 27 13:17:05 2010 +0000 +++ b/lisp/ChangeLog Sun Feb 28 03:49:58 2010 +0000 @@ -1,7 +1,29 @@ +2010-02-28 Chong Yidong + + * textmodes/reftex-toc.el (reftex-toc-promote-prepare): + * emacs-lisp/elint.el (elint-add-required-env): + * cedet/semantic/db-find.el + (semanticdb-find-translate-path-brutish-default): + * cedet/ede/make.el (ede-make-check-version): + * calendar/icalendar.el (icalendar--add-diary-entry): + * calc/calcalg2.el (math-tracing-integral): + * files.el (recover-session-finish): Use with-current-buffer + instead of save-excursion. + +2010-02-27 Stefan Monnier + + Fix in-buffer completion when after-change-functions modify the buffer. + * minibuffer.el (completion--replace): New function. + (completion--do-completion): Use it and use relative movement. + +2010-02-27 Chong Yidong + + * international/fontset.el (setup-default-fontset): Fix :otf spec. + 2010-02-27 Jeremy Whitlock (tiny change) - * progmodes/python.el (python-pdbtrack-stack-entry-regexp): Allow - the characters _<> in the stack entry (Bug#5653). + * progmodes/python.el (python-pdbtrack-stack-entry-regexp): + Allow the characters _<> in the stack entry (Bug#5653). 2010-02-26 Kenichi Handa diff -r 09e9c8115173 -r fb6d984c76bf lisp/calc/calcalg2.el --- a/lisp/calc/calcalg2.el Sat Feb 27 13:17:05 2010 +0000 +++ b/lisp/calc/calcalg2.el Sun Feb 28 03:49:58 2010 +0000 @@ -670,8 +670,8 @@ (defmacro math-tracing-integral (&rest parts) (list 'and 'trace-buffer - (list 'save-excursion - '(set-buffer trace-buffer) + (list 'with-current-buffer + 'trace-buffer '(goto-char (point-max)) (list 'and '(bolp) diff -r 09e9c8115173 -r fb6d984c76bf lisp/calendar/icalendar.el --- a/lisp/calendar/icalendar.el Sat Feb 27 13:17:05 2010 +0000 +++ b/lisp/calendar/icalendar.el Sun Feb 28 03:49:58 2010 +0000 @@ -2246,8 +2246,7 @@ 'make-diary-entry) string non-marking diary-file))) ;; Würgaround to remove the trailing blank char - (save-excursion - (set-buffer (find-file diary-file)) + (with-current-buffer (find-file diary-file) (goto-char (point-max)) (if (= (char-before) ? ) (delete-char -1))) diff -r 09e9c8115173 -r fb6d984c76bf lisp/cedet/ede/make.el --- a/lisp/cedet/ede/make.el Sat Feb 27 13:17:05 2010 +0000 +++ b/lisp/cedet/ede/make.el Sun Feb 28 03:49:58 2010 +0000 @@ -76,9 +76,8 @@ (rev nil) (ans nil) ) - (save-excursion + (with-current-buffer b ;; Setup, and execute make. - (set-buffer b) (setq default-directory cd) (erase-buffer) (call-process ede-make-command nil b nil diff -r 09e9c8115173 -r fb6d984c76bf lisp/cedet/semantic/db-find.el --- a/lisp/cedet/semantic/db-find.el Sat Feb 27 13:17:05 2010 +0000 +++ b/lisp/cedet/semantic/db-find.el Sun Feb 28 03:49:58 2010 +0000 @@ -326,9 +326,8 @@ (cond ((null path) semanticdb-current-database) ((semanticdb-table-p path) (oref path parent-db)) (t (let ((tt (semantic-something-to-tag-table path))) - (save-excursion - ;; @todo - What does this DO ??!?! - (set-buffer (semantic-tag-buffer (car tt))) + ;; @todo - What does this DO ??!?! + (with-current-buffer (semantic-tag-buffer (car tt)) semanticdb-current-database)))))) (apply #'nconc diff -r 09e9c8115173 -r fb6d984c76bf lisp/emacs-lisp/elint.el --- a/lisp/emacs-lisp/elint.el Sat Feb 27 13:17:05 2010 +0000 +++ b/lisp/emacs-lisp/elint.el Sun Feb 28 03:49:58 2010 +0000 @@ -505,11 +505,10 @@ ;; (Messes up the "Initializing elint..." message.) ;;; (message nil) (if lib - (save-excursion + (with-current-buffer (find-file-noselect lib) ;; FIXME this doesn't use a temp buffer, because it ;; stores the result in buffer-local variables so that ;; it can be reused. - (set-buffer (find-file-noselect lib)) (elint-update-env) (setq env (elint-env-add-env env elint-buffer-env))) ;;; (with-temp-buffer diff -r 09e9c8115173 -r fb6d984c76bf lisp/files.el --- a/lisp/files.el Sat Feb 27 13:17:05 2010 +0000 +++ b/lisp/files.el Sun Feb 28 03:49:58 2010 +0000 @@ -5034,9 +5034,8 @@ (dired-unmark 1) (dired-do-flagged-delete t) (unwind-protect - (save-excursion + (with-current-buffer buffer ;; Read in the auto-save-list file. - (set-buffer buffer) (erase-buffer) (insert-file-contents file) ;; Loop thru the text of that file diff -r 09e9c8115173 -r fb6d984c76bf lisp/international/fontset.el --- a/lisp/international/fontset.el Sat Feb 27 13:17:05 2010 +0000 +++ b/lisp/international/fontset.el Sun Feb 28 03:49:58 2010 +0000 @@ -415,7 +415,7 @@ (sinhala ,(font-spec :registry "iso10646-1" :otf '(sinh nil (akhn)))) (malayalam ,(font-spec :registry "iso10646-1" :otf '(mlym nil (akhn)))) - (myanmar ,(font-spec :registry "iso10646-1" :otf '(mymr)) + (myanmar ,(font-spec :registry "iso10646-1" :otf '(mymr brm (liga mark))) ,(font-spec :registry "iso10646-1" :script 'myanmar)) (lao ,(font-spec :registry "iso10646-1" :otf '(lao\ nil nil (mark))) diff -r 09e9c8115173 -r fb6d984c76bf lisp/minibuffer.el --- a/lisp/minibuffer.el Sat Feb 27 13:17:05 2010 +0000 +++ b/lisp/minibuffer.el Sun Feb 28 03:49:58 2010 +0000 @@ -59,6 +59,8 @@ ;; - extend `boundaries' to provide various other meta-data about the ;; output of `all-completions': +;; - preferred sorting order when displayed in *Completions*. +;; - annotations/text-properties to add when displayed in *Completions*. ;; - quoting/unquoting (so we can complete files names with envvars ;; and backslashes, and all-completion can list names without ;; quoting backslashes and dollars). @@ -444,6 +446,17 @@ (if completions 2 0) (if exact 1 0))) +(defun completion--replace (beg end newtext) + "Replace the buffer text between BEG and END with NEWTEXT. +Moves point to the end of the new text." + ;; This should be in subr.el. + ;; You'd think this is trivial to do, but details matter if you want + ;; to keep markers "at the right place" and be robust in the face of + ;; after-change-functions that may themselves modify the buffer. + (goto-char beg) + (insert newtext) + (delete-region (point) (+ (point) (- end beg)))) + (defun completion--do-completion (&optional try-completion-function) "Do the completion and return a summary of what happened. M = completion was performed, the text was Modified. @@ -486,14 +499,12 @@ string nil nil t)))) (unchanged (eq t (compare-strings completion nil nil string nil nil nil)))) - (unless unchanged - - ;; Insert in minibuffer the chars we got. + (if unchanged (goto-char end) - (insert completion) - (delete-region beg end)) - ;; Move point. - (goto-char (+ beg comp-pos)) + ;; Insert in minibuffer the chars we got. + (completion--replace beg end completion)) + ;; Move point to its completion-mandated destination. + (forward-char (- comp-pos (length completion))) (if (not (or unchanged completed)) ;; The case of the string changed, but that's all. We're not sure @@ -1813,7 +1824,6 @@ (when completions (let* ((re (completion-pcm--pattern->regex pattern '(point))) (case-fold-search completion-ignore-case)) - ;; Remove base-size during mapcar, and add it back later. (mapcar (lambda (str) ;; Don't modify the string itself. diff -r 09e9c8115173 -r fb6d984c76bf lisp/textmodes/reftex-toc.el --- a/lisp/textmodes/reftex-toc.el Sat Feb 27 13:17:05 2010 +0000 +++ b/lisp/textmodes/reftex-toc.el Sun Feb 28 03:49:58 2010 +0000 @@ -665,9 +665,8 @@ (if (and (markerp marker) (marker-buffer marker)) ;; Buffer is still live and we have the marker. (progn - (save-excursion + (with-current-buffer (marker-buffer marker) ;; Goto the buffer and check of section is unchanged - (set-buffer (marker-buffer marker)) (goto-char (marker-position marker)) (if (looking-at (regexp-quote literal)) ;; OK, get the makro name diff -r 09e9c8115173 -r fb6d984c76bf src/ChangeLog --- a/src/ChangeLog Sat Feb 27 13:17:05 2010 +0000 +++ b/src/ChangeLog Sun Feb 28 03:49:58 2010 +0000 @@ -1,3 +1,7 @@ +2010-02-27 Andreas Schwab + + * w32uniscribe.c (uniscribe_check_otf): Fix length check. + 2010-02-27 Chong Yidong * font.c (font_parse_fcname): Recognize "Book", "Condensed", diff -r 09e9c8115173 -r fb6d984c76bf src/w32uniscribe.c --- a/src/w32uniscribe.c Sat Feb 27 13:17:05 2010 +0000 +++ b/src/w32uniscribe.c Sun Feb 28 03:49:58 2010 +0000 @@ -666,7 +666,7 @@ struct gcpro gcpro1; /* Check the spec is in the right format. */ - if (!CONSP (otf_spec) || Flength (otf_spec) < 3) + if (!CONSP (otf_spec) || XINT (Flength (otf_spec)) < 3) return 0; /* Break otf_spec into its components. */