comparison lisp/net/net-utils.el @ 30548:716c9bd98063

(nslookup-font-lock-keywords): Don't condition font lock support on window-system. (ftp-font-lock-keywords, smbclient-font-lock-keywords): Likewise.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 01 Aug 2000 10:10:31 +0000
parents a3541330de52
children 2e9fda397ea2
comparison
equal deleted inserted replaced
30547:3c9d5a5f0e2b 30548:716c9bd98063
225 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 225 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
226 ;; Nslookup goodies 226 ;; Nslookup goodies
227 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 227 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
228 228
229 (defconst nslookup-font-lock-keywords 229 (defconst nslookup-font-lock-keywords
230 (and window-system 230 (progn
231 (progn 231 (require 'font-lock)
232 (require 'font-lock) 232 (list
233 (list 233 (list nslookup-prompt-regexp 0 font-lock-reference-face)
234 (list nslookup-prompt-regexp 0 font-lock-reference-face) 234 (list "^[A-Za-z0-9 _]+:" 0 font-lock-type-face)
235 (list "^[A-Za-z0-9 _]+:" 0 font-lock-type-face) 235 (list "\\<\\(SOA\\|NS\\|MX\\|A\\|CNAME\\)\\>"
236 (list "\\<\\(SOA\\|NS\\|MX\\|A\\|CNAME\\)\\>" 236 1 font-lock-keyword-face)
237 1 font-lock-keyword-face) 237 ;; Dotted quads
238 ;; Dotted quads 238 (list
239 (list 239 (mapconcat 'identity
240 (mapconcat 'identity 240 (make-list 4 "[0-9]+")
241 (make-list 4 "[0-9]+") 241 "\\.")
242 "\\.") 242 0 font-lock-variable-name-face)
243 0 font-lock-variable-name-face) 243 ;; Host names
244 ;; Host names 244 (list
245 (list 245 (let ((host-expression "[-A-Za-z0-9]+"))
246 (let ((host-expression "[-A-Za-z0-9]+")) 246 (concat
247 (concat 247 (mapconcat 'identity
248 (mapconcat 'identity 248 (make-list 2 host-expression)
249 (make-list 2 host-expression) 249 "\\.")
250 "\\.") 250 "\\(\\." host-expression "\\)*")
251 "\\(\\." host-expression "\\)*") 251 )
252 ) 252 0 font-lock-variable-name-face)
253 0 font-lock-variable-name-face) 253 ))
254 ))) 254 "Expressions to font-lock for nslookup.")
255 "Expressions to font-lock for nslookup.")
256 255
257 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 256 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
258 ;; FTP goodies 257 ;; FTP goodies
259 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 258 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
260 259
261 (defconst ftp-font-lock-keywords 260 (defconst ftp-font-lock-keywords
262 (and window-system 261 (progn
263 (progn 262 (require 'font-lock)
264 (require 'font-lock) 263 (list
265 (list 264 (list ftp-prompt-regexp 0 font-lock-reference-face))))
266 (list ftp-prompt-regexp 0 font-lock-reference-face)))))
267 265
268 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 266 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
269 ;; smbclient goodies 267 ;; smbclient goodies
270 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 268 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
271 269
272 (defconst smbclient-font-lock-keywords 270 (defconst smbclient-font-lock-keywords
273 (and window-system 271 (progn
274 (progn 272 (require 'font-lock)
275 (require 'font-lock) 273 (list
276 (list 274 (list smbclient-prompt-regexp 0 font-lock-reference-face))))
277 (list smbclient-prompt-regexp 0 font-lock-reference-face)))))
278 275
279 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 276 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
280 ;; Utility functions 277 ;; Utility functions
281 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 278 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
282 279