Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1574977
 поиск   регистрация   авторизация 
 
Группа :: Редакторы
Пакет: emacs21

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: emacs-21.3-use-handler-for-load-of-suffixed.patch


At this place, We can find a real file with suffixed filename (`fn')
that needs to be handled in a special way (e.g. a compressed 
one: "/a.elc.gz") while `filename' holds the requested 
filename without the suffix ("/a").
In this case, the file shouldn't be opened and the function (openp())
should not return the fd. It should return -2, and the calling 
function (load()) should call the corresponding handler in order
to load it.
It used to check whether there is a special handler by passing `filename'.
Such a test used not to give the expected result, since the handler
is applicable to the real (suffixed) found filename `fn'.
Loading libraries stored as compressed .elc-files used to be broken 
because of this: the corresponding load-handler (`jka-compr-load') 
used not be called, and the docstrings for the loaded functions
got corrupted when displayed.
Ivan Zakharyaschev <imz@altlinux.org>
--- emacs-21.3/src/lread.c.handlerForSuffixed	2003-04-01 00:35:12 +0400
+++ emacs-21.3/src/lread.c	2003-04-01 00:35:33 +0400
@@ -1022,7 +1022,7 @@
 		  handler = Ffind_file_name_handler (filename, Qfile_exists_p);
 	     It's not clear why that was the case and it breaks things like
 	     (load "/bar.el") where the file is actually "/bar.el.gz".  */
-	  handler = Ffind_file_name_handler (filename, Qfile_exists_p);
+	  handler = Ffind_file_name_handler (build_string (fn), Qfile_exists_p);
 	  if (!NILP (handler) && !exec_only)
 	    {
 	      int exists;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005