emacs-devel
[Top][All Lists]
Advanced

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

Re: Hiding *Note:: "tags" in info files


From: Kim F. Storm
Subject: Re: Hiding *Note:: "tags" in info files
Date: 31 Oct 2002 00:51:44 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

>     The result isn't perfect, since the wording around some of the nodes
>     become a bit sparse, e.g. (upper case indicates highlighting)
> 
>        *Note GETTING A PRINTED MANUAL::, if you would like a paper copy of
>     the Emacs manual.
> 
>     (which isn't perfect English either) becomes
> 
>        GETTING A PRINTED MANUAL, if you would like a paper copy of
>     the Emacs manual.
> 
> In the printed output, we would put "See " at the beginning".
> Perhaps you can use a before-string to insert "See " before
> the xref text.

The following improved patch does that for *Note but not for *note.

BTW, should it handle *note Item: Section. differently from *note Item:: 
(e.g. by hiding the Section part)?

In any case, there are many incorrect uses of *Note: in the info files,
so you will still see a some "see See ..." occurrences.


Index: info.el
===================================================================
RCS file: /cvs/emacs/lisp/info.el,v
retrieving revision 1.318
diff -c -r1.318 info.el
*** info.el     8 Oct 2002 04:57:27 -0000       1.318
--- info.el     30 Oct 2002 15:47:22 -0000
***************
*** 2712,2724 ****
            (add-text-properties (match-beginning 2) (1+ (match-end 2))
                                 '(invisible t intangible t))))
        (goto-char (point-min))
!       (while (re-search-forward "\\*Note[ \n\t]+\\([^:]*\\):" nil t)
          (if (= (char-after (1- (match-beginning 0))) ?\") ; hack
              nil
            (add-text-properties (match-beginning 1) (match-end 1)
                                 '(font-lock-face info-xref
                                   mouse-face highlight
!                                  help-echo "mouse-2: go to this node"))))
        (goto-char (point-min))
        (if (and (search-forward "\n* Menu:" nil t)
                 (not (string-match "\\<Index\\>" Info-current-node))
--- 2712,2731 ----
            (add-text-properties (match-beginning 2) (1+ (match-end 2))
                                 '(invisible t intangible t))))
        (goto-char (point-min))
!       (while (re-search-forward "\\(\\*Note[ \n\t]+\\)\\([^:]*\\)\\(:+\\)" 
nil t)
          (if (= (char-after (1- (match-beginning 0))) ?\") ; hack
              nil
            (add-text-properties (match-beginning 1) (match-end 1)
+                                (if (= (char-after (1+ (match-beginning 1))) 
?N)
+                                    '(display "See ")
+                                  '(invisible t)))
+           (add-text-properties (match-beginning 2) (match-end 2)
                                 '(font-lock-face info-xref
                                   mouse-face highlight
!                                  help-echo "mouse-2: go to this node"))
!           (add-text-properties (match-beginning 3) (match-end 3)
!                                '(invisible t))))
! 
        (goto-char (point-min))
        (if (and (search-forward "\n* Menu:" nil t)
                 (not (string-match "\\<Index\\>" Info-current-node))


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





reply via email to

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