diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2013-08-10 17:17:29 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2013-08-10 17:17:29 +0200 |
commit | 45fdb48240996f7ad9c8c03f438ecf7f5b925d8e (patch) | |
tree | 63d1b157c6391428d8641dd4bf25cceab50e7e84 /lisp/filesets.el | |
parent | c880af52a62dda0900b8737b9e592700466e45ec (diff) | |
download | emacs-45fdb48240996f7ad9c8c03f438ecf7f5b925d8e.tar.gz emacs-45fdb48240996f7ad9c8c03f438ecf7f5b925d8e.tar.bz2 emacs-45fdb48240996f7ad9c8c03f438ecf7f5b925d8e.zip |
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.
Diffstat (limited to 'lisp/filesets.el')
-rw-r--r-- | lisp/filesets.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/filesets.el b/lisp/filesets.el index fbf28dbecbc..82891770f12 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -214,8 +214,8 @@ key is supported." (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 @@ defined in `filesets-ingroup-patterns'." (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 @@ defined in `filesets-ingroup-patterns'." 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 @@ Return full path if FULL-FLAG is non-nil." (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 @@ Return full path if FULL-FLAG is non-nil." (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 @@ LOOKUP-NAME is used as lookup name for retrieving fileset specific settings." (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) |