lisp/*.el: Silence lexical-binding warnings.
This commit is contained in:
parent
919a957544
commit
9d3aa82cf9
17 changed files with 175 additions and 132 deletions
|
@ -1,3 +1,62 @@
|
|||
2013-08-08 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* allout-widgets.el (allout-widgets-pre-command-business)
|
||||
(allout-widgets-post-command-business)
|
||||
(allout-widgets-after-change-handler)
|
||||
(allout-decorate-item-and-context, allout-set-boundary-marker)
|
||||
(allout-body-modification-handler)
|
||||
(allout-graphics-modification-handler): Mark ignored arguments.
|
||||
(allout-widgets-post-command-business)
|
||||
(allout-widgets-exposure-change-processor)
|
||||
(allout-widgets-exposure-undo-processor)
|
||||
(allout-decorate-item-and-context, allout-redecorate-visible-subtree)
|
||||
(allout-parse-item-at-point, allout-decorate-item-guides)
|
||||
(allout-decorate-item-cue, allout-item-span): Remove unused variables.
|
||||
* allout.el (epa-passphrase-callback-function): Declare.
|
||||
(allout-overlay-insert-in-front-handler)
|
||||
(allout-overlay-interior-modification-handler)
|
||||
(allout-isearch-end-handler, allout-chart-siblings)
|
||||
(allout-up-current-level, allout-end-of-level, allout-reindent-body)
|
||||
(allout-yank-processing, allout-process-exposed)
|
||||
(allout-latex-verb-quote, allout-latexify-one-item, outlineify-sticky)
|
||||
(allout-latex-verbatim-quote-curr-line): Removed unused variables.
|
||||
* emacs-lisp/lisp-mode.el (lisp-eval-defun, last-sexp-toggle-display)
|
||||
(lisp-indent-defform): Mark ignored arguments.
|
||||
(lisp-indent-line): Mark ignored arguments. Remove unused variables.
|
||||
(calculate-lisp-indent): Remove unused variables.
|
||||
* international/characters.el (indian-2-column, arabic-2-column)
|
||||
(tibetan): Mark ignored arguments.
|
||||
(use-cjk-char-width-table): Mark ignored arguments.
|
||||
Remove unused variables.
|
||||
* international/fontset.el (build-default-fontset-data)
|
||||
(x-compose-font-name, create-fontset-from-fontset-spec):
|
||||
Mark ignored arguments.
|
||||
(fontset-plain-name): Remove unused variables.
|
||||
* international/mule.el (charset-id, charset-bytes, generic-char-p)
|
||||
(keyboard-coding-system): Mark ignored arguments.
|
||||
(find-auto-coding): Remove unused variables. Use `ignore-errors'.
|
||||
* help.el (resize-temp-buffer-window):
|
||||
* window.el (display-buffer-in-major-side-window)
|
||||
(display-buffer-in-side-window, display-buffer-in-previous-window):
|
||||
Remove unused variables.
|
||||
* isearch.el (isearch-forward-symbol):
|
||||
* version.el (emacs-bzr-version-bzr):
|
||||
* international/mule-cmds.el (current-language-environment):
|
||||
* term/common-win.el (x-handle-iconic, x-handle-geometry)
|
||||
(x-handle-display):
|
||||
* term/pc-win.el (x-list-fonts, x-display-planes)
|
||||
(x-display-color-cells, x-server-max-request-size, x-server-vendor)
|
||||
(x-server-version, x-display-screens, x-display-mm-height)
|
||||
(x-display-mm-width, x-display-backing-store, x-display-visual-class)
|
||||
(x-selection-owner-p, x-own-selection-internal)
|
||||
(x-disown-selection-internal, x-get-selection-internal)
|
||||
(msdos-initialize-window-system):
|
||||
* term/tty-colors.el (tty-color-alist, tty-color-clear):
|
||||
* term/x-win.el (x-handle-no-bitmap-icon):
|
||||
* vc/vc-hooks.el (vc-mode, vc-default-make-version-backups-p)
|
||||
(vc-default-find-file-hook, vc-default-extra-menu):
|
||||
Mark ignored arguments.
|
||||
|
||||
2013-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/edebug.el (edebug-debugger): Use edebug-eval to run the
|
||||
|
|
|
@ -720,17 +720,17 @@ icon/bullet.")
|
|||
;;;_ . Hooks and hook helpers
|
||||
;;;_ , major command-loop business:
|
||||
;;;_ > allout-widgets-pre-command-business (&optional recursing)
|
||||
(defun allout-widgets-pre-command-business (&optional recursing)
|
||||
(defun allout-widgets-pre-command-business (&optional _recursing)
|
||||
"Handle actions pending before `allout-mode' activity."
|
||||
)
|
||||
;;;_ > allout-widgets-post-command-business (&optional recursing)
|
||||
(defun allout-widgets-post-command-business (&optional recursing)
|
||||
(defun allout-widgets-post-command-business (&optional _recursing)
|
||||
"Handle actions pending after any `allout-mode' commands.
|
||||
|
||||
Optional RECURSING is for internal use, to limit recursion."
|
||||
;; - check changed text for nesting discontinuities and escape anything
|
||||
;; that's: (1) asterisks at bol or (2) excessively nested.
|
||||
(condition-case failure
|
||||
(condition-case nil
|
||||
|
||||
(when (and (boundp 'allout-mode) allout-mode)
|
||||
|
||||
|
@ -811,7 +811,7 @@ Optional RECURSING is for internal use, to limit recursion."
|
|||
(goto-char (widget-get this-widget :from))
|
||||
(not (bolp)))
|
||||
(if (not
|
||||
(condition-case err
|
||||
(condition-case nil
|
||||
(yes-or-no-p
|
||||
(concat "Misplaced item won't be recognizable "
|
||||
" as part of outline - rectify? "))
|
||||
|
@ -873,7 +873,7 @@ Optional RECURSING is for internal use, to limit recursion."
|
|||
(error
|
||||
(substitute-command-keys allout-structure-unruly-deletion-message)))))
|
||||
;;;_ > allout-widgets-after-change-handler
|
||||
(defun allout-widgets-after-change-handler (beg end prelength)
|
||||
(defun allout-widgets-after-change-handler (_beg _end _prelength)
|
||||
"Reconcile what needs to be reconciled for allout widgets after edits."
|
||||
)
|
||||
;;;_ > allout-current-decorated-p ()
|
||||
|
@ -999,7 +999,6 @@ Generally invoked via `allout-exposure-change-functions'."
|
|||
;; have to distinguish between concealing and exposing so that, eg,
|
||||
;; `allout-expose-topic's mix is handled properly.
|
||||
handled-expose
|
||||
handled-conceal
|
||||
covered
|
||||
deactivate-mark)
|
||||
|
||||
|
@ -1188,7 +1187,7 @@ Dispatched by `allout-widgets-post-command-business' in response to
|
|||
(let* ((allout-undo-exposure-in-progress t)
|
||||
;; inhibit undo recording while twiddling exposure to track undo:
|
||||
(widgets allout-widgets-undo-exposure-record)
|
||||
widget widget-start-marker widget-end-marker
|
||||
widget-start-marker widget-end-marker
|
||||
from-state icon-start-point to-state
|
||||
handled covered)
|
||||
(setq allout-widgets-undo-exposure-record nil)
|
||||
|
@ -1552,7 +1551,7 @@ recursive operation."
|
|||
;;;_ > allout-decorate-item-and-context (item-widget &optional redecorate
|
||||
;;; blank-container parent)
|
||||
(defun allout-decorate-item-and-context (item-widget &optional redecorate
|
||||
blank-container parent)
|
||||
blank-container _parent)
|
||||
"Create or adjust widget decorations for ITEM-WIDGET and neighbors at point.
|
||||
|
||||
The neighbors include its siblings and parent.
|
||||
|
@ -1593,12 +1592,8 @@ We return the item-widget corresponding to the item at point."
|
|||
steady-point))
|
||||
(parent (and (not is-container)
|
||||
(allout-get-or-create-parent-widget)))
|
||||
parent-flags parent-depth
|
||||
successor-sibling
|
||||
body
|
||||
doing-item
|
||||
sub-item-widget
|
||||
depth
|
||||
reverse-siblings-chart
|
||||
(buffer-undo-list t))
|
||||
|
||||
|
@ -1615,7 +1610,6 @@ We return the item-widget corresponding to the item at point."
|
|||
;; `allout-goto-prefix' will go to first non-container item:
|
||||
(allout-goto-prefix)
|
||||
(allout-next-heading))
|
||||
(setq depth (allout-recent-depth))
|
||||
(setq reverse-siblings-chart (list allout-recent-prefix-beginning))
|
||||
(while (allout-next-sibling)
|
||||
(push allout-recent-prefix-beginning reverse-siblings-chart)))
|
||||
|
@ -1702,7 +1696,6 @@ Point is left at the last sibling in the visible subtree."
|
|||
(pending-chart (or chart (allout-chart-subtree nil 'visible)))
|
||||
item-widget
|
||||
previous-sibling-point
|
||||
previous-sibling
|
||||
recent-sibling-point)
|
||||
(setq pending-chart (nreverse pending-chart))
|
||||
(dolist (sibling-point pending-chart)
|
||||
|
@ -1753,9 +1746,7 @@ may have subitems.)"
|
|||
(icon-start (1- icon-end))
|
||||
body-start
|
||||
body-end
|
||||
bullet
|
||||
has-subitems
|
||||
(contents-depth (1+ depth))
|
||||
)
|
||||
(widget-put item-widget :depth depth)
|
||||
(if is-container
|
||||
|
@ -1783,7 +1774,7 @@ may have subitems.)"
|
|||
|
||||
;; cue area:
|
||||
(setq body-start icon-end)
|
||||
(widget-put item-widget :bullet (setq bullet (allout-get-bullet)))
|
||||
(widget-put item-widget :bullet (allout-get-bullet))
|
||||
(if (equal (char-after body-start) ? )
|
||||
(setq body-start (1+ body-start)))
|
||||
(widget-put item-widget :body-start body-start)
|
||||
|
@ -1809,7 +1800,7 @@ may have subitems.)"
|
|||
;; has a subsequent item:
|
||||
(not (= body-end (point-max)))
|
||||
;; subsequent item is deeper:
|
||||
(< depth (setq contents-depth (allout-recent-depth))))))
|
||||
(< depth (allout-recent-depth)))))
|
||||
;; note :expanded - true if widget item's content is currently visible?
|
||||
(widget-put item-widget :expanded
|
||||
(and has-subitems
|
||||
|
@ -1818,7 +1809,7 @@ may have subitems.)"
|
|||
(goto-char allout-recent-prefix-beginning)
|
||||
(not (allout-hidden-p)))))))
|
||||
;;;_ > allout-set-boundary-marker (boundary position &optional current-marker)
|
||||
(defun allout-set-boundary-marker (boundary position &optional current-marker)
|
||||
(defun allout-set-boundary-marker (_boundary position &optional current-marker)
|
||||
"Set or create item widget BOUNDARY type marker at POSITION.
|
||||
|
||||
Optional CURRENT-MARKER is the marker currently being used for
|
||||
|
@ -1872,8 +1863,8 @@ reapplying this method will rectify the glyphs."
|
|||
|
||||
(when (not (widget-get item-widget :is-container))
|
||||
(let* ((depth (widget-get item-widget :depth))
|
||||
(parent-depth (and parent-widget
|
||||
(widget-get parent-widget :depth)))
|
||||
;; (parent-depth (and parent-widget
|
||||
;; (widget-get parent-widget :depth)))
|
||||
(parent-flags (and parent-widget
|
||||
(widget-get parent-widget :guide-column-flags)))
|
||||
(parent-flags-depth (length parent-flags))
|
||||
|
@ -1894,7 +1885,7 @@ reapplying this method will rectify the glyphs."
|
|||
(increment (length allout-header-prefix))
|
||||
reverse-flags
|
||||
guide-name
|
||||
extenders paint-extenders
|
||||
extenders
|
||||
(inhibit-read-only t))
|
||||
|
||||
(when (not (equal was-flags flags))
|
||||
|
@ -2017,8 +2008,8 @@ reapplying this method will rectify the glyphs."
|
|||
(let* ((cue-start (or (widget-get item-widget :distinctive-end)
|
||||
(widget-get item-widget :icon-end)))
|
||||
(body-start (widget-get item-widget :body-start))
|
||||
(expanded (widget-get item-widget :expanded))
|
||||
(has-subitems (widget-get item-widget :has-subitems))
|
||||
;(expanded (widget-get item-widget :expanded))
|
||||
;(has-subitems (widget-get item-widget :has-subitems))
|
||||
(inhibit-read-only t))
|
||||
|
||||
(allout-item-element-span-is item-widget :cue-span cue-start body-start)
|
||||
|
@ -2032,7 +2023,6 @@ Optional FORCE means force reassignment of the region property."
|
|||
(let* ((allout-inhibit-body-modification-hook t)
|
||||
(body-start (widget-get item-widget :body-start))
|
||||
(body-end (widget-get item-widget :body-end))
|
||||
(body-text-end body-end)
|
||||
(inhibit-read-only t))
|
||||
|
||||
(allout-item-element-span-is item-widget :body-span
|
||||
|
@ -2135,9 +2125,7 @@ of the current span, if established, or nil if not yet set.
|
|||
When the START and END are passed, return the distance that the
|
||||
start of the item moved. We return 0 if the span was not
|
||||
previously established or is not moved."
|
||||
(let ((overlay (widget-get item-widget :span-overlay))
|
||||
was-start was-end
|
||||
changed)
|
||||
(let ((overlay (widget-get item-widget :span-overlay)))
|
||||
(cond ((not overlay) (when start
|
||||
(setq overlay (make-overlay start end nil t nil))
|
||||
(overlay-put overlay 'button item-widget)
|
||||
|
@ -2259,7 +2247,7 @@ of the buffer."
|
|||
(allout-get-or-create-item-widget redecorate)))
|
||||
;;;_ : X- Item ancillaries
|
||||
;;;_ >X allout-body-modification-handler (beg end)
|
||||
(defun allout-body-modification-handler (beg end)
|
||||
(defun allout-body-modification-handler (_beg _end)
|
||||
"Do routine processing of body text before and after modification.
|
||||
|
||||
Operation is inhibited by `allout-inhibit-body-modification-handler'."
|
||||
|
@ -2281,7 +2269,7 @@ Operation is inhibited by `allout-inhibit-body-modification-handler'."
|
|||
;; operation.
|
||||
(cond (allout-inhibit-body-modification-hook nil)))
|
||||
;;;_ >X allout-graphics-modification-handler (beg end)
|
||||
(defun allout-graphics-modification-handler (beg end)
|
||||
(defun allout-graphics-modification-handler (beg _end)
|
||||
"Protect against incoherent deletion of decoration graphics.
|
||||
|
||||
Deletes allowed only when `inhibit-read-only' is t."
|
||||
|
|
|
@ -74,6 +74,9 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(declare-function epa-passphrase-callback-function
|
||||
"epa" (context key-id handback))
|
||||
|
||||
;;;_* Dependency loads
|
||||
(require 'overlay)
|
||||
(eval-when-compile
|
||||
|
@ -2121,8 +2124,8 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
|
|||
|
||||
;;;_ > allout-overlay-insert-in-front-handler (ol after beg end
|
||||
;;; &optional prelen)
|
||||
(defun allout-overlay-insert-in-front-handler (ol after beg end
|
||||
&optional prelen)
|
||||
(defun allout-overlay-insert-in-front-handler (ol after beg _end
|
||||
&optional _prelen)
|
||||
"Shift the overlay so stuff inserted in front of it is excluded."
|
||||
(if after
|
||||
;; ??? Shouldn't moving the overlay should be unnecessary, if overlay
|
||||
|
@ -2131,7 +2134,7 @@ OPEN: A TOPIC that is not CLOSED, though its OFFSPRING or BODY may be."
|
|||
;;;_ > allout-overlay-interior-modification-handler (ol after beg end
|
||||
;;; &optional prelen)
|
||||
(defun allout-overlay-interior-modification-handler (ol after beg end
|
||||
&optional prelen)
|
||||
&optional _prelen)
|
||||
"Get confirmation before making arbitrary changes to invisible text.
|
||||
|
||||
We expose the invisible text and ask for confirmation. Refusal or
|
||||
|
@ -2194,7 +2197,7 @@ See `allout-overlay-interior-modification-handler' for details."
|
|||
(allout-overlay-interior-modification-handler
|
||||
overlay nil beg end nil))))))
|
||||
;;;_ > allout-isearch-end-handler (&optional overlay)
|
||||
(defun allout-isearch-end-handler (&optional overlay)
|
||||
(defun allout-isearch-end-handler (&optional _overlay)
|
||||
"Reconcile allout outline exposure on arriving in hidden text after isearch.
|
||||
|
||||
Optional OVERLAY parameter is for when this function is used by
|
||||
|
@ -2733,7 +2736,7 @@ starting point, and PREV-DEPTH is depth of prior topic."
|
|||
; and maybe not preferable.
|
||||
))
|
||||
;;;_ > allout-chart-siblings (&optional start end)
|
||||
(defun allout-chart-siblings (&optional start end)
|
||||
(defun allout-chart-siblings (&optional _start _end)
|
||||
"Produce a list of locations of this and succeeding sibling topics.
|
||||
Effectively a top-level chart of siblings. See `allout-chart-subtree'
|
||||
for an explanation of charts."
|
||||
|
@ -3051,7 +3054,7 @@ Returning depth if successful, nil if not."
|
|||
nil))
|
||||
)
|
||||
;;;_ > allout-up-current-level (arg)
|
||||
(defun allout-up-current-level (arg)
|
||||
(defun allout-up-current-level (_arg)
|
||||
"Move out ARG levels from current visible topic."
|
||||
(interactive "p")
|
||||
(let ((start-point (point)))
|
||||
|
@ -3198,7 +3201,7 @@ Presumes point is at the start of a topic prefix."
|
|||
"Go back to the first sibling at this level, visible or not."
|
||||
(allout-end-of-level 'backward))
|
||||
;;;_ > allout-end-of-level (&optional backward)
|
||||
(defun allout-end-of-level (&optional backward)
|
||||
(defun allout-end-of-level (&optional _backward)
|
||||
"Go to the last sibling at this level, visible or not."
|
||||
|
||||
(let ((depth (allout-depth)))
|
||||
|
@ -3930,7 +3933,7 @@ Maintains outline hanging topic indentation if
|
|||
(if (or allout-former-auto-filler allout-use-hanging-indents)
|
||||
(funcall use-auto-fill-function)))))
|
||||
;;;_ > allout-reindent-body (old-depth new-depth &optional number)
|
||||
(defun allout-reindent-body (old-depth new-depth &optional number)
|
||||
(defun allout-reindent-body (old-depth new-depth &optional _number)
|
||||
"Reindent body lines which were indented at OLD-DEPTH to NEW-DEPTH.
|
||||
|
||||
Optional arg NUMBER indicates numbering is being added, and it must
|
||||
|
@ -4559,7 +4562,7 @@ Topic exposure is marked with text-properties, to be used by
|
|||
(if next (goto-char next)))))
|
||||
(set-buffer-modified-p was-modified))))
|
||||
;;;_ > allout-yank-processing ()
|
||||
(defun allout-yank-processing (&optional arg)
|
||||
(defun allout-yank-processing (&optional _arg)
|
||||
|
||||
"Incidental allout-specific business to be done just after text yanks.
|
||||
|
||||
|
@ -5521,7 +5524,7 @@ header and body. The elements of that list are:
|
|||
;;_ > allout-process-exposed (&optional func from to frombuf
|
||||
;;; tobuf format)
|
||||
(defun allout-process-exposed (&optional func from to frombuf tobuf
|
||||
format start-num)
|
||||
format _start-num)
|
||||
"Map function on exposed parts of current topic; results to another buffer.
|
||||
|
||||
All args are options; default values itemized below.
|
||||
|
@ -5685,7 +5688,7 @@ used verbatim."
|
|||
|
||||
;;;_ - LaTeX formatting
|
||||
;;;_ > allout-latex-verb-quote (string &optional flow)
|
||||
(defun allout-latex-verb-quote (string &optional flow)
|
||||
(defun allout-latex-verb-quote (string &optional _flow)
|
||||
"Return copy of STRING for literal reproduction across LaTeX processing.
|
||||
Expresses the original characters (including carriage returns) of the
|
||||
string across LaTeX processing."
|
||||
|
@ -5706,7 +5709,7 @@ across LaTeX processing, within the context of a `verbatim'
|
|||
environment. Leaves point at the end of the line."
|
||||
(let ((inhibit-field-text-motion t))
|
||||
(beginning-of-line)
|
||||
(let ((beg (point))
|
||||
(let (;(beg (point))
|
||||
(end (point-at-eol)))
|
||||
(save-match-data
|
||||
(while (re-search-forward "\\\\"
|
||||
|
@ -5790,7 +5793,7 @@ environment. Leaves point at the end of the line."
|
|||
(set-buffer buffer)
|
||||
(insert "\n\\end{document}\n"))
|
||||
;;;_ > allout-latexify-one-item (depth prefix bullet text)
|
||||
(defun allout-latexify-one-item (depth prefix bullet text)
|
||||
(defun allout-latexify-one-item (depth _prefix bullet text)
|
||||
"Insert LaTeX commands for formatting one outline item.
|
||||
|
||||
Args are the topics numeric DEPTH, the header PREFIX lead string, the
|
||||
|
@ -6359,7 +6362,7 @@ save. See `allout-encrypt-unencrypted-on-saves' for more info."
|
|||
;;;###autoload
|
||||
(defalias 'outlinify-sticky 'outlineify-sticky)
|
||||
;;;###autoload
|
||||
(defun outlineify-sticky (&optional arg)
|
||||
(defun outlineify-sticky (&optional _arg)
|
||||
"Activate outline mode and establish file var so it is started subsequently.
|
||||
|
||||
See `allout-layout' and customization of `allout-auto-activation'
|
||||
|
|
|
@ -575,7 +575,7 @@ if that value is non-nil."
|
|||
(defalias 'common-lisp-mode 'lisp-mode)
|
||||
|
||||
;; This will do unless inf-lisp.el is loaded.
|
||||
(defun lisp-eval-defun (&optional and-go)
|
||||
(defun lisp-eval-defun (&optional _and-go)
|
||||
"Send the current defun to the Lisp process made by \\[run-lisp]."
|
||||
(interactive)
|
||||
(error "Process lisp does not exist"))
|
||||
|
@ -662,7 +662,7 @@ alternative printed representations that can be displayed."
|
|||
printed-value)))))
|
||||
|
||||
|
||||
(defun last-sexp-toggle-display (&optional arg)
|
||||
(defun last-sexp-toggle-display (&optional _arg)
|
||||
"Toggle between abbreviated and unabbreviated printed representations."
|
||||
(interactive "P")
|
||||
(save-restriction
|
||||
|
@ -1002,12 +1002,12 @@ function is `common-lisp-indent-function'."
|
|||
:type 'function
|
||||
:group 'lisp)
|
||||
|
||||
(defun lisp-indent-line (&optional whole-exp)
|
||||
(defun lisp-indent-line (&optional _whole-exp)
|
||||
"Indent current line as Lisp code.
|
||||
With argument, indent any additional lines of the same expression
|
||||
rigidly along with this one."
|
||||
(interactive "P")
|
||||
(let ((indent (calculate-lisp-indent)) shift-amt end
|
||||
(let ((indent (calculate-lisp-indent)) shift-amt
|
||||
(pos (- (point-max) (point)))
|
||||
(beg (progn (beginning-of-line) (point))))
|
||||
(skip-chars-forward " \t")
|
||||
|
@ -1047,7 +1047,7 @@ is the buffer position of the start of the containing expression."
|
|||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(let ((indent-point (point))
|
||||
state paren-depth
|
||||
state
|
||||
;; setting this to a number inhibits calling hook
|
||||
(desired-indent nil)
|
||||
(retry t)
|
||||
|
@ -1061,7 +1061,7 @@ is the buffer position of the start of the containing expression."
|
|||
;; Find innermost containing sexp
|
||||
(while (and retry
|
||||
state
|
||||
(> (setq paren-depth (elt state 0)) 0))
|
||||
(> (elt state 0) 0))
|
||||
(setq retry nil)
|
||||
(setq calculate-lisp-indent-last-sexp (elt state 2))
|
||||
(setq containing-sexp (elt state 1))
|
||||
|
@ -1290,7 +1290,7 @@ Lisp function does not specify a special indentation."
|
|||
body-indent
|
||||
normal-indent))))
|
||||
|
||||
(defun lisp-indent-defform (state indent-point)
|
||||
(defun lisp-indent-defform (state _indent-point)
|
||||
(goto-char (car (cdr state)))
|
||||
(forward-line 1)
|
||||
(if (> (point) (car (cdr (cdr state))))
|
||||
|
|
41
lisp/help.el
41
lisp/help.el
|
@ -1018,27 +1018,26 @@ smaller than `window-min-height'. Do nothing if WINDOW is not
|
|||
vertically combined, some of its contents are scrolled out of
|
||||
view, or WINDOW was not created by `display-buffer'."
|
||||
(setq window (window-normalize-window window t))
|
||||
(let ((buffer-name (buffer-name (window-buffer window))))
|
||||
(let ((height (if (functionp temp-buffer-max-height)
|
||||
(with-selected-window window
|
||||
(funcall temp-buffer-max-height (window-buffer)))
|
||||
temp-buffer-max-height))
|
||||
(quit-cadr (cadr (window-parameter window 'quit-restore))))
|
||||
(cond
|
||||
;; Resize WINDOW iff it was split off by `display-buffer'.
|
||||
((and (eq quit-cadr 'window)
|
||||
(pos-visible-in-window-p (point-min) window)
|
||||
(window-combined-p window))
|
||||
(fit-window-to-buffer window height))
|
||||
;; Resize FRAME iff it was created by `display-buffer'.
|
||||
((and fit-frame-to-buffer
|
||||
(eq quit-cadr 'frame)
|
||||
(eq window (frame-root-window window)))
|
||||
(let ((frame (window-frame window)))
|
||||
(fit-frame-to-buffer
|
||||
frame (+ (frame-height frame)
|
||||
(- (window-total-size window))
|
||||
height))))))))
|
||||
(let ((height (if (functionp temp-buffer-max-height)
|
||||
(with-selected-window window
|
||||
(funcall temp-buffer-max-height (window-buffer)))
|
||||
temp-buffer-max-height))
|
||||
(quit-cadr (cadr (window-parameter window 'quit-restore))))
|
||||
(cond
|
||||
;; Resize WINDOW iff it was split off by `display-buffer'.
|
||||
((and (eq quit-cadr 'window)
|
||||
(pos-visible-in-window-p (point-min) window)
|
||||
(window-combined-p window))
|
||||
(fit-window-to-buffer window height))
|
||||
;; Resize FRAME iff it was created by `display-buffer'.
|
||||
((and fit-frame-to-buffer
|
||||
(eq quit-cadr 'frame)
|
||||
(eq window (frame-root-window window)))
|
||||
(let ((frame (window-frame window)))
|
||||
(fit-frame-to-buffer
|
||||
frame (+ (frame-height frame)
|
||||
(- (window-total-size window))
|
||||
height)))))))
|
||||
|
||||
;;; Help windows.
|
||||
(defcustom help-window-select 'other
|
||||
|
|
|
@ -1078,10 +1078,10 @@ with L, LRE, or LRO Unicode bidi character type.")
|
|||
;; (lambda (range ignore) (set-char-table-range char-width-table range 2))
|
||||
;; 'tibetan)
|
||||
(map-charset-chars
|
||||
(lambda (range ignore) (set-char-table-range char-width-table range 2))
|
||||
(lambda (range _ignore) (set-char-table-range char-width-table range 2))
|
||||
'indian-2-column)
|
||||
(map-charset-chars
|
||||
(lambda (range ignore) (set-char-table-range char-width-table range 2))
|
||||
(lambda (range _ignore) (set-char-table-range char-width-table range 2))
|
||||
'arabic-2-column)
|
||||
|
||||
;; Internal use only.
|
||||
|
@ -1110,8 +1110,7 @@ with L, LRE, or LRO Unicode bidi character type.")
|
|||
(defun use-cjk-char-width-table (locale-name)
|
||||
(while (char-table-parent char-width-table)
|
||||
(setq char-width-table (char-table-parent char-width-table)))
|
||||
(let ((slot (assq locale-name cjk-char-width-table-list))
|
||||
table)
|
||||
(let ((slot (assq locale-name cjk-char-width-table-list)))
|
||||
(or slot (error "Unknown locale for CJK language environment: %s"
|
||||
locale-name))
|
||||
(unless (nth 1 slot)
|
||||
|
@ -1119,7 +1118,7 @@ with L, LRE, or LRO Unicode bidi character type.")
|
|||
(dolist (charset-info (nthcdr 2 slot))
|
||||
(let ((charset (car charset-info)))
|
||||
(dolist (code-range (cdr charset-info))
|
||||
(map-charset-chars #'(lambda (range arg)
|
||||
(map-charset-chars #'(lambda (range _arg)
|
||||
(set-char-table-range table range 2))
|
||||
charset nil
|
||||
(car code-range) (cdr code-range)))))
|
||||
|
@ -1326,7 +1325,7 @@ Setup char-width-table appropriate for non-CJK language environment."
|
|||
(set-char-table-extra-slot char-script-table 0 (nreverse script-list)))
|
||||
|
||||
(map-charset-chars
|
||||
#'(lambda (range ignore)
|
||||
#'(lambda (range _ignore)
|
||||
(set-char-table-range char-script-table range 'tibetan))
|
||||
'tibetan)
|
||||
|
||||
|
|
|
@ -357,7 +357,7 @@
|
|||
(dolist (elt cjk)
|
||||
(let ((mask (lsh 1 i)))
|
||||
(map-charset-chars
|
||||
#'(lambda (range arg)
|
||||
#'(lambda (range _arg)
|
||||
(let ((from (car range)) (to (cdr range)))
|
||||
(if (< to #x110000)
|
||||
(while (<= from to)
|
||||
|
@ -876,7 +876,7 @@ Return nil if PATTERN doesn't conform to XLFD."
|
|||
(aset xlfd-fields i nil)))
|
||||
xlfd-fields)))
|
||||
|
||||
(defun x-compose-font-name (fields &optional reduce)
|
||||
(defun x-compose-font-name (fields &optional _reduce)
|
||||
"Compose X fontname from FIELDS.
|
||||
FIELDS is a vector of XLFD fields, of length 12.
|
||||
If a field is nil, wild-card letter `*' is embedded.
|
||||
|
@ -954,7 +954,7 @@ Done when `mouse-set-font' is called."
|
|||
(let ((family (aref xlfd-fields xlfd-regexp-family-subnum))
|
||||
(weight (aref xlfd-fields xlfd-regexp-weight-subnum))
|
||||
(slant (aref xlfd-fields xlfd-regexp-slant-subnum))
|
||||
(swidth (aref xlfd-fields xlfd-regexp-swidth-subnum))
|
||||
;(swidth (aref xlfd-fields xlfd-regexp-swidth-subnum))
|
||||
(size (aref xlfd-fields xlfd-regexp-pixelsize-subnum))
|
||||
(nickname (aref xlfd-fields xlfd-regexp-registry-subnum))
|
||||
name)
|
||||
|
@ -1039,7 +1039,7 @@ This alist is used by the function `create-fontset-from-fontset-spec'
|
|||
to map charsets to scripts.")
|
||||
|
||||
(defun create-fontset-from-fontset-spec (fontset-spec
|
||||
&optional style-variant noerror)
|
||||
&optional _style-variant _noerror)
|
||||
"Create a fontset from fontset specification string FONTSET-SPEC.
|
||||
FONTSET-SPEC is a string of the format:
|
||||
FONTSET-NAME,SCRIPT-NAME0:FONT-NAME0,SCRIPT-NAME1:FONT-NAME1, ...
|
||||
|
|
|
@ -1739,8 +1739,8 @@ This hook is mainly used for canceling the effect of
|
|||
This variable should be set only with \\[customize], which is equivalent
|
||||
to using the function `set-language-environment'."
|
||||
:link '(custom-manual "(emacs)Language Environments")
|
||||
:set (lambda (symbol value) (set-language-environment value))
|
||||
:get (lambda (x)
|
||||
:set (lambda (_symbol value) (set-language-environment value))
|
||||
:get (lambda (_x)
|
||||
(or (car-safe (assoc-string
|
||||
(if (symbolp current-language-environment)
|
||||
(symbol-name current-language-environment)
|
||||
|
|
|
@ -407,12 +407,12 @@ PLIST (property list) may contain any type of information a user
|
|||
;; because that makes a bootstrapping problem
|
||||
;; if you need to recompile all the Lisp files using interpreted code.
|
||||
|
||||
(defun charset-id (charset)
|
||||
(defun charset-id (_charset)
|
||||
"Always return 0. This is provided for backward compatibility."
|
||||
(declare (obsolete nil "23.1"))
|
||||
0)
|
||||
|
||||
(defmacro charset-bytes (charset)
|
||||
(defmacro charset-bytes (_charset)
|
||||
"Always return 0. This is provided for backward compatibility."
|
||||
(declare (obsolete nil "23.1"))
|
||||
0)
|
||||
|
@ -471,7 +471,7 @@ Return -1 if charset isn't an ISO 2022 one."
|
|||
;;; CHARACTER
|
||||
(define-obsolete-function-alias 'char-valid-p 'characterp "23.1")
|
||||
|
||||
(defun generic-char-p (char)
|
||||
(defun generic-char-p (_char)
|
||||
"Always return nil. This is provided for backward compatibility."
|
||||
(declare (obsolete nil "23.1"))
|
||||
nil)
|
||||
|
@ -1429,7 +1429,7 @@ use either \\[customize] or \\[set-keyboard-coding-system]."
|
|||
:type '(coding-system :tag "Coding system")
|
||||
:link '(info-link "(emacs)Terminal Coding")
|
||||
:link '(info-link "(emacs)Unibyte Mode")
|
||||
:set (lambda (symbol value)
|
||||
:set (lambda (_symbol value)
|
||||
;; Don't load encoded-kb unnecessarily.
|
||||
(if (or value (boundp 'encoded-kbd-setup-display))
|
||||
(set-keyboard-coding-system value)
|
||||
|
@ -1850,7 +1850,7 @@ If nothing is specified, the return value is nil."
|
|||
(head-end (+ head-start (min size 1024)))
|
||||
(tail-start (+ head-start (max (- size 3072) 0)))
|
||||
(tail-end (+ head-start size))
|
||||
coding-system head-found tail-found pos char-trans)
|
||||
coding-system head-found tail-found char-trans)
|
||||
;; Try a short cut by searching for the string "coding:"
|
||||
;; and for "unibyte:" at the head and tail of SIZE bytes.
|
||||
(setq head-found (or (search-forward "coding:" head-end t)
|
||||
|
@ -1960,11 +1960,10 @@ use \"coding: 'raw-text\" instead." :warning)
|
|||
(let ((funcs auto-coding-functions)
|
||||
(coding-system nil))
|
||||
(while (and funcs (not coding-system))
|
||||
(setq coding-system (condition-case e
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(funcall (pop funcs) size))
|
||||
(error nil))))
|
||||
(setq coding-system (ignore-errors
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(funcall (pop funcs) size)))))
|
||||
(if coding-system
|
||||
(cons coding-system 'auto-coding-functions)))))
|
||||
|
||||
|
|
|
@ -777,7 +777,7 @@ See the command `isearch-forward' for more information."
|
|||
(interactive "P\np")
|
||||
(isearch-mode t nil nil (not no-recursive-edit) (null not-word)))
|
||||
|
||||
(defun isearch-forward-symbol (&optional not-symbol no-recursive-edit)
|
||||
(defun isearch-forward-symbol (&optional _not-symbol no-recursive-edit)
|
||||
"Do incremental search forward for a symbol.
|
||||
The prefix argument is currently unused.
|
||||
Like ordinary incremental search except that your input is treated
|
||||
|
|
|
@ -159,7 +159,7 @@ is not used)."
|
|||
initial-frame-alist)))))
|
||||
|
||||
;; Make -iconic apply only to the initial frame!
|
||||
(defun x-handle-iconic (switch)
|
||||
(defun x-handle-iconic (_switch)
|
||||
(setq initial-frame-alist
|
||||
(cons '(visibility . icon) initial-frame-alist)))
|
||||
|
||||
|
@ -175,7 +175,7 @@ is not used)."
|
|||
(declare-function x-parse-geometry "frame.c" (string))
|
||||
|
||||
;; Handle the geometry option
|
||||
(defun x-handle-geometry (switch)
|
||||
(defun x-handle-geometry (_switch)
|
||||
(let* ((geo (x-parse-geometry (pop x-invocation-args)))
|
||||
(left (assq 'left geo))
|
||||
(top (assq 'top geo))
|
||||
|
@ -216,7 +216,7 @@ is not used)."
|
|||
On X, the display name of individual X frames is recorded in the
|
||||
`display' frame parameter.")
|
||||
|
||||
(defun x-handle-display (switch)
|
||||
(defun x-handle-display (_switch)
|
||||
"Handle -display DISPLAY option."
|
||||
(setq x-display-name (pop x-invocation-args))
|
||||
;; Make subshell programs see the same DISPLAY value Emacs really uses.
|
||||
|
|
|
@ -164,22 +164,22 @@ created."
|
|||
;; platforms. (Bug#10783)
|
||||
|
||||
;; From src/xfns.c
|
||||
(defun x-list-fonts (pattern &optional face frame maximum width)
|
||||
(defun x-list-fonts (_pattern &optional _face _frame _maximum width)
|
||||
(if (or (null width) (and (numberp width) (= width 1)))
|
||||
(list "ms-dos")
|
||||
(list "no-such-font")))
|
||||
(defun x-display-pixel-width (&optional frame) (frame-width frame))
|
||||
(defun x-display-pixel-height (&optional frame) (frame-height frame))
|
||||
(defun x-display-planes (&optional frame) 4) ;bg switched to 16 colors as well
|
||||
(defun x-display-color-cells (&optional frame) 16)
|
||||
(defun x-server-max-request-size (&optional frame) 1000000) ; ???
|
||||
(defun x-server-vendor (&optional frame) t "GNU")
|
||||
(defun x-server-version (&optional frame) '(1 0 0))
|
||||
(defun x-display-screens (&optional frame) 1)
|
||||
(defun x-display-mm-height (&optional frame) 245) ; Guess the size of my
|
||||
(defun x-display-mm-width (&optional frame) 322) ; monitor, EZ...
|
||||
(defun x-display-backing-store (&optional frame) 'not-useful)
|
||||
(defun x-display-visual-class (&optional frame) 'static-color)
|
||||
(defun x-display-planes (&optional _frame) 4) ;bg switched to 16 colors as well
|
||||
(defun x-display-color-cells (&optional _frame) 16)
|
||||
(defun x-server-max-request-size (&optional _frame) 1000000) ; ???
|
||||
(defun x-server-vendor (&optional _frame) t "GNU")
|
||||
(defun x-server-version (&optional _frame) '(1 0 0))
|
||||
(defun x-display-screens (&optional _frame) 1)
|
||||
(defun x-display-mm-height (&optional _frame) 245) ; Guess the size of my
|
||||
(defun x-display-mm-width (&optional _frame) 322) ; monitor, EZ...
|
||||
(defun x-display-backing-store (&optional _frame) 'not-useful)
|
||||
(defun x-display-visual-class (&optional _frame) 'static-color)
|
||||
(fset 'x-display-save-under 'ignore)
|
||||
(fset 'x-get-resource 'ignore)
|
||||
|
||||
|
@ -253,7 +253,7 @@ is not used)."
|
|||
(setq x-last-selected-text text))))))
|
||||
|
||||
;; x-selection-owner-p is used in simple.el.
|
||||
(defun x-selection-owner-p (&optional selection terminal)
|
||||
(defun x-selection-owner-p (&optional _selection _terminal)
|
||||
"Whether the current Emacs process owns the given X Selection.
|
||||
The arg should be the name of the selection in question, typically one of
|
||||
the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
|
||||
|
@ -285,7 +285,7 @@ On Nextstep, TERMINAL is unused.
|
|||
|
||||
;; x-own-selection-internal and x-disown-selection-internal are used
|
||||
;; in select.el:x-set-selection.
|
||||
(defun x-own-selection-internal (selection value &optional frame)
|
||||
(defun x-own-selection-internal (_selection value &optional _frame)
|
||||
"Assert an X selection of the type SELECTION with and value VALUE.
|
||||
SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
|
||||
\(Those are literal upper-case symbol names, since that's what X expects.)
|
||||
|
@ -302,7 +302,7 @@ On Nextstep, FRAME is unused.
|
|||
(x-select-text value))
|
||||
value)
|
||||
|
||||
(defun x-disown-selection-internal (selection &optional time-object terminal)
|
||||
(defun x-disown-selection-internal (selection &optional _time-object _terminal)
|
||||
"If we own the selection SELECTION, disown it.
|
||||
Disowning it means there is no such selection.
|
||||
|
||||
|
@ -321,7 +321,8 @@ On MS-DOS, all this does is return non-nil if we own the selection.
|
|||
t))
|
||||
|
||||
;; x-get-selection-internal is used in select.el
|
||||
(defun x-get-selection-internal (selection-symbol target-type &optional time-stamp terminal)
|
||||
(defun x-get-selection-internal (_selection-symbol _target-type
|
||||
&optional _time-stamp _terminal)
|
||||
"Return text selected from some X window.
|
||||
SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
|
||||
\(Those are literal upper-case symbol names, since that's what X expects.)
|
||||
|
@ -403,7 +404,7 @@ Errors out because it is not supposed to be called, ever."
|
|||
(error "terminal-init-internal called for window-system `%s'"
|
||||
(window-system)))
|
||||
|
||||
(defun msdos-initialize-window-system (&optional display)
|
||||
(defun msdos-initialize-window-system (&optional _display)
|
||||
"Initialization function for the `pc' \"window system\"."
|
||||
(or (eq (window-system) 'pc)
|
||||
(error
|
||||
|
|
|
@ -767,7 +767,7 @@
|
|||
(yes . 8))
|
||||
"An alist of supported standard tty color modes and their aliases.")
|
||||
|
||||
(defun tty-color-alist (&optional frame)
|
||||
(defun tty-color-alist (&optional _frame)
|
||||
"Return an alist of colors supported by FRAME's terminal.
|
||||
FRAME defaults to the selected frame.
|
||||
Each element of the returned alist is of the form:
|
||||
|
@ -840,7 +840,7 @@ If FRAME is not specified or is nil, it defaults to the selected frame."
|
|||
(tty-modify-color-alist
|
||||
(append (list (tty-color-canonicalize name) index) rgb) frame))
|
||||
|
||||
(defun tty-color-clear (&optional frame)
|
||||
(defun tty-color-clear (&optional _frame)
|
||||
"Clear the list of supported tty colors for frame FRAME.
|
||||
If FRAME is unspecified or nil, it defaults to the selected frame."
|
||||
(setq tty-defined-color-alist nil))
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
(defvar x-session-id)
|
||||
(defvar x-session-previous-id)
|
||||
|
||||
(defun x-handle-no-bitmap-icon (switch)
|
||||
(defun x-handle-no-bitmap-icon (_switch)
|
||||
(setq default-frame-alist (cons '(icon-type) default-frame-alist)))
|
||||
|
||||
;; Handle the --parent-id option.
|
||||
|
|
|
@ -190,7 +190,7 @@ individually should stay local."
|
|||
(make-variable-buffer-local 'vc-mode)
|
||||
(put 'vc-mode 'permanent-local t)
|
||||
|
||||
(defun vc-mode (&optional arg)
|
||||
(defun vc-mode (&optional _arg)
|
||||
;; Dummy function for C-h m
|
||||
"Version Control minor mode.
|
||||
This minor mode is automatically activated whenever you visit a file under
|
||||
|
@ -631,7 +631,7 @@ this function."
|
|||
(define-obsolete-function-alias
|
||||
'vc-toggle-read-only 'toggle-read-only "24.1")
|
||||
|
||||
(defun vc-default-make-version-backups-p (backend file)
|
||||
(defun vc-default-make-version-backups-p (_backend _file)
|
||||
"Return non-nil if unmodified versions should be backed up locally.
|
||||
The default is to switch off this feature."
|
||||
nil)
|
||||
|
@ -834,7 +834,7 @@ current, and kill the buffer that visits the link."
|
|||
(set-buffer true-buffer)
|
||||
(kill-buffer this-buffer))))
|
||||
|
||||
(defun vc-default-find-file-hook (backend)
|
||||
(defun vc-default-find-file-hook (_backend)
|
||||
nil)
|
||||
|
||||
(defun vc-find-file-hook ()
|
||||
|
@ -1033,7 +1033,7 @@ current, and kill the buffer that visits the link."
|
|||
'((ext-menu-separator "--"))
|
||||
ext-binding))))
|
||||
|
||||
(defun vc-default-extra-menu (backend)
|
||||
(defun vc-default-extra-menu (_backend)
|
||||
nil)
|
||||
|
||||
(provide 'vc-hooks)
|
||||
|
|
|
@ -104,7 +104,7 @@ Returns nil if unable to find this information."
|
|||
(looking-at "[0-9]+\0\\([^\0\n]+\\)\0")
|
||||
(match-string 1))))))
|
||||
|
||||
(defun emacs-bzr-version-bzr (dir)
|
||||
(defun emacs-bzr-version-bzr (_dir)
|
||||
"Ask bzr itself for the version information for directory DIR."
|
||||
;; Comments on `bzr version-info':
|
||||
;; i) Unknown files also cause clean != 1.
|
||||
|
|
|
@ -685,10 +685,8 @@ symbols and values as passed to `display-buffer-in-side-window'.
|
|||
This function may be called only if no window on SIDE exists yet.
|
||||
The new window automatically becomes the \"major\" side window on
|
||||
SIDE. Return the new window, nil if its creation window failed."
|
||||
(let* ((root (frame-root-window))
|
||||
(left-or-right (memq side '(left right)))
|
||||
(let* ((left-or-right (memq side '(left right)))
|
||||
(major (window--major-side-window side))
|
||||
(selected-window (selected-window))
|
||||
(on-side (cond
|
||||
((eq side 'top) 'above)
|
||||
((eq side 'bottom) 'below)
|
||||
|
@ -698,8 +696,7 @@ SIDE. Return the new window, nil if its creation window failed."
|
|||
;; parent window unless needed.
|
||||
(window-combination-resize 'side)
|
||||
(window-combination-limit nil)
|
||||
(new (split-window major nil on-side))
|
||||
fun)
|
||||
(new (split-window major nil on-side)))
|
||||
(when new
|
||||
;; Initialize `window-side' parameter of new window to SIDE.
|
||||
(set-window-parameter new 'window-side side)
|
||||
|
@ -749,8 +746,7 @@ following symbols can be used:
|
|||
A positive value means use a slot following (that is, below or
|
||||
on the right of) the middle slot. The default is zero."
|
||||
(let ((side (or (cdr (assq 'side alist)) 'bottom))
|
||||
(slot (or (cdr (assq 'slot alist)) 0))
|
||||
new)
|
||||
(slot (or (cdr (assq 'slot alist)) 0)))
|
||||
(cond
|
||||
((not (memq side '(top bottom left right)))
|
||||
(error "Invalid side %s specified" side))
|
||||
|
@ -776,9 +772,8 @@ following symbols can be used:
|
|||
((eq side 'right) 2)
|
||||
((eq side 'bottom) 3))
|
||||
window-sides-slots))
|
||||
(selected-window (selected-window))
|
||||
window this-window this-slot prev-window next-window
|
||||
best-window best-slot abs-slot new-window)
|
||||
best-window best-slot abs-slot)
|
||||
|
||||
(cond
|
||||
((and (numberp max-slots) (<= max-slots 0))
|
||||
|
@ -5730,7 +5725,7 @@ above, even if that window never showed BUFFER before."
|
|||
0)
|
||||
(display-buffer-reuse-frames 0)
|
||||
(t (last-nonminibuffer-frame))))
|
||||
entry best-window second-best-window window)
|
||||
best-window second-best-window window)
|
||||
;; Scan windows whether they have shown the buffer recently.
|
||||
(catch 'best
|
||||
(dolist (window (window-list-1 (frame-first-window) 'nomini frames))
|
||||
|
|
Loading…
Add table
Reference in a new issue