Mercurial > emacs
changeset 12593:e961f9a213a7
(forward-same-syntax): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 18 Jul 1995 21:37:32 +0000 |
parents | efb59db39da7 |
children | 1d30a1c68e44 |
files | lisp/thingatpt.el |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/thingatpt.el Tue Jul 18 21:37:14 1995 +0000 +++ b/lisp/thingatpt.el Tue Jul 18 21:37:32 1995 +0000 @@ -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,6 +174,18 @@ (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))