Add support for defun in thingatpt.el
authorDrew Adams <drew.adams@oracle.com>
Thu, 24 Mar 2011 16:38:12 +0000 (00:38 +0800)
committerLeo Liu <sdl.web@gmail.com>
Thu, 24 Mar 2011 16:38:12 +0000 (00:38 +0800)
lisp/ChangeLog
lisp/thingatpt.el

index af2d4ee..5d6b203 100644 (file)
@@ -1,3 +1,7 @@
+2011-03-24  Drew Adams  <drew.adams@oracle.com>
+
+       * thingatpt.el: Support `defun'.
+
 2011-03-23  Leo Liu  <sdl.web@gmail.com>
 
        * abbrevlist.el: Move to obsolete/abbrevlist.el.
index 020faa1..a56c3e4 100644 (file)
@@ -207,6 +207,12 @@ a symbol as a valid THING."
                  (cons opoint end))))
        (error nil)))))
 
+;; Defuns
+
+(put 'defun 'beginning-op 'beginning-of-defun)
+(put 'defun 'end-op       'end-of-defun)
+(put 'defun 'forward-op   'end-of-defun)
+
 ;;  Filenames and URLs  www.com/foo%32bar
 
 (defvar thing-at-point-file-name-chars "-~/[:alnum:]_.${}#%,:"