emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107841: Record and display absolute


From: Juanma Barranquero
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107841: Record and display absolute path of DLLs loaded (bug#10424).
Date: Tue, 10 Apr 2012 16:16:05 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107841
fixes bug(s): http://debbugs.gnu.org/10424
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Tue 2012-04-10 16:16:05 +0200
message:
  Record and display absolute path of DLLs loaded (bug#10424).
  
  * lisp/misc.el (list-dynamic-libraries--loaded): New function.
    (list-dynamic-libraries--refresh): Use it.
  
  * src/w32.c (w32_delayed_load): Record the full path of the library
    being loaded.
modified:
  lisp/ChangeLog
  lisp/misc.el
  src/ChangeLog
  src/w32.c
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-04-10 11:27:44 +0000
+++ b/lisp/ChangeLog    2012-04-10 14:16:05 +0000
@@ -1,3 +1,9 @@
+2012-04-10  Juanma Barranquero  <address@hidden>
+
+       * misc.el: Display absolute path of loaded DLLs (bug#10424).
+       (list-dynamic-libraries--loaded): New function.
+       (list-dynamic-libraries--refresh): Use it.
+
 2012-04-10  Nathan Weizenbaum  <address@hidden>
 
        * progmodes/python.el (python-fill-paragraph): Make

=== modified file 'lisp/misc.el'
--- a/lisp/misc.el      2012-01-19 07:21:25 +0000
+++ b/lisp/misc.el      2012-04-10 14:16:05 +0000
@@ -138,6 +138,19 @@
 (defvar list-dynamic-libraries--loaded-only-p)
 (make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p)
 
+(defun list-dynamic-libraries--loaded (from)
+  "Compute the \"Loaded from\" column.
+Internal use only."
+  (if from
+      (let ((name (car from))
+            (path (or (cdr from) "<unknown>")))
+        ;; This is a roundabout way to change the tooltip without
+        ;; having to replace the default printer function
+        (propertize name
+                    'display (propertize name
+                                         'help-echo (concat "Loaded from: " 
path))))
+    ""))
+
 (defun list-dynamic-libraries--refresh ()
   "Recompute the list of dynamic libraries.
 Internal use only."
@@ -159,7 +172,7 @@
       (when (or from
                 (not list-dynamic-libraries--loaded-only-p))
         (push (list id (vector (symbol-name id)
-                               (or from "")
+                               (list-dynamic-libraries--loaded from)
                                (mapconcat 'identity (cdr lib) ", ")))
               tabulated-list-entries)))))
 

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-04-09 20:43:15 +0000
+++ b/src/ChangeLog     2012-04-10 14:16:05 +0000
@@ -1,3 +1,8 @@
+2012-04-10  Juanma Barranquero  <address@hidden>
+
+       * w32.c (w32_delayed_load): Record the full path of the library
+       being loaded (bug#10424).
+
 2012-04-09  Glenn Morris  <address@hidden>
 
        * doc.c (Fsnarf_documentation): Check variables, functions are bound,

=== modified file 'src/w32.c'
--- a/src/w32.c 2012-02-04 13:48:38 +0000
+++ b/src/w32.c 2012-04-10 14:16:05 +0000
@@ -5816,7 +5816,15 @@
             CHECK_STRING_CAR (dlls);
             if ((library_dll = LoadLibrary (SDATA (XCAR (dlls)))))
               {
-                found = XCAR (dlls);
+                char name[MAX_PATH];
+                DWORD len;
+
+                len = GetModuleFileNameA (library_dll, name, sizeof (name));
+                found = Fcons (XCAR (dlls),
+                               (len > 0)
+                               /* Possibly truncated */
+                               ? make_specified_string (name, -1, len, 1)
+                               : Qnil);
                 break;
               }
           }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]