431 |
(let* ((base-name (symbol-name base)) |
(let* ((base-name (symbol-name base)) |
432 |
(prev-sym (intern (concat base-name "-prev"))) |
(prev-sym (intern (concat base-name "-prev"))) |
433 |
(next-sym (intern (concat base-name "-next")))) |
(next-sym (intern (concat base-name "-next")))) |
434 |
(unless name (setq name (symbol-name base-name))) |
(unless name (setq name base-name)) |
435 |
`(progn |
`(progn |
436 |
(add-to-list 'debug-ignored-errors |
(add-to-list 'debug-ignored-errors |
437 |
,(concat "^No \\(previous\\|next\\) " (regexp-quote name))) |
,(concat "^No \\(previous\\|next\\) " (regexp-quote name))) |
444 |
(if (not (re-search-forward ,re nil t count)) |
(if (not (re-search-forward ,re nil t count)) |
445 |
(if (looking-at ,re) |
(if (looking-at ,re) |
446 |
(goto-char (or ,(if endfun `(,endfun)) (point-max))) |
(goto-char (or ,(if endfun `(,endfun)) (point-max))) |
447 |
(error ,(format "No next %s" name))) |
(error "No next %s" ,name)) |
448 |
(goto-char (match-beginning 0)) |
(goto-char (match-beginning 0)) |
449 |
(when (and (eq (current-buffer) (window-buffer (selected-window))) |
(when (and (eq (current-buffer) (window-buffer (selected-window))) |
450 |
(interactive-p)) |
(interactive-p)) |
460 |
(unless count (setq count 1)) |
(unless count (setq count 1)) |
461 |
(if (< count 0) (,next-sym (- count)) |
(if (< count 0) (,next-sym (- count)) |
462 |
(unless (re-search-backward ,re nil t count) |
(unless (re-search-backward ,re nil t count) |
463 |
(error ,(format "No previous %s" name)))))))) |
(error "No previous %s" ,name))))))) |
464 |
|
|
465 |
(provide 'easy-mmode) |
(provide 'easy-mmode) |
466 |
|
|