all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* wdired patch
@ 2006-07-28 11:50 Bill Atkins
  2006-07-28 20:59 ` Thien-Thi Nguyen
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Atkins @ 2006-07-28 11:50 UTC (permalink / raw)


Index: lisp/wdired.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/wdired.el,v
retrieving revision 1.19
diff -u -r1.19 wdired.el
--- lisp/wdired.el      4 Mar 2006 21:40:17 -0000       1.19
+++ lisp/wdired.el      28 Jul 2006 11:49:56 -0000
@@ -238,6 +238,8 @@

 See `wdired-mode'."
   (interactive)
+  (or (eq major-mode 'dired-mode)
+      (error "Not a Dired buffer"))
   (set (make-local-variable 'wdired-old-content)
        (buffer-substring (point-min) (point-max)))
   (set (make-local-variable 'wdired-old-point) (point))
@@ -328,6 +330,8 @@

 (defun wdired-change-to-dired-mode ()
   "Change the mode back to dired."
+  (or (eq major-mode 'wdired-mode)
+      (error "Not a Wdired buffer"))
   (let ((inhibit-read-only t))
     (remove-text-properties (point-min) (point-max)
                            '(read-only nil local-map nil)))

-- 
Bill Atkins

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: wdired patch
  2006-07-28 11:50 wdired patch Bill Atkins
@ 2006-07-28 20:59 ` Thien-Thi Nguyen
  0 siblings, 0 replies; 2+ messages in thread
From: Thien-Thi Nguyen @ 2006-07-28 20:59 UTC (permalink / raw)
  Cc: emacs-devel

"Bill Atkins" <atkinw@rpi.edu> writes:

> +  (or (eq major-mode 'dired-mode)
> +      (error "Not a Dired buffer"))
> +  (or (eq major-mode 'wdired-mode)
> +      (error "Not a Wdired buffer"))

thanks, installed.

thi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-28 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-28 11:50 wdired patch Bill Atkins
2006-07-28 20:59 ` Thien-Thi Nguyen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.