aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-11-09 20:30:21 -0800
committerGlenn Morris2010-11-09 20:30:21 -0800
commitb565f5a1b987f01c2eb57437a30adc4904e80df5 (patch)
tree150b565b41569fd30df62d6e0a7b45dd64473ca2
parent6e4049508fd91343eb5f8e556e905adca2a3fde7 (diff)
downloademacs-b565f5a1b987f01c2eb57437a30adc4904e80df5.tar.gz
emacs-b565f5a1b987f01c2eb57437a30adc4904e80df5.zip
Silence skeleton.el compilation.
* lisp/skeleton.el (skeleton-internal-list, skeleton-internal-1): Prefix dynamic local variable `skeleton'.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/skeleton.el33
2 files changed, 20 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2560b7be083..fea67a36719 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -53,6 +53,9 @@
53 * eshell/em-glob.el (eshell-extended-glob, eshell-glob-entries): 53 * eshell/em-glob.el (eshell-extended-glob, eshell-glob-entries):
54 Prefix dynamic local variable `matches'. 54 Prefix dynamic local variable `matches'.
55 55
56 * skeleton.el (skeleton-internal-list, skeleton-internal-1):
57 Prefix dynamic local variable `skeleton'.
58
562010-11-10 Katsumi Yamaoka <yamaoka@jpl.org> 592010-11-10 Katsumi Yamaoka <yamaoka@jpl.org>
57 60
58 * net/browse-url.el (browse-url-mail): Insert body part of mailto url 61 * net/browse-url.el (browse-url-mail): Insert body part of mailto url
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 1888b41c806..c98e06fe76f 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -108,7 +108,7 @@ The list describes the most recent skeleton insertion, and its elements
108are integer buffer positions in the reverse order of the insertion order.") 108are integer buffer positions in the reverse order of the insertion order.")
109 109
110;; reduce the number of compiler warnings 110;; reduce the number of compiler warnings
111(defvar skeleton) 111(defvar skeleton-il)
112(defvar skeleton-modified) 112(defvar skeleton-modified)
113(defvar skeleton-point) 113(defvar skeleton-point)
114(defvar skeleton-regions) 114(defvar skeleton-regions)
@@ -317,25 +317,26 @@ automatically, and you are prompted to fill in the variable parts.")))
317 (signal 'quit t) 317 (signal 'quit t)
318 prompt)) 318 prompt))
319 319
320(defun skeleton-internal-list (skeleton &optional str recursive) 320(defun skeleton-internal-list (skeleton-il &optional str recursive)
321 (let* ((start (line-beginning-position)) 321 (let* ((start (line-beginning-position))
322 (column (current-column)) 322 (column (current-column))
323 (line (buffer-substring start (line-end-position))) 323 (line (buffer-substring start (line-end-position)))
324 opoint) 324 opoint)
325 (or str 325 (or str
326 (setq str `(setq str (skeleton-read ',(car skeleton) nil ,recursive)))) 326 (setq str `(setq str
327 (when (and (eq (cadr skeleton) '\n) (not recursive) 327 (skeleton-read ',(car skeleton-il) nil ,recursive))))
328 (when (and (eq (cadr skeleton-il) '\n) (not recursive)
328 (save-excursion (skip-chars-backward " \t") (bolp))) 329 (save-excursion (skip-chars-backward " \t") (bolp)))
329 (setq skeleton (cons nil (cons '> (cddr skeleton))))) 330 (setq skeleton-il (cons nil (cons '> (cddr skeleton-il)))))
330 (while (setq skeleton-modified (eq opoint (point)) 331 (while (setq skeleton-modified (eq opoint (point))
331 opoint (point) 332 opoint (point)
332 skeleton (cdr skeleton)) 333 skeleton-il (cdr skeleton-il))
333 (condition-case quit 334 (condition-case quit
334 (skeleton-internal-1 (car skeleton) nil recursive) 335 (skeleton-internal-1 (car skeleton-il) nil recursive)
335 (quit 336 (quit
336 (if (eq (cdr quit) 'recursive) 337 (if (eq (cdr quit) 'recursive)
337 (setq recursive 'quit 338 (setq recursive 'quit
338 skeleton (memq 'resume: skeleton)) 339 skeleton-il (memq 'resume: skeleton-il))
339 ;; Remove the subskeleton as far as it has been shown 340 ;; Remove the subskeleton as far as it has been shown
340 ;; the subskeleton shouldn't have deleted outside current line. 341 ;; the subskeleton shouldn't have deleted outside current line.
341 (end-of-line) 342 (end-of-line)
@@ -343,7 +344,7 @@ automatically, and you are prompted to fill in the variable parts.")))
343 (insert line) 344 (insert line)
344 (move-to-column column) 345 (move-to-column column)
345 (if (cdr quit) 346 (if (cdr quit)
346 (setq skeleton () 347 (setq skeleton-il ()
347 recursive nil) 348 recursive nil)
348 (signal 'quit 'recursive))))))) 349 (signal 'quit 'recursive)))))))
349 ;; maybe continue loop or go on to next outer resume: section 350 ;; maybe continue loop or go on to next outer resume: section
@@ -365,16 +366,16 @@ automatically, and you are prompted to fill in the variable parts.")))
365 ((or (eq element '\n) ; actually (eq '\n 'n) 366 ((or (eq element '\n) ; actually (eq '\n 'n)
366 ;; The sequence `> \n' is handled specially so as to indent the first 367 ;; The sequence `> \n' is handled specially so as to indent the first
367 ;; line after inserting the newline (to get the proper indentation). 368 ;; line after inserting the newline (to get the proper indentation).
368 (and (eq element '>) (eq (nth 1 skeleton) '\n) (pop skeleton))) 369 (and (eq element '>) (eq (nth 1 skeleton-il) '\n) (pop skeleton-il)))
369 (let ((pos (if (eq element '>) (point)))) 370 (let ((pos (if (eq element '>) (point))))
370 (cond 371 (cond
371 ((and skeleton-regions (eq (nth 1 skeleton) '_)) 372 ((and skeleton-regions (eq (nth 1 skeleton-il) '_))
372 (or (eolp) (newline)) 373 (or (eolp) (newline))
373 (if pos (save-excursion (goto-char pos) (indent-according-to-mode))) 374 (if pos (save-excursion (goto-char pos) (indent-according-to-mode)))
374 (indent-region (line-beginning-position) 375 (indent-region (line-beginning-position)
375 (car skeleton-regions) nil)) 376 (car skeleton-regions) nil))
376 ;; \n as last element only inserts \n if not at eol. 377 ;; \n as last element only inserts \n if not at eol.
377 ((and (null (cdr skeleton)) (not recursive) (eolp)) 378 ((and (null (cdr skeleton-il)) (not recursive) (eolp))
378 (if pos (indent-according-to-mode))) 379 (if pos (indent-according-to-mode)))
379 (skeleton-newline-indent-rigidly 380 (skeleton-newline-indent-rigidly
380 (let ((pt (point))) 381 (let ((pt (point)))
@@ -387,7 +388,7 @@ automatically, and you are prompted to fill in the variable parts.")))
387 (newline) 388 (newline)
388 (indent-according-to-mode)))))) 389 (indent-according-to-mode))))))
389 ((eq element '>) 390 ((eq element '>)
390 (if (and skeleton-regions (eq (nth 1 skeleton) '_)) 391 (if (and skeleton-regions (eq (nth 1 skeleton-il) '_))
391 (indent-region (line-beginning-position) 392 (indent-region (line-beginning-position)
392 (car skeleton-regions) nil) 393 (car skeleton-regions) nil)
393 (indent-according-to-mode))) 394 (indent-according-to-mode)))
@@ -396,16 +397,16 @@ automatically, and you are prompted to fill in the variable parts.")))
396 (progn 397 (progn
397 (goto-char (pop skeleton-regions)) 398 (goto-char (pop skeleton-regions))
398 (and (<= (current-column) (current-indentation)) 399 (and (<= (current-column) (current-indentation))
399 (eq (nth 1 skeleton) '\n) 400 (eq (nth 1 skeleton-il) '\n)
400 (end-of-line 0))) 401 (end-of-line 0)))
401 (or skeleton-point 402 (or skeleton-point
402 (setq skeleton-point (point))))) 403 (setq skeleton-point (point)))))
403 ((eq element '-) 404 ((eq element '-)
404 (setq skeleton-point (point))) 405 (setq skeleton-point (point)))
405 ((eq element '&) 406 ((eq element '&)
406 (when skeleton-modified (pop skeleton))) 407 (when skeleton-modified (pop skeleton-il)))
407 ((eq element '|) 408 ((eq element '|)
408 (unless skeleton-modified (pop skeleton))) 409 (unless skeleton-modified (pop skeleton-il)))
409 ((eq element '@) 410 ((eq element '@)
410 (push (point) skeleton-positions)) 411 (push (point) skeleton-positions))
411 ((eq 'quote (car-safe element)) 412 ((eq 'quote (car-safe element))