summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-04-08 20:37:56 -0700
committerGlenn Morris <rgm@gnu.org>2014-04-08 20:37:56 -0700
commit559836fbccf9c79c621da96fe8ca0080b980b14c (patch)
tree4bf9792cdcf01bc71746845f5a1277da4a8ea687
parent6bc76cee212aab0a2c02f8c28213fc842cc7880f (diff)
parent50c9a9b8a871ce281b43a196bd912f3d2fdda5fa (diff)
downloademacs-559836fbccf9c79c621da96fe8ca0080b980b14c.tar.gz
Merge from emacs-24; up to 2014-04-02T16:17:08Z!dmantipov@yandex.ru
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/help.el8
-rw-r--r--lisp/progmodes/ruby-mode.el4
-rw-r--r--test/ChangeLog8
-rw-r--r--test/automated/electric-tests.el2
-rw-r--r--test/automated/python-tests.el54
6 files changed, 59 insertions, 27 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 26bcb7fd668..c6b0499a657 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
+2014-04-09 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight more
+ Module methods. (Bug#17216)
+
+2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * help.el (describe-bindings): Fix buffer handling (bug#17210).
+ (describe-bindings-internal): Mark obsolete.
+
2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (with-silent-modifications): Don't bind deactivate-mark,
diff --git a/lisp/help.el b/lisp/help.el
index 76c27de8da6..932270204c5 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -482,8 +482,11 @@ or a buffer name."
(or buffer (setq buffer (current-buffer)))
(help-setup-xref (list #'describe-bindings prefix buffer)
(called-interactively-p 'interactive))
- (with-current-buffer buffer
- (describe-bindings-internal nil prefix)))
+ (with-help-window (help-buffer)
+ ;; Be aware that `describe-buffer-bindings' puts its output into
+ ;; the current buffer.
+ (with-current-buffer (help-buffer)
+ (describe-buffer-bindings buffer prefix))))
;; This function used to be in keymap.c.
(defun describe-bindings-internal (&optional menus prefix)
@@ -494,6 +497,7 @@ The optional argument MENUS, if non-nil, says to mention menu bindings.
\(Ordinarily these are omitted from the output.)
The optional argument PREFIX, if non-nil, should be a key sequence;
then we display only bindings that start with that prefix."
+ (declare (obsolete describe-buffer-bindings "24.4"))
(let ((buf (current-buffer)))
(with-help-window (help-buffer)
;; Be aware that `describe-buffer-bindings' puts its output into
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 6c6cdd3427d..912736707ef 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -2065,6 +2065,10 @@ See `font-lock-syntax-table'.")
"include"
"module_function"
"prepend"
+ "private_class_method"
+ "private_constant"
+ "public_class_method"
+ "public_constant"
"refine"
"using")
'symbols))
diff --git a/test/ChangeLog b/test/ChangeLog
index fb969069c6c..c27b9b5f437 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,11 @@
+2014-04-09 Glenn Morris <rgm@gnu.org>
+
+ * automated/python-tests.el (python-triple-quote-pairing):
+ Enable/disable electric-pair-mode as needed.
+
+ * automated/electric-tests.el (electric-pair-backspace-1):
+ Replace deleted function.
+
2014-04-07 João Távora <joaotavora@gmail.com>
* automated/python-tests.el (python-triple-quote-pairing): New test.
diff --git a/test/automated/electric-tests.el b/test/automated/electric-tests.el
index bcef9cc2adb..6a70080fde5 100644
--- a/test/automated/electric-tests.el
+++ b/test/automated/electric-tests.el
@@ -509,7 +509,7 @@ baz\"\""
(with-temp-buffer
(insert "()")
(goto-char 2)
- (electric-pair-backward-delete-char 1)
+ (electric-pair-delete-pair 1)
(should (equal "" (buffer-string))))))
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el
index 8fe8f71264f..de963a670bc 100644
--- a/test/automated/python-tests.el
+++ b/test/automated/python-tests.el
@@ -2722,30 +2722,36 @@ def foo(a, b, c):
(should (= (point) (point-min)))))
(ert-deftest python-triple-quote-pairing ()
- (python-tests-with-temp-buffer
- "\"\"\n"
- (goto-char (1- (point-max)))
- (let ((last-command-event ?\"))
- (call-interactively 'self-insert-command))
- (should (string= (buffer-string)
- "\"\"\"\"\"\"\n"))
- (should (= (point) 4)))
- (python-tests-with-temp-buffer
- "\n"
- (let ((last-command-event ?\"))
- (dotimes (i 3)
- (call-interactively 'self-insert-command)))
- (should (string= (buffer-string)
- "\"\"\"\"\"\"\n"))
- (should (= (point) 4)))
- (python-tests-with-temp-buffer
- "\"\n\"\"\n"
- (goto-char (1- (point-max)))
- (let ((last-command-event ?\"))
- (call-interactively 'self-insert-command))
- (should (= (point) (1- (point-max))))
- (should (string= (buffer-string)
- "\"\n\"\"\"\n"))))
+ (require 'electric)
+ (let ((epm electric-pair-mode))
+ (unwind-protect
+ (progn
+ (python-tests-with-temp-buffer
+ "\"\"\n"
+ (or epm (electric-pair-mode 1))
+ (goto-char (1- (point-max)))
+ (let ((last-command-event ?\"))
+ (call-interactively 'self-insert-command))
+ (should (string= (buffer-string)
+ "\"\"\"\"\"\"\n"))
+ (should (= (point) 4)))
+ (python-tests-with-temp-buffer
+ "\n"
+ (let ((last-command-event ?\"))
+ (dotimes (i 3)
+ (call-interactively 'self-insert-command)))
+ (should (string= (buffer-string)
+ "\"\"\"\"\"\"\n"))
+ (should (= (point) 4)))
+ (python-tests-with-temp-buffer
+ "\"\n\"\"\n"
+ (goto-char (1- (point-max)))
+ (let ((last-command-event ?\"))
+ (call-interactively 'self-insert-command))
+ (should (= (point) (1- (point-max))))
+ (should (string= (buffer-string)
+ "\"\n\"\"\"\n"))))
+ (or epm (electric-pair-mode -1)))))
(provide 'python-tests)