emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: recentf: "Select coding system" on quit]


From: Kenichi Handa
Subject: Re: address@hidden: recentf: "Select coding system" on quit]
Date: Fri, 22 Apr 2005 22:07:35 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, David Kastrup <address@hidden> writes:
>>  Ok, I've just installed the last version sent from David
>>  <address@hidden>.

> Please, it has been pointed out already that this is not the proper
> way to fix it.  It makes the source very unreadable.

> Instead, you should just place a formfeed character (^L) after the
> last function in the file.  Local variable sections are not detected
> before such a character, and it is precisely for this purpose.

As David <address@hidden> wrote, that's what I
installed.  See the attached change.

---
Ken'ichi HANDA
address@hidden

Index: recentf.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/recentf.el,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -c -r1.35 -r1.36
cvs diff: conflicting specifications of output style
*** recentf.el  23 Mar 2005 07:20:48 -0000      1.35
--- recentf.el  22 Apr 2005 05:38:29 -0000      1.36
***************
*** 1137,1142 ****
--- 1137,1148 ----
    ";;; Automatically generated by `recentf' on %s.\n"
    "Header to be written into the `recentf-save-file'.")
  
+ (defconst recentf-save-file-coding-system
+   (if (coding-system-p 'utf-8-emacs)
+       'utf-8-emacs
+     'emacs-mule)
+   "Coding system of the file `recentf-save-file'.")
+ 
  (defun recentf-save-list ()
    "Save the recent list.
  Write data into the file specified by `recentf-save-file'."
***************
*** 1144,1152 ****
--- 1150,1162 ----
    (condition-case error
        (with-temp-buffer
        (erase-buffer)
+       (set-buffer-file-coding-system recentf-save-file-coding-system)
        (insert (format recentf-save-file-header (current-time-string)))
        (recentf-dump-variable 'recentf-list recentf-max-saved-items)
        (recentf-dump-variable 'recentf-filter-changer-state)
+       (insert "\n\n;;; Local Variables:\n"
+               (format ";;; coding: %s\n" recentf-save-file-coding-system)
+               ";;; End:\n")
        (write-file (expand-file-name recentf-save-file))
        nil)
      (error
***************
*** 1207,1212 ****
  (provide 'recentf)
  
  (run-hooks 'recentf-load-hook)
! 
  ;;; arch-tag: 78f1eec9-0d16-4d19-a4eb-2e4529edb62a
  ;;; recentf.el ends here
--- 1217,1222 ----
  (provide 'recentf)
  
  (run-hooks 'recentf-load-hook)
! 
  ;;; arch-tag: 78f1eec9-0d16-4d19-a4eb-2e4529edb62a
  ;;; recentf.el ends here




reply via email to

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