Permalink
Browse files

Insure gimp-space respects delete-selection-mode

  • Loading branch information...
1 parent 2c211d6 commit 24b792d25edf76de1a33b1d82416426f09e1d663 @bgoodr bgoodr committed with Oct 18, 2009
Showing with 9 additions and 1 deletion.
  1. +9 −1 gimp-mode.el
View
10 gimp-mode.el
@@ -724,9 +724,17 @@ buffer."
(t
(if gimp-just-one-space
(just-one-space n)
- (self-insert-command n))
+ ;; Call the self-insert-command to give pre-command-hook's a chance
+ ;; to operate (such as `delete-selection-mode'). See also the
+ ;; setting for 'delete-selection property later on:
+ (call-interactively 'self-insert-command))
(gimp-echo))))
+;; Notify delete-selection-mode that gimp-space should act like what a space
+;; event would do, that is, if/when delete-selection-mode is activated by the
+;; user:
+(put 'gimp-space 'delete-selection t)
+
;;;; Set up the modes
(define-derived-mode gimp-mode scheme-mode "GIMP mode"
"Mode for editing script-fu and interacting with an inferior gimp process."

0 comments on commit 24b792d

Please sign in to comment.