all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: SteveFKI <stephen.brown@eu.fkilogistex.com>
To: Help-gnu-emacs@gnu.org
Subject: Key bindings
Date: Thu, 29 Mar 2007 03:19:09 -0700 (PDT)	[thread overview]
Message-ID: <9730443.post@talk.nabble.com> (raw)


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.

             reply	other threads:[~2007-03-29 10:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-29 10:19 SteveFKI [this message]
     [not found] <mailman.1572.1175163715.7795.help-gnu-emacs@gnu.org>
2007-03-29 10:49 ` Key bindings Tassilo Horn
2007-03-29 13:19   ` SteveFKI
2007-03-29 20:16     ` Peter Dyballa
2007-03-29 20:49       ` SteveFKI
2007-03-29 21:22         ` Peter Dyballa
     [not found]   ` <mailman.1576.1175174562.7795.help-gnu-emacs@gnu.org>
2007-03-29 20:16     ` Malte Spiess
2007-03-29 21:02       ` SteveFKI
2007-03-29 20:22     ` Tassilo Horn
     [not found] <mailman.1327.1122065988.20277.help-gnu-emacs@gnu.org>
2005-07-22 21:44 ` Charles philip Chan
  -- strict thread matches above, loose matches on Subject: below --
2005-07-22 19:32 Stefan Bienert
2005-07-22 22:56 ` Peter Dyballa
     [not found] <mailman.7825.1055479806.21513.help-gnu-emacs@gnu.org>
2003-06-13  7:03 ` key bindings Kai Großjohann
2003-06-13  8:57 ` Barman Brakjoller
2003-06-13  4:49 john doe
2002-12-13 21:20 Bingham, Jay
2002-12-13 18:01 sdieselil
2002-12-13 19:51 ` Kevin Rodgers
2002-12-16 11:53 ` Kester Clegg
2002-12-18 13:10   ` sdieselil
2002-12-18 23:32 ` Koyote
2002-11-01 16:20 Jeff Rancier
2002-11-01 16:56 ` Kevin Rodgers
2002-11-01 18:37   ` Jeff Rancier
2002-11-05 17:12     ` Michael Hudson
2002-11-02  0:23 ` Henrik Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9730443.post@talk.nabble.com \
    --to=stephen.brown@eu.fkilogistex.com \
    --cc=Help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.