[Top][All Lists]

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

Re: .info files

From: Alfred M. Szmidt
Subject: Re: .info files
Date: Thu, 12 Apr 2012 12:49:19 -0400

   > It would be nice if .info files opened up in Info-mode automatically.
   > E.g. something like,

   > (add-to-list 'auto-mode-alist
   >         '("\\.info\\'" . (lambda () (interactive)
   >                            (let ((file-name (buffer-file-name)))
   >                              (kill-buffer (current-buffer))
   >                              (info file-name)))))

   Agreed.  I wrote Info-on-current-buffer a long time ago to try and
   address this need, but it's clearly not good enough.
   Your code above is (sadly) not quite good enough either since its use of
   kill-buffer+info will likely introduce misbehaviors in various cases.

True that, what about the following:

(add-to-list 'auto-mode-alist
             '("\\.info\\'" . (lambda () (interactive)
                                (require 'info)
                                (info-setup (buffer-file-name) 

reply via email to

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