>From ce09b2f80c7ffe29983a44161f1deb1719366e1f Mon Sep 17 00:00:00 2001 From: Denis Washington Date: Mon, 10 Jan 2011 20:57:36 +0100 Subject: [PATCH] change defun* to defun --- smalltalk-mode.el | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/smalltalk-mode.el b/smalltalk-mode.el index 0bd2711..e080806 100644 --- a/smalltalk-mode.el +++ b/smalltalk-mode.el @@ -1148,25 +1148,31 @@ Whitespace is defined as spaces, tabs, and comments." (defun smalltalk-goto-next-keyword () (goto-char (smalltalk-next-keyword))) -(defun* smalltalk-previous-keyword (&key (original-point (point))) +(defun smalltalk-previous-keyword-1 () (smalltalk-backward-whitespace) - (if (looking-back "[>[({.^]") - (progn (goto-char original-point) (point)) + (if (looking-back "[>[({.^]") ;; not really ok when > is sent in a keyword arg + nil (progn (smalltalk-safe-backward-sexp) (if (smalltalk-looking-at-keyword-send) - (prog1 (point) (goto-char original-point)) - (smalltalk-previous-keyword :original-point original-point))))) + (point) + (smalltalk-previous-keyword-1))))) -(defun* smalltalk-next-keyword (&key (original-point (point))) +(defun smalltalk-next-keyword-1 () (smalltalk-forward-whitespace) (if (looking-at "[])}.]") - (progn (goto-char original-point) (point)) + nil (progn (smalltalk-safe-forward-sexp) (skip-chars-forward ":") (if (smalltalk-looking-back-keyword-send) - (prog1 (point) (goto-char original-point)) - (smalltalk-next-keyword :original-point original-point))))) + (point) + (smalltalk-next-keyword-1))))) + +(defun smalltalk-previous-keyword () + (or (save-excursion (smalltalk-previous-keyword-1)) (point))) + +(defun smalltalk-next-keyword () + (or (save-excursion (smalltalk-next-keyword-1)) (point))) (provide 'smalltalk-mode) -- 1.7.3.2