[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: If w3m-init-file is nil
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Wed, 22 Sep 2010 12:56:13 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11360
- References: <m1r5gn45cf.fsf@xxxxxxxxx>
In [emacs-w3m : No.11358] Leo wrote:
> At the end of w3m.el,
> (unless noninteractive
> (if (string-match "\\.el\\'" w3m-init-file)
> (or (load (concat w3m-init-file "c") t t t)
> (load w3m-init-file t t t))
> (load w3m-init-file t t))
> (run-hooks 'w3m-load-hook))
> does not check whether w3m-init-file is a file or not. For example if I
> set it to nil in my init file, that form throws an error.
> So I suggest maybe checking w3m-init-file is string before doing
> string-match.
Its custom type is `file', i.e. a string:
;; wid-edit.el
(define-widget 'file 'string
...)
You can set it to nil of course, but should we add nil-checks
also to every user option of which the type is string?