This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] set default-directory in dwarf-browse


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c42608e136ef1eb52f65002d5e7efe6d62b7f285

commit c42608e136ef1eb52f65002d5e7efe6d62b7f285
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Aug 21 21:47:14 2016 -0600

    set default-directory in dwarf-browse
    
    I've been using dwarf-mode.el again recently and I found it mildly
    annoying that the mode doesn't set default-directory.  Setting it
    means that operations in the dwarf-browsing buffer default to the
    directory holding the object file being investigated.
    
    This bumps the version number as well so that updating it via the
    package manager works properly.
    
    2016-11-04  Tom Tromey  <tom@tromey.com>
    
    	* dwarf-mode.el (dwarf-browse): Set default-directory.  Bump
    	version number.

Diff:
---
 binutils/ChangeLog     | 5 +++++
 binutils/dwarf-mode.el | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 767a633..f1e1f9b 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2016-11-04  Tom Tromey  <tom@tromey.com>
+
+	* dwarf-mode.el (dwarf-browse): Set default-directory.  Bump
+	version number.
+
 2016-11-04  Palmer Dabbelt <palmer@dabbelt.com>
 
 	* MAINTAINERS: Add myself and Andrew Waterman as maintainers for
diff --git a/binutils/dwarf-mode.el b/binutils/dwarf-mode.el
index 407c49b..cec56ec 100644
--- a/binutils/dwarf-mode.el
+++ b/binutils/dwarf-mode.el
@@ -1,6 +1,6 @@
 ;;; dwarf-mode.el --- Browser for DWARF information.
 
-;; Version: 1.2
+;; Version: 1.3
 
 ;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
 
@@ -162,6 +162,7 @@ This is the main interface to `dwarf-mode'."
 	 (buffer (generate-new-buffer (concat "*DWARF for " base-name "*"))))
     (pop-to-buffer buffer)
     (dwarf-mode)
+    (setq default-directory (file-name-directory file))
     (set (make-local-variable 'dwarf-file) file)
     (dwarf-do-refresh)))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]