emacs-devel
[Top][All Lists]
Advanced

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

Make apostrophes invisible in Help buffers


From: Nick Roberts
Subject: Make apostrophes invisible in Help buffers
Date: Mon, 19 Dec 2005 01:10:29 +1300

The patch below works just for symbols and is just for demonstration purposes.
It would also be nice to use the same face as Info for links.  After the
release, info-xref-visited face could also be used help topics previously
visited.

Nick


*** help-mode.el        15 Nov 2005 15:48:05 +1300      1.40
--- help-mode.el        19 Dec 2005 01:02:46 +1300      
***************
*** 381,387 ****
                  (while (re-search-forward help-xref-symbol-regexp nil t)
                    (let* ((data (match-string 8))
                           (sym (intern-soft data)))
!                     (if sym
                          (cond
                           ((match-string 3)  ; `variable' &c
                            (and (or (boundp sym) ; `variable' doesn't ensure
--- 381,387 ----
                  (while (re-search-forward help-xref-symbol-regexp nil t)
                    (let* ((data (match-string 8))
                           (sym (intern-soft data)))
!                     (when sym
                          (cond
                           ((match-string 3)  ; `variable' &c
                            (and (or (boundp sym) ; `variable' doesn't ensure
***************
*** 426,432 ****
                              (cyclic-variable-indirection nil))))
                          (help-xref-button 8 'help-variable sym))
                         ((fboundp sym)
!                         (help-xref-button 8 'help-function sym)))))))
                ;; An obvious case of a key substitution:
                (save-excursion
                  (while (re-search-forward
--- 426,436 ----
                              (cyclic-variable-indirection nil))))
                          (help-xref-button 8 'help-variable sym))
                         ((fboundp sym)
!                         (help-xref-button 8 'help-function sym)))
!                       (let ((start (match-beginning 8))
!                             (end (match-end 8)))
!                       (put-text-property start (1- start) 'invisible t)
!                       (put-text-property end (1+ end) 'invisible t))))))
                ;; An obvious case of a key substitution:
                (save-excursion
                  (while (re-search-forward




reply via email to

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