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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Emacs - Help mailing list
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...


[1] https://dataswamp.org/~incal/emacs-init/navigate-fs-keys.el

--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal