Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0507406b
Commit
0507406b
authored
Apr 25, 2014
by
Nicolas Richard
Committed by
Stefan Monnier
Apr 25, 2014
Browse files
* lisp/battery.el (battery-update): Handle the case where battery
status is "N/A". Fixes: debbugs:17319
parent
844465d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
lisp/ChangeLog
lisp/ChangeLog
+7
-2
lisp/battery.el
lisp/battery.el
+8
-9
No files found.
lisp/ChangeLog
View file @
0507406b
2014-04-25 Nicolas Richard <theonewiththeevillook@yahoo.fr>
* battery.el (battery-update): Handle the case where battery
status is "N/A" (bug#17319).
2014-04-24 Eli Zaretskii <eliz@gnu.org>
* tooltip.el (tooltip-show-help-non-mode, tooltip-show-help):
Use
equal-including-properties to compare help-echo strings
.
(
B
ug#17331)
* tooltip.el (tooltip-show-help-non-mode, tooltip-show-help):
Use
equal-including-properties to compare help-echo strings (
b
ug#17331)
.
2014-04-24 Leo Liu <sdl.web@gmail.com>
...
...
lisp/battery.el
View file @
0507406b
...
...
@@ -201,19 +201,18 @@ seconds."
(
defun
battery-update
()
"Update battery status information in the mode line."
(
let
((
data
(
and
battery-status-function
(
funcall
battery-status-function
))))
(
let*
((
data
(
and
battery-status-function
(
funcall
battery-status-function
)))
(
percentage
(
car
(
read-from-string
(
cdr
(
assq
?p
data
))))))
(
setq
battery-mode-line-string
(
propertize
(
if
(
and
battery-mode-line-format
(
<=
(
car
(
read-from-string
(
cdr
(
assq
?p
data
))))
battery-mode-line-limit
))
(
battery-format
battery-mode-line-format
data
)
(
numberp
percentage
)
(
<=
percentage
battery-mode-line-limit
))
(
battery-format
battery-mode-line-format
data
)
""
)
'face
(
and
(
<=
(
car
(
read-from-string
(
cdr
(
assq
?p
data
)))
)
battery-load-critical
)
'error
)
(
and
(
numberp
percentage
)
(
<=
percentage
battery-load-critical
)
'error
)
'help-echo
"Battery status information"
)))
(
force-mode-line-update
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment