Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 399-413) - Update from CVS - Rcirc update from Ryan Yeske - Merge from gnus--rel--5.10 - Miscellaneous tq-related fixes. * gnus--rel--5.10 (patch 126-127) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-105
This commit is contained in:
commit
d65dc2c390
84 changed files with 2933 additions and 8240 deletions
|
@ -193,8 +193,14 @@
|
|||
(defvar compilation-error-regexp-alist)
|
||||
(defvar compilation-mode-font-lock-keywords)
|
||||
|
||||
(defgroup checkdoc nil
|
||||
"Support for doc string checking in Emacs Lisp."
|
||||
:prefix "checkdoc"
|
||||
:group 'lisp
|
||||
:version "20.3")
|
||||
|
||||
(defcustom checkdoc-autofix-flag 'semiautomatic
|
||||
"*Non-nil means attempt auto-fixing of doc strings.
|
||||
"Non-nil means attempt auto-fixing of doc strings.
|
||||
If this value is the symbol `query', then the user is queried before
|
||||
any change is made. If the value is `automatic', then all changes are
|
||||
made without asking unless the change is very-complex. If the value
|
||||
|
@ -208,37 +214,39 @@ The value `never' is the same as nil, never ask or change anything."
|
|||
(other :tag "semiautomatic" semiautomatic)))
|
||||
|
||||
(defcustom checkdoc-bouncy-flag t
|
||||
"*Non-nil means to \"bounce\" to auto-fix locations.
|
||||
"Non-nil means to \"bounce\" to auto-fix locations.
|
||||
Setting this to nil will silently make fixes that require no user
|
||||
interaction. See `checkdoc-autofix-flag' for auto-fixing details."
|
||||
:group 'checkdoc
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom checkdoc-force-docstrings-flag t
|
||||
"*Non-nil means that all checkable definitions should have documentation.
|
||||
"Non-nil means that all checkable definitions should have documentation.
|
||||
Style guide dictates that interactive functions MUST have documentation,
|
||||
and that it's good but not required practice to make non user visible items
|
||||
have doc strings."
|
||||
:group 'checkdoc
|
||||
:type 'boolean)
|
||||
(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp)
|
||||
|
||||
(defcustom checkdoc-force-history-flag t
|
||||
"*Non-nil means that files should have a History section or ChangeLog file.
|
||||
"Non-nil means that files should have a History section or ChangeLog file.
|
||||
This helps document the evolution of, and recent changes to, the package."
|
||||
:group 'checkdoc
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom checkdoc-permit-comma-termination-flag nil
|
||||
"*Non-nil means the first line of a docstring may end with a comma.
|
||||
"Non-nil means the first line of a docstring may end with a comma.
|
||||
Ordinarily, a full sentence is required. This may be misleading when
|
||||
there is a substantial caveat to the one-line description -- the comma
|
||||
should be used when the first part could stand alone as a sentence, but
|
||||
it indicates that a modifying clause follows."
|
||||
:group 'checkdoc
|
||||
:type 'boolean)
|
||||
(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable 'booleanp)
|
||||
|
||||
(defcustom checkdoc-spellcheck-documentation-flag nil
|
||||
"*Non-nil means run Ispell on text based on value.
|
||||
"Non-nil means run Ispell on text based on value.
|
||||
This is automatically set to nil if Ispell does not exist on your
|
||||
system. Possible values are:
|
||||
|
||||
|
@ -259,14 +267,14 @@ system. Possible values are:
|
|||
"List of words that are correct when spell-checking Lisp documentation.")
|
||||
|
||||
(defcustom checkdoc-max-keyref-before-warn 10
|
||||
"*The number of \\ [command-to-keystroke] tokens allowed in a doc string.
|
||||
"The number of \\ [command-to-keystroke] tokens allowed in a doc string.
|
||||
Any more than this and a warning is generated suggesting that the construct
|
||||
\\ {keymap} be used instead."
|
||||
:group 'checkdoc
|
||||
:type 'integer)
|
||||
|
||||
(defcustom checkdoc-arguments-in-order-flag t
|
||||
"*Non-nil means warn if arguments appear out of order.
|
||||
"Non-nil means warn if arguments appear out of order.
|
||||
Setting this to nil will mean only checking that all the arguments
|
||||
appear in the proper form in the documentation, not that they are in
|
||||
the same order as they appear in the argument list. No mention is
|
||||
|
@ -298,7 +306,7 @@ problem discovered. This is useful for adding additional checks.")
|
|||
A search leaves the cursor in front of the parameter list.")
|
||||
|
||||
(defcustom checkdoc-verb-check-experimental-flag t
|
||||
"*Non-nil means to attempt to check the voice of the doc string.
|
||||
"Non-nil means to attempt to check the voice of the doc string.
|
||||
This check keys off some words which are commonly misused. See the
|
||||
variable `checkdoc-common-verbs-wrong-voice' if you wish to add your own."
|
||||
:group 'checkdoc
|
||||
|
@ -2633,12 +2641,6 @@ function called to create the messages."
|
|||
(setq checkdoc-pending-errors nil)
|
||||
nil)))
|
||||
|
||||
(defgroup checkdoc nil
|
||||
"Support for doc string checking in Emacs Lisp."
|
||||
:prefix "checkdoc"
|
||||
:group 'lisp
|
||||
:version "20.3")
|
||||
|
||||
(custom-add-option 'emacs-lisp-mode-hook
|
||||
(lambda () (checkdoc-minor-mode 1)))
|
||||
|
||||
|
@ -2650,5 +2652,5 @@ function called to create the messages."
|
|||
|
||||
(provide 'checkdoc)
|
||||
|
||||
;;; arch-tag: c49a7ec8-3bb7-46f2-bfbc-d5f26e033b26
|
||||
;; arch-tag: c49a7ec8-3bb7-46f2-bfbc-d5f26e033b26
|
||||
;;; checkdoc.el ends here
|
||||
|
|
|
@ -60,14 +60,22 @@ fire repeatedly that many seconds apart."
|
|||
|
||||
(defun timer-set-idle-time (timer secs &optional repeat)
|
||||
"Set the trigger idle time of TIMER to SECS.
|
||||
SECS may be an integer, floating point number, or the internal
|
||||
time format (HIGH LOW USECS) returned by, e.g., `current-idle-time'.
|
||||
If optional third argument REPEAT is non-nil, make the timer
|
||||
fire each time Emacs is idle for that many seconds."
|
||||
(or (timerp timer)
|
||||
(error "Invalid timer"))
|
||||
(aset timer 1 0)
|
||||
(aset timer 2 0)
|
||||
(aset timer 3 0)
|
||||
(timer-inc-time timer secs)
|
||||
(if (consp secs)
|
||||
(progn (aset timer 1 (car secs))
|
||||
(aset timer 2 (if (consp (cdr secs)) (car (cdr secs)) (cdr secs)))
|
||||
(aset timer 3 (or (and (consp (cdr secs)) (consp (cdr (cdr secs)))
|
||||
(nth 2 secs))
|
||||
0)))
|
||||
(aset timer 1 0)
|
||||
(aset timer 2 0)
|
||||
(aset timer 3 0)
|
||||
(timer-inc-time timer secs))
|
||||
(aset timer 4 repeat)
|
||||
timer)
|
||||
|
||||
|
@ -104,7 +112,7 @@ of SECS seconds since the epoch. SECS may be a fraction."
|
|||
|
||||
(defun timer-relative-time (time secs &optional usecs)
|
||||
"Advance TIME by SECS seconds and optionally USECS microseconds.
|
||||
SECS may be a fraction."
|
||||
SECS may be either an integer or a floating point number."
|
||||
(let ((high (car time))
|
||||
(low (if (consp (cdr time)) (nth 1 time) (cdr time)))
|
||||
(micro (if (numberp (car-safe (cdr-safe (cdr time))))
|
||||
|
@ -412,7 +420,10 @@ This function is for compatibility; see also `run-with-timer'."
|
|||
(defun run-with-idle-timer (secs repeat function &rest args)
|
||||
"Perform an action the next time Emacs is idle for SECS seconds.
|
||||
The action is to call FUNCTION with arguments ARGS.
|
||||
SECS may be an integer or a floating point number.
|
||||
SECS may be an integer, a floating point number, or the internal
|
||||
time format (HIGH LOW USECS) returned by, e.g., `current-idle-time'.
|
||||
If Emacs is currently idle, and has been idle for N seconds (N < SECS),
|
||||
then it will call FUNCTION in SECS - N seconds from now.
|
||||
|
||||
If REPEAT is non-nil, do the action each time Emacs has been idle for
|
||||
exactly SECS seconds (that is, only once for each time Emacs becomes idle).
|
||||
|
@ -425,7 +436,7 @@ This function returns a timer object which you can use in `cancel-timer'."
|
|||
(let ((timer (timer-create)))
|
||||
(timer-set-function timer function args)
|
||||
(timer-set-idle-time timer secs repeat)
|
||||
(timer-activate-when-idle timer)
|
||||
(timer-activate-when-idle timer t)
|
||||
timer))
|
||||
|
||||
(defun with-timeout-handler (tag)
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
;; regexp: regular expression that matches the end of a response from
|
||||
;; the process
|
||||
(defun tq-queue-head-regexp (tq) (car (cdr (car (tq-queue tq)))))
|
||||
;; closure: additional data to pass to function
|
||||
;; closure: additional data to pass to the function
|
||||
(defun tq-queue-head-closure (tq) (car (cdr (cdr (car (tq-queue tq))))))
|
||||
;; fn: function to call upon receiving a complete response from the
|
||||
;; process
|
||||
|
@ -119,7 +119,7 @@ If DELAY-QUESTION is non-nil, delay sending this question until
|
|||
the process has finished replying to any previous questions.
|
||||
This produces more reliable results with some processes."
|
||||
(let ((sendp (or (not delay-question)
|
||||
(not (tq-queue-head-question tq)))))
|
||||
(not (tq-queue tq)))))
|
||||
(tq-queue-add tq (unless sendp question) regexp closure fn)
|
||||
(when sendp
|
||||
(process-send-string (tq-process tq) question))))
|
||||
|
@ -131,35 +131,39 @@ This produces more reliable results with some processes."
|
|||
|
||||
(defun tq-filter (tq string)
|
||||
"Append STRING to the TQ's buffer; then process the new data."
|
||||
(with-current-buffer (tq-buffer tq)
|
||||
(goto-char (point-max))
|
||||
(insert string)
|
||||
(tq-process-buffer tq)))
|
||||
(let ((buffer (tq-buffer tq)))
|
||||
(when (buffer-live-p buffer)
|
||||
(with-current-buffer buffer
|
||||
(goto-char (point-max))
|
||||
(insert string)
|
||||
(tq-process-buffer tq)))))
|
||||
|
||||
(defun tq-process-buffer (tq)
|
||||
"Check TQ's buffer for the regexp at the head of the queue."
|
||||
(set-buffer (tq-buffer tq))
|
||||
(if (= 0 (buffer-size)) ()
|
||||
(if (tq-queue-empty tq)
|
||||
(let ((buf (generate-new-buffer "*spurious*")))
|
||||
(copy-to-buffer buf (point-min) (point-max))
|
||||
(delete-region (point-min) (point))
|
||||
(pop-to-buffer buf nil)
|
||||
(error "Spurious communication from process %s, see buffer %s"
|
||||
(process-name (tq-process tq))
|
||||
(buffer-name buf)))
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward (tq-queue-head-regexp tq) nil t)
|
||||
(let ((answer (buffer-substring (point-min) (point))))
|
||||
(delete-region (point-min) (point))
|
||||
(unwind-protect
|
||||
(condition-case nil
|
||||
(funcall (tq-queue-head-fn tq)
|
||||
(tq-queue-head-closure tq)
|
||||
answer)
|
||||
(error nil))
|
||||
(tq-queue-pop tq))
|
||||
(tq-process-buffer tq))))))
|
||||
(let ((buffer (tq-buffer tq)))
|
||||
(when (buffer-live-p buffer)
|
||||
(set-buffer buffer)
|
||||
(if (= 0 (buffer-size)) ()
|
||||
(if (tq-queue-empty tq)
|
||||
(let ((buf (generate-new-buffer "*spurious*")))
|
||||
(copy-to-buffer buf (point-min) (point-max))
|
||||
(delete-region (point-min) (point))
|
||||
(pop-to-buffer buf nil)
|
||||
(error "Spurious communication from process %s, see buffer %s"
|
||||
(process-name (tq-process tq))
|
||||
(buffer-name buf)))
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward (tq-queue-head-regexp tq) nil t)
|
||||
(let ((answer (buffer-substring (point-min) (point))))
|
||||
(delete-region (point-min) (point))
|
||||
(unwind-protect
|
||||
(condition-case nil
|
||||
(funcall (tq-queue-head-fn tq)
|
||||
(tq-queue-head-closure tq)
|
||||
answer)
|
||||
(error nil))
|
||||
(tq-queue-pop tq))
|
||||
(tq-process-buffer tq))))))))
|
||||
|
||||
(provide 'tq)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue