Skip to content

Instantly share code, notes, and snippets.

@izawa
Created June 8, 2012 10:47
Show Gist options
  • Save izawa/2894964 to your computer and use it in GitHub Desktop.
Save izawa/2894964 to your computer and use it in GitHub Desktop.
wchar patch for fillapapt.el
*** /Users/izawa/Desktop/filladapt.el 2012-06-07 17:08:35.000000000 +0900
--- /Users/izawa/.emacs.d/filladapt/filladapt.el 2012-06-08 19:37:01.000000000 +0900
***************
*** 796,807 ****
(space-list '(?\ ?\t))
(space ?\ )
(lim (length string)))
! (setq string (copy-sequence string))
(while (< i lim)
(if (not (memq (aref string i) space-list))
! (aset string i space))
(setq i (1+ i)))
! string ))
(defun filladapt-adapt (paragraph debugging)
"Set fill-prefix based on the contents of the current line.
--- 796,808 ----
(space-list '(?\ ?\t))
(space ?\ )
(lim (length string)))
! (setq ret "")
(while (< i lim)
(if (not (memq (aref string i) space-list))
! (setq ret (concat ret (make-string (char-width (aref string i)) space)))
! (setq ret (concat ret (list (aref string i)))))
(setq i (1+ i)))
! ret ))
(defun filladapt-adapt (paragraph debugging)
"Set fill-prefix based on the contents of the current line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment