emacs-devel
[Top][All Lists]
Advanced

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

Re: Info enhancements


From: Kim F. Storm
Subject: Re: Info enhancements
Date: 09 Dec 2003 12:53:23 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Juri Linkov <address@hidden> writes:

> Eli Zaretskii <address@hidden> writes:
> >> From: Juri Linkov <address@hidden>
> >> Date: Mon, 08 Dec 2003 12:46:00 +0200
> >> 
> >> inserting the text "See" into Info buffers breaks
> >> some Info functions (e.g. `Info-last', `Info-search').
> >
> > You don't need to actually insert "see" into the buffer, you could
> > define an overlay instead.
> 
> Seems overlays don't interact well with the `invisible' property.
> For instance, move point to the beginning of the reference
> with Info-hide-note-references=t and evaluate this code:
> M-: (overlay-put (make-overlay (point) (point)) 'before-string "See ")
> and the reference loses its fontification.

I still think Info-hide-note-references=t is a good default choice
if we can make it work better.  And I think we can.

The following patch seems to work well for me (no lost fontification
of the reference), and it doesn't alter the buffer as before, which
should make references by buffer positions work again.

And copy/paste works at least as well (or equally bad) as before.


*** info.el.~1.374.~    2003-10-06 09:14:21.000000000 +0200
--- info.el     2003-12-09 12:48:04.000000000 +0100
***************
*** 2938,2944 ****
                (goto-char next))
              (if hide-tag
                  (add-text-properties (match-beginning 1) (match-end 1)
!                                      '(invisible t front-sticky nil 
rear-nonsticky t)))
              (add-text-properties
               (match-beginning 2) (match-end 2)
               (cons 'help-echo
--- 2938,2946 ----
                (goto-char next))
              (if hide-tag
                  (add-text-properties (match-beginning 1) (match-end 1)
!                                      (if other-tag
!                                          `(display ,other-tag front-sticky 
nil rear-nonsticky t)
!                                        '(invisible t front-sticky nil 
rear-nonsticky t))))
              (add-text-properties
               (match-beginning 2) (match-end 2)
               (cons 'help-echo
***************
*** 2950,2959 ****
              (when (eq Info-hide-note-references t)
                (add-text-properties (match-beginning 3) (match-end 3)
                                     '(invisible t front-sticky nil 
rear-nonsticky t)))
-             (when other-tag
-               (save-excursion
-                 (goto-char (match-beginning 1))
-                 (insert other-tag)))
              (when (and Info-refill-paragraphs
                         (or hide-tag (eq Info-hide-note-references t)))
                (push (set-marker (make-marker) start)
--- 2952,2957 ----

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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