emacs-w3mはw3m-cookie-shutdown等を終了時フック(kill-emacs-hook)に登録していますが、パッケージの抜き差し等で実体が失われると、 Cannot open load file: No such file or directory, w3m-cookie のようなエラーで終了を妨害してしまいます。
cf. これらをw3m-cookieやw3m-sessionを実際にロードした際に登録してはどうでしょうか。 -- Akinori MUSHA / https://akinori.org/ |
Index: w3m-cookie.el =================================================================== RCS file: /storage/cvsroot/emacs-w3m/w3m-cookie.el,v retrieving revision 1.34 diff -u -r1.34 w3m-cookie.el --- w3m-cookie.el 4 Aug 2017 02:39:59 -0000 1.34 +++ w3m-cookie.el 8 Aug 2017 04:25:23 -0000 @@ -485,6 +485,8 @@ (if (get-buffer " *w3m-cookie-parse-temp*") (kill-buffer (get-buffer " *w3m-cookie-parse-temp*")))) +(add-hook 'kill-emacs-hook 'w3m-cookie-shutdown) + ;;;###autoload (defun w3m-cookie-set (url beg end) "Register cookies which correspond to URL. Index: w3m-session.el =================================================================== RCS file: /storage/cvsroot/emacs-w3m/w3m-session.el,v retrieving revision 1.36 diff -u -r1.36 w3m-session.el --- w3m-session.el 28 Jun 2017 00:53:11 -0000 1.36 +++ w3m-session.el 8 Aug 2017 04:25:23 -0000 @@ -907,6 +907,9 @@ (eq w3m-session-load-crashed-sessions t))) item))))) +(add-hook 'w3m-arrived-shutdown-functions 'w3m-session-crash-recovery-remove t) +(add-hook 'w3m-arrived-shutdown-functions 'w3m-session-automatic-save t) + (provide 'w3m-session) ;;; w3m-session.el ends here Index: w3m.el =================================================================== RCS file: /storage/cvsroot/emacs-w3m/w3m.el,v retrieving revision 1.1678 diff -u -r1.1678 w3m.el --- w3m.el 4 Aug 2017 02:06:29 -0000 1.1678 +++ w3m.el 8 Aug 2017 04:25:23 -0000 @@ -3026,9 +3026,6 @@ (run-hooks 'w3m-arrived-shutdown-functions))) (add-hook 'kill-emacs-hook 'w3m-arrived-shutdown) -(add-hook 'kill-emacs-hook 'w3m-cookie-shutdown) -(add-hook 'w3m-arrived-shutdown-functions 'w3m-session-automatic-save) -(add-hook 'w3m-arrived-shutdown-functions 'w3m-session-crash-recovery-remove) (add-hook 'w3m-arrived-shutdown-functions 'w3m-cleanup-temp-files) ;;; Generic macros and inline functions: