From 25735317b893fbc0b34bda5135622fcf7d295e8a Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Fri, 10 Mar 2006 16:34:52 +0000 Subject: [PATCH] Refine previous patch. * lisp/muse-mode.el (muse-link-at-point): If muse-colors is loaded, don't ever use the fallback method. Save point when using new method. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-52 --- ChangeLog.2006 | 14 ++++++++++++++ lisp/muse-mode.el | 19 ++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/ChangeLog.2006 b/ChangeLog.2006 index ac28862..8e95d00 100644 --- a/ChangeLog.2006 +++ b/ChangeLog.2006 @@ -2,6 +2,20 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2006/muse--main--1.0 # +2006-03-10 16:34:52 GMT Michael Olson patch-52 + + Summary: + Refine previous patch. + Revision: + muse--main--1.0--patch-52 + + * lisp/muse-mode.el (muse-link-at-point): If muse-colors is loaded, don't + ever use the fallback method. Save point when using new method. + + modified files: + ChangeLog.2006 lisp/muse-mode.el + + 2006-03-10 16:26:53 GMT Michael Olson patch-51 Summary: diff --git a/lisp/muse-mode.el b/lisp/muse-mode.el index 251d14e..83654cb 100644 --- a/lisp/muse-mode.el +++ b/lisp/muse-mode.el @@ -377,16 +377,17 @@ Valid values of OPERATION are 'increase and 'decrease." (here (or pos (point)))) ;; if we are using muse-colors, we can just use link properties to ;; determine whether we are on a link - (if (get-text-property here 'muse-link) - (progn - (when (get-text-property (1- here) 'muse-link) - (goto-char (or (previous-single-property-change here 'muse-link) + (if (featurep 'muse-colors) + (when (get-text-property here 'muse-link) + (save-excursion + (when (get-text-property (1- here) 'muse-link) + (goto-char (or (previous-single-property-change here 'muse-link) (point-min)))) - (if (looking-at muse-explicit-link-regexp) - (progn - (goto-char (match-beginning 1)) - (muse-handle-explicit-link)) - (muse-handle-implicit-link))) + (if (looking-at muse-explicit-link-regexp) + (progn + (goto-char (match-beginning 1)) + (muse-handle-explicit-link)) + (muse-handle-implicit-link)))) ;; use fallback method to find a link (when (or (null pos) (and (char-after pos) -- 2.11.4.GIT