[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108430: ispell.el: Define `ispell
From: |
Agustin Martin |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108430: ispell.el: Define `ispell-with-no-warnings' as a macro. Deal with obsolete `interactive-p' |
Date: |
Fri, 02 Nov 2012 02:33:26 -0000 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108430
committer: Agustin Martin <address@hidden>
branch nick: trunk
timestamp: Wed 2012-05-30 18:14:37 +0200
message:
ispell.el: Define `ispell-with-no-warnings' as a macro. Deal with obsolete
`interactive-p'
* Current `ispell-with-no-warnings' definition does not avoid warnings.
Use a macro definition taken from orgmode.
* Deal with a couple of occurrences of obsolete `interactive-p'.
modified:
lisp/ChangeLog
lisp/textmodes/ispell.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-05-30 03:59:42 +0000
+++ b/lisp/ChangeLog 2012-05-30 16:14:37 +0000
@@ -1,3 +1,11 @@
+2012-05-30 Agustín Martín Domingo <address@hidden>
+
+ * textmodes/ispell.el (ispell-with-no-warnings):
+ Define as a macro.
+ (ispell-kill-ispell, ispell-change-dictionary): Use
+ `called-interactively-p' for Emacs instead of obsolete
+ `interactive-p'.
+
2012-05-30 Stefan Monnier <address@hidden>
* emacs-lisp/byte-run.el (defmacro, defun): Move from C.
=== modified file 'lisp/textmodes/ispell.el'
--- a/lisp/textmodes/ispell.el 2012-05-28 16:11:15 +0000
+++ b/lisp/textmodes/ispell.el 2012-05-30 16:14:37 +0000
@@ -203,7 +203,6 @@
(declare-function ispell-check-minver "ispell" (v1 v2))
(declare-function ispell-looking-back "ispell"
(regexp &optional limit &rest ignored))
-(declare-function ispell-with-no-warnings (&rest body))
(if (fboundp 'version<=)
(defalias 'ispell-check-minver 'version<=)
@@ -255,15 +254,9 @@
(save-excursion
(re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t))))
-;;; XEmacs21 does not have `with-no-warnings'
-
-(if (fboundp 'with-no-warnings)
- (defalias 'ispell-with-no-warnings 'with-no-warnings)
- (defun ispell-with-no-warnings (&rest body)
- "Like `progn', but prevents compiler warnings in the body."
- ;; Taken from Emacs' byte-run.el
- ;; The implementation for the interpreter is basically trivial.
- (car (last body))))
+;;; XEmacs21 does not have `with-no-warnings'. Taken from org mode.
+(defmacro ispell-with-no-warnings (&rest body)
+ (cons (if (fboundp 'with-no-warnings) 'with-no-warnings 'progn) body))
;;; Code:
@@ -2804,7 +2797,10 @@
;; This hook is typically used by flyspell to flush some variables used
;; to optimize the common cases.
(run-hooks 'ispell-kill-ispell-hook)
- (if (or clear (interactive-p))
+ (if (or clear
+ (if (featurep 'xemacs)
+ (interactive-p)
+ (called-interactively-p 'interactive)))
(setq ispell-buffer-session-localwords nil))
(if (not (and ispell-process
(eq (ispell-process-status) 'run)))
@@ -2853,7 +2849,9 @@
;; Specified dictionary is the default already. Could reload
;; the dictionaries if needed.
(ispell-internal-change-dictionary)
- (and (interactive-p)
+ (and (if (featurep 'xemacs)
+ (interactive-p)
+ (called-interactively-p 'interactive))
(message "No change, using %s dictionary" dict)))
(t ; reset dictionary!
(if (or (assoc dict ispell-local-dictionary-alist)
@@ -3725,8 +3723,8 @@
(cond
((functionp 'sc-cite-regexp) ; sc 3.0
(ispell-with-no-warnings
- (concat "\\(" (sc-cite-regexp) "\\)" "\\|"
- (ispell-non-empty-string sc-reference-tag-string))))
+ (concat "\\(" (sc-cite-regexp) "\\)" "\\|"
+ (ispell-non-empty-string sc-reference-tag-string))))
((boundp 'sc-cite-regexp) ; sc 2.3
(concat "\\(" sc-cite-regexp "\\)" "\\|"
(ispell-with-no-warnings
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108430: ispell.el: Define `ispell-with-no-warnings' as a macro. Deal with obsolete `interactive-p',
Agustin Martin <=