unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
To: emacs-devel@gnu.org
Subject: termios tab expansion on darwin
Date: Tue, 8 Jul 2008 01:08:42 +0200	[thread overview]
Message-ID: <20080707230842.GE48604@orion.lan> (raw)

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

             reply	other threads:[~2008-07-07 23:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-07 23:08 Emanuele Giaquinta [this message]
2008-07-08  1:28 ` termios tab expansion on darwin Stefan Monnier
2008-07-08 10:39   ` Emanuele Giaquinta
2008-10-20 20:53 ` Emanuele Giaquinta

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=20080707230842.GE48604@orion.lan \
    --to=emanuele.giaquinta@gmail.com \
    --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 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).