emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cperl + isearch + font-lock-multiline sometimes very slow


From: martin rudalics
Subject: Re: cperl + isearch + font-lock-multiline sometimes very slow
Date: Sat, 21 Oct 2006 17:57:39 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

With these 3 lines I can still observe the problem.
1. Start emacs with .emacs containing the 3 lines above
2. load a Perl file (not too small), I use perl5db.pl from the Perl distribution
3. Watch emacs CPU usage

Before digging into this any further: Can you reproduce the bug with
the attached patch?
*** cperl-mode.el       Sat Oct 21 11:36:32 2006
--- cperl-mode.el       Sat Oct 21 17:53:32 2006
***************
*** 2822,2828 ****
                                    (skip-chars-backward " \t")
                                    (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*[ 
\t]*:")))
                             (get-text-property (point) 'first-format-line)))
!                  
                   ;; Look at previous line that's at column 0
                   ;; to determine whether we are in top-level decls
                   ;; or function's arg decls.  Set basic-indent accordingly.
--- 2822,2828 ----
                                    (skip-chars-backward " \t")
                                    (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*[ 
\t]*:")))
                             (get-text-property (point) 'first-format-line)))
! 
                   ;; Look at previous line that's at column 0
                   ;; to determine whether we are in top-level decls
                   ;; or function's arg decls.  Set basic-indent accordingly.
***************
*** 5708,5714 ****

  (defun cperl-windowed-init ()
    "Initialization under windowed version."
!   (if (or (featurep 'ps-print) cperl-faces-init)
        ;; Need to init anyway:
        (or cperl-faces-init (cperl-init-faces))
      (add-hook 'font-lock-mode-hook
--- 5708,5715 ----

  (defun cperl-windowed-init ()
    "Initialization under windowed version."
!   (if (or ; (featurep 'ps-print)
!        cperl-faces-init)
        ;; Need to init anyway:
        (or cperl-faces-init (cperl-init-faces))
      (add-hook 'font-lock-mode-hook
***************
*** 5717,5726 ****
                 (if (memq major-mode '(perl-mode cperl-mode))
                     (progn
                       (or cperl-faces-init (cperl-init-faces)))))))
!     (if (fboundp 'eval-after-load)
!       (eval-after-load
!           "ps-print"
!         '(or cperl-faces-init (cperl-init-faces))))))

  (defvar cperl-font-lock-keywords-1 nil
    "Additional expressions to highlight in Perl mode.  Minimal set.")
--- 5718,5728 ----
                 (if (memq major-mode '(perl-mode cperl-mode))
                     (progn
                       (or cperl-faces-init (cperl-init-faces)))))))
! ;;;     (if (fboundp 'eval-after-load)
! ;;;   (eval-after-load
! ;;;       "ps-print"
! ;;;     '(or cperl-faces-init (cperl-init-faces))))
!     ))

  (defvar cperl-font-lock-keywords-1 nil
    "Additional expressions to highlight in Perl mode.  Minimal set.")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]