From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Johan_Bockg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: Native line numbers landed on master Date: Fri, 04 Oct 2019 17:57:52 +0200 Message-ID: <877e5ksdtr.fsf@gnu.org> References: <834l4xbfmp.fsf@gnu.org> <87ef414dfn.fsf@wavexx.thregr.org> <83o9359w3l.fsf@gnu.org> <83eezycce5.fsf@gnu.org> <87muekj0i9.fsf@wavexx.thregr.org> <87d0fgagjl.fsf@gnus.org> <20191001225254.mwjnxlynjdc3mz7y@Ergus> <83lfu389vn.fsf@gnu.org> <87bluxg1b5.fsf@wavexx.thregr.org> <83blux7jvz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="47463"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: spacibba@aol.com, yuri.v.khan@gmail.com, Yuri D'Elia , Lars Magne Ingebrigtsen , Emacs developers , Eli Zaretskii To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 04 18:06:56 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iGQ6Y-000CA6-Bm for ged-emacs-devel@m.gmane.org; Fri, 04 Oct 2019 18:06:54 +0200 Original-Received: from localhost ([::1]:50086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGQ6W-0004QH-UM for ged-emacs-devel@m.gmane.org; Fri, 04 Oct 2019 12:06:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42790) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGPy6-0001Dn-BP for emacs-devel@gnu.org; Fri, 04 Oct 2019 11:58:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iGPy4-0002D3-Fq; Fri, 04 Oct 2019 11:58:08 -0400 Original-Received: from c-2ccce455.04-211-6c6b701.bbcust.telenor.se ([85.228.204.44]:33916 helo=muon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iGPxr-000822-OT; Fri, 04 Oct 2019 11:57:57 -0400 In-Reply-To: (Juanma Barranquero's message of "Fri, 4 Oct 2019 07:01:41 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:240575 Archived-At: Juanma Barranquero writes: > + DEFVAR_LISP ("display-line-numbers-major-tick", Vdisplay_line_numbers_= major_tick, > + doc: /* If an integer N > 0, highlight line number of every Nth line. > +The line number is shown with the `line-number-major-tick' face. > +Otherwise, no special highlighting is done every Nth line. > +Note that major ticks take precedence over minor ticks. */); > + Vdisplay_line_numbers_major_tick =3D make_fixnum (0); Why not use DEFVAR_INT? > + DEFSYM (Qdisplay_line_numbers_major_tick, "display-line-numbers-major-= tick"); > + Fmake_variable_buffer_local (Qdisplay_line_numbers_major_tick); I realize that many existing variables in xdisp.c don't follow this recommendation, but the manual says the following: *Warning:* Don=E2=80=99t assume that you should use =E2=80=98make-variable-buffer-local=E2=80=99 for user-option variables= , simply because users _might_ want to customize them differently in different buffers. Users can make any variable local, when they wish to. It is better to leave the choice to them. The time to use =E2=80=98make-variable-buffer-local=E2=80=99 is when i= t is crucial that no two buffers ever share the same binding. For example, when a variable is used for internal purposes in a Lisp program which depends on having separate values in separate buffers, then using =E2=80=98make-variable-buffer-local=E2=80=99 can be the best solution.