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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/sketch-mode 02b1c05 14/15: Ready for publish :tada: (sm


From: ELPA Syncer
Subject: [elpa] externals/sketch-mode 02b1c05 14/15: Ready for publish :tada: (small fixes + sketch Quit)
Date: Wed, 20 Oct 2021 05:57:37 -0400 (EDT)

branch: externals/sketch-mode
commit 02b1c05843225db211067204f35d018e175d047f
Author: Daniel Nicolai <dalanicolai@gmail.com>
Commit: Daniel Nicolai <dalanicolai@gmail.com>

    Ready for publish :tada: (small fixes + sketch Quit)
    
    This commit fixes the first very reasonably usable version of sketch-mode,
    although still more or less everywhere documentation needs to be added.
---
 README.org     |  7 ++++---
 sketch-mode.el | 18 +++++++++++++-----
 2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/README.org b/README.org
index 7d39a01..9cb7585 100644
--- a/README.org
+++ b/README.org
@@ -24,9 +24,10 @@
   functionalities easily so that the package becomes ever more versatile. Users
   can also contribute by creating SVG snippets (in a separate repo, or create a
   PR). Any feedback, for example suggestions for enhancing the
-  interface/usability, is very welcome (probably best by opening an issue).
-  Also, any contributions are very welcome. The code of the package is very
-  accessible (especially if you quickly read how to use 
[[https://www.gnu.org/software/emacs/manual/html_node/elisp/Edebug.html][edebug]]).
+  interface/usability (and of course bug reports), is very welcome (probably
+  best by opening an issue). Also, any contributions are very welcome. The code
+  of the package is very accessible (especially if you quickly read how to use
+  
[[https://www.gnu.org/software/emacs/manual/html_node/elisp/Edebug.html][edebug]]).
 
   A list of ideas for implementation can be found in the preliminary comment in
   the =sketch.el= file and additionally in the 
[[https://github.com/dalanicolai/sketch-mode/wiki/vision][wiki]] section.
diff --git a/sketch-mode.el b/sketch-mode.el
index 56ef706..6572349 100644
--- a/sketch-mode.el
+++ b/sketch-mode.el
@@ -4,7 +4,7 @@
 
 ;; Author: D.L. Nicolai <dalanicolai@gmail.com>
 ;; Created: 17 Jul 2021
-;; Version: 0
+;; Version: 1.0
 
 ;; Keywords: multimedia
 ;; URL: https://github.com/dalanicolai/sketch-mode
@@ -425,6 +425,7 @@ If value of variable ‘sketch-show-labels' is ‘layer', 
create ..."
     (goto-char (point-min)) ; cursor over image looks better
     (setq sketch-im-x-offset (car (window-absolute-pixel-position)))
     (sketch-toggle-toolbar)
+    (when (featurep 'hydra) (hydra-sketch/body))
     (add-hook 'kill-buffer-hook 'sketch-kill-toolbar nil t)
     (special-mode)
     (sketch-mode)))
@@ -535,7 +536,9 @@ _sd_: dasharray   ^ ^               _u_/_U_: undo/redo    
_tc_: coords
    ("tc" sketch-toggle-coords)
    ("?" sketch-help "help" :color blue)
    ("." nil  "exit hydra" :color blue :exit t)
-   ("q" sketch-quit-window "quit-restore" :exit t)))
+   ("q" sketch-quit-window "quit-restore" :exit t)
+   ("Q" sketch-quit "quit" :exit t)))
+
 
 (defun sketch-hydra ()
   (interactive)
@@ -546,15 +549,20 @@ _sd_: dasharray   ^ ^               _u_/_U_: undo/redo    
_tc_: coords
 (define-key sketch-mode-map "." 'sketch-hydra)
 
 (defun sketch-quit-window ()
+  "Quit sketch window. The window can be restores with ‘M-x sketch'"
   (interactive)
   (when (get-buffer "*sketch-toolbar*")
     (kill-buffer "*sketch-toolbar*"))
   (quit-window))
 
-(when (boundp 'spacemacs-version)
-  (evil-define-minor-mode-key 'evilified sketch-mode "l" 'sketch-cycle-labels))
+(defun sketch-quit ()
+  "Quit sketch-mode and kill buffers."
+  (interactive)
+  (when (get-buffer "*sketch-toolbar*")
+    (kill-buffer "*sketch-toolbar*"))
+  (kill-buffer "*sketch*"))
 
-;;; 
+;;; Actions
 (defvar sketch-action 'line)
 (defvar sketch-stroke-color "Black")
 (defvar sketch-fill-color "none")



reply via email to

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