diff --git a/etc/init.lisp b/etc/init.lisp index 5e99144..592dbb7 100644 --- a/etc/init.lisp +++ b/etc/init.lisp @@ -581,9 +581,11 @@ (defun copy-to-clipboard (window) (ui:copy-link-to-clipboard window)) -(define-key "C-c" (lambda () - (copy-link-to-clipboard specials:*open-attach-window*)) - *open-attach-keymap*) +(defun copy-from-attach-window-to-clipboard () + "Copy the selected link to clipboard" + (copy-link-to-clipboard specials:*open-attach-window*)) + +(define-key "C-c" #'copy-from-attach-window-to-clipboard *open-attach-keymap*) (define-key "C-J" #'open-message-attach-perform-opening *open-attach-keymap*) @@ -603,9 +605,11 @@ (define-key "C-J" #'open-message-link-perform-opening *open-message-link-keymap*) -(define-key "C-c" (lambda () - (copy-link-to-clipboard specials:*open-message-link-window*)) - *open-message-link-keymap*) +(defun copy-from-message-link-to-clipboard () + "Copy the selected link to clipboard" + (copy-link-to-clipboard specials:*open-message-link-window*)) + +(define-key "C-c" #'copy-from-message-link-to-clipboard *open-message-link-keymap*) (define-key "up" #'open-message-link-go-up *open-message-link-keymap*) diff --git a/src/misc-utils.lisp b/src/misc-utils.lisp index c990472..41f88ff 100644 --- a/src/misc-utils.lisp +++ b/src/misc-utils.lisp @@ -118,12 +118,13 @@ (defun function-name (data) "Implementation dependent" (assert (functionp data)) - (multiple-value-bind (x y name) - (function-lambda-expression data) - (declare (ignore x y)) - (if name - (string-downcase (symbol-name name)) - data))) + (conditions:with-default-on-error ((_ "Anonymous function")) + (multiple-value-bind (x y name) + (function-lambda-expression data) + (declare (ignore x y)) + (if name + (string-downcase (symbol-name name)) + data)))) (defmacro fn-delay (a) (if (symbolp a)