I have a tool that allows me to use the same key (shortcut) C-c C-f
to call different functions. Actually I can choose different options (different functions) to pass to the LaTeX compiler, binding them to the shortcut C-c C-f
.
Here's my tool (to better clarify my question):
(defun ToggleTexFileBehaviour (&optional COMMAND)
"Description..."
(interactive)
(if COMMAND ;; For inside script use
(define-key latex-mode-map "\C-c\C-f" (intern-soft COMMAND))
;; *ELSE*:
(let ((Latex_setting
(read-string "Choose your option:
"
"tex-file" nil (list "tex-file-eye-comfort"
"tex-file-draft"
"tex-file-boxed-figures"
"tex-file-colored-background"
"tex-file-linenumbers"
"tex-file-showframe"
"tex-file-pagebreaks-highlight"
))))
(define-key latex-mode-map "\C-c\C-f" (intern-soft Latex_setting))
(command-execute (intern-soft Latex_setting))
)
))
(local-set-key (kbd "C-s-c")'ToggleTexFileBehaviour)
My question is how can I call the function binded to my key/shortcut from inside a script? I mean something like:
(call-function-binded-to-key (kbd "C-cC-f"))