]> git.eshelyaron.com Git - emacs.git/commitdiff
Use 'defalias' in test module instead of 'fset'.
authorPhilipp Stephani <phst@google.com>
Fri, 2 Feb 2018 19:40:10 +0000 (20:40 +0100)
committerPhilipp Stephani <phst@google.com>
Fri, 2 Feb 2018 19:40:10 +0000 (20:40 +0100)
This puts functions defined in the module into the 'load-history'.

* test/data/emacs-module/mod-test.c (bind_function): Use 'defalias'
instead of 'fset'.

* test/src/emacs-module-tests.el (module/describe-function-1): Adapt
unit test.

test/data/emacs-module/mod-test.c
test/src/emacs-module-tests.el

index a1c115f00d2c357adddfdc099829c8bbd95e5419..db05e90bc4916769d1ae44c1e6e039cbd526d460 100644 (file)
@@ -299,11 +299,11 @@ provide (emacs_env *env, const char *feature)
 static void
 bind_function (emacs_env *env, const char *name, emacs_value Sfun)
 {
-  emacs_value Qfset = env->intern (env, "fset");
+  emacs_value Qdefalias = env->intern (env, "defalias");
   emacs_value Qsym = env->intern (env, name);
   emacs_value args[] = { Qsym, Sfun };
 
-  env->funcall (env, Qfset, 2, args);
+  env->funcall (env, Qdefalias, 2, args);
 }
 
 /* Module init function.  */
index 05be8383dcc9d5ad30426aa065955417c674c5c8..052f5c2f12c279387ec737979e8a499bd84d0213 100644 (file)
@@ -268,8 +268,9 @@ during garbage collection."
     (let ((standard-output (current-buffer)))
       (describe-function-1 #'mod-test-sum)
       (should (equal (buffer-substring-no-properties 1 (point-max))
-                     ;; FIXME: This should print the filename.
-                     "a module function.
+                     ;; FIXME: This should print the actual module
+                     ;; filename.
+                     "a module function in `src/emacs-module-tests.el'.
 
 (mod-test-sum a b)