Now on revision 106894. ------------------------------------------------------------ revno: 106894 author: Julien Danjou committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2012-01-19 23:06:49 +0000 message: color.el (color-name-to-rgb): Use the white color to find the max color component value and return correctly computed values. (color-name-to-rgb): Add missing float conversion for max value. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-01-19 10:38:31 +0000 +++ lisp/ChangeLog 2012-01-19 23:06:49 +0000 @@ -1,3 +1,9 @@ +2012-01-19 Julien Danjou + + * color.el (color-name-to-rgb): Use the white color to find the max + color component value and return correctly computed values. + (color-name-to-rgb): Add missing float conversion for max value. + 2012-01-19 Martin Rudalics * window.el (window--state-get-1, window-state-get): Do not use === modified file 'lisp/color.el' --- lisp/color.el 2012-01-05 09:46:05 +0000 +++ lisp/color.el 2012-01-19 23:06:49 +0000 @@ -53,7 +53,10 @@ Optional arg FRAME specifies the frame where the color is to be displayed. If FRAME is omitted or nil, use the selected frame. If FRAME cannot display COLOR, return nil." - (mapcar (lambda (x) (/ x 65535.0)) (color-values color frame))) + ;; `colors-values' maximum value is either 65535 or 65280 depending on the + ;; display system. So we use a white conversion to get the max value. + (let ((valmax (float (car (color-values "#ffffff"))))) + (mapcar (lambda (x) (/ x valmax)) (color-values color frame)))) (defun color-rgb-to-hex (red green blue) "Return hexadecimal notation for the color RED GREEN BLUE. ------------------------------------------------------------ revno: 106893 fixes bug(s): http://debbugs.gnu.org/10544 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2012-01-19 16:04:24 +0100 message: doc/lispref/emacs-lisp-intro.texi (count-words-in-defun): Fix bug#10544. diff: === modified file 'doc/lispintro/ChangeLog' --- doc/lispintro/ChangeLog 2012-01-19 07:21:25 +0000 +++ doc/lispintro/ChangeLog 2012-01-19 15:04:24 +0000 @@ -1,3 +1,8 @@ +2012-01-19 Juanma Barranquero + + * emacs-lisp-intro.texi (count-words-in-defun): + Add missing parenthesis (bug#10544). + 2012-01-17 Glenn Morris * emacs-lisp-intro.texi (re-search-forward): Fix typo. === modified file 'doc/lispintro/emacs-lisp-intro.texi' --- doc/lispintro/emacs-lisp-intro.texi 2012-01-19 07:21:25 +0000 +++ doc/lispintro/emacs-lisp-intro.texi 2012-01-19 15:04:24 +0000 @@ -15012,7 +15012,7 @@ @group (while (and (< (point) end) (re-search-forward - "\\(\\w\\|\\s_\\)+[^ \t\n]*[ \t\n]*" end t) + "\\(\\w\\|\\s_\\)+[^ \t\n]*[ \t\n]*" end t)) (setq count (1+ count))) @end group @end smallexample ------------------------------------------------------------ revno: 106892 committer: martin rudalics branch nick: trunk timestamp: Thu 2012-01-19 11:38:31 +0100 message: Fix handling of persistent window parameters. * window.c (save_window_save, Fcurrent_window_configuration) (Vwindow_persistent_parameters): Do not use Qstate. Rewrite doc-strings. * window.el (window--state-get-1, window-state-get): Do not use special state value for window-persistent-parameters. Rename argument IGNORE to WRITABLE. Rewrite doc-string. (window--state-put-2): Reset all window parameters to nil before assigning values of persistent parameters. * windows.texi (Window Configurations): Rewrite references to persistent window parameters. (Window Parameters): Fix description of persistent window parameters. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-01-19 07:21:25 +0000 +++ doc/lispref/ChangeLog 2012-01-19 10:38:31 +0000 @@ -1,3 +1,10 @@ +2012-01-19 Martin Rudalics + + * windows.texi (Window Configurations): Rewrite references to + persistent window parameters. + (Window Parameters): Fix description of persistent window + parameters. + 2012-01-16 Juanma Barranquero * windows.texi (Window Parameters): Use @pxref. === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2012-01-19 07:21:25 +0000 +++ doc/lispref/windows.texi 2012-01-19 10:38:31 +0000 @@ -3104,9 +3104,9 @@ @defun current-window-configuration &optional frame This function returns a new object representing @var{frame}'s current window configuration. The default for @var{frame} is the selected -frame. This function saves copies of window parameters listed by the -variable @code{window-persistent-parameters}, see @ref{Window -Parameters} for details. +frame. The variable @code{window-persistent-parameters} specifies +whether and which window parameters are saved by this function, see +@ref{Window Parameters} for details. @end defun @defun set-window-configuration configuration @@ -3214,27 +3214,25 @@ (@code{set-window-configuration} effectively clones the windows of a frame into the root window of that very frame only). -@defun window-state-get &optional window ignore +@defun window-state-get &optional window writable This function returns the state of @var{window} as a Lisp object. The argument @var{window} can be any window and defaults to the root window of the selected frame. -If the optional argument @var{ignore} is non-@code{nil}, this means to +If the optional argument @var{writable} is non-@code{nil}, this means to not use markers for sampling positions like @code{window-point} or @code{window-start}. This argument should be non-@code{nil} when the -state shall be written on disk and read back in another session. +state shall be written to disk and read back in another session. -The variable @code{window-persistent-parameters} specifies whether and -which window parameters are saved by this function, see @ref{Window -Parameters} for details. +Together, the argument @var{writable} and the variable +@code{window-persistent-parameters} specify which window parameters are +saved by this function, see @ref{Window Parameters} for details. @end defun -The value returned by @code{window-state-get} can be converted, using -one of the functions defined by Desktop Save Mode (@pxref{Desktop Save -Mode}), to an object that can be written to a file. Such objects can be -read back and converted to a Lisp object representing the state of the -window. That Lisp object can be used as argument for the following -function in order to restore the state window in another window. +The value returned by @code{window-state-get} can be used in the same +session to make a clone of a window in another window. It can be also +written to disk and read back in another session. In either case, use +the function described next to restore the state of the window. @defun window-state-put state &optional window ignore This function puts the window state @var{state} into @var{window}. The @@ -3281,10 +3279,10 @@ window parameters. This means, that when you change the value of a parameter within the body of a @code{save-window-excursion}, the previous value is not restored upon exit of that macro. It also means -that when you clone via @code{window-state-put} a window state saved -earlier by @code{window-state-get}, the cloned windows come up with no -parameters at all. The following variable allows to override the -standard behavior. +that when you restore via @code{window-state-put} a window state saved +earlier by @code{window-state-get}, all cloned windows have their +parameters reset to @code{nil}. The following variable allows to +override the standard behavior. @defvar window-persistent-parameters This variable is an alist specifying which parameters get saved by @@ -3293,32 +3291,25 @@ @code{window-state-put}, see @ref{Window Configurations}. The @sc{car} of each entry of this alist is the symbol specifying the -parameter. The @sc{cdr} must be one of the following: +parameter. The @sc{cdr} should be one of the following: @table @asis -@item @code{state} -This value means the parameter is saved by @code{window-state-get} -provided its @var{ignore} argument is @code{nil}. The function -@code{current-window-configuration} does not save this parameter. - @item @code{nil} +This value means the parameter is neither saved by +@code{window-state-get} nor by @code{current-window-configuration}. + +@item @code{t} This value specifies that the parameter is saved by -@code{current-window-configuration} and, provided its @var{ignore} +@code{current-window-configuration} and, provided its @var{writable} argument is @code{nil}, by @code{window-state-get}. -@item @code{t} +@item @code{writable} This means that the parameter is saved unconditionally by both @code{current-window-configuration} and @code{window-state-get}. This value should not be used for parameters whose values do not have a read syntax. Otherwise, invoking @code{window-state-put} in another session may fail with an @code{invalid-read-syntax} error. @end table - -Parameters that have been saved are restored to their previous values by -@code{set-window-configuration} respectively are installed by -@code{window-state-put}. Parameters that have not been saved are left -alone by @code{set-window-configuration} respectively are not installed -by @code{window-state-put}. @end defvar Some functions, notably @code{delete-window}, === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-01-19 07:21:25 +0000 +++ lisp/ChangeLog 2012-01-19 10:38:31 +0000 @@ -1,3 +1,11 @@ +2012-01-19 Martin Rudalics + + * window.el (window--state-get-1, window-state-get): Do not use + special state value for window-persistent-parameters. Rename + argument IGNORE to WRITABLE. Rewrite doc-string. + (window--state-put-2): Reset all window parameters to nil before + assigning values of persistent parameters. + 2012-01-18 Alan Mackenzie Eliminate sluggishness and hangs in fontification of "semicolon === modified file 'lisp/window.el' --- lisp/window.el 2012-01-19 07:21:25 +0000 +++ lisp/window.el 2012-01-19 10:38:31 +0000 @@ -3568,7 +3568,7 @@ )) ;;; Window states, how to get them and how to put them in a window. -(defun window--state-get-1 (window &optional ignore) +(defun window--state-get-1 (window &optional writable) "Helper function for `window-state-get'." (let* ((type (cond @@ -3585,29 +3585,22 @@ (normal-height . ,(window-normal-size window)) (normal-width . ,(window-normal-size window t)) (combination-limit . ,(window-combination-limit window)) - ,@(let (list) - ;; Make copies of persistent window parameters whose cdr - ;; is either t or, when IGNORE is non-nil, is either nil - ;; or `state'. - (dolist (pers window-persistent-parameters) - (when (and (consp pers) - (or (eq (cdr pers) t) - (and (memq (cdr pers) '(state nil)) - (not ignore)))) - (let ((par (assq (car pers) (window-parameters window)))) - (setq list (cons (cons (car pers) (when par (cdr par))) - list))))) - ;; Save `clone-of' parameter unless IGNORE or - ;; `window-persistent-parameters' prevail. - (when (and (not (assq 'clone-of (window-parameters window))) - (let ((clone-of - (assq 'clone-of - window-persistent-parameters))) - (when clone-of - (if ignore - (eq (cdr clone-of) t) - (memq (cdr clone-of) '(state nil)))))) - (setq list (cons (cons 'clone-of window) list))) + ,@(let ((parameters (window-parameters window)) + list) + ;; Make copies of those window parameters whose + ;; persistence property is `writable' if WRITABLE is + ;; non-nil and non-nil if WRITABLE is nil. + (dolist (par parameters) + (let ((pers (cdr (assq (car par) + window-persistent-parameters)))) + (when (and pers (or (not writable) (eq pers 'writable))) + (setq list (cons (cons (car par) (cdr par)) list))))) + ;; Add `clone-of' parameter if necessary. + (let ((pers (cdr (assq 'clone-of + window-persistent-parameters)))) + (when (and pers (or (not writable) (eq pers 'writable)) + (not (assq 'clone-of list))) + (setq list (cons (cons 'clone-of window) list)))) (when list `((parameters . ,list)))) ,@(when buffer @@ -3628,31 +3621,34 @@ (scroll-bars . ,(window-scroll-bars window)) (vscroll . ,(window-vscroll window)) (dedicated . ,(window-dedicated-p window)) - (point . ,(if ignore point (copy-marker point))) - (start . ,(if ignore start (copy-marker start))) + (point . ,(if writable point (copy-marker point))) + (start . ,(if writable start (copy-marker start))) ,@(when mark - `((mark . ,(if ignore + `((mark . ,(if writable mark (copy-marker mark)))))))))))) (tail (when (memq type '(vc hc)) (let (list) (setq window (window-child window)) (while window - (setq list (cons (window--state-get-1 window ignore) list)) + (setq list (cons (window--state-get-1 window writable) list)) (setq window (window-right window))) (nreverse list))))) (append head tail))) -(defun window-state-get (&optional window ignore) +(defun window-state-get (&optional window writable) "Return state of WINDOW as a Lisp object. WINDOW can be any window and defaults to the root window of the selected frame. -Optional argument IGNORE non-nil means do not use markers for -sampling positions like `window-point' or `window-start' and do -not record parameters unless `window-persistent-parameters' -requests it. IGNORE should be non-nil when the return value -shall be written to a file and read back in another session. +Optional argument WRITABLE non-nil means do not use markers for +sampling `window-point' and `window-start'. Together, WRITABLE +and the variable `window-persistent-parameters' specify which +window parameters are saved by this function. WRITABLE should be +non-nil when the return value shall be written to a file and read +back in another session. Otherwise, an application may run into +an `invalid-read-syntax' error while attempting to read back the +value from file. The return value can be used as argument for `window-state-put' to put the state recorded here into an arbitrary window. The @@ -3678,7 +3674,7 @@ ;; These are probably not needed. ,@(when (window-size-fixed-p window) `((fixed-height . t))) ,@(when (window-size-fixed-p window t) `((fixed-width . t)))) - (window--state-get-1 window ignore))) + (window--state-get-1 window writable))) (defvar window-state-put-list nil "Helper variable for `window-state-put'.") @@ -3757,15 +3753,13 @@ (state (cdr (assq 'buffer item)))) (when combination-limit (set-window-combination-limit window combination-limit)) - ;; Assign saved window parameters. If a parameter's value is nil, - ;; don't assign it unless the new window has it set already (which - ;; shouldn't happen unless some `window-configuration-change-hook' - ;; function installed it). + ;; Reset window's parameters and assign saved ones (we might want + ;; a `remove-window-parameters' function here). + (dolist (parameter (window-parameters window)) + (set-window-parameter window (car parameter) nil)) (when parameters (dolist (parameter parameters) - (when (or (cdr parameter) - (window-parameter window (car parameter))) - (set-window-parameter window (car parameter) (cdr parameter))))) + (set-window-parameter window (car parameter) (cdr parameter)))) ;; Process buffer related state. (when state ;; We don't want to raise an error here so we create a buffer if === modified file 'src/ChangeLog' --- src/ChangeLog 2012-01-19 07:21:25 +0000 +++ src/ChangeLog 2012-01-19 10:38:31 +0000 @@ -1,3 +1,9 @@ +2012-01-19 Martin Rudalics + + * window.c (save_window_save, Fcurrent_window_configuration) + (Vwindow_persistent_parameters): Do not use Qstate. Rewrite + doc-strings. + 2012-01-19 Kenichi Handa * character.c (char_width): New function. === modified file 'src/window.c' --- src/window.c 2012-01-19 07:21:25 +0000 +++ src/window.c 2012-01-19 10:38:31 +0000 @@ -57,7 +57,7 @@ static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically; static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; static Lisp_Object Qsafe, Qabove, Qbelow; -static Lisp_Object Qauto_buffer_name, Qclone_of, Qstate; +static Lisp_Object Qauto_buffer_name, Qclone_of; static int displayed_window_lines (struct window *); static struct window *decode_window (Lisp_Object); @@ -5889,9 +5889,8 @@ tem = XCDR (tem)) { pers = XCAR (tem); - /* Save values for persistent window parameters whose cdr - is either nil or t. */ - if (CONSP (pers) && (NILP (XCDR (pers)) || EQ (XCDR (pers), Qt))) + /* Save values for persistent window parameters. */ + if (CONSP (pers) && !NILP (XCDR (pers))) { par = Fassq (XCAR (pers), w->window_parameters); if (NILP (par)) @@ -5966,7 +5965,9 @@ point and mark. An exception is made for point in the current buffer: its value is -not- saved. This also records the currently selected frame, and FRAME's focus -redirection (see `redirect-frame-focus'). */) +redirection (see `redirect-frame-focus'). The variable +`window-persistent-parameters' specifies which window parameters are +saved by this function. */) (Lisp_Object frame) { register Lisp_Object tem; @@ -6504,7 +6505,6 @@ DEFSYM (Qbelow, "below"); DEFSYM (Qauto_buffer_name, "auto-buffer-name"); DEFSYM (Qclone_of, "clone-of"); - DEFSYM (Qstate, "state"); staticpro (&Vwindow_list); @@ -6616,28 +6616,28 @@ DEFVAR_LISP ("window-persistent-parameters", Vwindow_persistent_parameters, doc: /* Alist of persistent window parameters. -Parameters in this list are saved by `current-window-configuration' and -`window-state-get' and subsequently restored to their previous values by -`set-window-configuration' and `window-state-put'. +This alist specifies which window parameters shall get saved by +`current-window-configuration' and `window-state-get' and subsequently +restored to their previous values by `set-window-configuration' and +`window-state-put'. The car of each entry of this alist is the symbol specifying the parameter. The cdr is one of the following: -The symbol `state' means the parameter is saved by `window-state-get' -provided its IGNORE argument is nil. `current-window-configuration' -does not save this parameter. - -nil means the parameter is saved by `current-window-configuration' and, -provided its IGNORE argument is nil, by `window-state-get'. - -t means the parameter is saved unconditionally by both -`current-window-configuration' and `window-state-get'. Parameters -without read syntax (like windows or frames) should not use that. +nil means the parameter is neither saved by `window-state-get' nor by +`current-window-configuration'. + +t means the parameter is saved by `current-window-configuration' and, +provided its WRITABLE argument is nil, by `window-state-get'. + +The symbol `writable' means the parameter is saved unconditionally by +both `current-window-configuration' and `window-state-get'. Do not use +this value for parameters without read syntax (like windows or frames). Parameters not saved by `current-window-configuration' or `window-state-get' are left alone by `set-window-configuration' respectively are not installed by `window-state-put'. */); - Vwindow_persistent_parameters = list1 (Fcons (Qclone_of, Qstate)); + Vwindow_persistent_parameters = list1 (Fcons (Qclone_of, Qt)); defsubr (&Sselected_window); defsubr (&Sminibuffer_window); ------------------------------------------------------------ revno: 106891 [merge] committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-01-18 23:21:25 -0800 message: Merge from emacs-23; up to r100655. diff: === modified file 'admin/grammars/python.wy' --- admin/grammars/python.wy 2012-01-05 09:46:05 +0000 +++ admin/grammars/python.wy 2012-01-19 07:21:25 +0000 @@ -1,7 +1,8 @@ ;;; python.wy -- LALR grammar for Python ;; Copyright (C) 2002-2012 Free Software Foundation, Inc. -;; Copyright (C) 2001-2010 Python Software Foundation +;; Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009, 2010 Python Software Foundation; All Rights Reserved ;; Author: Richard Kim ;; Maintainer: Richard Kim === modified file 'admin/grammars/wisent-grammar.el' --- admin/grammars/wisent-grammar.el 2012-01-05 09:46:05 +0000 +++ admin/grammars/wisent-grammar.el 2012-01-19 07:21:25 +0000 @@ -470,13 +470,13 @@ "srecode/srt-wy") ("wisent-javascript-jv-wy.el" "semantic/wisent/js-wy" - "Copyright (C) 1998-2011 Ecma International" + "Copyright (C) 1998-2011 Ecma International." ,wisent-make-parsers--ecmascript-license) ("wisent-java-tags-wy.el" "semantic/wisent/javat-wy") ("wisent-python-wy.el" "semantic/wisent/python-wy" - "Copyright (C) 2001-2010 Python Software Foundation" + "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved." ,wisent-make-parsers--python-license))) (defun wisent-make-parsers () === modified file 'etc/NEWS.23' --- etc/NEWS.23 2012-01-05 09:46:05 +0000 +++ etc/NEWS.23 2012-01-19 07:21:25 +0000 @@ -24,12 +24,22 @@ details and pointers to URLs where the latest libpng can be downloaded. - +* Changes in Specialized Modes and Packages in Emacs 23.4 + +** EDE + +*** New variable `ede-project-directories'. +EDE now refuses to automatically load a project file (Project.ede) +unless the file is in one of the directories specified by this +variable. This reduces the risk of inadvertently loading malicious +project files. The commands `M-x ede-new' and `M-x ede' now offer to +save directories to `ede-project-directories'. + * Changes in Emacs 23.4 on non-free operating systems ** The MS-Windows port can now use more than 500MB of heap. Depending on the available virtual memory, Emacs on Windows can now -have up to 2GB of heap space. This allows, e.g., to visit several +have up to 2GB of heap space. This allows, e.g., visiting several large (> 256MB) files in the same session. === modified file 'lisp/cedet/semantic/wisent/js-wy.el' --- lisp/cedet/semantic/wisent/js-wy.el 2012-01-09 05:48:13 +0000 +++ lisp/cedet/semantic/wisent/js-wy.el 2012-01-19 07:21:25 +0000 @@ -1,7 +1,7 @@ ;;; semantic/wisent/js-wy.el --- Generated parser support file ;; Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. -;; Copyright (C) 1998-2011 Ecma International +;; Copyright (C) 1998-2011 Ecma International. ;; This file is part of GNU Emacs. === modified file 'lisp/cedet/semantic/wisent/python-wy.el' --- lisp/cedet/semantic/wisent/python-wy.el 2012-01-09 05:48:13 +0000 +++ lisp/cedet/semantic/wisent/python-wy.el 2012-01-19 07:21:25 +0000 @@ -1,7 +1,8 @@ ;;; semantic/wisent/python-wy.el --- Generated parser support file ;; Copyright (C) 2002-2004, 2007, 2010-2012 Free Software Foundation, Inc. -;; Copyright (C) 2001-2010 Python Software Foundation +;; Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009, 2010 Python Software Foundation; All Rights Reserved ;; This file is part of GNU Emacs. === modified file 'src/ChangeLog' --- src/ChangeLog 2012-01-16 09:34:41 +0000 +++ src/ChangeLog 2012-01-19 07:21:25 +0000 @@ -1,3 +1,9 @@ +2012-01-19 Kenichi Handa + + * character.c (char_width): New function. + (Fchar_width, c_string_width, lisp_string_width): + Use char_width (Bug#9496). + 2012-01-16 Martin Rudalics * window.c (Vwindow_persistent_parameters): New variable. === modified file 'src/character.c' --- src/character.c 2012-01-05 09:46:05 +0000 +++ src/character.c 2012-01-19 07:21:25 +0000 @@ -308,6 +308,31 @@ } } + +/* Return width (columns) of C considering the buffer display table DP. */ + +static int +char_width (int c, struct Lisp_Char_Table *dp) +{ + int width = CHAR_WIDTH (c); + + if (dp) + { + Lisp_Object disp = DISP_CHAR_VECTOR (dp, c), ch; + int i; + + if (VECTORP (disp)) + for (i = 0, width = 0; i < ASIZE (disp); i++) + { + ch = AREF (disp, i); + if (CHARACTERP (ch)) + width += CHAR_WIDTH (XFASTINT (ch)); + } + } + return width; +} + + DEFUN ("char-width", Fchar_width, Schar_width, 1, 1, 0, doc: /* Return width of CHAR when displayed in the current buffer. The width is measured by how many columns it occupies on the screen. @@ -315,21 +340,11 @@ usage: (char-width CHAR) */) (Lisp_Object ch) { - Lisp_Object disp; int c, width; - struct Lisp_Char_Table *dp = buffer_display_table (); CHECK_CHARACTER (ch); c = XINT (ch); - - /* Get the way the display table would display it. */ - disp = dp ? DISP_CHAR_VECTOR (dp, c) : Qnil; - - if (VECTORP (disp)) - width = sanitize_char_width (ASIZE (disp)); - else - width = CHAR_WIDTH (c); - + width = char_width (c, buffer_display_table ()); return make_number (width); } @@ -350,22 +365,9 @@ while (i_byte < len) { - int bytes, thiswidth; - Lisp_Object val; + int bytes; int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes); - - if (dp) - { - val = DISP_CHAR_VECTOR (dp, c); - if (VECTORP (val)) - thiswidth = sanitize_char_width (ASIZE (val)); - else - thiswidth = CHAR_WIDTH (c); - } - else - { - thiswidth = CHAR_WIDTH (c); - } + int thiswidth = char_width (c, dp); if (precision > 0 && (width + thiswidth > precision)) @@ -447,18 +449,7 @@ else c = str[i_byte], bytes = 1; chars = 1; - if (dp) - { - val = DISP_CHAR_VECTOR (dp, c); - if (VECTORP (val)) - thiswidth = sanitize_char_width (ASIZE (val)); - else - thiswidth = CHAR_WIDTH (c); - } - else - { - thiswidth = CHAR_WIDTH (c); - } + thiswidth = char_width (c, dp); } if (precision <= 0) ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.