File: emacs.euro

package info (click to toggle)
user-es 0.34
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 304 kB
  • ctags: 18
  • sloc: perl: 322; sh: 240; makefile: 41
file content (69 lines) | stat: -rw-r--r-- 2,601 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
;-*-emacs-lisp-*-
;;/etc/emacs/site-start.d/50user-euro-es.el
;

;;--- soportar teclado europeo ------------------------------- 
(set-input-mode  (car (current-input-mode))
		 (nth 1 (current-input-mode))
		 0)

(if (< emacs-major-version 20)
    (progn
      (require 'disp-table)
      (standard-display-european t)
      (require 'iso-syntax))
  (if (featurep 'mule)
      ;; `standard-display-european' is semi-obsolete and conflicts with
      ;; the multibyte feature.  `set-language-environment' is a substitute.
      (if (or (and (fboundp 'find-coding-system)
                  (find-coding-system 'iso-8859-15))
             (and (fboundp 'coding-system-p)
                  (coding-system-p 'iso-8859-15)))
         (progn
           (set-language-environment "Latin-9")
           (set-terminal-coding-system 'iso-8859-15))
       (set-language-environment "Latin-1")
       (set-terminal-coding-system 'iso-8859-1))))



;;--- redefinir algunas teclas ----------------------------------
;(global-set-key [backspace] 'backward-delete-char-untabify)
; la siguiente lnea no debera ropmer el caracter de borrado
; en bsquedas incrementales - tiene esto otras desventajas?
(global-set-key "\177" 'backward-delete-char-untabify)
(global-set-key [delete] 'delete-char)
(global-set-key [home] 'beginning-of-line)
(global-set-key [end] 'end-of-line)
;(global-set-key [C-home] 'beginning-of-buffer)
;(global-set-key [C-end] 'end-of-buffer)

; Otras varias (gracias a Jose Manuel Moya)
(defvar cursor-map-2 (make-keymap) "for ESC-[")
(fset 'Cursor-Map-2 cursor-map-2)
(define-key esc-map "[" 'Cursor-Map-2)

(define-key esc-map "[A" 'previous-line)
(define-key esc-map "[B" 'next-line)
(define-key esc-map "[C" 'forward-char)
(define-key esc-map "[D" 'backward-char)
(define-key esc-map "[H" 'beginning-of-line)
(define-key esc-map "[Y" 'end-of-line)
(define-key esc-map "[5^" 'scroll-down)
(define-key esc-map "[6^" 'scroll-up)
(define-key esc-map "[[A" 'help-for-help)
(define-key esc-map "[[B" 'byte-compile-file)
(define-key esc-map "[[C" 'isearch-forward)
(define-key esc-map "[[D" 'query-replace-regexp)
(define-key esc-map "[[E" 'eval-defun)
(define-key esc-map "[[F" 'eval-current-buffer)
(define-key esc-map "[[G" 'buffer-menu)
(define-key esc-map "[[H" 'global-set-key)
(define-key esc-map "[[I" 'save-buffer)
(define-key esc-map "[[J" 'save-buffers-kill-emacs)
(define-key esc-map "[2^" 'set-mark-command)
(define-key esc-map "[3^" 'delete-char)

; entradas necesarias para XEmacs:
(global-set-key [(control home)] 'beginning-of-buffer)
(global-set-key [(control end)] 'end-of-buffer)