diff --git a/lisp/register.el b/lisp/register.el index d1b5684ecb0..179e0822c33 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -593,6 +593,8 @@ With a prefix argument, prompt for BUFFER as well." ;; then look for the best matching method. (let* ((type (or (oclosure-type val) (cl-type-of val))) (types (cl--class-allparents (cl--find-class type)))) + (if (eq type 'cons) (push `(head ,(car val)) types)) + (push `(eql ',val) types) (while (and types (not (cl-find-method genfun nil (cons (car types) other-args-type)))) (setq types (cdr types))) diff --git a/test/lisp/register-tests.el b/test/lisp/register-tests.el index 2f26492eb9f..fbf67a96d3d 100644 --- a/test/lisp/register-tests.el +++ b/test/lisp/register-tests.el @@ -72,7 +72,7 @@ (senator-make-register (list "foo" 'type nil nil (make-overlay 1 1))))) ;; DocView: FIXME -- this should pass! - (should-not (register--jumpable-p + (should (register--jumpable-p (cons 'doc-view (list (cons 'buffer (current-buffer)) '(file . "foo") '(page . 1))))) (should-not (register--jumpable-p "test")))