branch: scratch/rfc-mode
commit 476bff817db374f9b02b0ae6813442efbf506fb1
Author: Jonas Bernoulli <[email protected]>
Commit: Nicolas Martyanoff <[email protected]>
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 ()