emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/fringe.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/fringe.el [emacs-unicode-2]
Date: Fri, 22 Oct 2004 06:22:23 -0400

Index: emacs/lisp/fringe.el
diff -c emacs/lisp/fringe.el:1.5.4.2 emacs/lisp/fringe.el:1.5.4.3
*** emacs/lisp/fringe.el:1.5.4.2        Wed Sep 29 07:22:18 2004
--- emacs/lisp/fringe.el        Fri Oct 22 10:13:29 2004
***************
*** 43,49 ****
  
  (defvar fringe-bitmaps)
  
! (unless (get 'left-truncation 'fringe)
    (let ((bitmaps '(left-truncation right-truncation
                   up-arrow down-arrow
                   continued-line continuation-line
--- 43,50 ----
  
  (defvar fringe-bitmaps)
  
! (unless (or (not (boundp 'fringe-bitmaps))
!           (get 'left-truncation 'fringe))
    (let ((bitmaps '(left-truncation right-truncation
                   up-arrow down-arrow
                   continued-line continuation-line
***************
*** 112,117 ****
--- 113,137 ----
                                   fringe-mode))))
        (setq frames (cdr frames)))))
  
+ ;; For initialization of fringe-mode, take account of changes
+ ;; made explicitly to default-frame-alist.
+ (defun fringe-mode-initialize (symbol value)
+   (let* ((left-pair (assq 'left-fringe default-frame-alist))
+        (right-pair (assq 'right-fringe default-frame-alist))
+        (left (cdr left-pair))
+        (right (cdr right-pair)))
+     (if (or left-pair right-pair)
+       ;; If there's something in default-frame-alist for fringes,
+       ;; don't change it, but reflect that into the value of fringe-mode.
+       (progn
+         (setq fringe-mode (cons left right))
+         (if (equal fringe-mode '(nil . nil))
+             (setq fringe-mode nil))
+         (if (equal fringe-mode '(0 . 0))
+             (setq fringe-mode 0)))
+       ;; Otherwise impose the user-specified value of fringe-mode.
+       (custom-initialize-reset symbol value))))
+ 
  ;;;###autoload
  (defcustom fringe-mode nil
    "*Specify appearance of fringes on all frames.
***************
*** 138,143 ****
--- 158,164 ----
                       (integer :tag "Right width")))
    :group 'frames
    :require 'fringe
+   :initialize 'fringe-mode-initialize
    :set 'set-fringe-mode-1)
  
  (defun fringe-query-style (&optional all-frames)




reply via email to

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