Commit e5aca010 authored by Glenn Morris's avatar Glenn Morris
Browse files

(top-level): Move (provide 'cua-base) to end.

No longer provide 'cua.  Don't require cua-rect, cua-gmrk when compiling.
(cua-set-rectangle-mark): Add doc string to autoload.
(cua--rectangle, cua--last-killed-rectangle)
(cua--global-mark-active): Always define for compiler.
(cua-copy-rectangle, cua-cut-rectangle, cua--rectangle-left)
(cua--delete-rectangle, cua--insert-rectangle)
(cua--rectangle-corner, cua--rectangle-assert)
(cua--insert-at-global-mark, cua--global-mark-post-command):
Declare as functions.
parent 2c0f8564
...@@ -583,35 +583,37 @@ a cons (TYPE . COLOR), then both properties are affected." ...@@ -583,35 +583,37 @@ a cons (TYPE . COLOR), then both properties are affected."
;;; Rectangle support is in cua-rect.el ;;; Rectangle support is in cua-rect.el
(autoload 'cua-set-rectangle-mark "cua-rect" nil t nil) (autoload 'cua-set-rectangle-mark "cua-rect"
"Start rectangle at mouse click position." t nil)
;; Stub definitions until it is loaded ;; Stub definitions until it is loaded
(defvar cua--rectangle)
(when (not (featurep 'cua-rect)) (defvar cua--last-killed-rectangle)
(defvar cua--rectangle) (unless (featurep 'cua-rect)
(setq cua--rectangle nil) (setq cua--rectangle nil
(defvar cua--last-killed-rectangle) cua--last-killed-rectangle nil))
(setq cua--last-killed-rectangle nil))
;; All behind cua--rectangle tests.
(declare-function cua-copy-rectangle "cua-rect" (arg))
(declare-function cua-cut-rectangle "cua-rect" (arg))
(declare-function cua--rectangle-left "cua-rect" (&optional val))
(declare-function cua--delete-rectangle "cua-rect" ())
(declare-function cua--insert-rectangle "cua-rect"
(rect &optional below paste-column line-count))
(declare-function cua--rectangle-corner "cua-rect" (&optional advance))
(declare-function cua--rectangle-assert "cua-rect" ())
;;; Global Mark support is in cua-gmrk.el ;;; Global Mark support is in cua-gmrk.el
(autoload 'cua-toggle-global-mark "cua-gmrk" nil t nil) (autoload 'cua-toggle-global-mark "cua-gmrk" nil t nil)
;; Stub definitions until cua-gmrk.el is loaded ;; Stub definitions until cua-gmrk.el is loaded
(defvar cua--global-mark-active)
(when (not (featurep 'cua-gmrk)) (unless (featurep 'cua-gmrk)
(defvar cua--global-mark-active)
(setq cua--global-mark-active nil)) (setq cua--global-mark-active nil))
(declare-function cua--insert-at-global-mark "cua-gmrk" (str &optional msg))
(provide 'cua-base) (declare-function cua--global-mark-post-command "cua-gmrk" ())
(eval-when-compile
(require 'cua-rect)
(require 'cua-gmrk)
)
;;; Low-level Interface ;;; Low-level Interface
...@@ -920,6 +922,7 @@ If global mark is active, copy from register or one character." ...@@ -920,6 +922,7 @@ If global mark is active, copy from register or one character."
(cond (cond
(regtxt (regtxt
(cond (cond
;; This being a cons implies cua-rect is loaded?
((consp regtxt) (cua--insert-rectangle regtxt)) ((consp regtxt) (cua--insert-rectangle regtxt))
((stringp regtxt) (insert-for-yank regtxt)) ((stringp regtxt) (insert-for-yank regtxt))
(t (message "Unknown data in register %c" cua--register)))) (t (message "Unknown data in register %c" cua--register))))
...@@ -1606,7 +1609,7 @@ shifted movement key, set `cua-highlight-region-shift-only'." ...@@ -1606,7 +1609,7 @@ shifted movement key, set `cua-highlight-region-shift-only'."
(setq cua--debug (not cua--debug))) (setq cua--debug (not cua--debug)))
(provide 'cua) (provide 'cua-base)
;;; arch-tag: 21fb6289-ba25-4fee-bfdc-f9fb351acf05 ;;; arch-tag: 21fb6289-ba25-4fee-bfdc-f9fb351acf05
;;; cua-base.el ends here ;;; cua-base.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment