mule-ja
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mule-ja:45] newline at char with line breakable category while filling


From: Ikumi Keita
Subject: [mule-ja:45] newline at char with line breakable category while filling
Date: Sun, 07 Jun 2015 16:41:15 +0900

  emacs $B$N(B fill $B$N:]!"(Bcategory | 
$B$NJ8;z$N=j$G2~9T$rF~$l$k;~$N5sF0$K$D$$(B
$B$FMWK>$,$"$j$^$9!#(B

address@hidden(B
fill $B$GA^F~$5$l$k2~9T$K!"IU$1$k$Y$-$G$O$J$$!J$H;W$o$l$k!K(Btext property
$B$rIU$1$J$$$h$&address@hidden&$+!#(B

$B!Z>\:Y![(B
  emacs 24.5 $B$G0J2<$N(B elisp $B$rI>2A$7$?$H$7$^$9!#(B

(progn
  (switch-to-buffer (generate-new-buffer "aaa"))
  (insert "$B$"$$$&$($*(B" (propertize "1234567890" 'face 'underline))
  (setq fill-column 15) ; $B!V(B1234567890$B!W$NESCf$K(B fill-column 
address@hidden(B
  (fill-paragraph))

$B$9$k$H!"8=$l$k%P%C%U%!$G$NI=<($,(B

$B$"$$$&$($*(B
1234567890

$B$N$h$&$K$J$j$^$9!#2~9T$KE,$7$?0LCV$N6uGr!&%?%V$,$J$$$N$G!"(Bcategory | 
$B$N(B
$BJ8;z!V$*!W$ND>8e$K2~9T$,F~$l$i$l$F$$$k$o$1$G$9$,!"$=$N2~9TJ8;z$K2<@~$,IU(B
$B$/$N$,8+$F$H$l$k$H;W$$$^$9!#85!9?t;zItJ,address@hidden<@~$,!"$=$l$h$j(B
$BA0$NJ8;z$K$O$_=P$7$FIU$$$F$$$k$o$1$G$9!#$3$N!V(Btext property 
$B$N$O$_=P$7!W(B
$B$,LdBj$K$7$F$$$k8=>]$G$9!#(B

  $B$3$l$HF1MM$N8=>]$K$h$C$F!"(Btwittering-mode 
$B$G$7$P$7$P!V9TF,$KG[CV$5$l$?(B
$BJ8;zNs$KIUM?$5$l$?(B hyperlink 
$B5Z$S$=$N2<@~$,!"D>A0$N9T$NKvHx$N2~9T$K$bIU(B
$B$/!J$O$_=P$9!K!W$H$$$&$3$H$,5/$-$F$$$^$9!#;d$O!"$A$g$C$H$3$l$O8+6l$7$$$H(B
$B46$8$F$$$F!"$G$-$l$P$=$&$J$i$J$$$h$&$K$7$?$$$H;W$C$F$$$^$9!#(B

  $B$3$N$h$&$K$J$kM}M3$rD4$Y$F$$$/$H!"860x$O(B textmodes/fill.el $B$N(B
fill-newline $B$K$"$k$3$H$,$o$+$j$^$7$?!#4X78$9$kItJ,$r0J2<$K0zMQ$7$^$9!#(B
----------------------------------------------------------------------
(defun fill-newline ()
  ;; Replace whitespace here with one newline, then
  ;; indent to left margin.
  (skip-chars-backward " \t")
  (insert ?\n)
  ;; Give newline the properties of the space(s) it replaces
  (set-text-properties (1- (point)) (point)
                       (fill-text-properties-at (point)))
----------------------------------------------------------------------
$B0zMQIt:G8e$N#29T$,LdBj$N=hM}$r9T$C$F$$$^$9!#$3$NItJ,$N0U?^$O!V(Bfill 
$B$K$h$C(B
$B$F2~9T$GCV$-49$($i$l$F$7$^$&6uGr!&%?%V$KIU$$$F$$$?(B text property 
$B$r2~9T(B
$BJ8;z$KIUM?$7$FJ]B8$7$F$*$/!W$H$$$&$b$N$G$9$,!"LdBj$J$N$O!V2~9T$rA^F~$9$k(B
$B0LCV$K$OI,$:6uGr!&%?%V$,B8:_$9$k!W$H$$$&A0Ds$K$J$C$F$$$F!">e$NNc$N$h$&$K(B
$B!V(Bcategory | 
$B$NJ8;z$NA08e$G2~9T$,5/$3$j!"A[Dj$7$F$$$k6uGr!&%?%V$,$J$$!W(B
$B>l9g$K$bL5>r7o$G2~9TD>8e$NJ8;z$N(B text property 
$B$r2~9T$KIUM?$7$F$7$^$C$F(B
$B$$$k$3$H$G$9!#(B
  $B$3$3$r!"!V<B:]$K6uGr!&%?%V$,B8:address@hidden(B text property $B$r2~9T(B
$B$KIUM?$9$k!W$h$&$K$9$k$H;d$N5$$K$7$F$$$?LdBj$O$J$/$J$k$H9M$($i$l$k$N$G!"(B
$B<!$N$h$&$KJQ99$7$F8!>Z$7$F$_$^$7$?!#(B
----------------------------------------------------------------------
--- fill.el-24.5        2015-05-15 21:16:51.000000000 +0900
+++ fill.el     2015-05-15 21:21:26.000000000 +0900
@@ -585,11 +585,12 @@
 (defun fill-newline ()
   ;; Replace whitespace here with one newline, then
   ;; indent to left margin.
-  (skip-chars-backward " \t")
-  (insert ?\n)
-  ;; Give newline the properties of the space(s) it replaces
-  (set-text-properties (1- (point)) (point)
-                      (fill-text-properties-at (point)))
+  (let ((actual-whitesp (< (skip-chars-backward " \t") 0)))
+    (insert ?\n)
+    (if actual-whitesp
+       ;; Give newline the properties of the space(s) it replaces
+       (set-text-properties (1- (point)) (point)
+                            (fill-text-properties-at (point)))))
   (and (looking-at "\\( [ \t]*\\)\\(\\c|\\)?")
        (or (aref (char-category-set (or (char-before (1- (point))) ?\000)) ?|)
           (match-end 2))
----------------------------------------------------------------------
$B7k2L$OM=A[DL$j$G!">e$NNc$G$b!"(Btwittering-mode 
$B$G7o$N8=>]$,5/$3$C$F$$$k(B
tweet $B$rI=<($5$;$F$b!VITMW$J9TKv$N(B 
hyperlink$B!J2<@address@hidden/$J$j$^$7(B
$B$?!#(B

  $B%3%a%s%H$N!V(BGive newline the properties of the space(s) it 
replaces$B!W(B
$B$+$i$b!"<B:]$K6uGr!&%?%V$,B8:_$7$J$$>l9g$K$^$G$3$N=hM}$r9T$&0U?^$,$"$k$H(B
$B$O46$8$i$l$^$;$s$N$G!"$3$N$h$&address@hidden($^$9!#$=$3$G!"!J>e$N(B
patch $B$r$=$N$^$^MxMQ$9$k$+$I$&$+$O$H$b$+$/!"2?$i$+$N7A$G!K!V<B:]$K6uGr!&(B
$B%?%V$,B8:address@hidden(B text property $B$r2~9T$KIUM?$9$k!W$h$&$K(B
fill-newline $B$r2~=$$7$FD:$1$J$$$G$7$g$&$+!#(B

                                                        $B0f5b(B 
address@hidden(B



reply via email to

[Prev in Thread] Current Thread [Next in Thread]