X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/40f7e0e853bf21003fdffeac35e47616f393055d..c430f7e23fc2c22f251ace4254e37dea1452dfc3:/lisp/dframe.el diff --git a/lisp/dframe.el b/lisp/dframe.el index 66967075e3..b6605d1065 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -1,6 +1,6 @@ ;;; dframe --- dedicate frame support modes -*- lexical-binding:t -*- -;; Copyright (C) 1996-2013 Free Software Foundation, Inc. +;; Copyright (C) 1996-2016 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam ;; Keywords: file, tags, tools @@ -243,6 +243,9 @@ Local to those buffers, as a function called that created it.") "Return non-nil if FRAME is currently available." (and frame (frame-live-p frame) (frame-visible-p frame))) +(defvar x-sensitive-text-pointer-shape) +(defvar x-pointer-shape) + (defun dframe-frame-mode (arg frame-var cache-var buffer-var frame-name local-mode-fn &optional @@ -417,7 +420,7 @@ CREATE-HOOK is a hook to run after creating a frame." (defun dframe-reposition-frame (new-frame parent-frame location) "Move NEW-FRAME to be relative to PARENT-FRAME. -LOCATION can be one of 'random, 'left, 'right, 'left-right, or 'top-bottom." +LOCATION can be one of `random', `left', `right', `left-right', or `top-bottom'." (if (featurep 'xemacs) (dframe-reposition-frame-xemacs new-frame parent-frame location) (dframe-reposition-frame-emacs new-frame parent-frame location))) @@ -428,7 +431,7 @@ LOCATION can be one of 'random, 'left, 'right, 'left-right, or 'top-bottom." (defun dframe-reposition-frame-emacs (new-frame parent-frame location) "Move NEW-FRAME to be relative to PARENT-FRAME. -LOCATION can be one of 'random, 'left-right, 'top-bottom, or +LOCATION can be one of `random', `left-right', `top-bottom', or a cons cell indicating a position of the form (LEFT . TOP)." ;; Position dframe. ;; Do no positioning if not on a windowing system, @@ -511,7 +514,7 @@ a cons cell indicating a position of the form (LEFT . TOP)." (defun dframe-reposition-frame-xemacs (_new-frame _parent-frame _location) "Move NEW-FRAME to be relative to PARENT-FRAME. -LOCATION can be one of 'random, 'left-right, or 'top-bottom." +LOCATION can be one of `random', `left-right', or `top-bottom'." ;; Not yet implemented ) @@ -527,7 +530,7 @@ LOCATION can be one of 'random, 'left-right, or 'top-bottom." (defun dframe-detach (frame-var cache-var buffer-var) "Detach the frame in symbol FRAME-VAR. -CACHE-VAR and BUFFER-VAR are symbols as in `dframe-frame-mode'" +CACHE-VAR and BUFFER-VAR are symbols as in `dframe-frame-mode'." (with-current-buffer (symbol-value buffer-var) (rename-buffer (buffer-name) t) (let ((oldframe (symbol-value frame-var))) @@ -603,13 +606,12 @@ Argument E is the event deleting the frame." ;;; Utilities ;; -(defun dframe-get-focus (frame-var activator &optional hook) +(defun dframe-get-focus (frame-var activator) "Change frame focus to or from a dedicated frame. If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR frame is selected. If the FRAME-VAR is active, then select the attached frame. If FRAME-VAR is nil, ACTIVATOR is called to -created it. HOOK is an optional hook to run when -selecting FRAME-VAR." +created it." (interactive) (if (eq (selected-frame) (symbol-value frame-var)) (if (frame-live-p dframe-attached-frame) @@ -620,9 +622,7 @@ selecting FRAME-VAR." ;; go there (select-frame (symbol-value frame-var)) ) - (other-frame 0) - ;; If updates are off, then refresh the frame (they want it now...) - (run-hooks hook)) + (other-frame 0)) (defun dframe-close-frame () @@ -688,11 +688,11 @@ Optionally select that frame if necessary." Argument FMT is the format string, and ARGS are the arguments for message." (save-selected-window (if dframe-suppress-message-flag - (apply 'format fmt args) + (apply #'format-message fmt args) (if dframe-attached-frame ;; KB: Here we do not need calling `dframe-select-attached-frame' (select-frame dframe-attached-frame)) - (apply 'message fmt args)))) + (apply #'message fmt args)))) (defun dframe-y-or-n-p (prompt) "Like `y-or-n-p', but for use in a dedicated frame. @@ -758,9 +758,8 @@ who requested the timer. NULL-ON-ERROR is ignored." Evaluates all cached timer functions in sequence." (let ((l dframe-client-functions)) (while (and l (sit-for 0)) - (condition-case er - (funcall (car l)) - (error (message "DFRAME TIMER ERROR: %S" er))) + (with-demoted-errors "DFRAME TIMER ERROR: %S" + (funcall (car l))) (setq l (cdr l))))) ;;; Menu hacking for mouse-3