* lisp/time.el (world-clock-copy-time-as-kill): New command.
(world-clock-mode-map): Bind above new command to "w".
*** 'outlineify-sticky' command is renamed to 'allout-outlinify-sticky'.
The old name is still available as an obsolete function alias.
+---
+*** New command 'world-clock-copy-time-as-kill' for 'M-x world-clock'.
+It copies the current line into the kill ring.
+
---
*** 'edit-abbrevs' now uses font-locking.
The new face 'abbrev-table-name' is used to display the abbrev table
(defvar-keymap world-clock-mode-map
"n" #'next-line
- "p" #'previous-line)
+ "p" #'previous-line
+ "w" #'world-clock-copy-time-as-kill)
+
+(defun world-clock-copy-time-as-kill ()
+ "Copy current line into the kill ring."
+ (interactive nil world-clock-mode)
+ (when-let ((str (buffer-substring-no-properties (pos-bol) (pos-eol))))
+ (kill-new str)
+ (message str)))
(define-derived-mode world-clock-mode special-mode "World clock"
"Major mode for buffer that displays times in various time zones.