aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/ses.el
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2007-11-09 09:45:30 +0000
committerMiles Bader <[email protected]>2007-11-09 09:45:30 +0000
commitc12ecb0af9679cc0e2fa0409931c34c035763469 (patch)
treebd118c7ebc571de0dab542f48ad0c1648c6ccf72 /lisp/ses.el
parente83d1fe87564d06d2fcbb4006dfd9133bc340aa8 (diff)
parent9d2185d10e3da9062672d96d3b59fcea31ff17ed (diff)
Merge from emacs--rel--22
Revision: [email protected]/emacs--devo--0--patch-923
Diffstat (limited to 'lisp/ses.el')
-rw-r--r--lisp/ses.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/ses.el b/lisp/ses.el
index 62067471b6..f76befa874 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -2921,7 +2921,7 @@ TEST is evaluated."
;;----------------------------------------------------------------------------
;;These functions use the variables 'row' and 'col' that are
-;;dynamically bound by ses-print-cell. We define these varables at
+;;dynamically bound by ses-print-cell. We define these variables at
;;compile-time to make the compiler happy.
(eval-when-compile
(dolist (x '(row col))
@@ -2980,6 +2980,19 @@ current column and continues until the next nonblank column."
(dolist (x (cons 'ses-unsafe ses-standard-printer-functions))
(put x 'side-effect-free t))
+(defun ses-unload-function ()
+ "Unload the Simple Emacs Spreadsheet."
+ (dolist (fun '(copy-region-as-kill yank))
+ (ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun))))
+ (ad-update fun))
+ (save-current-buffer
+ (dolist (buf (buffer-list))
+ (set-buffer buf)
+ (when (eq major-mode 'ses-mode)
+ (funcall (or default-major-mode 'fundamental-mode)))))
+ ;; continue standard unloading
+ nil)
+
(provide 'ses)
;; arch-tag: 88c1ccf0-4293-4824-8c5d-0757b52217f3