Browse files

Insure gimp-space respects delete-selection-mode

  • Loading branch information...
1 parent 2c211d6 commit d2f45eba507c1613c646031965804227b267b43c @bgoodr bgoodr committed with Oct 18, 2009
Showing with 9 additions and 1 deletion.
  1. +9 −1 gimp-mode.el
@@ -724,9 +724,17 @@ buffer."
(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))
+;; 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 d2f45eb

Please sign in to comment.