[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 08e7be7 02/26: fix: DARKROOM-CONFIRM-FILL-PARAGRAPH -> DAR
From: |
João Távora |
Subject: |
[elpa] master 08e7be7 02/26: fix: DARKROOM-CONFIRM-FILL-PARAGRAPH -> DARKROOM-FILL-PARAGRAPH-MAYBE |
Date: |
Fri, 19 Dec 2014 19:07:23 +0000 |
branch: master
commit 08e7be7c6f24cb21c06f0adab93c92a0819af874
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
fix: DARKROOM-CONFIRM-FILL-PARAGRAPH -> DARKROOM-FILL-PARAGRAPH-MAYBE
---
darkroom.el | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/darkroom.el b/darkroom.el
index e1c59c0..3a3a4c3 100644
--- a/darkroom.el
+++ b/darkroom.el
@@ -56,15 +56,20 @@ changing window or by calling `darkroom-set-margins'")
(setq darkroom-margins (- darkroom-margins 0.05))
(darkroom-set-margins)))
-(defun darkroom-confirm-fill-paragraph ()
- (interactive)
- (when (yes-or-no-p "Really fill paragraph?")
- (call-interactively 'fill-paragraph)))
+(defun darkroom-fill-paragraph-maybe (really)
+ (interactive "P")
+ (cond (visual-line-mode
+ (if (not really)
+ (message "not filling paragraph")
+ (call-interactively 'fill-paragraph)
+ (message "filled paragraph even in visual-line-mode")))
+ (t
+ (call-interactively 'fill-paragraph))))
(defvar darkroom-minor-mode-map (let ((map (make-sparse-keymap)))
(define-key map (kbd "C-M-+")
'darkroom-increase-margins)
(define-key map (kbd "C-M--")
'darkroom-decrease-margins)
- (define-key map (kbd "M-q")
'darkroom-confirm-fill-paragraph)
+ (define-key map (kbd "M-q")
'darkroom-fill-paragraph-maybe)
map))
(defvar darkroom-saved-mode-line-format nil)
- [elpa] master updated (cbfc00f -> 96e61a9), João Távora, 2014/12/19
- [elpa] master 08e7be7 02/26: fix: DARKROOM-CONFIRM-FILL-PARAGRAPH -> DARKROOM-FILL-PARAGRAPH-MAYBE,
João Távora <=
- [elpa] master 8d2ec73 03/26: fix: save HEADER-LINE-FORMAT as well, João Távora, 2014/12/19
- [elpa] master 21a7919 04/26: first commit, João Távora, 2014/12/19
- [elpa] master 4dc83ad 05/26: darkroom-mode added, João Távora, 2014/12/19
- [elpa] master c6e0c3a 07/26: Leave darkroom-mode when leaving tentative-mode, João Távora, 2014/12/19
- [elpa] master 744d72a 08/26: Add .gitignore, João Távora, 2014/12/19
- [elpa] master 9cd8dfd 06/26: Now works with multiple windows for same darkroom buffer, João Távora, 2014/12/19
- [elpa] master 786b5a3 10/26: Integrate another comment from Rasmus, João Távora, 2014/12/19
- [elpa] master 6cbfebe 09/26: Integrate some comments from Rasmus, João Távora, 2014/12/19
- [elpa] master b36123e 11/26: Tidy up margin calculation, João Távora, 2014/12/19
- [elpa] master a16a665 01/26: Initial commit, João Távora, 2014/12/19