emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/gnuplot 68508cdf3e 04/11: Remove the gnuplot-load-hook, pr


From: ELPA Syncer
Subject: [nongnu] elpa/gnuplot 68508cdf3e 04/11: Remove the gnuplot-load-hook, prefer with-eval-after-load
Date: Sun, 2 Jan 2022 11:58:18 -0500 (EST)

branch: elpa/gnuplot
commit 68508cdf3eeb6e3d43dd97ee3d324bbd0ede3270
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Remove the gnuplot-load-hook, prefer with-eval-after-load
---
 gnuplot.el   | 23 +++++++++--------------
 gpelcard.tex |  3 ---
 2 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/gnuplot.el b/gnuplot.el
index f6c9c314f4..561d7fc455 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -114,10 +114,11 @@
   :group 'gnuplot-hooks
   :type 'hook)
 
-(defcustom gnuplot-load-hook nil
-  "Hook run when gnuplot.el is first loaded."
-  :group 'gnuplot-hooks
-  :type 'hook)
+(defvar gnuplot-load-hook nil)
+(make-obsolete-variable
+ 'gnuplot-load-hook
+ "The package loading hook has been removed, use `with-eval-after-load' 
instead."
+ "8.0")
 
 (defcustom gnuplot-after-plot-hook (list #'gnuplot-trim-gnuplot-buffer)
   "Hook run after gnuplot plots something.
@@ -543,18 +544,16 @@ The easiest way to customize the submenus is to use the 
custom
 package.  Just type \\[gnuplot-customize] and follow your nose.
 
 You can also add new items to any of these sub-menus by adding to the
-`gnuplot-load-hook' in your .emacs file.  Here is an example of adding
-the \"regis\" terminal type to the terminal sub-menu:
+`with-eval-after-load' blocks in your .emacs file. Here is an example of
+adding the \"regis\" terminal type to the terminal sub-menu:
 
- (add-hook
-  'gnuplot-load-hook
-  '(lambda ()
+ (with-eval-after-load 'gnuplot
       (setq gnuplot-insertions-terminal
             (append gnuplot-insertions-terminal
                     (list
                      [\"regis\"
                       (gnuplot-insert \"set terminal regis\")
-                       t])))))")
+                       t]))))")
 
 (defvar gnuplot-insertions-top ()
   "Top part of insertions menu.
@@ -2259,11 +2258,7 @@ following in your .emacs file:
 
 ;;; That's it! ----------------------------------------------------------------
 
-
-;;; --- final chores: provide 'gnuplot and run load-hook
-;; provide before run-hooks suggested by <DB>
 (provide 'gnuplot)
-(run-hooks 'gnuplot-load-hook)
 
 ;; Local Variables:
 ;; indent-tabs-mode: nil
diff --git a/gpelcard.tex b/gpelcard.tex
index 03f88f2ba6..9c8a779108 100644
--- a/gpelcard.tex
+++ b/gpelcard.tex
@@ -322,9 +322,6 @@ the gnuplot buffer.  Excess lines are trimmed.  0 means to 
never trim.}
 \variable{gnuplot-mode-hook}{nil}{Functions run when gnuplot minor
   mode is entered.}
 %
-\variable{gnuplot-load-hook}{nil}{Functions run when gnuplot.el is
-  first loaded.}
-%
 \variable{gnuplot-after-plot-hook}{nil}{Functions run after gnuplot
   plots an entire buffer.  See the doc string for
   \texttt{gnuplot-recently-sent}.}



reply via email to

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