emacs-elpa-diffs
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]