[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with my first elisp

From: Orm Finnendahl
Subject: Re: Help with my first elisp
Date: Wed, 25 May 2022 08:35:19 +0200


Am Dienstag, den 24. Mai 2022 um 19:30:40 Uhr (+0200) schrieb Kepa Diez:
> (defun focusJump ()
>   (interactive)
>   (if (equal posicion 1)
>     (focusPointInter)
>       (if (equal posicion 2)
>       (focusPointEnd)
>         (if  (equal posicion 3)
>         (focusPointStart)))))

maybe you want to cleanup a bit:

(defun focusJump (posicion)
  (interactive "nPosicion: ")
  (case posicion
    (1 (focusPointInter))
    (2 (focusPointEnd))
    (3 (focusPointStart))))

BTW: As lisp doesn't distinguish case, it is common practice in lisp
to seperate words in symbols with dashes like 'focus-jump,
'focus-pont-inter, 'focus-point-start, etc.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]