From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: skeleton.el machinery eats newlines.
Date: Sat, 11 Jan 2003 20:22:03 -0600 (CST) [thread overview]
Message-ID: <200301120222.UAA28562@eel.dms.auburn.edu> (raw)
In-Reply-To: <200301120120.TAA28541@eel.dms.auburn.edu> (message from Luc Teirlinck on Sat, 11 Jan 2003 19:20:41 -0600 (CST))
Here is the problem with my previous patch:
The return value of sh-get-indent-info after my patch avoiding the
"Beginning of buffer error" (in the previously described situation)
is:
((t 1) (+ sh-indent-for-case-alt) (+ sh-indent-for-case-label))
Now we add:
#! /usr/local/bin/bash
and a blank line at the beginning of the buffer.
New return value (same relative position of point):
((t 25) (+ sh-indent-for-case-alt))
Adding only a blank line yields:
((t 2) (+ sh-indent-for-case-alt))
The 25 and 2 are expected. The beginning of the case statement is now
at position 25 (2, respectively). However, somehow the
(+ sh-indent-for-case-label) in the first return value seems to be
a remaining bug.
Note that the entire bug never occurs if the file starts with any kind
of comment, magic or not, or with a blank line. Even if we can take
care of this problem, I do not know whether there are no other places
in the indentation machinery that assume the file to start with some
kind of comment, or blank line.
Could somebody familiar with the shell indentation machinery take a
look at this? The (forward-char -1) is where the problem manifests
itself. Clearly at the beginning of the buffer we should definitely
not call (forward-char -1), but somehow for the remaining code to work
well point should be at "the end of the line before the beginning of
the buffer".
Sincerely,
Luc.
next prev parent reply other threads:[~2003-01-12 2:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-08 4:29 skeleton.el machinery eats newlines Luc Teirlinck
2003-01-10 4:36 ` Luc Teirlinck
2003-01-10 6:24 ` Luc Teirlinck
2003-01-10 15:33 ` Luc Teirlinck
2003-01-11 0:21 ` Richard Stallman
2003-01-11 2:35 ` Luc Teirlinck
2003-01-11 19:27 ` Stefan Monnier
2003-01-12 17:10 ` Luc Teirlinck
2003-01-12 19:05 ` Luc Teirlinck
2003-01-11 21:44 ` Luc Teirlinck
2003-01-11 21:49 ` Luc Teirlinck
2003-01-11 22:27 ` Luc Teirlinck
2003-01-11 23:45 ` Glenn Morris
2003-01-11 23:49 ` Luc Teirlinck
2003-01-12 0:34 ` Luc Teirlinck
2003-01-12 1:20 ` Luc Teirlinck
2003-01-12 2:22 ` Luc Teirlinck [this message]
2003-01-20 4:25 ` Luc Teirlinck
2003-01-11 19:43 ` Stefan Monnier
2003-01-11 21:29 ` Luc Teirlinck
2003-01-12 5:23 ` Luc Teirlinck
2003-01-12 6:14 ` Luc Teirlinck
2003-01-17 20:37 ` Stefan Monnier
2003-01-18 1:43 ` Luc Teirlinck
2003-01-18 20:41 ` Stefan Monnier
2003-01-19 1:02 ` Luc Teirlinck
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200301120222.UAA28562@eel.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.