[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/fountain-mode 349436a 16/17: Update fountain-dwim to to
From: |
Paul Rankin |
Subject: |
[elpa] externals/fountain-mode 349436a 16/17: Update fountain-dwim to toggle outline/completion-at-point |
Date: |
Sun, 19 May 2019 09:56:00 -0400 (EDT) |
branch: externals/fountain-mode
commit 349436a3e4c0f1abb612502ef20d391365240fb0
Author: Paul W. Rankin <address@hidden>
Commit: Paul W. Rankin <address@hidden>
Update fountain-dwim to toggle outline/completion-at-point
The auto-upcasing overlay was dumb
---
fountain-mode.el | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/fountain-mode.el b/fountain-mode.el
index f249eac..7f9f5e5 100644
--- a/fountain-mode.el
+++ b/fountain-mode.el
@@ -4032,28 +4032,24 @@ to scene number or point."
(upcase-region (line-beginning-position) (or (match-end 2) (point)))))
(defun fountain-dwim (&optional arg)
- "\\<fountain-mode-map>Call a command based on context (Do What I Mean).
+ "Call a command based on context (Do What I Mean).
-1. If point is at a scene heading or section heading, or within a
- folded scene or section, or if prefixed with ARG, call
- `fountain-outline-cycle' and pass ARG.
+1. If prefixed with ARG, call `fountain-outline-cycle' and pass
+ ARG.
-2. If point is at a directive to an included file, call
- `fountain-find-included-file'.
+2. If point is at the beginning of a scene heading or section
+ heading call `fountain-outline-cycle'.
-3. Otherwise, call `fountain-toggle-auto-upcase'."
+3. Otherwise, call `complation-at-point'."
(interactive "p")
(cond ((and arg (< 1 arg))
(fountain-outline-cycle arg))
+ ((eolp)
+ (completion-at-point))
((or (fountain-match-section-heading)
(fountain-match-scene-heading)
(eq (get-char-property (point) 'invisible) 'outline))
- (fountain-outline-cycle))
- ((and (fountain-match-template)
- (string-match-p "include" (match-string 1)))
- (fountain-find-included-file))
- (t
- (fountain-toggle-auto-upcase))))
+ (fountain-outline-cycle))))
(defun fountain-upcase-line (&optional arg)
"Upcase the line.
- [elpa] externals/fountain-mode updated (7d92f6b -> eef014a), Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode eef014a 17/17: Update README/Commentary/code comments, Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode 349436a 16/17: Update fountain-dwim to toggle outline/completion-at-point,
Paul Rankin <=
- [elpa] externals/fountain-mode 51d3e39 14/17: Fix scene heading regexp grouping for scene numbers, Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode f12e7f0 13/17: Improve completion for scene headings, Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode c1a01e3 12/17: Remove old page-count vars/options, Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode 735561a 15/17: Change scene heading completion to location/suffix completion, Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode cb78fc0 11/17: Bind TAB to fountain-dwim, C-c C-o to fountain-include-find-file, Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode a6a11f8 07/17: Remove fountain page count commands from menu, Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode 5fd879c 09/17: Neaten up fountain menu, Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode 6cdcb2d 10/17: Bump version number, Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode e8a7ecd 08/17: Remove fountain-tab-command from menu, Paul Rankin, 2019/05/19
- [elpa] externals/fountain-mode eb1ae47 06/17: Cleaned up obsolete variable warnings, Paul Rankin, 2019/05/19