* termios tab expansion on darwin
@ 2008-07-07 23:08 Emanuele Giaquinta
2008-07-08 1:28 ` Stefan Monnier
2008-10-20 20:53 ` Emanuele Giaquinta
0 siblings, 2 replies; 4+ messages in thread
From: Emanuele Giaquinta @ 2008-07-07 23:08 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 711 bytes --]
Hi,
the os headers in src/s/ for *BSD and darwin define TAB3 to OXTABS,
which is the equivalent of TAB3 on those systems to control tab
expansion. On darwin-8 sys/termios.h defines TAB3 though (to a no-op
flag it seems), and since sysdep.c includes config.h (which includes
the os header in s/) before sys/termios.h, TAB3 is redefined (as
it can be seen using -Wsystem-headers) to the no-op flag. The effect
is that tab expansion is not disabled, so if it is originally active
for the terminal from which emacs is started (which is the case for
xterm) it will cause cursor movements performed with tabs to corrupt
the display. The attached patch fixes it, not sure if it is the best
approach though.
Emanuele
[-- Attachment #2: oxtabs.diff --]
[-- Type: text/x-diff, Size: 424 bytes --]
diff --git a/src/s/darwin.h b/src/s/darwin.h
index aa509b7..0cc95f1 100644
--- a/src/s/darwin.h
+++ b/src/s/darwin.h
@@ -216,6 +216,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* System uses OXTABS instead of the expected TAB3. (Copied from
bsd386.h.) */
+#include <sys/termios.h>
+#undef TAB3
#define TAB3 OXTABS
/* Darwin ld insists on the use of malloc routines in the System
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: termios tab expansion on darwin
2008-07-07 23:08 termios tab expansion on darwin Emanuele Giaquinta
@ 2008-07-08 1:28 ` Stefan Monnier
2008-07-08 10:39 ` Emanuele Giaquinta
2008-10-20 20:53 ` Emanuele Giaquinta
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2008-07-08 1:28 UTC (permalink / raw)
To: Emanuele Giaquinta; +Cc: emacs-devel
> diff --git a/src/s/darwin.h b/src/s/darwin.h
> index aa509b7..0cc95f1 100644
> --- a/src/s/darwin.h
> +++ b/src/s/darwin.h
> @@ -216,6 +216,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
> /* System uses OXTABS instead of the expected TAB3. (Copied from
> bsd386.h.) */
> +#include <sys/termios.h>
> +#undef TAB3
> #define TAB3 OXTABS
> /* Darwin ld insists on the use of malloc routines in the System
Thanks. Can someone write an autoconf rule for that instead?
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: termios tab expansion on darwin
2008-07-07 23:08 termios tab expansion on darwin Emanuele Giaquinta
2008-07-08 1:28 ` Stefan Monnier
@ 2008-10-20 20:53 ` Emanuele Giaquinta
1 sibling, 0 replies; 4+ messages in thread
From: Emanuele Giaquinta @ 2008-10-20 20:53 UTC (permalink / raw)
To: emacs-devel
On Tue, Jul 08, 2008 at 01:08:42AM +0200, Emanuele Giaquinta wrote:
> the os headers in src/s/ for *BSD and darwin define TAB3 to OXTABS,
> which is the equivalent of TAB3 on those systems to control tab
> expansion. On darwin-8 sys/termios.h defines TAB3 though (to a no-op
> flag it seems), and since sysdep.c includes config.h (which includes
> the os header in s/) before sys/termios.h, TAB3 is redefined (as
> it can be seen using -Wsystem-headers) to the no-op flag. The effect
> is that tab expansion is not disabled, so if it is originally active
> for the terminal from which emacs is started (which is the case for
> xterm) it will cause cursor movements performed with tabs to corrupt
> the display. The attached patch fixes it, not sure if it is the best
> approach though.
ping?
Emanuele
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-20 20:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-07 23:08 termios tab expansion on darwin Emanuele Giaquinta
2008-07-08 1:28 ` Stefan Monnier
2008-07-08 10:39 ` Emanuele Giaquinta
2008-10-20 20:53 ` Emanuele Giaquinta
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.