|
114 | 114 | :group 'gnuplot-hooks |
115 | 115 | :type 'hook) |
116 | 116 |
|
117 | | -(defcustom gnuplot-load-hook nil |
118 | | - "Hook run when gnuplot.el is first loaded." |
119 | | - :group 'gnuplot-hooks |
120 | | - :type 'hook) |
| 117 | +(defvar gnuplot-load-hook nil) |
| 118 | +(make-obsolete-variable |
| 119 | + 'gnuplot-load-hook |
| 120 | + "The package loading hook has been removed, use `with-eval-after-load' instead." |
| 121 | + "8.0") |
121 | 122 |
|
122 | 123 | (defcustom gnuplot-after-plot-hook (list #'gnuplot-trim-gnuplot-buffer) |
123 | 124 | "Hook run after gnuplot plots something. |
@@ -543,18 +544,16 @@ The easiest way to customize the submenus is to use the custom |
543 | 544 | package. Just type \\[gnuplot-customize] and follow your nose. |
544 | 545 |
|
545 | 546 | You can also add new items to any of these sub-menus by adding to the |
546 | | -`gnuplot-load-hook' in your .emacs file. Here is an example of adding |
547 | | -the \"regis\" terminal type to the terminal sub-menu: |
| 547 | +`with-eval-after-load' blocks in your .emacs file. Here is an example of |
| 548 | +adding the \"regis\" terminal type to the terminal sub-menu: |
548 | 549 |
|
549 | | - (add-hook |
550 | | - 'gnuplot-load-hook |
551 | | - '(lambda () |
| 550 | + (with-eval-after-load 'gnuplot |
552 | 551 | (setq gnuplot-insertions-terminal |
553 | 552 | (append gnuplot-insertions-terminal |
554 | 553 | (list |
555 | 554 | [\"regis\" |
556 | 555 | (gnuplot-insert \"set terminal regis\") |
557 | | - t])))))") |
| 556 | + t]))))") |
558 | 557 |
|
559 | 558 | (defvar gnuplot-insertions-top () |
560 | 559 | "Top part of insertions menu. |
@@ -2259,11 +2258,7 @@ following in your .emacs file: |
2259 | 2258 |
|
2260 | 2259 | ;;; That's it! ---------------------------------------------------------------- |
2261 | 2260 |
|
2262 | | - |
2263 | | -;;; --- final chores: provide 'gnuplot and run load-hook |
2264 | | -;; provide before run-hooks suggested by <DB> |
2265 | 2261 | (provide 'gnuplot) |
2266 | | -(run-hooks 'gnuplot-load-hook) |
2267 | 2262 |
|
2268 | 2263 | ;; Local Variables: |
2269 | 2264 | ;; indent-tabs-mode: nil |
|
0 commit comments