From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Kurochkin Newsgroups: gmane.emacs.devel Subject: text_property_stickiness() ignores `text-property-default-nonsticky' Date: Mon, 04 Jul 2011 03:56:25 +0400 Message-ID: <87aacuq5p2.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1309737420 7466 80.91.229.12 (3 Jul 2011 23:57:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2011 23:57:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 04 01:56:57 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QdWX2-0008Cf-No for ged-emacs-devel@m.gmane.org; Mon, 04 Jul 2011 01:56:56 +0200 Original-Received: from localhost ([::1]:56302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdWX1-00012g-Sw for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2011 19:56:56 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdWWj-00012H-0l for emacs-devel@gnu.org; Sun, 03 Jul 2011 19:56:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdWWh-0004m2-OU for emacs-devel@gnu.org; Sun, 03 Jul 2011 19:56:36 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:58315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdWWh-0004lr-BX for emacs-devel@gnu.org; Sun, 03 Jul 2011 19:56:35 -0400 Original-Received: by bwd14 with SMTP id 14so4831124bwd.0 for ; Sun, 03 Jul 2011 16:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:user-agent:date:message-id:mime-version :content-type; bh=Jy+ltRxS2+jHoKhJnlmwEtfRFtT4Lq2AY6t1mWI33BY=; b=Iec2vxI9Nm0ullukFKAN7nwfiHKxDALIKZbo1wreF+V7AX2p2vM5iJdQ938PiGAsa1 bRoaoU0gJY6CpPRbejKU25vGJrQT8fh6u8eurmRvxItBOUozzEdYHZ+k6rYwYOPEkQlW zJWlpp3qux1hFLZIeihXfPDVUgfl8eJrFjfxI= Original-Received: by 10.204.26.132 with SMTP id e4mr5102559bkc.142.1309737394019; Sun, 03 Jul 2011 16:56:34 -0700 (PDT) Original-Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id t9sm5046806bkn.8.2011.07.03.16.56.31 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 03 Jul 2011 16:56:31 -0700 (PDT) User-Agent: Notmuch/0.5-321-g41686e2 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141509 Archived-At: Hello. I am trying to make `keymap' property rear-nonsticky, so that it does not affect the next character after the region the property is applied to. If I do it by setting rear-nonsticky text property to 't or to a list that contains 'keymap, it works fine: (let ((map (make-sparse-keymap))) (define-key map (kbd "RET") 'bug) (switch-to-buffer "test") (insert "123456") (put-text-property 1 4 'keymap map) (put-text-property (point-min) (point-max) 'rear-nonsticky '(keymap)) (goto-char 4) (message "keymap: %s" (get-text-property (point) 'keymap)) (message "key-binding: %s" (key-binding (kbd "RET")))) But if I set `text-property-default-nonsticky' variable instead, it does not work: (let ((map (make-sparse-keymap))) (define-key map (kbd "RET") 'bug) (switch-to-buffer "test") (insert "123456") (put-text-property 1 4 'keymap map) (make-local-variable 'text-property-default-nonsticky) (add-to-list 'text-property-default-nonsticky '(keymap . t)) (goto-char 4) (message "keymap: %s" (get-text-property (point) 'keymap)) (message "key-binding: %s" (key-binding (kbd "RET")))) Looking through the code, I got down to text_property_stickiness() function in src/textprop.c, which is used by get_pos_property(), which is used by get_local_map(). There are checks for `front-sticky' and `rear-nonsticky' properties, but no checks for `text-property-default-nonsticky' variable. Before opening false bug reports, I would like to confirm that this is an issue indeed, and it is not me doing something stupid. Regards, Dmitry