emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3 dots vanish at end of filled line


From: KOBAYASHI Yasuhiro
Subject: Re: 3 dots vanish at end of filled line
Date: Fri, 28 Oct 2005 13:41:03 +0900
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (windows-nt)

In message Re: 3 dots vanish at end of filled line
 on Wed, 12 Oct 2005 15:47:53 -0400
 Stefan Monnier <address@hidden> wrote:

> --- info.el   12 oct 2005 12:46:26 -0400      1.449
> +++ info.el   12 oct 2005 15:42:23 -0400      
> @@ -3698,9 +3698,15 @@
 
>        ;; Fontify titles
>        (goto-char (point-min))
> -      (when not-fontified-p
> -        (while (re-search-forward "\n\\([^ 
> \t\n].+\\)\n\\(\\*\\*+\\|==+\\|--+\\|\\.\\.+\\)$"
> +      (when (and font-lock-mode not-fontified-p)
> +        (while (and (re-search-forward "\n\\([^ 
> \t\n].+\\)\n\\(\\*\\*+\\|==+\\|--+\\|\\.\\.+\\)$"
>                                    nil t)
> +                    ;; Only consider it as an underlined title if the ASCII
> +                    ;; underline has the same size as the text.  A typical
> +                    ;; counter example is when a continuation "..." is alone
> +                    ;; on a line.
> +                    (= (- (match-end 1) (match-beginning 1))
> +                       (- (match-end 2) (match-beginning 2))))
>            (let* ((c (preceding-char))
>                   (face
>                    (cond ((= c ?*) 'info-title-1)

It causes that Japanese titles are not fontified.

How about the following.

--- lisp/info.el.orig   2005-10-28 13:37:47.203249400 +0900
+++ lisp/info.el        2005-10-28 13:03:51.225355900 +0900
@@ -3706,8 +3706,8 @@
                     ;; underline has the same size as the text.  A typical
                     ;; counter example is when a continuation "..." is alone
                     ;; on a line.
-                    (= (- (match-end 1) (match-beginning 1))
-                       (- (match-end 2) (match-beginning 2))))
+                    (= (string-width (match-string 1))
+                       (string-width (match-string 2))))
           (let* ((c (preceding-char))
                  (face
                   (cond ((= c ?*) 'info-title-1)


-- 
KOBAYASHI Yasuhiro <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]