emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/battery.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/battery.el
Date: Mon, 27 Dec 2004 12:19:25 -0500

Index: emacs/lisp/battery.el
diff -c emacs/lisp/battery.el:1.22 emacs/lisp/battery.el:1.23
*** emacs/lisp/battery.el:1.22  Sat Sep 18 21:33:44 2004
--- emacs/lisp/battery.el       Mon Dec 27 16:40:50 2004
***************
*** 73,84 ****
  
  (defvar battery-mode-line-string nil
    "String to display in the mode line.")
  
  (defcustom battery-mode-line-format
    (cond ((eq battery-status-function 'battery-linux-proc-apm)
!        " [%b%p%%]")
        ((eq battery-status-function 'battery-linux-proc-acpi)
!        " [%b%p%%,%d°C]"))
    "*Control string formatting the string to display in the mode line.
  Ordinary characters in the control string are printed as-is, while
  conversion specifications introduced by a `%' character in the control
--- 73,85 ----
  
  (defvar battery-mode-line-string nil
    "String to display in the mode line.")
+ ;;;###autoload (put 'battery-mode-line-string 'risky-local-variable t)
  
  (defcustom battery-mode-line-format
    (cond ((eq battery-status-function 'battery-linux-proc-apm)
!        "[%b%p%%]")
        ((eq battery-status-function 'battery-linux-proc-acpi)
!        "[%b%p%%,%d°C]"))
    "*Control string formatting the string to display in the mode line.
  Ordinary characters in the control string are printed as-is, while
  conversion specifications introduced by a `%' character in the control
***************
*** 128,140 ****
  
  (defun battery-update ()
    "Update battery status information in the mode line."
!   (setq battery-mode-line-string (propertize (if (and battery-mode-line-format
!                                                     battery-status-function)
!                                                (battery-format
!                                                 battery-mode-line-format
!                                                 (funcall 
battery-status-function))
!                                              "")
!                                            'help-echo "Battery status 
information"))
    (force-mode-line-update))
  
  
--- 129,142 ----
  
  (defun battery-update ()
    "Update battery status information in the mode line."
!   (setq battery-mode-line-string
!       (propertize (if (and battery-mode-line-format
!                            battery-status-function)
!                       (battery-format
!                        battery-mode-line-format
!                        (funcall battery-status-function))
!                     "")
!                   'help-echo "Battery status information"))
    (force-mode-line-update))
  
  




reply via email to

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