Commit 559836fb authored by Glenn Morris's avatar Glenn Morris
Browse files

Merge from emacs-24; up to 2014-04-02T16:17:08Z!dmantipov@yandex.ru

parents 6bc76cee 50c9a9b8
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,
......
......@@ -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
......
......@@ -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))
......
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.
......
......@@ -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))))))
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment