/[emacs]/emacs/lisp/longlines.el
ViewVC logotype

Diff of /emacs/lisp/longlines.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by cyd, Thu Sep 1 16:17:10 2005 UTC revision 1.11 by cyd, Fri Oct 14 19:56:38 2005 UTC
# Line 109  are indicated with a symbol." Line 109  are indicated with a symbol."
109          (add-to-list 'buffer-file-format 'longlines)          (add-to-list 'buffer-file-format 'longlines)
110          (add-hook 'change-major-mode-hook 'longlines-mode-off nil t)          (add-hook 'change-major-mode-hook 'longlines-mode-off nil t)
111          (make-local-variable 'buffer-substring-filters)          (make-local-variable 'buffer-substring-filters)
112            (set (make-local-variable 'isearch-search-fun-function)
113                 'longlinges-search-function)
114          (add-to-list 'buffer-substring-filters 'longlines-encode-string)          (add-to-list 'buffer-substring-filters 'longlines-encode-string)
115          (when longlines-wrap-follows-window-size          (when longlines-wrap-follows-window-size
116            (set (make-local-variable 'fill-column)            (set (make-local-variable 'fill-column)
# Line 148  are indicated with a symbol." Line 150  are indicated with a symbol."
150                   'longlines-window-change-function t)                   'longlines-window-change-function t)
151      (when longlines-wrap-follows-window-size      (when longlines-wrap-follows-window-size
152        (kill-local-variable 'fill-column))        (kill-local-variable 'fill-column))
153        (kill-local-variable 'isearch-search-fun-function)
154      (kill-local-variable 'require-final-newline)      (kill-local-variable 'require-final-newline)
155      (kill-local-variable 'buffer-substring-filters)      (kill-local-variable 'buffer-substring-filters)
156      (kill-local-variable 'use-hard-newlines)))      (kill-local-variable 'use-hard-newlines)))
# Line 381  This is called by `window-size-change-fu Line 384  This is called by `window-size-change-fu
384        (longlines-wrap-region (point-min) (point-max))        (longlines-wrap-region (point-min) (point-max))
385        (set-buffer-modified-p mod))))        (set-buffer-modified-p mod))))
386    
387    ;; Isearch
388    
389    (defun longlinges-search-function ()
390      (cond
391       (isearch-word
392        (if isearch-forward 'word-search-forward 'word-search-backward))
393       (isearch-regexp
394        (if isearch-forward 're-search-forward 're-search-backward))
395       (t
396        (if isearch-forward
397            'longlines-search-forward
398          'longlines-search-backward))))
399    
400    (defun longlines-search-forward (string &optional bound noerror count)
401      (let ((search-spaces-regexp "[ \n]"))
402        (re-search-forward (regexp-quote string) bound noerror count)))
403    
404    (defun longlines-search-backward (string &optional bound noerror count)
405      (let ((search-spaces-regexp "[ \n]"))
406        (re-search-backward (regexp-quote string) bound noerror count)))
407    
408  ;; Loading and saving  ;; Loading and saving
409    
410  (add-to-list  (add-to-list

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26