Subject: bug#9333: 23.3; shell script mode: "<<" starts here doc even on comment line

From: Ryo Furue <[email-masked]>
Date: Fri, 19 Aug 2011 16:52:40 -1000 (HST)

Hi,

In the shell-script mode, typing "<<" on a comment line starts
a here document.  I use "<< . . ." in comments as a personal
style in many computer languages including shell.

1) Open (C-x C-f) a new shell script, say, "tmp.sh";
2) Type "#<<" or "# <<";
3  Then, you immediately get

   # <<EOF

   EOF

Regards,
Ryo

In GNU Emacs 23.3.1 (i486-pc-linux-gnu, GTK+ Version 2.24.3)
  of 2011-04-10 on raven, modified by Debian
Windowing system distributor `The X.Org Foundation', version 
11.0.11003000
configured using `configure  '--build' 'i486-linux-gnu' '--build' 
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' 
'--libexecdir=/usr/lib' '--localstatedir=/var/lib' 
'--infodir=/usr/share/info' '--mandir=/usr/share/man' 
'--with-pop=yes' 
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.3/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.3/leim' 
'--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 
'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 
'CPPFLAGS=''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: C
   value of $XMODIFIERS: @im=none
   locale-coding-system: nil
   default enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
   show-paren-mode: t
   tooltip-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-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
C-e C-b C-p C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f
C-f <return> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f <return> C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-f C-f C-f C-f C-f C-f C-SPC
C-e C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-w <help-echo>
C-x C-b C-n <return> C-x C-f t m p / t m p . s h <return>
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-n C-k C-k
C-a C-x C-q C-p C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k # < < C-p C-k C-k C-k C-k C-k <help-echo>
C-x C-b C-n <return> C-a C-n C-n C-n C-n C-n C-n C-n
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-SPC
C-e C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b
C-b C-b C-b C-b C-b C-b C-b C-b C-w <help-echo> <help-echo>
C-n C-n C-n C-n C-v C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
u C-n C-n C-f C-f C-n <return> C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-f C-f C-f C-f C-f C-f
C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f
<escape> x r e p o r TAB e m TAB b u TAB <return>

Recent messages:
uncompressing emacs-8.gz...done
Mark set
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
byte-code: Buffer is read-only: #<buffer tmp.sh> [2 times]
kill-line: End of buffer [3 times]
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Mark set
Auto-saving...done

Load-path shadows:
/usr/share/emacs/23.3/site-lisp/auctex/tex-jp hides 
/usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs/23.3/site-lisp/auctex/bib-cite hides 
/usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs/23.3/site-lisp/auctex/tex-fptex hides 
/usr/share/emacs/site-lisp/auctex/tex-fptex
/usr/share/emacs/23.3/site-lisp/auctex/multi-prompt hides 
/usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs/23.3/site-lisp/auctex/tex-bar hides 
/usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs/23.3/site-lisp/auctex/tex-info hides 
/usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs/23.3/site-lisp/auctex/font-latex hides 
/usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs/23.3/site-lisp/auctex/tex-font hides 
/usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs/23.3/site-lisp/auctex/tex-style hides 
/usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs/23.3/site-lisp/auctex/toolbar-x hides 
/usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/share/emacs/23.3/site-lisp/auctex/texmathp hides 
/usr/share/emacs/site-lisp/auctex/texmathp
/usr/share/emacs/23.3/site-lisp/auctex/context hides 
/usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs/23.3/site-lisp/auctex/latex hides 
/usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs/23.3/site-lisp/auctex/context-en hides 
/usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs/23.3/site-lisp/auctex/tex hides 
/usr/share/emacs/site-lisp/auctex/tex
/usr/share/emacs/23.3/site-lisp/auctex/tex-mik hides 
/usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs/23.3/site-lisp/auctex/context-nl hides 
/usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs/23.3/site-lisp/auctex/tex-buf hides 
/usr/share/emacs/site-lisp/auctex/tex-buf
/usr/share/emacs/23.3/site-lisp/auctex/tex-fold hides 
/usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs/site-lisp/haskell-mode/haskell-site-file hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-site-file
/usr/share/emacs/site-lisp/haskell-mode/haskell-indent hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-indent
/usr/share/emacs/site-lisp/haskell-mode/haskell-doc hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-doc
/usr/share/emacs/site-lisp/haskell-mode/haskell-indentation hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-indentation
/usr/share/emacs/site-lisp/haskell-mode/haskell-ghci hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-ghci
/usr/share/emacs/site-lisp/haskell-mode/haskell-decl-scan hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-decl-scan
/usr/share/emacs/site-lisp/haskell-mode/haskell-cabal hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-cabal
/usr/share/emacs/site-lisp/haskell-mode/haskell-c hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-c
/usr/share/emacs/site-lisp/haskell-mode/haskell-mode hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-mode
/usr/share/emacs/site-lisp/haskell-mode/haskell-font-lock hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-font-lock
/usr/share/emacs/site-lisp/haskell-mode/inf-haskell hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/inf-haskell
/usr/share/emacs/site-lisp/haskell-mode/haskell-simple-indent hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-simple-indent
/usr/share/emacs/site-lisp/haskell-mode/haskell-hugs hides 
/usr/share/emacs/23.3/site-lisp/haskell-mode/haskell-hugs
/usr/share/emacs/23.3/site-lisp/debian-startup hides 
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs23/site-lisp/flim/hex-util hides 
/usr/share/emacs/23.3/lisp/hex-util
/usr/share/emacs23/site-lisp/flim/md4 hides 
/usr/share/emacs/23.3/lisp/md4
/usr/share/emacs23/site-lisp/flim/sha1 hides 
/usr/share/emacs/23.3/lisp/sha1
/usr/share/emacs/site-lisp/rst hides 
/usr/share/emacs/23.3/lisp/textmodes/rst
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides 
/usr/share/emacs/23.3/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides 
/usr/share/emacs/23.3/lisp/textmodes/ispell
/usr/share/emacs23/site-lisp/ruby1.8-elisp/ruby-mode hides 
/usr/share/emacs/23.3/lisp/progmodes/ruby-mode
/usr/share/emacs23/site-lisp/flim/ntlm hides 
/usr/share/emacs/23.3/lisp/net/ntlm
/usr/share/emacs23/site-lisp/flim/hmac-md5 hides 
/usr/share/emacs/23.3/lisp/net/hmac-md5
/usr/share/emacs23/site-lisp/flim/hmac-def hides 
/usr/share/emacs/23.3/lisp/net/hmac-def
/usr/share/emacs23/site-lisp/flim/sasl hides 
/usr/share/emacs/23.3/lisp/net/sasl
/usr/share/emacs23/site-lisp/flim/sasl-digest hides 
/usr/share/emacs/23.3/lisp/net/sasl-digest
/usr/share/emacs23/site-lisp/flim/sasl-ntlm hides 
/usr/share/emacs/23.3/lisp/net/sasl-ntlm
/usr/share/emacs23/site-lisp/flim/sasl-cram hides 
/usr/share/emacs/23.3/lisp/net/sasl-cram

Features:
(shadow emacsbug info debian-bug rfc2047 rfc2045 ietf-drums time-date
qp mm-util mail-prsvr skeleton sh-script executable w3m-form inf-ruby
compile comint ring ruby-mode pp mew-varsx mew-browse mew-w3m w3m
browse-url doc-view jka-compr dired image-mode timezone w3m-hist
w3m-fb bookmark-w3m w3m-ems wid-edit w3m-ccl ccl w3m-favicon w3m-image
w3m-proc w3m-util mew-auth mew-config mew-imap2 mew-imap mew-nntp2
mew-nntp mew-pop mew-smtp mew-ssl mew-ssh mew-net mew-highlight
mew-sort mew-fib mew-ext mew-refile mew-demo mew-attach mew-draft
mew-message mew-thread mew-virtual mew-summary4 mew-summary3
mew-summary2 mew-summary mew-search mew-pick mew-passwd mew-scan
mew-syntax mew-bq mew-smime mew-pgp mew-header mew-exec mew-mark
mew-mime mew-edit mew-decode mew-encode mew-cache mew-minibuf
mew-complete mew-addrbook mew-local mew-unix mew-vars3 mew-vars2
mew-vars mew-env mew-lang-jp mew-mule3 mew-mule mew-gemacs mew-key
mew-func mew-blvs mew-const mew newcomment multi-isearch texmathp
preview prv-emacs byte-opt warnings tex-buf noutline outline
font-latex bytecomp byte-compile latex tex-style tex regexp-opt
flyspell ispell latexenc edmacro kmacro help-mode easymenu view
ibuf-ext ibuffer server mozc cl cl-19 japan-util saveplace advice
help-fns advice-preload paren debian-el debian-el-loaddefs w3m-load
muse-autoloads emacs-goodies-el emacs-goodies-custom
emacs-goodies-loaddefs easy-mmode preview-latex tex-site auto-loads
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
font-setting tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)