[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Duda .emacs



Hola a todos,

A ver si me podeis ayudar en una duda que tengo con la configuración del .emacs porque lo he construído con trozos que he pasteado de diferentes páginas. Por ello, si veis algo que no se hace así os agradecería que me lo dijeseis.

Pues bien, mi duda está en la instrucción para establecer el tipo de letra. He probado estas dos:

(font . "-*-fixed-medium-r-normal-*-*-135-75-75-*-*-iso8859-15") (font . "fixed") y la segunda me gusta más porque prefiero un tipo de letra pequeño; pero tiene un gran problema, y es que al abrir el editor tarda muchísimo y no ser el porqué. Agradecería si alguien me puede resolver al duda, y también explicarme (brevemente) que son todas las opciones que hay en la primera opción.

Muchas gracias.
;;------ Aspecto Inicial -----------

(setq inhibit-startup-message t) ;;quita el logo inicial

;; Ajustes de colocacion ventana, tamaño y colores
(setq default-frame-alist '(
			    (top . 000) (left . 00)
			    (width . 120) (height . 70)	
			    (menu-bar-lines . 1)
			    (tool-bar-lines . 0)
			    (background-color . "gray75") ;; gray75, gray78, grey90  #BBBBBB
			    (foreground-color . "grey15") ;;gray15, black
			    (cursor-color . "red3") ;;black, "red3
			    (mouse-color . "blue4")
			    (user-position t)			    
			    (vertical-scroll-bars . right)
			    (horizontal-scroll-bars . bottom)
			    (font . "-*-fixed-medium-r-normal-*-*-135-75-75-*-*-iso8859-15")	
				 ;;(font . "fixed")	
			    )
      initial-frame-alist default-frame-alist
      )

;; No crear ficheros backup/temporales
(setq make-backup-files nil)


;; ----- Miscelaneo ----------

;; Coloreado Sintaxis
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)

;; Colorea la region marcada
(transient-mark-mode t)

;; Ilumina el cierre de paréntesis
(show-paren-mode 1)

;; AUTOINDENTACIÓN EN C
;(c-set-offset 'case-label '+)
;; AÑADO ENTRADA A LA LISTA DE LOAD-PATHS
;(setq load-path (cons "~/emacs/" load-path))

;; Visualiza hora 
(setq display-time-24hr-format t) ; In 24 hour format
(display-time) 		    ; Display the time

;; Set titles for frame and icon (%f == file name, %b == buffer name)
(setq-default frame-title-format (list "Emacs: %b"))
(setq-default icon-title-format "Emacs - %b")

;; Deshabilita el pitido por el altavoz => graficamente
(setq visible-bell 1)

;; -------- Rueda Raton ---------
(defcustom mouse-wheel-distance 10
  "*Number of lines, maximum, to scroll the window when you move the mouse = wheel."
  :type `integer
  :group `mouse
  )

(defun mouse-wheelscroll-down ()
  " A function to scroll up or down in response to the mouse wheel."
  (interactive)
  (scroll-down
   (min mouse-wheel-distance
	(max 1 (- (window-height)
		  next-screen-context-lines)))
   )
  )

(defun mouse-wheelscroll-up ()
  " A function to scroll up or down in response to the mouse wheel."
  (interactive)
  (scroll-up
   (min mouse-wheel-distance
	(max 1 (- (window-height)
		  next-screen-context-lines)))
   )
  )
(global-set-key [mouse-4] (function mouse-wheelscroll-down))
(global-set-key [mouse-5] (function mouse-wheelscroll-up))

;; -------- Habilitar los acentos -------------
;;
(standard-display-european +1)
(set-input-mode (car (current-input-mode))
                (nth 1 (current-input-mode))
                0)
(set-language-environment "Latin-1")

;; -------- Combinacions de teclas -----------
(global-set-key "\C-l" 'goto-line)
(global-set-key "\C-g" 'goto-line)
;;(global-set-key "\M-i" 'indented-text-mode)
(global-set-key "\C-c\c" 'compile)
(global-set-key "\C-z" 'undo)
(global-set-key "\C-c" 'comment-region)
(global-set-key "\C-u" 'uncomment-region)
(global-set-key [f1]  'help) 


;;------------------------ Programación  --------------------------

(setq-default tab-width 3)

(setq c-style-variables-are-local-p 'nil)

(autoload 'c++-mode "cc-mode" "Major mode for editing C++." t)
(autoload 'c-mode "cc-mode" "Major mode for editing C." t)
(require 'cc-mode)

(load "cc-mode")
(add-hook 'c-mode 'auto-fill-mode)
(add-hook 'c++-mode 'auto-fill-mode)

;; define new syntax format style
(c-add-style "codemat"
             (list "user" 
                   '(c-basic-offset . 3)
                   '(c-comment-only-line-offset . 0)
                   '(c-hanging-braces-alist
                     (substatement-open before after))
                   '(indent-tabs-mode . t)
                   '(c-offsets-alist
                     (topmost-intro . 0)
                     (topmost-intro-cont . 0)
                     (substatement . +)
                     (substatement-open . 0)
                     (case-label . +)
                     (access-label . -2)
                     (inclass . +)
                     (inline-open . 0)
							)
						 )
				 )
(setq c-default-style "codemat")

(add-hook 'c-mode-hook
		  '(lambda() 
			 (local-set-key "\C-c\C-f" 'comment-function-c )
			 (local-set-key  [?\s-p] 'insert-print-statement-c )
			 (local-set-key  [(meta p)] 'insert-print-statement-c )
			 (local-set-key  [(meta f)] 'insert-for-statement )
			 (local-set-key  [(meta j)] 'insert-for-j-statement )
			 (turn-on-font-lock)
			 ))

;; C++
(add-hook 'c++-mode-hook 
		  '(lambda() 
			 (local-set-key "\C-c\C-f" 'comment-function-c++ )
			 (local-set-key  [(meta p)] 'insert-print-statement-cpp )
			 (local-set-key  [(meta control p)] 'cout-helper-2 )
			 (local-set-key  [(meta f)] 'insert-for-statement )
			 (local-set-key  [(meta j)] 'insert-for-j-statement )
			 (turn-on-font-lock)
			 ))
;; Java
(add-hook 'java-mode-hook
		  '(lambda() 
			 (local-set-key  [?\s-p] 'insert-print-statement-java )
			 (local-set-key  [(meta p)] 'insert-print-statement-java )
			 (local-set-key  [(meta f)] 'insert-for-statement )
			 (local-set-key  [(meta j)] 'insert-for-j-statement )
			 (turn-on-font-lock)
			 ))

;; Latex
(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.
 '(LaTeX-indent-environment-check t)
 '(LaTeX-indent-environment-list (quote (("verbatim" current-indentation) ("verbatim*" current-indentation) ("array") ("displaymath") ("eqnarray") ("eqnarray*") ("equation") ("equation*") ("picture") ("tabbing") ("table") ("table*") ("tabular") ("tabular*"))))
 '(LaTeX-indent-level 3)
 '(case-fold-search t)
 '(column-number-mode t)
 '(current-language-environment "Latin-1")
 '(default-input-method "latin-1-prefix")
 '(frame-background-mode nil)
 '(global-font-lock-mode t nil (font-lock))
 '(line-number-mode t)
 '(paren-mode (quote blink-paren) nil (paren))
 '(ps-paper-type (quote a4) t)
 '(show-paren-mode t nil (paren))
 '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
 '(transient-mark-mode t)
 '(truncate-lines t))

;; LaTeX editing prefs
(add-hook 'tex-mode 'latex-file-handler)
(defun latex-file-handler ()
  (nb-ide-settings)
  (turn-on-font-lock)
  (turn-on-auto-fill)
  (set-fill-column 80)
  (setq tex-dvi-view-command "xdvi"))

(add-hook 'tex-mode 'autoindent)



(setq auto-mode-alist
      (append
       '(("\\.C$"    . c++-mode)
         ("\\.H$"    . c++-mode)
         ("\\.cc$"   . c++-mode)
         ("\\.hh$"   . c++-mode)
         ("\\.hpp$"  . c++-mode)
         ("\\.cpp$"  . c++-mode)
         ("\\.cg$"   . c++-mode)
         ("\\.h$"    . c++-mode)
         ("\\.c$"    . c-mode)
         ("\\.m$"    . objc-mode)
         ("\\.java$" . java-mode)
		 ("\\.tex$"  . tex-mode)
         ("\\.emacs$" . emacs-lisp-mode)) 
       auto-mode-alist))


(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.
 )

Reply to: