aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero2014-04-30 21:54:52 +0200
committerJuanma Barranquero2014-04-30 21:54:52 +0200
commit09b911adf4e22bbcac8c588bc14ade801276732e (patch)
tree0d9eb9708479bb491d7e1e2bb030aa3e90299526 /lisp
parentb0e36b7048c88aa24f6955c53fbe790bb9ebc54f (diff)
parent426b5dafdd837328d624a8ec5bfd567f2865c9f5 (diff)
downloademacs-09b911adf4e22bbcac8c588bc14ade801276732e.tar.gz
emacs-09b911adf4e22bbcac8c588bc14ade801276732e.zip
Merge from emacs-24; up to 2014-05-01T10:21:17Z!rgm@gnu.org
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog32
-rw-r--r--lisp/battery.el17
-rw-r--r--lisp/desktop.el7
-rw-r--r--lisp/dired.el4
-rw-r--r--lisp/faces.el18
-rw-r--r--lisp/mail/rmail.el5
-rw-r--r--lisp/textmodes/rst.el7
7 files changed, 65 insertions, 25 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d58fd9cdc08..04d57aa8125 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,35 @@
12014-04-30 Eli Zaretskii <eliz@gnu.org>
2
3 * dired.el (dired-initial-position-hook, dired-initial-position):
4 Doc string fixes.
5
62014-04-30 Glenn Morris <rgm@gnu.org>
7
8 * mail/rmail.el (rmail-quit): Handle killed summaries. (Bug#17283)
9
102014-04-30 Matthias Dahl <matthias.dahl@binary-island.eu>
11
12 * faces.el (face-spec-recalc): Apply X resources only after the
13 defface spec has been applied. Thus, X resources are no longer
14 overriden by the defface spec which also fixes issues on win32 where
15 the toolbar coloring was wrong because it is set through X resources
16 and was (wrongfully) overriden. (Bug#16694)
17
182014-04-30 Stefan Monnier <monnier@iro.umontreal.ca>
19
20 * textmodes/rst.el (electric-pair-pairs): Declare.
21 (rst-mode): Set it (bug#17131).
22
232014-04-30 Juri Linkov <juri@jurta.org>
24
25 * desktop.el (desktop-value-to-string): Let-bind `print-length'
26 and `print-level' to nil. (Bug#17351)
27
282014-04-30 Nicolas Richard <theonewiththeevillook@yahoo.fr>
29
30 * battery.el (battery-update): Handle the case where battery
31 status is "N/A" (bug#17319).
32
12014-04-28 Stefan Monnier <monnier@iro.umontreal.ca> 332014-04-28 Stefan Monnier <monnier@iro.umontreal.ca>
2 34
3 * progmodes/ps-mode.el: Use SMIE. Move string and comment recognition 35 * progmodes/ps-mode.el: Use SMIE. Move string and comment recognition
diff --git a/lisp/battery.el b/lisp/battery.el
index 1eef80ab339..b49363489a8 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -201,19 +201,18 @@ seconds."
201 201
202(defun battery-update () 202(defun battery-update ()
203 "Update battery status information in the mode line." 203 "Update battery status information in the mode line."
204 (let ((data (and battery-status-function (funcall battery-status-function)))) 204 (let* ((data (and battery-status-function (funcall battery-status-function)))
205 (percentage (car (read-from-string (cdr (assq ?p data))))))
205 (setq battery-mode-line-string 206 (setq battery-mode-line-string
206 (propertize (if (and battery-mode-line-format 207 (propertize (if (and battery-mode-line-format
207 (<= (car (read-from-string (cdr (assq ?p data)))) 208 (numberp percentage)
208 battery-mode-line-limit)) 209 (<= percentage battery-mode-line-limit))
209 (battery-format 210 (battery-format battery-mode-line-format data)
210 battery-mode-line-format
211 data)
212 "") 211 "")
213 'face 212 'face
214 (and (<= (car (read-from-string (cdr (assq ?p data)))) 213 (and (numberp percentage)
215 battery-load-critical) 214 (<= percentage battery-load-critical)
216 'error) 215 'error)
217 'help-echo "Battery status information"))) 216 'help-echo "Battery status information")))
218 (force-mode-line-update)) 217 (force-mode-line-update))
219 218
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 5e43c03ade7..ded73c065f0 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -844,12 +844,13 @@ QUOTE may be `may' (value may be quoted),
844 "Convert VALUE to a string that when read evaluates to the same value. 844 "Convert VALUE to a string that when read evaluates to the same value.
845Not all types of values are supported." 845Not all types of values are supported."
846 (let* ((print-escape-newlines t) 846 (let* ((print-escape-newlines t)
847 (print-length nil)
848 (print-level nil)
847 (float-output-format nil) 849 (float-output-format nil)
848 (quote.sexp (desktop--v2s value)) 850 (quote.sexp (desktop--v2s value))
849 (quote (car quote.sexp)) 851 (quote (car quote.sexp))
850 (txt 852 (print-quoted t)
851 (let ((print-quoted t)) 853 (txt (prin1-to-string (cdr quote.sexp))))
852 (prin1-to-string (cdr quote.sexp)))))
853 (if (eq quote 'must) 854 (if (eq quote 'must)
854 (concat "'" txt) 855 (concat "'" txt)
855 txt))) 856 txt)))
diff --git a/lisp/dired.el b/lisp/dired.el
index fd897b9f7b5..364975e7a2b 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -222,7 +222,7 @@ with the buffer narrowed to the listing."
222 222
223(defcustom dired-initial-position-hook nil 223(defcustom dired-initial-position-hook nil
224 "This hook is used to position the point. 224 "This hook is used to position the point.
225It is run the function `dired-initial-position'." 225It is run by the function `dired-initial-position'."
226 :group 'dired 226 :group 'dired
227 :type 'hook 227 :type 'hook
228 :version "24.4") 228 :version "24.4")
@@ -2768,7 +2768,7 @@ as returned by `dired-get-filename'. LIMIT is the search limit."
2768;; FIXME document whatever dired-x is doing. 2768;; FIXME document whatever dired-x is doing.
2769(defun dired-initial-position (dirname) 2769(defun dired-initial-position (dirname)
2770 "Where point should go in a new listing of DIRNAME. 2770 "Where point should go in a new listing of DIRNAME.
2771Point assumed at beginning of new subdir line. 2771Point is assumed to be at the beginning of new subdir line.
2772It runs the hook `dired-initial-position-hook'." 2772It runs the hook `dired-initial-position-hook'."
2773 (end-of-line) 2773 (end-of-line)
2774 (and (featurep 'dired-x) dired-find-subdir 2774 (and (featurep 'dired-x) dired-find-subdir
diff --git a/lisp/faces.el b/lisp/faces.el
index 9c115473542..d8b3c7a6b0f 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1652,18 +1652,22 @@ function for its other effects."
1652 1652
1653(defun face-spec-recalc (face frame) 1653(defun face-spec-recalc (face frame)
1654 "Reset the face attributes of FACE on FRAME according to its specs. 1654 "Reset the face attributes of FACE on FRAME according to its specs.
1655After the reset, the specs are applied from the following sources in this order: 1655The following sources are applied in this order:
1656 X resources (if applicable) 1656
1657 face reset to default values if it's the default face, otherwise set
1658 to unspecified (through `face-spec-reset-face')
1657 | 1659 |
1658 (theme and user customization) 1660 (theme and user customization)
1659 or, if nonexistent or does not match the current frame, 1661 or: if none of the above exist, and none match the current frame or
1662 inherited from the defface spec instead of overwriting it
1663 entirely, the following is applied instead:
1660 (defface default spec) 1664 (defface default spec)
1665 (X resources (if applicable))
1661 | 1666 |
1662 defface override spec" 1667 defface override spec"
1663 (while (get face 'face-alias) 1668 (while (get face 'face-alias)
1664 (setq face (get face 'face-alias))) 1669 (setq face (get face 'face-alias)))
1665 (face-spec-reset-face face frame) 1670 (face-spec-reset-face face frame)
1666 (make-face-x-resource-internal face frame)
1667 ;; If FACE is customized or themed, set the custom spec from 1671 ;; If FACE is customized or themed, set the custom spec from
1668 ;; `theme-face' records. 1672 ;; `theme-face' records.
1669 (let ((theme-faces (get face 'theme-face)) 1673 (let ((theme-faces (get face 'theme-face))
@@ -1677,10 +1681,12 @@ After the reset, the specs are applied from the following sources in this order:
1677 (setq theme-face-applied t)))) 1681 (setq theme-face-applied t))))
1678 ;; If there was a spec applicable to FRAME, that overrides the 1682 ;; If there was a spec applicable to FRAME, that overrides the
1679 ;; defface spec entirely (rather than inheriting from it). If 1683 ;; defface spec entirely (rather than inheriting from it). If
1680 ;; there was no spec applicable to FRAME, apply the defface spec. 1684 ;; there was no spec applicable to FRAME, apply the defface spec
1685 ;; as well as any applicable X resources.
1681 (unless theme-face-applied 1686 (unless theme-face-applied
1682 (setq spec (face-spec-choose (face-default-spec face) frame)) 1687 (setq spec (face-spec-choose (face-default-spec face) frame))
1683 (face-spec-set-2 face frame spec)) 1688 (face-spec-set-2 face frame spec)
1689 (make-face-x-resource-internal face frame))
1684 (setq spec (face-spec-choose (get face 'face-override-spec) frame)) 1690 (setq spec (face-spec-choose (get face 'face-override-spec) frame))
1685 (face-spec-set-2 face frame spec))) 1691 (face-spec-set-2 face frame spec)))
1686 1692
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 3146e28e1ca..673a85dc4c7 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1,7 +1,6 @@
1;;; rmail.el --- main code of "RMAIL" mail reader for Emacs 1;;; rmail.el --- main code of "RMAIL" mail reader for Emacs
2 2
3;; Copyright (C) 1985-1988, 1993-1998, 2000-2014 Free Software 3;; Copyright (C) 1985-1988, 1993-1998, 2000-2014 Free Software Foundation, Inc.
4;; Foundation, Inc.
5 4
6;; Maintainer: emacs-devel@gnu.org 5;; Maintainer: emacs-devel@gnu.org
7;; Keywords: mail 6;; Keywords: mail
@@ -1573,7 +1572,7 @@ Hook `rmail-quit-hook' is run after expunging."
1573 (when (boundp 'rmail-quit-hook) 1572 (when (boundp 'rmail-quit-hook)
1574 (run-hooks 'rmail-quit-hook)) 1573 (run-hooks 'rmail-quit-hook))
1575 ;; Don't switch to the summary buffer even if it was recently visible. 1574 ;; Don't switch to the summary buffer even if it was recently visible.
1576 (when rmail-summary-buffer 1575 (when (rmail-summary-exists)
1577 (with-current-buffer rmail-summary-buffer 1576 (with-current-buffer rmail-summary-buffer
1578 (set-buffer-modified-p nil)) 1577 (set-buffer-modified-p nil))
1579 (replace-buffer-in-windows rmail-summary-buffer) 1578 (replace-buffer-in-windows rmail-summary-buffer)
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index d4a3438ce97..b05a5e5a7e3 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -784,11 +784,9 @@ This inherits from Text mode.")
784 (modify-syntax-entry ?\u2019 "." st) 784 (modify-syntax-entry ?\u2019 "." st)
785 (modify-syntax-entry ?\u201c "." st) 785 (modify-syntax-entry ?\u201c "." st)
786 (modify-syntax-entry ?\u201d "." st) 786 (modify-syntax-entry ?\u201d "." st)
787
788 st) 787 st)
789 "Syntax table used while in `rst-mode'.") 788 "Syntax table used while in `rst-mode'.")
790 789
791
792(defcustom rst-mode-hook nil 790(defcustom rst-mode-hook nil
793 "Hook run when `rst-mode' is turned on. 791 "Hook run when `rst-mode' is turned on.
794The hook for `text-mode' is run before this one." 792The hook for `text-mode' is run before this one."
@@ -799,6 +797,8 @@ The hook for `text-mode' is run before this one."
799;; Pull in variable definitions silencing byte-compiler. 797;; Pull in variable definitions silencing byte-compiler.
800(require 'newcomment) 798(require 'newcomment)
801 799
800(defvar electric-pair-pairs)
801
802;; Use rst-mode for *.rst and *.rest files. Many ReStructured-Text files 802;; Use rst-mode for *.rst and *.rest files. Many ReStructured-Text files
803;; use *.txt, but this is too generic to be set as a default. 803;; use *.txt, but this is too generic to be set as a default.
804;;;###autoload (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode))) 804;;;###autoload (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode)))
@@ -860,6 +860,9 @@ highlighting.
860 (set (make-local-variable 'uncomment-region-function) 860 (set (make-local-variable 'uncomment-region-function)
861 'rst-uncomment-region) 861 'rst-uncomment-region)
862 862
863 (set (make-local-variable 'electric-pair-pairs)
864 '((?\" . ?\") (?\* . ?\*) (?\` . ?\`)))
865
863 ;; Imenu and which function. 866 ;; Imenu and which function.
864 ;; FIXME: Check documentation of `which-function' for alternative ways to 867 ;; FIXME: Check documentation of `which-function' for alternative ways to
865 ;; determine the current function name. 868 ;; determine the current function name.