help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Combine 2 commands in a toggle-function


From: Andreas Röhler
Subject: Re: Combine 2 commands in a toggle-function
Date: Sat, 13 Oct 2012 15:19:38 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120825 Thunderbird/15.0

Am 13.10.2012 15:02, schrieb Martin Butz:
Hello Andreas,

thanks for the code!

Am 13.10.2012 13:46, schrieb Andreas Röhler:
(defvar my-toggled-commands-p nil
   "When switched on, commands are run ")

(defun my-commands-toggle ()
   (interactive)
   (if my-toggled-commands-p
       (progn
         (setq my-toggled-commands-p nil)
         (message "%s" "my-toggled-commands-p switched off"))
     (message "%s" "Running my-toggled-commands")
     (setq my-toggled-commands-p t)
     (funcall 'FIRST)
     (funcall 'SECOND)))

WRT the the function called, you might need to figure out the details, which 
arguments to pass etc.

Yes. This way 'kill-buffer-other-window does obviously not know, which 
frame/buffer to kill. I will have to start learning lisp to stand on my own 
feet.

Thanks
Martin


maybe someone at

address@hidden

will figure it out for the moment.

Good luck,

Andreas




reply via email to

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