aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1995-07-18 21:37:32 +0000
committerRichard M. Stallman1995-07-18 21:37:32 +0000
commitfde7326e6db7c2376fb65ef3b8f43ac399421801 (patch)
treec2460a7df8cc4ea8a10e7f7b9dfe814d0047634e /lisp
parent6738479381cd61c7a8ca1e2e3c9616930e29abc1 (diff)
downloademacs-fde7326e6db7c2376fb65ef3b8f43ac399421801.tar.gz
emacs-fde7326e6db7c2376fb65ef3b8f43ac399421801.zip
(forward-same-syntax): New function.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/thingatpt.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index af456e3f698..77cc7352169 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -1,6 +1,6 @@
1;;; thingatpt.el --- Get the `thing' at point 1;;; thingatpt.el --- Get the `thing' at point
2 2
3;; Copyright (C) 1991,1992,1993 Free Software Foundation, Inc. 3;; Copyright (C) 1991,1992,1993,1994,1995 Free Software Foundation, Inc.
4 4
5;; Author: Mike Williams <mikew@gopher.dosli.govt.nz> 5;; Author: Mike Williams <mikew@gopher.dosli.govt.nz>
6;; Keywords: extensions, matching, mouse 6;; Keywords: extensions, matching, mouse
@@ -174,6 +174,18 @@ bounds-of-thing-at-point."
174 (skip-syntax-backward "w_")) 174 (skip-syntax-backward "w_"))
175 (setq ARG (1+ ARG))))) 175 (setq ARG (1+ ARG)))))
176 176
177;;--- Syntax blocks ---
178
179(defun forward-same-syntax (&optional arg)
180 (interactive "p")
181 (while (< arg 0)
182 (skip-syntax-backward
183 (char-to-string (char-syntax (char-after (1- (point))))))
184 (setq arg (1+ arg)))
185 (while (> arg 0)
186 (skip-syntax-forward (char-to-string (char-syntax (char-after (point)))))
187 (setq arg (1- arg))))
188
177;;=== Aliases ============================================================= 189;;=== Aliases =============================================================
178 190
179(defun word-at-point () (thing-at-point 'word)) 191(defun word-at-point () (thing-at-point 'word))