From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#18349: 24.3.92; define-minor-mode: generated doc of hook: mode vs. modefun Date: Fri, 29 Aug 2014 00:26:41 +0200 Message-ID: <874mww45em.fsf@web.de> Reply-To: michael_heerdegen@web.de NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1409264909 29041 80.91.229.3 (28 Aug 2014 22:28:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2014 22:28:29 +0000 (UTC) To: 18349@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 29 00:28:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XN8B2-0005mX-SM for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Aug 2014 00:28:21 +0200 Original-Received: from localhost ([::1]:39262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN8B2-0007ns-8m for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Aug 2014 18:28:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN8Ar-0007m4-Sc for bug-gnu-emacs@gnu.org; Thu, 28 Aug 2014 18:28:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN8Ak-0002bL-Ir for bug-gnu-emacs@gnu.org; Thu, 28 Aug 2014 18:28:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN8Ak-0002bE-GX for bug-gnu-emacs@gnu.org; Thu, 28 Aug 2014 18:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XN8Aj-0002cn-V7 for bug-gnu-emacs@gnu.org; Thu, 28 Aug 2014 18:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Aug 2014 22:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18349 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140926483910033 (code B ref -1); Thu, 28 Aug 2014 22:28:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Aug 2014 22:27:19 +0000 Original-Received: from localhost ([127.0.0.1]:52890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XN8A2-0002bk-Fz for submit@debbugs.gnu.org; Thu, 28 Aug 2014 18:27:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40950) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XN8A0-0002bW-3V for submit@debbugs.gnu.org; Thu, 28 Aug 2014 18:27:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN89n-00026g-Mj for submit@debbugs.gnu.org; Thu, 28 Aug 2014 18:27:10 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN89n-00026c-KR for submit@debbugs.gnu.org; Thu, 28 Aug 2014 18:27:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN89h-0007jk-CK for bug-gnu-emacs@gnu.org; Thu, 28 Aug 2014 18:27:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN89Z-00023C-Mz for bug-gnu-emacs@gnu.org; Thu, 28 Aug 2014 18:26:57 -0400 Original-Received: from mout.web.de ([212.227.15.3]:58633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN89Z-00022g-E7 for bug-gnu-emacs@gnu.org; Thu, 28 Aug 2014 18:26:49 -0400 Original-Received: from drachen.dragon ([90.187.5.104]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0MORtt-1XHMzg1ddF-005q6l for ; Fri, 29 Aug 2014 00:26:46 +0200 X-Provags-ID: V03:K0:KbbdMuGtDfk+TlVDFpIA1uvAFbQAA7tHG6Cu4HFcEX3oH0HJXnL l7g+X1rViEthx39LR7tiWU0GoL0mYmreb229q+AiBH0M34V6W/e/cAEBbOcmnI/7ZwUylSx 3kht59Ucc264fKsqW8ZxG5/afFGfPQDcGvHSg6XIaYu+Rla7YzmwBOEAr5nlOXB0W8MxsEo yfDToAj9E0bfK/lJocp7w== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92787 Archived-At: --=-=-= Content-Type: text/plain Hello, in emacs -Q, eval (define-minor-mode my-minor-mode "Doc" :variable foo ...) Then, C-h v my-minor-mode-hook: [...] Documentation: Hook run after entering or leaving `foo'. [...] ^^^^^ This makes no sense, the doc of the hook should include the name of the mode function, not that of the variable. That happens e.g. for `read-only-mode-hook'. Is this the right thing? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=easy-mmode.patch *** /tmp/ediff9150_DV 2014-08-29 00:18:07.582868434 +0200 --- /home/micha/software/emacs/lisp/emacs-lisp/easy-mmode.el 2014-08-29 00:17:46.634718136 +0200 *************** *** 300,306 **** ,(format "Hook run after entering or leaving `%s'. No problems result if this variable is not bound. `add-hook' automatically binds it. (This is true for all hook variables.)" ! mode)) ;; Define the minor-mode keymap. ,(unless (symbolp keymap) ;nil is also a symbol. --- 300,306 ---- ,(format "Hook run after entering or leaving `%s'. No problems result if this variable is not bound. `add-hook' automatically binds it. (This is true for all hook variables.)" ! modefun)) ;; Define the minor-mode keymap. ,(unless (symbolp keymap) ;nil is also a symbol. --=-=-= Content-Type: text/plain Thanks, Michael. In GNU Emacs 24.3.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2) of 2014-08-11 on drachen Windowing system distributor `The X.Org Foundation', version 11.0.11600000 System Description: Debian GNU/Linux testing (jessie) Important settings: value of $LC_ALL: de_DE.utf8 value of $LC_COLLATE: C value of $LC_TIME: C value of $LANG: de_DE.utf8 locale-coding-system: utf-8-unix --=-=-=--