emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r113790: lisp/*.el: Remove lexical-binding warnings;


From: Juanma Barranquero
Subject: [Emacs-diffs] trunk r113790: lisp/*.el: Remove lexical-binding warnings; additional small cleanups.
Date: Sat, 10 Aug 2013 15:17:48 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113790
revision-id: address@hidden
parent: address@hidden
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Sat 2013-08-10 17:17:29 +0200
message:
  lisp/*.el: Remove lexical-binding warnings; additional small cleanups.
  
  * calculator.el (calculator): Mark unused argument.
    (calculator-paste, calculator-quit, calculator-integer-p):
    Use ignore-errors.
    (calculator-string-to-number, calculator-decimal, calculator-exp)
    (calculator-op-or-exp): Use string-match-p.
  
  * dired-aux.el (dired-compress): Use ignore-errors.
    (dired-do-chxxx, dired-do-chmod, dired-trample-file-versions)
    (dired-do-async-shell-command, dired-do-shell-command)
    (dired-shell-stuff-it, dired-compress-file, dired-insert-subdir)
    (dired-insert-subdir-validate): Use string-match-p.
    (dired-map-dired-file-lines, dired-subdir-hidden-p): Use looking-at-p.
    (dired-add-entry): Use string-match-p, looking-at-p.
    (dired-insert-subdir-newpos): Remove unused local variable.
  
  * dired.el (dired-buffer-more-recently-used-p): Declare.
    (dired-insert-set-properties, dired-insert-old-subdirs):
    Use ignore-errors.
  
  * filenotify.el (file-notify-callback): Remove unused local variable.
  
  * filesets.el (filesets-error): Mark unused argument.
    (filesets-which-command-p, filesets-filter-dir-names)
    (filesets-directory-files, filesets-get-external-viewer)
    (filesets-ingroup-get-data): Use string-match-p.
  
  * find-file.el (ff-other-file-name, ff-other-file-name)
    (ff-find-the-other-file, ff-cc-hh-converter):
    Remove unused local variables.
    (ff-get-file-name): Use string-match-p.
    (ff-all-dirs-under): Use ignore-errors.
  
  * follow.el (follow-comint-scroll-to-bottom): Mark unused argument.
    (follow-select-if-visible): Remove unused local variable.
  
  * forms.el (read-file-filter): Move declaration.
    (forms--make-format, forms--make-parser, forms-insert-record):
    Quote function with #'.
    (forms--update): Use string-match-p.  Quote function with #'.
  
  * help-mode.el (help-dir-local-var-def): Mark unused argument.
    (help-make-xrefs): Use looking-at-p.
    (help-xref-on-pp): Use looking-at-p, ignore-errors.
  
  * ibuffer.el (ibuffer-ext-visible-p): Declare.
    (ibuffer-confirm-operation-on): Use string-match-p.
  
  * msb.el (msb-item-handler, msb-dired-item-handler):
    Mark unused arguments.
  
  * ses.el (ses-decode-cell-symbol)
    (ses-kill-override): Remove unused local variable.
    (ses-create-cell-variable, ses-relocate-formula): Use string-match-p.
    (ses-load): Use ignore-errors, looking-at-p.
    (ses-jump-safe): Use ignore-errors.
    (ses-export-tsv, ses-export-tsf, ses-unsafe): Mark unused arguments.
  
  * tabify.el (untabify, tabify): Mark unused arguments.
  
    * thingatpt.el (thing-at-point--bounds-of-well-formed-url):
    Mark unused argument.
    (bounds-of-thing-at-point, thing-at-point-bounds-of-list-at-point)
    (thing-at-point-newsgroup-p, form-at-point): Use ignore-errors.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/calculator.el             
calculator.el-20091113204419-o5vbwnq5f7feedwu-1770
  lisp/dired-aux.el              diredaux.el-20091113204419-o5vbwnq5f7feedwu-484
  lisp/dired.el                  dired.el-20091113204419-o5vbwnq5f7feedwu-482
  lisp/filenotify.el             filenotify.el-20130625113410-31so8z8hgotqv5s4-1
  lisp/filesets.el               
filesets.el-20091113204419-o5vbwnq5f7feedwu-2414
  lisp/find-file.el              findfile.el-20091113204419-o5vbwnq5f7feedwu-825
  lisp/follow.el                 follow.el-20091113204419-o5vbwnq5f7feedwu-966
  lisp/forms.el                  forms.el-20091113204419-o5vbwnq5f7feedwu-239
  lisp/help-mode.el              
helpmode.el-20091113204419-o5vbwnq5f7feedwu-2249
  lisp/ibuffer.el                ibuffer.el-20091113204419-o5vbwnq5f7feedwu-2374
  lisp/msb.el                    msb.el-20091113204419-o5vbwnq5f7feedwu-821
  lisp/ses.el                    ses.el-20091113204419-o5vbwnq5f7feedwu-2447
  lisp/tabify.el                 tabify.el-20091113204419-o5vbwnq5f7feedwu-84
  lisp/thingatpt.el              
thingatpt.el-20091113204419-o5vbwnq5f7feedwu-637
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-08-10 12:30:38 +0000
+++ b/lisp/ChangeLog    2013-08-10 15:17:29 +0000
@@ -1,5 +1,69 @@
 2013-08-10  Juanma Barranquero  <address@hidden>
 
+       * calculator.el (calculator): Mark unused argument.
+       (calculator-paste, calculator-quit, calculator-integer-p):
+       Use ignore-errors.
+       (calculator-string-to-number, calculator-decimal, calculator-exp)
+       (calculator-op-or-exp): Use string-match-p.
+
+       * dired.el (dired-buffer-more-recently-used-p): Declare.
+       (dired-insert-set-properties, dired-insert-old-subdirs):
+       Use ignore-errors.
+
+       * dired-aux.el (dired-compress): Use ignore-errors.
+       (dired-do-chxxx, dired-do-chmod, dired-trample-file-versions)
+       (dired-do-async-shell-command, dired-do-shell-command)
+       (dired-shell-stuff-it, dired-compress-file, dired-insert-subdir)
+       (dired-insert-subdir-validate): Use string-match-p.
+       (dired-map-dired-file-lines, dired-subdir-hidden-p): Use looking-at-p.
+       (dired-add-entry): Use string-match-p, looking-at-p.
+       (dired-insert-subdir-newpos): Remove unused local variable.
+
+       * filenotify.el (file-notify-callback): Remove unused local variable.
+
+       * filesets.el (filesets-error): Mark unused argument.
+       (filesets-which-command-p, filesets-filter-dir-names)
+       (filesets-directory-files, filesets-get-external-viewer)
+       (filesets-ingroup-get-data): Use string-match-p.
+
+       * find-file.el (ff-other-file-name, ff-other-file-name)
+       (ff-find-the-other-file, ff-cc-hh-converter):
+       Remove unused local variables.
+       (ff-get-file-name): Use string-match-p.
+       (ff-all-dirs-under): Use ignore-errors.
+
+       * follow.el (follow-comint-scroll-to-bottom): Mark unused argument.
+       (follow-select-if-visible): Remove unused local variable.
+
+       * forms.el (read-file-filter): Move declaration.
+       (forms--make-format, forms--make-parser, forms-insert-record):
+       Quote function with #'.
+       (forms--update): Use string-match-p.  Quote function with #'.
+
+       * help-mode.el (help-dir-local-var-def): Mark unused argument.
+       (help-make-xrefs): Use looking-at-p.
+       (help-xref-on-pp): Use looking-at-p, ignore-errors.
+
+       * ibuffer.el (ibuffer-ext-visible-p): Declare.
+       (ibuffer-confirm-operation-on): Use string-match-p.
+
+       * msb.el (msb-item-handler, msb-dired-item-handler):
+       Mark unused arguments.
+
+       * ses.el (ses-decode-cell-symbol)
+       (ses-kill-override): Remove unused local variable.
+       (ses-create-cell-variable, ses-relocate-formula): Use string-match-p.
+       (ses-load): Use ignore-errors, looking-at-p.
+       (ses-jump-safe): Use ignore-errors.
+       (ses-export-tsv, ses-export-tsf, ses-unsafe): Mark unused arguments.
+
+       * tabify.el (untabify, tabify): Mark unused arguments.
+
+       * thingatpt.el (thing-at-point--bounds-of-well-formed-url):
+       Mark unused argument.
+       (bounds-of-thing-at-point, thing-at-point-bounds-of-list-at-point)
+       (thing-at-point-newsgroup-p, form-at-point): Use ignore-errors.
+
        * emacs-lisp/timer.el (timer--time): Define setter with
        gv-define-setter to avoid deprecation warning.
 

=== modified file 'lisp/calculator.el'
--- a/lisp/calculator.el        2013-05-21 07:25:14 +0000
+++ b/lisp/calculator.el        2013-08-10 15:17:29 +0000
@@ -708,7 +708,7 @@
                ;; can't use 'noprompt, bug in electric.el
                (lambda () 'noprompt)
                nil
-               (lambda (x y) (calculator-update-display))))
+               (lambda (_x _y) (calculator-update-display))))
           (and calculator-buffer
                (catch 'calculator-done (calculator-quit)))
           (use-local-map old-l-map)
@@ -905,9 +905,9 @@
       value)
     (car (read-from-string
           (cond ((equal "." str) "0.0")
-                ((string-match "[eE][+-]?$" str) (concat str "0"))
-                ((string-match "\\.[0-9]\\|[eE]" str) str)
-                ((string-match "\\." str)
+                ((string-match-p "[eE][+-]?$" str) (concat str "0"))
+                ((string-match-p "\\.[0-9]\\|[eE]" str) str)
+                ((string-match-p "\\." str)
                  ;; do this because Emacs reads "23." as an integer
                  (concat str "0"))
                 ((stringp str) (concat str ".0"))
@@ -1366,7 +1366,7 @@
            (or calculator-display-fragile
                (not (numberp (car calculator-stack))))
            (not (and calculator-curnum
-                     (string-match "[.eE]" calculator-curnum))))
+                     (string-match-p "[.eE]" calculator-curnum))))
     ;; enter the period on the same condition as a digit, only if no
     ;; period or exponent entered yet
     (progn
@@ -1382,7 +1382,7 @@
     (if (and (or calculator-display-fragile
                  (not (numberp (car calculator-stack))))
              (not (and calculator-curnum
-                       (string-match "[eE]" calculator-curnum))))
+                       (string-match-p "[eE]" calculator-curnum))))
       ;; same condition as above, also no E so far
       (progn
         (calculator-clear-fragile)
@@ -1452,7 +1452,7 @@
   (interactive)
   (if (and (not calculator-display-fragile)
            calculator-curnum
-           (string-match "[eE]$" calculator-curnum))
+           (string-match-p "[eE]$" calculator-curnum))
     (calculator-digit)
     (calculator-op)))
 
@@ -1661,8 +1661,7 @@
           (setq str (concat (or (match-string 1 str) "0")
                             (or (match-string 2 str) ".0")
                             (or (match-string 3 str) ""))))
-     (condition-case nil (calculator-string-to-number str)
-       (error nil)))))
+     (ignore-errors (calculator-string-to-number str)))))
 
 (defun calculator-get-register (reg)
   "Get a value from a register REG."
@@ -1728,13 +1727,11 @@
   (interactive)
   (set-buffer calculator-buffer)
   (let ((inhibit-read-only t)) (erase-buffer))
-  (if (not calculator-electric-mode)
-    (progn
-      (condition-case nil
-          (while (get-buffer-window calculator-buffer)
-            (delete-window (get-buffer-window calculator-buffer)))
-        (error nil))
-      (kill-buffer calculator-buffer)))
+  (unless calculator-electric-mode
+    (ignore-errors
+      (while (get-buffer-window calculator-buffer)
+       (delete-window (get-buffer-window calculator-buffer))))
+    (kill-buffer calculator-buffer))
   (setq calculator-buffer nil)
   (message "Calculator done.")
   (if calculator-electric-mode (throw 'calculator-done nil)))
@@ -1768,14 +1765,11 @@
 
 (defun calculator-integer-p (x)
   "Non-nil if X is equal to an integer."
-  (condition-case nil
-      (= x (ftruncate x))
-    (error nil)))
+  (ignore-errors (= x (ftruncate x))))
 
 (defun calculator-expt (x y)
   "Compute X^Y, dealing with errors appropriately."
-  (condition-case
-      nil
+  (condition-case nil
       (expt x y)
     (domain-error 0.0e+NaN)
     (range-error

=== modified file 'lisp/dired-aux.el'
--- a/lisp/dired-aux.el 2013-08-05 18:05:46 +0000
+++ b/lisp/dired-aux.el 2013-08-10 15:17:29 +0000
@@ -286,7 +286,7 @@
                                (if (eq op-symbol 'touch)
                                    (list "-t" new-attribute)
                                  (list new-attribute)))
-                             (if (string-match "gnu" system-configuration)
+                             (if (string-match-p "gnu" system-configuration)
                                  '("--") nil))
                             files))
     (dired-do-redisplay arg);; moves point if ARG is an integer
@@ -327,7 +327,7 @@
           ;; We used to treat empty input as DEFAULT, but that is not
           ;; such a good idea (Bug#9361).
           (error "No file mode specified"))
-         ((string-match "^[0-7]+" modes)
+         ((string-match-p "^[0-7]+" modes)
           (setq num-modes (string-to-number modes 8))))
 
     (dolist (file files)
@@ -500,7 +500,7 @@
       (goto-char (point-min))
       (while (not (eobp))
        (save-excursion
-         (and (not (looking-at dired-re-dir))
+         (and (not (looking-at-p dired-re-dir))
               (not (eolp))
               (setq file (dired-get-filename nil t)) ; nil on non-file
               (progn (end-of-line)
@@ -530,7 +530,7 @@
                        dired-file-version-alist)))))))
 
 (defun dired-trample-file-versions (fn)
-  (let* ((start-vn (string-match "\\.~[0-9]+~$" fn))
+  (let* ((start-vn (string-match-p "\\.~[0-9]+~$" fn))
         base-version-list)
     (and start-vn
         (setq base-version-list        ; there was a base version to which
@@ -602,7 +602,7 @@
       (dired-read-shell-command "& on %s: " current-prefix-arg files)
       current-prefix-arg
       files)))
-  (unless (string-match "&[ \t]*\\'" command)
+  (unless (string-match-p "&[ \t]*\\'" command)
     (setq command (concat command " &")))
   (dired-do-shell-command command arg file-list))
 
@@ -663,10 +663,10 @@
       (dired-read-shell-command "! on %s: " current-prefix-arg files)
       current-prefix-arg
       files)))
-  (let* ((on-each (not (string-match dired-star-subst-regexp command)))
-        (no-subst (not (string-match dired-quark-subst-regexp command)))
-        (star (string-match "\\*" command))
-        (qmark (string-match "\\?" command)))
+  (let* ((on-each (not (string-match-p dired-star-subst-regexp command)))
+        (no-subst (not (string-match-p dired-quark-subst-regexp command)))
+        (star (string-match-p "\\*" command))
+        (qmark (string-match-p "\\?" command)))
     ;; Get confirmation for wildcards that may have been meant
     ;; to control substitution of a file name or the file name list.
     (if (cond ((not (or on-each no-subst))
@@ -713,8 +713,8 @@
                      (substring command 0 (match-beginning 0))
                    command))
         (stuff-it
-         (if (or (string-match dired-star-subst-regexp command)
-                 (string-match dired-quark-subst-regexp command))
+         (if (or (string-match-p dired-star-subst-regexp command)
+                 (string-match-p dired-quark-subst-regexp command))
              (lambda (x)
                (let ((retval command))
                  (while (string-match
@@ -840,9 +840,7 @@
     (if new-file
        (let ((start (point)))
          ;; Remove any preexisting entry for the name NEW-FILE.
-         (condition-case nil
-             (dired-remove-entry new-file)
-           (error nil))
+         (ignore-errors (dired-remove-entry new-file))
          (goto-char start)
          ;; Now replace the current line with an entry for NEW-FILE.
          (dired-update-file-line new-file) nil)
@@ -883,7 +881,7 @@
     ;; See if any suffix rule matches this file name.
     (while suffixes
       (let (case-fold-search)
-       (if (string-match (car (car suffixes)) file)
+       (if (string-match-p (car (car suffixes)) file)
            (setq suffix (car suffixes) suffixes nil))
        (setq suffixes (cdr suffixes))))
     ;; If so, compute desired new name.
@@ -1143,16 +1141,16 @@
          ;; Avoid calling ls for files that are going to be omitted anyway.
          (let ((omit-re (dired-omit-regexp)))
            (or (string= omit-re "")
-               (not (string-match omit-re
-                                  (cond
-                                   ((eq 'no-dir dired-omit-localp)
-                                    filename)
-                                   ((eq t dired-omit-localp)
-                                    (dired-make-relative filename))
-                                   (t
-                                    (dired-make-absolute
-                                     filename
-                                     (file-name-directory filename)))))))))
+               (not (string-match-p omit-re
+                                    (cond
+                                     ((eq 'no-dir dired-omit-localp)
+                                      filename)
+                                     ((eq t dired-omit-localp)
+                                      (dired-make-relative filename))
+                                     (t
+                                      (dired-make-absolute
+                                       filename
+                                       (file-name-directory filename)))))))))
       ;; Do it!
       (progn
        (setq filename (directory-file-name filename))
@@ -1180,7 +1178,7 @@
                    ;; else try to find correct place to insert
                    (if (dired-goto-subdir directory)
                        (progn ;; unhide if necessary
-                         (if (looking-at "\r")
+                         (if (looking-at-p "\r")
                              ;; Point is at end of subdir line.
                              (dired-unhide-subdir))
                          ;; found - skip subdir and `total' line
@@ -2090,7 +2088,7 @@
     (and (not switches) cons (setq switches (cdr cons)))
     (dired-insert-subdir-validate dirname switches)
     ;; case-fold-search is nil now, so we can test for capital `R':
-    (if (setq switches-have-R (and switches (string-match "R" switches)))
+    (if (setq switches-have-R (and switches (string-match-p "R" switches)))
        ;; avoid duplicated subdirs
        (setq mark-alist (dired-kill-tree dirname t)))
     (if elt
@@ -2128,8 +2126,8 @@
        (mapcar
         (function
          (lambda (x)
-           (or (eq (null (string-match x real-switches))
-                   (null (string-match x dired-actual-switches)))
+           (or (eq (null (string-match-p x real-switches))
+                   (null (string-match-p x dired-actual-switches)))
                (error
                 "Can't have dirs with and without -%s switches together" x))))
         ;; all switches that make a difference to dired-get-filename:
@@ -2170,7 +2168,7 @@
 (defun dired-insert-subdir-newpos (new-dir)
   ;; Find pos for new subdir, according to tree order.
   ;;(goto-char (point-max))
-  (let ((alist dired-subdir-alist) elt dir pos new-pos)
+  (let ((alist dired-subdir-alist) elt dir new-pos)
     (while alist
       (setq elt (car alist)
            alist (cdr alist)
@@ -2421,7 +2419,7 @@
   (and selective-display
        (save-excursion
         (dired-goto-subdir dir)
-        (looking-at "\r"))))
+        (looking-at-p "\r"))))
 
 ;;;###autoload
 (defun dired-hide-subdir (arg)

=== modified file 'lisp/dired.el'
--- a/lisp/dired.el     2013-08-06 01:03:08 +0000
+++ b/lisp/dired.el     2013-08-10 15:17:29 +0000
@@ -34,6 +34,9 @@
 
 ;;; Code:
 
+(declare-function dired-buffer-more-recently-used-p
+                 "dired-x" (buffer1 buffer2))
+
 ;;; Customizable variables
 
 (defgroup dired nil
@@ -1242,26 +1245,25 @@
   (save-excursion
     (goto-char beg)
     (while (< (point) end)
-      (condition-case nil
-         (if (not (dired-move-to-filename))
-             (put-text-property (line-beginning-position)
-                                (1+ (line-end-position))
-                                'invisible 'dired-hide-details-information)
-           (put-text-property (+ (line-beginning-position) 1) (1- (point))
-                              'invisible 'dired-hide-details-detail)
-           (add-text-properties
-            (point)
-            (progn
-              (dired-move-to-end-of-filename)
-              (point))
-            '(mouse-face
-              highlight
-              dired-filename t
-              help-echo "mouse-2: visit this file in other window"))
-           (when (< (+ (point) 4) (line-end-position))
-             (put-text-property (+ (point) 4) (line-end-position)
-                                'invisible 'dired-hide-details-link)))
-       (error nil))
+      (ignore-errors
+       (if (not (dired-move-to-filename))
+           (put-text-property (line-beginning-position)
+                              (1+ (line-end-position))
+                              'invisible 'dired-hide-details-information)
+         (put-text-property (+ (line-beginning-position) 1) (1- (point))
+                            'invisible 'dired-hide-details-detail)
+         (add-text-properties
+          (point)
+          (progn
+            (dired-move-to-end-of-filename)
+            (point))
+          '(mouse-face
+            highlight
+            dired-filename t
+            help-echo "mouse-2: visit this file in other window"))
+         (when (< (+ (point) 4) (line-end-position))
+           (put-text-property (+ (point) 4) (line-end-position)
+                              'invisible 'dired-hide-details-link))))
       (forward-line 1))))
 
 ;; Reverting a dired buffer
@@ -1401,11 +1403,9 @@
          (setq elt (car old-subdir-alist)
                old-subdir-alist (cdr old-subdir-alist)
                dir (car elt))
-         (condition-case ()
-             (progn
-               (dired-uncache dir)
-               (dired-insert-subdir dir))
-           (error nil))))))
+         (ignore-errors
+           (dired-uncache dir)
+           (dired-insert-subdir dir))))))
 
 (defun dired-uncache (dir)
   "Remove directory DIR from any directory cache."
@@ -3849,7 +3849,7 @@
 
 ;;; Start of automatically extracted autoloads.
 
-;;;### (autoloads nil "dired-aux" "dired-aux.el" 
"555c067fcab27f5a377536db407803ab")
+;;;### (autoloads nil "dired-aux" "dired-aux.el" 
"04b4cb6bde3220f55574eb1d99ac0d29")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\

=== modified file 'lisp/filenotify.el'
--- a/lisp/filenotify.el        2013-07-24 13:29:15 +0000
+++ b/lisp/filenotify.el        2013-08-10 15:17:29 +0000
@@ -92,7 +92,7 @@
         (pending-event (assoc desc file-notify--pending-events))
         (actions (nth 1 event))
         (file (file-notify--event-file-name event))
-        file1 cookie callback)
+        file1 callback)
 
     ;; Make actions a list.
     (unless (consp actions) (setq actions (cons actions nil)))

=== modified file 'lisp/filesets.el'
--- a/lisp/filesets.el  2013-07-12 03:54:57 +0000
+++ b/lisp/filesets.el  2013-08-10 15:17:29 +0000
@@ -214,8 +214,8 @@
 
 (defun filesets-which-command-p (cmd)
   "Call \"which CMD\" and return non-nil if the command was found."
-  (when (string-match (format "\\(/[^/]+\\)?/%s" cmd)
-                     (filesets-which-command cmd))
+  (when (string-match-p (format "\\(/[^/]+\\)?/%s" cmd)
+                       (filesets-which-command cmd))
     cmd))
 
 (defun filesets-message (level &rest args)
@@ -1082,7 +1082,7 @@
 
     (require 'easymenu)
 
-    (defun filesets-error (class &rest args)
+    (defun filesets-error (_class &rest args)
       "`error' wrapper."
       (error "%s" (mapconcat 'identity args " ")))
 
@@ -1093,10 +1093,10 @@
 If NEGATIVE is non-nil, remove all directory names."
   (filesets-filter-list lst
                        (lambda (x)
-                         (and (not (string-match "^\\.+/$" x))
+                         (and (not (string-match-p "^\\.+/$" x))
                               (if negative
-                                  (not (string-match "[:/\\]$" x))
-                                (string-match "[:/\\]$" x))))))
+                                  (not (string-match-p "[:/\\]$" x))
+                                (string-match-p "[:/\\]$" x))))))
 
 (defun filesets-conditional-sort (lst &optional access-fn)
   "Return a sorted copy of LST, LST being a list of strings.
@@ -1130,18 +1130,18 @@
          (dirs  nil))
       (dolist (this (file-name-all-completions "" dir))
        (cond
-        ((string-match "^\\.+/$" this)
+        ((string-match-p "^\\.+/$" this)
          nil)
-        ((string-match "[:/\\]$" this)
+        ((string-match-p "[:/\\]$" this)
          (when (or (not match-dirs-flag)
                    (not pattern)
-                   (string-match pattern this))
+                   (string-match-p pattern this))
            (filesets-message 5 "Filesets: matched dir %S with pattern %S"
                              this pattern)
            (setq dirs (cons this dirs))))
         (t
          (when (or (not pattern)
-                   (string-match pattern this))
+                   (string-match-p pattern this))
            (filesets-message 5 "Filesets: matched file %S with pattern %S"
                              this pattern)
            (setq files (cons (if full-flag
@@ -1249,7 +1249,7 @@
   (let ((filename (file-name-nondirectory file)))
     (filesets-some
      (lambda (entry)
-       (when (and (string-match (nth 0 entry) filename)
+       (when (and (string-match-p (nth 0 entry) filename)
                  (filesets-eviewer-constraint-p entry))
         entry))
      filesets-external-viewers)))
@@ -2004,7 +2004,7 @@
        (fn (or fun (lambda (a b)
                      (and (stringp a)
                           (stringp b)
-                          (string-match a b))))))
+                          (string-match-p a b))))))
     (filesets-some (lambda (x)
                     (if (funcall fn (car x) masterfile)
                         (nth pos x)

=== modified file 'lisp/find-file.el'
--- a/lisp/find-file.el 2013-05-06 15:46:31 +0000
+++ b/lisp/find-file.el 2013-08-10 15:17:29 +0000
@@ -528,11 +528,9 @@
         stub            ;; name of the file without extension
         alist           ;; working copy of the list of file extensions
         pathname        ;; the pathname of the file or the #include line
-        default-name    ;; file we should create if none found
         format          ;; what we have to match
         found           ;; name of the file or buffer found - nil if none
-        dirs            ;; local value of ff-search-directories
-        no-match)       ;; whether we know about this kind of file
+        dirs)           ;; local value of ff-search-directories
 
     (message "Working...")
 
@@ -545,7 +543,6 @@
 
     (cond
      ((and (not ff-ignore-include) fname)
-      (setq default-name fname)
       (setq found (ff-get-file-name dirs fname nil)))
 
      ;; let's just get the corresponding file
@@ -558,7 +555,6 @@
                        "/none.none"))
 
       (setq fname (file-name-nondirectory pathname)
-            no-match nil
             match (car alist))
 
       ;; find the table entry corresponding to this file
@@ -569,8 +565,7 @@
         (setq pos (ff-string-match (car match) fname)))
 
       ;; no point going on if we haven't found anything
-      (if (not match)
-          (setq no-match t)
+      (when match
 
         ;; otherwise, suffixes contains what we need
         (setq suffixes (car (cdr match))
@@ -583,8 +578,7 @@
             (progn
               (setq suffixes (funcall action (buffer-file-name))
                     match (cons (car match) (list suffixes))
-                    stub nil
-                    default-name (car suffixes)))
+                    stub nil))
 
           ;; otherwise build our filename stub
           (cond
@@ -599,11 +593,7 @@
             (setq format (concat "\\(.+\\)" (car match)))
             (string-match format fname)
             (setq stub (substring fname (match-beginning 1) (match-end 1)))
-            ))
-
-          ;; if we find nothing, we should try to get a file like this one
-          (setq default-name
-                (concat stub (car (car (cdr match))))))
+            )))
 
         ;; do the real work - find the file
         (setq found
@@ -671,7 +661,7 @@
       (setq buf (buffer-name (car blist)))
       (while (and blist (not found))
 
-        (if (string-match (concat filename "<[0-9]+>") buf)
+        (if (string-match-p (concat filename "<[0-9]+>") buf)
             (setq found (buffer-file-name (car blist))))
 
         (setq blist (cdr blist))
@@ -797,20 +787,18 @@
   "Get all the directory files under directory HERE.
 Exclude all files in the optional EXCLUDE list."
   (if (file-directory-p here)
-      (condition-case nil
-          (progn
-            (let ((files (directory-files here t))
-                  (dirlist (list))
-                  file)
-              (while files
-                (setq file (car files))
-                (if (and
-                     (file-directory-p file)
-                     (not (member (ff-basename file) exclude)))
-                    (setq dirlist (cons file dirlist)))
-                (setq files (cdr files)))
-              (setq dirlist (reverse dirlist))))
-        (error nil))
+      (ignore-errors
+       (let ((files (directory-files here t))
+             (dirlist (list))
+             file)
+         (while files
+           (setq file (car files))
+           (if (and
+                (file-directory-p file)
+                (not (member (ff-basename file) exclude)))
+               (setq dirlist (cons file dirlist)))
+           (setq files (cdr files)))
+         (setq dirlist (reverse dirlist))))
     nil))
 
 (defun ff-switch-file (f1 f2 file &optional in-other-window new-file)
@@ -892,9 +880,7 @@
 Build up a new file list based possibly on part of the directory name
 and the name of the file passed in."
   (ff-string-match "\\(.*\\)/\\([^/]+\\)/\\([^.]+\\).\\([^/]+\\)$" arg)
-  (let ((path (if (match-beginning 1)
-                  (substring arg (match-beginning 1) (match-end 1)) nil))
-        (dire (if (match-beginning 2)
+  (let ((dire (if (match-beginning 2)
                   (substring arg (match-beginning 2) (match-end 2)) nil))
         (file (if (match-beginning 3)
                   (substring arg (match-beginning 3) (match-end 3)) nil))

=== modified file 'lisp/follow.el'
--- a/lisp/follow.el    2013-08-05 10:35:55 +0000
+++ b/lisp/follow.el    2013-08-10 15:17:29 +0000
@@ -515,7 +515,7 @@
 (declare-function comint-adjust-point "comint" (window))
 (defvar comint-scroll-show-maximum-output)
 
-(defun follow-comint-scroll-to-bottom (&optional window)
+(defun follow-comint-scroll-to-bottom (&optional _window)
   "Scroll the bottom-most window in the current Follow chain.
 This is to be called by `comint-postoutput-scroll-to-bottom'."
   (let* ((buffer (current-buffer))
@@ -883,15 +883,14 @@
 (defun follow-select-if-visible (dest win-start-end)
   "Select and return a window, if DEST is visible in it.
 Return the selected window."
-  (let (win win-end wse)
+  (let (win wse)
     (while (and (not win) win-start-end)
       ;; Don't select a window that was just moved. This makes it
       ;; possible to later select the last window after a
       ;; `end-of-buffer' command.
       (setq wse (car win-start-end))
       (when (follow-pos-visible dest (car wse) win-start-end)
-       (setq win (car wse)
-             win-end (nth 2 wse))
+       (setq win (car wse))
        (select-window win))
       (setq win-start-end (cdr win-start-end)))
     win))

=== modified file 'lisp/forms.el'
--- a/lisp/forms.el     2013-01-01 09:11:05 +0000
+++ b/lisp/forms.el     2013-08-10 15:17:29 +0000
@@ -439,6 +439,8 @@
 (defvar forms--rw-face nil
   "Face used to represent read-write data on the screen.")
 
+(defvar read-file-filter) ; bound in forms--intuit-from-file
+
 ;;;###autoload
 (defun forms-mode (&optional primary)
   "Major mode to visit files in a field-structured manner using a form.
@@ -913,7 +915,7 @@
         `(lambda (arg)
            (let ((inhibit-read-only t))
              ,@(apply 'append
-                      (mapcar 'forms--make-format-elt-using-text-properties
+                      (mapcar #'forms--make-format-elt-using-text-properties
                               forms-format-list))
              ;; Prevent insertion before the first text.
              ,@(if (numberp (car forms-format-list))
@@ -926,7 +928,7 @@
            (setq forms--iif-start nil))
        `(lambda (arg)
          ,@(apply 'append
-                  (mapcar 'forms--make-format-elt forms-format-list)))))
+                  (mapcar #'forms--make-format-elt forms-format-list)))))
 
     ;; We have tallied the number of markers and dynamic texts,
     ;; so we can allocate the arrays now.
@@ -1098,7 +1100,7 @@
            (goto-char (point-min))
            ,@(apply 'append
                     (mapcar
-                     'forms--make-parser-elt
+                     #'forms--make-parser-elt
                      (append forms-format-list (list nil)))))))))
 
   (forms--debug 'forms--parser))
@@ -1198,8 +1200,6 @@
       (setq forms--field nil)))
    ))
 
-(defvar read-file-filter) ; bound in forms--intuit-from-file
-
 (defun forms--intuit-from-file ()
   "Get number of fields and a default form using the data file."
 
@@ -1569,10 +1569,10 @@
     ;; Build new record.
     (setq forms--the-record-list (forms--parse-form))
     (setq the-record
-         (mapconcat 'identity forms--the-record-list forms-field-sep))
+         (mapconcat #'identity forms--the-record-list forms-field-sep))
 
-    (if (string-match (regexp-quote forms-field-sep)
-                     (mapconcat 'identity forms--the-record-list ""))
+    (if (string-match-p (regexp-quote forms-field-sep)
+                       (mapconcat #'identity forms--the-record-list ""))
        (error "Field separator occurs in record - update refused"))
 
     ;; Handle multi-line fields, if allowed.
@@ -1580,7 +1580,7 @@
        (forms--trans the-record "\n" forms-multi-line))
 
     ;; A final sanity check before updating.
-    (if (string-match "\n" the-record)
+    (if (string-match-p "\n" the-record)
        (error "Multi-line fields in this record - update refused"))
 
     (with-current-buffer forms--file-buffer
@@ -1779,11 +1779,7 @@
          (setq the-list (cdr (append the-fields nil))))
       (setq the-list (make-list forms-number-of-fields "")))
 
-    (setq the-record
-         (mapconcat
-         'identity
-         the-list
-         forms-field-sep))
+    (setq the-record (mapconcat #'identity the-list forms-field-sep))
 
     (with-current-buffer forms--file-buffer
       (forms--goto-record ln)

=== modified file 'lisp/help-mode.el'
--- a/lisp/help-mode.el 2013-06-12 02:16:02 +0000
+++ b/lisp/help-mode.el 2013-08-10 15:17:29 +0000
@@ -268,7 +268,7 @@
 
 (define-button-type 'help-dir-local-var-def
   :supertype 'help-xref
-  'help-function (lambda (var &optional file)
+  'help-function (lambda (_var &optional file)
                   ;; FIXME: this should go to the point where the
                   ;; local variable was defined.
                   (find-file file))
@@ -541,7 +541,7 @@
                       (while
                           (and (not (eobp))
                                ;; Stop at a pair of blank lines.
-                               (not (looking-at "\n\\s-*\n")))
+                               (not (looking-at-p "\n\\s-*\n")))
                         ;; Skip a single blank line.
                         (and (eolp) (forward-line))
                         (end-of-line)
@@ -605,26 +605,25 @@
        (save-restriction
          (narrow-to-region from to)
          (goto-char (point-min))
-         (condition-case nil
-             (while (not (eobp))
-               (cond
-                ((looking-at "\"") (forward-sexp 1))
-                ((looking-at "#<") (search-forward ">" nil 'move))
-                ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)")
-                 (let* ((sym (intern-soft (match-string 1)))
-                        (type (cond ((fboundp sym) 'help-function)
-                                    ((or (memq sym '(t nil))
-                                         (keywordp sym))
-                                     nil)
-                                    ((and sym
-                                          (or (boundp sym)
-                                              (get sym
-                                                   'variable-documentation)))
-                                     'help-variable))))
-                   (when type (help-xref-button 1 type sym)))
-                 (goto-char (match-end 1)))
-                (t (forward-char 1))))
-           (error nil)))))))
+         (ignore-errors
+           (while (not (eobp))
+             (cond
+              ((looking-at-p "\"") (forward-sexp 1))
+              ((looking-at-p "#<") (search-forward ">" nil 'move))
+              ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)")
+               (let* ((sym (intern-soft (match-string 1)))
+                      (type (cond ((fboundp sym) 'help-function)
+                                  ((or (memq sym '(t nil))
+                                       (keywordp sym))
+                                   nil)
+                                  ((and sym
+                                        (or (boundp sym)
+                                            (get sym
+                                                 'variable-documentation)))
+                                   'help-variable))))
+                 (when type (help-xref-button 1 type sym)))
+               (goto-char (match-end 1)))
+              (t (forward-char 1))))))))))
 
 
 ;; Additional functions for (re-)creating types of help buffers.

=== modified file 'lisp/ibuffer.el'
--- a/lisp/ibuffer.el   2013-07-31 10:19:06 +0000
+++ b/lisp/ibuffer.el   2013-08-10 15:17:29 +0000
@@ -53,6 +53,8 @@
 (defvar ibuffer-tmp-hide-regexps)
 (defvar ibuffer-tmp-show-regexps)
 
+(declare-function ibuffer-ext-visible-p "ibuf-ext"
+                 (buf all &optional ibuffer-buf))
 (declare-function ibuffer-mark-on-buffer "ibuf-ext"
                  (func &optional ibuffer-mark-on-buffer-mark group))
 (declare-function ibuffer-generate-filter-groups "ibuf-ext"
@@ -1198,7 +1200,7 @@
                             (and (stringp (cadr err))
                                  ;; This definitely falls in the
                                  ;; ghetto hack category...
-                                 (not (string-match "too small" (cadr err)))))
+                                 (not (string-match-p "too small" (cadr 
err)))))
                         (signal (car err) (cdr err))
                       (enlarge-window 3))))))
              (select-window (next-window))

=== modified file 'lisp/msb.el'
--- a/lisp/msb.el       2013-01-01 09:11:05 +0000
+++ b/lisp/msb.el       2013-08-10 15:17:29 +0000
@@ -386,7 +386,7 @@
 ;;;
 ;;; Some example function to be used for `msb-item-handling-function'.
 ;;;
-(defun msb-item-handler (buffer &optional maxbuf)
+(defun msb-item-handler (_buffer &optional _maxbuf)
   "Create one string item, concerning BUFFER, for the buffer menu.
 The item looks like:
 *% <buffer-name>
@@ -410,7 +410,7 @@
         (error "Unknown type of `dired-directory' in buffer %s"
                (buffer-name)))))
 
-(defun msb-dired-item-handler (buffer &optional maxbuf)
+(defun msb-dired-item-handler (_buffer &optional _maxbuf)
   "Create one string item, concerning a dired BUFFER, for the buffer menu.
 The item looks like:
 *% <buffer-name>

=== modified file 'lisp/ses.el'
--- a/lisp/ses.el       2013-01-02 16:13:04 +0000
+++ b/lisp/ses.el       2013-08-10 15:17:29 +0000
@@ -703,7 +703,6 @@
     (and (string-match "\\`\\([A-Z]+\\)\\([0-9]+\\)\\'" str)
         (let* ((col-str (match-string-no-properties 1 str))
               (col 0)
-              (col-offset 0)
               (col-base 1)
               (col-idx (1- (length col-str)))
               (row (1- (string-to-number (match-string-no-properties 2 str)))))
@@ -740,7 +739,7 @@
 Return nil in case of failure."
   (unless (local-variable-p sym)
     (make-local-variable  sym)
-    (if (let (case-fold-search) (string-match "\\`[A-Z]+[0-9]+\\'" 
(symbol-name sym)))
+    (if (let (case-fold-search) (string-match-p "\\`[A-Z]+[0-9]+\\'" 
(symbol-name sym)))
        (put sym 'ses-cell (cons row col))
       (put sym 'ses-cell :ses-named)
       (setq ses--named-cell-hashmap (or ses--named-cell-hashmap 
(make-hash-table :test 'eq)))
@@ -1474,7 +1473,7 @@
   (let (rowcol result)
     (if (or (atom formula) (eq (car formula) 'quote))
        (if (and (setq rowcol (ses-sym-rowcol formula))
-                (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name formula)))
+                (string-match-p "\\`[A-Z]+[0-9]+\\'" (symbol-name formula)))
            (ses-relocate-symbol formula rowcol
                                 startrow startcol rowincr colincr)
          formula) ; Pass through as-is.
@@ -1735,7 +1734,7 @@
   (search-backward ";; Local Variables:\n" nil t)
   (backward-list 1)
   (setq ses--params-marker (point-marker))
-  (let ((params (condition-case nil (read (current-buffer)) (error nil))))
+  (let ((params (ignore-errors (read (current-buffer)))))
     (or (and (= (safe-length params) 3)
             (numberp (car params))
             (numberp (cadr params))
@@ -1761,7 +1760,7 @@
   ;; Skip over print area, which we assume is correct.
   (goto-char (point-min))
   (forward-line ses--numrows)
-  (or (looking-at ses-print-data-boundary)
+  (or (looking-at-p ses-print-data-boundary)
       (error "Missing marker between print and data areas"))
   (forward-char 1)
   (setq ses--data-marker (point-marker))
@@ -1774,12 +1773,12 @@
     (dotimes (col ses--numcols)
       (let* ((x      (read (current-buffer)))
             (sym  (car-safe (cdr-safe x))))
-       (or (and (looking-at "\n")
+       (or (and (looking-at-p "\n")
                 (eq (car-safe x) 'ses-cell)
                 (ses-create-cell-variable sym row col))
            (error "Cell-def error"))
        (eval x)))
-    (or (looking-at "\n\n")
+    (or (looking-at-p "\n\n")
        (error "Missing blank line between rows")))
   ;; Load global parameters.
   (let ((widths      (read (current-buffer)))
@@ -1805,8 +1804,8 @@
     (1value (eval head-row)))
   ;; Should be back at global-params.
   (forward-char 1)
-  (or (looking-at (replace-regexp-in-string "1" "[0-9]+"
-                                           ses-initial-global-parameters))
+  (or (looking-at-p (replace-regexp-in-string "1" "[0-9]+"
+                                             ses-initial-global-parameters))
       (error "Problem with column-defs or global-params"))
   ;; Check for overall newline count in definitions area.
   (forward-line 3)
@@ -2077,9 +2076,8 @@
 
 (defun ses-jump-safe (cell)
   "Like `ses-jump', but no error if invalid cell."
-  (condition-case nil
-      (ses-jump cell)
-    (error)))
+  (ignore-errors
+    (ses-jump cell)))
 
 (defun ses-reprint-all (&optional nonarrow)
   "Recreate the display area.  Calls all printer functions.  Narrows to
@@ -2789,7 +2787,7 @@
   ;; For some reason, the text-read-only error is not caught by 
`delete-region',
   ;; so we have to use subterfuge.
   (let ((buffer-read-only t))
-    (1value (condition-case x
+    (1value (condition-case nil
                (noreturn (funcall (lookup-key (current-global-map)
                                               (this-command-keys))
                                   beg end))
@@ -3014,13 +3012,13 @@
                             (ses-col-printer (1- ses--numcols)))))
     rowcol))
 
-(defun ses-export-tsv (beg end)
+(defun ses-export-tsv (_beg _end)
   "Export values from the current range, with tabs between columns and
 newlines between rows.  Result is placed in kill ring."
   (interactive "r")
   (ses-export-tab nil))
 
-(defun ses-export-tsf (beg end)
+(defun ses-export-tsf (_beg _end)
   "Export formulas from the current range, with tabs between columns and
 newlines between rows.  Result is placed in kill ring."
   (interactive "r")
@@ -3298,7 +3296,7 @@
       (let* ((x (ses-sym-rowcol ref))
             (xcell (ses-get-cell (car x) (cdr x))))
        (ses-cell-references-aset xcell
-                                 (cons new-name (delq sym 
+                                 (cons new-name (delq sym
                                                       (ses-cell-references 
xcell))))))
     (push new-name ses--renamed-cell-symb-list)
     (set new-name (symbol-value sym))
@@ -3579,7 +3577,7 @@
 current column and continues until the next nonblank column."
   (ses-center-span value ?~))
 
-(defun ses-unsafe (value)
+(defun ses-unsafe (_value)
   "Substitute for an unsafe formula or printer."
   (error "Unsafe formula or printer"))
 

=== modified file 'lisp/tabify.el'
--- a/lisp/tabify.el    2013-06-18 08:17:01 +0000
+++ b/lisp/tabify.el    2013-08-10 15:17:29 +0000
@@ -28,7 +28,7 @@
 ;;; Code:
 
 ;;;###autoload
-(defun untabify (start end &optional arg)
+(defun untabify (start end &optional _arg)
   "Convert all tabs in region to multiple spaces, preserving columns.
 If called interactively with prefix ARG, convert for the entire
 buffer.
@@ -61,7 +61,7 @@
 \"^\\t* [ \\t]+\" is also useful, for tabifying only initial whitespace.")
 
 ;;;###autoload
-(defun tabify (start end &optional arg)
+(defun tabify (start end &optional _arg)
   "Convert multiple spaces in region to tabs when possible.
 A group of spaces is partially replaced by tabs
 when this can be done without changing the column they end at.

=== modified file 'lisp/thingatpt.el'
--- a/lisp/thingatpt.el 2013-05-08 15:10:17 +0000
+++ b/lisp/thingatpt.el 2013-08-10 15:17:29 +0000
@@ -84,48 +84,47 @@
   (if (get thing 'bounds-of-thing-at-point)
       (funcall (get thing 'bounds-of-thing-at-point))
     (let ((orig (point)))
-      (condition-case nil
-         (save-excursion
-           ;; Try moving forward, then back.
-            (funcall ;; First move to end.
-             (or (get thing 'end-op)
-                 (lambda () (forward-thing thing 1))))
-            (funcall ;; Then move to beg.
-             (or (get thing 'beginning-op)
-                 (lambda () (forward-thing thing -1))))
-           (let ((beg (point)))
-             (if (<= beg orig)
-                 ;; If that brings us all the way back to ORIG,
-                 ;; it worked.  But END may not be the real end.
-                 ;; So find the real end that corresponds to BEG.
-                  ;; FIXME: in which cases can `real-end' differ from `end'?
-                 (let ((real-end
-                        (progn
-                          (funcall
-                           (or (get thing 'end-op)
-                                (lambda () (forward-thing thing 1))))
-                          (point))))
-                   (when (and (<= orig real-end) (< beg real-end))
-                      (cons beg real-end)))
-               (goto-char orig)
-               ;; Try a second time, moving backward first and then forward,
-               ;; so that we can find a thing that ends at ORIG.
-                (funcall ;; First, move to beg.
-                 (or (get thing 'beginning-op)
-                     (lambda () (forward-thing thing -1))))
-                (funcall ;; Then move to end.
-                 (or (get thing 'end-op)
-                     (lambda () (forward-thing thing 1))))
-               (let ((end (point))
-                      (real-beg
+      (ignore-errors
+       (save-excursion
+         ;; Try moving forward, then back.
+         (funcall ;; First move to end.
+          (or (get thing 'end-op)
+              (lambda () (forward-thing thing 1))))
+         (funcall ;; Then move to beg.
+          (or (get thing 'beginning-op)
+              (lambda () (forward-thing thing -1))))
+         (let ((beg (point)))
+           (if (<= beg orig)
+               ;; If that brings us all the way back to ORIG,
+               ;; it worked.  But END may not be the real end.
+               ;; So find the real end that corresponds to BEG.
+               ;; FIXME: in which cases can `real-end' differ from `end'?
+               (let ((real-end
                       (progn
                         (funcall
-                         (or (get thing 'beginning-op)
-                              (lambda () (forward-thing thing -1))))
+                         (or (get thing 'end-op)
+                             (lambda () (forward-thing thing 1))))
                         (point))))
-                 (if (and (<= real-beg orig) (<= orig end) (< real-beg end))
-                     (cons real-beg end))))))
-       (error nil)))))
+                 (when (and (<= orig real-end) (< beg real-end))
+                   (cons beg real-end)))
+             (goto-char orig)
+             ;; Try a second time, moving backward first and then forward,
+             ;; so that we can find a thing that ends at ORIG.
+             (funcall ;; First, move to beg.
+              (or (get thing 'beginning-op)
+                  (lambda () (forward-thing thing -1))))
+             (funcall ;; Then move to end.
+              (or (get thing 'end-op)
+                  (lambda () (forward-thing thing 1))))
+             (let ((end (point))
+                   (real-beg
+                    (progn
+                      (funcall
+                       (or (get thing 'beginning-op)
+                           (lambda () (forward-thing thing -1))))
+                      (point))))
+               (if (and (<= real-beg orig) (<= orig end) (< real-beg end))
+                   (cons real-beg end))))))))))
 
 ;;;###autoload
 (defun thing-at-point (thing &optional no-properties)
@@ -217,21 +216,19 @@
 \[Internal function used by `bounds-of-thing-at-point'.]"
   (save-excursion
     (let ((opoint (point))
-         (beg (condition-case nil
-                  (progn (up-list -1)
-                         (point))
-                (error nil))))
-      (condition-case nil
-         (if beg
-             (progn (forward-sexp)
-                    (cons beg (point)))
-           ;; Are we are at the beginning of a top-level sexp?
-           (forward-sexp)
-           (let ((end (point)))
-             (backward-sexp)
-             (if (>= opoint (point))
-                 (cons opoint end))))
-       (error nil)))))
+         (beg (ignore-errors
+                (up-list -1)
+                (point))))
+      (ignore-errors
+       (if beg
+           (progn (forward-sexp)
+                  (cons beg (point)))
+         ;; Are we are at the beginning of a top-level sexp?
+         (forward-sexp)
+         (let ((end (point)))
+           (backward-sexp)
+           (if (>= opoint (point))
+               (cons opoint end))))))))
 
 ;; Defuns
 
@@ -358,7 +355,7 @@
       (if found
          (cons (match-beginning 1) (match-end 1))))))
 
-(defun thing-at-point--bounds-of-well-formed-url (beg end pt)
+(defun thing-at-point--bounds-of-well-formed-url (beg end _pt)
   (save-excursion
     (goto-char beg)
     (let (url-beg paren-end regexp)
@@ -453,16 +450,14 @@
         htb ret)
      (while htbs
        (setq htb (car htbs) htbs (cdr htbs))
-       (condition-case nil
-          (progn
-            ;; errs: htb symbol may be unbound, or not a hash-table.
-            ;; gnus-gethash is just a macro for intern-soft.
-            (and (symbol-value htb)
-                 (intern-soft string (symbol-value htb))
-                 (setq ret string htbs nil))
-            ;; If we made it this far, gnus is running, so ignore "heads":
-            (setq heads nil))
-        (error nil)))
+       (ignore-errors
+        ;; errs: htb symbol may be unbound, or not a hash-table.
+        ;; gnus-gethash is just a macro for intern-soft.
+        (and (symbol-value htb)
+             (intern-soft string (symbol-value htb))
+             (setq ret string htbs nil))
+        ;; If we made it this far, gnus is running, so ignore "heads":
+        (setq heads nil)))
      (or ret (not heads)
         (let ((head (string-match "\\`\\([[:lower:]]+\\)\\." string)))
           (and head (setq head (substring string 0 (match-end 1)))
@@ -566,9 +561,8 @@
       (car read-data))))
 
 (defun form-at-point (&optional thing pred)
-  (let ((sexp (condition-case nil
-                 (read-from-whole-string (thing-at-point (or thing 'sexp)))
-               (error nil))))
+  (let ((sexp (ignore-errors
+               (read-from-whole-string (thing-at-point (or thing 'sexp))))))
     (if (or (not pred) (funcall pred sexp)) sexp)))
 
 ;;;###autoload


reply via email to

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