]> code.delx.au - gnu-emacs/blobdiff - lisp/thingatpt.el
(Man-filter-list): Recognize "Rev" footers.
[gnu-emacs] / lisp / thingatpt.el
index af456e3f6980ac43e5d0334924f60751f33801f3..87deb8c1babaa2ab04f92be5e7e65e331ba4e28f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; thingatpt.el --- Get the `thing' at point
 
-;; Copyright (C) 1991,1992,1993 Free Software Foundation, Inc.
+;; Copyright (C) 1991,1992,1993,1994,1995 Free Software Foundation, Inc.
 
 ;; Author: Mike Williams <mikew@gopher.dosli.govt.nz>
 ;; Keywords: extensions, matching, mouse
@@ -174,13 +174,25 @@ bounds-of-thing-at-point."
          (skip-syntax-backward "w_"))
       (setq ARG (1+ ARG)))))
 
+;;--- Syntax blocks ---
+
+(defun forward-same-syntax (&optional arg)
+  (interactive "p")
+  (while (< arg 0)
+    (skip-syntax-backward 
+     (char-to-string (char-syntax (char-after (1- (point))))))
+    (setq arg (1+ arg)))
+  (while (> arg 0)
+    (skip-syntax-forward (char-to-string (char-syntax (char-after (point)))))
+    (setq arg (1- arg))))
+
 ;;=== Aliases =============================================================
 
 (defun word-at-point () (thing-at-point 'word))
 (defun sentence-at-point () (thing-at-point 'sentence))
 
 (defun read-from-whole-string (STR)
-  "Read a lisp expression from STR, signalling an error if the entire string
+  "Read a lisp expression from STR, signaling an error if the entire string
 was not used."
   (let* ((read-data (read-from-string STR))
         (more-left