diff options
| author | Juanma Barranquero | 2007-10-30 00:21:42 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2007-10-30 00:21:42 +0000 |
| commit | 7981ad6baaa4653414ad2ef41e35ded2dadfaed8 (patch) | |
| tree | 31605b962388c329714bb51d870618a807027c81 | |
| parent | 352ddc78d31acd77c962d3776889c73981b01dcf (diff) | |
| download | emacs-7981ad6baaa4653414ad2ef41e35ded2dadfaed8.tar.gz emacs-7981ad6baaa4653414ad2ef41e35ded2dadfaed8.zip | |
(ses-unload-function): New function.
| -rw-r--r-- | lisp/ses.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/ses.el b/lisp/ses.el index 3f904fde0d2..2b6b452500e 100644 --- a/lisp/ses.el +++ b/lisp/ses.el | |||
| @@ -2908,7 +2908,7 @@ TEST is evaluated." | |||
| 2908 | ;;---------------------------------------------------------------------------- | 2908 | ;;---------------------------------------------------------------------------- |
| 2909 | 2909 | ||
| 2910 | ;;These functions use the variables 'row' and 'col' that are | 2910 | ;;These functions use the variables 'row' and 'col' that are |
| 2911 | ;;dynamically bound by ses-print-cell. We define these varables at | 2911 | ;;dynamically bound by ses-print-cell. We define these variables at |
| 2912 | ;;compile-time to make the compiler happy. | 2912 | ;;compile-time to make the compiler happy. |
| 2913 | (eval-when-compile | 2913 | (eval-when-compile |
| 2914 | (dolist (x '(row col)) | 2914 | (dolist (x '(row col)) |
| @@ -2967,6 +2967,19 @@ current column and continues until the next nonblank column." | |||
| 2967 | (dolist (x (cons 'ses-unsafe ses-standard-printer-functions)) | 2967 | (dolist (x (cons 'ses-unsafe ses-standard-printer-functions)) |
| 2968 | (put x 'side-effect-free t)) | 2968 | (put x 'side-effect-free t)) |
| 2969 | 2969 | ||
| 2970 | (defun ses-unload-function () | ||
| 2971 | "Unload the Simple Emacs Spreadsheet." | ||
| 2972 | (dolist (fun '(copy-region-as-kill yank)) | ||
| 2973 | (ad-remove-advice fun 'around (intern (concat "ses-" (symbol-name fun)))) | ||
| 2974 | (ad-update fun)) | ||
| 2975 | (save-current-buffer | ||
| 2976 | (dolist (buf (buffer-list)) | ||
| 2977 | (set-buffer buf) | ||
| 2978 | (when (eq major-mode 'ses-mode) | ||
| 2979 | (funcall (or default-major-mode 'fundamental-mode))))) | ||
| 2980 | ;; continue standard unloading | ||
| 2981 | nil) | ||
| 2982 | |||
| 2970 | (provide 'ses) | 2983 | (provide 'ses) |
| 2971 | 2984 | ||
| 2972 | ;; arch-tag: 88c1ccf0-4293-4824-8c5d-0757b52217f3 | 2985 | ;; arch-tag: 88c1ccf0-4293-4824-8c5d-0757b52217f3 |