Previous: , Up: Simple Customization   [Contents][Index]


13.4 Init Files

Hemlock customizations are normally put in Hemlock’s initialization file, "hemlock-init.lisp", or when compiled "hemlock-init.fasl". When starting up Lisp, use the -hinit switch to indicate a particular file. The contents of the init file must be Lisp code, but there is a fairly straightforward correspondence between the basic customization commands and the equivalent Lisp code. Rather than describe these functions in depth here, a brief example follows:

;;; -*- Mode: Lisp; Package: Hemlock -*-

;;; It is necessary to specify that the customizations go in
;;; the hemlock package.
(in-package 'hemlock)

;;; Bind Kill Previous Word to M-h.
(bind-key "Kill Previous Word" '#(#\m-h))
;;;
;;; Bind Extract List to C-M-? when in Lisp mode.
(bind-key "Extract List" '#(#\c-m-?) :mode "Lisp")

;;; Make C-w globally unbound.
(delete-key-binding '#(#\c-w))

;;; Make string searches case-sensitive.
(setv string-search-ignore-case nil)
;;;
;;; Make "Query Replace" replace strings literally.
(setv case-replace nil)

For a detailed description of these functions, see the Hemlock Command Implementor’s Manual.