GNU bug report logs -
#22431
25.0.50; incorrect jsdoc comment wrapping in js mode
Previous Next
Reported by: Tom Tromey <tom <at> tromey.com>
Date: Fri, 22 Jan 2016 15:48:01 UTC
Severity: minor
Found in version 25.0.50
Done: Tom Tromey <tom <at> tromey.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22431 in the body.
You can then email your comments to 22431 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22431
; Package
emacs
.
(Fri, 22 Jan 2016 15:48:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tom Tromey <tom <at> tromey.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 22 Jan 2016 15:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm using js-mode for .js files and I set this in my prog-mode-hook:
(setq-local comment-auto-fill-only-comments t)
(auto-fill-mode 1)
To see the bug, open a new .js file (but it works in an existing file as
well). Then enter:
/**
* Load the inspector's shared head.js for use by tests that need to
Now move point to the end of the comment line and type " open the".
This causes wrapping for me, but the result looks like:
/**
* Load the inspector's shared head.js for use by tests that need to
/**open the
However, it should look like:
/**
* Load the inspector's shared head.js for use by tests that need to
* open the
In GNU Emacs 25.0.50.3 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.6)
of 2016-01-20 built on pokyo
Windowing system distributor 'Fedora Project', version 11.0.11800000
Configured using:
'configure --prefix=/home/tromey/Emacs/install
--with-file-notifications=no'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: JS
Minor modes in effect:
shell-dirtrack-mode: t
bug-reference-prog-mode: t
diff-auto-refine-mode: t
erc-spelling-mode: t
erc-truncate-mode: t
flyspell-mode: t
which-function-mode: t
projectile-global-mode: t
projectile-mode: t
erc-notify-mode: t
erc-notifications-mode: t
erc-services-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-track-minor-mode: t
erc-match-mode: t
erc-netsplit-mode: t
erc-hl-nicks-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-move-to-prompt-mode: t
erc-readonly-mode: t
flycheck-mode: t
savehist-mode: t
tooltip-mode: t
global-eldoc-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
column-number-mode: t
line-number-mode: t
auto-fill-function: do-auto-fill
transient-mark-mode: t
Recent messages:
Saving file /home/tromey/firefox-git/gecko/devtools/client/styleeditor/test/browser_styleeditor_syncEditSelector.js...
Wrote /home/tromey/firefox-git/gecko/devtools/client/styleeditor/test/browser_styleeditor_syncEditSelector.js
More than 1 blank line not allowed. [no-multiple-empty-lines]
Auto-saving...done
Making comment-continue buffer-local while locally let-bound!
Quit
(New file)
Mark set [2 times]
Saving file /tmp/q.js...
Wrote /tmp/q.js
Load-path shadows:
/home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/25.0.50/lisp/play/bubbles
Features:
(shadow emacsbug vc-annotate compare-w shell smerge-mode css-mode
perl-mode rst tabify man gud autoconf autoconf-mode git-rebase-mode
etags xref project dxr org-element org-rmail org-mhe org-irc org-info
org-gnus org-docview doc-view image-mode org-bibtex bibtex org-bbdb
org-w3m org org-macro org-footnote org-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 mailalias bbdb-sc supercite regi
mail-hist nnir url-http url-gw url-auth eww url-queue gnus-fun log-view
idutils gnus-html url-cache mm-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf find-dired git-commit-mode
log-edit pcvs-util term/xterm xterm copyright dabbrev conf-mode grep js
json cc-mode cc-fonts cc-guess cc-menus cc-cmds add-log bug-reference
map sgml-mode flow-fill shr-color url-util url-parse url-vars shr dom
mm-archive browse-url character-fold misearch multi-isearch bbdb-gui
bbdb-hooks bbdb-rmail rmailsum rmail vc-mtn vc-hg vc-git diff-mode
vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs seq sort smiley gnus-cite
gnus-async gnus-bcklg qp gnus-ml disp-table gnus-topic nndraft nnmh
nnfolder utf-7 bbdb-gnus bbdb-snarf mail-extr bbdb-com warnings
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp
gnus-cache gnus-registry registry eieio-compat eieio-base gnus-art mm-uu
mml2015 mm-view mml-smime smime dig mailcap gnus-sum gnus-group
gnus-undo smtpmail sendmail gnus-start gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range
message idna rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader gnus-win gnus gnus-ems nnheader mail-utils network-stream nsm
starttls tls gnutls erc-spelling erc-truncate flyspell ispell diminish
appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs which-func
imenu projectile ibuf-macs ibuf-ext ibuffer minimap autorevert
filenotify desktop frameset cus-start cus-load erc-notify
erc-desktop-notifications notifications dbus xml erc-services erc-list
erc-menu erc-join erc-ring erc-networks erc-pcomplete pcomplete
erc-track erc-match erc-netsplit erc-hl-nicks color erc-button erc-fill
erc-stamp wid-edit erc-goodies erc erc-backend erc-compat format-spec
auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv
gnus-util mm-util help-fns mail-prsvr password-cache thingatpt pp status
dired-aux dired-x dired advice vc-dir ewoc vc vc-dispatcher flycheck
derived easy-mmode cl-seq edmacro kmacro find-func help-mode rx subr-x
dash jka-compr sh-script smie executable compile let-alist cc-styles
cc-align cc-engine cc-vars cc-defs bbdb cl timezone ange-ftp comint
ansi-color ring server savehist bbdb-autoloads dwarf-mode-autoloads
eieio-core cl-macs gv cl-loaddefs pcase cl-lib finder-inf
lisppaste-autoloads pydoc-info-autoloads info-look weblogger-autoloads
info package easymenu epg-config time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded 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
dbusbind inotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 2444835 1037424)
(symbols 48 114236 66)
(miscs 40 29658 13350)
(strings 32 1021236 415862)
(string-bytes 1 43274617)
(vectors 16 118902)
(vector-slots 8 2744111 224997)
(floats 8 1008 1451)
(intervals 56 87454 4187)
(buffers 976 255)
(heap 1024 355968 203309))
Tom
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22431
; Package
emacs
.
(Sat, 23 Jan 2016 05:21:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 22431 <at> debbugs.gnu.org (full text, mbox):
On 01/22/2016 06:46 PM, Tom Tromey wrote:
> Now move point to the end of the comment line and type " open the".
> This causes wrapping for me, but the result looks like:
>
> /**
> * Load the inspector's shared head.js for use by tests that need to
> /**open the
Indeed, I also see the problem. But it's not in js2-mode, because it
defines its own comment-line-break-function, instead of inheriting one
from cc-engine.
We should probably copy it over.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#22431
; Package
emacs
.
(Sun, 08 Jan 2017 05:18:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 22431 <at> debbugs.gnu.org (full text, mbox):
This patch fixes a couple js comment-filling bugs.
Dmitry mentioned comment-line-break-function in bug#22431; this patch
just sets it in js-mode.
For bug#19399, debugging showed that js-mode left
c-block-comment-start-regexp nil, so this sets it to the correct value.
I would normally check this in but I think it should probably be
reviewed.
Tom
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index e3f64a8..375ae9d 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3760,6 +3760,8 @@ js-mode
c-line-comment-starter "//"
c-comment-start-regexp "/[*/]\\|\\s!"
comment-start-skip "\\(//+\\|/\\*+\\)\\s *")
+ (setq-local comment-line-break-function #'c-indent-new-comment-line)
+ (setq-local c-block-comment-start-regexp "\\*/")
(setq-local electric-indent-chars
(append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*".
Reply sent
to
Tom Tromey <tom <at> tromey.com>
:
You have taken responsibility.
(Sat, 14 Jan 2017 17:48:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tom Tromey <tom <at> tromey.com>
:
bug acknowledged by developer.
(Sat, 14 Jan 2017 17:48:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 22431-done <at> debbugs.gnu.org (full text, mbox):
These were both fixed by 05fe74bec239bebea84cb6803120321c367d67d3.
Tom
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 12 Feb 2017 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 130 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.