unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Load of .emacs.desktop from Emacs 21 fails
@ 2005-10-11 22:46 Reiner Steib
  2005-10-12  9:18 ` Lars Hansen
  0 siblings, 1 reply; 2+ messages in thread
From: Reiner Steib @ 2005-10-11 22:46 UTC (permalink / raw)


Hi,

when reading this .emacs.desktop file section...

--8<---------------cut here---------------start------------->8---
;; Buffer section:
(desktop-create-buffer 205
  "/tmp/Online.pl"
  "Online.pl"
  'cperl-mode
  '(auto-fill-mode abbrev-mode nil)
  5558
  '(11044 t)
  nil
  nil
  nil)
--8<---------------cut here---------------end--------------->8---

... (created by Emacs 21.3), I get an error in `desktop-load-file'
because `nil' in the mode list.

The following patch fixed it.  Okay to install?

--8<---------------cut here---------------start------------->8---
--- desktop.el	19 Sep 2005 11:36:25 +0200	1.93
+++ desktop.el	11 Oct 2005 13:19:18 +0200	
@@ -963,10 +963,11 @@
 
 (defun desktop-load-file (function)
   "Load the file where auto loaded FUNCTION is defined."
-  (let ((fcell (symbol-function function)))
-    (when (and (listp fcell)
-               (eq 'autoload (car fcell)))
-      (load (cadr fcell)))))
+  (when function
+    (let ((fcell (symbol-function function)))
+      (when (and (listp fcell)
+		 (eq 'autoload (car fcell)))
+	(load (cadr fcell))))))
 
 ;; ----------------------------------------------------------------------------
 ;; Create a buffer, load its file, set its mode, ...;
--8<---------------cut here---------------end--------------->8---

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Load of .emacs.desktop from Emacs 21 fails
  2005-10-11 22:46 Load of .emacs.desktop from Emacs 21 fails Reiner Steib
@ 2005-10-12  9:18 ` Lars Hansen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Hansen @ 2005-10-12  9:18 UTC (permalink / raw)
  Cc: emacs-devel

Reiner Steib wrote:

>The following patch fixed it.  Okay to install?
>  
>
Yes. I just installed it. Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-12  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-11 22:46 Load of .emacs.desktop from Emacs 21 fails Reiner Steib
2005-10-12  9:18 ` Lars Hansen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).