[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112766: * idlwave.el (idlwave-scan-u
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112766: * idlwave.el (idlwave-scan-user-lib-files, idlwave-write-paths): Simplify |
Date: |
Tue, 28 May 2013 23:44:19 -0700 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112766
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2013-05-28 23:44:19 -0700
message:
* idlwave.el (idlwave-scan-user-lib-files, idlwave-write-paths): Simplify
via with-temp-buffer.
modified:
lisp/ChangeLog
lisp/progmodes/idlwave.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-05-29 02:48:16 +0000
+++ b/lisp/ChangeLog 2013-05-29 06:44:19 +0000
@@ -1,5 +1,8 @@
2013-05-29 Glenn Morris <address@hidden>
+ * progmodes/idlwave.el (idlwave-scan-user-lib-files)
+ (idlwave-write-paths): Simplify via with-temp-buffer.
+
* emulation/cua-gmrk.el: Also load cua-base, cua-rect at run time.
* emulation/cua-rect.el: Also load cua-base at run time.
=== modified file 'lisp/progmodes/idlwave.el'
--- a/lisp/progmodes/idlwave.el 2013-03-12 02:08:21 +0000
+++ b/lisp/progmodes/idlwave.el 2013-05-29 06:44:19 +0000
@@ -5481,30 +5481,21 @@
(message "Creating user catalog file...")
(kill-buffer "*idlwave-scan.pro*")
(kill-buffer (get-buffer-create "*IDLWAVE Widget*"))
- (let ((font-lock-maximum-size 0)
- (auto-mode-alist nil))
- (find-file idlwave-user-catalog-file))
- (if (and (boundp 'font-lock-mode)
- font-lock-mode)
- (font-lock-mode 0))
- (erase-buffer)
- (insert ";; IDLWAVE user catalog file\n")
- (insert (format ";; Created %s\n\n" (current-time-string)))
+ (with-temp-buffer
+ (insert ";; IDLWAVE user catalog file\n")
+ (insert (format ";; Created %s\n\n" (current-time-string)))
- ;; Define the routine info list
- (insert "\n(setq idlwave-user-catalog-routines\n '(")
- (let ((standard-output (current-buffer)))
- (mapc (lambda (x)
- (insert "\n ")
- (prin1 x)
- (goto-char (point-max)))
- idlwave-user-catalog-routines))
- (insert (format "))\n\n;;; %s ends here\n"
- (file-name-nondirectory idlwave-user-catalog-file)))
- (goto-char (point-min))
- ;; Save the buffer
- (save-buffer 0)
- (kill-buffer (current-buffer)))
+ ;; Define the routine info list
+ (insert "\n(setq idlwave-user-catalog-routines\n '(")
+ (let ((standard-output (current-buffer)))
+ (mapc (lambda (x)
+ (insert "\n ")
+ (prin1 x)
+ (goto-char (point-max)))
+ idlwave-user-catalog-routines))
+ (insert (format "))\n\n;;; %s ends here\n"
+ (file-name-nondirectory idlwave-user-catalog-file)))
+ (write-region nil nil idlwave-user-catalog-file)))
(message "Creating user catalog file...done")
(message "Info for %d routines saved in %s"
(length idlwave-user-catalog-routines)
@@ -5522,31 +5513,23 @@
(defun idlwave-write-paths ()
(interactive)
(when (and idlwave-path-alist idlwave-system-directory)
- (let ((font-lock-maximum-size 0)
- (auto-mode-alist nil))
- (find-file idlwave-path-file))
- (if (and (boundp 'font-lock-mode)
- font-lock-mode)
- (font-lock-mode 0))
- (erase-buffer)
- (insert ";; IDLWAVE paths\n")
- (insert (format ";; Created %s\n\n" (current-time-string)))
+ (with-temp-buffer
+ (insert ";; IDLWAVE paths\n")
+ (insert (format ";; Created %s\n\n" (current-time-string)))
;; Define the variable which knows the value of "!DIR"
- (insert (format "\n(setq idlwave-system-directory \"%s\")\n"
- idlwave-system-directory))
-
- ;; Define the variable which contains a list of all scanned directories
- (insert "\n(setq idlwave-path-alist\n '(")
- (let ((standard-output (current-buffer)))
- (mapc (lambda (x)
- (insert "\n ")
- (prin1 x)
- (goto-char (point-max)))
- idlwave-path-alist))
- (insert "))\n")
- (save-buffer 0)
- (kill-buffer (current-buffer))))
-
+ (insert (format "\n(setq idlwave-system-directory \"%s\")\n"
+ idlwave-system-directory))
+
+ ;; Define the variable which contains a list of all scanned directories
+ (insert "\n(setq idlwave-path-alist\n '(")
+ (let ((standard-output (current-buffer)))
+ (mapc (lambda (x)
+ (insert "\n ")
+ (prin1 x)
+ (goto-char (point-max)))
+ idlwave-path-alist))
+ (insert "))\n")
+ (write-region nil nil idlwave-path-file))))
(defun idlwave-expand-path (path &optional default-dir)
;; Expand parts of path starting with '+' recursively into directory list.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112766: * idlwave.el (idlwave-scan-user-lib-files, idlwave-write-paths): Simplify,
Glenn Morris <=