GNU bug report logs - #27371
26.0.50; Unexpected element (define-type . tramp-file-name) in load-history

Previous Next

Package: emacs;

Reported by: Michael Albinus <michael.albinus <at> gmx.de>

Date: Thu, 15 Jun 2017 08:06:02 UTC

Severity: minor

Found in version 26.0.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27371 in the body.
You can then email your comments to 27371 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Thu, 15 Jun 2017 08:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Albinus <michael.albinus <at> gmx.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 15 Jun 2017 08:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Thu, 15 Jun 2017 10:05:31 +0200
1. emacs -Q -l tramp
2. M-x unload-feature <RET> tramp

=> Unexpected element (define-type . tramp-file-name) in load-history

In GNU Emacs 26.0.50 (build 44, x86_64-pc-linux-gnu, GTK+ Version 2.24.30)
 of 2017-03-31 built on detlef
Repository revision: 1da9a207669a3cf5d27ac1dd61543c1492e05360
System Description:	Ubuntu 17.04

Recent messages:
Mark set
uncompressing 23073.gz...done
Deleting article 23073 in default
No more unseen articles
Mark set
Returning to the group buffer
Saving /home/albinus/.newsrc.eld...
Saving file /home/albinus/.newsrc.eld...
Wrote /home/albinus/.newsrc.eld
Saving /home/albinus/.newsrc.eld...done

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GCONF GSETTINGS NOTIFY GNUTLS
LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8

Major mode: Lisp Interaction

Minor modes in effect:
  diff-auto-refine-mode: t
  erc-notify-mode: t
  erc-notifications-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  icomplete-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/albinus/src/elpa/packages/debbugs/debbugs-org hides /home/albinus/.emacs.d/elpa/debbugs-0.14/debbugs-org
/home/albinus/src/elpa/packages/debbugs/debbugs-gnu hides /home/albinus/.emacs.d/elpa/debbugs-0.14/debbugs-gnu
/home/albinus/src/elpa/packages/debbugs/debbugs hides /home/albinus/.emacs.d/elpa/debbugs-0.14/debbugs
/home/albinus/src/elpa/packages/debbugs/debbugs-autoloads hides /home/albinus/.emacs.d/elpa/debbugs-0.14/debbugs-autoloads
/home/albinus/src/elpa/packages/debbugs/debbugs-pkg hides /home/albinus/.emacs.d/elpa/debbugs-0.14/debbugs-pkg
/home/albinus/src/elpa/packages/debbugs/debbugs-browse hides /home/albinus/.emacs.d/elpa/debbugs-0.14/debbugs-browse
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme hides /home/albinus/.emacs.d/elpa/tramp-theme-0.1.1/tramp-theme
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-autoloads hides /home/albinus/.emacs.d/elpa/tramp-theme-0.1.1/tramp-theme-autoloads
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-pkg hides /home/albinus/.emacs.d/elpa/tramp-theme-0.1.1/tramp-theme-pkg
/home/albinus/.emacs.d/elpa/telepathy-20131209.458/telepathy hides ~/lisp/telepathy
~/src/tramp/lisp/tramp-smb hides /usr/local/share/emacs/26.0.50/lisp/net/tramp-smb
~/src/tramp/lisp/tramp-uu hides /usr/local/share/emacs/26.0.50/lisp/net/tramp-uu
~/src/tramp/lisp/tramp-adb hides /usr/local/share/emacs/26.0.50/lisp/net/tramp-adb
~/src/tramp/lisp/tramp-compat hides /usr/local/share/emacs/26.0.50/lisp/net/tramp-compat
~/src/tramp/lisp/tramp hides /usr/local/share/emacs/26.0.50/lisp/net/tramp
~/src/tramp/lisp/trampver hides /usr/local/share/emacs/26.0.50/lisp/net/trampver
~/src/tramp/lisp/tramp-ftp hides /usr/local/share/emacs/26.0.50/lisp/net/tramp-ftp
/home/albinus/.emacs.d/elpa/soap-client-3.1.2/soap-client hides /usr/local/share/emacs/26.0.50/lisp/net/soap-client
/home/albinus/.emacs.d/elpa/soap-client-3.1.2/soap-inspect hides /usr/local/share/emacs/26.0.50/lisp/net/soap-inspect
~/src/tramp/lisp/tramp-cmds hides /usr/local/share/emacs/26.0.50/lisp/net/tramp-cmds
~/src/tramp/lisp/tramp-gvfs hides /usr/local/share/emacs/26.0.50/lisp/net/tramp-gvfs
~/src/tramp/lisp/tramp-loaddefs hides /usr/local/share/emacs/26.0.50/lisp/net/tramp-loaddefs
~/lisp/dbus hides /usr/local/share/emacs/26.0.50/lisp/net/dbus
~/src/tramp/lisp/tramp-sh hides /usr/local/share/emacs/26.0.50/lisp/net/tramp-sh
~/src/tramp/lisp/tramp-cache hides /usr/local/share/emacs/26.0.50/lisp/net/tramp-cache

Features:
(shadow warnings emacsbug time-stamp url-http url-gw url-auth url-queue
url-cache url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf diff-mode easy-mmode flow-fill sort gnus-cite
url-util shr-color color shr svg dom browse-url mm-archive mail-extr
gnus-bcklg qp gnus-async gnus-ml pop3 utf-7 nndraft nnmh nnml
network-stream nsm starttls gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig
mailcap gnus-cache gnus-sum nnnil smtpmail sendmail gnus-demon nntp
gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls
gnutls utf7 netrc nnoo gnus-spec gnus-int gnus-range message puny rfc822
mml mml-sec epa derived epg mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util
rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util
mail-prsvr term/xterm xterm erc-notify erc-desktop-notifications
notifications dbus xml erc-list erc-menu erc-join erc-ring erc-networks
erc-pcomplete erc-track erc-match erc-button wid-edit erc-fill erc-stamp
erc-netsplit erc-goodies erc erc-backend erc-compat thingatpt pp
cperl-mode tramp-theme em-dirs esh-var esh-io esh-cmd esh-opt esh-ext
esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util
finder-inf rx docker-tramp tramp-cache slime-autoloads vagrant-tramp
dash term disp-table ehelp info package epg-config url-handlers
url-parse url-vars time tramp-sh tramp-cmds tramp tramp-compat
tramp-loaddefs trampver ucs-normalize shell pcomplete comint ansi-color
ring parse-time format-spec advice auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache ido seq byte-opt subr-x gv
bytecomp byte-compile cl-extra help-mode easymenu cconv jka-compr
icomplete time-date paren vc cl-loaddefs pcase cl-lib vc-dispatcher
dired dired-loaddefs mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript case-table epa-hook jka-cmpr-hook help
simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 453817 58583)
 (symbols 48 42157 120)
 (miscs 40 69 285)
 (strings 32 100342 15319)
 (string-bytes 1 3099767)
 (vectors 16 60096)
 (vector-slots 8 992964 10665)
 (floats 8 436 632)
 (intervals 56 302 0)
 (buffers 976 23))




Added indication that bug 27371 blocks24655 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 15 Jun 2017 16:58:01 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Thu, 15 Jun 2017 20:53:02 GMT) Full text and rfc822 format available.

Removed indication that bug 27371 blocks Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 21 Jun 2017 03:22:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Mon, 17 Jul 2017 12:38:02 GMT) Full text and rfc822 format available.

Message #14 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: 27371 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Mon, 17 Jul 2017 14:36:56 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

> 1. emacs -Q -l tramp
> 2. M-x unload-feature <RET> tramp
>
> => Unexpected element (define-type . tramp-file-name) in load-history

The following patch fixes this for me:

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index 28d0b18c81..34200ab40e 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -269,7 +269,7 @@ unload-feature
 	      ;; and says we should restore SYMBOL's autoload
 	      ;; when we undefine it.
 	      (`t (setq restore-autoload (cdr x)))
-	      ((or `require `defface) nil)
+	      ((or `require `defface `define-type) nil)
 	      (_ (message "Unexpected element %s in load-history" x)))
 	  ;; Kill local values as much as possible.
 	  (dolist (buf (buffer-list))
--8<---------------cut here---------------end--------------->8---

However, it just skips the entry. Wouldn't it be better to remove the
defstruct itself, and all inherited symbols? And where could I find
information how to destroy a defstruct?

Stefan?

Beswt regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Mon, 17 Jul 2017 19:45:01 GMT) Full text and rfc822 format available.

Message #17 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 27371 <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Mon, 17 Jul 2017 15:43:52 -0400
> However, it just skips the entry. Wouldn't it be better to remove the
> defstruct itself, and all inherited symbols? And where could I find
> information how to destroy a defstruct?

Better would be to add some hook so cl-lib can add support for
define-type.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Tue, 18 Jul 2017 07:11:02 GMT) Full text and rfc822 format available.

Message #20 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 27371 <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Tue, 18 Jul 2017 09:09:55 +0200
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

>> However, it just skips the entry. Wouldn't it be better to remove the
>> defstruct itself, and all inherited symbols? And where could I find
>> information how to destroy a defstruct?
>
> Better would be to add some hook so cl-lib can add support for
> define-type.

Likely yes. But I'm not familiar with cl*; I have no idea how such a
hook should look like. And how it shall be implemented.

>         Stefan

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Tue, 18 Jul 2017 14:27:02 GMT) Full text and rfc822 format available.

Message #23 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 27371 <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Tue, 18 Jul 2017 10:25:56 -0400
>>> However, it just skips the entry. Wouldn't it be better to remove the
>>> defstruct itself, and all inherited symbols? And where could I find
>>> information how to destroy a defstruct?
>> Better would be to add some hook so cl-lib can add support for
>> define-type.
> Likely yes. But I'm not familiar with cl*; I have no idea how such a
> hook should look like. And how it shall be implemented.

The hook shouldn't be specific to cl.  Maybe something like the patch
below would make sense?
Then we can add support for define-type, ert-deftest, cl-defmethod, ...


        Stefan


diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index 28d0b18c81..bf15399c11 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -162,6 +162,60 @@ unload--set-major-mode
           ;; mode, or proposed is not nil and not major-mode, and so we use it.
           (funcall (or proposed 'fundamental-mode)))))))
 
+(cl-defgeneric loadhist-unload-element (x)
+  "Unload an element from the `load-history'."
+  (message "Unexpected element %S in load-history" x))
+
+;; In `load-history', the definition of a previously autoloaded
+;; function is represented by 2 entries: (t . SYMBOL) comes before
+;; (defun . SYMBOL) and says we should restore SYMBOL's autoload when
+;; we undefine it.
+;; So we use this auxiliary variable to keep track of the last (t . SYMBOL)
+;; that occurred.
+(defvar loadhist--restore-autoload
+  "If non-nil, this is a symbol for which we should
+restore a previous autoload if possible.")
+
+(cl-defmethod loadhist-unload-element ((x (head t)))
+  (setq loadhist--restore-autoload (cdr x)))
+
+(defun loadhist--unload-function (x)
+  (let ((fun (cdr x)))
+    (when (fboundp fun)
+      (when (fboundp 'ad-unadvise)
+	(ad-unadvise fun))
+      (let ((aload (get fun 'autoload)))
+	(defalias fun
+          (if (and aload (eq fun loadhist--restore-autoload))
+	      (cons 'autoload aload)
+            nil))))))
+  (setq loadhist--restore-autoload nil))
+
+(cl-defmethod loadhist-unload-element ((x (head defun)))
+  (loadhist--unload-function x))
+(cl-defmethod loadhist-unload-element ((x (head autoload)))
+  (loadhist--unload-function x))
+
+(cl-defmethod loadhist-unload-element ((x (head require))) nil)
+(cl-defmethod loadhist-unload-element ((x (head defface))) nil)
+
+(cl-defmethod loadhist-unload-element ((x (head provide)))
+  ;; Remove any feature names that this file provided.
+  (setq features (delq (cdr x) features)))
+
+(cl-defmethod loadhist-unload-element ((x symbol))
+  ;; Kill local values as much as possible.
+  (dolist (buf (buffer-list))
+    (with-current-buffer buf
+      (if (and (boundp x) (timerp (symbol-value x)))
+	  (cancel-timer (symbol-value x)))
+      (kill-local-variable x)))
+  (if (and (boundp x) (timerp (symbol-value x)))
+      (cancel-timer (symbol-value x)))
+  ;; Get rid of the default binding if we can.
+  (unless (local-variable-if-set-p x)
+    (makunbound x)))
+
 ;;;###autoload
 (defun unload-feature (feature &optional force)
   "Unload the library that provided FEATURE.
@@ -200,9 +254,6 @@ unload-feature
 	       (prin1-to-string dependents) file))))
   (let* ((unload-function-defs-list (feature-symbols feature))
          (file (pop unload-function-defs-list))
-	 ;; If non-nil, this is a symbol for which we should
-	 ;; restore a previous autoload if possible.
-	 restore-autoload
 	 (name (symbol-name feature))
          (unload-hook (intern-soft (concat name "-unload-hook")))
 	 (unload-func (intern-soft (concat name "-unload-function"))))
@@ -250,38 +301,7 @@ unload-feature
 	  (when (symbolp elt)
 	    (elp-restore-function elt))))
 
-      (dolist (x unload-function-defs-list)
-	(if (consp x)
-	    (pcase (car x)
-	      ;; Remove any feature names that this file provided.
-	      (`provide
-	       (setq features (delq (cdr x) features)))
-	      ((or `defun `autoload)
-	       (let ((fun (cdr x)))
-		 (when (fboundp fun)
-		   (when (fboundp 'ad-unadvise)
-		     (ad-unadvise fun))
-		   (let ((aload (get fun 'autoload)))
-		     (if (and aload (eq fun restore-autoload))
-			 (fset fun (cons 'autoload aload))
-		       (fmakunbound fun))))))
-	      ;; (t . SYMBOL) comes before (defun . SYMBOL)
-	      ;; and says we should restore SYMBOL's autoload
-	      ;; when we undefine it.
-	      (`t (setq restore-autoload (cdr x)))
-	      ((or `require `defface) nil)
-	      (_ (message "Unexpected element %s in load-history" x)))
-	  ;; Kill local values as much as possible.
-	  (dolist (buf (buffer-list))
-	    (with-current-buffer buf
-	      (if (and (boundp x) (timerp (symbol-value x)))
-		  (cancel-timer (symbol-value x)))
-	      (kill-local-variable x)))
-	  (if (and (boundp x) (timerp (symbol-value x)))
-	      (cancel-timer (symbol-value x)))
-	  ;; Get rid of the default binding if we can.
-	  (unless (local-variable-if-set-p x)
-	    (makunbound x))))
+      (mapc #'loadhist-unload-element unload-function-defs-list)
       ;; Delete the load-history element for this file.
       (setq load-history (delq (assoc file load-history) load-history))))
   ;; Don't return load-history, it is not useful.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Tue, 18 Jul 2017 15:20:01 GMT) Full text and rfc822 format available.

Message #26 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 27371 <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Tue, 18 Jul 2017 17:19:21 +0200
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

Hi Stefan,

> The hook shouldn't be specific to cl.  Maybe something like the patch
> below would make sense?

There is an error in the patch:

In toplevel form:
loadhist.el:192:40:Error: Invalid read syntax: ")"

After fixing this, `tramp-test39-unload' still passes the test. You
might push the patch.

> Then we can add support for define-type, ert-deftest, cl-defmethod, ...

That's my original question: what does it take to unload a `define-type'
entry?

>         Stefan

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Tue, 18 Jul 2017 15:57:01 GMT) Full text and rfc822 format available.

Message #29 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 27371 <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Tue, 18 Jul 2017 11:56:18 -0400
>> Then we can add support for define-type, ert-deftest, cl-defmethod, ...
> That's my original question: what does it take to unload a `define-type'
> entry?

Presumably it should undo what cl-struct-define does.
The main part would be (setf (cl--find-class name) nil), I guess.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Tue, 18 Jul 2017 16:09:02 GMT) Full text and rfc822 format available.

Message #32 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 27371 <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Tue, 18 Jul 2017 18:08:38 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Stefan,

> After fixing this, `tramp-test39-unload' still passes the test. You
> might push the patch.

Too hasty. Further runs of tramp-tests.el fail for this. I'll check
what's up.

>>         Stefan

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Mon, 24 Jul 2017 15:03:01 GMT) Full text and rfc822 format available.

Message #35 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 27371 <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Mon, 24 Jul 2017 17:01:55 +0200
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

Hi Stefan,

>>> Then we can add support for define-type, ert-deftest, cl-defmethod, ...
>> That's my original question: what does it take to unload a `define-type'
>> entry?
>
> Presumably it should undo what cl-struct-define does.
> The main part would be (setf (cl--find-class name) nil), I guess.

I've ended up with the appended patch. Would this be OK? More precise,
would the implementation of

(cl-defmethod loadhist-unload-element ((x (head define-type)))

be the right thing?

>         Stefan

Best regards, Michael.

[Message part 2 (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Mon, 24 Jul 2017 15:34:02 GMT) Full text and rfc822 format available.

Message #38 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 27371 <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Mon, 24 Jul 2017 11:33:59 -0400
> +    ;; Remove internal functions.
> +    (dolist (fun
> +	     (append
> +	      ;; constructor, copier, predicate, tag-symbol.
> +	      `(,(format "make-%s" name)
> +	        ,(format "copy-%s" name)
> +	        ,(format "%s-p" name)
> +	        ,(format "cl-struct-%s-tags" name))
> +	      ;; accessors.
> +	      (mapcar #'(lambda (y) (format "%s-%s" name y)) slots)))

AFAIK all these functions are defined with `defalias', so they should
already be handled by their own entry in load-history.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Mon, 24 Jul 2017 16:14:02 GMT) Full text and rfc822 format available.

Message #41 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 27371 <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Mon, 24 Jul 2017 18:13:21 +0200
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

>> +    ;; Remove internal functions.
>> +    (dolist (fun
>> +	     (append
>> +	      ;; constructor, copier, predicate, tag-symbol.
>> +	      `(,(format "make-%s" name)
>> +	        ,(format "copy-%s" name)
>> +	        ,(format "%s-p" name)
>> +	        ,(format "cl-struct-%s-tags" name))
>> +	      ;; accessors.
>> +	      (mapcar #'(lambda (y) (format "%s-%s" name y)) slots)))
>
> AFAIK all these functions are defined with `defalias', so they should
> already be handled by their own entry in load-history.

You're right. So what's left to do is

    (setf (cl--find-class name) nil)))

If you don't object I would commit the patch then ('tho it's rather your patch).

>         Stefan

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27371; Package emacs. (Mon, 24 Jul 2017 16:32:02 GMT) Full text and rfc822 format available.

Message #44 received at 27371 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 27371 <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Mon, 24 Jul 2017 12:31:09 -0400
> If you don't object I would commit the patch then ('tho it's rather
> your patch).

Please do,


        Stefan




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Mon, 24 Jul 2017 17:40:02 GMT) Full text and rfc822 format available.

Notification sent to Michael Albinus <michael.albinus <at> gmx.de>:
bug acknowledged by developer. (Mon, 24 Jul 2017 17:40:02 GMT) Full text and rfc822 format available.

Message #49 received at 27371-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 27371-done <at> debbugs.gnu.org
Subject: Re: bug#27371: 26.0.50;
 Unexpected element (define-type . tramp-file-name) in load-history
Date: Mon, 24 Jul 2017 19:39:31 +0200
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

>> If you don't object I would commit the patch then ('tho it's rather
>> your patch).
>
> Please do,

Done. Closing the bug.

>         Stefan

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 Aug 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.