Subject: Re: bug#23265: 24.5; Docstring of dabbrev-select-buffers-function

From: Eli Zaretskii <[email-masked]>
Date: Mon, 11 Apr 2016 21:47:06 +0300

> From: Rolf Ade <[email-masked]>
> Date: Sun, 10 Apr 2016 21:10:55 +0200
> 
> I see the following with GNU Emacs 24.5.1 as well as with GNU Emacs
> 25.0.92.
> 
> Start emacs -Q
> 
> C-h v dabbrev-select-buffers-function RET
> 
> In the help buffer click at dabbrev--select-buffers (or move to point to
> it and RET): Instead of the documentation of dabbrev--select-buffers I
> get a wild error msg in the echo area:
> 
> apply: Wrong number of arguments: #[(fun file) "ÃÄ!Å=.ÆÇ	!Á\".È	É#.Ê
> @!
> A'.
> Ab*.ËÌ!)" [file fun location require find-func C-source help-C-file-name indirect-function find-function-search-for-symbol nil ...] 4], 1

This is one of only 2 instances we have in all of Emacs of using the
magic words "source of `SOMETHING'" in a doc string.  (The other one
is `atomic-change-group' in the doc string of `prepare-change-group',
which exhibits the same error.)  These magic words are supposed to
make the help button be of a different type, `help-function-def',
whose help-function requires the minimum of 2 arguments.  But it is
actually called with only one argument, so it barfs.

Git blames Stefan, so I CC him.  Here's the C-level backtrace which
will hopefully help:

  Thread 1 hit Breakpoint 3, xsignal2 (error_symbol=64344,
      arg1=-6917529027613047888, arg2=4611686018427387905) at eval.c:1598
  1598      xsignal (error_symbol, list2 (arg1, arg2));
  (gdb) bt
  #0  xsignal2 (error_symbol=64344, arg1=-6917529027613047888,
      arg2=4611686018427387905) at eval.c:1598
  #1  0x0121f564 in funcall_lambda (fun=-6917529027613047888, nargs=1,
      arg_vector=0x82d0a8) at eval.c:2890
  #2  0x0121e92e in Ffuncall (nargs=2, args=0x82d0a0) at eval.c:2742
  #3  0x0121cbaa in Fapply (nargs=2, args=0x82d0a0) at eval.c:2278
  #4  0x0121e213 in Ffuncall (nargs=3, args=0x82d098) at eval.c:2673
  #5  0x0127ec68 in exec_byte_code (bytestr=-9223372036759477432,
      vector=-6917529027612181080, maxdepth=4611686018427387910,
      args_template=0, nargs=0, args=0x0) at bytecode.c:880
  #6  0x0121f983 in funcall_lambda (fun=-6917529027612173280, nargs=3,
      arg_vector=0x82d650) at eval.c:2921
  #7  0x0121e92e in Ffuncall (nargs=4, args=0x82d648) at eval.c:2742
  #8  0x0127ec68 in exec_byte_code (bytestr=-9223372036830088496,
      vector=-6917529027614880520, maxdepth=4611686018427387910,
      args_template=0, nargs=0, args=0x0) at bytecode.c:880
  #9  0x0121f983 in funcall_lambda (fun=-6917529027612177144, nargs=1,
      arg_vector=0x82dc00) at eval.c:2921
  #10 0x0121e92e in Ffuncall (nargs=2, args=0x82dbf8) at eval.c:2742
  #11 0x0127ec68 in exec_byte_code (bytestr=-9223372036834047504,
      vector=-6917529027620353536, maxdepth=4611686018427387908,
      args_template=0, nargs=0, args=0x0) at bytecode.c:880
  #12 0x0121f983 in funcall_lambda (fun=-6917529027620353648, nargs=2,
      arg_vector=0x82e1a0) at eval.c:2921
  #13 0x0121e92e in Ffuncall (nargs=3, args=0x82e198) at eval.c:2742
  #14 0x0127ec68 in exec_byte_code (bytestr=-9223372036834045520,
      vector=-6917529027620351552, maxdepth=4611686018427387908,
      args_template=0, nargs=0, args=0x0) at bytecode.c:880
  #15 0x0121f983 in funcall_lambda (fun=-6917529027620351656, nargs=2,
      arg_vector=0x82e740) at eval.c:2921
  #16 0x0121e92e in Ffuncall (nargs=3, args=0x82e738) at eval.c:2742
  #17 0x0127ec68 in exec_byte_code (bytestr=-9223372036834045520,
      vector=-6917529027620351552, maxdepth=4611686018427387908,
      args_template=0, nargs=0, args=0x0) at bytecode.c:880
  #18 0x0121f983 in funcall_lambda (fun=-6917529027620351656, nargs=1,
      arg_vector=0x82ef18) at eval.c:2921
  #19 0x0121e92e in Ffuncall (nargs=2, args=0x82ef10) at eval.c:2742
  #20 0x012106bf in Ffuncall_interactively (nargs=2, args=0x82ef10)
      at callint.c:248
  #21 0x0121e213 in Ffuncall (nargs=3, args=0x82ef08) at eval.c:2673
  #22 0x0121cbaa in Fapply (nargs=3, args=0x82ef08) at eval.c:2278
  #23 0x01210e6d in Fcall_interactively (function=4275160176, record_flag=0,
      keys=-6917529027616817392) at callint.c:385
  #24 0x0121e40f in Ffuncall (nargs=4, args=0x82f1c8) at eval.c:2700
  #25 0x0127ec68 in exec_byte_code (bytestr=-9223372036833779432,
      vector=-6917529027620085464, maxdepth=4611686018427387917,
      args_template=4611686018427388929, nargs=1, args=0x82f780)
      at bytecode.c:880
  #26 0x0121f33b in funcall_lambda (fun=-6917529027620085528, nargs=1,
      arg_vector=0x82f778) at eval.c:2855
  #27 0x0121e92e in Ffuncall (nargs=2, args=0x82f770) at eval.c:2742
  #28 0x0121dac7 in call1 (fn=15792, arg1=4275160176) at eval.c:2552
  #29 0x01151863 in command_loop_1 () at keyboard.c:1471
  #30 0x01218ff4 in internal_condition_case (bfun=0x1150da2 <command_loop_1>,
      handlers=21168, hfun=0x115003d <cmd_error>) at eval.c:1309
  #31 0x01150844 in command_loop_2 (ignore=0) at keyboard.c:1099
  #32 0x0121816e in internal_catch (tag=56728, func=0x1150808 <command_loop_2>,
      arg=0) at eval.c:1074
  #33 0x011507c2 in command_loop () at keyboard.c:1078
  #34 0x0114fa59 in recursive_edit_1 () at keyboard.c:684
  #35 0x0114fd16 in Frecursive_edit () at keyboard.c:755
  #36 0x0114d528 in main (argc=2, argv=0xa427e0) at emacs.c:1605

  Lisp Backtrace:
  0x1abc3b0 PVEC_COMPILED
  "apply" (0x82d0a0)
  "help-do-xref" (0x82d650)
  "help-button-action" (0x82dc00)
  "button-activate" (0x82e1a0)
  "push-button" (0x82e740)
  "push-button" (0x82ef18)
  "funcall-interactively" (0x82ef10)
  "call-interactively" (0x82f1d0)
  "command-execute" (0x82f778)