From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: How to add property for a buffer object Date: Wed, 12 Sep 2012 08:58:11 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347465516 9009 80.91.229.3 (12 Sep 2012 15:58:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2012 15:58:36 +0000 (UTC) To: "'York Zhao'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 12 17:58:40 2012 Return-path: Envelope-to: geh-help-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 1TBpKp-0004aB-8K for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Sep 2012 17:58:39 +0200 Original-Received: from localhost ([::1]:40198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBpKl-0001w0-Lk for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Sep 2012 11:58:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBpKX-0001vi-Jo for help-gnu-emacs@gnu.org; Wed, 12 Sep 2012 11:58:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBpKT-00011B-IS for help-gnu-emacs@gnu.org; Wed, 12 Sep 2012 11:58:21 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:46963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBpKT-000115-CO for help-gnu-emacs@gnu.org; Wed, 12 Sep 2012 11:58:17 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8CFwDXY031061 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Sep 2012 15:58:14 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8CFwCXG029717 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Sep 2012 15:58:13 GMT Original-Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8CFwCSq003362; Wed, 12 Sep 2012 10:58:12 -0500 Original-Received: from dradamslap1 (/130.35.178.248) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 12 Sep 2012 08:58:12 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac2Q+6AMuV2cPUzXT1WvTKDP/AARxwAA1vlw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86733 Archived-At: > is there any way to "get" and "put" property on a buffer? You can use `get' and `put' on the symbol that is the value of variable `major-mode'. Or you can simply make some variable buffer-local for a given mode. > Or, is there any other solution to have one function toggle > either `longlines-mode' or 'refill-mode'? Test something specific to the buffer or its mode (see above). Or just use a prefix arg (and test that).