Move locally-enable-double-spaces to editing lib

This commit is contained in:
Tom Willemse 2015-12-17 01:27:39 +01:00
parent bc6c5394ac
commit 44a8d0139d
2 changed files with 6 additions and 5 deletions

View file

@ -141,10 +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:locally-enable-double-spaces ()
"Specify that two spaces end a sentence in the current buffer."
(setq-local sentence-end-double-space t))
(defun oni:lua-mode-func() (defun oni:lua-mode-func()
"Function for `lua-mode-hook'." "Function for `lua-mode-hook'."
(local-unset-key (kbd ")")) (local-unset-key (kbd ")"))
@ -1012,7 +1008,7 @@ If no direction is given, don't split."
ac-source-functions ac-source-functions
ac-source-variables ac-source-variables
ac-source-symbols))) ac-source-symbols)))
#'oni:locally-enable-double-spaces #'oni:set-emacs-lisp-symbols 'oni:locally-enable-double-spaces #'oni:set-emacs-lisp-symbols
#'paredit-mode #'eldoc-mode #'oni:set-emacs-lisp-keys) #'paredit-mode #'eldoc-mode #'oni:set-emacs-lisp-keys)
(oni:add-hooks 'eshell-mode-hook (oni:add-hooks 'eshell-mode-hook

View file

@ -65,6 +65,11 @@
(mark-defun) (mark-defun)
(indent-region (region-beginning) (region-end)))) (indent-region (region-beginning) (region-end))))
;;;###autoload
(defun oni:locally-enable-double-spaces ()
"Specify that two spaces end a sentence in the current buffer."
(setq-local sentence-end-double-space t))
;;;###autoload ;;;###autoload
(defun oni:upcase-prev (num) (defun oni:upcase-prev (num)
(interactive "p") (interactive "p")