Deutsch   English   Fran├žais   Italiano  
<87h7wdxm36.fsf@example.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder6.news.weretis.net!feeder7.news.weretis.net!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: =?utf-8?Q?Denis_Bitouz=C3=A9?= <dbitouze@wanadoo.fr>
Newsgroups: fr.comp.applications.emacs
Subject: Re: `add-to-list` : factorisation ?
Date: Mon, 18 May 2020 18:08:13 +0200
Organization: A noiseless patient Spider
Lines: 131
Message-ID: <87h7wdxm36.fsf@example.com>
References: <87k11fk12p.fsf@example.com> <878shvc950.fsf@charlotte.rdhp>
	<87mu6aijsu.fsf@example.com> <87pnb6beql.fsf@charlotte.rdhp>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: reader02.eternal-september.org; posting-host="0134ff09fa1402fcbc6fbb2b3b7b4b88";
	logging-data="24113"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+B/aLxFRJSrwv8DOm9VHMqdE86mZ/U20Y="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
Cancel-Lock: sha1:tM2HKoG/pTkABdkSllL78e+B3R0=
	sha1:8AbC6kkZ7VkG5m2Bp27y+q04DdY=
X-Archive: encrypt
X-Url: http://gte.univ-littoral.fr/members/dbitouze/pub/latex
Bytes: 7087

Le 14/05/20 =C3=A0 19h36, Jean-Jacques R=C3=A9torr=C3=A9 a =C3=A9crit :

> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> (setq LaTeX-verbatim-environments-local '("truc"
>                                           "machin"
>                                           "bidule"
>                                           ))
>
> (dolist (env LaTeX-verbatim-environments-local)
>       (add-to-list 'LaTeX-indent-environment-list (list env #'current-ind=
entation))))
>=20=20=20=20=20=20=20
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
>
> Cette fois j'ai test=C3=A9 (je ne l'avais pas fait honte =C3=A0 moi ) car=
 =C3=A7a
> m'avais paru trop facile, maintenant je comprends mieux ta demande.

Bon, finalement, =C3=A7a marchait dans mon instance Emacs d=C3=A9j=C3=A0 ou=
verte, mais
le red=C3=A9marrage plante. Si je commente la ligne `(dolist ...)` puis
red=C3=A9marre, Emacs se lance normalement et un C-x C-e en fin de cette
ligne me donne :

  =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80
  =E2=94=82 Debugger entered--Lisp error: (void-variable LaTeX-indent-envir=
onment-list)
  =E2=94=82   (member x LaTeX-indent-environment-list)
  =E2=94=82   (if (member x LaTeX-indent-environment-list) LaTeX-indent-env=
ironment-list (setq LaTeX-indent-environment-list (cons x LaTeX-indent-envi=
ronment-list)))
  =E2=94=82   (let* ((x (list env (function current-indentation)))) (if (me=
mber x LaTeX-indent-environment-list) LaTeX-indent-environment-list (setq L=
aTeX-indent-environment-list (cons x LaTeX-indent-environment-list))))
  =E2=94=82   (while --dolist-tail-- (setq env (car --dolist-tail--)) (let*=
 ((x (list env (function current-indentation)))) (if (member x LaTeX-indent=
-environment-list) LaTeX-indent-environment-list (setq LaTeX-indent-environ=
ment-list (cons x LaTeX-indent-environment-list)))) (setq --dolist-tail-- (=
cdr --dolist-tail--)))
  =E2=94=82   (let ((--dolist-tail-- LaTeX-verbatim-environments-local) env=
) (while --dolist-tail-- (setq env (car --dolist-tail--)) (let* ((x (list e=
nv (function current-indentation)))) (if (member x LaTeX-indent-environment=
-list) LaTeX-indent-environment-list (setq LaTeX-indent-environment-list (c=
ons x LaTeX-indent-environment-list)))) (setq --dolist-tail-- (cdr --dolist=
-tail--))))
  =E2=94=82   eval((let ((--dolist-tail-- LaTeX-verbatim-environments-local=
) env) (while --dolist-tail-- (setq env (car --dolist-tail--)) (let* ((x (l=
ist env (function current-indentation)))) (if (member x LaTeX-indent-enviro=
nment-list) LaTeX-indent-environment-list (setq LaTeX-indent-environment-li=
st (cons x LaTeX-indent-environment-list)))) (setq --dolist-tail-- (cdr --d=
olist-tail--)))) nil)
  =E2=94=82   elisp--eval-last-sexp(nil)
  =E2=94=82   eval-last-sexp(nil)
  =E2=94=82   funcall-interactively(eval-last-sexp nil)
  =E2=94=82   call-interactively(eval-last-sexp nil nil)
  =E2=94=82   command-execute(eval-last-sexp)
  =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80

Pourtant, `C-h v RET LaTeX-indent-environment-list RET` donne :

  =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80
  =E2=94=82 LaTeX-indent-environment-list is a variable defined in =E2=80=
=98latex.el=E2=80=99.
  =E2=94=82 Its value is shown below.
  =E2=94=82=20
  =E2=94=82 Documentation:
  =E2=94=82 Alist of environments with special indentation.
  =E2=94=82 The second element in each entry is the function to calculate t=
he
  =E2=94=82 indentation level in columns.
  =E2=94=82=20
  =E2=94=82 Environments present in this list are not filled by filling
  =E2=94=82 functions, see =E2=80=98LaTeX-fill-region-as-paragraph=E2=80=99.
  =E2=94=82=20
  =E2=94=82 You can customize this variable.
  =E2=94=82=20
  =E2=94=82 Value:
  =E2=94=82 (("sverbatim" current-indentation)
  =E2=94=82  ("comment" current-indentation)
  =E2=94=82  ("tikzpicture" current-indentation)
  =E2=94=82  ("verbatim" current-indentation)
  =E2=94=82  ("verbatim*" current-indentation)
  =E2=94=82  ("filecontents" current-indentation)
  =E2=94=82  ("filecontents*" current-indentation)
  =E2=94=82  ("tabular" LaTeX-indent-tabular)
  =E2=94=82  ("tabular*" LaTeX-indent-tabular)
  =E2=94=82  ("align" LaTeX-indent-tabular)
  =E2=94=82  ("align*" LaTeX-indent-tabular)
  =E2=94=82  ("array" LaTeX-indent-tabular)
  =E2=94=82  ("eqnarray" LaTeX-indent-tabular)
  =E2=94=82  ("eqnarray*" LaTeX-indent-tabular)
  =E2=94=82  ("displaymath")
  =E2=94=82  ("equation")
  =E2=94=82  ("equation*")
  =E2=94=82  ("picture")
  =E2=94=82  ("tabbing"))
  =E2=94=82 Original value was=20
  =E2=94=82 (("verbatim" current-indentation)
  =E2=94=82  ("verbatim*" current-indentation)
  =E2=94=82  ("filecontents" current-indentation)
  =E2=94=82  ("filecontents*" current-indentation)
  =E2=94=82  ("tabular" LaTeX-indent-tabular)
  =E2=94=82  ("tabular*" LaTeX-indent-tabular)
  =E2=94=82  ("align" LaTeX-indent-tabular)
  =E2=94=82  ("align*" LaTeX-indent-tabular)
  =E2=94=82  ("array" LaTeX-indent-tabular)
  =E2=94=82  ("eqnarray" LaTeX-indent-tabular)
  =E2=94=82  ("eqnarray*" LaTeX-indent-tabular)
  =E2=94=82  ("displaymath")
  =E2=94=82  ("equation")
  =E2=94=82  ("equation*")
  =E2=94=82  ("picture")
  =E2=94=82  ("tabbing"))
  =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80

la diff=C3=A9rence entre les valeurs courantes et originales =C3=A9tant due=
s au
fait que `emacs-leuven` contient :

  =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80
  =E2=94=82 (add-to-list 'LaTeX-indent-environment-list '("tikzpicture" cur=
rent-indentation))
  =E2=94=82 (add-to-list 'LaTeX-indent-environment-list '("comment"     cur=
rent-indentation))
  =E2=94=82 (add-to-list 'LaTeX-indent-environment-list '("sverbatim"   cur=
rent-indentation))
  =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80
--=20
Denis