From: Chong Yidong Date: Wed, 24 Sep 2008 22:51:09 +0000 (+0000) Subject: (sh-mode-map): Don't assume that skeleton is loaded. X-Git-Tag: emacs-pretest-23.0.90~2778 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e4bf03f6a852b7e9056ffea9367e0e932d0379ae;p=emacs.git (sh-mode-map): Don't assume that skeleton is loaded. --- 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] '("--"))