From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carlos Pita Newsgroups: gmane.emacs.bugs Subject: bug#18379: 24.3.93; Bash font lock: pretty inconsistent treatment of `` and $() Date: Mon, 01 Sep 2014 11:17:23 -0300 Message-ID: <87bnqz1l3g.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409581169 29595 80.91.229.3 (1 Sep 2014 14:19:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Sep 2014 14:19:29 +0000 (UTC) Cc: occitan@esperanto.org To: 18379@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 01 16:19:21 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 1XOSS0-0001A2-Br for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Sep 2014 16:19:20 +0200 Original-Received: from localhost ([::1]:60562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOSRz-0002KK-V1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Sep 2014 10:19:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOSRp-0002JN-VE for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2014 10:19:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOSRi-0006Sy-SD for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2014 10:19:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOSRi-0006Ss-OF for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2014 10:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XOSRi-0001iu-Dx for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2014 10:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Sep 2014 14:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18379 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.14095810916563 (code B ref -1); Mon, 01 Sep 2014 14:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Sep 2014 14:18:11 +0000 Original-Received: from localhost ([127.0.0.1]:55782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XOSQo-0001hi-Lu for submit@debbugs.gnu.org; Mon, 01 Sep 2014 10:18:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44079) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XOSQe-0001h2-RS for submit@debbugs.gnu.org; Mon, 01 Sep 2014 10:18:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOSQS-0005og-IS for submit@debbugs.gnu.org; Mon, 01 Sep 2014 10:17:51 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOSQS-0005oc-FM for submit@debbugs.gnu.org; Mon, 01 Sep 2014 10:17:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOSQL-0002Ef-8m for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2014 10:17:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOSQE-0005f1-7Y for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2014 10:17:37 -0400 Original-Received: from mail-vc0-x22c.google.com ([2607:f8b0:400c:c03::22c]:64024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOSQD-0005eZ-TX for bug-gnu-emacs@gnu.org; Mon, 01 Sep 2014 10:17:30 -0400 Original-Received: by mail-vc0-f172.google.com with SMTP id ij19so5564818vcb.17 for ; Mon, 01 Sep 2014 07:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type; bh=fUdYED4tNQJIITIpeyZSTp2CpiM1OAlbFkFl8FWTG4s=; b=Z4nXfKg1yg+LE4XUafUWGaGa7d3WRNn0UdtGBcb0CXlbvdJQlffvi1YgOsEQ3WsJKs 9uKBQIqik0Kzc9sbs87pqEgKkuREtnOfEZytjBK1WeCRg9Ig8XxvjbADte6nv9hMFQJx alfX5FpEyVUwaaObxhAG0T1PMqNDqtnmVOfeZFPOKGQGq+8d8UljjegNz48fa8W5AEIB IzvHl2PStYEsYFarrhPt5zH3AwQi/kRkkJQAc1U/pDw7XCOjQBZs9ZBBPolP2OhKm5+0 ioP7gum+oUATpby9E4pWLALMYHoCSfL1G3i7tniTxJe0LlriDQZf/zrgY+gJR6EyRZjX Tl3Q== X-Received: by 10.52.97.233 with SMTP id ed9mr21427411vdb.16.1409581048735; Mon, 01 Sep 2014 07:17:28 -0700 (PDT) Original-Received: from carlos ([181.228.217.164]) by mx.google.com with ESMTPSA id ti1sm2271526vdb.28.2014.09.01.07.17.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Sep 2014 07:17:27 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:92920 Archived-At: The syntax table treats ` as an string quote character, so `if [[ $x == x ]]; then echo x; else echo y fi` $(if [[ $x == x ]]; then echo x; else echo y fi) are highlighted in a very different way although they are semantically equivalent. Related to do above, I don't know whether the different highlighting of the first word in: $(if [[ $x == x ]]; then echo x; else echo y fi) if [[ $x == x ]]; then echo x; else echo y fi is intended or accidental, but it looks pretty weird. Moreover $([[ $x == x ]] && echo x) [[ $x == x ]] && echo x will highlight exactly equal, which is not consistent with the previous example. All in all, I would suggest to: 1) Highlight $(...) and `...` the same way. 2) Don't set the face of the first symbol following $( in any special way. Regards -- Carlos In GNU Emacs 24.3.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2) of 2014-08-27 on carlos Windowing system distributor `The X.Org Foundation', version 11.0.11600000 Configured using: `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LC_COLLATE: en_US.UTF-8 value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: en_US.UTF-8 value of $LC_MONETARY: en_US.UTF-8 value of $LC_NUMERIC: en_US.UTF-8 value of $LC_TIME: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Shell-script Minor modes in effect: shell-dirtrack-mode: t sh-electric-here-document-mode: t show-paren-mode: t eldoc-mode: t yas-global-mode: t yas-minor-mode: t ido-ubiquitous-mode: t global-auto-complete-mode: t auto-complete-mode: t ido-everywhere: t winner-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: ( ( x ) ) SPC & & S-SPC l s SPC " x " ) $ ( l s [ [ SPC $ x SPC ] ] SPC & & SPC l s SPC " x " ) $ ( C-k C-y C-y C-a " C-e " C-a C-SPC M-w C-y C-d C-d C-d C-d ( ( ) ) C-x C-s e C-e C-SPC M-w C-y C-v C-SPC C-g C-SPC C-x r t " " C-e " C-e " C-e " C-SPC M-w C-y C-e i f SPC f i C-/ f i C-g M-^ C-x C-s ; C-x C-s C-SPC M-w C-y C-a C-d C-d ` C-e ` M-x r e p o r t - e Recent messages: [yas] Snippet 0 exited. Undo! Quit Saving file /tmp/test.sh... Wrote /tmp/test.sh Saving file /tmp/test.sh... Wrote /tmp/test.sh Mark activated Mark set Making completion list... Load-path shadows: ~/.emacs.d/lisp/rmail hides /usr/share/emacs/24.3.93/lisp/mail/rmail Features: (shadow emacsbug xterm descr-text tramp-cache tramp tramp-compat tramp-loaddefs trampver shell view woman man misearch multi-isearch cus-edit cus-start cus-load sh-script smie executable gnus-draft mailalias smtpmail sendmail oauth2 warnings json plstore nnir url-http url-gw url-auth url-queue face-remap org-colview diary-lib diary-loaddefs cal-iso org-agenda bookmark thingatpt tabify image-file org-capture pp rect vc-git org-element org-rmail org-mhe org-irc org-info org-gnus org-docview doc-view jka-compr image-mode dired org-bibtex bibtex org-bbdb org-w3m mule-util shr-color color shr browse-url gnus-dup sort smiley gnus-cite mm-archive mail-extr gnus-async gnus-bcklg qp gnus-ml disp-table gnus-topic nndraft nnmh nnfolder utf-7 epa-file epa derived epg gnutls network-stream starttls nnimap parse-time tls utf7 netrc gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig nntp gnus-cache gnus-sum nnoo gnus-group gnus-undo nnmail mail-source google-contacts-message google-contacts xml url-cache url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf mailcap url-util url-parse auth-source eieio eieio-core password-cache url-vars google-oauth gnus-start gnus-spec gnus-int gnus-range message idna rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util mail-prsvr wid-edit server flymake compile paredit paren eldoc cl-macs ob-python ob-R org byte-opt bytecomp byte-compile cconv org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities time-date noutline outline easy-mmode org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint comint ansi-color ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs yasnippet help-mode ido-ubiquitous cl gv advice help-fns auto-complete-config auto-complete popup imenu-anywhere imenu ido windmove winner ring edmacro kmacro cl-loaddefs cl-lib info easymenu package wombat-theme tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd 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 dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 618712 75891) (symbols 48 57188 0) (miscs 40 3530 2211) (strings 32 220578 14464) (string-bytes 1 4703140) (vectors 16 51134) (vector-slots 8 1666305 45219) (floats 8 1010 1759) (intervals 56 28363 1382) (buffers 960 89) (heap 1024 65685 4604))