[gnus git] branch master updated: m0-5-17-g59403f3 =2= Remove byte-compilation of Gnus format specs. ; (gnus-update-format-specifications): Remove outdated grouplens stuff.

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  59403f318f769dc0ff91a59405c4d8d122a10ab6 (commit)
       via  9cf0b6a7dcd8601f5e3e0cb4317ee55f15ce0b90 (commit)
      from  e2c1d571d8a1c38be0eab90ac59fe3a916ffa62d (commit)


- Log -----------------------------------------------------------------
commit 59403f318f769dc0ff91a59405c4d8d122a10ab6
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Sun Jun 10 20:31:53 2012 +0200

    Remove byte-compilation of Gnus format specs.
    
    Benchmarking shows that this doesn't really speed things up (any
    more?).

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 005fa64..a70794d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,13 @@
 2012-06-10  Lars Magne Ingebrigtsen  <[email protected]>
 
+	* gnus-spec.el: Remove all the byte-compilation stuff, since
+	benchmarking shows that it doesn't help when entering large summary
+	buffers.
+
+	* gnus-xmas.el (gnus-xmas-define): Remove.
+
+	* gnus-util.el (gnus-byte-code): Remove.
+
 	* gnus-spec.el (gnus-update-format-specifications): Remove outdated
 	grouplens stuff.
 
diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el
index 152b4cb..f40177d 100644
--- a/lisp/gnus-spec.el
+++ b/lisp/gnus-spec.el
@@ -101,66 +101,13 @@ text properties. This is only needed on XEmacs, as Emacs does this anyway."
 			    (propertize (string 8206) 'invisible t)
 			  ""))
 
-(defun gnus-summary-line-format-spec ()
-  (insert gnus-tmp-unread gnus-tmp-replied
-	  gnus-tmp-score-char gnus-tmp-indentation)
-  (gnus-put-text-property
-   (point)
-   (progn
-     (insert
-      (format "%c%4s: %-23s%c" gnus-tmp-opening-bracket gnus-tmp-lines
-	      (let ((val
-		     (inline
-		       (gnus-summary-from-or-to-or-newsgroups
-			gnus-tmp-header gnus-tmp-from))))
-		(if (> (length val) 23)
-		    (if (gnus-lrm-string-p val)
-			(concat (substring val 0 23) gnus-lrm-string)
-		      (substring val 0 23))
-		  val))
-	      gnus-tmp-closing-bracket))
-     (point))
-   gnus-mouse-face-prop gnus-mouse-face)
-  (insert " " gnus-tmp-subject-or-nil "\n"))
-
-(defvar gnus-summary-line-format-spec
-  (gnus-byte-code 'gnus-summary-line-format-spec))
-
-(defun gnus-summary-dummy-line-format-spec ()
-  (insert "*  ")
-  (gnus-put-text-property
-   (point)
-   (progn
-     (insert ":				 :")
-     (point))
-   gnus-mouse-face-prop gnus-mouse-face)
-  (insert " " gnus-tmp-subject "\n"))
-
-(defvar gnus-summary-dummy-line-format-spec
-  (gnus-byte-code 'gnus-summary-dummy-line-format-spec))
-
-(defun gnus-group-line-format-spec ()
-  (insert gnus-tmp-marked-mark gnus-tmp-subscribed
-	  gnus-tmp-process-marked
-	  gnus-group-indentation
-	  (format "%5s: " gnus-tmp-number-of-unread))
-  (gnus-put-text-property
-   (point)
-   (progn
-     (insert gnus-tmp-group "\n")
-     (1- (point)))
-   gnus-mouse-face-prop gnus-mouse-face))
-(defvar gnus-group-line-format-spec
-  (gnus-byte-code 'gnus-group-line-format-spec))
+(defvar gnus-summary-line-format-spec nil)
+(defvar gnus-summary-dummy-line-format-spec nil)
+(defvar gnus-group-line-format-spec nil)
 
 (defvar gnus-format-specs
   `((version . ,emacs-version)
-    (gnus-version . ,(gnus-continuum-version))
-    (group "%M\%S\%p\%P\%5y: %(%g%)\n" ,gnus-group-line-format-spec)
-    (summary-dummy "*  %(:                          :%) %S\n"
-		   ,gnus-summary-dummy-line-format-spec)
-    (summary "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
-	     ,gnus-summary-line-format-spec))
+    (gnus-version . ,(gnus-continuum-version)))
   "Alist of format specs.")
 
 (defvar gnus-default-format-specs gnus-format-specs)
@@ -769,36 +716,6 @@ If PROPS, insert the result."
 	(gnus-add-text-properties (point) (progn (eval form) (point)) props)
       (eval form))))
 
-(defun gnus-compile ()
-  "Byte-compile the user-defined format specs."
-  (interactive)
-  (require 'bytecomp)
-  (let ((entries gnus-format-specs)
-	(byte-compile-warnings '(unresolved callargs redefine))
-	entry gnus-tmp-func)
-    (save-excursion
-      (gnus-message 7 "Compiling format specs...")
-
-      (while entries
-	(setq entry (pop entries))
-	(if (memq (car entry) '(gnus-version version))
-	    (setq gnus-format-specs (delq entry gnus-format-specs))
-	  (let ((form (caddr entry)))
-	    (when (and (listp form)
-		       ;; Under GNU Emacs, it's (byte-code ...)
-		       (not (eq 'byte-code (car form)))
-		       ;; Under XEmacs, it's (funcall #<compiled-function ...>)
-		       (not (and (eq 'funcall (car form))
-				 (byte-code-function-p (cadr form)))))
-	      (defalias 'gnus-tmp-func `(lambda () ,form))
-	      (byte-compile 'gnus-tmp-func)
-	      (setcar (cddr entry) (gnus-byte-code 'gnus-tmp-func))))))
-
-      (push (cons 'version emacs-version) gnus-format-specs)
-      ;; Mark the .newsrc.eld file as "dirty".
-      (gnus-dribble-touch)
-      (gnus-message 7 "Compiling user specs...done"))))
-
 (defun gnus-set-format (type &optional insertable)
   (set (intern (format "gnus-%s-line-format-spec" type))
        (gnus-parse-format
diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el
index fef67cd..072e7b5 100644
--- a/lisp/gnus-util.el
+++ b/lisp/gnus-util.el
@@ -169,15 +169,6 @@ This is a compatibility function for different Emacsen."
   `(delete-region (point-at-bol)
 		  (progn (forward-line ,(or n 1)) (point))))
 
-(defun gnus-byte-code (func)
-  "Return a form that can be `eval'ed based on FUNC."
-  (let ((fval (indirect-function func)))
-    (if (byte-code-function-p fval)
-	(let ((flist (append fval nil)))
-	  (setcar flist 'byte-code)
-	  flist)
-      (cons 'progn (cddr fval)))))
-
 (defun gnus-extract-address-components (from)
   "Extract address components from a From header.
 Given an RFC-822 address FROM, extract full name and canonical address.
diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el
index 41108ab..32a1761 100644
--- a/lisp/gnus-xmas.el
+++ b/lisp/gnus-xmas.el
@@ -440,13 +440,6 @@ FRONT-ADVANCE and REAR-ADVANCE are ignored."
 
   (defvar gnus-mouse-face-prop 'highlight)
 
-  (defun gnus-byte-code (func)
-    "Return a form that can be `eval'ed based on FUNC."
-    (let ((fval (indirect-function func)))
-      (if (compiled-function-p fval)
-	  (list 'funcall fval)
-	(cons 'progn (cdr (cdr fval))))))
-
   (unless (fboundp 'match-string-no-properties)
     (defalias 'match-string-no-properties 'match-string))
 
diff --git a/texi/ChangeLog b/texi/ChangeLog
index 52e11a5..f867031 100644
--- a/texi/ChangeLog
+++ b/texi/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-10  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus.texi: Remove mention of compilation, as that's no longer
+	supported.
+
 2012-05-01  Teodor Zlatanov  <[email protected]>
 
 	* auth.texi (Help for users): Update for .gpg file being second.
diff --git a/texi/gnus.texi b/texi/gnus.texi
index 6929d03..542456c 100644
--- a/texi/gnus.texi
+++ b/texi/gnus.texi
@@ -815,7 +815,6 @@ Various
 * Formatting Variables::        You can specify what buffers should look like.
 * Window Layout::               Configuring the Gnus buffer windows.
 * Faces and Fonts::             How to change how faces look.
-* Compilation::                 How to speed Gnus up.
 * Mode Lines::                  Displaying information in the mode lines.
 * Highlighting and Menus::      Making buffers look all nice and cozy.
 * Daemons::                     Gnus can do things behind your back.
@@ -22079,7 +22078,6 @@ to you, using @kbd{G b u} and updating the group will usually fix this.
 * Formatting Variables::        You can specify what buffers should look like.
 * Window Layout::               Configuring the Gnus buffer windows.
 * Faces and Fonts::             How to change how faces look.
-* Compilation::                 How to speed Gnus up.
 * Mode Lines::                  Displaying information in the mode lines.
 * Highlighting and Menus::      Making buffers look all nice and cozy.
 * Daemons::                     Gnus can do things behind your back.
@@ -22376,11 +22374,6 @@ than 6 characters to make it look nice in columns.)
 Ignoring is done first; then cutting; then maxing; and then as the very
 last operation, padding.
 
-If you use lots of these advanced thingies, you'll find that Gnus gets
-quite slow.  This can be helped enormously by running @kbd{M-x
-gnus-compile} when you are satisfied with the look of your lines.
-@xref{Compilation}.
-
 
 @node User-Defined Specs
 @subsection User-Defined Specs
@@ -22889,30 +22882,6 @@ the face you want to alter, and alter it via the standard Customize
 interface.
 
 
-@node Compilation
-@section Compilation
-@cindex compilation
-@cindex byte-compilation
-
-@findex gnus-compile
-
-Remember all those line format specification variables?
-@code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
-on.  Now, Gnus will of course heed whatever these variables are, but,
-unfortunately, changing them will mean a quite significant slow-down.
-(The default values of these variables have byte-compiled functions
-associated with them, while the user-generated versions do not, of
-course.)
-
-To help with this, you can run @kbd{M-x gnus-compile} after you've
-fiddled around with the variables and feel that you're (kind of)
-satisfied.  This will result in the new specs being byte-compiled, and
-you'll get top speed again.  Gnus will save these compiled specs in the
-@file{.newsrc.eld} file.  (User-defined functions aren't compiled by
-this function, though---you should compile them yourself by sticking
-them into the @file{~/.gnus.el} file and byte-compiling that file.)
-
-
 @node Mode Lines
 @section Mode Lines
 @cindex mode lines

commit 9cf0b6a7dcd8601f5e3e0cb4317ee55f15ce0b90
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Sun Jun 10 19:59:00 2012 +0200

    (gnus-update-format-specifications): Remove outdated grouplens stuff.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f71c286..005fa64 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-10  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus-spec.el (gnus-update-format-specifications): Remove outdated
+	grouplens stuff.
+
 2012-06-07  Lars Magne Ingebrigtsen  <[email protected]>
 
 	* gnus-msg.el (gnus-msg-mail): Warn the user about Gnus not running
diff --git a/lisp/gnus-spec.el b/lisp/gnus-spec.el
index e187920..152b4cb 100644
--- a/lisp/gnus-spec.el
+++ b/lisp/gnus-spec.el
@@ -214,15 +214,6 @@ Return a list of updated types."
 	    (not (equal emacs-version
 			(cdr (assq 'version gnus-format-specs)))))
     (setq gnus-format-specs nil))
-  ;; Flush the group format spec cache if there's the grouplens stuff
-  ;; or it doesn't support decoded group names.
-  (when (memq 'group types)
-    (let* ((spec (assq 'group gnus-format-specs))
-	   (sspec (gnus-prin1-to-string (nth 2 spec))))
-      (when (or (string-match " gnus-tmp-grouplens[ )]" sspec)
-		(not (string-match " gnus-tmp-decoded-group[ )]" sspec)))
-	(setq gnus-format-specs (delq spec gnus-format-specs)))))
-
   ;; Go through all the formats and see whether they need updating.
   (let (new-format entry type val updated)
     (while (setq type (pop types))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog    |   13 +++++++
 lisp/gnus-spec.el |  100 ++--------------------------------------------------
 lisp/gnus-util.el |    9 -----
 lisp/gnus-xmas.el |    7 ----
 texi/ChangeLog    |    5 +++
 texi/gnus.texi    |   31 ----------------
 6 files changed, 22 insertions(+), 143 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.