help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Set major mode for all visited files by extension


From: Tim Johnson
Subject: Re: Set major mode for all visited files by extension
Date: Tue, 5 May 2020 09:53:22 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0



On 5/4/20 11:42 PM, Yuri Khan wrote:
On Tue, 5 May 2020 at 04:33, Tim Johnson <tim@akwebsoft.com> wrote:

(defun reload-buffer ()
    "Reload the current buffer"
    (interactive)
    (let ((curfile (buffer-file-name)))
      (kill-this-buffer)
(find-file curfile)))
The built-in (revert-buffer), which I have bound to C-<f5>, works for
me in similar cases (but I don’t use session.el, just desktop.el).

I think they are the same, for sure. I've used emacs for 20 years, and I don't even remember why I wrote that. :)

--
Tim
tj49.com




reply via email to

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