emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] scratch/rfc-mode 476bff817d 42/52: Don't turn the beginning of


From: Stefan Monnier
Subject: [nongnu] scratch/rfc-mode 476bff817d 42/52: Don't turn the beginning of every page into a button
Date: Wed, 12 Oct 2022 16:29:21 -0400 (EDT)

branch: scratch/rfc-mode
commit 476bff817db374f9b02b0ae6813442efbf506fb1
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Nicolas Martyanoff <khaelin@gmail.com>

    Don't turn the beginning of every page into a button
---
 rfc-mode.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/rfc-mode.el b/rfc-mode.el
index d6b4e77573..8710c66187 100644
--- a/rfc-mode.el
+++ b/rfc-mode.el
@@ -264,11 +264,12 @@ Returns t if section is found, nil otherwise."
           (let ((start (match-beginning 0))
                 (end (match-end 0))
                 (number (string-to-number (match-string 1))))
-            (make-text-button start end
-                              'action `(lambda (button)
-                                         (rfc-mode-read ,number))
-                              'help-echo (format "Read RFC %d" number)
-                              'follow-link t)
+            (unless (= start (line-beginning-position))
+              (make-text-button start end
+                                'action `(lambda (button)
+                                           (rfc-mode-read ,number))
+                                'help-echo (format "Read RFC %d" number)
+                                'follow-link t))
             (goto-char end)))))))
 
 (defun rfc-mode-header-start ()



reply via email to

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