From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Auto Fill Comments Date: Mon, 30 Nov 2020 14:45:27 -0800 (PST) Message-ID: <236fb79f-014c-412f-9c78-fd9c774a57fc@default> References: <87zh324fa9.fsf@web.de> <837dq5ordu.fsf@gnu.org> <871rgd6jzk.fsf@web.de> <87r1oclvkp.fsf@web.de> <87blffzq7f.fsf@web.de> <87wny2r1a1.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28535"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Christopher Dimech , Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 30 23:46:06 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjrvq-0007IM-8E for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 30 Nov 2020 23:46:06 +0100 Original-Received: from localhost ([::1]:47850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjrvp-0004zT-6h for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 30 Nov 2020 17:46:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjrvO-0004yH-KR for help-gnu-emacs@gnu.org; Mon, 30 Nov 2020 17:45:38 -0500 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:45148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjrvM-0001TJ-K7 for help-gnu-emacs@gnu.org; Mon, 30 Nov 2020 17:45:38 -0500 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AUMcwWA171335; Mon, 30 Nov 2020 22:45:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=WzvLPY6o0VdvYMPPOYvyCo9uZ0WxB21k+5sBQFlhUC0=; b=oZ/UOGKyPuxJvnRMX3FzDV+CYs+dqo12OIe3y35xbQqDpCiRzTvivAjSN5OeJV5ydaFE U+hlhpT31AKFzwJd2DyfQcLByHM7kPP+VQeWomLo/bBlfDqhkOcpPapPcQtb3ZGQo3PM eXgqGhLyWBaZUa4uDs0L50Lrc2gqWHlIQRggQPKX+veBlDTfYm9VQXPfN4+NHZ+jCptD TB+4QjNFBzSvEcQjZFVKsBXfX2Ry5F3N8vJQ5SCu1/CXwFAYYGksDz2QwJCN8d6BbOSR eMgkkK6wa7vkcgRBFjr+UL+ybVO10pEBEKT6/gIG/AlsHdr9S+YvnzbmmE1HSCidD/W4 DA== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 353c2aqut5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 30 Nov 2020 22:45:32 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AUMeEXu107030; Mon, 30 Nov 2020 22:45:31 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 3540ar8m8f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Nov 2020 22:45:31 +0000 Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0AUMjU2k014718; Mon, 30 Nov 2020 22:45:30 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5071.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9821 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 phishscore=0 mlxscore=0 adultscore=0 malwarescore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011300141 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9821 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 lowpriorityscore=0 clxscore=1031 bulkscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 spamscore=0 adultscore=0 mlxscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011300141 Received-SPF: pass client-ip=141.146.126.79; envelope-from=drew.adams@oracle.com; helo=aserp2130.oracle.com X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.496, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125779 Archived-At: > I understand that local variables are meant for buffer customization > that > one uses most often in mode hooks. There has been some > misunderstanding. >=20 > By not very good I meant: Can we have a typical example and how it > would look like. > I mean, rather than with foo, bar, a, g, temp, body. For instance, > making a command > for some particular mode buffer, and a brief description of what is > achieved. Apologies > should I not understand how hard that can be. Hope my comment helps > transmit what I mean > better. It doesn't get any more specific than this, IMO: `C-x f' aka `M-x set-fill-column'. Tada! Variable `fill-column' just got its value updated for the current buffer. `C-h f' tells you that that command sets var `fill-column'. Clicking that var name in *Help* then tells you that the var: Automatically becomes buffer-local when set. ^^^^^^^^^^^^^ That is, this particular variable is ALWAYS=20 buffer-local - its value is separate for each buffer. What does "automatically" mean here? It means that to make it buffer-local you don't need to do anything - you have no choice: it's buffer-local in every buffer. Why would that be the case for `fill-column'? Because we figure it makes sense to always give it a buffer-local value, that's all. You can set the _default_ value for all buffers using Customize (as the doc string tells you). E.g., customize `fill-column' to 71, and if nothing sets it to something different in a given buffer then it'll be 71. Most variables that might have buffer-local values in some buffers do NOT automatically become buffer-local in every buffer. That is, they are not "automatically" buffer-local. They become buffer-local for a given buffer only if something explicitly makes them buffer-local there, e.g., using function `make-local-variable'. To make a variable ALWAYS (i.e., "automatically") be buffer-local (i.e., in all buffers) you use the stronger function `make-variable-buffer-local'. The doc strings (`C-h f') of those two functions tell you all of this. (`make-local-variable' might be more precisely named `give-var-a-separate-value-in-THIS-buffer'.) And yes (sigh), I'm just repeating what the help and doc say better. RTFM really is your friend, you know. ;-)