From e4bf03f6a852b7e9056ffea9367e0e932d0379ae Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 24 Sep 2008 22:51:09 +0000 Subject: [PATCH] (sh-mode-map): Don't assume that skeleton is loaded. --- lisp/progmodes/sh-script.el | 9 +++++++-- 1 file 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] '("--")) -- 2.39.5