From ec118d93bb1238dfa26be1145c41e2a91b007dd3 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Tue, 9 May 2006 00:55:02 +0000 Subject: [PATCH] Fix a couple of beginning-of-buffer errors. * muse-mode.el (muse-mode-flyspell-p, muse-link-at-point): Make sure we don't throw an error if at the beginning of the buffer. Thanks to John Sullivan for the report. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-124 --- ChangeLog.2006 | 15 +++++++++++++++ lisp/muse-mode.el | 8 +++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ChangeLog.2006 b/ChangeLog.2006 index b48d563..09e7852 100644 --- a/ChangeLog.2006 +++ b/ChangeLog.2006 @@ -2,6 +2,21 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2006/muse--main--1.0 # +2006-05-09 00:55:02 GMT Michael Olson patch-124 + + Summary: + Fix a couple of beginning-of-buffer errors. + Revision: + muse--main--1.0--patch-124 + + * muse-mode.el (muse-mode-flyspell-p, muse-link-at-point): Make sure we + don't throw an error if at the beginning of the buffer. Thanks to John + Sullivan for the report. + + modified files: + ChangeLog.2006 lisp/muse-mode.el + + 2006-05-08 23:42:42 GMT Michael Olson patch-123 Summary: diff --git a/lisp/muse-mode.el b/lisp/muse-mode.el index b5b7eb5..fae24a4 100644 --- a/lisp/muse-mode.el +++ b/lisp/muse-mode.el @@ -266,7 +266,8 @@ fill mode." Otherwise return nil. This is used to keep links from being improperly colorized by flyspell." - (and (not (get-text-property (1- (point)) 'muse-link)) + (and (not (get-text-property (if (bobp) (point) (1- (point))) + 'muse-link)) (save-match-data (null (muse-link-at-point))))) @@ -430,9 +431,10 @@ Valid values of OPERATION are 'increase and 'decrease." (if (featurep 'muse-colors) (when (get-text-property here 'muse-link) (save-excursion - (when (get-text-property (1- here) 'muse-link) + (when (and (not (bobp)) + (get-text-property (1- here) 'muse-link)) (goto-char (or (previous-single-property-change here 'muse-link) - (point-min)))) + (point-min)))) (if (looking-at muse-explicit-link-regexp) (progn (goto-char (match-beginning 1)) -- 2.11.4.GIT