diff options
| author | Juanma Barranquero | 2012-04-10 16:16:05 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2012-04-10 16:16:05 +0200 |
| commit | 2a8ce227d040e564ea6e7b4aecf1dcad5ca6e9c7 (patch) | |
| tree | a522ea953610f470909f0dff44cdf94c1dc81d71 | |
| parent | 8f33b5f8734810e2feb0036bd9b0b34f51f7bc17 (diff) | |
| download | emacs-2a8ce227d040e564ea6e7b4aecf1dcad5ca6e9c7.tar.gz emacs-2a8ce227d040e564ea6e7b4aecf1dcad5ca6e9c7.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/misc.el | 15 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/w32.c | 10 |
4 files changed, 34 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fee5e34942c..9d019be9796 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-04-10 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * misc.el: Display absolute path of loaded DLLs (bug#10424). | ||
| 4 | (list-dynamic-libraries--loaded): New function. | ||
| 5 | (list-dynamic-libraries--refresh): Use it. | ||
| 6 | |||
| 1 | 2012-04-10 Nathan Weizenbaum <nweiz@google.com> | 7 | 2012-04-10 Nathan Weizenbaum <nweiz@google.com> |
| 2 | 8 | ||
| 3 | * progmodes/python.el (python-fill-paragraph): Make | 9 | * progmodes/python.el (python-fill-paragraph): Make |
diff --git a/lisp/misc.el b/lisp/misc.el index 4706c918db3..cb52ecbd36e 100644 --- a/lisp/misc.el +++ b/lisp/misc.el | |||
| @@ -138,6 +138,19 @@ variation of `C-x M-c M-butterfly' from url `http://xkcd.com/378/'." | |||
| 138 | (defvar list-dynamic-libraries--loaded-only-p) | 138 | (defvar list-dynamic-libraries--loaded-only-p) |
| 139 | (make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p) | 139 | (make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p) |
| 140 | 140 | ||
| 141 | (defun list-dynamic-libraries--loaded (from) | ||
| 142 | "Compute the \"Loaded from\" column. | ||
| 143 | Internal use only." | ||
| 144 | (if from | ||
| 145 | (let ((name (car from)) | ||
| 146 | (path (or (cdr from) "<unknown>"))) | ||
| 147 | ;; This is a roundabout way to change the tooltip without | ||
| 148 | ;; having to replace the default printer function | ||
| 149 | (propertize name | ||
| 150 | 'display (propertize name | ||
| 151 | 'help-echo (concat "Loaded from: " path)))) | ||
| 152 | "")) | ||
| 153 | |||
| 141 | (defun list-dynamic-libraries--refresh () | 154 | (defun list-dynamic-libraries--refresh () |
| 142 | "Recompute the list of dynamic libraries. | 155 | "Recompute the list of dynamic libraries. |
| 143 | Internal use only." | 156 | Internal use only." |
| @@ -159,7 +172,7 @@ Internal use only." | |||
| 159 | (when (or from | 172 | (when (or from |
| 160 | (not list-dynamic-libraries--loaded-only-p)) | 173 | (not list-dynamic-libraries--loaded-only-p)) |
| 161 | (push (list id (vector (symbol-name id) | 174 | (push (list id (vector (symbol-name id) |
| 162 | (or from "") | 175 | (list-dynamic-libraries--loaded from) |
| 163 | (mapconcat 'identity (cdr lib) ", "))) | 176 | (mapconcat 'identity (cdr lib) ", "))) |
| 164 | tabulated-list-entries))))) | 177 | tabulated-list-entries))))) |
| 165 | 178 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 18a3d4545e3..76a8353b853 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-04-10 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * w32.c (w32_delayed_load): Record the full path of the library | ||
| 4 | being loaded (bug#10424). | ||
| 5 | |||
| 1 | 2012-04-09 Glenn Morris <rgm@gnu.org> | 6 | 2012-04-09 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * doc.c (Fsnarf_documentation): Check variables, functions are bound, | 8 | * doc.c (Fsnarf_documentation): Check variables, functions are bound, |
| @@ -5816,7 +5816,15 @@ w32_delayed_load (Lisp_Object libraries, Lisp_Object library_id) | |||
| 5816 | CHECK_STRING_CAR (dlls); | 5816 | CHECK_STRING_CAR (dlls); |
| 5817 | if ((library_dll = LoadLibrary (SDATA (XCAR (dlls))))) | 5817 | if ((library_dll = LoadLibrary (SDATA (XCAR (dlls))))) |
| 5818 | { | 5818 | { |
| 5819 | found = XCAR (dlls); | 5819 | char name[MAX_PATH]; |
| 5820 | DWORD len; | ||
| 5821 | |||
| 5822 | len = GetModuleFileNameA (library_dll, name, sizeof (name)); | ||
| 5823 | found = Fcons (XCAR (dlls), | ||
| 5824 | (len > 0) | ||
| 5825 | /* Possibly truncated */ | ||
| 5826 | ? make_specified_string (name, -1, len, 1) | ||
| 5827 | : Qnil); | ||
| 5820 | break; | 5828 | break; |
| 5821 | } | 5829 | } |
| 5822 | } | 5830 | } |