diff options
Diffstat (limited to 'lisp/progmodes/sh-script.el')
-rw-r--r-- | lisp/progmodes/sh-script.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 5d0f1cbb97f..72533d88734 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -495,8 +495,13 @@ This is buffer-local in every such buffer.") :help "Set the indentation for the current line")) (define-key menu-map [sh-pair] - '(menu-item "Insert braces and quotes in pairs" (lambda () (interactive) (setq skeleton-pair (not skeleton-pair))) - :button (:toggle . skeleton-pair) + '(menu-item "Insert braces and quotes in pairs" + (lambda () + (interactive) + (require 'skeleton) + (setq skeleton-pair (not skeleton-pair))) + :button (:toggle . (and (boundp 'skeleton-pair) + skeleton-pair)) :help "Inserting a brace or quote automatically inserts the matching pair")) (define-key menu-map [sh-s0] '("--")) |