From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuele Giaquinta Newsgroups: gmane.emacs.devel Subject: termios tab expansion on darwin Date: Tue, 8 Jul 2008 01:08:42 +0200 Message-ID: <20080707230842.GE48604@orion.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="jL2BoiuKMElzg3CS" X-Trace: ger.gmane.org 1215472140 23290 80.91.229.12 (7 Jul 2008 23:09:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Jul 2008 23:09:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 08 01:09:47 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KFzq7-0003To-6D for ged-emacs-devel@m.gmane.org; Tue, 08 Jul 2008 01:09:47 +0200 Original-Received: from localhost ([127.0.0.1]:47253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFzpF-0002JQ-So for ged-emacs-devel@m.gmane.org; Mon, 07 Jul 2008 19:08:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KFzpC-0002JA-6H for emacs-devel@gnu.org; Mon, 07 Jul 2008 19:08:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KFzpB-0002Ik-Bq for emacs-devel@gnu.org; Mon, 07 Jul 2008 19:08:49 -0400 Original-Received: from [199.232.76.173] (port=45393 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KFzpB-0002Id-3G for emacs-devel@gnu.org; Mon, 07 Jul 2008 19:08:49 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.158]:1072) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KFzpA-0007jg-I4 for emacs-devel@gnu.org; Mon, 07 Jul 2008 19:08:48 -0400 Original-Received: by fg-out-1718.google.com with SMTP id l26so872354fgb.30 for ; Mon, 07 Jul 2008 16:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition; bh=hqwqN54xfPbhEVIAFC364qNtM3InUpCKQyxGjIl9A0E=; b=T4tAfhlZ1yl1nvV3NS9+Dlq4Ee2aO7wbvZlKXBxd55FfEquLva/BF8d8QfjTcIU+bL bpM6Kz9kDyNqHrFE1S7XJO8UObBuWVz+xKs0aPjmq0I/nb52IsoHddrkqD8zOguimqXZ Gx3AbrKLXqvGXFWp58wUHpphx4KfAtgf6CbYM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition; b=RLqnflgkh/GhwDAZADI90sbneaYMLtoQPb4OjtLbgIQomTRPasVcCQkHTKY26sFZzr D+z2+LfyQ0NFwPhZcQ0rOMH86MbTACFopWotLoHb3gsiQLcHkV3Y7uT4lgnX/BsLLE1g /QF6iLOKmqAHBTURs3UDQ2wFfHebjfkj9y18M= Original-Received: by 10.86.72.15 with SMTP id u15mr4777430fga.22.1215472125725; Mon, 07 Jul 2008 16:08:45 -0700 (PDT) Original-Received: from localhost ( [87.13.214.102]) by mx.google.com with ESMTPS id 4sm5575384fge.5.2008.07.07.16.08.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 07 Jul 2008 16:08:44 -0700 (PDT) Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:100437 Archived-At: --jL2BoiuKMElzg3CS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --jL2BoiuKMElzg3CS Content-Type: text/x-diff; charset=us-ascii Content-Disposition: inline; filename="oxtabs.diff" 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 . */ /* System uses OXTABS instead of the expected TAB3. (Copied from bsd386.h.) */ +#include +#undef TAB3 #define TAB3 OXTABS /* Darwin ld insists on the use of malloc routines in the System --jL2BoiuKMElzg3CS--