[Top][All Lists]

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

Elisp `set-keys' ("set-keys")

From: Emanuel Berg
Subject: Elisp `set-keys' ("set-keys")
Date: Fri, 27 Dec 2019 02:53:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Okey guys what do you think can be done to
improve this function?

(defun set-keys (ks &optional key path)
  (let ((key      (format "%s%s" (or key  "") (car  ks)))
        (the-path (format "%s%s" (or path "") (cadr ks)))
        (kps (cl-caddr ks)))
    (dolist (kp kps)
      (if (= 2 (length kp))
          (if (functionp (cadr kp))
              (shortcut-to-function key (car kp) (cadr kp))
            (shortcut-to-file key (car kp) (cadr kp) the-path) )
        (set-keys kp key the-path) )))) ; [1]

Pretty solid, or what do you think? No,
seriously. Let me hear it. It isn't that good,
right? What parts should be changed? Can one
change one single thing without breaking it
forever? Be _careful_ because no one can repair
it and this is the only known instance...


underground experts united

reply via email to

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