Hi,
With today's git master, smalltalk-mode stopped working for me with Emacs 23 (void-variable smalltalk-previous-keyword). After a little investigation, I found what seems to be a simple typo in today's changes to smalltalk-mode.el: (defun* smalltalk-previous-keyword ... (defun* smalltalk-next-keyword ... Removing the '*' symbol from both function definitions removed the problem and makes smalltalk-mode work again from me. A patch is attached. Regards, Denis _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk smalltalk-mode.diff (993 bytes) Download Attachment |
Hi Denis
On Jan 10, 2011, at 8:11 PM, Denis Washington wrote: > Hi, > > With today's git master, smalltalk-mode stopped working for me with Emacs 23 (void-variable smalltalk-previous-keyword). After a little investigation, I found what seems to be a simple typo in today's changes to smalltalk-mode.el: > > (defun* smalltalk-previous-keyword ... > > (defun* smalltalk-next-keyword ... > > Removing the '*' symbol from both function definitions removed the problem and makes smalltalk-mode work again from me. A patch is attached. defun* is provided by cl so I suggest this instead: diff --git a/smalltalk-mode.el b/smalltalk-mode.el index fc2a587..7284900 100644 --- a/smalltalk-mode.el +++ b/smalltalk-mode.el @@ -25,6 +25,8 @@ ;;; Incorporates Frank Caggiano's changes for Emacs 19. ;;; Updates and changes for Emacs 20 and 21 by David Forster +(require 'cl) + ;; ===[ Variables and constants ]===================================== (defvar smalltalk-name-regexp "[A-z][A-z0-9_]*" You can fetch it from my repository: rev: cdff882 https://github.com/mathk/smalltalk/commit/cdff882 Let me know if that fix the issue. > > Regards, > Denis > <smalltalk-mode.diff>_______________________________________________ > help-smalltalk mailing list > [hidden email] > http://lists.gnu.org/mailman/listinfo/help-smalltalk Mathieu __________________________________________________ Do You Yahoo!? En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités http://mail.yahoo.fr Yahoo! Mail _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
On 10.01.2011 20:58, Mathieu Suen wrote:
> Hi Denis > > On Jan 10, 2011, at 8:11 PM, Denis Washington wrote: > >> Hi, >> >> With today's git master, smalltalk-mode stopped working for me with Emacs 23 (void-variable smalltalk-previous-keyword). After a little investigation, I found what seems to be a simple typo in today's changes to smalltalk-mode.el: >> >> (defun* smalltalk-previous-keyword ... >> >> (defun* smalltalk-next-keyword ... >> >> Removing the '*' symbol from both function definitions removed the problem and makes smalltalk-mode work again from me. A patch is attached. > defun* is provided by cl so I suggest this instead: > diff --git a/smalltalk-mode.el b/smalltalk-mode.el > index fc2a587..7284900 100644 > --- a/smalltalk-mode.el > +++ b/smalltalk-mode.el > @@ -25,6 +25,8 @@ > ;;; Incorporates Frank Caggiano's changes for Emacs 19. > ;;; Updates and changes for Emacs 20 and 21 by David Forster > > +(require 'cl) > + > ;; ===[ Variables and constants ]===================================== > > (defvar smalltalk-name-regexp "[A-z][A-z0-9_]*" > > You can fetch it from my repository: > rev: > cdff882 https://github.com/mathk/smalltalk/commit/cdff882 > > Let me know if that fix the issue. It does. So it's no typo after all... thanks for pointing this out. Denis _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
On 01/10/2011 09:32 PM, Denis Washington wrote:
>> Let me know if that fix the issue. > > It does. So it's no typo after all... thanks for pointing this out. Yeah, sorry for applying the patch too fast. I'm changing instead smalltalk-mode.el to use save-excursion. Since the original-point keyword argument is only used to restore it on exit, and it always does this, you can replace (if ... (progn (goto-char original-point) (point)) (prog1 (point) (goto-char original-point))) with (or (save-excursion (if ... nil (point))) (point) (This seems more complicated, but the "if" is inside its own function so it's not bad). Can anybody suggest a shortcut for smalltalk-goto-{previous,next}-keyword? It seems relatively useful even in day-to-day use. Paolo _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk 0001-change-defun-to-defun.patch (1K) Download Attachment |
Hi Paolo,
> De : Paolo Bonzini <[hidden email]> > > On 01/10/2011 09:32 PM, Denis Washington wrote: > >> Let me know if that fix the issue. > > > > It does. So it's no typo after all... thanks for pointing this out. > > Yeah, sorry for applying the patch too fast. I'm changing instead >smalltalk-mode.el to use save-excursion. Since the original-point keyword >argument is only used to restore it on exit, and it always does this, you can >replace > > (if ... > (progn (goto-char original-point) (point)) > (prog1 (point) (goto-char original-point))) > > with > > (or (save-excursion > (if ... > nil > (point))) > (point) Yes that seems more reasonable. For a shortcut I propose: C-c f (forward) C-c b (backward) > > (This seems more complicated, but the "if" is inside its own function so it's >not bad). > > Can anybody suggest a shortcut for smalltalk-goto-{previous,next}-keyword? It >seems relatively useful even in day-to-day use. > > Paolo > _______________________________________________ help-smalltalk mailing list [hidden email] http://lists.gnu.org/mailman/listinfo/help-smalltalk |
Free forum by Nabble | Edit this page |