From 9783df21c07728e68b59d380052ed9014f299f17 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 3 Feb 2011 19:21:11 -0800 Subject: [PATCH] f90.el fix for bug#7919. * lisp/progmodes/f90.el (f90-find-tag-default): New function. (f90-mode): Use it for mode's `find-tag-default-function' property. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/f90.el | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b0e901c293a..58d30fc5007 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-02-04 Glenn Morris + + * progmodes/f90.el (f90-find-tag-default): New function. (Bug#7919) + (f90-mode): Use it for mode's `find-tag-default-function' property. + 2011-02-03 Glenn Morris * ibuf-ext.el (ibuffer-filter-disable): Make it work. (Bug#7969) diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index a4a986bd4aa..afdd2f2e1b7 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -2205,6 +2205,16 @@ CHANGE-WORD should be one of 'upcase-word, 'downcase-word, 'capitalize-word." (save-excursion (nth 1 (f90-beginning-of-subprogram)))) +(defun f90-find-tag-default () + "Function to use for `find-tag-default-function' property in F90 mode." + (let ((tag (find-tag-default))) + (or (and tag + ;; See bug#7919. TODO I imagine there are other cases...? + (string-match "%\\(.+\\)" tag) + (match-string-no-properties 1 tag)) + tag))) + +(put 'f90-mode 'find-tag-default-function 'f90-find-tag-default) (defun f90-backslash-not-special (&optional all) "Make the backslash character (\\) be non-special in the current buffer. -- 2.39.2