From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: SteveFKI Newsgroups: gmane.emacs.help Subject: Key bindings Date: Thu, 29 Mar 2007 03:19:09 -0700 (PDT) Message-ID: <9730443.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1175163578 23338 80.91.229.12 (29 Mar 2007 10:19:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Mar 2007 10:19:38 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 29 12:19:31 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HWrj8-0006kQ-Nj for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Mar 2007 12:19:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWrlg-0007pj-Ff for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Mar 2007 05:22:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HWrlR-0007kn-Re for help-gnu-emacs@gnu.org; Thu, 29 Mar 2007 06:21:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HWrlQ-0007hz-NA for Help-gnu-emacs@gnu.org; Thu, 29 Mar 2007 06:21:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWrlQ-0007hb-HG for Help-gnu-emacs@gnu.org; Thu, 29 Mar 2007 05:21:52 -0500 Original-Received: from www.nabble.com ([72.21.53.35] helo=talk.nabble.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HWriq-00020l-QT for Help-gnu-emacs@gnu.org; Thu, 29 Mar 2007 06:19:13 -0400 Original-Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HWrin-0007am-MI for Help-gnu-emacs@gnu.org; Thu, 29 Mar 2007 03:19:09 -0700 X-Nabble-From: stephen.brown@eu.fkilogistex.com X-detected-kernel: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42267 Archived-At: I am trying to modify my .emacs file, so the HOME key behaves as follows; HOME = Go to start of line C-HOME = Go to start of buffer My .emacs file looks like this (custom-set-variables ;; custom-set-variables was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. '(setq debug-on-error t) '(case-fold-search t) '(current-language-environment "Latin-9") '(default-input-method "latin-9-prefix") '(hungry-delete t) ;(setq delete-key-deletes-forward t) '(global-font-lock-mode t nil (font-lock))) (setq indent-tabs-mode-nil) (mouse-wheel-mode t) (custom-set-faces ;; custom-set-faces was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. ) ;; My modifications (setq delete-key-deletes-forward t) ;; C-Language customising (setq standard-indent 3) ;; My C Style (defconst myCStyle '( (c-offsets-alist . ((case-label . 3) (substatement-open . 0) (defun-block-intro . 3) (statement-case-intro . 3) (statement-block-intro . 3) (topmost-intro . -1) )) ) "My C Programming Style") (defun myCModeCommonHook () (c-add-style "personal" myCStyle t) ) ;; Hook my C Style to the standard one (add-hook 'c-mode-common-hook 'myCModeCommonHook) ;; (c-add-style "myCStyle" '("bsd" (c-basic-offset . 3))) ;; (add-hook 'c-mode-common-hook '(lambda () (c-set-style "myCStyle"))) ;; Key bindings ;; C-z is Undo (define-key global-map "\C-z" 'undo) ;; F5 - goto line (define-key global-map [f5] 'goto-line) ;; F6 - Replace String (define-key global-map [f6] 'replace-string) ;; F7 - Search forward for ^L (function breaks) (define-key global-map [f7] "\C-e\C-s\C-q\C-l") ;; C-F7 - Search backward for ^L (function breaks) (define-key global-map [C-f7] "\C-a\C-r\C-q\C-l") ;; (define-key global-map [home] 'beginning-of-line) (global-set-key [home] 'beginning-of-line) (define-key global-map [end] 'end-of-line) (define-key global-map [C-home] 'beginning-of-buffer) (define-key global-map [C-end] 'end-of-buffer) I think this should work, and as you will see I have tried two ways to map the HOME key. However, every time I press HOME it opens Search in the mini-buffer (as if it is mapped to C-s). The END key works fine. It seems to me then that something else is mapping the key, and overriding my mapping, but I can't see what. Can anyone offer any guidance? Thanks -- View this message in context: http://www.nabble.com/Key-bindings-tf3485502.html#a9730443 Sent from the Emacs - Help mailing list archive at Nabble.com.