Replace custom fill-or-unfill with unfill package
This commit is contained in:
parent
8388a1ff0c
commit
0713b466a5
@ -836,23 +836,6 @@ A macro for composing functions together to build an interactive command to copy
|
|||||||
(interactive)
|
(interactive)
|
||||||
(up-list) (backward-sexp))
|
(up-list) (backward-sexp))
|
||||||
|
|
||||||
(defun unfill-paragraph (&optional region)
|
|
||||||
"Takes a multi-line paragraph and makes it into a single line of text."
|
|
||||||
(interactive (progn
|
|
||||||
(barf-if-buffer-read-only)
|
|
||||||
(list t)))
|
|
||||||
(let ((fill-column (point-max)))
|
|
||||||
(fill-paragraph nil region)))
|
|
||||||
|
|
||||||
(defun fill-or-unfill-paragraph (&optional unfill region)
|
|
||||||
"Fill paragraph (or REGION). With the prefix argument UNFILL,
|
|
||||||
unfill it instead."
|
|
||||||
(interactive (progn
|
|
||||||
(barf-if-buffer-read-only)
|
|
||||||
(list (if current-prefix-arg 'unfill) t)))
|
|
||||||
(let ((fill-column (if unfill (point-max) fill-column)))
|
|
||||||
(fill-paragraph nil region)))
|
|
||||||
|
|
||||||
(defun frame-exists ()
|
(defun frame-exists ()
|
||||||
(cl-find-if
|
(cl-find-if
|
||||||
(lambda (frame)
|
(lambda (frame)
|
||||||
@ -2152,6 +2135,11 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
|
|||||||
(use-package comment-dwim-2
|
(use-package comment-dwim-2
|
||||||
:bind ("M-;" . comment-dwim-2))
|
:bind ("M-;" . comment-dwim-2))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
*** unfill
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package unfill
|
||||||
|
:bind ("M-q" . unfill-toggle))
|
||||||
|
#+END_SRC
|
||||||
*** string-inflection
|
*** string-inflection
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package string-inflection
|
(use-package string-inflection
|
||||||
@ -3714,7 +3702,6 @@ Go the other way when you use capital O.
|
|||||||
(bind-key "C-x O" (lambda () (interactive) (other-window -1)))
|
(bind-key "C-x O" (lambda () (interactive) (other-window -1)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(bind-key "M-q" 'fill-or-unfill-paragraph)
|
|
||||||
(bind-key "C-c SPC" 'imalison:mark-ring)
|
(bind-key "C-c SPC" 'imalison:mark-ring)
|
||||||
(bind-key "C-x p" 'pop-to-mark-command)
|
(bind-key "C-x p" 'pop-to-mark-command)
|
||||||
(setq set-mark-command-repeat-pop t)
|
(setq set-mark-command-repeat-pop t)
|
||||||
|
Loading…
Reference in New Issue
Block a user