From 20dbb0c73fda0be1e1e16e89fc3fe4d58bbe2515 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sat, 24 Jan 2009 12:25:36 +0100 Subject: [PATCH] Footnotes: Fix some minor issues. --- lisp/ChangeLog | 6 ++++++ lisp/org-footnote.el | 3 ++- lisp/org.el | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9dbf59f64..fe682e62c 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2009-01-24 Carsten Dominik + * org.el (org-activate-footnote-links): Improve footnote link + highlighting. + + * org-footnote.el (org-footnote-normalize): Fix finding the end of + a footnote definition at the end of the file. + * org-table.el (org-table-get-specials): Add an imagined hline at the end of the table. This can be useful for references that want to go to the end of the table. Also fix bug when computing last diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 10c1e5b05..c49f46867 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -352,7 +352,8 @@ referenced sequence." (re-search-forward (org-re "^[ \t]*$\\|^\\*+ \\|^\\[\\([0-9]+\\|fn:[-_[:word:]]+\\)\\]") nil 'move) - (setq def (buffer-substring beg1 (match-beginning 0))) + (setq def (buffer-substring beg1 (or (match-beginning 0) + (point-max)))) (goto-char beg) (skip-chars-backward " \t\n\t") (delete-region (1+ (point)) (match-beginning 0)))))) diff --git a/lisp/org.el b/lisp/org.el index 0d1a1ccba..f1148621c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -3788,12 +3788,12 @@ will be prompted for." (if (re-search-forward "\\(^\\|[^][]\\)\\(\\[\\([0-9]+\\]\\|fn:[^ \t\r\n:]+?[]:]\\)\\)" limit t) (progn - (add-text-properties (match-beginning 1) (match-end 1) + (add-text-properties (match-beginning 2) (match-end 2) (list 'mouse-face 'highlight 'rear-nonsticky org-nonsticky-props 'keymap org-mouse-map 'help-echo - (if (= (point-at-bol) (match-beginning 1)) + (if (= (point-at-bol) (match-beginning 2)) "Footnote definition" "Footnote reference") )) @@ -4054,7 +4054,7 @@ between words." (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t))) (if (memq 'date lk) '(org-activate-dates (0 'org-date t))) (if (memq 'footnote lk) '(org-activate-footnote-links - (0 'org-footnote t))) + (2 'org-footnote t))) '("^&?%%(.*\\|<%%([^>\n]*?>" (0 'org-sexp-date t)) '(org-hide-wide-columns (0 nil append)) ;; TODO lines