unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: A Soare <alinsoar@voila.fr>
To: rms@gnu.org
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Indentation of constants in LISP
Date: Sun,  4 Feb 2007 12:37:18 +0100 (CET)	[thread overview]
Message-ID: <26793640.136591170589038695.JavaMail.www@wwinf4001> (raw)

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

I gave up with the things. Please look again. new diff is attached.

Alin Soare

> Message du 03/02/07 à 12h22
> De : "Richard Stallman" <rms@gnu.org>
> A : alinsoar@voila.fr
> Copie à : emacs-devel@gnu.org
> Objet : Re: Indentation of constants in LISP
> 
> This is an interesting idea.
> 
> thingatpt is not normally loaded, so it would be better to avoid using
> it here.  It should not be needed here, since the code is not trying
> to find the whole symbol name, just checking that there is one.  Can
> you rewrite it to use looking-at instead of thing-at-point?
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
> 
>

[-- Attachment #2: /diff --]
[-- Type: application/octet-stream, Size: 1345 bytes --]

Index: emacs/lisp/emacs-lisp/lisp-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/lisp-mode.el,v
retrieving revision 1.197
diff -r1.197 lisp-mode.el
911a912,931
>               ((save-excursion
>                 (goto-char indent-point)
>                 (skip-chars-forward " \t")
>                 (looking-at ":")
>                 (zerop (skip-syntax-backward "w_")))
>                ;; Align a constant symbol under the last constant symbol
>                ;; from the same level. Not used keywordp in order not to intern it
>                ;; definition of a symbol in *thingatpt.el* (defun forward-symbol ...)
>                (let ((desired-indent
>                       (save-excursion
>                         (goto-char (1+ containing-sexp))
>                         (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
>                         (point))))
>                  (goto-char calculate-lisp-indent-last-sexp)
>                  (while (> (point) desired-indent)
>                    (cond ((and (looking-at ":")
>                                (zerop (skip-syntax-backward "w_")))
>                           (setq desired-indent (point)))
>                          (t (backward-sexp 1))))
>                  (current-column)))

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

             reply	other threads:[~2007-02-04 11:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-04 11:37 A Soare [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-02-23 15:58 Indentation of constants in LISP A Soare
2007-02-22 13:29 A Soare
2007-02-22  2:53 A Soare
2007-02-22  2:24 A Soare
2007-02-22 17:20 ` Richard Stallman
2007-02-21 22:33 A Soare
2007-02-21 10:41 A Soare
2007-02-22 17:21 ` Richard Stallman
2007-02-21  8:32 A Soare
2007-02-20 19:17 A Soare
2007-02-21  8:38 ` Richard Stallman
2007-02-20 18:23 A Soare
2007-02-20 15:28 A Soare
2007-02-20 14:26 A Soare
2007-02-21 22:55 ` Richard Stallman
2007-02-20 14:14 A Soare
2007-02-20 18:04 ` Stuart D. Herring
2007-02-05 14:33 A Soare
2007-02-05  9:51 A Soare
2007-02-05  7:41 A Soare
2007-02-05 19:06 ` Stefan Monnier
2007-02-04 13:28 A Soare
2007-02-05  0:23 ` Richard Stallman
2007-02-05  1:28 ` Stefan Monnier
2007-02-02 16:17 A Soare
2007-02-03 11:19 ` Richard Stallman
2007-02-20 13:29 ` Johan Bockgård
2007-02-21  0:44   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26793640.136591170589038695.JavaMail.www@wwinf4001 \
    --to=alinsoar@voila.fr \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).