emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/subr.el


From: Nick Roberts
Subject: [Emacs-diffs] Changes to emacs/lisp/subr.el
Date: Wed, 10 May 2006 00:32:34 +0000

Index: emacs/lisp/subr.el
diff -u emacs/lisp/subr.el:1.507 emacs/lisp/subr.el:1.508
--- emacs/lisp/subr.el:1.507    Sun May  7 20:49:01 2006
+++ emacs/lisp/subr.el  Wed May 10 00:32:34 2006
@@ -1956,6 +1956,13 @@
   "Return non-nil if OBJECT is one of the two canonical boolean values: t or 
nil."
   (memq object '(nil t)))
 
+(defun field-at-point (pos)
+  "Return the field at position POS, taking stickiness etc into account"
+  (let ((raw-field (get-char-property (field-beginning pos) 'field)))
+    (if (eq raw-field 'boundary)
+       (get-char-property (1- (field-end pos)) 'field)
+      raw-field)))
+
 
 ;;;; Support for yanking and text properties.
 




reply via email to

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