# HG changeset patch # User Richard M. Stallman # Date 806103452 0 # Node ID e961f9a213a79c659b86c0025c013b79bcaf0413 # Parent efb59db39da77d55313df457d57279823e07384f (forward-same-syntax): New function. diff -r efb59db39da7 -r e961f9a213a7 lisp/thingatpt.el --- 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 ;; 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))