-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlib.el
27 lines (25 loc) · 1022 Bytes
/
lib.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(defun ae/print-startup-message ()
"Prints welcome message to the current buffer."
(princ (concat "Welcome to ample-emacs!"
"\n\n"
"Today is "
(format-time-string "%B %d %Y")
"\n\n"
"(Started in "
(number-to-string (cadr (time-subtract (current-time)
ae/invokation-time)))
" seconds)")
(get-buffer-create (current-buffer))))
(defun ae/reload-current-file ()
"Reload the file loaded in current buffer from the disk."
(interactive)
(cond (buffer-file-name (progn (find-alternate-file buffer-file-name)
(message "File reloaded")))
(t (message "You're not editing a file!"))))
(defun ae/bind-keys (bindings keymap)
"Applies supplied key-bindings for a particular keymap"
(mapc (lambda (b)
(define-key keymap
(kbd (car b))
(cdr b)))
bindings))