From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.bugs Subject: bug#16610: 24.3.50; [ruby-mode] Variables named as built-in functions font-locked incorrectly Date: Sat, 01 Feb 2014 09:22:56 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1391239461 22260 80.91.229.3 (1 Feb 2014 07:24:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Feb 2014 07:24:21 +0000 (UTC) To: 16610@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 01 08:24:27 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W9UwE-00016V-6o for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Feb 2014 08:24:26 +0100 Original-Received: from localhost ([::1]:60516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9UwD-0000ZZ-7K for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Feb 2014 02:24:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Uw0-0000YO-Bz for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2014 02:24:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9Uvq-00074A-SG for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2014 02:24:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Uvq-000746-Om for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2014 02:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W9Uvq-0002CP-76 for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2014 02:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bozhidar Batsov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Feb 2014 07:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16610 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13912394108397 (code B ref -1); Sat, 01 Feb 2014 07:24:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Feb 2014 07:23:30 +0000 Original-Received: from localhost ([127.0.0.1]:43714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9UvJ-0002BL-4V for submit@debbugs.gnu.org; Sat, 01 Feb 2014 02:23:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43867) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W9UvF-0002BC-Uk for submit@debbugs.gnu.org; Sat, 01 Feb 2014 02:23:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9Uv6-0006vT-CL for submit@debbugs.gnu.org; Sat, 01 Feb 2014 02:23:25 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Uv6-0006vO-8x for submit@debbugs.gnu.org; Sat, 01 Feb 2014 02:23:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Uuy-0000W2-S4 for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2014 02:23:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9Uur-0006sn-F7 for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2014 02:23:08 -0500 Original-Received: from mail-ee0-f41.google.com ([74.125.83.41]:44815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Uur-0006sY-5w for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2014 02:23:01 -0500 Original-Received: by mail-ee0-f41.google.com with SMTP id e51so722583eek.28 for ; Fri, 31 Jan 2014 23:23:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-type; bh=1//PCp9mZGPjlnz5DGdJwO9yx06Lh0brYimEILP7ptE=; b=RPNYKCWX+gef8mnoENgRaqteFL6gNv7qniTIDqrn5tGbEz8QHWKu5CoZOOiOOIKVq0 GQJPi4cNyfIFOGdWoj6dG8NLw9nGH7IcHaAObLBX4IrvnNg7kjz6RGrlG76LpMlWg4c8 Y6rs7PDfda6hG16fbIVJImVy0cEcTdcmBW7kFuISdpVDDt20jiUG+kQm3xcdMLtRpHEG Jkrm8/GipRo4FTGOizaoA/S7PP9+4CgX7yuZy/JhGYzcdk5QUyd97C+4qNs90aOohUZp lskhM/Ym34+YtVAjwXNkNBu1Qde8vuA+WcOjbm7cphOdDLvL3jz0hALfh9CGR/NTnip5 K1Og== X-Gm-Message-State: ALoCoQmmUQc12Fff+EZhGnY8aSSHUAbZ7r2DXgDPuuQ/M556XOLeDuzFVBMiHCU1yK6wh1gPgHwq X-Received: by 10.14.203.197 with SMTP id f45mr178148eeo.90.1391239380374; Fri, 31 Jan 2014 23:23:00 -0800 (PST) Original-Received: from Bozhidars-MacBook-Pro.local (93-152-182-45.ddns.onlinedirect.bg. [93.152.182.45]) by mx.google.com with ESMTPSA id 4sm46314567eed.14.2014.01.31.23.22.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 31 Jan 2014 23:22:59 -0800 (PST) Original-Received: by Bozhidars-MacBook-Pro.local (Postfix, from userid 501) id 064367DB1982; Sat, 1 Feb 2014 09:22:56 +0200 (EET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:84384 Archived-At: In the following snippet `format` is font-locked as the built-in function, but it's actually a variable. respond_to do |format| format.json do # ... end end This problem obviously exists for all built-ins, but it's not a big issue in general, since most of them don't have names that are likely to be used as variable names. Not sure if we can have a simple solution for this problem without a parser, though. I guess we can have a check if the built-in methods have arguments (as most of them have). In GNU Emacs 24.3.50.1 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00) of 2014-01-27 on Bozhidars-MacBook-Pro.local Windowing system distributor `Apple', version 10.3.1265 Configured using: `configure --prefix=/usr/local/Cellar/emacs/HEAD --without-dbus --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs --without-gnutls --with-ns --disable-ns-self-contained' Important settings: locale-coding-system: utf-8-unix Major mode: Ruby Minor modes in effect: diff-auto-refine-mode: t subword-mode: t ruby-tools-mode: t inf-ruby-minor-mode: t guru-mode: t erc-truncate-mode: t erc-spelling-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t global-flycheck-mode: t flycheck-mode: t which-function-mode: t flx-ido-mode: t ido-ubiquitous-mode: t winner-mode: t global-undo-tree-mode: t undo-tree-mode: t whitespace-mode: t global-anzu-mode: t anzu-mode: t projectile-global-mode: t projectile-mode: t flyspell-mode: t volatile-highlights-mode: t global-hl-line-mode: t shell-dirtrack-mode: t recentf-mode: t savehist-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-mode: t global-auto-revert-mode: t delete-selection-mode: t prelude-global-mode: t prelude-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: k e l y SPC o p e r a t o r s SPC w i t h SPC s p e C-x b * = = \ C-p C-p C-n / / C-x b O t h e r SPC s i m i l a r SPC o p e r a t o r s SPC l i k e SPC * , SPC / , SPC e t c SPC e x h i b i t SPC t h e SPC s a m e SPC p r o b l e m . C-p C-p C-x b + x SPC = SPC = SPC 5 SPC + SPC 1 0 C-a C-f C-f C-f C-f C-k y SPC + SPC z C-a C-SPC C-e M-w C-x o # # # C-y C-a SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC SPC C-e SPC # SPC t h i s SPC s h o u l d SPC n o t SPC b e SPC i n b a d SPC i n d e n t a t i o n C-c C-c y M-x Recent messages: Saving file /Users/bozhidar/projects/test.rb... Wrote /Users/bozhidar/projects/test.rb Mark set Auto-saving...done Mark set Send this bug report to the Emacs maintainers? (y or n) y Sending... Mark set [2 times] Sending via mail... Sending...done Load-path shadows: /Users/bozhidar/.emacs.d/elpa/flycheck-20140121.147/.dir-locals hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/gnus/.dir-locals /Users/bozhidar/.emacs.d/elpa/tabulated-list-20120406.2251/tabulated-list hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.3.50/lisp/emacs-lisp/tabulated-list Features: (shadow sort emacsbug ielm pcase mail-extr sgml-mode nxml-uchnm rng-xsd xsd-regexp rng-cmpct vc-annotate vc vc-dispatcher lisp-mnt network-stream starttls tls cider cider-mode cider-repl cider-eldoc cider-version clojure-test-mode cider-interaction arc-mode archive-mode cider-client nrepl-client cider-util ewoc clojure-mode-expansions clojure-mode inf-lisp ibuf-ext ibuffer conf-mode yaml-mode ace-jump-mode find-dired ffap url-parse url-vars hippie-exp misearch multi-isearch eieio-opt speedbar sb-image ezimage dframe mule-util markdown-mode noutline outline executable magit-key-mode magit view epa derived epg epg-config diff-mode git-rebase-mode git-commit-mode server log-edit message sendmail rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log vc-git superword subword ruby-tools inf-ruby ruby-mode-expansions smartparens-ruby ruby-mode smie rainbow-mode color rainbow-delimiters elisp-slime-nav guru-mode prelude-key-chord key-chord prelude-xml nxml-mode-expansions html-mode-expansions smartparens-html rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok prelude-web prelude-scss prelude-scheme prelude-ruby prelude-perl prelude-org prelude-js prelude-erc erc-truncate erc-autoaway erc-spelling erc-notify erc-log erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete erc-track erc-match erc-button erc-fill erc-stamp erc-netsplit erc-goodies erc erc-backend erc-compat prelude-emacs-lisp prelude-css prelude-common-lisp slime-autoloads prelude-clojure prelude-lisp prelude-c prelude-programming flycheck help-mode rx f which-func imenu prelude-ido smex flx-ido flx ido-ubiquitous warnings ido prelude-osx exec-path-from-shell prelude-global-keybindings prelude-editor winner undo-tree diff esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode esh-util re-builder whitespace browse-kill-ring midnight ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff dired-x dired anzu projectile pkg-info find-func grep compile s bookmark pp expand-region text-mode-expansions er-basic-expansions expand-region-custom expand-region-core flyspell ispell etags volatile-highlights hl-line windmove tramp-cache tramp-sh tramp tramp-compat auth-source gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete comint ansi-color ring format-spec recentf tree-widget wid-edit savehist saveplace diminish smartparens-config smartparens autorevert filenotify delsel prelude-mode easy-mmode edmacro kmacro prelude-core epl advice help-fns dash thingatpt prelude-ui zenburn-theme prelude-packages finder-inf ack-and-a-half-autoloads diminish-autoloads erlang-autoloads flx-ido-autoloads eieio byte-opt bytecomp byte-compile cconv eieio-core grizzl-autoloads key-chord-autoloads logito-autoloads info easymenu cl-macs gv move-text-autoloads paredit-autoloads pkg-info-autoloads puppet-mode-autoloads rainbow-delimiters-autoloads request-autoloads rubocop-autoloads volatile-highlights-autoloads yaml-mode-autoloads package cl cl-loaddefs cl-lib time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process cocoa ns multi-tty emacs)