From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jens =?UTF-8?Q?Kjerrstr=C3=B6m?= Newsgroups: gmane.emacs.bugs Subject: bug#20101: 24.4; sh-mode sets indent-line-function globally Date: Fri, 13 Mar 2015 18:55:52 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e011771551f64be05112f36ec X-Trace: ger.gmane.org 1426270465 10846 80.91.229.3 (13 Mar 2015 18:14:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Mar 2015 18:14:25 +0000 (UTC) To: 20101@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 13 19:14:16 2015 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 1YWU6C-0006FC-70 for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Mar 2015 19:14:16 +0100 Original-Received: from localhost ([::1]:37963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWU6B-00086A-E2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Mar 2015 14:14:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWU63-000864-W4 for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 14:14:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWU5y-0000XI-Vy for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 14:14:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWU5y-0000XA-Tg for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 14:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YWU5y-0007Bx-Js for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 14:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jens =?UTF-8?Q?Kjerrstr=C3=B6m?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Mar 2015 18:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20101 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.142627042527611 (code B ref -1); Fri, 13 Mar 2015 18:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Mar 2015 18:13:45 +0000 Original-Received: from localhost ([127.0.0.1]:45409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YWU5f-0007BE-Ts for submit@debbugs.gnu.org; Fri, 13 Mar 2015 14:13:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60526) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YWTob-0006h6-L8 for submit@debbugs.gnu.org; Fri, 13 Mar 2015 13:56:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWToU-0001ci-PZ for submit@debbugs.gnu.org; Fri, 13 Mar 2015 13:56:00 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWToU-0001ce-NS for submit@debbugs.gnu.org; Fri, 13 Mar 2015 13:55:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWToS-0002P7-UC for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 13:55:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWToQ-0001bm-BJ for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 13:55:56 -0400 Original-Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:33106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWToQ-0001bZ-0v for bug-gnu-emacs@gnu.org; Fri, 13 Mar 2015 13:55:54 -0400 Original-Received: by wggz12 with SMTP id z12so24979515wgg.0 for ; Fri, 13 Mar 2015 10:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=nNwlBrOWhXXqMnhPSKFlq7LUdM4b+zjrYjjwPQqd03w=; b=E2GS3sIf+ligkh7WaP9LzYxOxf/I0mYgu409q6hSQln+GslnA4XEIj8LU66G1513gO JoQ5ur7u5conCXQd+R/8nwBYXN+fULev1HM8dy4U7oDhvKxaSwf51w3jUQg0u8ccZzoG 9D28BtPLuQkmrCxYC/u7y4NUce4VXKF+jhllO5eddlTaibC1RXv2YO9UB1CTMYZEX9QX L1MW+96eAgkaqEU6NGZoJM+HGgRSE5MXPJ0FU20GLClaK9MOwK5Ay9woNEcsg3+At9fk 8KcdZwErxWUIuvVDzxT4UZnycqUjNvh9pOr2PBSlgT4B7GYFjQew6+D+l2MyKlHwiABZ M10g== X-Received: by 10.194.121.10 with SMTP id lg10mr101444409wjb.71.1426269352713; Fri, 13 Mar 2015 10:55:52 -0700 (PDT) Original-Received: by 10.27.183.3 with HTTP; Fri, 13 Mar 2015 10:55:52 -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-Mailman-Approved-At: Fri, 13 Mar 2015 14:13:42 -0400 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:100451 Archived-At: --089e011771551f64be05112f36ec Content-Type: text/plain; charset=UTF-8 - Create a new buffer "*apa*". Should be in fundamental mode. Press return, notice no indentation. Check the value of variable indent-line-function, should be indent-relative. - Create a new buffer "*bepa*", insert "#!/bin/tcsh" on the first line. M-x sh-mode. The message "No indentation for this shell type." should appear. Press return in buffer "*bepa*", notice incorrect indentation. - Switch to buffer "*apa*", press return, notice that this now indents lines too. The value of indent-line-function is now sh-basic-indent-line. This is likely due to the following lines in sh-set-shell in sh-mode.el: ... (message "No indentation for this shell type.") (setq indent-line-function 'sh-basic-indent-line)) ... The above lines are the else branch of an if, in the if branch setq-local is used. In GNU Emacs 24.4.1 (i686-pc-mingw32) of 2014-10-24 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.3.9600 Configured using: `configure --prefix=/c/usr' Important settings: value of $LANG: SVE locale-coding-system: cp1252 Major mode: Lisp Interaction Minor modes in effect: global-company-mode: t company-mode: t helm-mode: t shell-dirtrack-mode: t helm-match-plugin-mode: t helm-occur-match-plugin-mode: t show-paren-mode: t delete-selection-mode: t recentf-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-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 line-number-mode: t transient-mark-mode: t Recent input: M-x r e p o r t Recent messages: Loading c:/Users/Jens/AppData/Roaming/.emacs.d/recentf...done Cleaning up the recentf list...done (0 removed) zlib library not found ad-handle-definition: `tramp-read-passwd' got redefined Helm completion enabled Key Chord mode on For information about GNU Emacs and the GNU system, type C-h C-a. Making helm-map local to *helm M-x* while let-bound! Making helm-sources local to *helm M-x* while let-bound! Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils helm-command helm-elisp helm-eval eldoc company-files company-oddmuse company-keywords company-etags etags company-gtags company-dabbrev-code company-dabbrev company-capf company-cmake company-ropemacs company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb company jk-key-chords key-chord helm-mode helm-files rx image-dired tramp tramp-compat tramp-loaddefs trampver shell dired-x dired-aux ffap thingatpt helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info helm-net browse-url xml url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source gnus-util mm-util mail-prsvr password-cache url-vars mailcap bookmark pp helm-locate helm-help helm-org org org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs helm-match-plugin helm-grep helm-regexp helm-plugin grep helm-external helm-utils dired compile comint ansi-color ring helm advice help-fns easy-mmode edmacro kmacro cl-macs gv helm-source eieio byte-opt bytecomp byte-compile cconv eieio-core info paren delsel jk-edit-functions jk-styles recentf tree-widget wid-edit cl-loaddefs cl-lib easymenu package epg-config time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars 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 w32notify w32 multi-tty emacs) Memory information: ((conses 8 246070 8936) (symbols 32 34844 0) (miscs 32 76 161) (strings 16 69440 9436) (string-bytes 1 1982791) (vectors 8 27246) (vector-slots 4 577293 8296) (floats 8 165 76) (intervals 28 1659 624) (buffers 508 13)) --089e011771551f64be05112f36ec Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

- Create a new buffer "*apa*". Should be in = fundamental mode. Press
=C2=A0 return, notice no indentation. Check the = value of variable
=C2=A0 indent-line-function, should be indent-relative= .

- Create a new buffer "*bepa*", insert "#!/bin/tcsh= " on the first
=C2=A0 line. M-x sh-mode. The message "No inden= tation for this shell type."
=C2=A0 should appear. Press return in = buffer "*bepa*", notice incorrect
=C2=A0 indentation.

-= Switch to buffer "*apa*", press return, notice that this now ind= ents
=C2=A0 lines too. The value of indent-line-function is now
=C2= =A0 sh-basic-indent-line.

This is likely due to the following lines = in sh-set-shell in sh-mode.el:

...
(message "No indentation = for this shell type.")
(setq indent-line-function 'sh-basic-ind= ent-line))
...

The above lines are the else branch of an if, in t= he if branch
setq-local is used.




In GNU Emacs 24.4.1 = (i686-pc-mingw32)
=C2=A0of 2014-10-24 on LEG570
Windowing system dist= ributor `Microsoft Corp.', version 6.3.9600
Configured using:
=C2= =A0`configure --prefix=3D/c/usr'

Important settings:
=C2=A0 v= alue of $LANG: SVE
=C2=A0 locale-coding-system: cp1252

Major mode= : Lisp Interaction

Minor modes in effect:
=C2=A0 global-company-m= ode: t
=C2=A0 company-mode: t
=C2=A0 helm-mode: t
=C2=A0 shell-dir= track-mode: t
=C2=A0 helm-match-plugin-mode: t
=C2=A0 helm-occur-matc= h-plugin-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 delete-selection-mo= de: t
=C2=A0 recentf-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 electri= c-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 file-name-shadow-m= ode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t
= =C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0= auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient= -mark-mode: t

Recent input:
M-x r e p o r t <return>
Recent messages:
Loading c:/Users/Jens/AppData/Roaming/.emacs.d/recentf= ...done
Cleaning up the recentf list...done (0 removed)
zlib library = not found
ad-handle-definition: `tramp-read-passwd' got redefinedHelm completion enabled
Key Chord mode on
For information about GNU = Emacs and the GNU system, type C-h C-a.
Making helm-map local to *helm M= -x* while let-bound!
Making helm-sources local to *helm M-x* while let-b= ound!

Load-path shadows:
None found.

Features:
(shadow = sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies m= m-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc= 2047 rfc2045 ietf-drums mail-utils helm-command helm-elisp
helm-eval eld= oc company-files company-oddmuse company-keywords
company-etags etags co= mpany-gtags company-dabbrev-code company-dabbrev
company-capf company-cm= ake company-ropemacs company-xcode company-clang
company-semantic compan= y-eclim company-template company-css company-nxml
company-bbdb company j= k-key-chords key-chord helm-mode helm-files rx
image-dired tramp tramp-c= ompat tramp-loaddefs trampver shell dired-x
dired-aux ffap thingatpt hel= m-buffers helm-elscreen helm-tags
helm-bookmark helm-adaptive helm-info = helm-net browse-url xml url
url-proxy url-privacy url-expand url-methods= url-history url-cookie
url-domsuf url-util url-parse auth-source gnus-u= til mm-util mail-prsvr
password-cache url-vars mailcap bookmark pp helm-= locate helm-help
helm-org org org-macro org-footnote org-pcomplete pcomp= lete org-list
org-faces org-entities noutline outline org-version ob-ema= cs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-co= mint
ob-core ob-eval org-compat org-macs org-loaddefs format-spec find-f= unc
cal-menu calendar cal-loaddefs helm-match-plugin helm-grep helm-rege= xp
helm-plugin grep helm-external helm-utils dired compile comint
ans= i-color ring helm advice help-fns easy-mmode edmacro kmacro cl-macs
gv h= elm-source eieio byte-opt bytecomp byte-compile cconv eieio-core
info pa= ren delsel jk-edit-functions jk-styles recentf tree-widget
wid-edit cl-l= oaddefs cl-lib easymenu package epg-config time-date
tooltip electric un= iquify ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 ls-lisp w32-co= mmon-fns disp-table w32-win w32-vars tool-bar dnd
fontset image regexp-o= pt fringe tabulated-list newcomment lisp-mode
prog-mode register page me= nu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock synt= ax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnames= e 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 c= us-face macroexp files
text-properties overlay sha1 md5 base64 format en= v code-pages mule
custom widget hashtable-print-readable backquote make-= network-process
w32notify w32 multi-tty emacs)

Memory information= :
((conses 8 246070 8936)
=C2=A0(symbols 32 34844 0)
=C2=A0(miscs = 32 76 161)
=C2=A0(strings 16 69440 9436)
=C2=A0(string-bytes 1 198279= 1)
=C2=A0(vectors 8 27246)
=C2=A0(vector-slots 4 577293 8296)
=C2= =A0(floats 8 165 76)
=C2=A0(intervals 28 1659 624)
=C2=A0(buffers 508= 13))

--089e011771551f64be05112f36ec--