comparison lisp/add-log.el @ 11816:2a8e1b01bc15

(get-method-definition): Fix regexps.
author Karl Heuer <kwzh@gnu.org>
date Mon, 15 May 1995 22:00:20 +0000
parents 108646bbd84f
children f4a8265756e7
comparison
equal deleted inserted replaced
11815:e8214d59e98d 11816:2a8e1b01bc15
484 484
485 ;; For objective C, return the method name if we are in a method. 485 ;; For objective C, return the method name if we are in a method.
486 (defun get-method-definition () 486 (defun get-method-definition ()
487 (let ((md "[")) 487 (let ((md "["))
488 (save-excursion 488 (save-excursion
489 (if (re-search-backward "^@implementation \\(.*\\)$" nil t) 489 (if (re-search-backward "^@implementation\\s-*\\([A-Za-z_]*\\)" nil t)
490 (get-method-definition-1 " "))) 490 (get-method-definition-1 " ")))
491 (save-excursion 491 (save-excursion
492 (cond 492 (cond
493 ((re-search-backward "^\\([-+]\\)[ \t\n\f\r]*\\(([^)]*)\\)?" nil t) 493 ((re-search-forward "^\\([-+]\\)[ \t\n\f\r]*\\(([^)]*)\\)?\\s-*" nil t)
494 (get-method-definition-1 "") 494 (get-method-definition-1 "")
495 (while (not (looking-at "[{;]")) 495 (while (not (looking-at "[{;]"))
496 (looking-at 496 (looking-at
497 "\\([^ ;{:\t\n\f\r]*:?\\)\\(([^)]*)\\)?[^ ;{:\t\n\f\r]*[ \t\n\f\r]*") 497 "\\([A-Za-z_]*:?\\)\\s-*\\(([^)]*)\\)?[A-Za-z_]*[ \t\n\f\r]*")
498 (get-method-definition-1 "")) 498 (get-method-definition-1 ""))
499 (concat md "]")))))) 499 (concat md "]"))))))
500 500
501 501
502 (provide 'add-log) 502 (provide 'add-log)