Add spacemacs/describe-last-keys

This commit is contained in:
Fabien Dubosson 2016-01-11 21:47:04 +01:00 committed by syl20bnr
parent 2441b5861f
commit 78b8d939f4
3 changed files with 19 additions and 0 deletions

View File

@ -227,4 +227,21 @@
"You can paste it in the gitter chat.\n"
"Check the *Messages* buffer if you need to review it"))))
(defun spacemacs/describe-last-keys ()
"Gathers info about your Emacs last keys and copies to clipboard."
(interactive)
(view-lossage)
(let* ((lossage-buffer "*Help*")
(lossage (format "#### Emacs last keys\n```text\n%s```\n"
(with-current-buffer lossage-buffer
(buffer-string)))))
(kill-buffer lossage-buffer)
(kill-new lossage)
(message lossage)
(message (concat "Information has been copied to clipboard.\n"
(propertize
"PLEASE REVIEW THE DATA BEFORE GOING FURTHER AS IT CAN CONTAIN SENSITIVE DATA (PASSWORD, ...)\n"
'face 'font-lock-warning-face)
"You can paste it in the gitter chat.\n"
"Check the *Messages* buffer if you need to review it"))))
(provide 'core-spacemacs)

View File

@ -1274,6 +1274,7 @@ thusly:
| ~SPC h d F~ | describe a face |
| ~SPC h d k~ | describe a key |
| ~SPC h d K~ | describe a keymap |
| ~SPC h d l~ | copy last pressed keys that you can paste in gitter chat |
| ~SPC h d m~ | describe current modes |
| ~SPC h d p~ | describe a package |
| ~SPC h d s~ | copy system information that you can paste in gitter chat |

View File

@ -108,6 +108,7 @@
"hdc" 'describe-char
"hdf" 'describe-function
"hdk" 'describe-key
"hdl" 'spacemacs/describe-last-keys
"hdp" 'describe-package
"hds" 'spacemacs/describe-system-info
"hdt" 'describe-theme