(define-key map "\C-m" 'elpher-menu-this-window)
(define-key map "o" 'elpher-menu-other-window)
(define-key map "\C-o" 'elpher-menu-switch-other-window)
+ (define-key map "c" 'elpher-menu-copy-current-url)
(define-key map "d" 'Buffer-menu-delete)
(define-key map "k" 'Buffer-menu-delete)
(define-key map "\C-k" 'Buffer-menu-delete)
(t
(error "There's no entry on this line of the menu")))))
+(defun elpher-menu-copy-current-url ()
+ "Copy the URL of the current menu item."
+ (interactive)
+ (let ((data (tabulated-list-get-id)))
+ (cond ((bufferp data)
+ (with-current-buffer data
+ (elpher-copy-page-url elpher-current-page)))
+ ((listp data)
+ (elpher-copy-page-url (nth 2 data)))
+ (t
+ (error "There's no entry on this line of the menu")))))
+
+ (defun elpher-copy-current-url ()
+ "Copy URL of current page to `kill-ring'."
+ (interactive)
+ (elpher-copy-page-url elpher-current-page))
+
(defvar elpher-title nil)
(defun elpher-find-title ()