emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#16635: closed ([PATCH] help-fns.el fix describe-va


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#16635: closed ([PATCH] help-fns.el fix describe-variable of dir-local var set in elisp)
Date: Sat, 08 Feb 2014 02:19:02 +0000

Your message dated Fri, 07 Feb 2014 21:18:47 -0500
with message-id <address@hidden>
and subject line Re: bug#16635: [PATCH] help-fns.el fix describe-variable of 
dir-local var set in elisp
has caused the debbugs.gnu.org bug report #16635,
regarding [PATCH] help-fns.el fix describe-variable of dir-local var set in 
elisp
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
16635: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16635
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] help-fns.el fix describe-variable of dir-local var set in elisp Date: Mon, 03 Feb 2014 22:23:12 +0100 User-agent: Notmuch/0.14+777~g437f130 (http://notmuchmail.org) Emacs/24.3.50.1 (x86_64-pc-linux-gnu)
Hi all,

describe-variable breaks for a dir-local variable that has been set
directly, ie, not from a file.  Minimal example in emacs -Q:


(dir-locals-set-class-variables
  'test '((nil . ((tab-width . 7))))) 
(dir-locals-set-directory-class default-directory 'test)            

;; now open an existing file in the default dir and from its buffer,
;; M-x describe-variable tab-width

;; breaks since on l 940 of help-fns.el, `file' is supposed to be a
;; string, not a cons


The following patch rectifies this by setting `file' to its own car even
if the variable is *not* set from a file.  `file' is no longer used
after the sexp that breaks.



* help-fns.el: Fix describe-variable for dir-local var set in elisp



diff --git c/lisp/help-fns.el w/lisp/help-fns.el
index 5e38de8..028f6ac 100644
--- c/lisp/help-fns.el
+++ w/lisp/help-fns.el
@@ -930,7 +930,8 @@ if it is given a local binding.\n")))
                                 (setq file (expand-file-name
                                             dir-locals-file (car file)))
                               ;; Otherwise, assume it was set directly.
-                              (setq dir-file nil)))
+                              (setq file (car file)
+                                    dir-file nil)))
                        (princ (if dir-file
                                   "by the file\n  `"
                                 "for the directory\n  `"))




--- End Message ---
--- Begin Message --- Subject: Re: bug#16635: [PATCH] help-fns.el fix describe-variable of dir-local var set in elisp Date: Fri, 07 Feb 2014 21:18:47 -0500 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Version: 24.4

Thanks; applied.


--- End Message ---

reply via email to

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