[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7229: patch

From: Thibault Kruse
Subject: bug#7229: patch
Date: Sun, 24 Oct 2010 21:06:50 +0200


i dont know where the ffap sources are in emacs 23.1, therefore I could not 
write a patch myself, but as a workaround, I created this advice. Maybe it can 

(require 'advice)
(defadvice ffap-file-at-point (around bugfix-ffap  activate)
  "returns nil when point is somewhere we do not want to guess filenames"
  (require 'thingatpt)
;;; prevent in javadoc style comments
  (narrow-to-region (line-beginning-position) (line-end-position))
  (unless (or
           (thing-at-point-looking-at "[\\*]+")
           ;; for xml modes, not sure about other modes
           (and (member major-mode '(sgml-mode nxml-mode))
                ;; ignore about <somenode/> and </somenode>
                (or (thing-at-point-looking-at "</?[a-zA-Z_][a-zA-Z0-9:_.-]+")
                    (thing-at-point-looking-at "/>"))))

GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl

reply via email to

[Prev in Thread] Current Thread [Next in Thread]