From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Varshavchik Newsgroups: gmane.emacs.bugs Subject: bug#18134: 24.3; Doxygen comments trigger anomalous C++ major mode behavior Date: Mon, 28 Jul 2014 08:47:25 -0400 Message-ID: <87ppgpiraa.fsf@octopus.email-scan.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1406587167 29932 80.91.229.3 (28 Jul 2014 22:39:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Jul 2014 22:39:27 +0000 (UTC) To: 18134@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 29 00:39:18 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 1XBtZd-0000DU-Qj for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Jul 2014 00:39:18 +0200 Original-Received: from localhost ([::1]:42688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBtZc-0001NZ-SN for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Jul 2014 18:39:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBtZT-0001Lx-O2 for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 18:39:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBtZO-0004MD-88 for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 18:39:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBtZO-0004M8-3i for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 18:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XBtZN-0008Cf-SR for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 18:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sam Varshavchik Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Jul 2014 22:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18134 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.140658713631518 (code B ref -1); Mon, 28 Jul 2014 22:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jul 2014 22:38:56 +0000 Original-Received: from localhost ([127.0.0.1]:41387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBtZG-0008C1-4f for submit@debbugs.gnu.org; Mon, 28 Jul 2014 18:38:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50598) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBkMO-00021L-6U for submit@debbugs.gnu.org; Mon, 28 Jul 2014 08:49:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBkMD-00056S-Bs for submit@debbugs.gnu.org; Mon, 28 Jul 2014 08:48:54 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:38380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBkMD-00056J-81 for submit@debbugs.gnu.org; Mon, 28 Jul 2014 08:48:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBkM7-0004B5-Fe for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 08:48:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBkM1-0004nG-BI for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 08:48:43 -0400 Original-Received: from www.courier-mta.com ([216.254.115.190]:47084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBkM1-0004lG-07 for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 08:48:37 -0400 Original-Received: from octopus.email-scan.com (octopus.email-scan.com [::ffff:192.168.0.4]) (TLS: TLSv1/SSLv3,256bits,DHE-RSA-AES256-SHA) by www.courier-mta.com with ESMTPS; Mon, 28 Jul 2014 08:47:28 -0400 id 0000000000100088.0000000053D64660.00001C49 Original-Received: from localhost (localhost [127.0.0.1]) (uid 1000) by octopus.email-scan.com with local; Mon, 28 Jul 2014 08:47:25 -0400 id 00000000002C21AC.0000000053D6465D.00006D7E X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Mon, 28 Jul 2014 18:38:52 -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:91904 Archived-At: I am seeing anomalous behavior in C++ major mode that's triggered by long, but not excessively long -- only a few hundred lines -- Doxygen-style comments. Cursor navigation at the end of the Doxygen comment block in the following file (just before the first typedef), and trying to add some additional text there, results in 3-5 seconds' worth of delays for nearly typed character. Highlighting the entire Doxygen comment block: M-x indent-region takes several minutes (!) with emacs consuming 100% CPU. Sample file to open in C++ major mode. ====================================cut here================================= #ifndef x_w_layoutmanager_H #define x_w_layoutmanager_H #include #include #include #include namespace LIBCXX_NAMESPACE { namespace w { #if 0 }; }; #endif //! Base class for \ref layoutmanager "layoutmanager"s. class layoutmanagerBase : public ptrrefBase { public: //! A display element factory created by a \ref layoutmanager "layout manager". //! Refer to this class as \c INSERT_LIBX_NAMESPACE::w::layoutmanager::base::factory //! //! Obtain this factory from its \ref layoutmanager "layout manager". //! Calling one of //! \ref layoutmanagerObj::factoryObj "this factory's methods" adds a //! new display element //! to the container, in the manner controlled by the container's //! layout manager. //! //! The layout manager keeps its own reference on all ref handles //! returned by this factory. Generally, the layout manager will also //! have a mechanism by which a display element, created by this //! factory, gets removed from the container, releasing the layout //! manager's reference on the display element. If the last reference //! to the container goes out of scope, the container destroys the //! layout manager, which removes any remaining display elements from //! the container, automatically. //! //! \par Primitive display elements //! //! These methods create various primitive display elements. They are //! available when none of the more standard display elements fit the //! bill. //! //! \code //! #include //! #include //! //! INSERT_LIBX_NAMESPACE::w::const_font font=window->label_font().font(); //! //! std::string str; //! std::vector ustr; //! INSERT_LIBX_NAMESPACE::w::richtextmetamap_t markup; //! INSERT_LIBX_NAMESPACE::w::dim_t initial_width; //! //! INSERT_LIBX_NAMESPACE::w::label l=factory->create_label(font, str); //! //! INSERT_LIBX_NAMESPACE::w::label l=factory->create_label(font, str, unicode::utf_8); //! //! INSERT_LIBX_NAMESPACE::w::label l=factory->create_label(font, ustr); //! //! INSERT_LIBX_NAMESPACE::w::label l=factory->create_label(ustr, markup); //! //! INSERT_LIBX_NAMESPACE::w::label l=factory->create_wrappable_label(font, str, initial_width); //! //! INSERT_LIBX_NAMESPACE::w::label l=factory->create_wrappable_label(font, str, unicode::utf_8, initial_width); //! //! INSERT_LIBX_NAMESPACE::w::label l=factory->create_wrappable_label(font, ustr, initial_width); //! //! INSERT_LIBX_NAMESPACE::w::label l=factory->create_wrappable_label(ustr, markup, initial_width); //! \endcode //! //! Creates a \ref label "label" display element. //! //! \code //! #include //! //! INSERT_LIBX_NAMESPACE::w::const_picture pic; //! INSERT_LIBX_NAMESPACE::w::canvas c=factory->create_canvas(width, height); //! //! INSERT_LIBX_NAMESPACE::w::canvas c=factory->create_canvas(width, height, INSERT_LIBX_NAMESPACE::w::rgb(0, 0, 0)); //! //! INSERT_LIBX_NAMESPACE::w::canvas c=factory->create_canvas(pic); //! //! INSERT_LIBX_NAMESPACE::w::canvas c=factory->create_canvas(pic, INSERT_LIBX_NAMESPACE::w::rgb(0, 0, 0)); //! \endcode //! //! Creates a \ref canvas "canvas" display element. //! //! \code //! #include //! //! INSERT_LIBX_NAMESPACE::w::button b=factory->create_checkbox(); //! //! INSERT_LIBX_NAMESPACE::w::button b=factory->create_radio(); //! //! INSERT_LIBX_NAMESPACE::w::button b=factory->create_standard_button("name"); //! \endcode //! //! Creates a \ref button "button" display element. //! create_standard_button() loads a standard button image, specified //! by name. create_checkbox() loads a standard checkbox button image, //! create_radio() loads a standard radio button image and additionally //! invokes the new button's oneshot() method. //! //! \code //! #include //! //! INSERT_LIBX_NAMESPACE::w::focusable element; //! //! INSERT_LIBX_NAMESPACE::w::inputfocus focus=factory->create_inputfocus(element); //! //! INSERT_LIBX_NAMESPACE::w::inputfocus focus=factory->create_inputfocus(element, INSERT_LIBX_NAMESPACE::w::rgb(0,0,0)); //! //! std::pair focuspair=factory->create_standalone_inputfocus([] //! (const INSERT_LIBX_NAMESPACE::w::gridlayout &layout) //! { //! return layout->create_checkbox(); //! }); //! //! std::pair focuspair=factory->create_standalone_inputfocus([] //! (const INSERT_LIBX_NAMESPACE::w::gridlayout &layout) //! { //! return layout->create_checkbox(); //! }, INSERT_LIBX_NAMESPACE::w::rgb(0,0,0)); //! \endcode //! //! Creates an \ref inputfocus "input focus frame" with the default or //! an explicit background color. create_inputfocus() attached an //! input focus frame to an existing display element. //! //! create_standalone_inputfocus() creates a new input focus to an //! element that gets returned by the lambda parameter, which receives //! the new input focus frame's grid layout manager, and must return //! a focusable display element. This allows the input focus frame to //! be created for a display element contained by the same input focus //! frame. create_standalone_inputfocus() returns a \c std::pair //! containing the new input focus frame display element and the //! focusable display element, returned by the lambda, that the input //! focus frame got attached to. //! //! \code //! #include //! #include //! //! INSERT_LIBX_NAMESPACE::w::xcontainer container= //! layout->create_generic_container(); //! //! INSERT_LIBX_NAMESPACE::w::xcontainer container= //! layout->create_generic_container(INSERT_LIBX_NAMESPACE::rgb(0, 0 ,0)); //! //! INSERT_LIBX_NAMESPACE::w::xfocusablecontainer container= //! layout->create_focusable_container(); //! //! INSERT_LIBX_NAMESPACE::w::xfocusablecontainer container= //! layout->create_focusable_container(INSERT_LIBX_NAMESPACE::rgb(0, 0 ,0)); //! \endcode //! //! create_generic_container() creates a generic //! \ref xcontainer "container object", //! create_focusable_container() creates a generic container that's //! also \ref focusable "focusable". The generic container //! creates an inner focusable scope. Display elements //! added to the focusable container have their own independent //! tabbing order that starts at 0. Tabbing into the focusable //! container sets input focus to the first enabled display element //! in the container. Back-tabbing sets the input focus to the last //! enabled display element. So the tabbing flow appears to be //! ordinary, however the tabbing order of the elements inside the //! focusable container is independent and separate (a display //! element inside the focusable container cannot be set to tab //! between the outside elements, and vice versa). //! //! The new container either inherits its parent container's //! background color, or uses an explicit one, for its own //! background. An optional second parameter selects //! the new container's \ref layout "layout manager", and //! defaults to the \ref gridlayout "grid layout manager". //! //! \code //! #include //! //! INSERT_LIBX_NAMESPACE::w::actionbutton button= //! layout->create_normal_actionbutton(); //! //! INSERT_LIBX_NAMESPACE::w::actionbutton_style style(INSERT_LIBX_NAMESPACE::w::rgb(0, 0, 0), //! INSERT_LIBX_NAMESPACE::w::rgb(INSERT_LIBX_NAMESPACE::w::rgb::maximum, INSERT_LIBX_NAMESPACE::w::rgb::maximum, INSERT_LIBX_NAMESPACE::w::rgb::maximum); //! INSERT_LIBX_NAMESPACE::w::actionbutton button= //! layout->create_normal_actionbutton(style); //! //! INSERT_LIBX_NAMESPACE::w::actionbutton button= //! layout->create_special_actionbutton(); //! //! INSERT_LIBX_NAMESPACE::w::actionbutton button= //! layout->create_special_actionbutton(style); //! \endcode //! //! create_normal_actionbutton() creates an //! \ref actionbutton "action button", a button with a border, //! that changes background colors when clicked; using the default //! button color for the normal and the clicked background, or //! \ref actionbutton_style "custom colors". //! //! create_special_actionbutton() creates a action button with //! a slighly thicker border. //! //! \par Standard display elements //! //! The following methods combine several primitive display elements together //! to form convenient traditional UI objects: //! //! \code //! std::pair button=layout-> //! create_checkbox_with_label("Label"); //! //! std::pair button=layout-> //! create_radio_with_label("Label"); //! \endcode //! //! create_checkbox_with_label() and create_radio_with_label() creates //! an input focus frame containing either a checkbox or a radio button, //! and a text label to the right of it. //! //! The returned \ref inputfocus "input focus frame" is the actual display //! element that gets added to the layout manager's container. The //! button object is the button inside it. //! //! \code //! std::pair> button=layout-> //! create_normal_actionbutton_with_label([] //! { //! // ... //! }, "Label"); //! //! std::pair> button=layout-> //! create_special_actionbutton_with_label([] //! { //! // ... //! }, "Label"); //! //! \endcode //! //! Creates an action button with a label, and a callback. The first //! parameter is the callback lambda that gets invoked on_activate()-ion. //! The second parameter is the button's label. Optional parameters //! follow: a character set designator, like unicode::utf_8 //! (from ), non-default regular and activated background color. //! \par Text input fields //! //! \code //! INSERT_LIBX_NAMESPACE::w::text_input_style style=w->default_text_input_style(); //! //! std::string initial_value; //! //! INSERT_LIBX_NAMESPACE::w::textinputfield input=layout->create_text_input(style, initial_value, 41, 40); //! //! INSERT_LIBX_NAMESPACE::w::textinputfield input=layout->create_text_input(style, initial_value, unicode::utf_8, 41); //! \endcode //! //! create_text_input() creates a single line text input field. Use //! the parent window's default_text_input_style() to obtain a default //! \ref drawableObj::text_input_style "text_input_style". //! //! The initial value of the text input file gets specified using the //! current locale's codeset, or by explicitly specifying the character //! string's codeset. The initial value can also be given as a //! \c std::vector. //! //! The third (or the fourth) parameter is the text input field's width, //! given in character columns. The actual width gets computed based on the //! text input style's font width, that gets multiple by the column character, //! deriving the actual width in pixels. //! //! An optional parameter after the text input field's width specifies the //! maximum number of characters that can be entered. The first example //! specifies a 41 character wide text input that accepts up to a 40 //! character text string (the additional character column accomodates the //! cursor at the end of the full text string, without scrolling). //! //! \par Selection lists //! //! \code //! //! INSERT_LIBX_NAMESPACE::w::xfocusablecontainer container=create_selection_list_rows(4); //! //! INSERT_LIBX_NAMESPACE::w::listlayoutstyle custom_style=INSERT_LIBX_NAMESPACE::w::listlayoutstyle::create(parent_window); //! //! INSERT_LIBX_NAMESPACE::w::xfocusablecontainer container=create_selection_list_rows(4, custom_style); //! \endcode //! //! create_selection_list() creates a focusable container with a //! \ref listlayoutmanager "list layout manager". The first parameter //! specifies the number of rows in the list, if the list contains only //! simple text labels. //! //! The optional second parameter specifies a custom //! \ref listlayoutstyle "list layout style". typedef ref factory; //! A nullable pointer reference to a layout manager's factory //! Refer to this class as \c INSERT_LIBX_NAMESPACE::w::layoutmanager::base::factoryptr typedef ptr factoryptr; }; #if 0 { { #endif } } #endif ====================================cut here================================= In GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9) of 2014-05-21 on buildvm-07.phx2.fedoraproject.org Windowing system distributor `Fedora Project', version 11.0.11404000 Configured using: `configure '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk3' '--with-gpm=no' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro '' Important settings: value of $LANG: en_US.utf8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: C++/l Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: SPC s [ p e p e c i f i e s SPC a SPC c u s t o m SPC l i s t SPC l a y / / ! SPC \ r e f SPC l i s t l a y o u t s t y l e SPC " l i s t SPC l a y o u t SPC s t y l e " . C-SPC w C-x C-b C-x o C-y / / ! C-SPC x i n d e n t - r e g i o n C-x 1 C-x C-s x r e p o r t - e m a c s - b u g Recent messages: Mark set [6 times] Saved text until "ef listlayoutstyle "list layout style". " Mark set [2 times] Indenting region... done scroll-down-command: Beginning of buffer scroll-up-command: End of buffer Auto-saving...done Saving file /home/mrsam/src/libcxxw-work/includes/x/w/layoutmanager.H... Wrote /home/mrsam/src/libcxxw-work/includes/x/w/layoutmanager.H Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message cl-macs gv format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils mule-util misearch multi-isearch vc-git cc-langs cl cl-lib cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs time-date tooltip 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 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 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 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)