Move reload-buffer to editing library

This commit is contained in:
Tom Willemse 2015-12-18 01:17:59 +01:00
parent bcf5e2150d
commit 636c985bdd
2 changed files with 7 additions and 6 deletions

View file

@ -141,11 +141,6 @@ MODE1 is enabled and vice-versa."
"Set the `disabled' property for each item in FUNCTIONS to nil." "Set the `disabled' property for each item in FUNCTIONS to nil."
(mapc #'(lambda (f) (put f 'disabled nil)) functions)) (mapc #'(lambda (f) (put f 'disabled nil)) functions))
(defun oni:reload-buffer ()
"Reload current buffer."
(interactive)
(revert-buffer nil t nil))
(defun oni:request-pull () (defun oni:request-pull ()
"Start a mail to request pulling from a git repository." "Start a mail to request pulling from a git repository."
(interactive) (interactive)
@ -910,7 +905,7 @@ If no direction is given, don't split."
(global-set-key (kbd "<XF86HomePage>") 'oni:raise-scratch) (global-set-key (kbd "<XF86HomePage>") 'oni:raise-scratch)
(global-set-key (kbd "<XF86Mail>") 'gnus) (global-set-key (kbd "<XF86Mail>") 'gnus)
(global-set-key (kbd "<f10>") 'git-project-show-files) (global-set-key (kbd "<f10>") 'git-project-show-files)
(global-set-key (kbd "<f5>") #'oni:reload-buffer) (global-set-key (kbd "<f5>") 'oni:reload-buffer)
(global-set-key (kbd "<f7>") 'magit-status) (global-set-key (kbd "<f7>") 'magit-status)
(global-set-key (kbd "<f8>") 'oni:raise-eshell) (global-set-key (kbd "<f8>") 'oni:raise-eshell)
(global-set-key (kbd "<hiragana>") 'oni:show-org-index) (global-set-key (kbd "<hiragana>") 'oni:show-org-index)

View file

@ -98,6 +98,12 @@
"Specify that two spaces end a sentence in the current buffer." "Specify that two spaces end a sentence in the current buffer."
(setq-local sentence-end-double-space t)) (setq-local sentence-end-double-space t))
;;;###autoload
(defun oni:reload-buffer ()
"Reload current buffer."
(interactive)
(revert-buffer nil t nil))
;;;###autoload ;;;###autoload
(defun oni:upcase-prev (num) (defun oni:upcase-prev (num)
(interactive "p") (interactive "p")