emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/face-remap.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/face-remap.el,v
Date: Thu, 05 Jun 2008 02:42:57 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     08/06/05 02:42:56

Index: lisp/face-remap.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/face-remap.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- lisp/face-remap.el  5 Jun 2008 00:11:15 -0000       1.4
+++ lisp/face-remap.el  5 Jun 2008 02:42:52 -0000       1.5
@@ -36,8 +36,8 @@
 ;; The "specs" values are a lists of face names or face attribute-value
 ;; pairs, and are merged together, with earlier values taking precedence.
 ;;
-;; The RELATIVE_SPECS_* values are added by `add-relative-face-remapping'
-;; (and removed by `remove-relative-face-remapping', and are intended for
+;; The RELATIVE_SPECS_* values are added by `face-remap-add-relative'
+;; (and removed by `face-remap-remove-relative', and are intended for
 ;; face "modifications" (such as increasing the size).  Typical users of
 ;; relative specs would be minor modes.
 ;;
@@ -45,10 +45,10 @@
 ;; face name, which causes the global definition of that face to be used.
 ;;
 ;; A non-default value of BASE_SPECS may also be set using
-;; `set-base-face-remapping'.  Because this _overwrites_ the default
+;; `face-remap-set-base'.  Because this _overwrites_ the default
 ;; value inheriting from the global face definition, it is up to the
-;; caller of set-base-face-remapping to add such inheritance if it is
-;; desired.  A typical use of set-base-face-remapping would be a major
+;; caller of face-remap-set-base to add such inheritance if it is
+;; desired.  A typical use of face-remap-set-base would be a major
 ;; mode setting face remappings, e.g., of the default face.
 ;;
 ;; All modifications cause face-remapping-alist to be made buffer-local.
@@ -62,11 +62,11 @@
 ;; Utility functions
 
 ;;;### autoload
-(defun add-relative-face-remapping (face &rest specs)
+(defun face-remap-add-relative (face &rest specs)
   "Add a face remapping entry of FACE to SPECS in the current buffer.
 
 Return a cookie which can be used to delete the remapping with
-`remove-relative-face-remapping'.
+`face-remap-remove-relative'.
 
 SPECS can be any value suitable for the `face' text property,
 including a face name, a list of face names, or a face-attribute
@@ -77,7 +77,7 @@
 
 The base (lowest priority) remapping may be set to a specific
 value, instead of the default of the global face definition,
-using `set-base-face-remapping'."
+using `face-remap-set-base'."
   (make-local-variable 'face-remapping-alist)
   (let ((entry (assq face face-remapping-alist)))
     (when (null entry)
@@ -86,8 +86,8 @@
     (setcdr entry (cons specs (cdr entry)))
     (cons face specs)))
 
-(defun remove-relative-face-remapping (cookie)
-  "Remove a face remapping previously added by `add-relative-face-remapping'.
+(defun face-remap-remove-relative (cookie)
+  "Remove a face remapping previously added by `face-remap-add-relative'.
 COOKIE should be the return value from that function."
   (let ((remapping (assq (car cookie) face-remapping-alist)))
     (when remapping
@@ -102,7 +102,7 @@
          (cdr cookie))))))
 
 ;;;### autoload
-(defun set-default-base-face-remapping (face)
+(defun face-remap-reset-base (face)
   "Set the base remapping of FACE to inherit from FACE's global definition."
   (let ((entry (assq face face-remapping-alist)))
     (when entry
@@ -116,7 +116,7 @@
        (setcar (last entry) face)))))  ; otherwise, just inherit global def
 
 ;;;### autoload
-(defun set-base-face-remapping (face &rest specs)
+(defun face-remap-set-base (face &rest specs)
   "Set the base remapping of FACE in the current buffer to SPECS.
 If SPECS is empty, the default base remapping is restored, which
 inherits from the global definition of FACE; note that this is
@@ -125,7 +125,7 @@
   (if (or (null specs)
          (and (eq (car specs) face) (null (cdr specs)))) ; default
       ;; Set entry back to default
-      (set-default-base-face-remapping face)
+      (face-remap-reset-base face)
     ;; Set the base remapping
     (make-local-variable 'face-remapping-alist)
     (let ((entry (assq face face-remapping-alist)))
@@ -163,26 +163,26 @@
 face size by the value of the variable `text-scale-mode-step'
 \(a negative amount shrinks the text).
 
-The `increase-buffer-face-height' and `decrease-buffer-face-height'
-functions may be used to interactively modify the variable
-`text-scale-mode-amount' (they also enable or disable `text-scale-mode'
-as necessary)."
+The `text-scale-increase' and `text-scale-decrease' functions may
+be used to interactively modify the variable
+`text-scale-mode-amount' (they also enable or disable
+`text-scale-mode' as necessary)."
   :lighter (" " text-scale-mode-lighter)
   (when text-scale-mode-remapping
-    (remove-relative-face-remapping text-scale-mode-remapping))
+    (face-remap-remove-relative text-scale-mode-remapping))
   (setq text-scale-mode-lighter
        (format (if (>= text-scale-mode-amount 0) "+%d" "%d")
                text-scale-mode-amount))
   (setq text-scale-mode-remapping
        (and text-scale-mode
-            (add-relative-face-remapping 'default
+            (face-remap-add-relative 'default
                                          :height
                                          (expt text-scale-mode-step
                                                text-scale-mode-amount))))
   (force-window-update (current-buffer)))
 
 ;;;###autoload
-(defun increase-buffer-face-height (&optional inc)
+(defun text-scale-increase (&optional inc)
   "Increase the height of the default face in the current buffer by INC steps.
 If the new height is other than the default, `text-scale-mode' is enabled.
 
@@ -195,18 +195,18 @@
   (text-scale-mode (if (zerop text-scale-mode-amount) -1 1)))
 
 ;;;###autoload
-(defun decrease-buffer-face-height (&optional dec)
+(defun text-scale-decrease (&optional dec)
   "Decrease the height of the default face in the current buffer by DEC steps.
-See `increase-buffer-face-height' for more details."
+See `text-scale-increase' for more details."
   (interactive "p")
-  (increase-buffer-face-height (- dec)))
+  (text-scale-increase (- dec)))
 
-;;;###autoload (define-key ctl-x-map [(control ?+)] 'adjust-buffer-face-height)
-;;;###autoload (define-key ctl-x-map [(control ?-)] 'adjust-buffer-face-height)
-;;;###autoload (define-key ctl-x-map [(control ?=)] 'adjust-buffer-face-height)
-;;;###autoload (define-key ctl-x-map [(control ?0)] 'adjust-buffer-face-height)
+;;;###autoload (define-key ctl-x-map [(control ?+)] 'text-scale-adjust)
+;;;###autoload (define-key ctl-x-map [(control ?-)] 'text-scale-adjust)
+;;;###autoload (define-key ctl-x-map [(control ?=)] 'text-scale-adjust)
+;;;###autoload (define-key ctl-x-map [(control ?0)] 'text-scale-adjust)
 ;;;###autoload
-(defun adjust-buffer-face-height (&optional inc)
+(defun text-scale-adjust (&optional inc)
   "Increase or decrease the height of the default face in the current buffer.
 
 The actual adjustment made depends on the final component of the
@@ -226,10 +226,10 @@
 will remove any scaling currently active.
 
 This command is a special-purpose wrapper around the
-`increase-buffer-face-height' command which makes repetition
-convenient even when it is bound in a non-top-level keymap.
-For binding in a top-level keymap, `increase-buffer-face-height'
-or `decrease-default-face-height' may be more appropriate."
+`text-scale-increase' command which makes repetition convenient
+even when it is bound in a non-top-level keymap.  For binding in
+a top-level keymap, `text-scale-increase' or
+`text-scale-decrease' may be more appropriate."
   (interactive "p")
   (let ((first t)
        (step t)
@@ -247,7 +247,7 @@
              (t
               (setq step nil))))
       (when step
-       (increase-buffer-face-height step)
+       (text-scale-increase step)
        (setq inc 1 first nil)
        (setq ev (read-event))))
     (push ev unread-command-events)))
@@ -269,10 +269,10 @@
 the `variable-pitch' face."
   :lighter " VarPitch"
   (when variable-pitch-mode-remapping
-    (remove-relative-face-remapping variable-pitch-mode-remapping))
+    (face-remap-remove-relative variable-pitch-mode-remapping))
   (setq variable-pitch-mode-remapping
        (and variable-pitch-mode
-            (add-relative-face-remapping 'default 'variable-pitch)))
+            (face-remap-add-relative 'default 'variable-pitch)))
   (force-window-update (current-buffer)))
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]