(defun dcl-end-of-command ()
"Move point to end of current command or next command if not on a command."
(interactive)
- (let ((type (dcl-get-line-type))
- (start (point)))
+ (let ((type (dcl-get-line-type)))
(if (or (eq type '$)
(eq type '-))
(progn
;;;---------------------------------------------------------------------------
(defun dcl-calc-command-indent-multiple
- (indent-type cur-indent extra-indent last-point this-point)
+ (indent-type cur-indent extra-indent _last-point _this-point)
"Indent lines to a multiple of dcl-basic-offset.
Set dcl-calc-command-indent-function to this function to customize
;;;---------------------------------------------------------------------------
-(defun dcl-calc-cont-indent-relative (cur-indent extra-indent)
+(defun dcl-calc-cont-indent-relative (_cur-indent _extra-indent)
"Indent continuation lines to align with words on previous line.
Indent continuation lines to a position relative to preceding
;;;-------------------------------------------------------------------------
-(defun dcl-option-value-basic (option-assoc)
+(defun dcl-option-value-basic (_option-assoc)
"Guess a value for basic-offset."
(save-excursion
(dcl-beginning-of-command)
;;;-------------------------------------------------------------------------
-(defun dcl-option-value-offset (option-assoc)
+(defun dcl-option-value-offset (_option-assoc)
"Guess a value for an offset.
Find the column of the first non-blank character on the line.
Returns the column offset."
;;;-------------------------------------------------------------------------
-(defun dcl-option-value-margin-offset (option-assoc)
+(defun dcl-option-value-margin-offset (_option-assoc)
"Guess a value for margin offset.
Find the column of the first non-blank character on the line, not
counting labels.
;;;-------------------------------------------------------------------------
-(defun dcl-option-value-comment-line (option-assoc)
+(defun dcl-option-value-comment-line (_option-assoc)
"Guess a value for `dcl-comment-line-regexp'.
Must return a string."
;; Should we set comment-start and comment-start-skip as well?
(if (eolp) (error "Missing colon in local variables entry"))
(skip-chars-backward " \t")
(let* ((str (buffer-substring beg (point)))
- (found-var (read str))
- val)
+ (found-var (read str)))
;; Setting variable named "end" means end of list.
(if (string-equal (downcase str) "end")
(progn
;;;-------------------------------------------------------------------------
+(with-no-warnings
+ ;; Dynamically bound in `dcl-save-mode'.
+ (defvar mode))
+
(defun dcl-save-mode ()
"Save the current mode for this buffer.
Save the current mode in a `Local Variables:'
(interactive)
(let ((mode (prin1-to-string major-mode)))
(if (string-match "-mode$" mode)
- (let ((mode (intern (substring mode 0 (match-beginning 0)))))
+ (let ((mode (intern (substring mode 0 (match-beginning 0)))))
(dcl-save-option 'mode))
(message "Strange mode: %s" mode))))