aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2015-04-13 10:39:25 -0400
committerStefan Monnier2015-04-13 10:39:25 -0400
commit2a72ae286db1a4cfc4a915c15c82c613012e7434 (patch)
treea0bfc7fb68b12bab0eeb2476efe1bd64c3a4384b
parentf6bdbdf1f58d8fda61bc901b852d25fdf1a1f9da (diff)
downloademacs-2a72ae286db1a4cfc4a915c15c82c613012e7434.tar.gz
emacs-2a72ae286db1a4cfc4a915c15c82c613012e7434.zip
* cedet/semantic/fw.el: Use declare.
* cedet/semantic/fw.el (semantic-exit-on-input) (semanticdb-without-unloaded-file-searches): Use declare. (semantic-fw-add-edebug-spec): Remove.
-rw-r--r--lisp/cedet/semantic/complete.el1
-rw-r--r--lisp/cedet/semantic/db.el1
-rw-r--r--lisp/cedet/semantic/fw.el16
-rw-r--r--lisp/cedet/semantic/idle.el1
4 files changed, 8 insertions, 11 deletions
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index 267e292647a..1e121906a04 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -2217,6 +2217,7 @@ use `semantic-complete-analyze-inline' to complete."
2217 ;; input. 2217 ;; input.
2218 (when (save-window-excursion 2218 (when (save-window-excursion
2219 (save-excursion 2219 (save-excursion
2220 ;; FIXME: Use `while-no-input'?
2220 (and (not (semantic-exit-on-input 'csi 2221 (and (not (semantic-exit-on-input 'csi
2221 (semantic-fetch-tags) 2222 (semantic-fetch-tags)
2222 (semantic-throw-on-input 'csi) 2223 (semantic-throw-on-input 'csi)
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index 1dba9b15701..7380bddd2bb 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -723,6 +723,7 @@ form."
723 "Save all semantic tag databases from idle time. 723 "Save all semantic tag databases from idle time.
724Exit the save between databases if there is user input." 724Exit the save between databases if there is user input."
725 (semantic-safe "Auto-DB Save: %S" 725 (semantic-safe "Auto-DB Save: %S"
726 ;; FIXME: Use `while-no-input'?
726 (semantic-exit-on-input 'semanticdb-idle-save 727 (semantic-exit-on-input 'semanticdb-idle-save
727 (mapc (lambda (db) 728 (mapc (lambda (db)
728 (semantic-throw-on-input 'semanticdb-idle-save) 729 (semantic-throw-on-input 'semanticdb-idle-save)
diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el
index e36f3598c0f..0e81b2c0ba5 100644
--- a/lisp/cedet/semantic/fw.el
+++ b/lisp/cedet/semantic/fw.el
@@ -374,7 +374,7 @@ If FORMS includes a call to `semantic-throw-on-input', then
374if a user presses any key during execution, this form macro 374if a user presses any key during execution, this form macro
375will exit with the value passed to `semantic-throw-on-input'. 375will exit with the value passed to `semantic-throw-on-input'.
376If FORMS completes, then the return value is the same as `progn'." 376If FORMS completes, then the return value is the same as `progn'."
377 (declare (indent 1)) 377 (declare (indent 1) (debug def-body))
378 `(let ((semantic-current-input-throw-symbol ,symbol) 378 `(let ((semantic-current-input-throw-symbol ,symbol)
379 (semantic--on-input-start-marker (point-marker))) 379 (semantic--on-input-start-marker (point-marker)))
380 (catch ,symbol 380 (catch ,symbol
@@ -388,10 +388,10 @@ calling this one."
388 `(when (and semantic-current-input-throw-symbol 388 `(when (and semantic-current-input-throw-symbol
389 (or (input-pending-p) 389 (or (input-pending-p)
390 (with-current-buffer 390 (with-current-buffer
391 ;; Timers might run during accept-process-output.
392 ;; If they redisplay, point must be where the user
393 ;; expects. (Bug#15045)
394 (marker-buffer semantic--on-input-start-marker) 391 (marker-buffer semantic--on-input-start-marker)
392 ;; Timers might run during accept-process-output.
393 ;; If they redisplay, point must be where the user
394 ;; expects. (Bug#15045)
395 (save-excursion 395 (save-excursion
396 (goto-char semantic--on-input-start-marker) 396 (goto-char semantic--on-input-start-marker)
397 (accept-process-output))))) 397 (accept-process-output)))))
@@ -448,12 +448,12 @@ into `mode-local-init-hook'." file filename)
448;; 448;;
449(defmacro semanticdb-without-unloaded-file-searches (forms) 449(defmacro semanticdb-without-unloaded-file-searches (forms)
450 "Execute FORMS with `unloaded' removed from the current throttle." 450 "Execute FORMS with `unloaded' removed from the current throttle."
451 (declare (indent 1))
451 `(let ((semanticdb-find-default-throttle 452 `(let ((semanticdb-find-default-throttle
452 (if (featurep 'semantic/db-find) 453 (if (featurep 'semantic/db-find)
453 (remq 'unloaded semanticdb-find-default-throttle) 454 (remq 'unloaded semanticdb-find-default-throttle)
454 nil))) 455 nil)))
455 ,forms)) 456 ,forms))
456(put 'semanticdb-without-unloaded-file-searches 'lisp-indent-function 1)
457 457
458 458
459;; ;;; Editor goodies ;-) 459;; ;;; Editor goodies ;-)
@@ -520,12 +520,6 @@ into `mode-local-init-hook'." file filename)
520;; (font-lock-add-keywords 'emacs-lisp-mode 520;; (font-lock-add-keywords 'emacs-lisp-mode
521;; semantic-fw-font-lock-keywords)) 521;; semantic-fw-font-lock-keywords))
522 522
523;;; Interfacing with edebug
524;;
525(defun semantic-fw-add-edebug-spec ()
526 (def-edebug-spec semantic-exit-on-input 'def-body))
527
528(add-hook 'edebug-setup-hook 'semantic-fw-add-edebug-spec)
529 523
530(provide 'semantic/fw) 524(provide 'semantic/fw)
531 525
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index 790315381c1..225caa599fb 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -216,6 +216,7 @@ current buffer.")
216And also manages services that depend on tag values." 216And also manages services that depend on tag values."
217 (when semantic-idle-scheduler-verbose-flag 217 (when semantic-idle-scheduler-verbose-flag
218 (message "IDLE: Core handler...")) 218 (message "IDLE: Core handler..."))
219 ;; FIXME: Use `while-no-input'?
219 (semantic-exit-on-input 'idle-timer 220 (semantic-exit-on-input 'idle-timer
220 (let* ((inhibit-quit nil) 221 (let* ((inhibit-quit nil)
221 (buffers (delq (current-buffer) 222 (buffers (delq (current-buffer)