emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

termios tab expansion on darwin


From: Emanuele Giaquinta
Subject: termios tab expansion on darwin
Date: Tue, 8 Jul 2008 01:08:42 +0200

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
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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]