# HG changeset patch # User Chong Yidong # Date 1222296669 0 # Node ID aa5de5d845d647c79e70bb3738fe230745e57f9d # Parent 71824a19fc925169608e03d166329306ce8bc29e (sh-mode-map): Don't assume that skeleton is loaded. diff -r 71824a19fc92 -r aa5de5d845d6 lisp/progmodes/sh-script.el --- a/lisp/progmodes/sh-script.el Wed Sep 24 22:50:56 2008 +0000 +++ b/lisp/progmodes/sh-script.el Wed Sep 24 22:51:09 2008 +0000 @@ -495,8 +495,13 @@ :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] '("--"))