emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103821: Convert some .el files to le


From: Juanma Barranquero
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103821: Convert some .el files to lexical scoping.
Date: Mon, 04 Apr 2011 11:35:16 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103821
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Mon 2011-04-04 11:35:16 +0200
message:
  Convert some .el files to lexical scoping.
  
  * bs.el (bs-refresh, bs-sort-buffer-interns-are-last)
    (bs--get-marked-string, bs--get-modified-string)
    (bs--get-readonly-string, bs--get-size-string, bs--get-name)
    (bs--get-mode-name, bs--get-file-name): Mark unused arguments.
    (bs--configuration-name-for-prefix-arg): Rename argument PREFIX-ARG.
  
  * ehelp.el (electric-help-execute-extended)
    (electric-help-ctrl-x-prefix):
  * hexl.el (hexl-revert-buffer-function):
  * linum.el (linum-after-change, linum-after-scroll):
  * emacs-lisp/re-builder.el (reb-auto-update): Mark unused arguments.
  
  * help-fns.el (help-describe-category-set): Remove unused ERR variable.
modified:
  lisp/ChangeLog
  lisp/bs.el
  lisp/ehelp.el
  lisp/emacs-lisp/re-builder.el
  lisp/help-fns.el
  lisp/hexl.el
  lisp/linum.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-04-04 06:16:23 +0000
+++ b/lisp/ChangeLog    2011-04-04 09:35:16 +0000
@@ -1,3 +1,21 @@
+2011-04-04  Juanma Barranquero  <address@hidden>
+
+       Convert to lexical-binding.
+
+       * bs.el (bs-refresh, bs-sort-buffer-interns-are-last)
+       (bs--get-marked-string, bs--get-modified-string)
+       (bs--get-readonly-string, bs--get-size-string, bs--get-name)
+       (bs--get-mode-name, bs--get-file-name): Mark unused arguments.
+       (bs--configuration-name-for-prefix-arg): Rename argument PREFIX-ARG.
+
+       * ehelp.el (electric-help-execute-extended)
+       (electric-help-ctrl-x-prefix):
+       * hexl.el (hexl-revert-buffer-function):
+       * linum.el (linum-after-change, linum-after-scroll):
+       * emacs-lisp/re-builder.el (reb-auto-update): Mark unused arguments.
+
+       * help-fns.el (help-describe-category-set): Remove unused ERR variable.
+
 2011-04-04  Daiki Ueno  <address@hidden>
 
        * epa-dired.el:
@@ -262,7 +280,7 @@
 2011-03-31  Tassilo Horn  <address@hidden>
 
        * net/rcirc.el (rcirc-handler-001): Only authenticate, if there's
-       an entry for that server in rcirc-authinfo. (Bug#8385)
+       an entry for that server in rcirc-authinfo.  (Bug#8385)
 
 2011-03-31  Glenn Morris  <address@hidden>
 

=== modified file 'lisp/bs.el'
--- a/lisp/bs.el        2011-02-12 22:23:06 +0000
+++ b/lisp/bs.el        2011-04-04 09:35:16 +0000
@@ -1,4 +1,4 @@
-;;; bs.el --- menu for selecting and displaying buffers
+;;; bs.el --- menu for selecting and displaying buffers -*- lexical-binding: t 
-*-
 
 ;; Copyright (C) 1998-2011  Free Software Foundation, Inc.
 ;; Author: Olaf Sylvester <address@hidden>
@@ -693,7 +693,7 @@
   (call-interactively 'bs-set-configuration)
   (bs--redisplay t))
 
-(defun bs-refresh (&rest ignored)
+(defun bs-refresh (&rest _ignored)
   "Refresh whole Buffer Selection Menu.
 Arguments are IGNORED (for `revert-buffer')."
   (interactive)
@@ -1017,7 +1017,7 @@
 A value of nil means BUFFER belongs to a file."
   (not (buffer-file-name buffer)))
 
-(defun bs-sort-buffer-interns-are-last (b1 b2)
+(defun bs-sort-buffer-interns-are-last (_b1 b2)
   "Function for sorting internal buffers at the end of all buffers."
   (string-match-p "^\\*" (buffer-name b2)))
 
@@ -1262,7 +1262,7 @@
         fun)
        (t (apply fun args))))
 
-(defun bs--get-marked-string (start-buffer all-buffers)
+(defun bs--get-marked-string (start-buffer _all-buffers)
   "Return a string which describes whether current buffer is marked.
 START-BUFFER is the buffer where we started buffer selection.
 ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu.
@@ -1287,25 +1287,25 @@
    (t
     bs-string-show-always)))
 
-(defun bs--get-modified-string (start-buffer all-buffers)
+(defun bs--get-modified-string (_start-buffer _all-buffers)
   "Return a string which describes whether current buffer is modified.
 START-BUFFER is the buffer where we started buffer selection.
 ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
   (if (buffer-modified-p) "*" " "))
 
-(defun bs--get-readonly-string (start-buffer all-buffers)
+(defun bs--get-readonly-string (_start-buffer _all-buffers)
   "Return a string which describes whether current buffer is read only.
 START-BUFFER is the buffer where we started buffer selection.
 ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
   (if buffer-read-only "%" " "))
 
-(defun bs--get-size-string (start-buffer all-buffers)
+(defun bs--get-size-string (_start-buffer _all-buffers)
   "Return a string which describes the size of current buffer.
 START-BUFFER is the buffer where we started buffer selection.
 ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
   (int-to-string (buffer-size)))
 
-(defun bs--get-name (start-buffer all-buffers)
+(defun bs--get-name (_start-buffer _all-buffers)
   "Return name of current buffer for Buffer Selection Menu.
 The name of current buffer gets additional text properties
 for mouse highlighting.
@@ -1315,13 +1315,13 @@
               'help-echo "mouse-2: select this buffer, mouse-3: select in 
other frame"
               'mouse-face 'highlight))
 
-(defun bs--get-mode-name (start-buffer all-buffers)
+(defun bs--get-mode-name (start-buffer _all-buffers)
   "Return the name of mode of current buffer for Buffer Selection Menu.
 START-BUFFER is the buffer where we started buffer selection.
 ALL-BUFFERS is the list of buffers appearing in Buffer Selection Menu."
   (format-mode-line mode-name nil nil start-buffer))
 
-(defun bs--get-file-name (start-buffer all-buffers)
+(defun bs--get-file-name (_start-buffer _all-buffers)
   "Return string for column 'File' in Buffer Selection Menu.
 This is the variable `buffer-file-name' of current buffer.
 If not visiting a file, `list-buffers-directory' is returned instead.
@@ -1420,18 +1420,18 @@
       (bs-show-in-buffer liste)
       (bs-message-without-log "%s" (bs--current-config-message)))))
 
-(defun bs--configuration-name-for-prefix-arg (prefix-arg)
-  "Convert prefix argument PREFIX-ARG to a name of a buffer configuration.
-If PREFIX-ARG is nil return `bs-default-configuration'.
-If PREFIX-ARG is an integer return PREFIX-ARG element of `bs-configurations'.
+(defun bs--configuration-name-for-prefix-arg (prefix)
+  "Convert prefix argument PREFIX to a name of a buffer configuration.
+If PREFIX is nil return `bs-default-configuration'.
+If PREFIX is an integer return PREFIX element of `bs-configurations'.
 Otherwise return `bs-alternative-configuration'."
   (cond ;; usually activation
-   ((null prefix-arg)
+   ((null prefix)
     bs-default-configuration)
    ;; call with integer as prefix argument
-   ((integerp prefix-arg)
-    (if (and (< 0 prefix-arg) (<= prefix-arg (length bs-configurations)))
-       (car (nth (1- prefix-arg) bs-configurations))
+   ((integerp prefix)
+    (if (and (< 0 prefix) (<= prefix (length bs-configurations)))
+       (car (nth (1- prefix) bs-configurations))
       bs-default-configuration))
    ;; call by prefix argument C-u
    (t bs-alternative-configuration)))

=== modified file 'lisp/ehelp.el'
--- a/lisp/ehelp.el     2011-01-25 04:08:28 +0000
+++ b/lisp/ehelp.el     2011-04-04 09:35:16 +0000
@@ -1,4 +1,4 @@
-;;; ehelp.el --- bindings for electric-help mode
+;;; ehelp.el --- bindings for electric-help mode -*- lexical-binding: t -*-
 
 ;; Copyright (C) 1986, 1995, 2000-2011  Free Software Foundation, Inc.
 
@@ -347,14 +347,14 @@
 
 ;; This is to be bound to M-x in ehelp mode. Retains ehelp buffer and then
 ;; continues with execute-extended-command.
-(defun electric-help-execute-extended (prefixarg)
+(defun electric-help-execute-extended (_prefixarg)
   (interactive "p")
   (setq electric-help-form-to-execute '(execute-extended-command nil))
   (electric-help-retain))
 
 ;; This is to be buond to C-x in ehelp mode. Retains ehelp buffer and then
 ;; continues with ctrl-x prefix.
-(defun electric-help-ctrl-x-prefix (prefixarg)
+(defun electric-help-ctrl-x-prefix (_prefixarg)
   (interactive "p")
   (setq electric-help-form-to-execute '(progn (message nil) (setq 
unread-command-char ?\C-x)))
   (electric-help-retain))

=== modified file 'lisp/emacs-lisp/re-builder.el'
--- a/lisp/emacs-lisp/re-builder.el     2011-02-10 16:56:00 +0000
+++ b/lisp/emacs-lisp/re-builder.el     2011-04-04 09:35:16 +0000
@@ -1,4 +1,4 @@
-;;; re-builder.el --- building Regexps with visual feedback
+;;; re-builder.el --- building Regexps with visual feedback -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
 
@@ -506,7 +506,7 @@
   (reb-update-regexp)
   (reb-update-overlays subexp))
 
-(defun reb-auto-update (beg end lenold &optional force)
+(defun reb-auto-update (_beg _end _lenold &optional force)
   "Called from `after-update-functions' to update the display.
 BEG, END and LENOLD are passed in from the hook.
 An actual update is only done if the regexp has changed or if the

=== modified file 'lisp/help-fns.el'
--- a/lisp/help-fns.el  2011-03-21 16:42:16 +0000
+++ b/lisp/help-fns.el  2011-04-04 09:35:16 +0000
@@ -1,4 +1,4 @@
-;;; help-fns.el --- Complex help functions
+;;; help-fns.el --- Complex help functions -*- lexical-binding: t -*-
 
 ;; Copyright (C) 1985-1986, 1993-1994, 1998-2011
 ;;   Free Software Foundation, Inc.
@@ -879,7 +879,7 @@
   (insert (cond
           ((null value) "default")
           ((char-table-p value) "deeper char-table ...")
-          (t (condition-case err
+          (t (condition-case nil
                  (category-set-mnemonics value)
                (error "invalid"))))))
 

=== modified file 'lisp/hexl.el'
--- a/lisp/hexl.el      2011-01-25 04:08:28 +0000
+++ b/lisp/hexl.el      2011-04-04 09:35:16 +0000
@@ -1,4 +1,4 @@
-;;; hexl.el --- edit a file in a hex dump format using the hexl filter
+;;; hexl.el --- edit a file in a hex dump format using the hexl filter -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 1989, 1994, 1998, 2001-2011 Free Software Foundation, Inc.
 
@@ -355,7 +355,7 @@
 
     (hexl-mode--setq-local 'require-final-newline nil)
 
-    
+
     (hexl-mode--setq-local 'font-lock-defaults '(hexl-font-lock-keywords t))
 
     (hexl-mode--setq-local 'revert-buffer-function
@@ -437,7 +437,7 @@
   (if (not (eq major-mode 'hexl-mode))
       (hexl-mode)))
 
-(defun hexl-revert-buffer-function (ignore-auto noconfirm)
+(defun hexl-revert-buffer-function (_ignore-auto _noconfirm)
   (let ((coding-system-for-read 'no-conversion)
        revert-buffer-function)
     ;; Call the original `revert-buffer' without code conversion; also
@@ -492,7 +492,7 @@
     ;; since some of them may affect the minor modes.
     (dolist (mm mms)
       (funcall (car mm) (if (cdr mm) 1 -1))))
-  
+
   (force-mode-line-update))
 
 (defun hexl-maybe-dehexlify-buffer ()

=== modified file 'lisp/linum.el'
--- a/lisp/linum.el     2011-01-25 04:08:28 +0000
+++ b/lisp/linum.el     2011-04-04 09:35:16 +0000
@@ -1,4 +1,4 @@
-;;; linum.el --- display line numbers in the left margin
+;;; linum.el --- display line numbers in the left margin -*- lexical-binding: 
t -*-
 
 ;; Copyright (C) 2008-2011 Free Software Foundation, Inc.
 
@@ -174,14 +174,14 @@
       (setq line (1+ line)))
     (set-window-margins win width (cdr (window-margins win)))))
 
-(defun linum-after-change (beg end len)
+(defun linum-after-change (beg end _len)
   ;; update overlays on deletions, and after newlines are inserted
   (when (or (= beg end)
             (= end (point-max))
             (string-match-p "\n" (buffer-substring-no-properties beg end)))
     (linum-update-current)))
 
-(defun linum-after-scroll (win start)
+(defun linum-after-scroll (win _start)
   (linum-update (window-buffer win)))
 
 ;; (defun linum-after-size (frame)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]