From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Wiesner Newsgroups: gmane.emacs.devel Subject: Re: Mark custom function for interactive use only Date: Sun, 24 Nov 2013 20:52:29 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1385322750 16412 80.91.229.3 (24 Nov 2013 19:52:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Nov 2013 19:52:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 24 20:52:36 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VkfjP-0002ir-Sn for ged-emacs-devel@m.gmane.org; Sun, 24 Nov 2013 20:52:36 +0100 Original-Received: from localhost ([::1]:48315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkfjP-0006AP-DM for ged-emacs-devel@m.gmane.org; Sun, 24 Nov 2013 14:52:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkfjM-0006A4-2g for emacs-devel@gnu.org; Sun, 24 Nov 2013 14:52:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkfjK-0002Fb-RH for emacs-devel@gnu.org; Sun, 24 Nov 2013 14:52:32 -0500 Original-Received: from mail-qa0-x22e.google.com ([2607:f8b0:400d:c00::22e]:37600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkfjK-0002FS-KW for emacs-devel@gnu.org; Sun, 24 Nov 2013 14:52:30 -0500 Original-Received: by mail-qa0-f46.google.com with SMTP id f11so2285213qae.19 for ; Sun, 24 Nov 2013 11:52:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=aW3VCaeY16It40Q0YLFwqs8CqA5K/IA/aEOYzvApl4Y=; b=ywd6xwFE8sDU3QsIvHmjn3CtfJYjy1/dF/JVckLJ2RXWAxe2+sQ3dlsh2dbBRDe7oy mSAhaIoJm8gCxYOO0Y+5kBYI4kRn0FeBoBfzJ0AGzUjX+fgQOfCCQOGZVBJbBpzelj26 hCTNyDmEJ6qwZ73P3LTNJCazxgHbyav9yPPusDf/nKDArXhn8jGQ5aRyuhf4oVmWuZJB jHgU6mJy+2OeZsHWnkuB7N8Pnx3oF9y643GR5xO47kF4eZJW8sRcvCG10cKLRXmId+I6 fvipglx8QsMxT87+qvKOUtQwUbR6jwtDGAmq7BRAt0MxQdg1Vg6LgnVA2zZqnq/HPqAN ViPw== X-Received: by 10.49.28.101 with SMTP id a5mr4794089qeh.70.1385322749651; Sun, 24 Nov 2013 11:52:29 -0800 (PST) Original-Received: by 10.224.185.15 with HTTP; Sun, 24 Nov 2013 11:52:29 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c00::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:165663 Archived-At: 2013/11/24 Stefan Monnier : >> as you all know, the byte compiler warns if some functions (e.g. >> "next-line") are called from Lisp. > >> Is there a way to mark my own functions for "interactive use only" and >> have the byte compiler emit the same warning for these functions, too? >> Do I need to set a special symbol property, etc.? > > You can add them to byte-compile-interactive-only-functions, but it's > rather inconvenient. We should replace this list with a symbol > property, indeed. Patch welcome, I presume I'd just patch `byte-compile-form' in bytecomp.el to also look at a corresponding property, e.g. `interactive-use-only`. Anything else? > > > Stefan