2 (defvar font-resizing-mode-map
3 (let ((m (make-sparse-keymap)))
4 (define-key m
"+" 'increment-font-height
)
5 (define-key m
"-" 'decrement-font-height
)
6 (define-key m
"r" 'resize-font-height
)
7 ; (define-key m "-" 'set-font-height)
8 (define-key m
(kbd "C-c C-c") 'font-resizing-mode
)
11 (define-minor-mode font-resizing-mode
13 :ligther
" Font re-Size "
14 :keymap
'font-resizing-mode-map
)
15 (put 'font-resizing-mode
'unit
8)
17 ;; (defun set-font-height (&optional n) "" (interactive "p")
18 ;; (set-face-attribute 'default (selected-frame)
19 ;; :height (+ (face-attribute 'default :height) n))
20 ;; (princ (format "Font height is %d." (face-attribute 'default :height))))
22 (defun resize-font-height (&optional n
) "" (interactive "p")
23 (set-face-attribute 'default
(selected-frame)
24 :height
(+ (face-attribute 'default
:height
) n
))
25 (princ (format "Font height is %d." (face-attribute 'default
:height
))))
27 (defsubst decrement-font-height
()""(interactive)
28 (resize-font-height (- (get 'font-resizing-mode
'unit
))))
29 (defsubst increment-font-height
()""(interactive)
30 (resize-font-height (get 'font-resizing-mode
'unit
)))
34 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
35 (defun switch-inverted-color () "Switch Inverted Color Video."
36 (interactive) (message "Switch Inverted Color Video.")
37 (set-face-inverse-video-p 'default
(not (face-inverse-video-p 'default
))))
38 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
39 ;(defvar my-color-style nil "Color Style")
40 (defun switch-color-style ()
43 (prog1 (setq style nil)
45 '(default ((t (:background \"white\" :foreground \"black\"))))))
46 (prog1 (setq style 'dark)
48 '(default ((t (:background \"black\" :foreground \"white\"))))))))
50 (interactive) (message "Switch Color.")
51 (if (eq (get 'switch-color-style
'style
) 'dark
)
52 (prog1 (put 'switch-color-style
'style
'light
)
53 (set-face-attribute 'default
(selected-frame) :background
"white" :foreground
"black"))
54 (prog1 (put 'switch-color-style
'style
'dark
)
55 (set-face-attribute 'default
(selected-frame) :background
"black" :foreground
"white")))
56 (message "Switched Color to %s." (symbol-name (get 'switch-color-style
'style
))))
58 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
59 (defun switch-font-style (&optional style
) ""
61 (message "Switch Font Size.")
62 (if (null style
) (setq style
66 (get 'switch-font-style
'avails
)))))
67 (set-face-attribute 'default
(selected-frame)
68 :height
(get 'switch-font-style style
))
69 (message "Switched Font Size to %s." style
))
71 (put 'switch-font-style
'avails
'((tiny) (smaller) (bigger) (huge)))
72 (put 'switch-font-style
'huge
182) ;; -5 x8
73 (put 'switch-font-style
'bigger
143) ;; -5 x8
74 (put 'switch-font-style
'smaller
103);; -3 x8
75 (put 'switch-font-style
'tiny
79) ;; x8
78 (defface my-Corsivo-sottolineato-rosso
79 '((t (:family
"LMSans17"
88 (defface my-Titolo-enorme
89 '((t (:family
"LMSans9"
100 ;; :background "white"
101 ;; :foreground "black"
102 ;; :inverse-video nil
104 ;; :strike-through nil
111 ;; :family "b&h-lucida"))) "My Face")
113 ;;;;;;;;;;;;;;;; For Various & Hooks ;;;;;;;;;;;;;;;;
115 (defun update-face-for-term () "" (interactive)
116 (custom-set-variables
117 '(term-default-bg-color (face-background 'default
))
118 '(term-default-fg-color (face-foreground 'default
))))
121 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;