unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line
@ 2014-03-08 10:16 Frank Ruben
  2014-03-10 18:58 ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Frank Ruben @ 2014-03-08 10:16 UTC (permalink / raw)
  To: 16971

[-- Attachment #1: Type: text/plain, Size: 19896 bytes --]

Hello Emacs team,

I have two systems where one has an older newcomment.el (march 2013) and
comment-indent-new-line works there.
The other system (from which I enter this bug report and which hence has
the version info given below)
does not work correctly for comment-indent-new-line: it adds a line break
and indents the newline, but does not
insert the comment start.
The error seems to be caused by comment-beginning behaving differently
between these two versions.
For the old version, comment-beginning leaves the point *after* the comment
start, so that (buffer-substring compos comin)
is not empty whereas for the new version, comment-beginning leaves the
point *before* the comment start,
so that (buffer-substring compos comin) is empty.



In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2014-01-02 on king, modified by Debian
 (emacs-snapshot package, version 2:20140101-1~ppa1~precise1)
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description:    Ubuntu 12.04.4 LTS

Configured using:
 `configure --build x86_64-linux-gnu --host x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var
 --infodir=/usr/share/info/emacs-snapshot --mandir=/usr/share/man
 --with-pop=yes
 --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp
 --with-crt-dir=/usr/lib/x86_64-linux-gnu/ --with-x=yes
--with-x-toolkit=gtk3
 --with-imagemagick=yes 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g
-O2'
 CPPFLAGS=-D_FORTIFY_SOURCE=2 'LDFLAGS=-g -Wl,--as-needed -znocombreloc''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: el

Minor modes in effect:
  goto-address-prog-mode: t
  goto-address-mode: t
  eldoc-mode: t
  which-function-mode: t
  show-paren-mode: t
  subword-mode: t
  workgroups-mode: t
  recentf-mode: t
  desktop-save-mode: t
  savehist-mode: t
  global-auto-revert-mode: t
  winner-mode: t
  ido-everywhere: t
  yas-minor-mode: t
  whitespace-mode: t
  electric-pair-mode: t
  display-time-mode: t
  delete-selection-mode: t
  cua-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  prettify-symbols-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: 1
  line-number-mode: 1
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<down> <down> <down> <down> C-s d e t a i l s <C-left>
<S-f6> ( f C-. C-2 <f7> <return> C-s c o m m e n t
- i n d e n t - C-w C-w C-s C-s C-a C-l C-l <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> C-r c o m m e n t - b e
g <C-right> <C-left> M-r <down> <down> <down> <C-right>
<C-right> <down> <C-right> <C-right> <C-right> <C-left>
M-. <C-right> <C-right> <C-left> C-M-SPC C-c <timeout>
C-x 2 <f7> <return> C-s f o o C-s C-s C-s C-s C-r C-r
C-r C-s C-s C-a C-a C-k C-k C-s C-s C-s C-a C-s m -
j <up> <return> ( <return> <up> f o o SPC ; S-SPC b
a r M-: ( C-v <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> c o m m e n t -
b e g i <tab> <right> <return> <down> <down> <down>
<down> <up> <up> <up> <up> C-e M-: <up> <return> <menu>
g o t o - c h a r <return> 2 1 6 6 6 9 <return> <right>
C-a <S-down> <S-down> C-d C-d <f2> <f5> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <left> <down> <down> <down> <down> <down>
<down> <down> <down> <f5> <menu> C-v <return>

Recent messages:
Mark saved where search started [4 times]
Dired-Hide-Details mode disabled
Mark saved where search started [2 times]
Mark set [2 times]
Mark saved where search started [3 times]
Auto-saving...done
216669 (#o647135, #x34e5d) [2 times]
Mark set
Saving file /home/frank/.emacs.d/init.el...
Wrote /home/frank/.emacs.d/init.el

Load-path shadows:
/home/frank/.emacs.d/elpa/company-20130923.513/.dir-locals hides
/home/frank/.emacs.d/elpa/flycheck-20130928.1223/.dir-locals
/usr/share/emacs/24.3.50/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs/site-lisp/dictionaries-common/flyspell hides
/usr/share/emacs/24.3.50/lisp/textmodes/flyspell
/usr/share/emacs/site-lisp/dictionaries-common/ispell hides
/usr/share/emacs/24.3.50/lisp/textmodes/ispell
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-table hides
/usr/share/emacs/24.3.50/lisp/org/org-table
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-gnus hides
/usr/share/emacs/24.3.50/lisp/org/org-gnus
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-plantuml hides
/usr/share/emacs/24.3.50/lisp/org/ob-plantuml
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-html hides
/usr/share/emacs/24.3.50/lisp/org/ox-html
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-pcomplete hides
/usr/share/emacs/24.3.50/lisp/org/org-pcomplete
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-C hides
/usr/share/emacs/24.3.50/lisp/org/ob-C
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-macs hides
/usr/share/emacs/24.3.50/lisp/org/org-macs
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-shen hides
/usr/share/emacs/24.3.50/lisp/org/ob-shen
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-ref hides
/usr/share/emacs/24.3.50/lisp/org/ob-ref
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-clock hides
/usr/share/emacs/24.3.50/lisp/org/org-clock
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-mscgen hides
/usr/share/emacs/24.3.50/lisp/org/ob-mscgen
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-exp hides
/usr/share/emacs/24.3.50/lisp/org/ob-exp
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-crypt hides
/usr/share/emacs/24.3.50/lisp/org/org-crypt
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-io hides
/usr/share/emacs/24.3.50/lisp/org/ob-io
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-macro hides
/usr/share/emacs/24.3.50/lisp/org/org-macro
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org hides
/usr/share/emacs/24.3.50/lisp/org/org
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-java hides
/usr/share/emacs/24.3.50/lisp/org/ob-java
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-bibtex hides
/usr/share/emacs/24.3.50/lisp/org/org-bibtex
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-css hides
/usr/share/emacs/24.3.50/lisp/org/ob-css
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-latex hides
/usr/share/emacs/24.3.50/lisp/org/ob-latex
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-entities hides
/usr/share/emacs/24.3.50/lisp/org/org-entities
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-clojure hides
/usr/share/emacs/24.3.50/lisp/org/ob-clojure
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-publish hides
/usr/share/emacs/24.3.50/lisp/org/ox-publish
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-scala hides
/usr/share/emacs/24.3.50/lisp/org/ob-scala
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-footnote hides
/usr/share/emacs/24.3.50/lisp/org/org-footnote
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-lob hides
/usr/share/emacs/24.3.50/lisp/org/ob-lob
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-capture hides
/usr/share/emacs/24.3.50/lisp/org/org-capture
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-matlab hides
/usr/share/emacs/24.3.50/lisp/org/ob-matlab
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-docview hides
/usr/share/emacs/24.3.50/lisp/org/org-docview
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-icalendar hides
/usr/share/emacs/24.3.50/lisp/org/ox-icalendar
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-ledger hides
/usr/share/emacs/24.3.50/lisp/org/ob-ledger
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-R hides
/usr/share/emacs/24.3.50/lisp/org/ob-R
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-lisp hides
/usr/share/emacs/24.3.50/lisp/org/ob-lisp
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-screen hides
/usr/share/emacs/24.3.50/lisp/org/ob-screen
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-id hides
/usr/share/emacs/24.3.50/lisp/org/org-id
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-eshell hides
/usr/share/emacs/24.3.50/lisp/org/org-eshell
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-latex hides
/usr/share/emacs/24.3.50/lisp/org/ox-latex
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-scheme hides
/usr/share/emacs/24.3.50/lisp/org/ob-scheme
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-calc hides
/usr/share/emacs/24.3.50/lisp/org/ob-calc
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-table hides
/usr/share/emacs/24.3.50/lisp/org/ob-table
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-timer hides
/usr/share/emacs/24.3.50/lisp/org/org-timer
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-comint hides
/usr/share/emacs/24.3.50/lisp/org/ob-comint
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-sqlite hides
/usr/share/emacs/24.3.50/lisp/org/ob-sqlite
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-archive hides
/usr/share/emacs/24.3.50/lisp/org/org-archive
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-mouse hides
/usr/share/emacs/24.3.50/lisp/org/org-mouse
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-ruby hides
/usr/share/emacs/24.3.50/lisp/org/ob-ruby
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-attach hides
/usr/share/emacs/24.3.50/lisp/org/org-attach
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-octave hides
/usr/share/emacs/24.3.50/lisp/org/ob-octave
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-colview hides
/usr/share/emacs/24.3.50/lisp/org/org-colview
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-gnuplot hides
/usr/share/emacs/24.3.50/lisp/org/ob-gnuplot
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-sh hides
/usr/share/emacs/24.3.50/lisp/org/ob-sh
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-ctags hides
/usr/share/emacs/24.3.50/lisp/org/org-ctags
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-eval hides
/usr/share/emacs/24.3.50/lisp/org/ob-eval
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-tangle hides
/usr/share/emacs/24.3.50/lisp/org/ob-tangle
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-element hides
/usr/share/emacs/24.3.50/lisp/org/org-element
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-compat hides
/usr/share/emacs/24.3.50/lisp/org/org-compat
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-install hides
/usr/share/emacs/24.3.50/lisp/org/org-install
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-texinfo hides
/usr/share/emacs/24.3.50/lisp/org/ox-texinfo
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-version hides
/usr/share/emacs/24.3.50/lisp/org/org-version
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-emacs-lisp hides
/usr/share/emacs/24.3.50/lisp/org/ob-emacs-lisp
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-ocaml hides
/usr/share/emacs/24.3.50/lisp/org/ob-ocaml
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-core hides
/usr/share/emacs/24.3.50/lisp/org/ob-core
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-indent hides
/usr/share/emacs/24.3.50/lisp/org/org-indent
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-sql hides
/usr/share/emacs/24.3.50/lisp/org/ob-sql
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-picolisp hides
/usr/share/emacs/24.3.50/lisp/org/ob-picolisp
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-maxima hides
/usr/share/emacs/24.3.50/lisp/org/ob-maxima
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-protocol hides
/usr/share/emacs/24.3.50/lisp/org/org-protocol
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-haskell hides
/usr/share/emacs/24.3.50/lisp/org/ob-haskell
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-datetree hides
/usr/share/emacs/24.3.50/lisp/org/org-datetree
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-fortran hides
/usr/share/emacs/24.3.50/lisp/org/ob-fortran
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-info hides
/usr/share/emacs/24.3.50/lisp/org/org-info
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-dot hides
/usr/share/emacs/24.3.50/lisp/org/ob-dot
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-habit hides
/usr/share/emacs/24.3.50/lisp/org/org-habit
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-awk hides
/usr/share/emacs/24.3.50/lisp/org/ob-awk
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-src hides
/usr/share/emacs/24.3.50/lisp/org/org-src
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-keys hides
/usr/share/emacs/24.3.50/lisp/org/ob-keys
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob hides
/usr/share/emacs/24.3.50/lisp/org/ob
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-odt hides
/usr/share/emacs/24.3.50/lisp/org/ox-odt
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-mobile hides
/usr/share/emacs/24.3.50/lisp/org/org-mobile
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-md hides
/usr/share/emacs/24.3.50/lisp/org/ox-md
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-faces hides
/usr/share/emacs/24.3.50/lisp/org/org-faces
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-irc hides
/usr/share/emacs/24.3.50/lisp/org/org-irc
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-plot hides
/usr/share/emacs/24.3.50/lisp/org/org-plot
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-beamer hides
/usr/share/emacs/24.3.50/lisp/org/ox-beamer
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox hides
/usr/share/emacs/24.3.50/lisp/org/ox
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-js hides
/usr/share/emacs/24.3.50/lisp/org/ob-js
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-feed hides
/usr/share/emacs/24.3.50/lisp/org/org-feed
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-makefile hides
/usr/share/emacs/24.3.50/lisp/org/ob-makefile
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-agenda hides
/usr/share/emacs/24.3.50/lisp/org/org-agenda
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-org hides
/usr/share/emacs/24.3.50/lisp/org/ox-org
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-org hides
/usr/share/emacs/24.3.50/lisp/org/ob-org
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-list hides
/usr/share/emacs/24.3.50/lisp/org/org-list
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-lilypond hides
/usr/share/emacs/24.3.50/lisp/org/ob-lilypond
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-asymptote hides
/usr/share/emacs/24.3.50/lisp/org/ob-asymptote
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-python hides
/usr/share/emacs/24.3.50/lisp/org/ob-python
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-rmail hides
/usr/share/emacs/24.3.50/lisp/org/org-rmail
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-w3m hides
/usr/share/emacs/24.3.50/lisp/org/org-w3m
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-ditaa hides
/usr/share/emacs/24.3.50/lisp/org/ob-ditaa
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-sass hides
/usr/share/emacs/24.3.50/lisp/org/ob-sass
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ob-perl hides
/usr/share/emacs/24.3.50/lisp/org/ob-perl
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-mhe hides
/usr/share/emacs/24.3.50/lisp/org/org-mhe
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-inlinetask hides
/usr/share/emacs/24.3.50/lisp/org/org-inlinetask
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-man hides
/usr/share/emacs/24.3.50/lisp/org/ox-man
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-loaddefs hides
/usr/share/emacs/24.3.50/lisp/org/org-loaddefs
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/ox-ascii hides
/usr/share/emacs/24.3.50/lisp/org/ox-ascii
/home/frank/.emacs.d/elpa/org-plus-contrib-20130923/org-bbdb hides
/usr/share/emacs/24.3.50/lisp/org/org-bbdb
/home/frank/.emacs.d/elpa/company-20130923.513/.dir-locals hides
/usr/share/emacs/24.3.50/lisp/gnus/.dir-locals

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 tabify mule-util dired-aux misearch
multi-isearch
add-log dired company-go jka-compr goto-addr eldoc disp-table which-func
imenu
paren superword subword cuatroporocho-theme workgroups saveplace recentf
tree-widget wid-edit desktop frameset server view go-mode url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util
mailcap ffap url-parse auth-source eieio eieio-core gnus-util mm-util
mail-prsvr password-cache url-vars python-el-fgallina-expansions python
slime-fancy slime-trace-dialog slime-fontifying-fu slime-package-fu
slime-references slime-scratch slime-presentations slime-fuzzy
slime-fancy-trace slime-fancy-inspector slime-c-p-c slime-repl elp
slime-editing-commands slime-autodoc slime-parse slime derived gud apropos
arc-mode archive-mode hyperspec savehist autorevert filenotify cl-macs gv
grep
compile winner transpose-frame switch-window quail smex rainbow-mode color
multiple-cursors mc-separate-operations rectangular-region-mode mc-mark-pop
mc-mark-more mc-cycle-cursors mc-edit-lines multiple-cursors-core warnings
rect
iedit iedit-lib hide-lines goto-last-change flycheck rx f dash s
expand-region
text-mode-expansions the-org-mode-expansions er-basic-expansions
expand-region-custom expand-region-core diminish company ace-jump-mode
webjump
misc ido ibuffer autoinsert yasnippet help-mode cl whitespace thingatpt
paredit
edmacro kmacro cl-loaddefs cl-lib org byte-opt bytecomp byte-compile cconv
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities
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 ob-core ob-eval org-compat
org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
dabbrev hippie-exp comint ansi-color elec-pair etags ring browse-url
bookmark
pp avoid time time-stamp delsel cua-base advice help-fns finder-inf info
easymenu package time-date 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)

[-- Attachment #2: Type: text/html, Size: 22017 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line
  2014-03-08 10:16 bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line Frank Ruben
@ 2014-03-10 18:58 ` Glenn Morris
  2014-03-10 21:39   ` Frank Ruben
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2014-03-10 18:58 UTC (permalink / raw)
  To: Frank Ruben; +Cc: 16971


Thanks for the report, but please give us a complete example starting
from `emacs -Q' that shows exactly what the issue is.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line
  2014-03-10 18:58 ` Glenn Morris
@ 2014-03-10 21:39   ` Frank Ruben
  2014-03-11  0:17     ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Frank Ruben @ 2014-03-10 21:39 UTC (permalink / raw)
  To: Glenn Morris

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

Hi Glenn,

I manually changed my emacs lisp sources, so I can't reproduce it now
with emacs
-Q.
Anyway in *scratch* buffer, it was like (where '|' marks cursor position):

1) With current newcomment.el (December 2013):

    (foo ; bar |baz

     M-j =>

    (foo ; bar
    baz

2) With previous newcomment.el (March 2013):

    (foo ; bar |baz

     M-j =>

    (foo ; bar
         ; baz


Hope that helps and thanks for taking care,
    Frank



On Mon, Mar 10, 2014 at 7:58 PM, Glenn Morris <rgm@gnu.org> wrote:

>
> Thanks for the report, but please give us a complete example starting
> from `emacs -Q' that shows exactly what the issue is.
>

[-- Attachment #2: Type: text/html, Size: 1378 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line
  2014-03-10 21:39   ` Frank Ruben
@ 2014-03-11  0:17     ` Glenn Morris
  2014-03-11  4:18       ` Dmitry Gutov
                         ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Glenn Morris @ 2014-03-11  0:17 UTC (permalink / raw)
  To: Frank Ruben; +Cc: 16971


(Please keep the debbugs address cc'd)

Frank Ruben wrote:

> Anyway in *scratch* buffer, it was like (where '|' marks cursor position):
>
> 1) With current newcomment.el (December 2013):
>
>     (foo ; bar |baz
>
>      M-j =>
>
>     (foo ; bar
>     baz

Thanks, I can confirm that.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line
  2014-03-11  0:17     ` Glenn Morris
@ 2014-03-11  4:18       ` Dmitry Gutov
  2014-03-15  5:25       ` Dmitry Gutov
  2014-03-17  6:52       ` Dmitry Gutov
  2 siblings, 0 replies; 10+ messages in thread
From: Dmitry Gutov @ 2014-03-11  4:18 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16971, Frank Ruben


>> Anyway in *scratch* buffer, it was like (where '|' marks cursor position):
>>
>> 1) With current newcomment.el (December 2013):
>>
>>     (foo ; bar |baz
>>
>>      M-j =>
>>
>>     (foo ; bar
>>     baz

Apparently, that's because comment-start-skip in emacs-lisp-mode doesn't
match `; ', it needs a preceding character, so it matches e.g. ` ; '.

One fix would be to change it from
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *" to
"\\(\\(\\=\\|^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *".

(not sure if there'll be other consequences of this)

Another - revert the revision 114486 and just make `comment-beginning'
use `syntax-ppss' after finding prospective comment starter points with
`comment-search-backward', to check if the state at (match-end 0) is
"inside comment".





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line
  2014-03-11  0:17     ` Glenn Morris
  2014-03-11  4:18       ` Dmitry Gutov
@ 2014-03-15  5:25       ` Dmitry Gutov
  2014-03-17 14:48         ` Stefan
  2014-03-17  6:52       ` Dmitry Gutov
  2 siblings, 1 reply; 10+ messages in thread
From: Dmitry Gutov @ 2014-03-15  5:25 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16971, Frank Ruben

AFAICS, only `lisp-mode-variables' and `scheme-mode-variables' set 
`comment-start-skip' to a value that looks for a character before the 
comment (and they're also the only two uses of 
`font-lock-comment-start-skip').

The patch below is probably the cleaner fix. I'll install it in a couple 
of days if no one objects.


=== modified file 'lisp/emacs-lisp/lisp-mode.el'
--- lisp/emacs-lisp/lisp-mode.el	2014-02-10 01:34:22 +0000
+++ lisp/emacs-lisp/lisp-mode.el	2014-03-15 05:21:12 +0000
@@ -449,15 +449,10 @@
    (setq-local outline-level 'lisp-outline-level)
    (setq-local add-log-current-defun-function #'lisp-current-defun-name)
    (setq-local comment-start ";")
-  ;; Look within the line for a ; following an even number of backslashes
-  ;; after either a non-backslash or the line beginning.
-  (setq-local comment-start-skip 
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
-  ;; Font lock mode uses this only when it KNOWS a comment is starting.
-  (setq-local font-lock-comment-start-skip ";+ *")
+  (setq-local comment-start-skip ";+ *")
    (setq-local comment-add 1)		;default to `;;' in comment-region
    (setq-local comment-column 40)
-  ;; Don't get confused by `;' in doc strings when paragraph-filling.
-  (setq-local comment-use-global-state t)
+  (setq-local comment-use-syntax t)
    (setq-local imenu-generic-expression lisp-imenu-generic-expression)
    (setq-local multibyte-syntax-as-symbol t)
    ;; (setq-local syntax-begin-function 'beginning-of-defun)  ;;Bug#16247.

=== modified file 'lisp/progmodes/scheme.el'
--- lisp/progmodes/scheme.el	2014-01-01 07:43:34 +0000
+++ lisp/progmodes/scheme.el	2014-03-15 05:15:57 +0000
@@ -140,11 +140,8 @@
    (setq-local add-log-current-defun-function #'lisp-current-defun-name)
    (setq-local comment-start ";")
    (setq-local comment-add 1)
-  ;; Look within the line for a ; following an even number of backslashes
-  ;; after either a non-backslash or the line beginning.
-  (setq-local comment-start-skip
-	      "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+[ \t]*")
-  (setq-local font-lock-comment-start-skip ";+ *")
+  (setq-local comment-start-skip ";+[ \t]*")
+  (setq-local comment-use-syntax t)
    (setq-local comment-column 40)
    (setq-local parse-sexp-ignore-comments t)
    (setq-local lisp-indent-function 'scheme-indent-function)






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line
  2014-03-11  0:17     ` Glenn Morris
  2014-03-11  4:18       ` Dmitry Gutov
  2014-03-15  5:25       ` Dmitry Gutov
@ 2014-03-17  6:52       ` Dmitry Gutov
  2 siblings, 0 replies; 10+ messages in thread
From: Dmitry Gutov @ 2014-03-17  6:52 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16971-done, Frank Ruben

Version: 24.4

Applied (in 116778), but also see 116779.

I've missed some modes that do the same thing, notably lisp-mode and 
perl-mode. Instead of changing them, added a compatibility piece that 
makes those kind of comment-start-skip values work again, too.

Of course, if a mode somewhere checks multiple chars before the 
beginning of a comment, it will still fail.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line
  2014-03-15  5:25       ` Dmitry Gutov
@ 2014-03-17 14:48         ` Stefan
  2014-03-17 16:22           ` Dmitry Gutov
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan @ 2014-03-17 14:48 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Frank Ruben, 16971

> AFAICS, only `lisp-mode-variables' and `scheme-mode-variables' set
> `comment-start-skip' to a value that looks for a character before the
> comment (and they're also the only two uses of
> `font-lock-comment-start-skip').

Hmm... and all the modes that rely on comment-normalize-vars, IIUC.


        Stefan





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line
  2014-03-17 14:48         ` Stefan
@ 2014-03-17 16:22           ` Dmitry Gutov
  2014-03-17 19:37             ` Stefan
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitry Gutov @ 2014-03-17 16:22 UTC (permalink / raw)
  To: Stefan; +Cc: Frank Ruben, 16971

On 17.03.2014 16:48, Stefan wrote:

> Hmm... and all the modes that rely on comment-normalize-vars, IIUC.

Huh, indeed.  Should we make it not add the big prefix to 
`comment-start-skip' when `comment-use-syntax' is t?





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line
  2014-03-17 16:22           ` Dmitry Gutov
@ 2014-03-17 19:37             ` Stefan
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan @ 2014-03-17 19:37 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Frank Ruben, 16971

>> Hmm... and all the modes that rely on comment-normalize-vars, IIUC.
> Huh, indeed.  Should we make it not add the big prefix to
> `comment-start-skip' when `comment-use-syntax' is t?

Probably.


        Stefan





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-03-17 19:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-08 10:16 bug#16971: 24.3.50; comment-beginning behaves differently in current newcomment.el, leads to error in comment-indent-new-line Frank Ruben
2014-03-10 18:58 ` Glenn Morris
2014-03-10 21:39   ` Frank Ruben
2014-03-11  0:17     ` Glenn Morris
2014-03-11  4:18       ` Dmitry Gutov
2014-03-15  5:25       ` Dmitry Gutov
2014-03-17 14:48         ` Stefan
2014-03-17 16:22           ` Dmitry Gutov
2014-03-17 19:37             ` Stefan
2014-03-17  6:52       ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).