aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Monnier2016-08-02 13:01:26 -0400
committerStefan Monnier2016-08-02 13:01:26 -0400
commitd0838f201a87982ebee5d85b0a369e03f2598ab5 (patch)
tree38f78ec98485cd480ebb674578e66d3087f05a75 /test
parent54a3c0c98f844ef6b21b011884132d5fe5ae5e1f (diff)
downloademacs-d0838f201a87982ebee5d85b0a369e03f2598ab5.tar.gz
emacs-d0838f201a87982ebee5d85b0a369e03f2598ab5.zip
* cl-generic.el: Fix problems introduced by new load-history format
* lisp/emacs-lisp/cl-generic.el (cl--generic-load-hist-format): New function. (cl-generic-define-method, cl--generic-describe): Use it. (cl--generic-search-method): Adjust for new format. * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): * test/lisp/progmodes/elisp-mode-tests.el: Use cl--generic-load-hist-format rather than hard-coding cl-generic's internal format.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/progmodes/elisp-mode-tests.el47
1 files changed, 36 insertions, 11 deletions
diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el
index a7562a00c88..12e61cf8d18 100644
--- a/test/lisp/progmodes/elisp-mode-tests.el
+++ b/test/lisp/progmodes/elisp-mode-tests.el
@@ -347,7 +347,9 @@ to (xref-elisp-test-descr-to-target xref)."
347 (expand-file-name "elisp-mode-tests.el" emacs-test-dir))) 347 (expand-file-name "elisp-mode-tests.el" emacs-test-dir)))
348 (xref-make "(cl-defmethod xref-elisp-generic-no-default ((this xref-elisp-root-type) arg2))" 348 (xref-make "(cl-defmethod xref-elisp-generic-no-default ((this xref-elisp-root-type) arg2))"
349 (xref-make-elisp-location 349 (xref-make-elisp-location
350 '(xref-elisp-generic-no-default xref-elisp-root-type t) 'cl-defmethod 350 (cl--generic-load-hist-format
351 'xref-elisp-generic-no-default nil '(xref-elisp-root-type t))
352 'cl-defmethod
351 (expand-file-name "elisp-mode-tests.el" emacs-test-dir))) 353 (expand-file-name "elisp-mode-tests.el" emacs-test-dir)))
352 )) 354 ))
353 355
@@ -360,7 +362,10 @@ to (xref-elisp-test-descr-to-target xref)."
360 (expand-file-name "elisp-mode-tests.el" emacs-test-dir))) 362 (expand-file-name "elisp-mode-tests.el" emacs-test-dir)))
361 (xref-make "(cl-defmethod xref-elisp-generic-co-located-default ((this xref-elisp-root-type) arg2))" 363 (xref-make "(cl-defmethod xref-elisp-generic-co-located-default ((this xref-elisp-root-type) arg2))"
362 (xref-make-elisp-location 364 (xref-make-elisp-location
363 '(xref-elisp-generic-co-located-default xref-elisp-root-type t) 'cl-defmethod 365 (cl--generic-load-hist-format
366 'xref-elisp-generic-co-located-default nil
367 '(xref-elisp-root-type t))
368 'cl-defmethod
364 (expand-file-name "elisp-mode-tests.el" emacs-test-dir))) 369 (expand-file-name "elisp-mode-tests.el" emacs-test-dir)))
365 )) 370 ))
366 371
@@ -373,11 +378,16 @@ to (xref-elisp-test-descr-to-target xref)."
373 (expand-file-name "elisp-mode-tests.el" emacs-test-dir))) 378 (expand-file-name "elisp-mode-tests.el" emacs-test-dir)))
374 (xref-make "(cl-defmethod xref-elisp-generic-separate-default (arg1 arg2))" 379 (xref-make "(cl-defmethod xref-elisp-generic-separate-default (arg1 arg2))"
375 (xref-make-elisp-location 380 (xref-make-elisp-location
376 '(xref-elisp-generic-separate-default t t) 'cl-defmethod 381 (cl--generic-load-hist-format
382 'xref-elisp-generic-separate-default nil '(t t))
383 'cl-defmethod
377 (expand-file-name "elisp-mode-tests.el" emacs-test-dir))) 384 (expand-file-name "elisp-mode-tests.el" emacs-test-dir)))
378 (xref-make "(cl-defmethod xref-elisp-generic-separate-default ((this xref-elisp-root-type) arg2))" 385 (xref-make "(cl-defmethod xref-elisp-generic-separate-default ((this xref-elisp-root-type) arg2))"
379 (xref-make-elisp-location 386 (xref-make-elisp-location
380 '(xref-elisp-generic-separate-default xref-elisp-root-type t) 'cl-defmethod 387 (cl--generic-load-hist-format
388 'xref-elisp-generic-separate-default nil
389 '(xref-elisp-root-type t))
390 'cl-defmethod
381 (expand-file-name "elisp-mode-tests.el" emacs-test-dir))) 391 (expand-file-name "elisp-mode-tests.el" emacs-test-dir)))
382 )) 392 ))
383 393
@@ -386,11 +396,16 @@ to (xref-elisp-test-descr-to-target xref)."
386 (list 396 (list
387 (xref-make "(cl-defmethod xref-elisp-generic-implicit-generic (arg1 arg2))" 397 (xref-make "(cl-defmethod xref-elisp-generic-implicit-generic (arg1 arg2))"
388 (xref-make-elisp-location 398 (xref-make-elisp-location
389 '(xref-elisp-generic-implicit-generic t t) 'cl-defmethod 399 (cl--generic-load-hist-format
400 'xref-elisp-generic-implicit-generic nil '(t t))
401 'cl-defmethod
390 (expand-file-name "elisp-mode-tests.el" emacs-test-dir))) 402 (expand-file-name "elisp-mode-tests.el" emacs-test-dir)))
391 (xref-make "(cl-defmethod xref-elisp-generic-implicit-generic ((this xref-elisp-root-type) arg2))" 403 (xref-make "(cl-defmethod xref-elisp-generic-implicit-generic ((this xref-elisp-root-type) arg2))"
392 (xref-make-elisp-location 404 (xref-make-elisp-location
393 '(xref-elisp-generic-implicit-generic xref-elisp-root-type t) 'cl-defmethod 405 (cl--generic-load-hist-format
406 'xref-elisp-generic-implicit-generic nil
407 '(xref-elisp-root-type t))
408 'cl-defmethod
394 (expand-file-name "elisp-mode-tests.el" emacs-test-dir))) 409 (expand-file-name "elisp-mode-tests.el" emacs-test-dir)))
395 )) 410 ))
396 411
@@ -409,23 +424,33 @@ to (xref-elisp-test-descr-to-target xref)."
409 (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))) 424 (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir)))
410 (xref-make "(cl-defmethod xref-location-marker ((l xref-elisp-location)))" 425 (xref-make "(cl-defmethod xref-location-marker ((l xref-elisp-location)))"
411 (xref-make-elisp-location 426 (xref-make-elisp-location
412 '(xref-location-marker xref-elisp-location) 'cl-defmethod 427 (cl--generic-load-hist-format
428 'xref-location-marker nil '(xref-elisp-location))
429 'cl-defmethod
413 (expand-file-name "../../../lisp/progmodes/elisp-mode.el" emacs-test-dir))) 430 (expand-file-name "../../../lisp/progmodes/elisp-mode.el" emacs-test-dir)))
414 (xref-make "(cl-defmethod xref-location-marker ((l xref-file-location)))" 431 (xref-make "(cl-defmethod xref-location-marker ((l xref-file-location)))"
415 (xref-make-elisp-location 432 (xref-make-elisp-location
416 '(xref-location-marker xref-file-location) 'cl-defmethod 433 (cl--generic-load-hist-format
434 'xref-location-marker nil '(xref-file-location))
435 'cl-defmethod
417 (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))) 436 (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir)))
418 (xref-make "(cl-defmethod xref-location-marker ((l xref-buffer-location)))" 437 (xref-make "(cl-defmethod xref-location-marker ((l xref-buffer-location)))"
419 (xref-make-elisp-location 438 (xref-make-elisp-location
420 '(xref-location-marker xref-buffer-location) 'cl-defmethod 439 (cl--generic-load-hist-format
440 'xref-location-marker nil '(xref-buffer-location))
441 'cl-defmethod
421 (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))) 442 (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir)))
422 (xref-make "(cl-defmethod xref-location-marker ((l xref-bogus-location)))" 443 (xref-make "(cl-defmethod xref-location-marker ((l xref-bogus-location)))"
423 (xref-make-elisp-location 444 (xref-make-elisp-location
424 '(xref-location-marker xref-bogus-location) 'cl-defmethod 445 (cl--generic-load-hist-format
446 'xref-location-marker nil '(xref-bogus-location))
447 'cl-defmethod
425 (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir))) 448 (expand-file-name "../../../lisp/progmodes/xref.el" emacs-test-dir)))
426 (xref-make "(cl-defmethod xref-location-marker ((l xref-etags-location)))" 449 (xref-make "(cl-defmethod xref-location-marker ((l xref-etags-location)))"
427 (xref-make-elisp-location 450 (xref-make-elisp-location
428 '(xref-location-marker xref-etags-location) 'cl-defmethod 451 (cl--generic-load-hist-format
452 'xref-location-marker nil '(xref-etags-location))
453 'cl-defmethod
429 (expand-file-name "../../../lisp/progmodes/etags.el" emacs-test-dir))) 454 (expand-file-name "../../../lisp/progmodes/etags.el" emacs-test-dir)))
430 )) 455 ))
431 456