[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Combine 2 commands in a toggle-function
From: |
Martin Butz |
Subject: |
Re: Combine 2 commands in a toggle-function |
Date: |
Sat, 13 Oct 2012 15:02:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18) Gecko/20081125 Thunderbird/2.0.0.18 Mnenhy/0.7.5.0 |
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
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, mb@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~