emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[ELPA-diffs] ELPA branch, master, updated. cb753c3ace486a17e1f3fbb3cbee2


From: Stefan Monnier
Subject: [ELPA-diffs] ELPA branch, master, updated. cb753c3ace486a17e1f3fbb3cbee29dfd20ae68d
Date: Thu, 15 Aug 2013 04:13:02 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ELPA".

The branch, master has been updated
       via  cb753c3ace486a17e1f3fbb3cbee29dfd20ae68d (commit)
       via  c45346a3c823eaafc09b96d2c33ba945a287346a (commit)
       via  af5a17495f80e22dae84f22f2b8b4b1105ca102b (commit)
       via  57560f2651584873760f4034259935c3a568f1c6 (commit)
       via  6817d912be60c8d261856ee7c0ce959561e17f32 (commit)
       via  e5bc365387b8c37f425e25e233f1528fa20c369a (commit)
       via  4861427a5a8b64fc6ae555a140129c27a1d62175 (commit)
       via  fae643a95ed3ba2cefbe70c94d16da7b17877dca (commit)
       via  de7288845c1310f3e6f79b8e5cff7415a894c748 (commit)
       via  4faa2623a68e90c3b817bf83f2ff1785b85684d6 (commit)
       via  06955397d6103651fc01022dc45174b72b4260dc (commit)
       via  fb883784a1c773b4a1e43d2aff7658b9129eff00 (commit)
       via  28daa752f9f5578f989985ab3de02a82792c66ef (commit)
       via  bc5c2a2ee2b993a18e8e23ed725829d403508753 (commit)
       via  6f033f25424768df826b2758e0cfdfa398362299 (commit)
       via  4089d1cdb85a55d8e5add426a9c07402ab6ec3a5 (commit)
       via  034e6eb9154a367f0692f7804f48217a6834620f (commit)
       via  3e060d98a5cbfb9ea167b9e2e1bb505561d056fe (commit)
       via  714dca50644c75884d9d90f10328c7a12e02cdcc (commit)
       via  c6ca082c191cecf616fb531958ef390f148bf6d8 (commit)
       via  9e7c6bd3c54ee17bdd639d27184a2d53681ab630 (commit)
       via  1c53de75e0acd19d61ad45a91b32c183948e5128 (commit)
       via  ef861dedc420453d91b348107633a3043b371be6 (commit)
       via  b63de685c2daf93686e902d56f8aca424ec15706 (commit)
       via  3334309116496707a52b48ce7f2ce4553a5ffbc4 (commit)
       via  f546cfdd8ede04c5574b3348c7458bdd15497321 (commit)
       via  fe5d11f011a2e4b5958d1dd698de7afd10c2f212 (commit)
       via  908c6f6e89af8b32b80591bb0095de86a9441156 (commit)
       via  c573b74da1e9056f8a3fbeb826600a8d254c5445 (commit)
       via  e8bb6cc80417af65d9a92cb871cdc4b7283b0eee (commit)
       via  8c9ef10eb295dbbee28f98510c89d7ef1c8d333f (commit)
       via  98ffa3dbf0e0d1728ea17dee5c09728163dfc8f5 (commit)
       via  a11ba885a58db7092b2f15d181f4c2a28b8ba08c (commit)
       via  0b786f9e8b050c397ee0740ebe955d6daaa9e010 (commit)
       via  2cbe8d9cbd9151ca94b970eb567bba073fa088ff (commit)
       via  764d2aa4ba50081adf69408e62d4863905b68b7f (commit)
       via  900a78dbaac691a6a852eb6e19bff16370de8add (commit)
       via  1d28760268f22306673b718bb3101c4121699685 (commit)
       via  100912d9c7a77d6349023a6cf91da05dc9f6e7ea (commit)
       via  a671e2ba473eee74cf385026be0f919a7de0cc86 (commit)
       via  d2587c44cefd96b52a27bbc296cb8156eb2ad773 (commit)
       via  b869cde68a1cae6f7d81bcc2bf0af88dc1c80f79 (commit)
       via  7499a00484fae37d8b6cc75861aa08f26418788a (commit)
       via  e374ba2ca46113722559ba0f87204530ad8c9d47 (commit)
       via  9150eca78f27925ba72389e830c32f36b3368784 (commit)
       via  d02dd88006c5584e434e7f7ca9f4954ab5f8b7ee (commit)
       via  55ee07cf95e177ce1a5e3d23a53d354749314846 (commit)
       via  6f2d10ada20e0854033019c38bfdf74a57a34cd2 (commit)
       via  11bbdcb8cd323f4a22793a4ded61c8c3e3396aec (commit)
       via  d21bb454dcfacda8808b596e4bca85a53a99eabf (commit)
       via  4456662366342b75413e2d7b63a3d229220211f6 (commit)
       via  c1f2813c30433d642f9a3c73b4be3d1bcbc03c93 (commit)
       via  9b1ed514d64f9adff97f1b3b75023ad7ff743887 (commit)
       via  757ae4bcc18549e85b3131664ca3639a759ad162 (commit)
       via  c50f3d1d9db63bcbea3f02036ee17ab0d7511be0 (commit)
       via  e48289f90d9b8ffa179a5505970421136ef42150 (commit)
       via  5c7e8c516f577c6266b05e8a09d4ca6089295f06 (commit)
       via  cce396a2885f4b91edb4383d85ecc9e38a7533db (commit)
       via  ba08184a0dfba0b6f988321fa83f0f061ab0b8eb (commit)
       via  3c69aea0c267e7bbadd5e35eb6cab54764c9d91c (commit)
       via  2560f92866a1f15ca393b7ae330d755648b2e786 (commit)
       via  0d1b276e2240bb765908c895cbce862f9a54b9d4 (commit)
       via  068a36adff25e244dcbb21aafb953fc3b66c5853 (commit)
       via  4c735454d91f9674da0ecea950504888b1e10ff7 (commit)
       via  41b1eea33bf85095a2211e8963b0b307ce20147f (commit)
       via  409bc6a7d16a9edc3337b90ca878acc3f1e3ae17 (commit)
       via  4508b7a70e18da25d20cc2ac471086fdd51acf2a (commit)
       via  1331b718431597d4dcf2bf432ec642b456fe408b (commit)
       via  3d7683107180203654e0da80ed556240bc94c2b3 (commit)
       via  837c8899e6957a9acbd058d3c3d92bc165956f07 (commit)
       via  f480808a73a2e60c2480bd89825d0af60b75b9fb (commit)
       via  d159a22470d500c7095261266e7bff9139bac2fb (commit)
       via  2e9af64d0fb19dda43da7ed90df825f3b231d6d4 (commit)
       via  0a0e8c6fec890b2ce9823da234f7668e55162987 (commit)
       via  a254018f99467ad86d0bd6a798b9ef88ca92e371 (commit)
       via  5e0b93a40db3299f32ff6861906067ae7f881607 (commit)
       via  f06ba5a6a919049f169d7507433b8f4f85b5b90c (commit)
       via  6e37b4c18e63464a544941f6968a4b063b4eb16b (commit)
       via  dea7474d33b5164c40cee3e557eb287913da566f (commit)
       via  7d557877cf536db6639f6598bcc87001f9f59c11 (commit)
       via  81fc9e178f2a5a15b8253bcc3c70854dc9cd7736 (commit)
       via  c1dd7729321250407f804f0fe26939ea141f6e14 (commit)
       via  27d3053993f73460b3ec48f4ae9779577f3c829c (commit)
       via  d4913b4147167bdcde22b44e4f0ec74f265e562d (commit)
       via  9add1d8d3339153a5ec121a47e89bfc3ef1b1002 (commit)
       via  ac6121486845963000096bec0d81b81742f13702 (commit)
       via  76d189f52b6965447e6b0451fa62181a980fa6fc (commit)
       via  61e87e829103cc8356807f3dcd77a5bc1f0e09c9 (commit)
       via  f5ee458241950b42443415e5bf42eab182b100ce (commit)
       via  0b019b223ccd5cae67211ae8498091f186148477 (commit)
       via  1c8600b4ccc326ea8046e22baff403d7918b14d7 (commit)
       via  baa85ed19e057e78d24f001f9331d31575c8c688 (commit)
       via  eda08529b0f8cecb84c57ced2e0776524c830a8b (commit)
       via  073e167270d6a968fef45c1f0d20aeedc062fa52 (commit)
       via  ed098081e740a9db75af3ea8f77edc3191de3d58 (commit)
       via  947aebba714790a8d5be48987f32af1a1def2bbe (commit)
       via  a696ca3aef5df9260ee2564b0c0b77d5b5c3a8a5 (commit)
       via  0fd01279dff979f8831764d96dd7d9a1f046bf29 (commit)
       via  1d919104f29f8a5dd9f9f5e09b6c4d168a43e3b5 (commit)
       via  4c4829d664ab875f7cd63061b22b68d58846e19d (commit)
       via  0a642d5d31a8e0e22a4b2b2a48dafd6393b81aa9 (commit)
       via  6f34d76541a64d51ae40ef0f5864072c7e677511 (commit)
       via  ffdfdad41eb066a3e967efb25f05e4cb776a20bf (commit)
       via  7c61476f696330e560d5d868fe8f779cd36b113c (commit)
       via  152bc897170749a4fb24ab0f0a0d32dd5523e4f9 (commit)
       via  92ac3d0ef663bca26abbda33cc20a02a58b1c328 (commit)
       via  40752cef83b8b7fbc8d662bd4fcf532b2250b2aa (commit)
       via  caa962bb9d4ce1760170fd3da1d4cdf653060204 (commit)
       via  a982f0fe043c31aca1a11a663c41c33b76ef0c19 (commit)
       via  b7f831babd449ba7ed04f1e3a7e82ff178af2c18 (commit)
       via  6a095e308b15d4dcc2358d8a2a3f88e440433a24 (commit)
       via  320a9d09cb3b9b484286c4bc1290d4887467d58f (commit)
       via  8563865558b7cf54956906c8c7b5c0dc98bced7c (commit)
       via  f3813a6acf3b795ac1b0e261b5c769c3791b2a87 (commit)
       via  f77e02d4f996749f51bbc4c035c0e0d7dc16bb03 (commit)
       via  b46447516d13fe5b56428215b8c9d6dd35451375 (commit)
       via  78f8b974a8f68ebc4258d5b1fcbf4b03f2223501 (commit)
       via  49436401cdcb18029dd37bb41c5c8f28ffe69776 (commit)
       via  988cf9d8c21499ebdec0eb6d15ba4d92d5a2830d (commit)
       via  db19d03474dee277158b3ed5de088aee9d152913 (commit)
       via  a2724d172a55091de641baba1b6382b2d24668de (commit)
       via  4b909bfb2baed9afaf2762b0b13b9490ad4bc246 (commit)
       via  898d24473460332ab92bea5367b93ce6b8aa86f8 (commit)
       via  5c3f8acb7acb3214cf693e9842c5288fe810c5dc (commit)
       via  ae0e0c73b0bc0ad447d34b4900320e4f934de377 (commit)
       via  81f654a44addbe4376c18c9f7fc401b8103a606f (commit)
       via  d5837b4f4aa8c9e393579432afaf14716b608309 (commit)
       via  8774bc9596333d838cd941e0d8b27065b8002894 (commit)
       via  8dceda389115b397de48becc4b68a64f4dc4bbab (commit)
       via  ed643b908e0674ffc1aec9af2df5380ddfcedbb8 (commit)
       via  7e80033bef50bd077b335543275736a552889104 (commit)
       via  da7ddff57963996119c50d75b89db70fc83a5888 (commit)
       via  6422b3e7efb554bbfc8b9d9f051402d9097573b1 (commit)
       via  33d2acd2a8fa3ac7e6cb5f712baa8507662cf2c8 (commit)
       via  8a23e481449111d0050e0250039ae8a0558807c0 (commit)
       via  0259e7b94c7c6c00072454ade0716cb5d3646dbc (commit)
       via  b446a994bb90e8a62cc7ff362c8e0421ef9c226f (commit)
       via  ed75169bc3f458a25a192186c0d05bff8a54be36 (commit)
       via  fa89135e030bdea584b9c3f87992e82f6b3fe1ab (commit)
       via  50293ad01f7ad9e1280a0b0845545516260f4505 (commit)
       via  4ff66327158ede1b470fc4616db1b68d9f561cd4 (commit)
       via  83cbc7d328415bdf7aedfa02ca3017d5cb16dd11 (commit)
       via  9218392f6e80c0f24979259721b23e9e75d61002 (commit)
       via  3ac29fb27bc3809d04ce54f773dc5b3e3ccde78e (commit)
       via  d260c2486281f630301925a1d6d2ebcc16bea1b8 (commit)
       via  42e431dc7f4a22b476884139aa4d8b73aebdd25c (commit)
       via  36108c9f82d401113c2b87c18576e9835bd44e1c (commit)
       via  fb0e4cf536171c8faedd1df612563a327bb7baae (commit)
       via  bcae310be39553776055e0d8bc6289555f6ed736 (commit)
       via  d0963a5db772b31f77f8a34700cfa401906302fd (commit)
       via  8427b8f1edd77234349930f440b2f03bf519221b (commit)
       via  f5e957045bb1f45f2aef8fd2ff43828e8a19891f (commit)
       via  e7dc3a7617d84b0f6955d0921a9143bbff2ba4ab (commit)
       via  8ec2c2db395f14ab194cd585150b8cbc6dadf42f (commit)
       via  35e38bb102b04fa59f64e9bfe7b693d2082d748a (commit)
       via  99efa0e85d46f3dff2185d5439704aa809403084 (commit)
       via  cdebad70a0873c0f9eca7b572aebe8b9a6f203e2 (commit)
       via  3a0a1eebe2be8f71c9541ed11a8bd79343cedb7e (commit)
       via  177478df812600d37d41b7f14443c97a42f9ddd0 (commit)
       via  1c07663062f3456c64f6d0f2554e505b7815c921 (commit)
       via  5a18e987dd87b33d1e8c8250d08f6580b1eb1737 (commit)
       via  eba32647fcbc74480d8955cd26381e3bdc7cf96d (commit)
       via  43d9131e07bceb60ab136074b1d32becb5be0c02 (commit)
       via  c58998e8e4ebf93434c77b5b7b2691213a3533c8 (commit)
       via  4b2c71f7919166c4a37487c8859285a1f49f8a07 (commit)
       via  c985070615a9be6a350708855fe2454906317c78 (commit)
       via  3dd60d13c7bb4af33d1a0b0ff320d39039cfe9a0 (commit)
       via  509f231cb803209017a31299343c2a3317fc2a4d (commit)
       via  29fbc711eda6a3c43033ef4e8c3a4603aff3db87 (commit)
       via  24c73b930aff562cacf9c068b7f1c9ab6521eab2 (commit)
       via  9a2dba0b6ef2f9b6a0191c8a43c9dc083d31b804 (commit)
       via  6d979b80e37d66b83172feaa1cdb8b5b994619c0 (commit)
       via  6d14ffbfd6c1dc061c291d630ed63d3b2241c043 (commit)
       via  809c7833579de5217069c6e678c30e0667c22a9a (commit)
       via  06ca7849f29189687aa380a2c3d9c84c7859aabe (commit)
       via  23ed20ed236761b2aee517bca01810b9324698de (commit)
       via  0970c3d32dc3aff696f41d9a4fe9050c2318d65b (commit)
       via  56a1a36395f0d1bffab96532d71e4345eb8076eb (commit)
       via  1f30a34741c61f35b18d66b6b506bc2a8242f858 (commit)
       via  9bf653e045719b0823de5c809bcf0b8751f8c3a8 (commit)
       via  9ff7b4160ffc4d7639f8b184f58d0f5a4abe897a (commit)
       via  1868d5c64e9fbc764bb668fd8077b6f4829464b3 (commit)
       via  da32a6a4e9fd28006e4a53e99250e80587cb50bf (commit)
       via  38aa1ca2f88607c8cd9f9b5a14bf0dfadadc5546 (commit)
       via  5b0f5b93f6982545561de5d7be19b3fc291a0814 (commit)
       via  3c666787bf15c85809ca0c4f3813169b819d3270 (commit)
       via  f18a8bc3004da4382bdcfdfa4cf515853b0d2e1b (commit)
       via  acf66fb09d6bb44e00e789994fa0bb916213459a (commit)
       via  48afb6016c87bd72ce6c14b1947b2c22a8827f66 (commit)
       via  dd7ce94b2bb4a8967cd442c601cb4bcb765306a8 (commit)
       via  1e34bac4cc864071284c40b7a0d06cc4b039890b (commit)
       via  dae36cc520cf60960d0d650ff09c09ecf5525d3a (commit)
       via  72fbcfaba1f40b692845a38d9c3c36d8338de59a (commit)
       via  1925479b9f782bbe339e7f9e80653cecd6f12f2f (commit)
       via  fecb101033b11233cb3eb0a2b288665f5c1ff1d1 (commit)
       via  72a824ffdf93287d72a0479a6a210ad0af46724a (commit)
       via  c2fcc867f9014315646f0641069cdd3b614a8bc2 (commit)
       via  ab9d10a7fc525a4ffcf3c90b218484c4fc7089bd (commit)
       via  65a07086a81663b372c8589da4a966fa672956e7 (commit)
       via  32b8bc35f054b315f8ff2bffc6489589c43d5964 (commit)
       via  ecf7af6c22f3ba8bd189ebb3b3f86d1bb85f7441 (commit)
       via  78d6ef179eeec28502ff821f2a28d7ba641adebc (commit)
       via  7a195c6bb28b93a12a73a51c445e35cd017f2c68 (commit)
       via  9f69658a364991b0bbae940eb388dcc452aaa8c6 (commit)
       via  6009938d5bf83ea53e59831feaec5af549d0d0ac (commit)
       via  52a81628a9646f9aba03528b26efc5c6cb4a08f2 (commit)
       via  d79c8d053db68cff5d718b64e44b0b31d9d4b948 (commit)
       via  06270357092d267fd65e501a37a15e2f5e306e92 (commit)
       via  408c2e07e8064a5e6d7486ecafd19b2ee8a9ac7b (commit)
       via  d5f74fe53238d8dbf55dc8450b27b491861dc74d (commit)
       via  c0fefbb2b457a87c271fdd3a91d907f15d8c1d21 (commit)
       via  3b953efb9a7071f7dfb34906247e2a8e554fbb45 (commit)
       via  48ecab18628772451b8870fdc5ac4587cd7be3ba (commit)
       via  f2c4167c3371da3632fc264a6fd111d9be4ffaf4 (commit)
       via  a2cdaf107a29ad6c23ba24ad60c09411b4e06a9e (commit)
       via  6ffcecc4be2d87a0cd9d061937cbd6083aa99666 (commit)
       via  f923ea8dc00419742ddd2745c5ef3b5d0c20da07 (commit)
       via  393453f1e22a10bbe7c56637500db8ff9223b30e (commit)
       via  d121d4ece2a4e973347db3404071419bf1c19e63 (commit)
       via  f219f7fdcc19575c7890b7a7405bcdd1dd993881 (commit)
       via  292684bd46ca5c9eb5a4ee6942b92f92896a716e (commit)
       via  25f2c535458972bb1309f7c602454bb56b656fd2 (commit)
       via  1043ae9a1eafc6f5cb3ffb60d1410a16afb8e2ff (commit)
       via  ac36be9b2ca1348cbd912ad2938d2c4fcc88b64c (commit)
       via  ba3e433b5b0c78ffe08637a167bda549d1077527 (commit)
       via  5f961af80f5ca612dd74adace3fdcd3644a8078a (commit)
       via  9e572a0823cd101c9424652c7bccd510d60e5743 (commit)
       via  cb71facbe560a5155350dcc0466d4d47b8fa05dc (commit)
       via  b330d2ea8468fa102950f781205ec98c7942f44a (commit)
       via  4cc87816c157ea2831a286a2264a1f259c535cc2 (commit)
       via  34875c88d73c92ca009c9d50e1d85aa9eabf7f32 (commit)
       via  fc4844b21da115448ddabce87735e0f6f69b102b (commit)
       via  afc950fec4b6b9d7c8e6ea48caa22cb36287c869 (commit)
       via  f08f6f6d960dec80eb8bf9749856e7364cc1bbf1 (commit)
       via  d861f1d075faf63ef11af087b0d53c19b08867da (commit)
       via  9108df1d0052c70998dee701c58abfb74e36c0ed (commit)
       via  7331c6efd2c9569da8aeecda8d64a421a157b5dc (commit)
       via  739760229c25979f00456ce62b0bf729d6e6fcda (commit)
       via  8bf39d5e3ee15eb9c4fd111eb08e081e2cfdb513 (commit)
       via  0b6d832a8d1a7db39b1d6fbd877bb5139ded6c06 (commit)
       via  9e1a4d8a3b4b738e238ac6a385ab9f1434f805f8 (commit)
       via  9b1f9009d934ec917bf4770518df9dd5b4fe2f1a (commit)
       via  d3dda607ca2c34ddfed658ab52833ec8741d7c10 (commit)
       via  a97240339cf2fc42c0df5d66e0602e8c49e6e9d7 (commit)
       via  6d9d3032e24eeb856115b6309b2ffbbbb8dbcf38 (commit)
       via  8b7d5ff1768dc573b9d2e64d1fc8a5973de163b9 (commit)
       via  cb0a58684509ba5d3546d7d08a11b136ca294c11 (commit)
       via  ffdeedf11ae57e976c8bc164ebfdcf1aff869a74 (commit)
       via  f713d6fb3b46417d500d2836d9b6aa8df2093e54 (commit)
       via  38585ff9eaf38ed0f38cccd9b8943204ee059652 (commit)
       via  fd16a6299ece3b9b0c85aaa1b48ffbdf56541270 (commit)
       via  1c3b98ac36bda12408d94b27092dc3b47e647593 (commit)
       via  aebd60c8865fd914e45a05f1ac5ad86988404e04 (commit)
       via  5309fdede51856423e09f3af021e01876c286109 (commit)
       via  a28e0c3b186c123b158749de2d38815757d20962 (commit)
       via  63f135e2bafcb6dfd9a8014045f8e89d46e2f707 (commit)
       via  3eb2651ce2ddff6f2dc83720eb15ba2617457b94 (commit)
       via  02f64d8bb616c81ff1c422c8130097a712ad559b (commit)
       via  67738bd56bdf9e3c3cd89bef68c4d4a11b220719 (commit)
       via  e90d7c659dd4531185c78dacf376241de32fa7d1 (commit)
       via  81ecc1dde62a4ed0c914ee206b0bf891e6425960 (commit)
       via  dcfe4ddaec667cd8af1827e570bc8b428ad5428d (commit)
       via  390b63293ed70673a840dcf52dd94041f242ca10 (commit)
       via  729ef3e0cc7d1ebb0a3f0461dfa542ab24d48013 (commit)
       via  ba49dd76036f659791be3fe78a093ec97da88b47 (commit)
       via  2ac3a72df85a0827017af119da69a3102f6c28d2 (commit)
       via  2621fccb238fbfcc337cb853c2fba6a57c42d300 (commit)
       via  e861ebcbf4bfc303be5ff3866b77e791e14a08fd (commit)
       via  c7999fae536e0cb3af675e1ba308e4ad13497c01 (commit)
       via  2f274258aeb4a66e16d3f90bec40b00b6f080dff (commit)
       via  cdd25bb4c7723ee0f10c59f0afd8e7a75fd4d031 (commit)
       via  807010e5ebfe9e3501e679f17cfd5ba3217db870 (commit)
       via  c3b45e3d3375f8ecd7f30060432a0265ab93d2db (commit)
       via  ef7de01af0262c366b3e7fffb615bbddd43a1e88 (commit)
       via  65854534288acb77e47bc45ed407a8e282332438 (commit)
       via  eca4241cb8f0f972b12ec0eda1537605dc28458a (commit)
       via  624f5e661849ac91d53afbb333403114eee4ecfb (commit)
       via  bfb482fd6b4ad4c14ddfd23546f44df628b0c1a7 (commit)
       via  6d7b67ece15c78c43ff5ef1cca556def20356bb1 (commit)
       via  fc2fa199996b6253bf510308569c7afe8b009d2b (commit)
       via  214e28d45b679b6538f8206d6af7be6935dd3038 (commit)
       via  f66b9811b330f1748cb0093270345291f88419a8 (commit)
       via  cd4a73fa21cfc6764a21cad41647a93954d940a4 (commit)
       via  d6d936c7a272ebce700be845d7e54e7d917afdec (commit)
       via  91a2895d72470c81e67bf40227bbcaa615d8894c (commit)
       via  2273af9f6bc85e7244f5229d9a53ae5a1d197eb0 (commit)
       via  5f9278407351f5b8143b9f989e152723d1fbcc40 (commit)
       via  a13e76c84739db1849169efbaf6112626ce720f5 (commit)
       via  d74c943aad4b5957ba22fa22ecc026a36c5c1237 (commit)
       via  0ce35d2e0edb36f9616d15beee26516c373109d7 (commit)
       via  8f1b568741b158db05b9d7f62960a42e902f80a1 (commit)
       via  291285e9edd45a4e8a04807779b2d8f906c8c4c1 (commit)
       via  920957f2004997dbe1f497432f6728c30c3da394 (commit)
       via  07062a9b12e63b3069d9790149873510e1c64c36 (commit)
       via  7e914a0ae0b19531bb7e0040e01943d2f3079fa9 (commit)
       via  30a7a207c3f07344e98a9b5adccff89eff11b278 (commit)
       via  74eea614e64b29d0b00f0df6c3b1946014ec7d23 (commit)
       via  10801fc4e6f4c42069b0be08f372053a8e5f7c81 (commit)
       via  273978d3395868d4aaef8001cf5f15d17b63feec (commit)
       via  69b1b57fa8a9ecbb80930d028be30aaf0f934050 (commit)
       via  c1d27be5a4b47ff5a3b36386531741dd7cf177b9 (commit)
       via  d2b33b2a37726e5ccb36c9eea68ee3446d442bc2 (commit)
       via  7c55d29882ff67a19368bab5ed8bf93082a8377e (commit)
       via  c1d78d95db50af380f53f4b4c0737434e41ebf1b (commit)
       via  7450e102b1108ec2edc319a4d61ecc6f633be961 (commit)
       via  843a78d2a4fedd18386510ee78152d31898c74ee (commit)
       via  ecadddfd280bbd9239952ea06e24b995a7f57fb2 (commit)
       via  3baf07adedffade081703ce45059b4a3182e0865 (commit)
       via  1fa14bb71df4b0fabc123234a517533a19077f6d (commit)
       via  f4ae1de92f40837e67af46378fd27d02c0e6bd22 (commit)
       via  086cacd47c24f1a8707a82689d5dec49656f7562 (commit)
       via  ec0427470f8fe5e2a10c7658b8689852afe2a890 (commit)
       via  843455d84ba4de1140232b4f540fa50105081e4f (commit)
       via  7630a844c3453409825364e0ccb1504b1efa4b08 (commit)
       via  eb89f06d7e4329f5041dce998f2e093259c6b4ef (commit)
       via  e378db4d306907e8af78bb1c766d5dbddbbbf4f2 (commit)
       via  8b78584fd26a465f66ecd3c32c5f4106823bae51 (commit)
       via  bc1e159ee95c120041c972b147bbe81a3f178bf5 (commit)
       via  139014fb75e81fe1d6f355543d85de898e61d555 (commit)
       via  bbaa2843a38bd689950e9263c4f4ba5747eb53ed (commit)
       via  a310dfc91eec38ce2bf3553ef5bde2fe532b4505 (commit)
       via  40dbc6935b8012a62e6f6af8048d5849a64edc6f (commit)
       via  803ff3611c32b0cf677f565e4d501a686bb705ae (commit)
       via  540578b749644cd6f4d97fc137dd9fce907dae68 (commit)
       via  a0a66f2f6a1edf5368251bca7e76cafe2232fd1f (commit)
       via  2583c1b67ff8abe6341bc7a1fc661eb40d75694a (commit)
       via  0fce282ff01c002509443372fec2279794f89cf4 (commit)
       via  297244fcfd3766c1cd741b90d630d85f9d9a0258 (commit)
       via  99ab8c8ae50995afced95712e11bfa21ef02c71e (commit)
       via  3c5871ba43930d0aef427559e643b8ba32aac043 (commit)
       via  379547c62aa3dfd2b20474a1a68f42d3df0bdd72 (commit)
       via  1be7648c0248bb95505c2c26b1bef70c2cf38ebe (commit)
       via  88ada6dc4f6228bdd03ebc4eb0675ab54d79d387 (commit)
       via  a2e8934cfadb242af6df209703311b062d72d448 (commit)
       via  6b3f092e023313c5a00c5cb1796b4ba78039e779 (commit)
       via  389992b77b25bfd1cb7e4492965ed8a5f1ff852d (commit)
       via  fa107c54964494dbe5c4b0e850c34c0350a4160a (commit)
       via  f0392a63145a1935e97092100af687482e64aaa9 (commit)
       via  aefe34a40d41b3ec57c86e552b0c3e9f29cbdcad (commit)
       via  38e5c5efbdcb7606da9aa854e1603323095f5db1 (commit)
       via  86e1a266379d22948aa24502aa744e6b4762c4ef (commit)
       via  7a0ae5bc110f1082dcc24f63aa0feae9d420a65a (commit)
       via  1237b491508e17f120b2bf72ceb7e08e772dc201 (commit)
       via  ae1fdace89cf97de3bcafe044b8724c9c4d76028 (commit)
       via  511dd418fb002dfb636ebf9e0b05fce4c903ae34 (commit)
       via  be3031f0473ff47ed045e81c141b977af937b740 (commit)
       via  5b87a3e075ef777a8ed44245d5e05f35cf1828b9 (commit)
       via  9947b8385420010495fad05bbcd42d73a46b49c3 (commit)
       via  b81dc1690b3cfd4153e7570bdae77894fbc9e0fa (commit)
       via  89d510f78de51c2300596577a5469428a105ccbf (commit)
       via  a1e6f9ca64d7fc81c000b03b77d5d43497aa7dd2 (commit)
       via  3555767aeac82d0f3d9f85ae13078207927a99b2 (commit)
       via  1b19cbe7b746467b97927a55078f0a7465991e64 (commit)
       via  d529164cfe20b65d1389880981d4ec1f6fb86acb (commit)
       via  67d7e79306ee83ec15b8711c092e616bf1ba2fe8 (commit)
       via  2f5168af1b4cf2ad6274ecc6fb36cc0e2b1670c5 (commit)
       via  acbeab6ed191f7b7013c7d5b0d3bb2e230fc5673 (commit)
       via  061fde1ff9d88407908c349146fbee568bf0b632 (commit)
       via  0a84731c4fe8b85482ba10637def80b932b112e9 (commit)
       via  45e8cca8bd8ffc6f4d22d38d18d04576899ca7e5 (commit)
       via  7b9dd8ff21072c833ec4838868bb7b69a1a6d955 (commit)
       via  be599424f028dbde8d37e81d5dcd8e9737a6ffa2 (commit)
       via  52241c5544294964b9e9d2f0b61ace82384779a4 (commit)
       via  be0394e00f530fdd999f13e3d653b3eba8977434 (commit)
       via  fef03725b09448959075b63b73c7e6ebe14b3a27 (commit)
       via  6fb5901f57f031cf68280c34e31d455f7535546d (commit)
       via  5efdc9a2d8bdba4515390e8143fecad22ae28cd7 (commit)
       via  bbb15a4a6c03a2e64ca6037fddb92e9f3df3c1c3 (commit)
       via  a54bd05a8f35ec42abf22dcca541571ef2f21e1a (commit)
       via  2619e05769df4b48c56bca513e8a371cf3d45231 (commit)
       via  cca2fabf40a165b196b436cf371ebca7eaec7707 (commit)
       via  c3ec4af58c12c787a8e09cdcd74b986e93e59964 (commit)
       via  47dd40b100ecae0deef41a6533b402fec740e65d (commit)
       via  b65328cc09e7c802ae29142ec5e7fa1f18ecacf1 (commit)
       via  1482463fbd97acd81b29d9170d27080a2632de04 (commit)
       via  29d8f2f1b8bd3d4dc452060e06ec407b0a6a8cf3 (commit)
       via  0efcdfe447db605ec188f80ae99caf0a1b48c598 (commit)
       via  d29b171b812893b30fa0b86eebbaf548518992f9 (commit)
       via  b02f4a0d72d0e2087038fe891e2580c4505415ef (commit)
       via  1303cca62f4ea725baf6e2d8c75ddd9578515ac3 (commit)
       via  f34455fd511bb445306b4e333f2c2845ee4ad96d (commit)
       via  f26abe1c150264162676826cd48a8fed87f3ada4 (commit)
       via  7ea106e70cd528117afb6764662a5832cc0a71f4 (commit)
       via  99f7a96c3e41f3868923d9278398b573bebfd122 (commit)
       via  7f15efe5d93ba80a715150ae9e6a15c7d8b1f085 (commit)
       via  36d675fd95dec21602e7b75c4eca3c282b626a29 (commit)
       via  d8ee6b767476250249522dfa3a746602841af28c (commit)
       via  a7239526f15989df87dd3a1b86ace42c36254e18 (commit)
       via  4878bd1666badf844156b6f983759e4aebb047d0 (commit)
       via  8d31b971122585f477062dbd4d317125acf58945 (commit)
       via  5c2b2351e6d1b9be40b3ac232bcb20fac5eadf69 (commit)
       via  23b132e4a7c0eb42bd3ca94a2b0efd92fc6d5979 (commit)
       via  22b032250265857d0e6e1f90ebb6db0124180cbf (commit)
       via  8797b3632854703d65010764821a7a81c8d4ca24 (commit)
       via  f2b9aa57779dbb70b25f2541216d25ae0b24cd3b (commit)
       via  4ac8fceb9b3f4fa2453d4a77a3f66de6a6f9bd69 (commit)
       via  489a4b8d3930eeb9afb129b4dcda544efcafa4b3 (commit)
       via  74d5c10c17eacbfd2f70ac5b8e9f73592040ded2 (commit)
       via  0202adc6b67cf74575d090be9c94f4111aaf6798 (commit)
       via  1f2f140ea03fcbc561200aa2808f6a120758eee6 (commit)
       via  0777d9397fb52f2c98b197339865179d326d47ef (commit)
       via  5a8b995a509acaaacdc33b72149b556d97bfc53a (commit)
       via  b5bdb101548ea334b0969a5d35f9fbd39d438d21 (commit)
       via  e5531044a9c33ea129ce222be7c0cbe186a8db6d (commit)
       via  8904556565ffebd707e140fc95b53899ac026a38 (commit)
       via  f5ab391dc686a27a3d6f070657d7279001c5d5d4 (commit)
       via  4040ae07e002b8457a49f1db108084aa012a1503 (commit)
       via  8513a7e38d7bf3538d235668ec16081cbd561460 (commit)
       via  6525366e5557c7a53197856dd568063a2a1bba6c (commit)
       via  a98e56fbab64dc5c35f568420672c8f2e490551d (commit)
       via  aeda94490cfc4eb0063585253f707d4042d60ba6 (commit)
       via  88718f04077c88362a2a690e1e32fdb11e522e8f (commit)
       via  77f761c9b1db777529656bd3f512ebe1a04b29ac (commit)
       via  002c8b5728625454c4f271695db21a1f6239b6bd (commit)
       via  eef37baf475fa8311176ff80220c5f7c0a502c13 (commit)
       via  b8bbe207d2f426fbd9e034c1f65cc45bc6af7ec3 (commit)
       via  f9664738bc043b20c27b9e7d6560759233d96522 (commit)
       via  e9b77128b33d0403e09ffd278447e483ce9b125f (commit)
       via  f72863163f32877d837dcacf1f3a9ce106af6493 (commit)
       via  7031812ba83c01246205b30a11fc79e99a0a41ea (commit)
       via  4fe753df26e46c55e65cebd82563eaa21b58ded7 (commit)
       via  6da6686de57c149edcdd86c85dc95d3ca8e88a1f (commit)
       via  dac0a43c5314b510f1b281dc910ebc33500902ac (commit)
       via  56bffcdb508f932924a25bffc20f4736c52ef1ec (commit)
       via  db9ab33947c409b4ab88570e95ceca0985cc69fb (commit)
       via  f63c6546ddbf1e7711b540c96f0c9adb8615e449 (commit)
       via  f32de3dc93741ac13aed564aa1d0fe98baf6e57d (commit)
       via  14e94a46039336952def0b7ea7cee01a588938dc (commit)
       via  29a0539625ff000d8594b4d20959d9cb806583e7 (commit)
       via  e0f566b2eab3dd39489f9a73c1cf812db52f9b87 (commit)
       via  f8cb9c52614e0a8e477f1ac557585ed950246c9b (commit)
       via  ffd6783e8a242e8bb29d18394cde3b0dd419d5a7 (commit)
       via  620610cdc7b199c10e6da049672f19879d22f247 (commit)
       via  39f1f287fa9f9331f3a4ae580c7d7dc716aad035 (commit)
       via  cf885f0eb3bfd8eda973aa4b5e89ec3bb235b01c (commit)
       via  559f84b002d0ee1d16102c063b408e9b0eb66d8e (commit)
       via  95ed2b816d37c6b204df32316f2a0e998bc7b7a8 (commit)
       via  3ee849316253121ec4ee51268bc814ab60d63b2f (commit)
       via  89b9afe67bcada229e8023ccde3846b68a4999da (commit)
       via  4569194b089f11d3ae76b384752c65c2c8be6037 (commit)
       via  a31f0a888d305a221f9262252e824adba5bddbc0 (commit)
       via  5c6135d76d3ea8daa6da4b3792ab542ab9827212 (commit)
       via  858b079d3ee5bf8ab7623b817f73cf958e684e02 (commit)
       via  d27c8afd4a3fd27fa1eea037f61b5c74bba8ddb1 (commit)
       via  e45e9c8ee2c9d9b496acb3bc0ecac02381b4cc4d (commit)
       via  cd50c7b7303886b71fc6fcca3526d896784e4bf6 (commit)
       via  e67ed6620ca2944d75e0ec66219e663171877d1b (commit)
       via  81eaac3d482d20e154b5e76d714107a176c40018 (commit)
       via  30b33129c0fd84fd689d6df70d1062f5295d93c7 (commit)
       via  3dfcca0eda08ea6be763876de4b20714e8cafcec (commit)
       via  646087a498bb89037ab2d09efab9fbc3c5c0d326 (commit)
       via  5d49f01e2334ac7fcd2ca832a6eaa428b460018d (commit)
       via  be9054d5b87b0d702a43a459c804cd38020924bd (commit)
       via  d75365c1f9e423a7312c8997bc2aba613cdd58df (commit)
       via  70b6756438d0ae0b14b015a78dc5aa30eab0c363 (commit)
       via  441da8ce869350162233f5e99b2171eacf403e6c (commit)
       via  f22f4bbc9bbcd0545ac8fb81ce96f44b0579668e (commit)
       via  1b560c6182e181b61bd2dd7e7af5a2bc9c405b79 (commit)
       via  10f23bd10dc62e9c050a534d38367743d0db863c (commit)
       via  0141a2ffade47f43939e27a887306473dcce0c2a (commit)
       via  8eaaebcc6874e7f9388987413187df8e9af448d7 (commit)
       via  29ee42a4c72e1e9d66a061e0b67bdd25737660fe (commit)
       via  4c7276574080d9355eb1673c1e1e6bf787830726 (commit)
       via  501b39c4dd806c7215f28eb3a3d14b6ea98e989c (commit)
       via  84f4795fc93c7727e3a23eb9205750ca0f644fc2 (commit)
       via  ee845b34abc0d3c43491ac2e4f18bc02de5bdbe4 (commit)
       via  06b72725d2b3760edd7d2caae93367593b395253 (commit)
       via  14c6ea539b9ee7b98d0c6b870c23202798ba37b3 (commit)
       via  db22d53b4e2dc16de057d6bf423002299be1fc3b (commit)
       via  20995f67febf797469872fd95bb8f8f2ff03fd78 (commit)
       via  262bf9d41456ebd90f4e59c82feb24ef9a5f98cd (commit)
       via  71c60bb15cbe04a3a26c017bdb7d683623eda53e (commit)
       via  41f0eb9581c157a63abab6b83f968ffb689b2e62 (commit)
       via  deb1ab085cddd8b6de24e62f869297adca355cd4 (commit)
       via  eb482e23d37d37d6e81460c210caddd710c2216c (commit)
       via  534ed78109065890d8845f0b95b2af61cf24a5b3 (commit)
       via  75be74d7c8f6f4c138d609ad407c78fdf7a873d5 (commit)
       via  9645a253bc346740c94254f149fe66f3f39b55cf (commit)
       via  6c42988804788b1cbfd7b58ef8dc587ed67e4ee9 (commit)
       via  881c6cac96141eb4050efa969a2bd42c44f77aa2 (commit)
       via  fb26aa742850bc005f2cbacd5b53fb1e5a007dec (commit)
       via  078fbf31db64329fd22428e5c185cd6e4448383d (commit)
       via  d2e427207aefd210b5b16905ecb17fc77192f483 (commit)
       via  0f921694700e8e78feec16ca1c481e2afb26bfd5 (commit)
       via  a5f1895b069615093ca119114cf9257667497640 (commit)
       via  43687bd20dd04e502d170d9d679fe056bc353e89 (commit)
       via  d8fefe3ccf5c7a561b3b5a79fe6f535265d85751 (commit)
       via  b89e002187ce932e82394023820deb8407842291 (commit)
       via  33ff92c3d4c4066d284dc621b941c57281f8f3bd (commit)
       via  1081075d7f56a45b5dba99a760322c5dedfe7614 (commit)
       via  237b190fa1f01bf133d718d973dc64dccde7d89f (commit)
       via  72a85d0491630210c1416fe93f17faf62d3b0aa9 (commit)
       via  818c1f5103c9c0f080244840cf0043faf21f2219 (commit)
       via  0e04e15571619f29a6852c230b32e97eee2e9be8 (commit)
       via  81bcbf7df7077db27facf0470cf9e31c18b8333e (commit)
       via  5cb48ab03c2e746bb989ff36c05b176f528b5d82 (commit)
       via  865fc07b6991cc215e89d1ceaeb00257195a2aca (commit)
       via  4b305cac3aee3ba82520834f0bfe6e201b7462d8 (commit)
       via  e872ed279d1bb31b6770dd7fd00269c9d46a8e12 (commit)
       via  82e85aaac1c16ef44036d303f423cdbac16213e7 (commit)
       via  655cf1e26a4d6f4a44ee8e92f0d84ab7daca7a07 (commit)
       via  75a53f12935f136508af0b52c1c439a613f32c45 (commit)
       via  eb912a1e53e74209b16e3d8fffa6d346371929f3 (commit)
       via  7bc2aae4a3c4f6ebdb94e5dffc7298af7f29f08e (commit)
       via  3596d846e4a7996e95fc48d6d39f507cf8b6d6e0 (commit)
       via  2148c5afee6e8e2631ae0c826eeb9b04495959f7 (commit)
       via  8fd1f742cade458446cb197a256f9b117948550d (commit)
       via  b0a2970d51f85c5dc076bd22cb89eb06c01a36e3 (commit)
       via  3a7798fbe921b2eec3991ab113d4c2d3630afec5 (commit)
       via  7900cdaed05644be1bac7a0cf01ed767eaf8ee3b (commit)
       via  c619af744cfa60cd5b7db1b522cedd35d46dc91a (commit)
       via  8da9119fc555dac0be20b1f26b528e3dfa1e5695 (commit)
       via  51b5764a74fbd45c106c0abc9d072132a7c3ebfa (commit)
       via  010db1c60172ea6e62906ab4cb39c47508e2f629 (commit)
       via  c0669aea52898002f35560e689a07d58aee4f915 (commit)
       via  722b4b71b86862911e407ac69f68a50d9b9e436a (commit)
       via  4390cc2ef3e52f71fde252f73d8dc62daeb83f60 (commit)
       via  4c8dbe2568fdb9039ef81665ff6c1a490b9c655f (commit)
       via  ae51a782544fbaa9e67ebc5056c0d93cd3121168 (commit)
       via  e5925a9de31ff070b8f7b2781d0e75f8c8b37258 (commit)
       via  b948e95ad982fe5bb17ce671f2566dcc1e22212a (commit)
       via  a7ec985d7f592ff0010908d5b6957e0d345577a3 (commit)
       via  8aea7fb84b49983f1d544c1d1d6134f7ed930bab (commit)
       via  7b31606884c0de70d07920ae5f2c3e93f7e5d5ff (commit)
       via  4a77ef03f76b169dabb6040cb0a20a5159e00f8c (commit)
       via  f4e1aa871bfe35983a989734804251d551785e59 (commit)
       via  be618dad3b73a64a70e89a27ca731d2466d7fbce (commit)
       via  b5d4b0324f56754fc340d08681ee1b9e176af98b (commit)
       via  c05e318d03308fa8eb7dbfa83533d342ad1530bd (commit)
       via  5614c2ed8f64d646a250d553b016db2f220cc38e (commit)
       via  1dbf7cec84b5b36cbf7d6477bb87301dd6667722 (commit)
       via  db942589fa0b8c864355f8667858d954bd878037 (commit)
       via  281c68476aa3382b8ed964c1839c1b51184ea6db (commit)
       via  958c32f5b53d5dad610da7fdb6511c7b78422699 (commit)
       via  416c9e42a06cbfaf098d97446cf75321aff3aba2 (commit)
       via  aafc6ffbebec389052ec540aa3d6620772719cf1 (commit)
       via  2a1518b5b2cca67cbe139a98a1c26b39f7c6a1cc (commit)
       via  e38e648f87ef071ee34e65cb0a3b065bf4b1be1d (commit)
       via  83be921a9b84a8f34e6fe90d444557c86f7823e3 (commit)
       via  65797fafd745160b62b64ac2dbbec8c0516efc4e (commit)
       via  6d1d92d7802f5908ae3cb0bd85942215de87f060 (commit)
       via  3f4271f084959bb825754600441fee1bac677268 (commit)
       via  39dd8a3a967ee9ea2188a36115b22ad052e97321 (commit)
       via  07050bcc310ddf7c85fc63b751c0a4a07c7e236d (commit)
       via  579e270cf98d4cbd6a37f5469274143e73acea90 (commit)
       via  f687d8cc0b507c1553d215bb7ae7d7185ca127f8 (commit)
       via  5703337fca7018662b5df528c492bd76392fa363 (commit)
       via  8bb36ac818bac352b19761698a670a3dbe551e44 (commit)
       via  5b957dde1236b05e3db9956310b08152892f52b8 (commit)
       via  89203e8ed0f4b57c45035dbb6ab9c1c54e732841 (commit)
       via  66c326b6fef15a3cb17ce1290bcf39bd0a8dd1fc (commit)
       via  be2305f545f64d0a3c0e5e71876c7b36b935787c (commit)
       via  b5bbce12dc2dfdc3bcfee13e702b9d99f113b84e (commit)
       via  763cb60f33390b1c6f9f09c9186872d7b1906172 (commit)
       via  cb7a69f255775ff04c7ae3dd7cf0ad6139c09233 (commit)
       via  fbee9504c5407f4a9f3cf6e85cc8d0655a34f0d8 (commit)
       via  799d213bd16d088c3234c7649ce84d8756e14bc7 (commit)
       via  024117368853ea06607cbbc0c9245d18aabf9e20 (commit)
       via  fcc5c9eac128c78bb87a4fb84f49cca99305dbf6 (commit)
       via  6b8d5347a4f6230c4d907bd585b1f7f2d29771fc (commit)
       via  fc58f2cd0c67771d31aa7fb3338137e82d5067ae (commit)
       via  a4875a92e8066b76cf6c3f2b2214af86b01b2764 (commit)
       via  5599c1b25e196e53a79dc1c5a48eadf06a4babb5 (commit)
       via  fed3408332db3915a943c157e5e37fd9e54a43d0 (commit)
       via  e65d0e9fa52234351373c894a86ac0cb6e921ded (commit)
       via  60b977edee66beb23feac8bec0fda143c3c0e77e (commit)
       via  c859f29a9d7a993a417552f58dec236f73f6fea2 (commit)
       via  810517800ae5d78c9c76f7d5e04f15ba2cdc975b (commit)
       via  45245a4699b527e06e36e9b21c2234d458d9461b (commit)
       via  9d8794aa2315025950f479f71501de6c3b2e06fd (commit)
       via  4d81f4f693d74d0f5dc3375f12871701a8c1f2f7 (commit)
       via  59697b40cb9d1d76bedabd89411dcc1192c967c2 (commit)
       via  32a113aa8971e93a382a7dfb1b069232238c18cf (commit)
       via  3044b77c782671b6ae83d8a3cd8ef37f8b038033 (commit)
       via  1e9af9a3d2c5af0cd64d938cae02e77f651254df (commit)
       via  c4c42be1f162893932038a2b6fad56888bf255ab (commit)
       via  80a8d7476ed19e38439561f7975aa8e6e33eab91 (commit)
       via  323ab3d99f0ceaad21c5903c17dbaebc501a80b8 (commit)
       via  522da2cde4a89b558abe92121f75027891ce9c64 (commit)
       via  e3cd80fd2bc73ba0684703a25d109c6dbf50e524 (commit)
       via  1a6a981dc70cc45635e7c6c7a9df0dc916c533d7 (commit)
       via  e779315ccdfadb24f7749c51a530dd178998a3b1 (commit)
       via  2fde2efff5dfd2d52b76dede7e73c3ecf9286c13 (commit)
       via  8a624fa926658e86d6b8bc8e10b8abc18b387923 (commit)
       via  2555c962ccdca0341600013a97de1aa25d6ea390 (commit)
       via  d8af108f5766b778f024702af01dfc30f3453080 (commit)
       via  8806e482a3fd1762000e9702e00ce9f3f70767d0 (commit)
       via  1ddd03c29b469ae525c7783168c082099684f2a3 (commit)
       via  c47c034230639afd5abf8ba22e696be9aeaf0387 (commit)
       via  ba301c31868bcf8ac0ce43feb0e83944cd91971f (commit)
       via  93480bf9fe6cd4ab2983854b448dafc1a1034eb3 (commit)
       via  0731bb3b41531a64ab2ce7c37c20471d231d3219 (commit)
       via  31f297213970e0edf2ec30442ef812ae02527a7b (commit)
       via  3c84dbd55d38c1a2aa53db354047ec73b9ede3d0 (commit)
       via  a365a334fff47210aec9544f56734022316d6656 (commit)
       via  d566eb777d6c0cd7dc09edc0b736dbe668668a2b (commit)
       via  958953e814d802c998186f3e3535eab7a65bdd65 (commit)
       via  933142ff5838718f683e6855ed0a7e7f82c1d3a1 (commit)
       via  f3ea216b69d0dc583b63b7a854155caa739a2aaf (commit)
       via  5980a3cafe18061365b92222282ead155a639b67 (commit)
       via  b548323ad63f9ba192433866bb5e1ce8145a7174 (commit)
       via  1d2aed3624fc3125f59d0dc0ec6aec531533574b (commit)
       via  ee88fdc026b0c558934b57c029f46a009b066cf1 (commit)
       via  3e79a006b3a315096bd09a95b53a625add9662ae (commit)
       via  9a773dfe4bfa970a0734b47eaf6a4394559a6571 (commit)
       via  1f2ecc016c9cde8e26c6c550c950263d33a859bc (commit)
       via  18d77895b945481a4b2354b9f3d445cf33a38844 (commit)
       via  1591d685c36a8bba463b8846323ef5cc3d71fd99 (commit)
       via  737760e7a910e814759cd79b01bb3eddc86c010b (commit)
       via  cd7950c7720d2f631741e543e24f1ed9cf4e3883 (commit)
       via  4c008b1987aa53769899e24808b6d74b41b4ff40 (commit)
       via  a1a452af1889235a9ec3cef2cbdd3f67fe70f2ef (commit)
       via  4572c4be9dcb5c4fcac7426d4954d4451223851c (commit)
       via  029dd7e006c850883026be022ce09c7e0ac60d57 (commit)
       via  c42b4f34fec4e69e632dfbea2e98968b1eda020f (commit)
       via  5412c73802de5548274548740575e5b8b6a3a387 (commit)
       via  977d8f92732ce3642e122d3a6c2956339b65bc10 (commit)
       via  9a266d91c0cc15f10ec03c4ebb51e13952556384 (commit)
       via  d2299029927cce69eb9c4faa0a88f99ed3e45997 (commit)
       via  b748c263360ce25d6ccd56945ff1aaa225534ddc (commit)
       via  510650bb774f1880cb351a12d2b2d09b729cc220 (commit)
       via  1758a550cb6fe57636c078894601281a5c72b1be (commit)
       via  04fbc13b5be66bf9876560e3be33dfd486e9fa56 (commit)
       via  5d5a7cce62d847798d407771ae84f63e1a0bd0c1 (commit)
       via  5805a68e0d32eae42cc5be4e5c3fbe82f3fe059a (commit)
       via  b41a8289a5d8977c41754f1b5ca548a2bdae35e2 (commit)
       via  61988bf4eac9cc885283df58b2887e06ce07b43a (commit)
       via  83ba8527b39f8ced37843d46336568bf458fd55c (commit)
       via  580ad93e26221610e2b871bca1bd6fdd6e87ec2e (commit)
       via  504e1e38a8724fc2439f405f0aa8274b58db7b1b (commit)
       via  0e0362b2da54bb5055d61239c4e94366b85c6cf2 (commit)
       via  244d4b3d16487f0f6bf1235b343ff4483c0e2983 (commit)
       via  080ddacee96436ce274b98da328c1162bf162f71 (commit)
       via  62453f213850685954cac61d9a3f50091ef02d50 (commit)
       via  c115eb9f3cfcda9d433d13b03ee0dc04278ad405 (commit)
       via  f19ecbcededf1f6d371ff32b938ed1c70dc72421 (commit)
       via  3900a8c97649c512b2b7e63b86406f6ed3bf4ee9 (commit)
       via  a9c8f484e47d2729cea902777cc146c2f3d54697 (commit)
       via  042838fb0ba16758f60a164048c0b792b3ec3ecd (commit)
       via  7e25b68323adcb46bc43d79924d2008386e5fd0d (commit)
       via  4061f7601a5ef0329ce5d315f78e077073f0d6c4 (commit)
       via  ac9a3bf083cd7af1077463b4ba5c744aa7b98a0f (commit)
       via  64cf1a9534f7e762c5e7a19d87fde4ae17708dcb (commit)
       via  7d80915b235961fdf9a9c4b2e0173aa02cc0f193 (commit)
       via  cdedac13f206e7a12ef3dce36b4bf6307609e306 (commit)
       via  a6958aaa7ea3f6d94651ccfe1c4710b05ee19e1f (commit)
       via  b38b24573b8903f643467152ad030ecc1e3d274f (commit)
       via  2c204efae48ffb866fe0cfb050c19608261efa6b (commit)
       via  db880ac4db091bfa45fa992c74af6e44f697cd83 (commit)
       via  5b766ed6fd77e9390a82aee48fa34ec3b1da34cf (commit)
       via  f33709e9e6ca4a6d7ff21ac5abc2917952c17c71 (commit)
       via  d2dc9c5d23f2ba79eefdc00b3a87213ac9740e65 (commit)
       via  e05e70dbd49c4b84c953ccd7dac75718bd051831 (commit)
       via  fde6c898c36dfe00fb1492252b44ce253a569ce3 (commit)
       via  566680938513f520ec012df5de43e286fe96fd73 (commit)
       via  59cf3ac5065a6ea94eda09207f99488c02963633 (commit)
       via  c8e7fb7cc31ee154b3b381778604ba8e5a0ecce3 (commit)
       via  266849caaa473d56ac737ec6dffc260eb41eee72 (commit)
       via  7675045cf3f1a995f195ad48937c94241f7d00ff (commit)
       via  0b06b86d1f153131e1b811eaa784d4fb101096d7 (commit)
       via  b4270ded088fef88371904f02a55842fc62363f2 (commit)
       via  58c1401b287df2f6985926fbaa27e2d56bcd97ec (commit)
       via  bdf683ec35278f04a8a71bfc27ed8a18dcaabb25 (commit)
       via  14a0d566c6bb909e0b191aec60da61cdb0bb6878 (commit)
       via  b4b2a5377e92742fc3bc7b748ded86f46f1d62df (commit)
       via  e8fd539ec863e217f0505f81dabbd73cf67b55a9 (commit)
       via  2d489a8dcd54fd6adfd97d1ea0fd6160768d7a27 (commit)
       via  af89112d78fa3cf0d805a5b2c47e040585f1d838 (commit)
       via  1365480ba076593ea45e1a50c74d1af0fec16f3e (commit)
       via  9c72a4fce3667cb450bfb8f04ab20792547079de (commit)
       via  27df14a96e460967e4ad6fa3e2147dd97a4959ea (commit)
       via  4631aa18f5f25e1f0e48b29b0233482fa98d70b7 (commit)
       via  4e7b3ab614d18fdbf3d95afcf5e3a982c0bb0d49 (commit)
       via  a335f6c7165063ac6064bb077052d4b4dacf82be (commit)
       via  f29d5bef763ebf32ba2199f28c36bfd5234e59a9 (commit)
       via  534bbdeaf4261b5891f5d45426670dbc5738fbff (commit)
       via  340a43798f31661c55325d5a87f075b397388554 (commit)
       via  d1b583d874f5060028fe33b190608d54e1627d43 (commit)
       via  31eacc5936c63143c6da8e438bd01a8f95cab377 (commit)
       via  0503aa21b23a2e661a928f114a3eb1c69db9d702 (commit)
       via  33e00976eed180769a3c2e83fdd5350cc607939f (commit)
       via  dbe92240b61ac62b722c57e27ca23c107666920d (commit)
       via  197aaeda8ba0a4e7de0c47487f112869d0195d8e (commit)
       via  0273b2fa9433cb0d8b8305bef23540c59fe0062e (commit)
       via  716baba1ab1e40b64bd9fada180d408f3216f013 (commit)
       via  43a6f280e8463e59af8e86d5939490db7d51b6a2 (commit)
       via  53291f6ea986b0e7096b34d77656930298c124d9 (commit)
       via  9c4a393d7ad42f9ad6bbd11744fba2e160b669a5 (commit)
       via  d2c2fc53aa11582b9e2be2b6473e16f1b833a6a9 (commit)
       via  be9cba7abc177bf408ee43de8196feefa526146b (commit)
       via  b85545886540514bbce23273bbc79fdb509fdc96 (commit)
       via  7816cead2cbaeabce322c486200a855125ef7e4c (commit)
       via  3433074b6a753b0cbe5aad25948df4f05765162f (commit)
       via  e9c89e347848cb583b29e0ad063c448dbf5c1906 (commit)
       via  813897e3eebd61998c914deade71cecbaacd7aa0 (commit)
       via  fccfb9ee2af9f1ef3b3ec4656895d0ac6a0086ff (commit)
       via  ed8c0e9f0d681db1f1f25e30e78291ad222588f2 (commit)
       via  09da94d541aae7c6d1d339f9ada9dce3061f4d34 (commit)
       via  ffedb5c68cd78a405d72feb25bd31153487023e8 (commit)
       via  5ebd16165ac31ffa6d5923f053e483d9380d3441 (commit)
       via  70c799c8325115b4df7cd2de23d5ad6ff768f6d5 (commit)
       via  16d56833df80ce6656761541e9ca1ad67c5f3375 (commit)
       via  ad584d8383ca2447451c4105b31b96f31ef60b81 (commit)
       via  bfbd616a226412c43c5a5d82a4f418157c16b560 (commit)
       via  62c84fb393697087cd59d064b4db114c4553b390 (commit)
       via  2c3d17bf271873d91047d858eca5d321fa3cbd84 (commit)
       via  5ecae750b48d7ee7ad2207bd503e43b8b8160aee (commit)
       via  393dbd781b3f0dcb4ac90cfde1ba8e3d734d8d41 (commit)
       via  444c1b0ed0731910c08fd3708415a5300b38e39b (commit)
       via  a8ce5598c5067f19f2cba9cac77d5d6390c7f1fe (commit)
       via  025de12a634e0430d0ff21a6c33a42ba58abaef0 (commit)
       via  320db73bb97dd7e0bb3f50a1ac9273d18eea01a4 (commit)
       via  e1bee6aca61e5501bc46653d9ca7ba98efbad980 (commit)
       via  1f8413fb30d6c429d283c20f232c0ed73e12a542 (commit)
       via  c98ad94fea089a3a0a0dd339752dd817a63c545f (commit)
       via  0897957beade15f9224066c015da1b9a2dbb1fb9 (commit)
       via  3ec9528c6c8fe05f4d2bfe9522a513f1b5865596 (commit)
       via  bb7820c65daaae6ec260f6f6b884f0d4dc5fd98f (commit)
       via  7d0348f081468e6af68879721190da7996e09c6e (commit)
       via  7623164a088658b1546d94f2574973986b13f540 (commit)
       via  702d282b579924d5d5a250f019fc2cce01ebca05 (commit)
       via  b57699722f35f8bdedc63e634a4a72e5da87a4e9 (commit)
       via  74a91351d1f4f68526bfdb40fb0f34d4fd12e7bf (commit)
       via  37b481e4a33732d84388f16bbe64e2d795cbf960 (commit)
       via  c7f4d2c4dc5afeb5554832c415c0cfd5b84377c4 (commit)
       via  ccf74d286a90f636ce9433bc1aedeb3f07cac0e9 (commit)
       via  c46609c148ea78f11e4ae68feacc8dc157dabe74 (commit)
       via  6eb6d992deb91e0cd73bfe7ab374d2720d224891 (commit)
       via  bca81b6e9bc4299be94bc1009fb495ec0b09bdad (commit)
       via  5e1094e513013b534777c65ac4b08049c63ee45a (commit)
       via  ad93c34c1efd0217e502a7491e1f8c4a01c33d16 (commit)
       via  a9e79afce7316e195df9c47781515650dfe80651 (commit)
       via  ef54e782c09969b7839d06f99274c5dd74828ae5 (commit)
       via  1c093534670e89d8e6487e9c63c0199e47311a6f (commit)
       via  4eaefad860ee6596eadeb817d8a962e2926d3649 (commit)
       via  c8a76fb8777b8007e35bf34c23af95234387fd7e (commit)
       via  719d497f91e21d5bd80b120474b923751a55e4e3 (commit)
       via  3c15500bb84dcc5a31814b7f53757b461b583280 (commit)
       via  688ed47c27ab0973ac6adb255c10595676775963 (commit)
       via  a9ff661cd98bb7523bc04ca88270d64ef1d00620 (commit)
       via  5cd3b546f0827223b76cdf9c7ac99ca75a812d1d (commit)
       via  887ed13ccbb86dbc66e2f38e2db965f486b00038 (commit)
       via  f1397b34b87b118a76ebbe90bb7e55ef8cdc72d7 (commit)
       via  a1688feb3e3b6c721a17c2f0d406a0a0285b1cb4 (commit)
       via  8fd6d6703940898a426adfc8691dc392c462036f (commit)
       via  100ee8e1bb54cbb89eac435906acaa4f857dcf22 (commit)
       via  e2f8fc6b7535f998731e1ec7f6020a782e92aaa7 (commit)
       via  1ef1ebea151f80a8ca32f8136f3edac032f694ab (commit)
       via  db486b73c0af8becd41ccf83d7390e8e4a03d77a (commit)
       via  66eaec1c0e9a05ce9bb56ddfbd0501d66c669fe3 (commit)
       via  1c956a9150228986198d6f2a92381f8816a40df9 (commit)
       via  b300b57228d9b5098b34b14a657e8b0fb8abceb4 (commit)
       via  90c6f5fba1e1841cc93941cc2dbf6648675f7204 (commit)
       via  88e1c8c75f8b6cd1249934cd5ad91565798fb2e8 (commit)
       via  1f9bc1a93e85eb70c46136888d7e30ac1204f71f (commit)
       via  fce2bb756a266873cf3b35feaa74c9a8e73bef58 (commit)
       via  3e8092ec1be7df0a990be78bee4a93581b0cc5ae (commit)
       via  174c51d030e15406f7fbac49df4fede7a199597c (commit)
       via  5b1bfa269153faf48446e2f57fc5e55fb628a4c5 (commit)
       via  6753f5ac403d5f1e5f042e5a2be63052e613b3ae (commit)
       via  6a084ba247eb59e2f5e0cdbcc379a0064d29f9f3 (commit)
       via  09a9e5e94c7175535e525d9f0645b1e4fc7bd404 (commit)
       via  c783bd4bbcd97e1edfdd3765396e433c1b7a3804 (commit)
       via  c06137d59c5908fa0f7ca148c70e73c89833907f (commit)
       via  86589743a25e8bf084e6e6893517a3ecee993450 (commit)
       via  b5623fd111963fbdf5246b9327c03ec6f364c246 (commit)
       via  d6e9f343c9615aae2049acc162451fe0c8a3f89e (commit)
       via  9e8d316f98ee52d9a982dcda22d46a5d4e24bede (commit)
       via  12f33f359cd4469dddfa454fe47715190dc025e3 (commit)
       via  8a0076a7640db8ca488a8f300c1c46cda397761e (commit)
       via  6e2677e9891d56ca9c64048dc4302b117ab32c86 (commit)
       via  bcafe8294b55e3e17bbd99381b395ddc37e1e838 (commit)
       via  40a5bf1b51b8b0508902db515e2683016f3bb075 (commit)
       via  2e96b3cd99d263a23c8f3524b11bfcc2f6f889cc (commit)
       via  7803688b40e32bcd176000a5f011bf0e2aabda85 (commit)
       via  f4597a051d823346f67f30e06910efea530aacf0 (commit)
       via  7eda082b652be8c525192257c1912626b2ac7eae (commit)
       via  8a3d6f5378500bb394d0e555bc1473ea6279f0d1 (commit)
       via  625d37928c3a68c27a7b0b2cbd2d8abb099f3cc9 (commit)
       via  550693de5410011d79555f04092e481710cf204b (commit)
       via  41021bd85a4c40fe293ceb8fa16aac954b4f3df4 (commit)
       via  1303babda4c95f1ff1a39b8908f33c69cf500b0d (commit)
       via  81e003ac96aa48f1efe77f4b9d415790902ac5b6 (commit)
       via  e15463d4c9fd3b8ea4e7487bb617c713f698e44d (commit)
       via  86ef0c89c7c97df887a83303f76cd6113e6d8889 (commit)
       via  772def80337ba1bf30028216214014454a2d43c0 (commit)
       via  cfb3cdf1ef3868f3cc2d57094ae55bc24dbd5fc3 (commit)
       via  23f5fa60af7dc8dfdaccecfd663833cfacab1101 (commit)
       via  b38c19ed6013b4418a5751d0de0670c8716a345e (commit)
       via  8c7bd5a874a26c733f922181b22918f4a80dc594 (commit)
       via  655ad4a630189a4b827863811fad5155dfe8f5ee (commit)
       via  c2c99814f5f965491f4e24b5a345c364b601ba2b (commit)
       via  ae515432ca997c69911123c12c4c4051b30d5107 (commit)
       via  1ba2939770a269dfb9a96daa3a67f4c204ffa4ef (commit)
       via  ce605762cfd014d0379cc5766a610082abb93374 (commit)
       via  f68469bdf2908165a6276b3c0ea9b8286e8bbade (commit)
       via  454b7560636b6a483cd7a3e4a4c0c293f250df29 (commit)
       via  85772e3fb3c79dc5fd6ce0f407a5fcb04f7d49bb (commit)
       via  4102c5682b633a6d5b58a4c26e5822378107766e (commit)
       via  316e0759a416de2f2cbb234da54a3a0d74abc37d (commit)
       via  6958f53f4a1ee5133fb200fd003596341b6bf207 (commit)
       via  5e9e631345fbb1a567c46f71b68bca981ff3b2d3 (commit)
       via  e950f4a0bc51f6e79c5f1bc101949a3d3bc326bb (commit)
       via  4778b48f9148c8679c67b57e10125a4e37d12447 (commit)
       via  39db69eec92d5d39c6ba0d04223dd8d18bef339d (commit)
       via  1be1a83342d1e5f9f474f2f4ca76cf1caff8650a (commit)
       via  bd88a5665cb419ef49a8a72ba678be097f0da293 (commit)
       via  42045e902df52fefaa88aa546f612eee55c7656b (commit)
       via  d197cac21bc04c13da30261c907ea9213fb5db17 (commit)
       via  dabef35f1a0b6718c1a717ed31d6663bca76268b (commit)
       via  35db46a5c28c0160e3c681b98ef7033e48da85b8 (commit)
       via  cc9b329bf08a525010a13de730b9fca09aad4c85 (commit)
       via  d77e9efb89c9d721770f6edd87cbc9166ff10a79 (commit)
       via  660deb62e82e1e2e425054ac67835aa63f4773f8 (commit)
       via  22c95e4ed0106625fdc357b454c4b8ea111b58b9 (commit)
       via  84978588c7d21b3699cc8d22ceb080f0d650520f (commit)
       via  2a560d880071eaf58a4bf299105ebb817da3fc90 (commit)
       via  dc30c57729a95d3d63fa45fa3ddad6275feb3dd3 (commit)
       via  a301f3fe738ab729d9a0188e9a82c2fbe409dc96 (commit)
       via  4b37646e41b1b0200a34511c93e05f354cdbff54 (commit)
       via  4804cff20260e0fe5bf39b1659522be88719fa8a (commit)
       via  1ecb278a72c158eda363c61e650a7b12e8a9b653 (commit)
       via  e62f418b1b7147ca9034cf6d7b1eec1e7f3ed45d (commit)
       via  9eb632cf7973e5d22a5c4d1643935190658d888d (commit)
       via  e3c8aff2664511308b8bf47206bc650b7dfef590 (commit)
       via  75aecddbcccc9baa80b83838936c07ba192b962c (commit)
       via  237a5de8e9414a300950a2dc4f3a21541ec1818f (commit)
       via  353a253053057cf04c6a26ab81d3392bc49fefd0 (commit)
       via  3ad7a03987c6a8ad1e967f60a4f220c5fcf0842c (commit)
       via  0f3365f747b624641a00250d22b5a9046b9a8fd2 (commit)
       via  14e67f54390d0ac544ac5358acc2ccc199ae4aa6 (commit)
       via  0fc7fce20043125765cfcf4100e5017a56f410f5 (commit)
       via  b874bf4e5ad31c06dc328f828c4126dc2d674a1d (commit)
       via  36b220d28f195cd650063a52bd0a78e0351649f9 (commit)
       via  05a0fb7edcde344216b104edd8b91e80b15fc3a4 (commit)
       via  cdd3c94f88d9bee4fb730817992def8106396ee6 (commit)
       via  7e07083ed47e3476e2c67b5574e50c41bd5b64a0 (commit)
       via  42276059947706958938756fd56106fea9cc7bc0 (commit)
       via  2ef2b38f4dbb3e4012efcfc48fb8eb81aa189704 (commit)
       via  f9cf2429b1fe0a38bd806c95de359141ab7ec61c (commit)
       via  40d9be8f0fad65f652c81df5ca68b2c983fd5c5d (commit)
       via  4db4074fed6147c2f26c6f08cb38d7ba4523ac30 (commit)
       via  cc5ddfee8b7694743e5404b4e4475e11203ed693 (commit)
       via  3b3c1c8b67edc16ac766a7bda8f865cffddca520 (commit)
       via  ee3e3559d03a59087cd2122d7e702c8c81a9d37d (commit)
       via  dc0767c23c6a6bcbc85bc4bc935173fbf6efb147 (commit)
       via  2e592bc1fb9401d2fa55aad544d3484a56c4fb58 (commit)
       via  79bad0a7b040a491206167e2642f639f6a1279c3 (commit)
       via  c5831bbdf54d5b29c8401ce236e9ae894c679832 (commit)
       via  095e65ec95b69d6b2514632eae5267b33fccde3c (commit)
       via  5c5a414d5e4e5b031fea2aea8376ed9a0871e652 (commit)
       via  7f178bf45b1d7e55e4f6c1cced2eee6611968795 (commit)
       via  9941a6143b36ae4ed1cd2f834f38e8804d8e3924 (commit)
       via  73bba83a7538eea674c3900e193686794786c14b (commit)
       via  7cf2b810fe7de1d96a15dabce37fbca3219db033 (commit)
       via  954c5dbd0f3430121338c811e91bac45021f9740 (commit)
       via  41a9ec5330168bbbba749a1d66f7bb57276355d2 (commit)
       via  66139ffae5f96edc58b630b63aa371368862f849 (commit)
       via  7e59a2c629b49807093a579f52aa18dc0eb81f9a (commit)
       via  12747c2d9293eac46a39696aba5440aa016da19c (commit)
       via  5dacf96e7813ae83a1f26b388f95bad90007c140 (commit)
       via  d775bec0e41cbfa689c0387ef92c19de789acaa2 (commit)
       via  dce5d07fde2566c416de11140f6795b444aab474 (commit)
       via  ab12843ea64fbaba50aed73e89071edf33ff9479 (commit)
       via  38d4937b7e204a5f145dfa2316b7029d06c4cb42 (commit)
       via  295bd46a138a3d4bb7b5bf134ebeb3af1dd449e3 (commit)
       via  8be228775655eb55d3615dd29c0b12121fba95bc (commit)
       via  68a7c1cd60deb3223a5222bfbfe71fb11ad28bdd (commit)
       via  534910abc712d2120b75072eda85dc43d53c496b (commit)
       via  ba8b610f13ecfe6c01508d9f25572456db4d4673 (commit)
       via  fd5498ff474a2be4db134b6f10eda548b8c106d9 (commit)
       via  d64a2df3d02b01fb896ea6f08880360e9066dfbc (commit)
       via  4a89fd9f634f98ab9bf1a5db43f82b1bc024bea7 (commit)
       via  aa22df54583fd7deeee3f8f9c30f372f0f7aadbf (commit)
       via  df99fe1f5df6fe3ec101762c3a2d1c58b2cc483f (commit)
       via  2e09da12de8c33bab2c5e6fed2324ada9e9defba (commit)
       via  7a716ec39af55947d4c9c75ee779ff26f81174cd (commit)
       via  9b5f290c71ce25eb9f7566bf119446926da9e971 (commit)
       via  7df0028f2a3a291241c31a2ecd76b5546e392d4a (commit)
       via  b5678a91d0eb5bfc3bf68fd812cdb15da551d55d (commit)
       via  986e9ebe95cdf835382db3810fe33ab4f0e90e72 (commit)
       via  69e0d4792487178c0dc4468890c3b20fae882810 (commit)
       via  79474c4c861924f0be700ab9380c0e68933d6738 (commit)
       via  de1eb5f4bc31eda9c31f18acde32c7b010d0c864 (commit)
       via  411b188c98e6fc38ea83fd281fc9575ab1f7fde3 (commit)
       via  7827e741157314d572ce465c44f9b565bf5e5c32 (commit)
       via  83bb8625c67026b51fe45d2a04a1e24eb15ecdce (commit)
       via  f6d1f9d7c6656c8fce831f15d7195e22170ca3ca (commit)
       via  0f937335777b2e97ddf03439ce2479ae26056966 (commit)
       via  1a8b44dd46197c7e760a61eafe19389e42ebd281 (commit)
       via  09b998e2ad926852eee3a3d74f9d539a67555dba (commit)
       via  c68ab6ab1894e06033c13f83c3ec1fadc10ebb8a (commit)
       via  a7446d64a2e68ef1142a15cc38eef437118dfd1e (commit)
       via  90b8b657ea6de6b97346a481c73291a2ff35a319 (commit)
       via  2924aac3a39cac1180da11a39b7bc2a1c51d7641 (commit)
       via  270a74d6ea95d93e4f993982fc935638c4abd321 (commit)
       via  227a3608cd89eefcb79453ffc646027bcbe791bd (commit)
       via  cd06e4e6ebb60ac29cb90aaa31df89ba05d9a288 (commit)
       via  6639c3606a6e420060601d94df30735925a6b596 (commit)
       via  5afeb651e12b02a25139901008e943c012d083ec (commit)
       via  2bb69bee23fa9613bcb9adcaf8b568f3d60dccc4 (commit)
       via  05b7ddb890da9f0fb01da455a561f8651b90114e (commit)
       via  0bcf01ecf73e9be9e229ca3b4f91748963292492 (commit)
       via  5a7a368e37e8cb044385f7a0bd93952588b614e0 (commit)
       via  d40a1eca94a7e7c3d82cb03c09f68e674f25ed4b (commit)
       via  34af020380c21e3bea25ed5f2f65f1ed208f15d8 (commit)
       via  fac3de57832134d7d369eb5caec7b75c82736ebb (commit)
       via  d7ab012541fbd6beae1aa4fc060814077f84888b (commit)
       via  d70c95da1f1474689e9963e16b2369c3ca1dd02e (commit)
       via  a32f451ce9d7e71072a3ab66fec7d05b16b1f1a9 (commit)
       via  523e59e0dd743a4e64bc250bdbfefa2b11cc7724 (commit)
       via  87a5b8ebbcae6f4b661de1877026c5a567a69272 (commit)
       via  1f4817900540e77273c7684083986216ef92aa07 (commit)
       via  a0af076da0f1059f6de229b7983406583db995c2 (commit)
       via  dcd78c1acb1e93a1c4b74a1da6b6ff8a0cd52ca9 (commit)
       via  44b0024859129ab4fc4904e809a2447086a9c149 (commit)
       via  d2b4a3243571483992c4565150505a6c4b30f81d (commit)
       via  141e5bbc800637beff657c5c86f966e02e20340d (commit)
       via  ef5bbccbfe384d0a9a73f888e4cde669e8d4f9c7 (commit)
       via  59797ac65d9592f5868ab000a9c16aaa3f0f3aa4 (commit)
       via  73a0bea3f6265940279952c85c7efa40e60bd3d6 (commit)
       via  a56d839a1fea083776256cf239efe77ec6da7bdc (commit)
       via  4df15bd94b1758d368c3c131319e6cff841acfdb (commit)
       via  c1648c31e5522235b2f1a1742fa88a002353b5e8 (commit)
       via  123dff37f4d7eb8a0136799e9a9b91504f1a705a (commit)
       via  254d4364938cbde4b1d90f93a58ffc51134a666c (commit)
       via  a72b4edf3d7e47d48bee18b64b9614f236e40afc (commit)
       via  7835875a58a6f45d342106a1fe7d7b7a83684257 (commit)
       via  cb8a4a9f934efee8779bfac80d906c9a9344646d (commit)
       via  b1c16e50e93c662a12c49ac8f18b607656238361 (commit)
       via  f698b2db0b232eca879c0ce245baec8df5f5acd1 (commit)
       via  fcb21ed23acb3702540d07a98dd26fa4181eb109 (commit)
       via  f25bfbc22b5e983087f942140ce886da64e1ce1b (commit)
       via  c1287e83c8899e896bf86db807c14e523f5c20fe (commit)
       via  cbe56ea70c388b5404edbf5d80c4c9f9ef407afd (commit)
       via  2ef8bb1482de371b7b53e8be8f19aeebd03970bd (commit)
       via  5745bc9ed8069890b227552d1a22d97336dfb7d4 (commit)
       via  8e87ad5d17da5d7ca00c9c31934db4f60f4c232d (commit)
       via  26f308a2f6c18635fc9be9459121372879ec5fa9 (commit)
       via  ae85d44d033afb3ee89b1b073da5403d9e99a27d (commit)
       via  cd7b0306d711ba9b649621f9eeddb7fe606fa376 (commit)
       via  a1e0b73202b7b64b0f6bf49ee21764a085fd7f2d (commit)
       via  25eaae7433f9649c96733d3fc36287a1f24f6b35 (commit)
       via  99cd72e272b0a940dd95cb26f75a469855cb5a23 (commit)
       via  42c3c02172b08c2f2403be861a2a15f68c377983 (commit)
       via  32a32b28e1c3f1b0e3da0ea6205b5ed561ca02ce (commit)
       via  77d413a608bdeaf74e000a3ac102333abe14af0d (commit)
       via  9a3e6f354c516b8d7ce69f173b524b55f14e6d67 (commit)
       via  51280e45894cd3b25b0087e5917eba081d387830 (commit)
       via  9bc68cb51e2d99dc98782e7a5545e12531423157 (commit)
       via  2bc02dd72e75851ed9041035619be325b952eec7 (commit)
       via  3b3d4870252258b85b993522e7824c726436d83e (commit)
       via  545dc86cdeca1e56ec42c538be6784e6b26f9c37 (commit)
       via  3593302203b5663c5b87995bc067850aa5e83f66 (commit)
       via  5d13a8787e92dca88099376ef403068988d95d5b (commit)
       via  8c00d3f93913e2cdff6d6d8d0fd40718f5ec5da2 (commit)
       via  4531cbcaf96f5c0b234d079bdd95bdf5aa77b7cd (commit)
       via  5ae17c1e63db91e3a0e3c865c69eb84686e01a0c (commit)
       via  3ea3a84c90496ce7496dec749a663be40d5a1d83 (commit)
       via  334a46458e75b3979a1a4fc4d7442ee022a40dab (commit)
       via  7abb893404d8d8dd4da89a475d11ed96d3d9a969 (commit)
       via  10946613edebb3605b913fb4101a7c28a022606c (commit)
       via  74392eb0bf80525a9d38f13e8583ee049afbde37 (commit)
       via  2a59ce05bd0a86db1911f07adb942f10b8540614 (commit)
       via  0cb906be583e1c3d1f20cfba2cd09412fcd65a1d (commit)
       via  840cef17f97db7986b317f487bc3c7789b4aac0a (commit)
       via  ab8320d895cc59dcbbf53fa11612eb791db3a704 (commit)
       via  fc3a04984b7c93afd28d003079f2571085ab11b9 (commit)
       via  28b6e31e76e29832bc41db28e4aa764f52f09b19 (commit)
       via  2426cd1990acbacf19292e4589cf4fddb165d33c (commit)
       via  1d7d45f85ae189d166ba06e9ba81caf0f3a52374 (commit)
       via  b9ae27edf8b79b8322d1f8fa0a5487185caa3cf2 (commit)
       via  af0da34870440d38c6770264a1afd51dbb40c274 (commit)
       via  b566bc3e1f4c5b2aa3d1376e0982e71781260e10 (commit)
       via  cbe7dd2581bd76f09f1431857bd22beb1ed55e96 (commit)
       via  98f8e878aedbb5ec8d2ec0264010119dc2db2c41 (commit)
       via  c0c53637678bfa6d43b584fcba00981c4d8bdbcf (commit)
       via  b0d84c743691f3b75d0f47de609b9e2791c44843 (commit)
       via  a755942404c47f1a9341cc19593f7f46d00d8f2b (commit)
       via  f8c6d9a696b6d1e2280df6d57ab5797af515c6c8 (commit)
       via  0443e54d6ea5518e5ded4e90a36041f3df4eb04f (commit)
       via  2155b23c958ce10f8ade325add2d9372b99a7c8d (commit)
       via  4fc251c60082315ceaa048c1a830affc9f86c050 (commit)
       via  992e464be8f5968548dd7ffeed383938c306e48a (commit)
       via  8c055a4f0ff8659d4433aafce0ff478a78aa3b39 (commit)
       via  c9e7b404deb20aed5ec004b2253e6415915b4b93 (commit)
       via  c04b86940c4a3ec9bfb0e673bdebef519e33bec9 (commit)
       via  a9bd3195f738c0df97e4fe90a5609ba4d170f730 (commit)
       via  6aa49cb32493047d161016f05aa434a8ef8fc94c (commit)
       via  e3b426723e137d512f5ad33fda47f079d1e04959 (commit)
       via  407e945f53b5623e5ed01deb473b23762979a720 (commit)
       via  b3a37055c65399dffcd3def69d26c9c43418acf0 (commit)
       via  894b232671f1adeb4acdc7a5dd135087b3cbc224 (commit)
       via  db3934140540fe059bac10b898f191e41fa40ef9 (commit)
       via  dcbd38ad7fd6143c768225a207ba73e65b244909 (commit)
       via  629f048d1eb108b5072e255694bd730f8162ea6b (commit)
       via  785f2b3311c297b7ccab05e491a86ddfaf3e7f00 (commit)
       via  f745b1b462f58e0b441228ef3112bdd9e0427789 (commit)
       via  ca946771586ed82ebcd45b71b294e765d49aeca2 (commit)
       via  3361618a19d4bf4ee835c183a98d439b4c861f3b (commit)
       via  27519a39b79cc2dc7e3ab0f6a276b3aaec1156cc (commit)
       via  2fc5241ff263ac939d53169cb7eef67282546886 (commit)
       via  5d5c434ee01195071e176bb3821743cd5df01ed8 (commit)
       via  8f272d9b68214b42b98aee869306a1c635035be1 (commit)
       via  24ae0ad14fa1492633e1ab513cd3e265c9ad0e57 (commit)
       via  6af9e057038af834525962ad885e26b52e927f0a (commit)
       via  1b02a8026f17c9246f4ce667dcf5388c53cb3f65 (commit)
       via  9cf094772ca4d906e0cf37854a10d05952d2afaf (commit)
       via  1b224fff44c56b56e954d0dae63289a91d5c270c (commit)
       via  b090eee8e12770136771259e764ef1a3323d29b5 (commit)
       via  ab11d1585d32968abe3db2eb2fb094a8303baeba (commit)
       via  9abd4412c25a5f9e9c1b7717ff9992b848002ea8 (commit)
       via  5e2ac1718bfc55bd2724b74a7dd431d9df650fe8 (commit)
       via  00eb33c0a1d1f74f2dc3743f4519058cdb34fe3f (commit)
       via  655415c67a55e7a3d1799f72dcadd96514500371 (commit)
       via  9ca2813851bc5aee4f9c40c173219d594c6ec568 (commit)
       via  4b1596668958163746c9e8501e6ef937c7e10283 (commit)
       via  2c8b96b653857da4edb1d37fc538653e26facdd7 (commit)
       via  b5d38555e8a25b7e382ec97484b31e7add14ee6c (commit)
       via  25f05c4d604211c0e8b5cbf61e3de2e1ff6accc6 (commit)
       via  af81c6a82094e99e9ccbb9ac664db3c203c214d9 (commit)
       via  705b4687a23b151fc74415114e6c8df8d36a940c (commit)
       via  b7e600ded6264e9760576c1618ffea5885aae8e2 (commit)
       via  3b0962d41f1f0c0c835ae8971700124ed65ddd63 (commit)
       via  d06361449c25068c68259582c84fd5070a45503e (commit)
       via  dc85f42f3fc26a5b4815b51b961ea9223d4f6334 (commit)
       via  e3c21f85b4c55762b356a605a645afb4c474429d (commit)
       via  587e5e26edbdaeb89ec6fa11f99cc91fc3fe11df (commit)
       via  17676f047fc5bc7ea92d48beb0f52b1b86ce7f35 (commit)
       via  eee2cc00ca2f0a21ffcea8d4d94610983e54868a (commit)
       via  3f77c647436d217a77d9b816262f79e0878d7923 (commit)
       via  d088d344f2e677cedf6012e7f382326858c4bcbd (commit)
       via  29cb82362a4d833c1a153d84be01a89a4ba06fea (commit)
       via  5ecf353bd16f909c5fe6e6145b3d8bf90935a143 (commit)
       via  6a6d989d7eb2c16591be25d38bc8d6c1faf0c51c (commit)
       via  2252d3f680e633e33393273b9513d1ce019766d4 (commit)
       via  9ac5418666c2b2271ea7ee56603292cfd446a5ee (commit)
       via  5a97ca2cb10e7e800a459670f5bc9b0237131cfe (commit)
       via  4e7c9b630407b125b572274dc3f493be487b7692 (commit)
       via  baa41d7f8dc9ecdacc9107516f0ecf2afef9e80f (commit)
       via  5bfe8a369606d742cb50fc34a437ebe6f9630252 (commit)
       via  7deb27ca53df3f317755664e25f95dcc9eabdb1f (commit)
       via  79732f4c33178a61bade7835d67a953117c637aa (commit)
       via  525b3a6549b5dd77e777c189a2e6e233d837fc8d (commit)
       via  fffb8a4b4757b057e5e964274a4b23bfc27aabd5 (commit)
       via  e228ee5b5a505b9965d90ba0c9ba7963ea5e7d05 (commit)
       via  2e6f550913af1b72a933da66da54dde014f5c9bf (commit)
       via  4430d1e4406a08f88f87ac93c380181b8c5ed9c6 (commit)
       via  37b6ba75e9ae2eed80c88413e1df1809a8fff699 (commit)
       via  10c90b26afa857f6d3f1e0184d2533bfc171e3ea (commit)
       via  03f75e32374b3490c8f6d3696c300a1af0d5d139 (commit)
       via  f7de20f4c11cb49605551fc6dc0b778803f0fd38 (commit)
       via  7976bc485545b985a89eb751923d4c4b3cdd4703 (commit)
       via  adf9654673f2c57d59b8171be8535d30f3775dc7 (commit)
       via  a9050253d9494902f21aaf6353f928f2d4662315 (commit)
       via  d0e7c4835fa199b8f270822a22cc158d38abb9e7 (commit)
       via  df7ae3bc3f474d15282eae829a35ed0ccad441f5 (commit)
       via  b7ee8b84b7c77c9a20ff3df47b003070fd25e302 (commit)
       via  a6c69113bea3cca9394c497d190f202e8341cbb6 (commit)
       via  059e8898464800ef6d32cb6722d65477feed7582 (commit)
       via  c950a25a06ea0ef40cb257ce10e0d4ecd14dac42 (commit)
       via  cbd31f94b86f86eb5c799cffb8ea610e2ca75e4b (commit)
       via  48c36c10770bf5e1e51655c67780738d9222d032 (commit)
       via  199b771328ed7fe20f0b912efc985da13e594e4d (commit)
       via  1b887a5d57c915d8372534d971630281cc52c501 (commit)
       via  7f5e1b3d9c22221c08ef94e296eae0bb8adb63dc (commit)
       via  52456c0c990d817faad5165ba01a336796b1634d (commit)
       via  4175d758f682ee314d08a63be5126402d9b8105b (commit)
       via  79333bfd3979016b20bd750bf0ba31db6e843b4f (commit)
       via  e1b9c837c77d58462f8861b1a67485399436fe5d (commit)
       via  00c197b67fd9baa9fa112f4c8a69bdb0ececf147 (commit)
       via  2799609be2989d9b66651d0cb18c1f57a9c5941b (commit)
       via  dbfaac40bee1826046a01b4aab99608581b2328e (commit)
       via  af021a5f0a3d0913eab56d593b14abdc267810f5 (commit)
       via  c6562afd3370ab4972771286e71a27557befc9d1 (commit)
       via  76ed341718f0694bb58f0027f207eff51dae478f (commit)
       via  169e66dd3e28a9d2ca70fece895bf31ff940d89f (commit)
       via  21ce2dada02016a9cf795c8325985d2dfe099a00 (commit)
       via  590873fbec21bdeabf42b35691eb54bff4898a25 (commit)
       via  30d2af5a1ea7eab62c0dd4a3fa40e5a371990e5d (commit)
       via  c5ffe040b9533fa0e4d94b68e0371f29ca9c75ed (commit)
       via  5b00ae2e64bb74ff92abd9c510b205747fbe43f9 (commit)
       via  12bd5d09058ad9613a70b14f17e14fd8f0446123 (commit)
       via  c492a2056793a8861c115f895f7cfa48e75a89c9 (commit)
       via  e2ead2595aff7c38544cbfca9bb06afbcb0ffd3f (commit)
       via  1caa0dcdf6353763d7ba4cc585baae980fa30852 (commit)
       via  fb2a2d0155a495e61f009b3949cee23fadecaf04 (commit)
       via  c063681486d8318870382ae6575ff2e2b8c1025a (commit)
       via  dc7d65764d98d6e5bbf5f8e807483dda09848084 (commit)
       via  bab59d563851290b5e2bb12208479854f8f75c9e (commit)
       via  c93d795692bc71abe8eff60ec8823a10a4e4a4a7 (commit)
       via  ff6170061e52dd85864d2e9e490afcce0fe390c5 (commit)
       via  54945957d0ee696cec125b258c592544a361aa5d (commit)
       via  4ab14673e3cefc7208cb18a2beeec6f92f2b9a8e (commit)
       via  97ef92b61c61df487ac194ec95b9b2f1fa8b09f8 (commit)
       via  60dcfd6dcc195c4b0887eb75acc5b71571c0da1c (commit)
       via  ce05b32400faa225d632597c17c7a6ab688e2597 (commit)
       via  14ab5a072a86f08a56b30b5c3f0ecd4c92aac06c (commit)
       via  f4d2c54a2c6f82029cb9152ecf2e881b94436969 (commit)
       via  df0818671f63ec42d65c2b327f485e041628b7f0 (commit)
       via  9c51a0a09ad1946ea5d4a468278800d61da78469 (commit)
       via  5e170be4118309e6138bbecef143f88fecce8db7 (commit)
       via  17150cf28750527c350166b6db984ab042d9c534 (commit)
       via  779c09aa1d951e3a349980c690a79c1f23aa27a8 (commit)
       via  fed894770446ca39815bb96ad7f64bd1ab980333 (commit)
       via  09c57eccc785df70425ee08aaa24d37e39dbb46b (commit)
       via  ed2b0371ae687d373a2c56e53df9a27034380535 (commit)
       via  dc7d01f89b664abcbdf482b9db6e5e8a1a369e04 (commit)
       via  5ffa21480181cbff600a90f2cf75803b9a92a006 (commit)
       via  33802e0c65c1e3755f98c463bd2ec89c6bc322cf (commit)
       via  e19a153219a3d192fb78266e13916cf0c04c03e9 (commit)
       via  7829277217f388316dd7477cfc680a8a2e3b2e6a (commit)
       via  d95de5f29b7ce8648854a00a5cb4dd6b7bbd5514 (commit)
       via  b4000375741909e713cd37bff35ac3380e8cece5 (commit)
       via  4e9b543ca711980309b41659631821bca02fa6f2 (commit)
       via  9fda0594403d6fded1e4d5b62c85204f10da6927 (commit)
       via  71432108563f4033b527818687b7c8484f4af882 (commit)
       via  3c7511caf544ae09f484aaf8d531ca8007db56e3 (commit)
       via  d82b9260fb1deb5406ae7c0a3465195804ae662a (commit)
       via  df2d1b1a9d09a8bee968921d05559cb1a12b273c (commit)
       via  db36e6d380b7d85a751a0d2c15646c325cc9f1b1 (commit)
       via  7d7a8d01a95f2481365ce7068891b9291871d1a1 (commit)
       via  2f98c2ca6d4b960a240ab609b608a5d816eeb23d (commit)
       via  bef5252724d2da5345c18a3107606103cb011f90 (commit)
       via  cb7d8ada99f5b24f9961cef5bbd8f2f3250652b7 (commit)
       via  9edefd96a4d61dc4bd6e2bf470e785cb2e34828d (commit)
       via  bc95274af418b3a64353b2cb2578cdec43d204e8 (commit)
       via  b34e7cdc45380c06429d2195396f0512620c79b9 (commit)
       via  b2c434d62c9c7bcc408ddde51e3532d8b9d74013 (commit)
       via  9c6348ecbc8f5403aafe2b3dfccd678a60f921c0 (commit)
       via  7e6e1b7ba0c797e4692bda59ea500f953d9b7be5 (commit)
       via  ff6025edcc99b6344d39004269547a75e1d05e9b (commit)
       via  083fd1fe975eecac87f25139fffce88897bc2d44 (commit)
       via  3b8f231cc24be0814b3eaea14d2115bafe78f9cd (commit)
       via  b59367818eaf4d8c8d16ed5e118385ccbbd89751 (commit)
       via  ba8aaa6a6a30b6ab79d52450bbb431d437c3cf7e (commit)
       via  fa431021f2637a6b135a355304ceb6be0cfb58e1 (commit)
       via  f7949d1e46904fb58bb3d51b8effa249dd165523 (commit)
       via  23ff7f02c3b589341921395ec8ad1447cc367785 (commit)
       via  31f7ce2b6153be4fe9257ae911604d7c2e183a7c (commit)
       via  c72773c7f45158568754c7d639fcc25f268b7c9a (commit)
       via  0d7c69487a7fc00e9648cf622fe2958017353f18 (commit)
       via  e43ff95aa19afba4b07c7690f949c5aa45f594d0 (commit)
       via  aa4ec37a77ab65da8058160cfbf83433cab94e04 (commit)
       via  072d9f0797b40068aeb99f1c68eaeff72f26a34a (commit)
       via  a05b2746f450043afcb8c49bc632425eac1c6974 (commit)
       via  313de70a8ecc3fabb8692bd353dec86ac9950002 (commit)
       via  94439c60629cef6aac18f7242fc8303b03ca42ed (commit)
       via  ef7a28f6232c768b16489b8c7f525b301ad5e2c0 (commit)
       via  7aab47898933c308873742a568c3fca14b2a7327 (commit)
       via  f5824d8c4ffac2bea9ef5d3c05a60a32279d1603 (commit)
       via  6aa6cbdd0ea0dfaaa04c4fd3a08e59ff84a8f73a (commit)
       via  0ecc01534076197f8e86853b90d2636b454daf7c (commit)
       via  4da5874a59d5232ca1c1abedadb1e47d5b0ad14d (commit)
       via  fd441ebeadaa49e9eecaf1d20ce7db88d25d5975 (commit)
       via  0adc65021d1aafe2ae9da3f11c9da81794653b11 (commit)
       via  f46517da24e979c288e9e4e21fdf812520cff19e (commit)
       via  62519305dfb30216714cb17363e0fc76b13677fa (commit)
       via  8e0d3e31414b5e8ed5c0ecf88c91850e0f233b4a (commit)
       via  61cdf2ccc9350cc17c8d5f9381eb90e6d8ec6358 (commit)
       via  8c143040bc70c63a9b6c031584ed07381bdf603e (commit)
       via  bce184dc2426105f6d45499e9cd99b59981b8dcc (commit)
       via  1544e6e84655ae58ca65aa4456c037ce471117bf (commit)
       via  fd9bd300bec3838ee3a5b8424938c1cc5a2a781d (commit)
       via  d503ff5fd70d310d5e71ae21f2ba8568d293b2f1 (commit)
       via  2488744791e04650653d75c1b34b06e8d2e58839 (commit)
       via  404796461a1ecf64c7290c9c5a4f52c98f69227c (commit)
       via  b983f9d4b5f807755878e6575fd30c8cdf8700f2 (commit)
       via  bb08b9f3d93019a35ed99e1eb08fcb26d91cadab (commit)
       via  e23e0b682729340266add858a1db960f40d655ef (commit)
       via  c4eb4f7f4410647102dc53718535c4fdb53fd260 (commit)
       via  3512bdcef702f40f549babdd8ba2ef945c380b97 (commit)
       via  64e3ea90b905dcb94e7976910f0421839808c5fd (commit)
       via  e7c7ba09d9b0bd859b0561009be5eab5020593ed (commit)
       via  1043e0e403e1e950b1ffec7803236b2e62c72be7 (commit)
       via  f5c886d1beaf8481516c0c7de3d240f3d95d3c69 (commit)
       via  e292e02762db36da86505c99a8b3cbb0f10f2faa (commit)
       via  89c96799ce2d7bd6fd28544a6082ac86240065c3 (commit)
       via  9c10e3cebd16aa24714cc152d46055e3c7d61db7 (commit)
       via  49ff650f0b1178a3e7d0e4e9fb83b13d3eaf9d8d (commit)
       via  8089ffc6c5a6519c310362753071f9aa84a0e46b (commit)
       via  07f94a47fa2f5c607b920226ab675baac245bb4c (commit)
       via  267cd4701eed4f7286a9953f4837807c4be3f13a (commit)
       via  ecc1e5c52975b654ce934e7077cad0b92b9c566b (commit)
       via  e4f5461b3c0c4c7376a532762bc50d38b5456971 (commit)
       via  d80571561d5b27eb7b486757a42ceb8348c15f1f (commit)
       via  41b7e4f0a6ed36537ec424f7179d28a6ad1deb9c (commit)
       via  fd0e01d6aee77a5f2abe7449c66a8de225e7c46e (commit)
       via  ab726bc047ace6c9808bd6329100b411091dfc5e (commit)
       via  4c4a1b2269e08565590ee523540e142a767fe79e (commit)
       via  2000ad879def1bcb21c69a54e80ea840ef7aa4e0 (commit)
       via  d57ca4e4cbbb2fb14f2ec6584f9e27712c3f8d85 (commit)
       via  1b316edbaedef08c97798d0d2bd1cc633a6e2d77 (commit)
       via  d064e611972d41a2cee84fecde071a5cb0b857a4 (commit)
       via  2ebc2cd4a19116249921e9c5a17b5a675669c4af (commit)
       via  607dfa19ad9383f5b37643a6308593ea2893e574 (commit)
       via  acb0ac5eb7b0ffd1a674156145a5e1c45d4ae58e (commit)
       via  7584ed95ed7da7c0d1d39308a0f765cd7a5a450a (commit)
       via  9875d164b8bae823ba50aa63ba2cb795fa45a45d (commit)
       via  1d2e611e871081adaab99944df01099ada1adbc1 (commit)
       via  4efb1b0899a27905e55700f019b59835523de665 (commit)
       via  a23b02a93a8ed14b726f3b1377439948ba343352 (commit)
       via  8db19bcde085f3cdf3b98f84668f2ab1520dfab9 (commit)
       via  818af05a6814f51a463a8973d5efe94a21c006c4 (commit)
       via  7f0b7a870248000e9527870cd1efd1fb4b31444f (commit)
       via  198ff61d2be54cc31eb09602a402f60f32549cc0 (commit)
       via  5ae219807143643f3f6ffd257f901519cd108c39 (commit)
       via  7f69d3a31c7514ae96a70a98fc83b0a0e564c354 (commit)
       via  5739eb00af23e3a99801a9835d66d448718fae54 (commit)
       via  65898da466318e5d43fde742f5e4220eb7f6211a (commit)
       via  55f2857d75ed3ac504ab56bf63947f55906ec190 (commit)
       via  f5fa5a28a433f93aaee65293679fc64bddd3618e (commit)
       via  8ae61af3c1e9cdd417858bc8f50c2e70356bbbd5 (commit)
       via  9b2fd75a0fa983c4c0accd0eae42bbe8c9bebb6c (commit)
       via  0be25795c6746f8f2a16e1381f7bfadb688e4b9e (commit)
       via  2aa417878747b9a4488cb912b464a935912d3676 (commit)
       via  ecc8330075867410def9e95cf6c85408b9d3364a (commit)
       via  455a48ce58ddcc795f8bc6447d6c2b3b2c3edd89 (commit)
       via  f8c6044b768393b0c23bacc05c169c0dac3422ed (commit)
       via  7c54c736a42fe7b7989f68f6ce6947155ddeab2d (commit)
       via  aaa0bded726c6e1f6ed13884bdc84154af083fe4 (commit)
       via  e67e41c485387f693e3c2ebfb07cf86fe40df804 (commit)
       via  02a133d472a0a3cecf208f658141591ea83ebe35 (commit)
       via  3300b2d2b1a199d666bf261a1882aaaaa0d5af5b (commit)
       via  f61379ef40c892685eccf1d34513d6a91df01898 (commit)
       via  3b7222b35e4ec15902804b9b1741b9e0f2d45646 (commit)
       via  a19829a213fe39f3705dcdd7c76a6d025a4d3a75 (commit)
       via  44f9398832b365b5323a03c2948b5752217b07a2 (commit)
       via  38b6002b3638d173be6b43153f8b3471a702e21f (commit)
       via  06ee5810059d3fdab1851e1fce9fa955750e69b7 (commit)
       via  f79c4c78c48a46bbc8dffdbf3034a2d42abc85c6 (commit)
       via  ec387be2cb89096fac6c690a1cf9427850bed5a7 (commit)
       via  ddf7cb15af1271dd83d65bc79c0c318cd0bd44eb (commit)
       via  1b7b06fdfffbcb8da77b870c9a7dfa4857bbc163 (commit)
       via  3fd5fd38dfdf85074d96f13d9893cfb479ff0681 (commit)
       via  9931669f97289c194a68995652042df36719cd5c (commit)
       via  f52dcb091e2cfb821ef96c21679a1449d45d4780 (commit)
       via  cf1c75514a0c54c3d777f10b1785164dca9c8729 (commit)
       via  4f78548ad62f25816529bb117c9721108daa3f1c (commit)
       via  7628f1be78eefdafa14d2aa9b0f549ccd8c2e7d3 (commit)
       via  650bbd4001e9a11f2586f8e3a148946e2fc5e346 (commit)
       via  a1de19c8b458426a71dd22c9118ecf771c03cfb8 (commit)
       via  6a5188b46e51f9476cb8d700bf8143db2206a40e (commit)
       via  ac08ea40a32b8ac7dd946ae72326d1e31468dd9b (commit)
       via  e672f69dc1588bac311978f494e5e17326672047 (commit)
       via  1637c4e388ded0e019225d53fed3e6bbefd43bde (commit)
       via  5a3f881ea489ff202135f6c90ec9fa87eedee86d (commit)
       via  715d9f8502473b20049b00554e425e844afb84ee (commit)
       via  a24a6492ffdf0880d32d5f8daef2114715155414 (commit)
       via  fbaa0e3206382f98495f0b857594d46ddb422fb9 (commit)
       via  899e976ba9d0812d346519d9546cfe568c1d6ed5 (commit)
       via  bdcdad59c13f5645b38c24e9a4c1ebab781d6b6d (commit)
       via  0e685a00faf3a288ba1e1f988064b7d44947a0b3 (commit)
       via  8f896b470297d1395886705b820e77a26271d04d (commit)
       via  3616bafc7f9ca245e9ac3573ce154361a937bd95 (commit)
       via  c446ac44239f3736637bc9569d66d9990e20d654 (commit)
       via  acd000cd2f669995413f0369ef46a4a7ecd6b584 (commit)
       via  e0d75a0b11de1e2da7478e2e3d6aeb012681c891 (commit)
       via  4a66761a7c0cab48e70c0a70449c2dd235616865 (commit)
       via  b5f5b6d40dda3b2b4b380819c8363561bab9d14e (commit)
       via  eb3db8c71692ade0d1b855dac42f9c43ccb4a43b (commit)
       via  3bb8c1f192658b2d8cd68e88ca701096f32e9c34 (commit)
       via  b7f62a9ee5e2ae511499d4c3ddbaffdb423205bd (commit)
       via  c1ee06620f0af633e6dc51cc5590890c232e6af6 (commit)
       via  40f6fe829bf0648ec03b88f33453a2413b9775f6 (commit)
       via  9c146da5331c16ff92ac9436dbb1928bbfacdcb6 (commit)
       via  c9e084a9fdd46f3c067c40f55ac0d4241d011f4e (commit)
       via  f20064a8ac3157403df23c8dd0c202ca1a0e7841 (commit)
       via  8b956d6a100f9a9db2c0bd45c79c28830dcfba7c (commit)
       via  526592d7e52c9e4fb3b3418dbccd71c931e524d1 (commit)
       via  277cd59580de408be7714bc840495699e957e345 (commit)
       via  c668a68e40499b291793fcaa280c5b7b09222509 (commit)
       via  964c138438e9e94e8095a985d803fa75d0512e34 (commit)
       via  22bd25dceb88596c6e337c50ac5d068fa765fb3b (commit)
       via  9db8d0904c1673f8ae321a30221b06442b3ab159 (commit)
       via  5e818d77d453421417acdb292e27010c0053cd2b (commit)
       via  5cc2c8622a03e0f63715454a58f31be6bda91767 (commit)
       via  9b3c085e22dac69f657ddb55c07a172b87c02378 (commit)
       via  4cf6471fbe25d4b5ca07cfb08f2ef230e708790b (commit)
       via  0bfb709cb086d8b4bb68016dbfe194aa4fa1ddfc (commit)
       via  af101df958f47c999cc3a27e4d056d6ef0aed04a (commit)
       via  78be74cdcd313eb307718535e54ba79962a91155 (commit)
       via  37a7281b1e787264b80b9af03fd0fe47d50f93eb (commit)
       via  6e5f510fba140a1e4712fdb032dc05f73dfc790a (commit)
       via  f68775a16aaa8f9bf6240e0567aab3094dafb850 (commit)
       via  2e4187d8d935a7b4623f398dbd247379395743aa (commit)
       via  e169cf3c9d1ea1a516d58a875fae2ee93bbc4c36 (commit)
       via  eed205aff7f94fc578dc48d40ac80aa43794ba34 (commit)
       via  ab9c34521252bb3d81fa77868eb3ea7923eea45e (commit)
       via  6cb973ff77b4d0eb1b27f5217b2eac6d317ce2c0 (commit)
       via  98ba72c1b8a0f05d954ffd7773d6a11f0a980fe9 (commit)
       via  7a27317ba48f4e447e5ab76fd793d6ba589a46e3 (commit)
       via  6b999cae54d183fa744403463c39ffbe6291cc95 (commit)
       via  5bd93ef0725814e30ae15ce94a1e65c6c3abc0d2 (commit)
       via  33cf28d7fb8c3f83521329a4927e4985dd3593d9 (commit)
       via  17940330a40a3a4a1a62cb90758291f96b1ef71c (commit)
       via  820b860b33c7976ec6ac718b5c4bfae473cdd50b (commit)
       via  18310742c22c57570cfcb11401b67e67849c2bee (commit)
       via  bf03f1b7aead0cf2598cc42dd74120e58d3e3c12 (commit)
       via  82161ce9865200f03e942e88f5e806df29bfab1e (commit)
       via  a1824516fbd28c98b873ec947bfcd152a68909b7 (commit)
       via  29b06b9b4fd572d2ff4a3ce678d13ec0e19a4ab5 (commit)
       via  cd899b81aa4160cc6045e3e3dc1050ee5b648e37 (commit)
       via  c1d7dcba0072e53c6feda05d633bdf03f52c8d4e (commit)
       via  acc33ff6db2942e6d9c3a2533391fe5e7402f788 (commit)
       via  fd0f96bfe4e058bd50b058cdc9575ebba5d9ffbf (commit)
       via  3f9cbabcf83be9e5f001bcaf4b5f7abd63372a93 (commit)
       via  6985a3a321246e81aaa0de5d1d95ddb08c4f0336 (commit)
       via  185311af534c65f72c5abb9aa4e82731dfe2dff6 (commit)
       via  7732d9ea39d1f524d343531bc970ab47694cfcdf (commit)
       via  7ac4f8749577593ac252ffadb646bceacd8aba98 (commit)
       via  89f4f98309cef3708f61489594f5660106e942dc (commit)
       via  2925dc36272f91ee3a7120a59e3dae39116458cd (commit)
       via  7f415a0bbb5a33c71b32ca276bf8a21154c8fa6e (commit)
       via  789bd4b523ee4c8d1f90a60a8ee87537aaab7f21 (commit)
       via  044bf06af94ea9f45029161ee631ac559d0945f2 (commit)
       via  8bbb459317ab28eaa328670781731f973e31f14b (commit)
       via  2cf5e0b288d1483bc1c0b9e20948b61014672cdb (commit)
       via  94bd2cf31dd21355311983e9397c9b0acf8354fb (commit)
       via  e7707ffde4cabe493a2e0d058a8e5700f1f399a0 (commit)
       via  b775519e3cafc1729e6112313317b3a9535c685a (commit)
       via  5689d6b93cd757572cafe340a5b42f6fef1887d9 (commit)
       via  19f1bc89786de9a0fe52fb9cbc276fcbf23bedc3 (commit)
       via  c55a56b5d862cb3e7a9e506297e58cf4bda0ab7f (commit)
       via  ccac8100bd6e7924d36aa2eda228ce5c03432ab1 (commit)
       via  46a9418d8696b085bac427d00231457ef715a43a (commit)
       via  70355f3da9f5065e7e6dbf8dd469f524e4a5542b (commit)
       via  e74d39b47c9a731d1b04e92b2a959194fee0e1ff (commit)
       via  5690ea9bf81d47cfd28a3e30a54332c6f921092c (commit)
       via  a380988a973fee7f3ccd70c30087026cd593da77 (commit)
       via  afec57f8273c98b4fd78e4f7e612949f74ab5375 (commit)
       via  f027dc51b832e0249326bab4258bf70ea28e8805 (commit)
       via  9552b5dc6d44ec5c2ac19f887ec609ddb18e5947 (commit)
       via  887c3363dc4f1ffb8cff5405bb9a9f5122aed1ff (commit)
       via  f0bd18e11efef2c9a7fb07cb43e761338ae5be84 (commit)
       via  ae38bd482e93a7ee68a76f20831b7cf8b7fa61fd (commit)
       via  9b2b5b6c623579057e9322bd44a7342d0b08ee92 (commit)
       via  ddc54a061616e806e49661d6f863f041eb1dffc8 (commit)
       via  7cb38f2a04e068fe36002148f3b1963f906decf4 (commit)
       via  d4dbefa465df2b92c31b666d881f0eb01d9ec9ec (commit)
       via  c67087a80dbfc64fb67b0dc79291a3a9781ff02e (commit)
       via  5bd0920a899e520ecedc281a6c1324819dfffb71 (commit)
       via  3c27815a3c237e318f9ae42a1c9c5c74158ebb59 (commit)
       via  73493037c62ff899ac70024ea868d80426a26102 (commit)
       via  825d8ed76aa511cbfa75bdb0c8cca6bb2ec387e8 (commit)
       via  94f6a1917ba71f7beafa5e1164b6becebc0149e2 (commit)
       via  94eadf9dd6fa51060078fd9142693f5612b5ac6d (commit)
       via  b6a2ea940cc61079d072f9e2f7b7d8387b5f809d (commit)
       via  3dcfd24c42684c578f2ff806b021c009b45832e6 (commit)
       via  ba11b654e61b5912851bc7fcf239131be7bc13c5 (commit)
       via  f8e020101fea5bb81987929597032e3c7f34212e (commit)
       via  c9c3c3b325b3eed1531403e355b72c51d8bb61d3 (commit)
       via  1893a2d9f770e1f034424a7099315658829f65b6 (commit)
       via  d313af8df220232f24cae1494070bf86105f0346 (commit)
       via  3eed36483f4e1d7fa8ea6b900440f4c6342874ad (commit)
       via  8a99641b178876e1c309bdbcfca680807c1b2418 (commit)
       via  de72f1d32110cdaa5ad5a5ec852c25559a23a1a4 (commit)
       via  bc7e72a7937d96790c2a5d9e27fc004b44d063a7 (commit)
       via  3c53fd28fa796b8bad33cb019b67c5eeec479845 (commit)
       via  d4761e94c9e13c9876a32520a4144de4f0bfd7e1 (commit)
       via  20d91aae28f89c4341b0735c1d560a3b5fdcd53c (commit)
       via  efd96834fd72d0001799541660c962c945a1f571 (commit)
       via  fad0b1dc6453d84ae431c4b4545bb849cae1c730 (commit)
       via  16c44dfbe55ed841c0a3472995f612af775d2570 (commit)
       via  56749ef21a5a04ab7fddeca907eb92f570383b0a (commit)
       via  c0ca70ec242c67f55251aa53e3e33235f3b85c15 (commit)
       via  4ed29b591ca9128b5e2c21ad335120927bd51366 (commit)
       via  b56ea0ec153cee4af8a99bc7cdc82512261e8b1d (commit)
       via  a2ffe78ff54f7cac7f5b90c15c6179b3172ff05b (commit)
       via  13074f54a29f7d8e01bb58e292399738afae2466 (commit)
       via  d8ace69668441585144c119ce5a70a8f5bd39300 (commit)
      from  adba6bf145a03e03a611fae673dbfe936e8eca1b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cb753c3ace486a17e1f3fbb3cbee29dfd20ae68d
Merge: c45346a 28daa75
Author: Stefan Monnier <address@hidden>
Date:   Thu Aug 15 00:12:24 2013 -0400

    Mark merge point of websocket.


commit c45346a3c823eaafc09b96d2c33ba945a287346a
Merge: af5a174 714dca5
Author: Stefan Monnier <address@hidden>
Date:   Thu Aug 15 00:10:38 2013 -0400

    Mark merge point of js2-mode.

diff --cc packages/js2-mode/.gitignore
index 0000000,c531d98..c531d98
mode 000000,100644..100644
--- a/packages/js2-mode/.gitignore
+++ b/packages/js2-mode/.gitignore
diff --cc packages/js2-mode/.travis.yml
index 0000000,bb0a9e0..bb0a9e0
mode 000000,100644..100644
--- a/packages/js2-mode/.travis.yml
+++ b/packages/js2-mode/.travis.yml
diff --cc packages/js2-mode/Makefile
index 0000000,f86786f..f86786f
mode 000000,100644..100644
--- a/packages/js2-mode/Makefile
+++ b/packages/js2-mode/Makefile
diff --cc packages/js2-mode/README.md
index 0000000,9065cdf..9065cdf
mode 000000,100644..100644
--- a/packages/js2-mode/README.md
+++ b/packages/js2-mode/README.md
diff --cc packages/js2-mode/tests/externs.el
index 0000000,7860058..7860058
mode 000000,100644..100644
--- a/packages/js2-mode/tests/externs.el
+++ b/packages/js2-mode/tests/externs.el
diff --cc packages/js2-mode/tests/indent.el
index 0000000,953b8a6..953b8a6
mode 000000,100644..100644
--- a/packages/js2-mode/tests/indent.el
+++ b/packages/js2-mode/tests/indent.el
diff --cc packages/js2-mode/tests/parser.el
index 0000000,3c05c4b..3c05c4b
mode 000000,100644..100644
--- a/packages/js2-mode/tests/parser.el
+++ b/packages/js2-mode/tests/parser.el

commit af5a17495f80e22dae84f22f2b8b4b1105ca102b
Merge: 57560f2 b8bbe20
Author: Stefan Monnier <address@hidden>
Date:   Thu Aug 15 00:08:37 2013 -0400

    Mark merge point of ioccur.


commit 57560f2651584873760f4034259935c3a568f1c6
Merge: 6817d91 ef861de
Author: Stefan Monnier <address@hidden>
Date:   Thu Aug 15 00:07:07 2013 -0400

    Mark merge point of ggtags.

diff --cc packages/ggtags/Makefile
index 0000000,02fbd33..02fbd33
mode 000000,100644..100644
--- a/packages/ggtags/Makefile
+++ b/packages/ggtags/Makefile
diff --cc packages/ggtags/README.rst
index 0000000,e18db58..e18db58
mode 000000,100644..100644
--- a/packages/ggtags/README.rst
+++ b/packages/ggtags/README.rst

commit 6817d912be60c8d261856ee7c0ce959561e17f32
Merge: e5bc365 2619e05
Author: Stefan Monnier <address@hidden>
Date:   Thu Aug 15 00:04:04 2013 -0400

    Mark merge point of f90-interface-browser.

diff --cc packages/f90-interface-browser/f90-tests.el
index 0000000,d653882..d653882
mode 000000,100644..100644
--- a/packages/f90-interface-browser/f90-tests.el
+++ b/packages/f90-interface-browser/f90-tests.el

commit e5bc365387b8c37f425e25e233f1528fa20c369a
Merge: 4861427 0695539
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 14 23:49:37 2013 -0400

    Mark merge point of eldoc-eval.

diff --cc packages/eldoc-eval/README.md
index 0000000,e69de29..e69de29
mode 000000,100644..100644
--- a/packages/eldoc-eval/README.md
+++ b/packages/eldoc-eval/README.md

commit 4861427a5a8b64fc6ae555a140129c27a1d62175
Merge: fae643a 764d2aa
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 14 23:47:26 2013 -0400

    Mark merge point of company.

diff --cc admin/archive-contents.el
index 072d03f,0000000..e2154df
mode 100644,000000..100644
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@@ -1,531 -1,0 +1,532 @@@
 +;;; archive-contents.el --- Auto-generate an Emacs Lisp package archive.  -*- 
lexical-binding:t -*-
 +
 +;; Copyright (C) 2011, 2012, 2013  Free Software Foundation, Inc
 +
 +;; Author: Stefan Monnier <address@hidden>
 +
 +;; This program is free software; you can redistribute it and/or modify
 +;; it under the terms of the GNU General Public License as published by
 +;; the Free Software Foundation, either version 3 of the License, or
 +;; (at your option) any later version.
 +
 +;; This program is distributed in the hope that it will be useful,
 +;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +;; GNU General Public License for more details.
 +
 +;; You should have received a copy of the GNU General Public License
 +;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +
 +;;; Commentary:
 +
 +;;; Code:
 +
 +(eval-when-compile (require 'cl))
 +(require 'lisp-mnt)
 +(require 'package)
 +(require 'pcase)
 +
 +(defconst archive-contents-subdirectory-regexp
 +  
"\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)")
 +
 +(defconst archive-re-no-dot "\\`\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"
 +  "Regular expression matching all files except \".\" and \"..\".")
 +
 +(defun archive--convert-require (elt)
 +  (list (car elt)
 +      (version-to-list (car (cdr elt)))))
 +
 +(defun archive--strip-rcs-id (str)
 +  "Strip RCS version ID from the version string STR.
 +If the result looks like a dotted numeric version, return it.
 +Otherwise return nil."
 +  (when str
 +    (when (string-match "\\`[ \t]*[$]Revision:[ \t]+" str)
 +      (setq str (substring str (match-end 0))))
 +    (condition-case nil
 +      (if (version-to-list str)
 +          str)
 +      (error nil))))
 +
 +(defun archive--delete-elc-files (dir &optional only-orphans)
 +  "Recursively delete all .elc files in DIR.
 +Delete backup files also."
 +  (dolist (f (directory-files dir t archive-re-no-dot))
 +    (cond ((file-directory-p f)
 +         (archive--delete-elc-files f))
 +        ((or (and (string-match "\\.elc\\'" f)
 +                    (not (and only-orphans
 +                              (file-readable-p (replace-match ".el" t t f)))))
 +             (backup-file-name-p f))
 +         (delete-file f)))))
 +
 +(defun batch-make-archive ()
 +  "Process package content directories and generate the archive-contents 
file."
 +  (let ((packages '(1))) ; format-version.
 +    (dolist (dir (directory-files default-directory nil archive-re-no-dot))
 +      (condition-case v
 +        (if (not (file-directory-p dir))
 +            (message "Skipping non-package file %s" dir)
 +          (let* ((pkg (file-name-nondirectory dir))
 +                 (autoloads-file (expand-file-name (concat pkg 
"-autoloads.el") dir))
 +                 simple-p)
 +            ;; Omit autoloads and .elc files from the package.
 +            (if (file-exists-p autoloads-file)
 +                (delete-file autoloads-file))
 +            (archive--delete-elc-files dir)
 +            ;; Test whether this is a simple or multi-file package.
 +            (setq simple-p (archive--simple-package-p dir pkg))
 +            (push (if (car simple-p)
 +                      (apply #'archive--process-simple-package
 +                             dir pkg (cdr simple-p))
 +                      (apply 'archive--write-pkg-file dir pkg (cdr simple-p))
 +                    (archive--process-multi-file-package dir pkg))
 +                  packages)))
 +      (error (error "Error in %s: %S" dir v))))
 +    (with-temp-buffer
 +      (pp (nreverse packages) (current-buffer))
 +      (write-region nil nil "archive-contents"))))
 +
 +(defconst archive--revno-re "[0-9a-f]+")
 +
 +(defun archive-prepare-packages (srcdir)
 +  "Prepare the `packages' directory inside the Git checkout.
 +Expects to be called from within the `packages' directory.
 +\"Prepare\" here is for subsequent construction of the packages and archive,
 +so it is meant to refresh any generated files we may need.
 +Currently only refreshes the ChangeLog files."
 +  (setq srcdir (file-name-as-directory (expand-file-name srcdir)))
 +  (let* ((wit ".changelog-witness")
 +         (prevno (with-temp-buffer
 +                   (ignore-errors (insert-file-contents wit))
 +                   (if (looking-at (concat archive--revno-re "$"))
 +                       (match-string 0)
 +                     (error "Can't find previous revision name"))))
 +         (new-revno
 +          (or (with-temp-buffer
 +                (let ((default-directory srcdir))
 +                  (call-process "git" nil '(t) nil "rev-parse" "HEAD")
 +                  (goto-char (point-min))
 +                  (when (looking-at (concat archive--revno-re "$"))
 +                    (match-string 0))))
 +              (error "Couldn't find the current revision's name")))
 +         (pkgs '()))
 +    (unless (equal prevno new-revno)
 +      (with-temp-buffer
 +        (let ((default-directory srcdir))
 +          (unless (zerop (call-process "git" nil '(t) nil "diff"
 +                                       "--dirstat=cumulative,0"
 +                                       prevno))
 +            (error "Error signaled by git diff --dirstat %d" prevno)))
 +        (goto-char (point-min))
 +        (while (re-search-forward "^[ \t.0-9%]* 
packages/\\([-[:alnum:]]+\\)/$"
 +                                  nil t)
 +          (push (match-string 1) pkgs))))
 +    (let ((default-directory (expand-file-name "packages/")))
 +      (dolist (pkg pkgs)
 +        (condition-case v
 +            (if (file-directory-p pkg)
 +                (archive--make-changelog pkg (expand-file-name "packages/"
 +                                                               srcdir)))
 +          (error (message "Error: %S" v)))))
 +    (write-region new-revno nil wit nil 'quiet)
 +    ;; Also update the ChangeLog of external packages.
 +    (let ((default-directory (expand-file-name "packages/")))
 +      (dolist (dir (directory-files "."))
 +        (and (not (member dir '("." "..")))
 +             (file-directory-p dir)
 +             (let ((index (expand-file-name
 +                           (concat "packages/" dir "/.git/index")
 +                           srcdir))
 +                   (cl (expand-file-name "ChangeLog" dir)))
 +               (and (file-exists-p index)
 +                    (or (not (file-exists-p cl))
 +                        (file-newer-than-file-p index cl))))
 +             (archive--make-changelog
 +              dir (expand-file-name "packages/" srcdir)))))
 +    ))
 +
 +(defun archive--simple-package-p (dir pkg)
 +  "Test whether DIR contains a simple package named PKG.
 +Return a list (SIMPLE VERSION DESCRIPTION REQ), where
 +SIMPLE is non-nil if the package is indeed simple;
 +VERSION is the version string of the simple package;
 +DESCRIPTION is the brief description of the package;
 +REQ is a list of requirements.
 +Otherwise, return nil."
 +  (let* ((pkg-file (expand-file-name (concat pkg "-pkg.el") dir))
 +       (mainfile (expand-file-name (concat pkg ".el") dir))
 +         (files (directory-files dir nil "\\.el\\'"))
 +       version description req)
 +    (setq files (delete (concat pkg "-pkg.el") files))
 +    (setq files (delete (concat pkg "-autoloads.el") files))
 +    (cond
 +     ((and (not (file-exists-p pkg-file))
 +           (file-exists-p mainfile))
 +      (with-temp-buffer
 +      (insert-file-contents mainfile)
 +      (goto-char (point-min))
 +      (if (not (looking-at ";;;.*---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ 
\t]*\\)?$"))
 +            (error "Can't parse first line of %s" mainfile)
 +          (setq description (match-string 1))
 +          (setq version
 +                (or (archive--strip-rcs-id (lm-header "package-version"))
 +                    (archive--strip-rcs-id (lm-header "version"))
 +                    (error "Missing `version' header")))
 +          ;; Grab the other fields, which are not mandatory.
 +          (let ((requires-str (lm-header "package-requires")))
 +            (if requires-str
 +                (setq req (mapcar 'archive--convert-require
 +                                  (car (read-from-string requires-str))))))
 +          (list (= (length files) 1) version description req))))
 +     ((not (file-exists-p pkg-file))
 +      (error "Can find single file nor package desc file in %s" dir)))))
 +
 +(defun archive--process-simple-package (dir pkg vers desc req)
 +  "Deploy the contents of DIR into the archive as a simple package.
 +Rename DIR/PKG.el to PKG-VERS.el, delete DIR, and return the descriptor."
 +  ;; Write DIR/foo.el to foo-VERS.el and delete DIR
 +  (rename-file (expand-file-name (concat pkg ".el") dir)
 +             (concat pkg "-" vers ".el"))
 +  ;; Add the content of the ChangeLog.
 +  (let ((cl (expand-file-name "ChangeLog" dir)))
 +    (with-current-buffer (find-file-noselect (concat pkg "-" vers ".el"))
 +      (goto-char (point-max))
 +      (re-search-backward "^;;;.*ends here")
 +      (re-search-backward "^(provide")
 +      (skip-chars-backward " \t\n")
 +      (insert "\n\n;;;; ChangeLog:\n\n")
 +      (let* ((start (point))
 +             (end (copy-marker start t)))
 +        (insert-file-contents cl)
 +        (goto-char end)
 +        (unless (bolp) (insert "\n"))
 +        (while (progn (forward-line -1) (>= (point) start))
 +          (insert ";; ")))
 +      (set (make-local-variable 'backup-inhibited) t)
 +      (basic-save-buffer)               ;Less chatty than save-buffer.
 +      (kill-buffer)))
 +  (delete-directory dir t)
 +  (cons (intern pkg) (vector (version-to-list vers) req desc 'single)))
 +
 +(defun archive--make-changelog (dir srcdir)
 +  "Export Git log info of DIR into a ChangeLog file."
 +  (message "Refreshing ChangeLog in %S" dir)
 +  (let ((default-directory (file-name-as-directory (expand-file-name dir))))
 +    (with-temp-buffer
 +      (set-buffer-multibyte nil)
 +      (let ((coding-system-for-read 'binary)
 +            (coding-system-for-write 'binary))
 +        (if (file-readable-p "ChangeLog") (insert-file-contents "ChangeLog"))
 +        (let ((old-md5 (md5 (current-buffer))))
 +          (erase-buffer)
 +          (let ((default-directory
 +                  (file-name-as-directory (expand-file-name dir srcdir))))
 +            (call-process "git" nil (current-buffer) nil
 +                          "log" "--date=short"
 +                          "--format=%cd  %aN  <%ae>%n%n%w(80,8,8)%B%n"
 +                          "."))
 +          (tabify (point-min) (point-max))
 +          (goto-char (point-min))
 +          (while (re-search-forward "\n\n\n+" nil t)
 +            (replace-match "\n\n"))
 +          (if (equal old-md5 (md5 (current-buffer)))
 +              (message "ChangeLog's md5 unchanged for %S" dir)
 +            (write-region (point-min) (point-max) "ChangeLog" nil 
'quiet)))))))
 +
 +(defun archive--process-multi-file-package (dir pkg)
 +  "Deploy the contents of DIR into the archive as a multi-file package.
 +Rename DIR/ to PKG-VERS/, and return the descriptor."
 +  (let* ((exp (archive--multi-file-package-def dir pkg))
 +       (vers (nth 2 exp))
 +       (req (mapcar 'archive--convert-require (nth 4 exp))))
 +    (unless (equal (nth 1 exp) pkg)
 +      (error (format "Package name %s doesn't match file name %s"
 +                   (nth 1 exp) pkg)))
 +    (rename-file dir (concat pkg "-" vers))
 +    (cons (intern pkg) (vector (version-to-list vers) req (nth 3 exp) 'tar))))
 +
 +(defun archive--multi-file-package-def (dir pkg)
 +  "Return the `define-package' form in the file DIR/PKG-pkg.el."
 +  (let ((pkg-file (expand-file-name (concat pkg "-pkg.el") dir)))
 +    (with-temp-buffer
 +      (unless (file-exists-p pkg-file)
 +      (error "File not found: %s" pkg-file))
 +      (insert-file-contents pkg-file)
 +      (goto-char (point-min))
 +      (read (current-buffer)))))
 +
 +(defun archive--refresh-pkg-file ()
 +  (let* ((dir (directory-file-name default-directory))
 +         (pkg (file-name-nondirectory dir))
 +         (simple-p (archive--simple-package-p dir pkg)))
 +    (if simple-p
 +        (progn
 +          ;; (message "Refreshing pkg description of %s" pkg)
 +          (apply 'archive--write-pkg-file dir pkg (cdr simple-p)))
 +      ;; (message "Not refreshing pkg description of %s" pkg)
 +      )))
 +
 +(defun archive--write-pkg-file (pkg-dir name version desc requires &rest 
ignored)
 +  (let ((pkg-file (expand-file-name (concat name "-pkg.el") pkg-dir))
 +      (print-level nil)
 +        (print-quoted t)
 +      (print-length nil))
 +    (write-region
 +     (concat (format ";; Generated package description from %s.el\n"
 +                   name)
 +           (prin1-to-string
 +            (list 'define-package
 +                  name
 +                  version
 +                  desc
 +                  (list 'quote
 +                        ;; Turn version lists into string form.
 +                        (mapcar
 +                         (lambda (elt)
 +                           (list (car elt)
 +                                 (package-version-join (cadr elt))))
 +                         requires))))
 +           "\n")
 +     nil
 +     pkg-file)))
 +
 +;;; Make the HTML pages for online browsing.
 +
 +(defun archive--html-header (title)
 +  (format "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">
 +<html>
 +<head>
 +  <title>%s</title>
 +  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
 +</head>
 +<body>
 +<h1 align=\"center\">%s</h1>\n"
 +          title title))
 +
 +(defun archive--html-bytes-format (bytes) ;Aka memory-usage-format.
 +  (setq bytes (/ bytes 1024.0))
 +  (let ((units '(;; "B"
 +                 "kB" "MB" "GB" "TB")))
 +    (while (>= bytes 1024)
 +      (setq bytes (/ bytes 1024.0))
 +      (setq units (cdr units)))
 +    (cond
 +     ;; ((integerp bytes) (format "%4d%s" bytes (car units)))
 +     ((>= bytes 100) (format "%4.0f%s" bytes (car units)))
 +     ((>= bytes 10) (format "%4.1f%s" bytes (car units)))
 +     (t (format "%4.2f%s" bytes (car units))))))
 +
 +(defun archive--get-prop (prop name srcdir mainsrcfile)
 +  (let ((kprop (intern (format ":%s" (downcase prop)))))
 +    (or
 +     (let ((pkgdescfile (expand-file-name (format "%s-pkg.el" name)
 +                                          srcdir)))
 +       (when (file-readable-p pkgdescfile)
 +         (with-temp-buffer
 +           (insert-file-contents pkgdescfile)
 +           (let ((desc (read (current-buffer))))
 +             (plist-get (cdr desc) kprop)))))
 +     (when (file-readable-p mainsrcfile)
 +       (with-temp-buffer
 +         (insert-file-contents mainsrcfile)
 +         (lm-header prop))))))
 +
 +(defun archive--get-section (hsection fsection srcdir mainsrcfile)
 +  (when (consp fsection)
 +    (while (cdr-safe fsection)
 +      (setq fsection
 +            (if (file-readable-p (expand-file-name (car fsection) srcdir))
 +                (car fsection)
 +              (cdr fsection))))
 +    (when (consp fsection) (setq fsection (car fsection))))
 +  (cond
 +   ((file-readable-p (expand-file-name fsection srcdir))
 +    (with-temp-buffer
 +      (insert-file-contents (expand-file-name fsection srcdir))
 +      (buffer-string)))
 +   ((file-readable-p mainsrcfile)
 +    (with-temp-buffer
 +      (insert-file-contents mainsrcfile)
 +      (let ((start (lm-section-start hsection)))
 +        (when start
 +          (insert
 +           (prog1
 +               (buffer-substring start (lm-section-end hsection))
 +             (erase-buffer)))
 +          (emacs-lisp-mode)
 +          (goto-char (point-min))
 +          (delete-region (point) (line-beginning-position 2))
 +          (uncomment-region (point-min) (point-max))
 +          (when (looking-at "^\\([ \t]*\n\\)+")
 +            (replace-match ""))
 +          (goto-char (point-max))
 +          (skip-chars-backward " \t\n")
 +          (delete-region (point) (point-max))
 +          (buffer-string)))))))
 +
 +(defun archive--quote (txt)
 +  (replace-regexp-in-string "<" "&lt;"
 +                            (replace-regexp-in-string "&" "&amp;" txt)))
 +
 +(defun archive--insert-repolinks (name srcdir mainsrcfile)
 +  (let ((url (archive--get-prop "URL" name srcdir mainsrcfile)))
 +    (if url
 +        (insert (format "<p>Origin: <a href=%S>%s</a></p>\n"
 +                        url (archive--quote url)))
 +      (let* ((externals
 +              (with-temp-buffer
 +                (insert-file-contents
 +                 (expand-file-name "../../../elpa/externals-list" srcdir))
 +                (read (current-buffer))))
 +             (external (eq :external (nth 1 (assoc name externals))))
 +             (git-sv "http://git.savannah.gnu.org/";)
 +             (urls (if external
 +                       '("cgit/emacs/elpa.git/?h=externals/"
 +                         
"gitweb/?p=emacs/elpa.git;a=shortlog;h=refs/heads/externals/")
 +                     '("cgit/emacs/elpa.git/tree/packages/"
 +                       "gitweb/?p=emacs/elpa.git;a=tree;f=packages/"))))
 +        (insert (format
 +                 (concat "<p>Browse repository: <a href=%S>%s</a>"
 +                         " or <a href=%S>%s</a></p>\n")
 +                 (concat git-sv (nth 0 urls) name)
 +                 'CGit
 +                 (concat git-sv (nth 1 urls) name)
 +                 'Gitweb))))))
 +
 +(defun archive--html-make-pkg (pkg files)
 +  (let* ((name (symbol-name (car pkg)))
 +         (latest (package-version-join (aref (cdr pkg) 0)))
 +         (srcdir (expand-file-name name "../../build/packages"))
 +         (mainsrcfile (expand-file-name (format "%s.el" name) srcdir))
 +         (desc (aref (cdr pkg) 2)))
 +    (with-temp-buffer
 +      (insert (archive--html-header (format "GNU ELPA - %s" name)))
 +      (insert (format "<p>Description: %s</p>\n" (archive--quote desc)))
 +      (let* ((file (cdr (assoc latest files)))
 +             (attrs (file-attributes file)))
 +        (insert (format "<p>Latest: <a href=%S>%s</a>, %s, %s</p>\n"
 +                        file (archive--quote file)
 +                        (format-time-string "%Y-%b-%d" (nth 5 attrs))
 +                        (archive--html-bytes-format (nth 7 attrs)))))
 +      (let ((maint (archive--get-prop "Maintainer" name srcdir mainsrcfile)))
 +        (when maint
 +          (insert (format "<p>Maintainer: %s</p>\n" (archive--quote maint)))))
 +      (archive--insert-repolinks name srcdir mainsrcfile)
-       (let ((readme (archive--get-section "Commentary"
-                                           '("README" "README.rst" "README.md"
-                                             "README.org")
-                                           srcdir mainsrcfile)))
-         (when readme
-           (write-region readme nil (concat name "-readme.txt"))
-           (insert "<h2>Full description</h2><pre>\n" (archive--quote readme)
++      (let ((rm (archive--get-section
++                 "Commentary" '("README" "README.rst" "README.md" 
"README.org")
++                 srcdir mainsrcfile)))
++        (when rm
++          (write-region rm nil (concat name "-readme.txt"))
++          (insert "<h2>Full description</h2><pre>\n" (archive--quote rm)
 +                  "\n</pre>\n")))
 +      (unless (< (length files) 2)
 +        (insert (format "<h2>Old versions</h2><table cellpadding=\"3\" 
border=\"1\">\n"))
 +        (dolist (file files)
 +          (unless (equal (pop file) latest)
 +            (let ((attrs (file-attributes file)))
 +              (insert (format "<tr><td><a 
href=%S>%s</a></td><td>%s</td><td>%s</td>\n"
 +                              file (archive--quote file)
 +                              (format-time-string "%Y-%b-%d" (nth 5 attrs))
 +                              (archive--html-bytes-format (nth 7 attrs)))))))
 +        (insert "</table>\n"))
-       (let ((news (archive--get-section "News" "NEWS" srcdir mainsrcfile)))
++      (let ((news (archive--get-section
++                   "News" '("NEWS" "NEWS.rst" "NEWS.md" "NEWS.org")
++                   srcdir mainsrcfile)))
 +        (when news
 +          (insert "<h2>News</h2><pre>\n" (archive--quote news) "\n</pre>\n")))
 +      (insert "</body>\n")
 +      (write-region (point-min) (point-max) (concat name ".html")))))
 +
 +(defun archive--html-make-index (pkgs)
 +  (with-temp-buffer
 +    (insert (archive--html-header "GNU ELPA Packages"))
 +    (insert "<table cellpadding=\"3\" border=\"1\">\n")
 +    (insert "<tr><th>Package</th><th>Version</th><th>Description</th></tr>\n")
 +    (dolist (pkg pkgs)
 +      (insert (format "<tr><td><a 
href=\"%s.html\">%s</a></td><td>%s</td><td>%s</td></tr>\n"
 +                      (car pkg) (car pkg)
 +                      (package-version-join (aref (cdr pkg) 0))
 +                      (aref (cdr pkg) 2))))
 +    (insert "</table></body>\n")
 +    (write-region (point-min) (point-max) "index.html")))
 +
 +(defun batch-html-make-index ()
 +  (let ((packages (make-hash-table :test #'equal))
 +        (archive-contents
 +         (with-temp-buffer
 +           (insert-file-contents "archive-contents")
 +           (goto-char (point-min))
 +           ;; Skip the first element which is a version number.
 +           (cdr (read (current-buffer))))))
 +    (dolist (file (directory-files default-directory nil))
 +      (cond
 +       ((member file '("." ".." "elpa.rss" "index.html" "archive-contents")))
 +       ((string-match "\\.html\\'" file))
 +       ((string-match "-readme\\.txt\\'" file)
 +        (let ((name (substring file 0 (match-beginning 0))))
 +          (puthash name (gethash name packages) packages)))
 +       ((string-match "-\\([0-9][^-]*\\)\\.\\(tar\\|el\\)\\'" file)
 +        (let ((name (substring file 0 (match-beginning 0)))
 +              (version (match-string 1 file)))
 +          (push (cons version file) (gethash name packages))))
 +       (t (message "Unknown file %S" file))))
 +    (dolist (pkg archive-contents)
 +      (archive--html-make-pkg pkg (gethash (symbol-name (car pkg)) packages)))
 +    ;; FIXME: Add (old?) packages that are in `packages' but not in
 +    ;; archive-contents.
 +    (archive--html-make-index archive-contents)))
 +
 +;;; Maintain external packages.
 +
 +(defconst archive--elpa-git-url "git://git.sv.gnu.org/emacs/elpa")
 +
 +(defun archive-add/remove/update-externals ()
 +  (let ((exts (with-current-buffer (find-file-noselect "externals-list")
 +                (goto-char (point-min))
 +                (read (current-buffer)))))
 +    (let ((default-directory (expand-file-name "packages/")))
 +      ;; Remove "old/odd" externals.
 +      (dolist (dir (directory-files "."))
 +        (cond
 +         ((member dir '("." "..")) nil)
 +         ((assoc dir exts) nil)
 +         ((file-directory-p (expand-file-name (format "%s/.git" dir)))
 +          (let ((status
 +                 (with-temp-buffer
 +                   (let ((default-directory (file-name-as-directory
 +                                             (expand-file-name dir))))
 +                     (call-process "git" nil t nil "status" "--porcelain")
 +                     (buffer-string)))))
 +            (if (zerop (length status))
 +                (progn (delete-directory dir 'recursive t)
 +                       (message "Deleted all of %s" dir))
 +              (message "Keeping leftover unclean %s:\n%s" dir status))))))
 +      (pcase-dolist (`(,dir ,kind ,_url) exts)
 +        (cond
 +         ((eq kind :subtree) nil)       ;Nothing to do.
 +         ((not (eq kind :external))
 +          (message "Unknown external package kind `%S' for %s" kind dir))
 +         ((not (file-exists-p dir))
 +          (let* ((branch (concat "externals/" dir))
 +                 (output
 +                  (with-temp-buffer
 +                    ;; FIXME: Use git-new-workdir!
 +                    (call-process "git" nil t nil "clone"
 +                                  "--reference" ".." "--branch" branch
 +                                  archive--elpa-git-url dir)
 +                    (buffer-string))))
 +            (message "Cloning branch %s:\n%s" dir output)))
 +         ((not (file-directory-p (concat dir "/.git")))
 +          (message "%s is in the way of an external, please remove!" dir))
 +         (t
 +          (let ((default-directory (file-name-as-directory
 +                                    (expand-file-name dir))))
 +            (with-temp-buffer
 +              (message "Running git pull in %S" default-directory)
 +              (call-process "git" nil t nil "pull")
 +              (message "Updated %s:%s" dir (buffer-string))))
 +          ))))))
 +
 +(provide 'archive-contents)
 +;;; archive-contents.el ends here
diff --cc packages/company/.gitignore
index 0000000,2ecd291..2ecd291
mode 000000,100644..100644
--- a/packages/company/.gitignore
+++ b/packages/company/.gitignore
diff --cc packages/company/.travis.yml
index 0000000,cdf55d1..cdf55d1
mode 000000,100644..100644
--- a/packages/company/.travis.yml
+++ b/packages/company/.travis.yml
diff --cc packages/company/Makefile
index 0000000,f11b04e..f11b04e
mode 000000,100644..100644
--- a/packages/company/Makefile
+++ b/packages/company/Makefile
diff --cc packages/company/NEWS.md
index 0000000,64860ba..64860ba
mode 000000,100644..100644
--- a/packages/company/NEWS.md
+++ b/packages/company/NEWS.md
diff --cc packages/company/README.md
index 0000000,4f79bbc..4f79bbc
mode 000000,100644..100644
--- a/packages/company/README.md
+++ b/packages/company/README.md

commit fae643a95ed3ba2cefbe70c94d16da7b17877dca
Merge: de72888 4c4829d
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 14 23:39:50 2013 -0400

    Mark merge point of ack-el.

diff --cc packages/ack/README.rst
index 0000000,9d4e14f..9d4e14f
mode 000000,100644..100644
--- a/packages/ack/README.rst
+++ b/packages/ack/README.rst
diff --cc packages/ack/ack.el
index e749355,01529d7..f7a91d0
--- a/packages/ack/ack.el
+++ b/packages/ack/ack.el
@@@ -1,4 -1,4 +1,4 @@@
--;;; ack.el --- interface to ack-like tools   -*- lexical-binding: t; -*-
++;;; ack.el --- Interface to ack-like source code search tools   -*- 
lexical-binding: t; -*-
  
  ;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
  

commit de7288845c1310f3e6f79b8e5cff7415a894c748
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 14 23:28:31 2013 -0400

    Use README.{rst,md,org}; Auto-generate foo-pkg.el.

diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index fcc7071..072d03f 100644
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -76,9 +76,10 @@ Delete backup files also."
              (archive--delete-elc-files dir)
              ;; Test whether this is a simple or multi-file package.
              (setq simple-p (archive--simple-package-p dir pkg))
-             (push (if simple-p
+             (push (if (car simple-p)
                        (apply #'archive--process-simple-package
-                              dir pkg simple-p)
+                              dir pkg (cdr simple-p))
+                      (apply 'archive--write-pkg-file dir pkg (cdr simple-p))
                      (archive--process-multi-file-package dir pkg))
                    packages)))
        (error (error "Error in %s: %S" dir v))))
@@ -147,24 +148,20 @@ Currently only refreshes the ChangeLog files."
 
 (defun archive--simple-package-p (dir pkg)
   "Test whether DIR contains a simple package named PKG.
-If so, return a list (VERSION DESCRIPTION REQ), where
-VERSION is the version string of the simple package, DESCRIPTION
-is the brief description of the package, REQ is a list of
-requirements.
+Return a list (SIMPLE VERSION DESCRIPTION REQ), where
+SIMPLE is non-nil if the package is indeed simple;
+VERSION is the version string of the simple package;
+DESCRIPTION is the brief description of the package;
+REQ is a list of requirements.
 Otherwise, return nil."
   (let* ((pkg-file (expand-file-name (concat pkg "-pkg.el") dir))
         (mainfile (expand-file-name (concat pkg ".el") dir))
-         (files (directory-files dir nil archive-re-no-dot))
+         (files (directory-files dir nil "\\.el\\'"))
         version description req)
-    (dolist (file (prog1 files (setq files ())))
-      (unless (string-match "\\(?:\\.elc\\|~\\)\\'" file)
-        (push file files)))
     (setq files (delete (concat pkg "-pkg.el") files))
     (setq files (delete (concat pkg "-autoloads.el") files))
-    (setq files (delete "ChangeLog" files))
     (cond
-     ((and (or (not (file-exists-p pkg-file))
-               (= (length files) 1))
+     ((and (not (file-exists-p pkg-file))
            (file-exists-p mainfile))
       (with-temp-buffer
        (insert-file-contents mainfile)
@@ -181,7 +178,7 @@ Otherwise, return nil."
             (if requires-str
                 (setq req (mapcar 'archive--convert-require
                                   (car (read-from-string requires-str))))))
-          (list version description req))))
+          (list (= (length files) 1) version description req))))
      ((not (file-exists-p pkg-file))
       (error "Can find single file nor package desc file in %s" dir)))))
 
@@ -266,7 +263,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
     (if simple-p
         (progn
           ;; (message "Refreshing pkg description of %s" pkg)
-          (apply 'archive--write-pkg-file dir pkg simple-p))
+          (apply 'archive--write-pkg-file dir pkg (cdr simple-p)))
       ;; (message "Not refreshing pkg description of %s" pkg)
       )))
 
@@ -336,6 +333,13 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
          (lm-header prop))))))
 
 (defun archive--get-section (hsection fsection srcdir mainsrcfile)
+  (when (consp fsection)
+    (while (cdr-safe fsection)
+      (setq fsection
+            (if (file-readable-p (expand-file-name (car fsection) srcdir))
+                (car fsection)
+              (cdr fsection))))
+    (when (consp fsection) (setq fsection (car fsection))))
   (cond
    ((file-readable-p (expand-file-name fsection srcdir))
     (with-temp-buffer
@@ -409,7 +413,10 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
         (when maint
           (insert (format "<p>Maintainer: %s</p>\n" (archive--quote maint)))))
       (archive--insert-repolinks name srcdir mainsrcfile)
-      (let ((readme (archive--get-section "Commentary" "README" srcdir 
mainsrcfile)))
+      (let ((readme (archive--get-section "Commentary"
+                                          '("README" "README.rst" "README.md"
+                                            "README.org")
+                                          srcdir mainsrcfile)))
         (when readme
           (write-region readme nil (concat name "-readme.txt"))
           (insert "<h2>Full description</h2><pre>\n" (archive--quote readme)
@@ -471,7 +478,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
 
 ;;; Maintain external packages.
 
-(defconst archive--elpa-git-url "git+ssh://git.sv.gnu.org/srv/git/emacs/elpa")
+(defconst archive--elpa-git-url "git://git.sv.gnu.org/emacs/elpa")
 
 (defun archive-add/remove/update-externals ()
   (let ((exts (with-current-buffer (find-file-noselect "externals-list")
diff --git a/admin/update-archive.sh b/admin/update-archive.sh
index 91090ac..fb7b91d 100755
--- a/admin/update-archive.sh
+++ b/admin/update-archive.sh
@@ -40,10 +40,15 @@ cd ../elpa
 # Fetch changes.
 git pull || signal_error "git pull failed"
 
+# Remember we're inside the "elpa" branch which we don't want to trust,
+# So always refer to the makefile and admins files from $builddir".
+
 # Setup and update externals.
-make externals
+emacs --batch -l "$buildir/admin/archive-contents.el" \
+      -f archive-add/remove/update-externals
 
-make check_copyrights || signal_error "check_copyright failed"
+make -f "$buildir/GNUmakefile" check_copyrights ||
+    signal_error "check_copyright failed"
 
 cd "$buildir"
 

commit 4faa2623a68e90c3b817bf83f2ff1785b85684d6
Merge: adba6bf eb912a1
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 14 23:25:46 2013 -0400

    Mark merge point of coffee-mode.

diff --cc externals-list
index e2b7504,0000000..ef40b34
mode 100644,000000..100644
--- a/externals-list
+++ b/externals-list
@@@ -1,36 -1,0 +1,35 @@@
 +;; -*- emacs-lisp -*-
 +
 +;; List of packages that are maintained externally.
 +;; The list is made of elements of the form (NAME KIND URL).
 +;;
 +;; Where NAME is the name of the package;
 +;;
 +;; KIND can be one of:
 +;;  :subtree  = a "git subtree" in the `master' branch.
 +;;  :external = kept in a separate `externals/<name>' branch.
 +;;
 +;; And URL is the URL of the remote git repository that we want to track.
 +;; It can be nil, in which case we don't track anything (useless for
 +;; :subtree, but not for :external).
 +
 +;; The FIXMEs indicate that the branch can't be merged as is because it needs
 +;; some manual intervention (typically, because the two branches have
 +;; diverged).
 +
 +(("ack"                       :subtree "https://github.com/leoliu/ack-el";)
-  ;; In need of serious manual sync as well.
 + ;;FIXME:("auctex"    :subtree "git://git.sv.gnu.org/auctex.git")
 + ("coffee-mode"               :subtree 
"https://github.com/defunkt/coffee-mode";)
 + ("company"           :subtree 
"https://github.com/company-mode/company-mode.git";)
 + ("dismal"            :external nil)
 + ("eldoc-eval"                :subtree 
"https://github.com/thierryvolpiatto/eldoc-eval.git";)
 + ("enwc"              :subtree 
"bzr::bzr://bzr.savannah.nongnu.org/enwc/trunk")
 + ("f90-interface-browser" :subtree "http://github.com/wence-/f90-iface";)
 + ("ggtags"            :subtree "https://github.com/leoliu/ggtags";)
 + ("ioccur"            :subtree 
"https://github.com/thierryvolpiatto/ioccur.git";)
 + ("js2-mode"          :subtree "https://github.com/mooz/js2-mode.git";)
 + ;;FIXME:("org"               :external ??) ;; Need to introduce snapshots!!
 + ;;FIXME:("vlf"               :subtree ??)
 + ("websocket"         :subtree 
"https://github.com/ahyatt/emacs-websocket.git";)
 + ;;FIXME:("yasnippet" :subtree 
"https://github.com/capitaomorte/yasnippet.git";)
 + )
diff --cc packages/coffee-mode/coffee-mode.el
index 4420ab9,87a95e7..427c047
--- a/packages/coffee-mode/coffee-mode.el
+++ b/packages/coffee-mode/coffee-mode.el
@@@ -24,55 -25,34 +24,68 @@@
  
  ;;; Commentary
  
 -;; For commentary please see the README.md or
 -;; http://github.com/defunkt/coffee-mode#readme
 +;; CoffeeScript mode is an Emacs major mode for [CoffeeScript][cs],
 +;; unfancy JavaScript.  It provides syntax highlighting, indentation
 +;; support, imenu support, a menu bar, and a few cute commands.
  
 -;;; Installation
 +;; Installing this package enables CoffeeScript mode for file named
 +;; *.coffee and Cakefile.
  
 -;; In your shell:
 +;; Commands:
  
 -;;     $ cd ~/.emacs.d/vendor
 -;;     $ git clone git://github.com/defunkt/coffee-mode.git
 -
 -;; In your emacs config:
 -
 -;;     (add-to-list 'load-path "~/.emacs.d/vendor/coffee-mode")
 -;;     (require 'coffee-mode)
 +;; M-x coffee-compile-file compiles the current file as a JavaScript
 +;; file.  Operating on "basic.coffee" and running this command will
 +;; save a "basic.js" in the same directory.  Subsequent runs will
 +;; overwrite the file.
 +;;
 +;; If there are compilation errors and we the compiler have returned a
 +;; line number to us for the first error, the point is moved to that
 +;; line, so you can investigate.  If this annoys you, you can set
 +;; `coffee-compile-jump-to-error` to `nil`.
 +;;
 +;; M-x coffee-compile-buffer compiles the current buffer to JavaScript
 +;; using the command specified by the `coffee-command` variable, and
 +;; opens the contents in a new buffer using the mode configured for
 +;; ".js" files.
 +;;
 +;; M-x coffee-compile-region compiles the selected region to
 +;; JavaScript using the same configuration variables as
 +;; `coffee-compile-buffer`.
 +;;
 +;; `C-c C-o C-s' (coffee-cos-mode) toggles a minor mode implementing
 +;; "compile-on-save" behavior.
 +;;
 +;; M-x coffee-repl starts a repl via `coffee-command` in a new buffer.
  
 -;;; Thanks
 +;; Options:
 +;;
 +;; `coffee-tab-width' - Tab width to use when indenting.
 +;; `coffee-command'   - CoffeeScript command for evaluating code.
 +;;                      Must be in your path.
 +;; `coffee-args-repl' - Command line arguments for `coffee-command'
 +;;                      when starting a REPL.
 +;; `coffee-args-compile'          - Arguments for `coffee-command'
 +;;                                  when compiling a file.
 +;; `coffee-compiled-buffer-name'  - Name of the scratch buffer used
 +;;                                  when compiling CoffeeScript.
 +;; `coffee-compile-jump-to-error' - Whether to jump to the first error
 +;;                                  if compilation fails.
 +
 +;; Please file bugs at <http://github.com/defunkt/coffee-mode/issues>
 +
++;; Thanks:
+ 
+ ;; Major thanks to http://xahlee.org/emacs/elisp_syntax_coloring.html
+ ;; the instructions.
+ 
+ ;; Also thanks to Jason Blevins's markdown-mode.el and Steve Yegge's
+ ;; js2-mode for guidance.
+ 
+ ;; TODO:
+ ;; - Execute {buffer,region,line} and show output in new buffer
+ ;; - Make prototype accessor assignments like `String::length: -> 10` pretty.
+ ;; - mirror-mode - close brackets and parens automatically
+ 
  ;;; Code:
  
  (require 'comint)

commit 06955397d6103651fc01022dc45174b72b4260dc
Author: Stefan Monnier <address@hidden>
Date:   Tue Aug 13 16:35:49 2013 +0200

    Merge with ELPA
    (eldoc-display-message-no-interference-p): Turn it into an advice.elpa
    (eldoc-active-minibuffers-list): Store buffers rather than buffer names.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index cace999..5be33e3 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -1,6 +1,6 @@
 ;;; eldoc-eval.el --- Enable eldoc support when minibuffer is in use.
 
-;; Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
 
 ;; Author: Thierry Volpiatto <address@hidden>
 ;; Version: 0.1
@@ -45,6 +45,12 @@
 ;;; Code:
 (require 'eldoc)
 
+;; FIXME: This has no autoloads and (require 'eldoc-eval) will change Emacs's
+;; behavior, against usual conventions.  The fix is to define
+;; eldoc-in-minibuffer as a (global) minor mode, then autoload it.  So the
+;; default value will be nil, and the user can enable it with
+;; (eldoc-in-minibuffer 1) or by customizing eldoc-in-minibuffer, rather than
+;; by adding (require 'eldoc-eval) in her .emacs.
 
 ;;; Minibuffer support.
 ;;  Enable displaying eldoc info in something else
@@ -84,14 +90,17 @@ Should take one arg: the string to display"
 (when (boundp 'eldoc-message-function)
   (setq eldoc-message-function 'message)
 
-  (defun eldoc-display-message-no-interference-p ()
+  (defadvice eldoc-display-message-no-interference-p
+      (around eldoc-eval activate)
+    (if (not eldoc-in-minibuffer)
+        ad-do-it
     (and eldoc-mode
          (not executing-kbd-macro)
          (not (and (boundp 'edebug-active) edebug-active))
          ;; Having this mode operate in an active minibuffer/echo area causes
          ;; interference with what's going on there.
          (not cursor-in-echo-area)
-         (not (eq (selected-window) (minibuffer-window))))))
+           (not (eq (selected-window) (minibuffer-window)))))))
 
 ;; Internal.
 (defvar eldoc-active-minibuffers-list nil
@@ -103,7 +112,7 @@ Should take one arg: the string to display"
 This function is called by each minibuffer started with eldoc support.
 See `with-eldoc-in-minibuffer'."
   (with-selected-window (minibuffer-window)
-    (push (buffer-name) eldoc-active-minibuffers-list)))
+    (push (current-buffer) eldoc-active-minibuffers-list)))
 
 (defmacro with-eldoc-in-minibuffer (&rest body)
   "Enable eldoc support for minibuffer input that runs in BODY."
@@ -166,7 +175,7 @@ See `with-eldoc-in-minibuffer'."
 
 (defun eldoc-mode-in-minibuffer ()
   "Show eldoc for current minibuffer input."
-  (let ((buf (buffer-name (window-buffer (active-minibuffer-window)))))
+  (let ((buf (window-buffer (active-minibuffer-window))))
     ;; If this minibuffer have been started with
     ;;`with-eldoc-in-minibuffer' give it eldoc support
     ;; and update mode-line, otherwise do nothing.
@@ -193,6 +202,9 @@ See `with-eldoc-in-minibuffer'."
     (call-interactively eval-preferred-function)))
 
 ;; Bind it to `M-:'.
+
+;; FIXME: Turn eldoc-in-minibuffer into a global minor mode, and place this
+;; binding in its keymap.
 (global-set-key [remap eval-expression] 'eval-expression-with-eldoc)
 
 

commit fb883784a1c773b4a1e43d2aff7658b9129eff00
Author: Thierry Volpiatto <address@hidden>
Date:   Mon Aug 12 09:27:54 2013 +0200

    * eldoc-eval.el: Merge docstring and minors changes from ELPA version.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index 2879caf..cace999 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -1,8 +1,9 @@
-;;; eldoc-eval.el --- Show eldoc when using M-:
+;;; eldoc-eval.el --- Enable eldoc support when minibuffer is in use.
 
-;; Copyright (C) 2011 Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 
 ;; Author: Thierry Volpiatto <address@hidden>
+;; Version: 0.1
 
 ;; This file is part of GNU Emacs.
 
@@ -20,11 +21,31 @@
 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
+;;
+;; This package enables eldoc support when minibuffer is in use.
+;;
+;; Eldoc info is shown by default in mode-line,
+;; but you can have eldoc info somewhere else by setting
+;; `eldoc-in-minibuffer-show-fn' to another function (e.g `tooltip-show').
+;;
+;; By default with this package `M-:' will use `pp-eval-expression'
+;; instead of `eval-expression'; you can change that by setting
+;; `eval-preferred-function'.
+;;
+;; It also provides a convenient macro to enable eldoc support
+;; in your own functions using minibuffer or in your defadvices,
+;; that is `with-eldoc-in-minibuffer'.
+;;
+;; Users of own minibuffer frame will have to set
+;; `eldoc-in-minibuffer-own-frame-p' to non-nil.
+;;
+;; You can turn off eldoc support in minibuffer any time
+;; by setting `eldoc-in-minibuffer' to nil.
 
 ;;; Code:
-
 (require 'eldoc)
 
+
 ;;; Minibuffer support.
 ;;  Enable displaying eldoc info in something else
 ;;  Than minibuffer when this one is in use.
@@ -45,13 +66,13 @@ Should take one arg: the string to display"
   :group 'eldoc
   :type 'number)
 
-(defcustom eldoc-eval-prefered-function 'pp-eval-expression
-  "Prefered function to use with `M-:'."
+(defcustom eval-preferred-function 'pp-eval-expression
+  "Preferred function to use with `M-:'."
   :group 'lisp
   :type 'function)
 
 (defcustom  eldoc-in-minibuffer-own-frame-p nil
-  "Whether minibuffer have own frame or not."
+  "Whether minibuffer has its own frame or not."
   :group 'lisp
   :type 'boolean)
 
@@ -74,7 +95,7 @@ Should take one arg: the string to display"
 
 ;; Internal.
 (defvar eldoc-active-minibuffers-list nil
-  "Store actives minibuffers with eldoc enabled.")
+  "List of active minibuffers with eldoc enabled.")
 (defvar eldoc-mode-line-rolling-flag nil)
 
 (defun eldoc-store-minibuffer ()
@@ -85,7 +106,7 @@ See `with-eldoc-in-minibuffer'."
     (push (buffer-name) eldoc-active-minibuffers-list)))
 
 (defmacro with-eldoc-in-minibuffer (&rest body)
-  "Enable eldoc support for minibuffer input that run in BODY."
+  "Enable eldoc support for minibuffer input that runs in BODY."
   (declare (indent 0) (debug t))
   `(let ((timer (and eldoc-in-minibuffer
                      (run-with-idle-timer
@@ -98,21 +119,21 @@ See `with-eldoc-in-minibuffer'."
              'eldoc-store-minibuffer
            ,@body)
        (and timer (cancel-timer timer))
-       ;; Each time a minibuffer exit or abort
-       ;; his buffer is removed from stack,
+       ;; Each time a minibuffer exits or aborts
+       ;; its buffer is removed from stack,
        ;; assuming we can only exit the active minibuffer
        ;; on top of stack.
        (setq eldoc-active-minibuffers-list
              (cdr eldoc-active-minibuffers-list)))))
 
 (defun eldoc-current-buffer ()
-  "The `current-buffer' before activating minibuffer."
+  "Return the current buffer prior to activating the minibuffer."
   (with-selected-frame (last-nonminibuffer-frame)
     (window-buffer
      (cond (eldoc-in-minibuffer-own-frame-p
             (selected-window))
            ((fboundp 'window-in-direction)
-            (window-in-direction 
+            (window-in-direction
              'above (minibuffer-window)))
            (t (minibuffer-selected-window))))))
 
@@ -169,7 +190,7 @@ See `with-eldoc-in-minibuffer'."
   "Eval expression with eldoc support in mode-line."
   (interactive)
   (with-eldoc-in-minibuffer
-    (call-interactively eldoc-eval-prefered-function)))
+    (call-interactively eval-preferred-function)))
 
 ;; Bind it to `M-:'.
 (global-set-key [remap eval-expression] 'eval-expression-with-eldoc)

commit 28daa752f9f5578f989985ab3de02a82792c66ef
Author: Andrew Hyatt <address@hidden>
Date:   Sat Aug 3 14:09:26 2013 -0400

    Syncing to the version now in emacs ELPA repository.
    
    These changes were authored by Stefan Monnier in commits:
    
    address@hidden
    * packages/websocket: Cleanup copyright and code.
    
    and
    
    address@hidden
    * packages/websocket/websocket.el: Fix version number.

diff --git a/websocket-functional-test.el b/websocket-functional-test.el
index a87d021..af1a4ee 100644
--- a/websocket-functional-test.el
+++ b/websocket-functional-test.el
@@ -1,4 +1,22 @@
-;; Simple functional testing
+;;; websocket-functional-test.el --- Simple functional testing
+
+;; Copyright (c) 2013  Free Software Foundation, Inc.
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 3 of the
+;; License, or (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
 ;; Usage: emacs -batch -Q -L . -l websocket-functional-test.el
 ;;
 ;; Note: this functional tests requires that you have python with the
diff --git a/websocket-test.el b/websocket-test.el
index c06d7cf..3cc51f9 100644
--- a/websocket-test.el
+++ b/websocket-test.el
@@ -1,13 +1,13 @@
-;; websocket-test.el --- Unit tests for the websocket layer
+;;; websocket-test.el --- Unit tests for the websocket layer
 
-;; Copyright (c) 2010 Andrew Hyatt
+;; Copyright (c) 2013  Free Software Foundation, Inc.
 ;;
 ;; Author: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Maintainer: Andrew Hyatt <ahyatt at gmail dot com>
 ;;
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2 of the
+;; published by the Free Software Foundation; either version 3 of the
 ;; License, or (at your option) any later version.
 ;;
 ;; This program is distributed in the hope that it will be useful, but
@@ -16,9 +16,7 @@
 ;; General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-;; 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 ;; This defines and runs ert unit tests.  You can download ert from:
diff --git a/websocket.el b/websocket.el
index ce6249b..7ea9c93 100644
--- a/websocket.el
+++ b/websocket.el
@@ -1,15 +1,15 @@
 ;;; websocket.el --- Emacs WebSocket client and server
 
-;; Copyright (c) 2010 Andrew Hyatt
-;;
+;; Copyright (c) 2013  Free Software Foundation, Inc.
+
 ;; Author: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Maintainer: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Keywords: Communication, Websocket, Server
-;; Version: 1.01
+;; Version: 1.1
 ;;
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2 of the
+;; published by the Free Software Foundation; either version 3 of the
 ;; License, or (at your option) any later version.
 ;;
 ;; This program is distributed in the hope that it will be useful, but
@@ -18,16 +18,14 @@
 ;; General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-;; 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 ;; This implements RFC 6455, which can be found at
 ;; http://tools.ietf.org/html/rfc6455.
 ;;
-;; This library contains code to connect emacs as a client to a
-;; websocket server, and for emacs to act as a server for websocket
+;; This library contains code to connect Emacs as a client to a
+;; websocket server, and for Emacs to act as a server for websocket
 ;; connections.
 ;;
 ;; Websockets clients are created by calling `websocket-open', which
@@ -101,7 +99,7 @@ same for the protocols.
   accept-string
   (inflight-input nil))
 
-(defvar websocket-version "1.01"
+(defvar websocket-version "1.1"
   "Version numbers of this version of websocket.el.")
 
 (defvar websocket-debug nil
@@ -122,7 +120,7 @@ communicate with unmasked clients.")
   "If true, when an error happens in a client callback, invoke the debugger.
 Having this on can cause issues with missing frames if the debugger is
 exited by quitting instead of continuing, so it's best to have this set
-to `nil' unless it is especially needed.")
+to nil unless it is especially needed.")
 
 (defmacro websocket-document-function (function docstring)
   "Document FUNCTION with DOCSTRING.  Use this for defstruct accessor etc."
@@ -212,7 +210,7 @@ approximately 537M long."
                 "Frame value found too large to parse!")))
     ;; n is not 8
     (bindat-get-field
-     (condition-case err
+     (condition-case _
          (bindat-unpack
           `((:val
              ,(cond ((= n 1) 'u8)
@@ -364,8 +362,8 @@ the frame finishes.  If the frame is not completed, return 
NIL."
        :completep (> fin 0)))))
 
 (defun websocket-format-error (err)
-  "Format an error message like command level does. ERR should be
-a cons of error symbol and error data."
+  "Format an error message like command level does.
+ERR should be a cons of error symbol and error data."
 
   ;; Formatting code adapted from `edebug-report-error'
   (concat (or (get (car err) 'error-message)
@@ -375,7 +373,7 @@ a cons of error symbol and error data."
                     (mapconcat #'prin1-to-string
                                (cdr err) ", ")))))
 
-(defun websocket-default-error-handler (websocket type err)
+(defun websocket-default-error-handler (_websocket type err)
   "The default error handler used to handle errors in callbacks."
   (display-warning 'websocket
                    (format "in callback `%S': %s"
@@ -418,11 +416,11 @@ a cons of error symbol and error data."
      "The frame being sent is too large for this emacs to handle")
 
 (defun websocket-intersect (a b)
-  "Simple list intersection, should function like common lisp's 
`intersection'."
+  "Simple list intersection, should function like Common Lisp's 
`intersection'."
   (let ((result))
     (dolist (elem a (nreverse result))
       (when (member elem b)
-        (add-to-list 'result elem)))))
+        (push elem result)))))
 
 (defun websocket-get-debug-buffer-create (websocket)
   "Get or create the buffer corresponding to WEBSOCKET."
@@ -531,7 +529,7 @@ If the websocket is closed a signal `websocket-closed' is 
sent,
 also with `websocket-error' condition.  The data in the signal is
 also the frame.
 
-The frame may be too large for this buid of emacs, in which case
+The frame may be too large for this buid of Emacs, in which case
 `websocket-frame-too-large' is returned, with the data of the
 size of the frame which was too large to process.  This also has
 the `websocket-error' condition."
@@ -585,7 +583,7 @@ connecting or open."
 ;;;;;;;;;;;;;;;;;;;;;;
 
 (defun* websocket-open (url &key protocols extensions (on-open 'identity)
-                            (on-message (lambda (w f))) (on-close 'identity)
+                            (on-message (lambda (_w _f))) (on-close 'identity)
                             (on-error 'websocket-default-error-handler))
   "Open a websocket connection to URL, returning the `websocket' struct.
 The PROTOCOL argument is optional, and setting it will declare to
@@ -717,7 +715,6 @@ is no more output or the connection closes.  If the 
websocket
 connection is invalid, the connection will be closed."
   (websocket-debug websocket "Received: %s" output)
   (let ((start-point)
-        (end-point 0)
         (text (concat (websocket-inflight-input websocket) output))
         (header-end-pos))
     (setf (websocket-inflight-input websocket) nil)
@@ -763,23 +760,23 @@ of populating the list of server extensions to WEBSOCKET."
       (dolist (protocol (websocket-protocols websocket))
         (websocket-debug websocket "Checking for protocol match: %s"
                          protocol)
-        (let ((protocols))
-          (if (string-match
-               (format "\r\nSec-Websocket-Protocol: %s\r\n"
-                       protocol) output)
-              (add-to-list 'protocols protocol)
-            (signal 'websocket-invalid-header
-                    "Incorrect or missing protocol returned by the server."))
+        (let ((protocols
+               (if (string-match (format "\r\nSec-Websocket-Protocol: %s\r\n"
+                                         protocol)
+                                 output)
+                   (list protocol)
+                 (signal 'websocket-invalid-header
+                         "Incorrect or missing protocol returned by the 
server."))))
           (setf (websocket-negotiated-protocols websocket) protocols))))
     (let* ((extensions (websocket-parse-repeated-field
                         output
                         "Sec-WebSocket-Extensions"))
            (extra-extensions))
       (dolist (ext extensions)
-        (when (not (member
-                    (first (split-string ext "; ?"))
-                    (websocket-extensions websocket)))
-          (add-to-list 'extra-extensions (first (split-string ext "; ?")))))
+        (let ((x (first (split-string ext "; ?"))))
+          (unless (or (member x (websocket-extensions websocket))
+                      (member x extra-extensions))
+            (push x extra-extensions))))
       (when extra-extensions
         (signal 'websocket-invalid-header
                 (format "Non-requested extensions returned by server: %S"
@@ -817,7 +814,8 @@ connection, which should be kept in order to pass to
     (dolist (ws websocket-server-websockets)
       (when (eq (websocket-server-conn ws) conn)
         (if (eq (websocket-ready-state ws) 'closed)
-            (add-to-list 'to-delete ws)
+            (unless (member ws to-delete)
+              (push ws to-delete))
           (websocket-close ws))))
     (dolist (ws to-delete)
       (setq websocket-server-websockets (remove ws 
websocket-server-websockets))))
@@ -830,7 +828,7 @@ connection, which should be kept in order to pass to
              :conn client
              :url client
              :on-open (or (process-get server :on-open) 'identity)
-             :on-message (or (process-get server :on-message) (lambda (ws 
frame)))
+             :on-message (or (process-get server :on-message) (lambda (_ws 
_frame)))
              :on-close (lexical-let ((user-method
                                       (or (process-get server :on-close) 
'identity)))
                          (lambda (ws)
@@ -841,7 +839,8 @@ connection, which should be kept in order to pass to
                            'websocket-default-error-handler)
              :protocols (process-get server :protocol)
              :extensions (mapcar 'car (process-get server :extensions)))))
-    (add-to-list 'websocket-server-websockets ws)
+    (unless (member ws websocket-server-websockets)
+      (push ws websocket-server-websockets))
     (set-process-coding-system client 'unix 'unix)
     (process-put client :websocket ws)
     (set-process-filter client 'websocket-server-filter)

commit bc5c2a2ee2b993a18e8e23ed725829d403508753
Author: Andrew Hyatt <address@hidden>
Date:   Sat Jul 6 17:46:22 2013 -0400

    Set version to 1.01.

diff --git a/websocket.el b/websocket.el
index b5ada90..ce6249b 100644
--- a/websocket.el
+++ b/websocket.el
@@ -5,7 +5,7 @@
 ;; Author: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Maintainer: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Keywords: Communication, Websocket, Server
-;; Version: 1.0
+;; Version: 1.01
 ;;
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -101,7 +101,7 @@ same for the protocols.
   accept-string
   (inflight-input nil))
 
-(defvar websocket-version "1.0"
+(defvar websocket-version "1.01"
   "Version numbers of this version of websocket.el.")
 
 (defvar websocket-debug nil

commit 6f033f25424768df826b2758e0cfdfa398362299
Author: Andrew Hyatt <address@hidden>
Date:   Sat Jul 6 15:33:25 2013 -0400

    Stop using deprecated function set-process-filter-multibyte.
    
    Instead, we set the process coding system to binary, which
    accomplishes the same thing.

diff --git a/README.org b/README.org
index a8d42f8..ee20381 100644
--- a/README.org
+++ b/README.org
@@ -17,9 +17,7 @@ Each version that is released should be checked with this 
checklist:
 
 - [ ] All ert test passing
 - [ ] Functional test passing on emacs 23 and 24
-- [ ] websocket.el byte compiling cleanly, except for these exceptions:
-  - =set-process-filter-multibyte= is obsolete, yet I cannot find any
-    other way of ensuring my filter has multibyte disabled.
+- [ ] websocket.el byte compiling cleanly.
 
 * Existing clients:
 
diff --git a/websocket.el b/websocket.el
index 1dc9829..b5ada90 100644
--- a/websocket.el
+++ b/websocket.el
@@ -845,9 +845,7 @@ connection, which should be kept in order to pass to
     (set-process-coding-system client 'unix 'unix)
     (process-put client :websocket ws)
     (set-process-filter client 'websocket-server-filter)
-    ;; set-process-filter-multibyte is obsolete, but make-network-process's
-    ;; :filter-multibyte arg does not seem to do anything.
-    (set-process-filter-multibyte client nil)
+    (set-process-coding-system client 'binary)
     (set-process-sentinel client
      (lambda (process change)
        (let ((websocket (process-get process :websocket)))

commit 4089d1cdb85a55d8e5add426a9c07402ab6ec3a5
Merge: 3e060d9 034e6eb
Author: Andrew Hyatt <address@hidden>
Date:   Sat Jul 6 15:08:34 2013 -0400

    Merge branch 'master' into compile-fix


commit 034e6eb9154a367f0692f7804f48217a6834620f
Author: Andrew Hyatt <address@hidden>
Date:   Sat Jul 6 00:49:52 2013 -0400

    Changed websocket-outer-filter test to not use flet with struct.
    
    This caused issues with the eval'd websocket-outer-filter test, for
    unknown reasons.
    
    Instead of using flet, we just do the simpler thing now and setf the
    value as we want it.

diff --git a/websocket-test.el b/websocket-test.el
index f7c5936..c06d7cf 100644
--- a/websocket-test.el
+++ b/websocket-test.el
@@ -371,8 +371,8 @@
       (websocket-outer-filter fake-ws (substring websocket-frames 2))
       (should (equal (list frame2 frame1) processed-frames))
       (should-not (websocket-inflight-input fake-ws)))
-    (flet ((websocket-ready-state (websocket) 'connecting)
-           (websocket-close (websocket)))
+    (flet ((websocket-close (websocket)))
+      (setf (websocket-ready-state fake-ws) 'connecting)
       (should (eq 500 (cdr (should-error
                                 (websocket-outer-filter fake-ws "HTTP/1.1 
500\r\n\r\n")
                                 :type 
'websocket-received-error-http-response)))))))

commit 3e060d98a5cbfb9ea167b9e2e1bb505561d056fe
Author: Andrew Hyatt <address@hidden>
Date:   Fri Jul 5 22:30:11 2013 -0400

    Replace obsolete alias condition-case-no-debug with 
condition-case-unless-debug.

diff --git a/websocket.el b/websocket.el
index fc53ffd..1dc9829 100644
--- a/websocket.el
+++ b/websocket.el
@@ -669,7 +669,7 @@ describing the problem with the frame.
                        (if (eq type 'plain)
                            (make-network-process :name name :buffer buf :host 
host
                                                  :service port :nowait nil)
-                         (condition-case-no-debug nil
+                         (condition-case-unless-debug nil
                              (open-network-stream name buf host port :type 
type :nowait nil)
                            (wrong-number-of-arguments
                             (signal 'websocket-wss-needs-emacs-24 "wss")))))

commit 714dca50644c75884d9d90f10328c7a12e02cdcc
Author: Dmitry Gutov <address@hidden>
Date:   Wed Jun 19 11:23:57 2013 +0400

    Bump the version

diff --git a/js2-mode.el b/js2-mode.el
index c925ff3..982b794 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -7,7 +7,7 @@
 ;;         Dmitry Gutov <address@hidden>
 ;; URL:  https://github.com/mooz/js2-mode/
 ;;       http://code.google.com/p/js2-mode/
-;; Version: 20130608
+;; Version: 20130619
 ;; Keywords: languages, javascript
 ;; Package-Requires: ((emacs "24.1"))
 

commit c6ca082c191cecf616fb531958ef390f148bf6d8
Author: Dmitry Gutov <address@hidden>
Date:   Wed Jun 19 11:08:13 2013 +0400

    js2-next-error: Always echo error text

diff --git a/js2-mode.el b/js2-mode.el
index b1771a9..c925ff3 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -11139,6 +11139,8 @@ RESET means start over from the beginning."
           (if (zerop (decf count))
               (setq continue nil)))
         (setq errs (cdr errs)))
+      ;; Clear for `js2-echo-error'.
+      (message nil)
       (if err
           (goto-char (second err))
         ;; Wrap around to first error.

commit 9e7c6bd3c54ee17bdd639d27184a2d53681ab630
Author: Dmitry Gutov <address@hidden>
Date:   Wed Jun 19 01:19:25 2013 +0400

    Fix #106
    
    * Check for an active minibuffer.
    
    * Don't compare with "Quit", we're only called on `point-entered', so
      that message should already be cleared anyway.

diff --git a/js2-mode.el b/js2-mode.el
index 09c5b27..b1771a9 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10562,8 +10562,9 @@ This ensures that the counts and `next-error' are 
correct."
 (defun js2-echo-error (old-point new-point)
   "Called by point-motion hooks."
   (let ((msg (get-text-property new-point 'help-echo)))
-    (when (and (stringp msg) (or (not (current-message))
-                                 (string= (current-message) "Quit")))
+    (when (and (stringp msg)
+               (not (active-minibuffer-window))
+               (not (current-message)))
       (message msg))))
 
 (defalias #'js2-echo-help #'js2-echo-error)

commit 1c53de75e0acd19d61ad45a91b32c183948e5128
Author: Dmitry Gutov <address@hidden>
Date:   Sat Jun 8 13:19:36 2013 +0400

    Introduce js2-init-hook
    
    Fixing #20 (again) in a different way

diff --git a/js2-mode.el b/js2-mode.el
index 812c35b..09c5b27 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -7,7 +7,7 @@
 ;;         Dmitry Gutov <address@hidden>
 ;; URL:  https://github.com/mooz/js2-mode/
 ;;       http://code.google.com/p/js2-mode/
-;; Version: 20130510
+;; Version: 20130608
 ;; Keywords: languages, javascript
 ;; Package-Requires: ((emacs "24.1"))
 
@@ -854,7 +854,7 @@ First, you can add externs that are valid for all your 
JavaScript files.
 You should probably do this by adding them to `js2-global-externs', which
 is a global list used for all js2-mode files.
 
-Next, you can add a function to `js2-mode-hook' that adds additional
+Next, you can add a function to `js2-init-hook' that adds additional
 externs appropriate for the specific file, perhaps based on its path.
 These should go in `js2-additional-externs', which is buffer-local.
 
@@ -1093,11 +1093,19 @@ Not currently used."
   '((t :foreground "orange"))
   "Face used to highlight undeclared variable identifiers.")
 
+(defcustom js2-init-hook nil
+  "List of functions to be called after `js2-mode' or
+`js2-minor-mode' has initialized all variables, before parsing
+the buffer for the first time."
+  :type 'hook
+  :group 'js2-mode
+  :version "20130608")
+
 (defcustom js2-post-parse-callbacks nil
-  "A list of callback functions invoked after parsing finishes.
+  "List of callback functions invoked after parsing finishes.
 Currently, the main use for this function is to add synthetic
 declarations to `js2-recorded-identifiers', which see."
-  :type 'list
+  :type 'hook
   :group 'js2-mode)
 
 (defcustom js2-highlight-external-variables t
@@ -10112,6 +10120,7 @@ highlighting features of `js2-mode'."
   (add-hook 'change-major-mode-hook #'js2-minor-mode-exit nil t)
   (when js2-include-jslint-globals
     (add-hook 'js2-post-parse-callbacks 'js2-apply-jslint-globals nil t))
+  (run-hooks 'js2-init-hook)
   (js2-reparse))
 
 (defun js2-minor-mode-exit ()
@@ -10310,6 +10319,8 @@ Selecting an error will jump it to the corresponding 
source-buffer error.
   (when js2-include-jslint-globals
     (add-hook 'js2-post-parse-callbacks 'js2-apply-jslint-globals nil t))
 
+  (run-hooks 'js2-init-hook)
+
   (js2-reparse))
 
 (defun js2-mode-exit ()

commit ef861dedc420453d91b348107633a3043b371be6
Author: Leo Liu <address@hidden>
Date:   Wed Jun 5 00:47:49 2013 +0800

    New user variable ggtags-completing-read-function
    
    to control completing-read in ggtags-mode.

diff --git a/ggtags.el b/ggtags.el
index 2104556..b545b8f 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -110,6 +110,11 @@ If nil, use Emacs default."
                  (const cscope))
   :group 'ggtags)
 
+(defcustom ggtags-completing-read-function completing-read-function
+  "Ggtags specific `completing-read-function' (which see)."
+  :type 'function
+  :group 'ggtags)
+
 (defvar ggtags-cache nil)               ; (ROOT TABLE DIRTY TIMESTAMP)
 
 (defvar ggtags-current-tag-name nil)
@@ -227,7 +232,8 @@ Return -1 if it does not exist."
 
 (defun ggtags-read-tag (quick)
   (ggtags-ensure-root-directory)
-  (let ((default (thing-at-point 'symbol)))
+  (let ((default (thing-at-point 'symbol))
+        (completing-read-function ggtags-completing-read-function))
     (setq ggtags-current-tag-name
           (if quick (or default (user-error "No tag at point"))
             (completing-read

commit b63de685c2daf93686e902d56f8aca424ec15706
Author: Leo Liu <address@hidden>
Date:   Wed Jun 5 00:00:24 2013 +0800

    Fix #11: Support finding symbol tags (OPTION: -s)

diff --git a/ggtags.el b/ggtags.el
index ca82e8c..2104556 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -227,14 +227,12 @@ Return -1 if it does not exist."
 
 (defun ggtags-read-tag (quick)
   (ggtags-ensure-root-directory)
-  (let* ((tags (ggtags-tag-names))
-         (sym (thing-at-point 'symbol))
-         (default (and (member sym tags) sym)))
+  (let ((default (thing-at-point 'symbol)))
     (setq ggtags-current-tag-name
-          (if quick (or default (error "No valid tag at point"))
+          (if quick (or default (user-error "No tag at point"))
             (completing-read
              (format (if default "Tag (default %s): " "Tag: ") default)
-             tags nil t nil nil default)))))
+             (ggtags-tag-names) nil t nil nil default)))))
 
 (defun ggtags-global-options ()
   (concat "-v --result="
@@ -249,17 +247,20 @@ When called with prefix, ask the name and kind of tag."
   (interactive (list (ggtags-read-tag (not current-prefix-arg))
                      current-prefix-arg))
   (ggtags-check-root-directory)
-  (eval-and-compile (require 'etags))
-  (ggtags-navigation-mode +1)
-  (ring-insert find-tag-marker-ring (point-marker))
   (let ((split-window-preferred-function ggtags-split-window-function)
-        (default-directory (ggtags-root-directory)))
+        (default-directory (ggtags-root-directory))
+        (help-char ??)
+        (help-form "\
+d: definitions          (-d)
+r: references           (-r)
+s: symbols              (-s)
+?: show this help\n"))
     (compilation-start
      (if (or verbose (not buffer-file-name))
-         (format "global %s %s \"%s\""
+         (format "global %s -%s \"%s\""
                  (ggtags-global-options)
-                 (if (y-or-n-p "Find definition (n for reference)? ")
-                     "" "-r")
+                 (char-to-string
+                  (read-char-choice "Tag type? (d/r/s/?) " '(?d ?r ?s)))
                  name)
        (format "global %s --from-here=%d:%s \"%s\""
                (ggtags-global-options)
@@ -267,7 +268,10 @@ When called with prefix, ask the name and kind of tag."
                (shell-quote-argument
                 (expand-file-name (file-truename buffer-file-name)))
                name))
-     'ggtags-global-mode)))
+     'ggtags-global-mode))
+  (eval-and-compile (require 'etags))
+  (ring-insert find-tag-marker-ring (point-marker))
+  (ggtags-navigation-mode +1))
 
 (defun ggtags-find-tag-resume ()
   (interactive)

commit 3334309116496707a52b48ce7f2ce4553a5ffbc4
Author: Leo Liu <address@hidden>
Date:   Tue Jun 4 14:37:23 2013 +0800

    New command ggtags-query-replace

diff --git a/ggtags.el b/ggtags.el
index 3fa79d0..ca82e8c 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.6.5
+;; Version: 0.6.6
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -208,10 +208,7 @@ Return -1 if it does not exist."
     (if (ggtags-cache-stale-p root)
         (let* ((default-directory (file-name-as-directory root))
                (tags (with-demoted-errors
-                       (split-string
-                        (with-output-to-string
-                          (call-process "global" nil (list standard-output nil)
-                                        nil "-c" (or prefix "")))))))
+                       (process-lines "global" "-c" (or prefix "")))))
           (and tags (ggtags-cache-set root tags))
           tags)
       (cadr (ggtags-cache-get root)))))
@@ -309,6 +306,33 @@ When called with prefix, ask the name and kind of tag."
       (setq-local compilation-auto-jump-to-first-error nil)
       (remove-hook 'compilation-finish-functions 'ggtags-handle-single-match 
t))))
 
+(defun ggtags-query-replace (from to &optional delimited directory)
+  "Query replace FROM with TO on all files in DIRECTORY."
+  (interactive
+   (append (query-replace-read-args "Query replace (regexp)" t t)
+           (list (read-directory-name "In directory: " nil nil t))))
+  (let ((default-directory (file-name-as-directory directory)))
+    (ggtags-check-root-directory)
+    (dolist (file (process-lines "global" "-P" "-l" "."))
+      (let ((file (expand-file-name file directory)))
+        (when (file-exists-p file)
+          (let* ((message-log-max nil)
+                 (visited (get-file-buffer file))
+                 (buffer (or visited
+                             (with-demoted-errors
+                               (find-file-noselect file)))))
+            (when buffer
+              (set-buffer buffer)
+              (if (save-excursion
+                    (goto-char (point))
+                    (re-search-forward from nil t))
+                  (progn
+                    (switch-to-buffer (current-buffer))
+                    (perform-replace from to t t delimited
+                                     nil multi-query-replace-map))
+                (message "Nothing to do for `%s'" file)
+                (or visited (kill-buffer))))))))))
+
 (defun ggtags-delete-tag-files ()
   "Delete the tag files generated by gtags."
   (interactive)

commit f546cfdd8ede04c5574b3348c7458bdd15497321
Author: Leo Liu <address@hidden>
Date:   Mon Jun 3 22:01:18 2013 +0800

    New command ggtags-delete-tag-files

diff --git a/ggtags.el b/ggtags.el
index a37edcb..3fa79d0 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -67,6 +67,10 @@
       (list 'progn (list 'defvar var val docstring)
             (list 'make-variable-buffer-local (list 'quote var))))))
 
+(eval-and-compile
+  (unless (fboundp 'user-error)
+    (defalias 'user-error 'error)))
+
 (defgroup ggtags nil
   "GNU Global source code tagging system."
   :group 'tools)
@@ -305,6 +309,27 @@ When called with prefix, ask the name and kind of tag."
       (setq-local compilation-auto-jump-to-first-error nil)
       (remove-hook 'compilation-finish-functions 'ggtags-handle-single-match 
t))))
 
+(defun ggtags-delete-tag-files ()
+  "Delete the tag files generated by gtags."
+  (interactive)
+  (when (ggtags-root-directory)
+    (let ((files (directory-files (ggtags-root-directory) t
+                                  (regexp-opt '("GPATH" "GRTAGS" "GTAGS" 
"ID"))))
+          (buffer "*GTags File List*"))
+      (or files (user-error "No tag files found"))
+      (with-output-to-temp-buffer buffer
+        (dolist (file files)
+          (princ file)
+          (princ "\n")))
+      (let ((win (get-buffer-window buffer)))
+        (unwind-protect
+            (progn
+              (fit-window-to-buffer win)
+              (when (yes-or-no-p "Remove GNU Global tag files? ")
+                (mapc 'delete-file files)))
+          (when (window-live-p win)
+            (quit-window t win)))))))
+
 (defvar-local ggtags-global-exit-status nil)
 
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)

commit fe5d11f011a2e4b5958d1dd698de7afd10c2f212
Author: Leo Liu <address@hidden>
Date:   Mon Jun 3 21:38:37 2013 +0800

    Fix incorrect value of variable ggtags-root-directory
    
    in ggtags-ensure-root-directory. Quote file name in ggtags-list-tags.

diff --git a/ggtags.el b/ggtags.el
index 276acff..a37edcb 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -185,17 +185,19 @@ Return -1 if it does not exist."
 
 (defun ggtags-ensure-root-directory ()
   (or (ggtags-root-directory)
-      (if (yes-or-no-p "File GTAGS not found; run gtags? ")
-          (let ((root (read-directory-name "Directory: " nil nil t)))
-            (and (= (length root) 0) (error "No directory chosen"))
-            (with-temp-buffer
-              (if (zerop (let ((default-directory
-                                 (file-name-as-directory root)))
-                           (call-process "gtags" nil t)))
-                  (message "File GTAGS generated in `%s'"
-                           (ggtags-root-directory))
-                (error "%s" (comment-string-strip (buffer-string) t t)))))
-        (error "Aborted"))))
+      (when (or (yes-or-no-p "File GTAGS not found; run gtags? ")
+                (error "Aborted"))
+        (let ((root (read-directory-name "Directory: " nil nil t)))
+          (and (= (length root) 0) (error "No directory chosen"))
+          (when (with-temp-buffer
+                  (let ((default-directory
+                          (file-name-as-directory root)))
+                    (or (zerop (call-process "gtags" nil t))
+                        (error "%s" (comment-string-strip
+                                     (buffer-string) t t)))))
+            (kill-local-variable 'ggtags-root-directory)
+            (message "File GTAGS generated in `%s'"
+                     (ggtags-root-directory)))))))
 
 (defun ggtags-tag-names-1 (root &optional prefix)
   (when root
@@ -296,8 +298,9 @@ When called with prefix, ask the name and kind of tag."
                                    regexp
                                    (if (file-directory-p file-or-directory)
                                        "-l ."
-                                     (concat "-f " (file-name-nondirectory
-                                                    file-or-directory))))
+                                     (concat "-f " (shell-quote-argument
+                                                    (file-name-nondirectory
+                                                     file-or-directory)))))
                            'ggtags-global-mode)
       (setq-local compilation-auto-jump-to-first-error nil)
       (remove-hook 'compilation-finish-functions 'ggtags-handle-single-match 
t))))

commit 908c6f6e89af8b32b80591bb0095de86a9441156
Author: Leo Liu <address@hidden>
Date:   Mon Jun 3 16:10:58 2013 +0800

    Fix #7: New command ggtags-list-tags

diff --git a/ggtags.el b/ggtags.el
index 9dfc10d..276acff 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -245,8 +245,8 @@ If point is at a definition tag, find references, and vice 
versa.
 When called with prefix, ask the name and kind of tag."
   (interactive (list (ggtags-read-tag (not current-prefix-arg))
                      current-prefix-arg))
-  (eval-and-compile (require 'etags))
   (ggtags-check-root-directory)
+  (eval-and-compile (require 'etags))
   (ggtags-navigation-mode +1)
   (ring-insert find-tag-marker-ring (point-marker))
   (let ((split-window-preferred-function ggtags-split-window-function)
@@ -258,10 +258,11 @@ When called with prefix, ask the name and kind of tag."
                  (if (y-or-n-p "Find definition (n for reference)? ")
                      "" "-r")
                  name)
-       (format "global %s --from-here=%d:'%s' \"%s\""
+       (format "global %s --from-here=%d:%s \"%s\""
                (ggtags-global-options)
                (line-number-at-pos)
-               (expand-file-name (file-truename buffer-file-name))
+               (shell-quote-argument
+                (expand-file-name (file-truename buffer-file-name)))
                name))
      'ggtags-global-mode)))
 
@@ -272,6 +273,35 @@ When called with prefix, ask the name and kind of tag."
     (let ((split-window-preferred-function ggtags-split-window-function))
       (compile-goto-error))))
 
+;; NOTE: Coloured output in grep requested: http://goo.gl/Y9IcX
+(defun ggtags-list-tags (regexp file-or-directory)
+  "List all tags matching REGEXP in FILE-OR-DIRECTORY."
+  (interactive (list (read-string "POSIX regexp: ")
+                     (read-file-name "Directory: "
+                                     (if current-prefix-arg
+                                         (ggtags-root-directory)
+                                       default-directory)
+                                     buffer-file-name t)))
+  (let ((split-window-preferred-function ggtags-split-window-function)
+        (default-directory (if (file-directory-p file-or-directory)
+                               (file-name-as-directory file-or-directory)
+                             (file-name-directory file-or-directory))))
+    (ggtags-check-root-directory)
+    (eval-and-compile (require 'etags))
+    (ggtags-navigation-mode +1)
+    (ring-insert find-tag-marker-ring (point-marker))
+    (with-current-buffer
+        (compilation-start (format "global %s -e %s %s"
+                                   (ggtags-global-options)
+                                   regexp
+                                   (if (file-directory-p file-or-directory)
+                                       "-l ."
+                                     (concat "-f " (file-name-nondirectory
+                                                    file-or-directory))))
+                           'ggtags-global-mode)
+      (setq-local compilation-auto-jump-to-first-error nil)
+      (remove-hook 'compilation-finish-functions 'ggtags-handle-single-match 
t))))
+
 (defvar-local ggtags-global-exit-status nil)
 
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)

commit c573b74da1e9056f8a3fbeb826600a8d254c5445
Author: Leo Liu <address@hidden>
Date:   Mon Jun 3 15:00:34 2013 +0800

    A few minor fixes
    
    1. Quote path in ggtags-find-tag
    2. Do not close the window if exit abnormally
    3. Tweak ggtags-global-mode-font-lock-keywords

diff --git a/ggtags.el b/ggtags.el
index 47b3ec3..9dfc10d 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -258,7 +258,7 @@ When called with prefix, ask the name and kind of tag."
                  (if (y-or-n-p "Find definition (n for reference)? ")
                      "" "-r")
                  name)
-       (format "global %s --from-here=%d:%s \"%s\""
+       (format "global %s --from-here=%d:'%s' \"%s\""
                (ggtags-global-options)
                (line-number-at-pos)
                (expand-file-name (file-truename buffer-file-name))
@@ -272,7 +272,10 @@ When called with prefix, ask the name and kind of tag."
     (let ((split-window-preferred-function ggtags-split-window-function))
       (compile-goto-error))))
 
+(defvar-local ggtags-global-exit-status nil)
+
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)
+  (setq ggtags-global-exit-status exit-status)
   (let ((count (save-excursion
                  (goto-char (point-max))
                  (if (re-search-backward "^\\([0-9]+\\) \\w+ located" nil t)
@@ -338,29 +341,27 @@ When called with prefix, ask the name and kind of tag."
           (ggtags-abbreviate-file (match-beginning sub) (match-end sub)))))))
 
 (defun ggtags-handle-single-match (buf _how)
-  (unless (or (not ggtags-auto-jump-to-first-match)
-              (save-excursion
-                (goto-char (point-min))
-                (ignore-errors
-                  (goto-char (compilation-next-single-property-change
-                              (point) 'compilation-message))
-                  (end-of-line)
-                  (compilation-next-single-property-change
-                   (point) 'compilation-message))))
+  (when (and ggtags-auto-jump-to-first-match
+             ;; If exit abnormally keep the window for inspection.
+             (zerop ggtags-global-exit-status)
+             (save-excursion
+               (goto-char (point-min))
+               (not (ignore-errors
+                      (goto-char (compilation-next-single-property-change
+                                  (point) 'compilation-message))
+                      (end-of-line)
+                      (compilation-next-single-property-change
+                       (point) 'compilation-message)))))
     (ggtags-navigation-mode -1)
     ;; 0.5s delay for `ggtags-auto-jump-to-first-match'
     (sit-for 0)                    ; See: http://debbugs.gnu.org/13829
     (ggtags-navigation-mode-cleanup buf 0.5)))
 
 (defvar ggtags-global-mode-font-lock-keywords
-  '(("^-[*]-.*-[*]-$"
-     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
-    ("^\\w+ not found.*\\|^[0-9]+ \\w+ located.*"
-     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
-    ("^Global \\(exited 
abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code 
\\([0-9]+\\)\\)?.*"
-     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)
-     (1 compilation-error-face)
-     (2 compilation-error-face nil t))))
+  '(("^Global \\(exited 
abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code 
\\([0-9]+\\)\\)?.*"
+     (1 'compilation-error)
+     (2 'compilation-error nil t))
+    ("^Global found \\([0-9]+\\)" (1 compilation-info-face))))
 
 (define-compilation-mode ggtags-global-mode "Global"
   "A mode for showing outputs from gnu global."

commit e8bb6cc80417af65d9a92cb871cdc4b7283b0eee
Author: Leo Liu <address@hidden>
Date:   Mon Jun 3 12:22:29 2013 +0800

    Bump version to 0.6.5

diff --git a/README.rst b/README.rst
index 45d0cfa..e18db58 100644
--- a/README.rst
+++ b/README.rst
@@ -17,6 +17,8 @@ Features
 #. Highlight valid tag at point
 #. Built on top of ``compile.el`` (asynchonrous and other nice
    features)
+#. Support all  output formats  of ``global``:  ``grep``, ``ctags-x``,
+   ``cscope`` etc.
 #. Abbreviated display of file names
 
 Why GNU Global
@@ -24,7 +26,7 @@ Why GNU Global
 
 The opengrok project composed a feature comparison table between a few
 tools. The `page
-<http://hub.opensolaris.org/bin/view/Project+opengrok>`_ is taken
+<http://hub.opensolaris.org/bin/view/Project+opengrok>`_ was taken
 offline after 2013-03-24 but `here <http://i.imgur.com/IQCPQ0j.png>`_
 is a backup.
 
diff --git a/ggtags.el b/ggtags.el
index 491f5ae..47b3ec3 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.6.4
+;; Version: 0.6.5
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags

commit 8c9ef10eb295dbbee28f98510c89d7ef1c8d333f
Author: Leo Liu <address@hidden>
Date:   Mon Jun 3 12:02:24 2013 +0800

    Fix false positive error regexp matches
    
    that can fail compilation-auto-jump.

diff --git a/ggtags.el b/ggtags.el
index 231bde9..491f5ae 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -283,6 +283,27 @@ When called with prefix, ask the name and kind of tag."
             (format "found %d %s" count (if (= count 1) "match" "matches")))
           exit-status)))
 
+;;; NOTE: Must not match the 'Global started at Mon Jun 3 10:24:13'
+;;; line or `compilation-auto-jump' will jump there and fail. See
+;;; comments before the 'gnu' entry in
+;;; `compilation-error-regexp-alist-alist'.
+(defvar ggtags-global-error-regexp-alist-alist
+  (append
+   '((path "^\\(?:[^/\n]*/\\)?[^ )\t\n]+$" 0)
+     ;; ACTIVE_ESCAPE  src/dialog.cc   172
+     (ctags "^\\([^ \t\n]+\\)[ \t]+\\(.*?\\)[ \t]+\\([0-9]+\\)$"
+            2 3 nil nil 2 (1 font-lock-function-name-face))
+     ;; ACTIVE_ESCAPE     172 src/dialog.cc    #undef ACTIVE_ESCAPE
+     (ctags-x "^\\([^ \t\n]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\(\\(?:[^/\n]*/\\)?[^ 
\t\n]+\\)"
+              3 2 nil nil 3 (1 font-lock-function-name-face))
+     ;; src/dialog.cc:172:#undef ACTIVE_ESCAPE
+     (grep 
"^\\(.+?\\):\\([0-9]+\\):\\(?:[^0-9\n]\\|[0-9][^0-9\n]\\|[0-9][0-9].\\)"
+           1 2 nil nil 1)
+     ;; src/dialog.cc ACTIVE_ESCAPE 172 #undef ACTIVE_ESCAPE
+     (cscope "^\\(.+?\\)[ \t]+\\([^ \t\n]+\\)[ 
\t]+\\([0-9]+\\).*\\(?:[^0-9\n]\\|[^0-9\n][0-9]\\|[^:\n][0-9][0-9]\\)$"
+             1 3 nil nil 1 (2 font-lock-function-name-face)))
+   compilation-error-regexp-alist-alist))
+
 (defun ggtags-abbreviate-file (start end)
   (let ((inhibit-read-only t)
         (amount (if (numberp ggtags-global-abbreviate-filename)
@@ -303,10 +324,10 @@ When called with prefix, ask the name and kind of tag."
 
 (defun ggtags-abbreviate-files (start end)
   (goto-char start)
-  (when (and ggtags-global-abbreviate-filename
-             (ggtags-global-output-format-error-regexp))
-    (let* ((error-re (ggtags-global-output-format-error-regexp))
-           (sub (cadr error-re)))
+  (let* ((error-re (cdr (assq ggtags-global-output-format
+                              ggtags-global-error-regexp-alist-alist)))
+         (sub (cadr error-re)))
+    (when (and ggtags-global-abbreviate-filename error-re)
       (while (re-search-forward (car error-re) end t)
         (when (and (or (not (numberp ggtags-global-abbreviate-filename))
                        (> (length (match-string sub))
@@ -336,38 +357,15 @@ When called with prefix, ask the name and kind of tag."
      (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
     ("^\\w+ not found.*\\|^[0-9]+ \\w+ located.*"
      (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
-    ("^[Gg]lobal \\(?:started\\)?.*"
-     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
-    ("^Global found \\([0-9]+\\).*"
-     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)
-     (1 compilation-info-face nil t))
     ("^Global \\(exited 
abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code 
\\([0-9]+\\)\\)?.*"
      (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)
      (1 compilation-error-face)
      (2 compilation-error-face nil t))))
 
-(defun ggtags-global-output-format-error-regexp ()
-  "Error regexp according to `ggtags-global-output-format'."
-  (pcase ggtags-global-output-format
-    (`path '("^[^ \t\n]+$" 0))
-    ;; ACTIVE_ESCAPE   src/dialog.cc   172
-    (`ctags '("^\\([^ \t\n]+\\)[ \t]+\\(.*?\\)[ \t]+\\([0-9]+\\)"
-              2 3 nil nil 2 (1 font-lock-function-name-face)))
-    ;; ACTIVE_ESCAPE     172 src/dialog.cc    #undef ACTIVE_ESCAPE
-    (`ctags-x '("^\\([^ \t\n]+\\)[ \t]+\\([0-9]+\\)[ 
\t]+\\(\\(?:[^/\n]*/\\)?[^ \t\n]+\\)"
-                3 2 nil nil 3 (1 font-lock-function-name-face)))
-    ;; src/dialog.cc:172:#undef ACTIVE_ESCAPE
-    (`grep '("^\\(.+?\\):\\([0-9]+\\):" 1 2 nil nil 1))
-    ;; src/dialog.cc ACTIVE_ESCAPE 172 #undef ACTIVE_ESCAPE
-    (`cscope '("^\\(.+?\\)[ \t]+\\([^ \t\n]+\\)[ \t]+\\([0-9]+\\)"
-               1 3 nil nil 1 (2 font-lock-function-name-face)))))
-
 (define-compilation-mode ggtags-global-mode "Global"
   "A mode for showing outputs from gnu global."
-  (when (ggtags-global-output-format-error-regexp)
-    (setq-local compilation-error-regexp-alist
-                (cons (ggtags-global-output-format-error-regexp)
-                      compilation-error-regexp-alist)))
+  (setq-local compilation-error-regexp-alist
+              (list ggtags-global-output-format))
   (setq-local compilation-auto-jump-to-first-error
               ggtags-auto-jump-to-first-match)
   (setq-local compilation-scroll-output 'first-error)

commit 98ffa3dbf0e0d1728ea17dee5c09728163dfc8f5
Author: Leo Liu <address@hidden>
Date:   Thu May 30 20:44:55 2013 +0800

    Handle all 'global' output formats (OPTION: --result)

diff --git a/ggtags.el b/ggtags.el
index 4964db0..231bde9 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -97,6 +97,15 @@ If nil, use Emacs default."
   :type 'function
   :group 'ggtags)
 
+(defcustom ggtags-global-output-format 'grep
+  "The output format for the 'global' command."
+  :type '(choice (const path)
+                 (const ctags)
+                 (const ctags-x)
+                 (const grep)
+                 (const cscope))
+  :group 'ggtags)
+
 (defvar ggtags-cache nil)               ; (ROOT TABLE DIRTY TIMESTAMP)
 
 (defvar ggtags-current-tag-name nil)
@@ -224,10 +233,10 @@ Return -1 if it does not exist."
              (format (if default "Tag (default %s): " "Tag: ") default)
              tags nil t nil nil default)))))
 
-(defvar ggtags-global-options
-  (concat "-v --result=grep"
-          (and ggtags-global-has-path-style " --path-style=shorter"))
-  "Options (as a string) for running `global'.")
+(defun ggtags-global-options ()
+  (concat "-v --result="
+          (symbol-name ggtags-global-output-format)
+          (and ggtags-global-has-path-style " --path-style=shorter")))
 
 ;;;###autoload
 (defun ggtags-find-tag (name &optional verbose)
@@ -245,12 +254,12 @@ When called with prefix, ask the name and kind of tag."
     (compilation-start
      (if (or verbose (not buffer-file-name))
          (format "global %s %s \"%s\""
-                 ggtags-global-options
+                 (ggtags-global-options)
                  (if (y-or-n-p "Find definition (n for reference)? ")
                      "" "-r")
                  name)
        (format "global %s --from-here=%d:%s \"%s\""
-               ggtags-global-options
+               (ggtags-global-options)
                (line-number-at-pos)
                (expand-file-name (file-truename buffer-file-name))
                name))
@@ -266,7 +275,7 @@ When called with prefix, ask the name and kind of tag."
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)
   (let ((count (save-excursion
                  (goto-char (point-max))
-                 (if (re-search-backward "^\\([0-9]+\\) objects? located" nil 
t)
+                 (if (re-search-backward "^\\([0-9]+\\) \\w+ located" nil t)
                      (string-to-number (match-string 1))
                    0))))
     (cons (if (> exit-status 0)
@@ -294,15 +303,18 @@ When called with prefix, ask the name and kind of tag."
 
 (defun ggtags-abbreviate-files (start end)
   (goto-char start)
-  (when ggtags-global-abbreviate-filename
-    (while (re-search-forward "^\\([^:\n]+\\):[0-9]+:" end t)
-      (when (and (or (not (numberp ggtags-global-abbreviate-filename))
-                     (> (length (match-string 1))
-                        ggtags-global-abbreviate-filename))
-                 ;; Ignore bogus file lines such as:
-                 ;;     Global found 2 matches at Thu Jan 31 13:45:19
-                 (get-text-property (match-beginning 0) 'compilation-message))
-        (ggtags-abbreviate-file (match-beginning 1) (match-end 1))))))
+  (when (and ggtags-global-abbreviate-filename
+             (ggtags-global-output-format-error-regexp))
+    (let* ((error-re (ggtags-global-output-format-error-regexp))
+           (sub (cadr error-re)))
+      (while (re-search-forward (car error-re) end t)
+        (when (and (or (not (numberp ggtags-global-abbreviate-filename))
+                       (> (length (match-string sub))
+                          ggtags-global-abbreviate-filename))
+                   ;; Ignore bogus file lines such as:
+                   ;;     Global found 2 matches at Thu Jan 31 13:45:19
+                   (get-text-property (match-beginning sub) 
'compilation-message))
+          (ggtags-abbreviate-file (match-beginning sub) (match-end sub)))))))
 
 (defun ggtags-handle-single-match (buf _how)
   (unless (or (not ggtags-auto-jump-to-first-match)
@@ -319,8 +331,43 @@ When called with prefix, ask the name and kind of tag."
     (sit-for 0)                    ; See: http://debbugs.gnu.org/13829
     (ggtags-navigation-mode-cleanup buf 0.5)))
 
+(defvar ggtags-global-mode-font-lock-keywords
+  '(("^-[*]-.*-[*]-$"
+     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
+    ("^\\w+ not found.*\\|^[0-9]+ \\w+ located.*"
+     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
+    ("^[Gg]lobal \\(?:started\\)?.*"
+     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
+    ("^Global found \\([0-9]+\\).*"
+     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)
+     (1 compilation-info-face nil t))
+    ("^Global \\(exited 
abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code 
\\([0-9]+\\)\\)?.*"
+     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)
+     (1 compilation-error-face)
+     (2 compilation-error-face nil t))))
+
+(defun ggtags-global-output-format-error-regexp ()
+  "Error regexp according to `ggtags-global-output-format'."
+  (pcase ggtags-global-output-format
+    (`path '("^[^ \t\n]+$" 0))
+    ;; ACTIVE_ESCAPE   src/dialog.cc   172
+    (`ctags '("^\\([^ \t\n]+\\)[ \t]+\\(.*?\\)[ \t]+\\([0-9]+\\)"
+              2 3 nil nil 2 (1 font-lock-function-name-face)))
+    ;; ACTIVE_ESCAPE     172 src/dialog.cc    #undef ACTIVE_ESCAPE
+    (`ctags-x '("^\\([^ \t\n]+\\)[ \t]+\\([0-9]+\\)[ 
\t]+\\(\\(?:[^/\n]*/\\)?[^ \t\n]+\\)"
+                3 2 nil nil 3 (1 font-lock-function-name-face)))
+    ;; src/dialog.cc:172:#undef ACTIVE_ESCAPE
+    (`grep '("^\\(.+?\\):\\([0-9]+\\):" 1 2 nil nil 1))
+    ;; src/dialog.cc ACTIVE_ESCAPE 172 #undef ACTIVE_ESCAPE
+    (`cscope '("^\\(.+?\\)[ \t]+\\([^ \t\n]+\\)[ \t]+\\([0-9]+\\)"
+               1 3 nil nil 1 (2 font-lock-function-name-face)))))
+
 (define-compilation-mode ggtags-global-mode "Global"
   "A mode for showing outputs from gnu global."
+  (when (ggtags-global-output-format-error-regexp)
+    (setq-local compilation-error-regexp-alist
+                (cons (ggtags-global-output-format-error-regexp)
+                      compilation-error-regexp-alist)))
   (setq-local compilation-auto-jump-to-first-error
               ggtags-auto-jump-to-first-match)
   (setq-local compilation-scroll-output 'first-error)

commit a11ba885a58db7092b2f15d181f4c2a28b8ba08c
Author: Leo Liu <address@hidden>
Date:   Thu May 30 20:14:14 2013 +0800

    Make ggtags-highlight-tag-at-point more efficient

diff --git a/ggtags.el b/ggtags.el
index 9676c1d..4964db0 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -52,7 +52,6 @@
 
 (eval-when-compile (require 'cl))
 (require 'compile)
-(require 'etags)                        ; for find-tag-marker-ring
 
 (if (not (fboundp 'comment-string-strip))
     (autoload 'comment-string-strip "newcomment"))
@@ -237,6 +236,7 @@ If point is at a definition tag, find references, and vice 
versa.
 When called with prefix, ask the name and kind of tag."
   (interactive (list (ggtags-read-tag (not current-prefix-arg))
                      current-prefix-arg))
+  (eval-and-compile (require 'etags))
   (ggtags-check-root-directory)
   (ggtags-navigation-mode +1)
   (ring-insert find-tag-marker-ring (point-marker))
@@ -436,10 +436,29 @@ When called with prefix, ask the name and kind of tag."
 
 (defvar ggtags-tag-overlay nil)
 (defvar ggtags-highlight-tag-timer nil)
-(make-variable-buffer-local 'ggtags-tag-overlay)
 
-(defun ggtags-highlight-tag-at-point (buffer)
-  (when (eq buffer (current-buffer))
+(defvar ggtags-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\M-." 'ggtags-find-tag)
+    (define-key map "\M-," 'ggtags-find-tag-resume)
+    (define-key map "\C-c\M-k" 'ggtags-kill-file-buffers)
+    map))
+
+;;;###autoload
+(define-minor-mode ggtags-mode nil
+  :lighter (:eval (if ggtags-navigation-mode "" " GG"))
+  (if ggtags-mode
+      (progn
+        (add-hook 'after-save-hook 'ggtags-after-save-function nil t)
+        (or (executable-find "global")
+            (message "Failed to find GNU Global")))
+    (remove-hook 'after-save-hook 'ggtags-after-save-function t)
+    (and (overlayp ggtags-tag-overlay)
+         (delete-overlay ggtags-tag-overlay))
+    (setq ggtags-tag-overlay nil)))
+
+(defun ggtags-highlight-tag-at-point ()
+  (when ggtags-mode
     (unless (overlayp ggtags-tag-overlay)
       (setq ggtags-tag-overlay (make-overlay (point) (point)))
       (overlay-put ggtags-tag-overlay 'ggtags t))
@@ -457,40 +476,11 @@ When called with prefix, ask the name and kind of tag."
       (cond
        ((not bounds)
         (overlay-put ggtags-tag-overlay 'face nil)
-        (move-overlay ggtags-tag-overlay (point) (point)))
+        (move-overlay ggtags-tag-overlay (point) (point) (current-buffer)))
        ((not (funcall done-p))
-        (move-overlay o (car bounds) (cdr bounds))
+        (move-overlay o (car bounds) (cdr bounds) (current-buffer))
         (overlay-put o 'face (and valid-tag 'ggtags-highlight)))))))
 
-(defun ggtags-post-command-function ()
-  (when (timerp ggtags-highlight-tag-timer)
-    (cancel-timer ggtags-highlight-tag-timer))
-  (setq ggtags-highlight-tag-timer
-        (run-with-idle-timer 0.2 nil 'ggtags-highlight-tag-at-point
-                             (current-buffer))))
-
-(defvar ggtags-mode-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map "\M-." 'ggtags-find-tag)
-    (define-key map "\M-," 'ggtags-find-tag-resume)
-    (define-key map "\C-c\M-k" 'ggtags-kill-file-buffers)
-    map))
-
-;;;###autoload
-(define-minor-mode ggtags-mode nil
-  :lighter (:eval (if ggtags-navigation-mode "" " GG"))
-  (if ggtags-mode
-      (progn
-        (add-hook 'after-save-hook 'ggtags-after-save-function nil t)
-        (if (executable-find "global")
-            (add-hook 'post-command-hook 'ggtags-post-command-function nil t)
-          (message "Failed to find GNU Global")))
-    (remove-hook 'after-save-hook 'ggtags-after-save-function t)
-    (remove-hook 'post-command-hook 'ggtags-post-command-function t)
-    (and (overlayp ggtags-tag-overlay)
-         (delete-overlay ggtags-tag-overlay))
-    (setq ggtags-tag-overlay nil)))
-
 ;;; imenu
 
 (defun ggtags-goto-imenu-index (name line &rest _args)
@@ -542,6 +532,12 @@ When called with prefix, ask the name and kind of tag."
 
 ;;; Finish up
 
+(when ggtags-highlight-tag-timer
+  (cancel-timer ggtags-highlight-tag-timer))
+
+(setq ggtags-highlight-tag-timer
+      (run-with-idle-timer 0.2 t 'ggtags-highlight-tag-at-point))
+
 ;; Higher priority for `ggtags-navigation-mode' to avoid being
 ;; hijacked by modes such as `view-mode'.
 (defvar ggtags-mode-map-alist

commit 0b786f9e8b050c397ee0740ebe955d6daaa9e010
Author: Leo Liu <address@hidden>
Date:   Wed May 29 19:32:08 2013 +0800

    Fix #9: Resolve symlinks before passing to 'global'

diff --git a/ggtags.el b/ggtags.el
index 4262e18..9676c1d 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.6.3
+;; Version: 0.6.4
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -252,7 +252,7 @@ When called with prefix, ask the name and kind of tag."
        (format "global %s --from-here=%d:%s \"%s\""
                ggtags-global-options
                (line-number-at-pos)
-               (expand-file-name buffer-file-name)
+               (expand-file-name (file-truename buffer-file-name))
                name))
      'ggtags-global-mode)))
 

commit 2cbe8d9cbd9151ca94b970eb567bba073fa088ff
Author: Leo Liu <address@hidden>
Date:   Wed May 29 08:43:02 2013 +0800

    Fix #8: Avoid closing ECB compilation window

diff --git a/ggtags.el b/ggtags.el
index a41079f..4262e18 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -367,7 +367,7 @@ When called with prefix, ask the name and kind of tag."
              (kill-compilation))
            (when (and (derived-mode-p 'ggtags-global-mode)
                       (get-buffer-window))
-             (delete-window (get-buffer-window)))
+             (quit-window nil (get-buffer-window)))
            (and time (run-with-idle-timer time nil 'kill-buffer buf))))))
 
 (defun ggtags-navigation-mode-done ()

commit 764d2aa4ba50081adf69408e62d4863905b68b7f
Author: Dmitry Gutov <address@hidden>
Date:   Sun May 26 07:10:43 2013 +0400

    Release 0.6.10

diff --git a/NEWS.md b/NEWS.md
index b6459c7..64860ba 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,6 +1,6 @@
 # History of user-visible changes
 
-## Next
+## 2013-05-26 (0.6.10)
 
 * Plays nicer with `org-indent-mode`.
 * Works in horizontally scrolled windows.
diff --git a/company.el b/company.el
index 9a916c7..39a3a17 100644
--- a/company.el
+++ b/company.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6.9
+;; Version: 0.6.10
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.io/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x

commit 900a78dbaac691a6a852eb6e19bff16370de8add
Author: Dmitry Gutov <address@hidden>
Date:   Sun May 26 06:59:04 2013 +0400

    company-doc-buffer: Use the arg; rename the buffer

diff --git a/company-ropemacs.el b/company-ropemacs.el
index 73bb33d..0ba26e6 100644
--- a/company-ropemacs.el
+++ b/company-ropemacs.el
@@ -43,9 +43,7 @@
   "Return buffer with docstring of CANDIDATE if it is available."
   (let ((doc (company-with-candidate-inserted candidate (rope-get-doc))))
     (when doc
-      (with-current-buffer (company-doc-buffer)
-        (insert doc)
-        (current-buffer)))))
+      (company-doc-buffer doc))))
 
 (defun company-ropemacs-location (candidate)
   "Return location of CANDIDATE in cons form (FILE . LINE) if it is available."
diff --git a/company-semantic.el b/company-semantic.el
index 92cd178..796cc9e 100644
--- a/company-semantic.el
+++ b/company-semantic.el
@@ -74,11 +74,10 @@
 (defun company-semantic-doc-buffer (tag)
   (let ((doc (semantic-documentation-for-tag tag)))
     (when doc
-      (with-current-buffer (company-doc-buffer)
-        (insert (funcall semantic-idle-summary-function tag nil t)
-                "\n"
-                doc)
-        (current-buffer)))))
+      (company-doc-buffer
+       (concat (funcall semantic-idle-summary-function tag nil t)
+               "\n"
+               doc)))))
 
 (defsubst company-semantic-completions (prefix)
   (ignore-errors
diff --git a/company.el b/company.el
index ec6834b..9a916c7 100644
--- a/company.el
+++ b/company.el
@@ -1458,9 +1458,12 @@ To show the number next to the candidates in some 
back-ends, enable
             (cons selected (company-call-backend 'meta selected))))
     (cdr company-last-metadata)))
 
-(defun company-doc-buffer (&optional _string)
-  (with-current-buffer (get-buffer-create "*Company meta-data*")
+(defun company-doc-buffer (&optional string)
+  (with-current-buffer (get-buffer-create "*company-documentation*")
     (erase-buffer)
+    (when string
+      (save-excursion
+        (insert string)))
     (current-buffer)))
 
 (defvar company--electric-commands

commit 1d28760268f22306673b718bb3101c4121699685
Author: Dmitry Gutov <address@hidden>
Date:   Sun May 26 06:46:01 2013 +0400

    company-backends: Tweak the documentation

diff --git a/company.el b/company.el
index d37780b..ec6834b 100644
--- a/company.el
+++ b/company.el
@@ -273,8 +273,8 @@ return value should be a list of candidates that start with 
the prefix.
 
 Optional commands:
 
-`sorted': The back-end may return t here to indicate that the candidates
-are sorted and will not need to be sorted again.
+`sorted': Return t here to indicate that the candidates are sorted and will
+not need to be sorted again.
 
 `duplicates': If non-nil, company will take care of removing duplicates
 from the list.
@@ -283,25 +283,24 @@ from the list.
 progresses, unless the back-end returns t for this command.  The second
 argument is the latest prefix.
 
-`meta': The second argument is a completion candidate.  The back-end should
-return a (short) documentation string for it.
+`meta': The second argument is a completion candidate.  Return a (short)
+documentation string for it.
 
-`doc-buffer': The second argument is a completion candidate.
-The back-end should create a buffer (preferably with `company-doc-buffer'),
-fill it with documentation and return it.
+`doc-buffer': The second argument is a completion candidate.  Return a
+buffer with documentation for it.  Preferably use `company-doc-buffer',
 
-`location': The second argument is a completion candidate.  The back-end
-can return the cons of buffer and buffer location, or of file and line
-number where the completion candidate was defined.
+`location': The second argument is a completion candidate.  Return the cons
+of buffer and buffer location, or of file and line number where the
+completion candidate was defined.
 
-`require-match': If this value is t, the user is not allowed to enter
+`require-match': If this returns t, the user is not allowed to enter
 anything not offered as a candidate.  Use with care!  The default value nil
 gives the user that choice with `company-require-match'.  Return value
-'never overrides that option the other way around.
+`never' overrides that option the other way around.
 
-`init': Called once for each buffer, the back-end can check for external
+`init': Called once for each buffer. The back-end can check for external
 programs and files and load any required libraries.  Raising an error here
-will show up in message log once, and the backend will not be used for
+will show up in message log once, and the back-end will not be used for
 completion.
 
 `post-completion': Called after a completion candidate has been inserted

commit 100912d9c7a77d6349023a6cf91da05dc9f6e7ea
Author: Dmitry Gutov <address@hidden>
Date:   Sun May 26 06:36:36 2013 +0400

    Set emacs-lisp-docstring-fill-column to 75,
    
    wrap some overly long lines.

diff --git a/.dir-locals.el b/.dir-locals.el
index 0f821cf..79d9a12 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,4 +1,4 @@
 ((nil . ((indent-tabs-mode . nil)
          (fill-column . 80)
          (sentence-end-double-space . t)
-         (emacs-lisp-docstring-fill-column . t))))
+         (emacs-lisp-docstring-fill-column . 75))))
diff --git a/company-clang.el b/company-clang.el
index a26c691..52bb6e6 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -39,17 +39,18 @@
   :type 'file)
 
 (defcustom company-clang-begin-after-member-access t
-  "When non-nil, automatic completion will start whenever the current symbol is
-preceded by \".\", \"->\" or \"::\", ignoring `company-minimum-prefix-length'.
+  "When non-nil, automatic completion will start whenever the current
+symbol is preceded by \".\", \"->\" or \"::\", ignoring
+`company-minimum-prefix-length'.
 
-If `company-begin-commands' is a list, it should include `c-electric-lt-gt' and
-`c-electric-colon', for automatic completion right after \">\" and \":\".")
+If `company-begin-commands' is a list, it should include `c-electric-lt-gt'
+and `c-electric-colon', for automatic completion right after \">\" and
+\":\".")
 
 (defcustom company-clang-arguments nil
   "Additional arguments to pass to clang when completing.
-Prefix files (-include ...) can be selected with
-`company-clang-set-prefix' or automatically through a custom
-`company-clang-prefix-guesser'."
+Prefix files (-include ...) can be selected with `company-clang-set-prefix'
+or automatically through a custom `company-clang-prefix-guesser'."
   :type '(repeat (string :tag "Argument" nil)))
 
 (defcustom company-clang-prefix-guesser 'company-clang-guess-prefix
@@ -265,9 +266,9 @@ Additional command line arguments can be specified in
 with `company-clang-set-prefix' or automatically through a custom
 `company-clang-prefix-guesser'.
 
-With Clang versions before 2.9, we have to save the buffer before performing
-completion.  With Clang 2.9 and later, buffer contents are passed via standard
-input."
+With Clang versions before 2.9, we have to save the buffer before
+performing completion.  With Clang 2.9 and later, buffer contents are
+passed via standard input."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-clang))
diff --git a/company.el b/company.el
index 4d1a59e..d37780b 100644
--- a/company.el
+++ b/company.el
@@ -260,12 +260,13 @@ Each back-end is a function that takes a variable number 
of arguments.
 The first argument is the command requested from the back-end.  It is one
 of the following:
 
-`prefix': The back-end should return the text to be completed.  It must be text
-immediately before point.  Returning nil passes control to the next back-end.
-The function should return `stop' if it should complete but cannot \(e.g. if it
-is in the middle of a string\).  Instead of a string, the back-end may return a
-cons where car is the prefix and cdr is used in `company-minimum-prefix-length'
-test. It's either number or t, in which case the test automatically succeeds.
+`prefix': The back-end should return the text to be completed.  It must be
+text immediately before point.  Returning nil passes control to the next
+back-end.  The function should return `stop' if it should complete but
+cannot \(e.g. if it is in the middle of a string\).  Instead of a string,
+the back-end may return a cons where car is the prefix and cdr is used in
+`company-minimum-prefix-length' test. It's either number or t, in which
+case the test automatically succeeds.
 
 `candidates': The second argument is the prefix to be completed.  The
 return value should be a list of candidates that start with the prefix.
@@ -289,22 +290,23 @@ return a (short) documentation string for it.
 The back-end should create a buffer (preferably with `company-doc-buffer'),
 fill it with documentation and return it.
 
-`location': The second argument is a completion candidate.  The back-end can
-return the cons of buffer and buffer location, or of file and line
+`location': The second argument is a completion candidate.  The back-end
+can return the cons of buffer and buffer location, or of file and line
 number where the completion candidate was defined.
 
-`require-match': If this value is t, the user is not allowed to enter anything
-not offered as a candidate.  Use with care!  The default value nil gives the
-user that choice with `company-require-match'.  Return value 'never overrides
-that option the other way around.
+`require-match': If this value is t, the user is not allowed to enter
+anything not offered as a candidate.  Use with care!  The default value nil
+gives the user that choice with `company-require-match'.  Return value
+'never overrides that option the other way around.
 
 `init': Called once for each buffer, the back-end can check for external
-programs and files and load any required libraries.  Raising an error here will
-show up in message log once, and the backend will not be used for completion.
+programs and files and load any required libraries.  Raising an error here
+will show up in message log once, and the backend will not be used for
+completion.
 
-`post-completion': Called after a completion candidate has been inserted into
-the buffer.  The second argument is the candidate.  Can be used to modify it,
-e.g. to expand a snippet.
+`post-completion': Called after a completion candidate has been inserted
+into the buffer.  The second argument is the candidate.  Can be used to
+modify it, e.g. to expand a snippet.
 
 The back-end should return nil for all commands it does not support or
 does not know about.  It should also be callable interactively and use
@@ -340,8 +342,8 @@ aborted manually."
   "Hook run when company successfully completes.
 The hook is called with the selected candidate as an argument.
 
-If you indend to use it to post-process candidates from a specific back-end,
-consider using the `post-completion' command instead."
+If you indend to use it to post-process candidates from a specific
+back-end, consider using the `post-completion' command instead."
   :type 'hook)
 
 (defcustom company-minimum-prefix-length 3
@@ -362,8 +364,8 @@ This can be overridden by the back-end, if it returns t or 
`never' to
 
 (defcustom company-auto-complete nil
   "Determines when to auto-complete.
-If this is enabled, all characters from `company-auto-complete-chars' complete
-the selected completion.  This can also be a function."
+If this is enabled, all characters from `company-auto-complete-chars'
+complete the selected completion.  This can also be a function."
   :type '(choice (const :tag "Off" nil)
                  (function :tag "Predicate function")
                  (const :tag "On, if user interaction took place"
@@ -372,8 +374,8 @@ the selected completion.  This can also be a function."
 
 (defcustom company-auto-complete-chars '(?\  ?\) ?.)
   "Determines which characters trigger an automatic completion.
-See `company-auto-complete'.  If this is a string, each string character causes
-completion.  If it is a list of syntax description characters (see
+See `company-auto-complete'.  If this is a string, each string character
+causes completion.  If it is a list of syntax description characters (see
 `modify-syntax-entry'), all characters with that syntax auto-complete.
 
 This can also be a function, which is called with the new input and should
@@ -410,8 +412,8 @@ immediately when a prefix of 
`company-minimum-prefix-length' is reached."
   "A list of commands following which company will start completing.
 If this is t, it will complete after any command.  See `company-idle-delay'.
 
-Alternatively any command with a non-nil 'company-begin property is treated as
-if it was on this list."
+Alternatively any command with a non-nil `company-begin' property is treated
+as if it was on this list."
   :type '(choice (const :tag "Any command" t)
                  (const :tag "Self insert command" '(self-insert-command))
                  (repeat :tag "Commands" function)))
@@ -501,9 +503,9 @@ Completions can be searched with 
`company-search-candidates' or
 `company-filter-candidates'.  These can be used while completion is
 inactive, as well.
 
-The completion data is retrieved using `company-backends' and displayed using
-`company-frontends'.  If you want to start a specific back-end, call it
-interactively or use `company-begin-backend'.
+The completion data is retrieved using `company-backends' and displayed
+using `company-frontends'.  If you want to start a specific back-end, call
+it interactively or use `company-begin-backend'.
 
 regular keymap (`company-mode-map'):
 
@@ -1260,8 +1262,8 @@ Don't start this directly, use 
`company-search-candidates' or
 
 Regular characters are appended to the search string.
 
-The command `company-search-kill-others' (\\[company-search-kill-others]) uses
- the search string to limit the completion candidates."
+The command `company-search-kill-others' (\\[company-search-kill-others])
+uses the search string to limit the completion candidates."
   (interactive)
   (company-search-mode 1)
   (company-enable-overriding-keymap company-search-map))
@@ -1393,8 +1395,9 @@ and invoke the normal binding."
 
 (defun company-complete ()
   "Complete the common part of all candidates or the current selection.
-The first time this is called, the common part is completed, the second time, 
or
-when the selection has been changed, the selected candidate is completed."
+The first time this is called, the common part is completed, the second
+time, or when the selection has been changed, the selected candidate is
+completed."
   (interactive)
   (when (company-manual-begin)
     (if (or company-selection-changed
@@ -1487,7 +1490,7 @@ To show the number next to the candidates in some 
back-ends, enable
     (setq unread-command-events (list last-input-event))))
 
 (defun company-show-doc-buffer ()
-  "Temporarily show a buffer with the complete documentation for the 
selection."
+  "Temporarily show the documentation buffer for the selection."
   (interactive)
   (company--electric-do
     (let* ((selected (nth company-selection company-candidates))
@@ -1553,14 +1556,14 @@ To show the number next to the candidates in some 
back-ends, enable
 (defun company-begin-with (candidates
                            &optional prefix-length require-match callback)
   "Start a completion at point.
-CANDIDATES is the list of candidates to use and PREFIX-LENGTH is the length of
-the prefix that already is in the buffer before point.  It defaults to 0.
+CANDIDATES is the list of candidates to use and PREFIX-LENGTH is the length
+of the prefix that already is in the buffer before point.
+It defaults to 0.
 
-CALLBACK is a function called with the selected result if the user successfully
-completes the input.
+CALLBACK is a function called with the selected result if the user
+successfully completes the input.
 
-Example:
-\(company-begin-with '\(\"foo\" \"foobar\" \"foobarbaz\"\)\)"
+Example: \(company-begin-with '\(\"foo\" \"foobar\" \"foobarbaz\"\)\)"
   ;; FIXME: When Emacs 23 is no longer a concern, replace
   ;; `company-begin-with-marker' with a lexical variable; use a lexical 
closure.
   (setq company-begin-with-marker (copy-marker (point) t))

commit a671e2ba473eee74cf385026be0f919a7de0cc86
Author: Dmitry Gutov <address@hidden>
Date:   Sun May 26 06:17:30 2013 +0400

    company-modify-line: Barf the concat

diff --git a/company.el b/company.el
index 1a98036..4d1a59e 100644
--- a/company.el
+++ b/company.el
@@ -1674,10 +1674,10 @@ Example:
   (let ((prefix (get-text-property 0 'line-prefix old)))
     (when prefix ; Keep the original value unmodified, for no special reason.
       (setq old (concat prefix old))
-      (remove-text-properties 0 (length old) '(line-prefix) old))
-    (concat (company-safe-substring old 0 offset)
-            new
-            (company-safe-substring old (+ offset (length new))))))
+      (remove-text-properties 0 (length old) '(line-prefix) old)))
+  (concat (company-safe-substring old 0 offset)
+          new
+          (company-safe-substring old (+ offset (length new)))))
 
 (defsubst company--length-limit (lst limit)
   (if (nthcdr limit lst)

commit d2587c44cefd96b52a27bbc296cb8156eb2ad773
Author: Dmitry Gutov <address@hidden>
Date:   Sun May 26 06:03:06 2013 +0400

    company-modify-line: Handle an empty first line with line-prefix
    
    * Fixes #24 follow-up.
    * Cleaner code, less display magic.

diff --git a/company-tests.el b/company-tests.el
index 604e8c2..9f837cb 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -212,14 +212,18 @@
 
 (ert-deftest company-modify-line-with-line-prefix ()
   (let ((str (propertize "foobar" 'line-prefix "-*-")))
-    (should (string= (company-modify-line str "zz" 4)
-                     "fzzbar"))
-    (should (string= (company-modify-line str "zzxx" 0)
-                     "zzxxoobar"))
-    (should (string= (company-modify-line str "zzxx" 0)
-                     "zzxxoobar"))
-    (should (string= (company-modify-line str "zz" 10)
-                     "foobar zz"))))
+    (should (equal-including-properties
+             (company-modify-line str "zz" 4)
+             "-*-fzzbar"))
+    (should (equal-including-properties
+             (company-modify-line str "zzxx" 1)
+             "-zzxxobar"))
+    (should (equal-including-properties
+             (company-modify-line str "xx" 0)
+             "xx-foobar"))
+    (should (equal-including-properties
+             (company-modify-line str "zz" 10)
+             "-*-foobar zz"))))
 
 ;;; Template
 
diff --git a/company.el b/company.el
index f4b91c3..1a98036 100644
--- a/company.el
+++ b/company.el
@@ -1671,16 +1671,13 @@ Example:
     (nreverse lines)))
 
 (defun company-modify-line (old new offset)
-  (let ((prefix (get-text-property 0 'line-prefix old))
-        before)
-    (when prefix
-      (if (<= offset (length prefix))
-        (setq before (substring prefix 0 offset)))
-      (decf offset (length prefix)))
-    (concat (or before (company-safe-substring old 0 offset))
+  (let ((prefix (get-text-property 0 'line-prefix old)))
+    (when prefix ; Keep the original value unmodified, for no special reason.
+      (setq old (concat prefix old))
+      (remove-text-properties 0 (length old) '(line-prefix) old))
+    (concat (company-safe-substring old 0 offset)
             new
-            (company-safe-substring old
-                                    (max (+ offset (length new)) 0)))))
+            (company-safe-substring old (+ offset (length new))))))
 
 (defsubst company--length-limit (lst limit)
   (if (nthcdr limit lst)
@@ -1850,6 +1847,8 @@ Returns a negative number if the tooltip should be 
displayed above point."
     (overlay-put company-pseudo-tooltip-overlay 'invisible t)
     ;; Beat outline's folding overlays, at least.
     (overlay-put company-pseudo-tooltip-overlay 'priority 1)
+    ;; No (extra) prefix for the first line.
+    (overlay-put company-pseudo-tooltip-overlay 'line-prefix "")
     (overlay-put company-pseudo-tooltip-overlay 'before-string
                  (overlay-get company-pseudo-tooltip-overlay 'company-before))
     (overlay-put company-pseudo-tooltip-overlay 'window (selected-window))))

commit b869cde68a1cae6f7d81bcc2bf0af88dc1c80f79
Author: Dmitry Gutov <address@hidden>
Date:   Tue May 21 22:53:55 2013 +0400

    company-modify-line, company--column: Simplify

diff --git a/company.el b/company.el
index 2a17bdd..f4b91c3 100644
--- a/company.el
+++ b/company.el
@@ -574,16 +574,14 @@ keymap during active completions (`company-active-map'):
 (defun company--column (&optional pos)
   (save-excursion
     (when pos (goto-char pos))
-    (let ((pt (point))
-          (modifier 0))
+    (let ((pt (point)))
       (save-restriction
-        (save-excursion
-          (vertical-motion 0)
-          (narrow-to-region (point) pt)
-          (let ((prefix (get-text-property (point) 'line-prefix)))
-            (when prefix (setq modifier (length prefix)))))
-        (+ (current-column)
-           modifier)))))
+        (+ (save-excursion
+             (vertical-motion 0)
+             (narrow-to-region (point) pt)
+             (let ((prefix (get-text-property (point) 'line-prefix)))
+               (if prefix (length prefix) 0)))
+           (current-column))))))
 
 (defun company--row (&optional pos)
   (save-excursion
@@ -1682,8 +1680,7 @@ Example:
     (concat (or before (company-safe-substring old 0 offset))
             new
             (company-safe-substring old
-                                    (let ((to (+ offset (length new))))
-                                      (if (> to 0) to 0))))))
+                                    (max (+ offset (length new)) 0)))))
 
 (defsubst company--length-limit (lst limit)
   (if (nthcdr limit lst)

commit 7499a00484fae37d8b6cc75861aa08f26418788a
Author: Dmitry Gutov <address@hidden>
Date:   Tue May 21 22:06:13 2013 +0400

    company-ropemacs: Move dependencies list into the docstring

diff --git a/company-ropemacs.el b/company-ropemacs.el
index 17a660a..73bb33d 100644
--- a/company-ropemacs.el
+++ b/company-ropemacs.el
@@ -22,8 +22,6 @@
 
 ;;; Commentary:
 ;;
-;; Requires pymacs Emacs package (you can get it from Marmalade),
-;; and on Python side: pymacs, rope, ropemacs and ropemode.
 
 ;;; Code:
 
@@ -57,7 +55,10 @@
       (cons (elt location 0) (elt location 1)))))
 
 (defun company-ropemacs (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for ropemacs."
+  "`company-mode' completion back-end for ropemacs.
+
+Depends on third-party code: Pymacs (both Python and Emacs packages),
+rope, ropemacs and ropemode."
   (interactive (list 'interactive))
   (case command
     (init (when (and (derived-mode-p 'python-mode)

commit e374ba2ca46113722559ba0f87204530ad8c9d47
Author: Dmitry Gutov <address@hidden>
Date:   Tue May 21 21:53:36 2013 +0400

    company-echo-show-when-not-busy: Remove, was unused

diff --git a/company.el b/company.el
index 9950508..2a17bdd 100644
--- a/company.el
+++ b/company.el
@@ -1966,11 +1966,6 @@ Returns a negative number if the tooltip should be 
displayed above point."
   (setq company-echo-timer (run-with-timer 0 nil 'company-echo-show getter)))
 
 (defsubst company-echo-show-when-idle (&optional getter)
-  (when (sit-for .01)
-    (company-echo-show getter)))
-
-(defsubst company-echo-show-when-not-busy (&optional getter)
-  "Run `company-echo-show' with arg GETTER once Emacs isn't busy."
   (when (sit-for company-echo-delay)
     (company-echo-show getter)))
 

commit 9150eca78f27925ba72389e830c32f36b3368784
Author: Dmitry Gutov <address@hidden>
Date:   Tue May 21 20:12:26 2013 +0400

    Turn a bunch of defsubsts into defuns

diff --git a/company.el b/company.el
index 7085680..9950508 100644
--- a/company.el
+++ b/company.el
@@ -725,7 +725,7 @@ can retrieve meta-data for them."
   (or company--explicit-action
       company-selection-changed))
 
-(defsubst company-reformat (candidate)
+(defun company-reformat (candidate)
   ;; company-ispell needs this, because the results are always lower-case
   ;; It's mory efficient to fix it only when they are displayed.
   (concat company-prefix (substring candidate (length company-prefix))))
@@ -743,14 +743,14 @@ can retrieve meta-data for them."
            (and (symbolp this-command) (get this-command 'company-begin)))
        (not (and transient-mark-mode mark-active))))
 
-(defsubst company-call-frontends (command)
+(defun company-call-frontends (command)
   (dolist (frontend company-frontends)
     (condition-case err
         (funcall frontend command)
       (error (error "Company: Front-end %s error \"%s\" on command %s"
                     frontend (error-message-string err) command)))))
 
-(defsubst company-set-selection (selection &optional force-update)
+(defun company-set-selection (selection &optional force-update)
   (setq selection (max 0 (min (1- company-candidates-length) selection)))
   (when (or force-update (not (equal selection company-selection)))
     (setq company-selection selection
@@ -1425,7 +1425,7 @@ To show the number next to the candidates in some 
back-ends, enable
       (push (make-string (- company-space-strings-limit 1 i) ?\  ) lst))
     (apply 'vector lst)))
 
-(defsubst company-space-string (len)
+(defun company-space-string (len)
   (if (< len company-space-strings-limit)
       (aref company-space-strings len)
     (make-string len ?\ )))
@@ -1672,7 +1672,7 @@ Example:
       (push (buffer-substring beg end) lines))
     (nreverse lines)))
 
-(defsubst company-modify-line (old new offset)
+(defun company-modify-line (old new offset)
   (let ((prefix (get-text-property 0 'line-prefix old))
         before)
     (when prefix
@@ -1783,7 +1783,7 @@ Example:
   (let ((edges (window-inside-edges)))
     (- (nth 3 edges) (nth 1 edges))))
 
-(defsubst company--pseudo-tooltip-height ()
+(defun company--pseudo-tooltip-height ()
   "Calculate the appropriate tooltip height.
 Returns a negative number if the tooltip should be displayed above point."
   (let* ((lines (company--row))
@@ -1960,7 +1960,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
         (message "%s" company-echo-last-msg)
       (message ""))))
 
-(defsubst company-echo-show-soon (&optional getter)
+(defun company-echo-show-soon (&optional getter)
   (when company-echo-timer
     (cancel-timer company-echo-timer))
   (setq company-echo-timer (run-with-timer 0 nil 'company-echo-show getter)))

commit d02dd88006c5584e434e7f7ca9f4954ab5f8b7ee
Author: Dmitry Gutov <address@hidden>
Date:   Tue May 21 07:25:39 2013 +0400

    Fix #24, part second
    
    Regression from a696ca3a.

diff --git a/company.el b/company.el
index 84b9bd3..7085680 100644
--- a/company.el
+++ b/company.el
@@ -1656,13 +1656,20 @@ Example:
 (defun company-buffer-lines (beg end)
   (goto-char beg)
   (let (lines)
-    (while (< (point) end)
-      (let ((bol (point)))
+    (while (and (= 1 (vertical-motion 1))
+                (<= (point) end))
+      (let ((bound (min end (1- (point)))))
         ;; A visual line can contain several physical lines (e.g. with 
outline's
         ;; folding overlay).  Take only the first one.
-        (re-search-forward "$")
-        (push (buffer-substring bol (min end (point))) lines))
-      (vertical-motion 1))
+        (push (buffer-substring beg
+                                (save-excursion
+                                  (goto-char beg)
+                                  (re-search-forward "$" bound 'move)
+                                  (point)))
+              lines))
+      (setq beg (point)))
+    (unless (eq beg end)
+      (push (buffer-substring beg end) lines))
     (nreverse lines)))
 
 (defsubst company-modify-line (old new offset)

commit 55ee07cf95e177ce1a5e3d23a53d354749314846
Author: Dmitry Gutov <address@hidden>
Date:   Tue May 21 05:15:58 2013 +0400

    Respect line-prefix at bol (#24)

diff --git a/NEWS.md b/NEWS.md
index e5ad713..b6459c7 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* Plays nicer with `org-indent-mode`.
 * Works in horizontally scrolled windows.
 
 ## 2013-05-10 (0.6.9)
diff --git a/company-tests.el b/company-tests.el
index 7833725..604e8c2 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -204,6 +204,23 @@
     (compose-region 1 (1+ (length "lambda")) "\\")
     (should (= (company--column) 4))))
 
+(ert-deftest company-column-with-line-prefix ()
+  (with-temp-buffer
+    (insert "foo")
+    (put-text-property (point-min) (point) 'line-prefix "  ")
+    (should (= (company--column) 5))))
+
+(ert-deftest company-modify-line-with-line-prefix ()
+  (let ((str (propertize "foobar" 'line-prefix "-*-")))
+    (should (string= (company-modify-line str "zz" 4)
+                     "fzzbar"))
+    (should (string= (company-modify-line str "zzxx" 0)
+                     "zzxxoobar"))
+    (should (string= (company-modify-line str "zzxx" 0)
+                     "zzxxoobar"))
+    (should (string= (company-modify-line str "zz" 10)
+                     "foobar zz"))))
+
 ;;; Template
 
 (ert-deftest company-template-removed-after-the-last-jump ()
diff --git a/company.el b/company.el
index 47f0f61..84b9bd3 100644
--- a/company.el
+++ b/company.el
@@ -574,11 +574,16 @@ keymap during active completions (`company-active-map'):
 (defun company--column (&optional pos)
   (save-excursion
     (when pos (goto-char pos))
-    (save-restriction
-      (narrow-to-region (save-excursion
-                          (vertical-motion 0) (point))
-                        (point))
-      (current-column))))
+    (let ((pt (point))
+          (modifier 0))
+      (save-restriction
+        (save-excursion
+          (vertical-motion 0)
+          (narrow-to-region (point) pt)
+          (let ((prefix (get-text-property (point) 'line-prefix)))
+            (when prefix (setq modifier (length prefix)))))
+        (+ (current-column)
+           modifier)))))
 
 (defun company--row (&optional pos)
   (save-excursion
@@ -1425,7 +1430,7 @@ To show the number next to the candidates in some 
back-ends, enable
       (aref company-space-strings len)
     (make-string len ?\ )))
 
-(defsubst company-safe-substring (str from &optional to)
+(defun company-safe-substring (str from &optional to)
   (if (> from (string-width str))
       ""
     (with-temp-buffer
@@ -1661,9 +1666,17 @@ Example:
     (nreverse lines)))
 
 (defsubst company-modify-line (old new offset)
-  (concat (company-safe-substring old 0 offset)
-          new
-          (company-safe-substring old (+ offset (length new)))))
+  (let ((prefix (get-text-property 0 'line-prefix old))
+        before)
+    (when prefix
+      (if (<= offset (length prefix))
+        (setq before (substring prefix 0 offset)))
+      (decf offset (length prefix)))
+    (concat (or before (company-safe-substring old 0 offset))
+            new
+            (company-safe-substring old
+                                    (let ((to (+ offset (length new))))
+                                      (if (> to 0) to 0))))))
 
 (defsubst company--length-limit (lst limit)
   (if (nthcdr limit lst)

commit 6f2d10ada20e0854033019c38bfdf74a57a34cd2
Author: Dmitry Gutov <address@hidden>
Date:   Tue May 21 03:20:53 2013 +0400

    company--column: Account for character composition

diff --git a/company-tests.el b/company-tests.el
index a8bdaa9..7833725 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -180,6 +180,7 @@
         (should (eq 2 (overlay-start company-pseudo-tooltip-overlay)))))))
 
 (ert-deftest company-pseudo-tooltip-overlay-show ()
+  :tags '(interactive)
   (with-temp-buffer
     (save-window-excursion
     (set-window-buffer nil (current-buffer))
@@ -197,6 +198,12 @@
         (should (string= (overlay-get ov 'company-before)
                          " 123\nc45 c\nddd\n")))))))
 
+(ert-deftest company-column-with-composition ()
+  (with-temp-buffer
+    (insert "lambda ()")
+    (compose-region 1 (1+ (length "lambda")) "\\")
+    (should (= (company--column) 4))))
+
 ;;; Template
 
 (ert-deftest company-template-removed-after-the-last-jump ()
diff --git a/company.el b/company.el
index 55e5d1c..47f0f61 100644
--- a/company.el
+++ b/company.el
@@ -574,7 +574,11 @@ keymap during active completions (`company-active-map'):
 (defun company--column (&optional pos)
   (save-excursion
     (when pos (goto-char pos))
-    (- (point) (progn (vertical-motion 0) (point)))))
+    (save-restriction
+      (narrow-to-region (save-excursion
+                          (vertical-motion 0) (point))
+                        (point))
+      (current-column))))
 
 (defun company--row (&optional pos)
   (save-excursion

commit 11bbdcb8cd323f4a22793a4ded61c8c3e3396aec
Author: Dmitry Gutov <address@hidden>
Date:   Mon May 20 19:58:09 2013 +0400

    Check in NEWS and tests for the previous commit

diff --git a/NEWS.md b/NEWS.md
index 1c33f7c..e5ad713 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,9 @@
 # History of user-visible changes
 
+## Next
+
+* Works in horizontally scrolled windows.
+
 ## 2013-05-10 (0.6.9)
 
 * `company-capf` respects `:exit-function` completion property.
diff --git a/company-tests.el b/company-tests.el
index 011a5d4..a8bdaa9 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -179,33 +179,23 @@
         (company-call 'open-line 1)
         (should (eq 2 (overlay-start company-pseudo-tooltip-overlay)))))))
 
-(defun company-test-pseudo-tooltip-overlay-show ()
-  (save-window-excursion
+(ert-deftest company-pseudo-tooltip-overlay-show ()
+  (with-temp-buffer
+    (save-window-excursion
     (set-window-buffer nil (current-buffer))
     (insert "aaaa\n bb\nccccc\nddd")
     (search-backward "bb")
-    (let ((col-row (company--col-row))
+    (let ((col (company--column))
           (company-candidates-length 2)
           (company-candidates '("123" "45")))
-      (company-pseudo-tooltip-show (cdr col-row) (car col-row) 0)
+      (company-pseudo-tooltip-show (company--row) col 0)
       (let ((ov company-pseudo-tooltip-overlay))
         (should (eq (overlay-get ov 'company-width) 3))
         ;; FIXME: Make it 2?
-        (should (eq (overlay-get ov 'company-height) 10))
-        (should (eq (overlay-get ov 'company-column) (car col-row)))
+        (should (eq (overlay-get ov 'company-height) company-tooltip-limit))
+        (should (eq (overlay-get ov 'company-column) col))
         (should (string= (overlay-get ov 'company-before)
-                         " 123\nc45 c\nddd\n"))))))
-
-(ert-deftest company-pseudo-tooltip-overlay-show ()
-  :tags '(interactive)
-  (with-temp-buffer
-    (company-test-pseudo-tooltip-overlay-show)))
-
-(ert-deftest company-pseudo-tooltip-overlay-show-with-header-line ()
-  :tags '(interactive)
-  (with-temp-buffer
-    (setq header-line-format "foo bar")
-    (company-test-pseudo-tooltip-overlay-show)))
+                         " 123\nc45 c\nddd\n")))))))
 
 ;;; Template
 

commit d21bb454dcfacda8808b596e4bca85a53a99eabf
Author: Dmitry Gutov <address@hidden>
Date:   Mon May 20 19:56:48 2013 +0400

    Calculate row and column using `vertical-motion'
    
    * company--replacement-string: Account for horizontal scrolling.
    * Fixes #22.
    
    Thanks to Eli Zaretskii for suggestions:
    http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00145.html

diff --git a/company.el b/company.el
index 5b800e4..55e5d1c 100644
--- a/company.el
+++ b/company.el
@@ -571,17 +571,16 @@ keymap during active completions (`company-active-map'):
 (defun company-input-noop ()
   (push 31415926 unread-command-events))
 
-;; Hack:
-;; posn-col-row is incorrect in older Emacsen when line-spacing is set
-(defun company--col-row (&optional pos)
-  (let ((posn (posn-at-point pos)))
-    (cons (car (posn-col-row posn)) (cdr (posn-actual-col-row posn)))))
-
-(defsubst company--column (&optional pos)
-  (car (posn-col-row (posn-at-point pos))))
+(defun company--column (&optional pos)
+  (save-excursion
+    (when pos (goto-char pos))
+    (- (point) (progn (vertical-motion 0) (point)))))
 
-(defsubst company--row (&optional pos)
-  (cdr (posn-actual-col-row (posn-at-point pos))))
+(defun company--row (&optional pos)
+  (save-excursion
+    (when pos (goto-char pos))
+    (count-screen-lines (window-start)
+                        (progn (vertical-motion 0) (point)))))
 
 ;;; backends 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
@@ -1326,10 +1325,20 @@ and invoke the normal binding."
            (and (< evt-row row)
                 (>= evt-row (+ row height)))))))
 
+(defun company--event-col-row (event)
+  (let* ((col-row (posn-actual-col-row (event-start event)))
+         (col (car col-row))
+         (row (cdr col-row)))
+    (incf col (window-hscroll))
+    (and header-line-format
+         (version< "24" emacs-version)
+         (decf row))
+    (cons col row)))
+
 (defun company-select-mouse (event)
   "Select the candidate picked by the mouse."
   (interactive "e")
-  (let ((event-col-row (posn-actual-col-row (event-start event)))
+  (let ((event-col-row (company--event-col-row event))
         (ovl-row (company--row))
         (ovl-height (and company-pseudo-tooltip-overlay
                          (min (overlay-get company-pseudo-tooltip-overlay
@@ -1659,9 +1668,11 @@ Example:
 
 (defun company--replacement-string (lines old column nl &optional align-top)
 
-  (let ((width (length (car lines))))
-    (when (> width (- (window-width) column))
-      (setq column (max 0 (- (window-width) width)))))
+  (let ((width (length (car lines)))
+        (remaining-cols (- (+ (window-width) (window-hscroll))
+                           column)))
+    (when (> width remaining-cols)
+      (decf column (- width remaining-cols))))
 
   (let (new)
     (when align-top
@@ -1745,7 +1756,7 @@ Example:
 ;; show
 
 (defsubst company--window-inner-height ()
-  (let ((edges (window-inside-edges (selected-window))))
+  (let ((edges (window-inside-edges)))
     (- (nth 3 edges) (nth 1 edges))))
 
 (defsubst company--pseudo-tooltip-height ()
@@ -1762,15 +1773,9 @@ Returns a negative number if the tooltip should be 
displayed above point."
   (company-pseudo-tooltip-hide)
   (save-excursion
 
-    (move-to-column 0)
-
     (let* ((height (company--pseudo-tooltip-height))
            above)
 
-      (when (and header-line-format
-                 (version< "24" emacs-version))
-        (decf row))
-
       (when (< height 0)
         (setq row (+ row height -1)
               above t))
@@ -1797,10 +1802,9 @@ Returns a negative number if the tooltip should be 
displayed above point."
         (overlay-put ov 'company-height height)))))
 
 (defun company-pseudo-tooltip-show-at-point (pos)
-  (let ((col-row (company--col-row pos)))
-    (when col-row
-      (company-pseudo-tooltip-show (1+ (cdr col-row)) (car col-row)
-                                   company-selection))))
+  (let ((row (company--row pos))
+        (col (company--column pos)))
+    (company-pseudo-tooltip-show (1+ row) col company-selection)))
 
 (defun company-pseudo-tooltip-edit (selection)
   (let ((height (overlay-get company-pseudo-tooltip-overlay 'company-height)))

commit 4456662366342b75413e2d7b63a3d229220211f6
Author: Andrew Hyatt <address@hidden>
Date:   Sun May 12 20:53:37 2013 -0400

    Add additional information about what is needed for functional tests.

diff --git a/websocket-functional-test.el b/websocket-functional-test.el
index 8183635..a87d021 100644
--- a/websocket-functional-test.el
+++ b/websocket-functional-test.el
@@ -1,5 +1,9 @@
 ;; Simple functional testing
 ;; Usage: emacs -batch -Q -L . -l websocket-functional-test.el
+;;
+;; Note: this functional tests requires that you have python with the
+;; Tornado web server.  See http://www.tornadoweb.org/en/stable/ for
+;; information on aquiring.
 
 (require 'tls)   ;; tests a particular bug we had on emacs 23
 (setq debug-on-error t)

commit c1f2813c30433d642f9a3c73b4be3d1bcbc03c93
Merge: 3baf07a 27d3053
Author: Andrew Hyatt <address@hidden>
Date:   Sun May 12 17:51:58 2013 -0700

    Merge pull request #31 from joebo/master
    
    Fix line endings on windows, for the server.


commit 9b1ed514d64f9adff97f1b3b75023ad7ff743887
Author: Dmitry Gutov <address@hidden>
Date:   Sat May 11 12:09:07 2013 +0400

    Turn on email notifications [ci skip]

diff --git a/.travis.yml b/.travis.yml
index bd24745..cdf55d1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -30,6 +30,3 @@ before_script:
 
 script:
   make test-batch EMACS=${EMACS}
-
-notifications:
-  email: false

commit 757ae4bcc18549e85b3131664ca3639a759ad162
Author: Dmitry Gutov <address@hidden>
Date:   Sat May 11 12:02:02 2013 +0400

    Set up Travis CI

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..bb0a9e0
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,24 @@
+# https://github.com/rolandwalker/emacs-travis
+
+language: emacs-lisp
+
+env:
+  matrix:
+    - EMACS=emacs24
+    - EMACS=emacs-snapshot
+
+install:
+  - if [ "$EMACS" = "emacs24" ]; then
+        sudo add-apt-repository -y ppa:cassou/emacs &&
+        sudo apt-get update -qq &&
+        sudo apt-get install -qq emacs24 emacs24-el;
+    fi
+  - if [ "$EMACS" = "emacs-snapshot" ]; then
+        sudo add-apt-repository -y ppa:cassou/emacs &&
+        sudo apt-get update -qq &&
+        sudo apt-get install -qq emacs-snapshot &&
+        sudo apt-get install -qq emacs-snapshot-el emacs-snapshot-gtk;
+    fi
+
+script:
+  make test EMACS=${EMACS}
diff --git a/Makefile b/Makefile
index a710a93..f86786f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
 # -*- Makefile -*-
 
+EMACS = emacs
+
 # Compile with noninteractive and relatively clean environment.
 BATCHFLAGS = -batch -q --no-site-file
 
@@ -8,7 +10,7 @@ SRCS = js2-mode.el js2-imenu-extras.el
 OBJS = $(SRCS:.el=.elc)
 
 %.elc: %.el
-       emacs $(BATCHFLAGS) -f batch-byte-compile $^
+       ${EMACS} $(BATCHFLAGS) -f batch-byte-compile $^
 
 all: $(OBJS)
 
@@ -17,8 +19,8 @@ clean:
 
 # custom build (require loads)
 js2-imenu-extras.elc: js2-mode.elc
-       emacs $(BATCHFLAGS) -l ./js2-mode.elc -f batch-byte-compile $*.el
+       ${EMACS} $(BATCHFLAGS) -l ./js2-mode.elc -f batch-byte-compile $*.el
 
 test:
-       emacs $(BATCHFLAGS) -l js2-mode.el -l tests/parser.el\
-         -l tests/indent.el -l tests/externs.el -f ert-run-tests-batch
+       ${EMACS} $(BATCHFLAGS) -l js2-mode.el -l tests/parser.el\
+         -l tests/indent.el -l tests/externs.el -f ert-run-tests-batch-and-exit
diff --git a/README.md b/README.md
index c83cc41..9065cdf 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-About
+About [![Build 
Status](https://travis-ci.org/mooz/js2-mode.png?branch=master)](https://travis-ci.org/mooz/js2-mode)
 ======
 
 Improved JavaScript editing mode for GNU Emacs ([description 
here](http://elpa.gnu.org/packages/js2-mode.html)).

commit c50f3d1d9db63bcbea3f02036ee17ab0d7511be0
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 20:00:04 2013 +0400

    Description -> About

diff --git a/README.md b/README.md
index 865eb2e..c83cc41 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-Description
+About
 ======
 
 Improved JavaScript editing mode for GNU Emacs ([description 
here](http://elpa.gnu.org/packages/js2-mode.html)).

commit e48289f90d9b8ffa179a5505970421136ef42150
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 19:55:41 2013 +0400

    Alternat{->iv}ely

diff --git a/js2-mode.el b/js2-mode.el
index 9fd8ba4..812c35b 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -51,7 +51,7 @@
 
 ;;   (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
 
-;; Alternately, to install it as a minor mode just for JavaScript linting,
+;; Alternatively, to install it as a minor mode just for JavaScript linting,
 ;; you must add it to the appropriate major-mode hook.  Normally this would be:
 
 ;;   (add-hook 'js-mode-hook 'js2-minor-mode)

commit 5c7e8c516f577c6266b05e8a09d4ca6089295f06
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 19:54:45 2013 +0400

    Fix #102

diff --git a/README.md b/README.md
index d66c69a..865eb2e 100644
--- a/README.md
+++ b/README.md
@@ -1,31 +1,25 @@
 Description
 ======
 
-An improved JavaScript mode for GNU Emacs. Forked from 
<http://code.google.com/p/js2-mode/>.
+Improved JavaScript editing mode for GNU Emacs ([description 
here](http://elpa.gnu.org/packages/js2-mode.html)).
 
 For some of the latest changes, see [latest user-visible 
changes](https://github.com/mooz/js2-mode/wiki/Latest-user-visible-changes).
 
 Installation
 ======
 
-    $ git clone git://github.com/mooz/js2-mode.git
-    $ cd js2-mode
-    $ emacs --batch -f batch-byte-compile js2-mode.el
+The stable versions are hosted at [GNU ELPA](http://elpa.gnu.org/)
+(<kbd>M-x list-packages</kbd>).
 
-Then put js2-mode.elc into your site-lisp directory.
-
-In your emacs config:
-
-    (autoload 'js2-mode "js2-mode" nil t)
-    (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
-
-See <http://code.google.com/p/js2-mode/wiki/InstallationInstructions> for
-additional details.
+You can also install the latest development version from
+[Melpa](http://melpa.milkbox.net/#installing).
 
 Emacs 22 and 23
 ===============
 
-This version requires Emacs 24. For a backward compatible version, check out 
the branch [emacs23](https://github.com/mooz/js2-mode/tree/emacs23).
+This version requires Emacs 24. For a backward compatible version,
+check out the branch
+[emacs23](https://github.com/mooz/js2-mode/tree/emacs23).
 
 Bugs
 ====

commit cce396a2885f4b91edb4383d85ecc9e38a7533db
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 19:32:09 2013 +0400

    Prefix all tests with "js2-"

diff --git a/tests/indent.el b/tests/indent.el
index b0d1b31..953b8a6 100644
--- a/tests/indent.el
+++ b/tests/indent.el
@@ -11,7 +11,7 @@
                           (point-min) (point)))))))
 
 (defmacro* js2-deftest-indent (name content &key bind)
-  `(ert-deftest ,name ()
+  `(ert-deftest ,(intern (format "js2-%s" name)) ()
      (let ,(append '((js2-basic-offset 2)
                      (js2-pretty-multiline-declarations t)
                      (inhibit-point-motion-hooks t))
diff --git a/tests/parser.el b/tests/parser.el
index 00b7cff..3c05c4b 100644
--- a/tests/parser.el
+++ b/tests/parser.el
@@ -30,7 +30,7 @@ with `js2-print-tree' and assert the result to be equal to the
 original string.  If SYNTAX-ERROR is passed, expect syntax error
 highlighting substring equal to SYNTAX-ERROR value.
 BIND defines bindings to apply them around the test."
-  `(ert-deftest ,name ()
+  `(ert-deftest ,(intern (format "js2-%s" name)) ()
      (let ,(append bind '((js2-basic-offset 2)))
        (js2-test-parse-string ,code-string :syntax-error ,syntax-error))))
 

commit ba08184a0dfba0b6f988321fa83f0f061ab0b8eb
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 19:28:53 2013 +0400

    Include tests/externs.el in the test target

diff --git a/Makefile b/Makefile
index 36f2cb9..a710a93 100644
--- a/Makefile
+++ b/Makefile
@@ -21,4 +21,4 @@ js2-imenu-extras.elc: js2-mode.elc
 
 test:
        emacs $(BATCHFLAGS) -l js2-mode.el -l tests/parser.el\
-         -l tests/indent.el -f ert-run-tests-batch
+         -l tests/indent.el -l tests/externs.el -f ert-run-tests-batch

commit 3c69aea0c267e7bbadd5e35eb6cab54764c9d91c
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 19:20:11 2013 +0400

    Bump the version date

diff --git a/js2-mode.el b/js2-mode.el
index 6fbb611..9fd8ba4 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -7,7 +7,7 @@
 ;;         Dmitry Gutov <address@hidden>
 ;; URL:  https://github.com/mooz/js2-mode/
 ;;       http://code.google.com/p/js2-mode/
-;; Version: 20130307
+;; Version: 20130510
 ;; Keywords: languages, javascript
 ;; Package-Requires: ((emacs "24.1"))
 

commit 2560f92866a1f15ca393b7ae330d755648b2e786
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 17:42:01 2013 +0400

    Fix #104

diff --git a/js2-mode.el b/js2-mode.el
index f333582..6fbb611 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -858,6 +858,9 @@ Next, you can add a function to `js2-mode-hook' that adds 
additional
 externs appropriate for the specific file, perhaps based on its path.
 These should go in `js2-additional-externs', which is buffer-local.
 
+Third, you can use JSLint's global declaration, as long as
+`js2-include-jslint-globals' is non-nil, which see.
+
 Finally, you can add a function to `js2-post-parse-callbacks',
 which is called after parsing completes, and `js2-mode-ast' is bound to
 the root of the parse tree.  At this stage you can set up an AST
@@ -1106,6 +1109,14 @@ another file, or you've got a potential bug."
   :type 'boolean
   :group 'js2-mode)
 
+(defcustom js2-include-jslint-globals t
+  "Non-nil to include the identifiers from JSLint global
+declaration (see http://www.jslint.com/lint.html#global) in the
+buffer-local externs list.  See `js2-additional-externs' for more
+information."
+  :type 'boolean
+  :group 'js2-mode)
+
 (defvar js2-mode-map
   (let ((map (make-sparse-keymap))
         keys)
@@ -6424,6 +6435,31 @@ it is considered declared."
                 (if (or js2-include-browser-externs js2-include-node-externs)
                     js2-typed-array-externs))))
 
+(defun js2-apply-jslint-globals ()
+  (setq js2-additional-externs
+        (nconc (js2-get-jslint-globals)
+               js2-additional-externs)))
+
+(defun js2-get-jslint-globals ()
+  (loop for node in (js2-ast-root-comments js2-mode-ast)
+        when (and (eq 'block (js2-comment-node-format node))
+                  (save-excursion
+                    (goto-char (js2-node-abs-pos node))
+                    (looking-at "/\\*global ")))
+        append (js2-get-jslint-globals-in
+                (match-end 0)
+                (js2-node-abs-end node))))
+
+(defun js2-get-jslint-globals-in (beg end)
+  (let (res)
+    (save-excursion
+      (goto-char beg)
+      (while (re-search-forward js2-mode-identifier-re end t)
+        (let ((match (match-string 0)))
+          (unless (member match '("true" "false"))
+            (push match res)))))
+    (nreverse res)))
+
 ;;; IMenu support
 
 ;; We currently only support imenu, but eventually should support speedbar and
@@ -10074,6 +10110,8 @@ highlighting features of `js2-mode'."
   (set (make-local-variable 'js2-highlight-level) 0) ; no syntax highlighting
   (add-hook 'after-change-functions #'js2-minor-mode-edit nil t)
   (add-hook 'change-major-mode-hook #'js2-minor-mode-exit nil t)
+  (when js2-include-jslint-globals
+    (add-hook 'js2-post-parse-callbacks 'js2-apply-jslint-globals nil t))
   (js2-reparse))
 
 (defun js2-minor-mode-exit ()
@@ -10085,6 +10123,7 @@ highlighting features of `js2-mode'."
     (delete-overlay js2-mode-node-overlay)
     (setq js2-mode-node-overlay nil))
   (js2-remove-overlays)
+  (remove-hook 'js2-post-parse-callbacks 'js2-apply-jslint-globals t)
   (setq js2-mode-ast nil))
 
 (defvar js2-source-buffer nil "Linked source buffer for diagnostics view")
@@ -10265,7 +10304,12 @@ Selecting an error will jump it to the corresponding 
source-buffer error.
         js2-mode-comments-hidden nil
         js2-mode-buffer-dirty-p t
         js2-mode-parsing nil)
+
   (js2-set-default-externs)
+
+  (when js2-include-jslint-globals
+    (add-hook 'js2-post-parse-callbacks 'js2-apply-jslint-globals nil t))
+
   (js2-reparse))
 
 (defun js2-mode-exit ()
diff --git a/tests/externs.el b/tests/externs.el
new file mode 100644
index 0000000..7860058
--- /dev/null
+++ b/tests/externs.el
@@ -0,0 +1,22 @@
+(require 'ert)
+(require 'js2-mode)
+
+(ert-deftest js2-finds-jslint-globals ()
+  (with-temp-buffer
+    (insert "/*global foo, bar:false, baz: true */")
+    (js2-mode)
+    (should (equal (js2-get-jslint-globals)
+                   '("foo" "bar" "baz")))))
+
+(ert-deftest js2-no-jslint-globals-without-keyword ()
+  (with-temp-buffer
+    (insert "/* foo, bar:false, baz: true */")
+    (js2-mode)
+    (should (null (js2-get-jslint-globals)))))
+
+(ert-deftest js2-finds-jslint-globals-in-other-comments ()
+  (with-temp-buffer
+    (insert "/* foo, bar */\n\n\n/*global quux, tee: true, $*/")
+    (js2-mode)
+    (should (equal (js2-get-jslint-globals)
+                   '("quux" "tee" "$")))))

commit 0d1b276e2240bb765908c895cbce862f9a54b9d4
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 16:30:40 2013 +0400

    js2-auto-insert-catch-block: Unused, remove

diff --git a/js2-mode.el b/js2-mode.el
index f7efc53..f333582 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -1106,11 +1106,6 @@ another file, or you've got a potential bug."
   :type 'boolean
   :group 'js2-mode)
 
-(defcustom js2-auto-insert-catch-block t
-  "Non-nil to insert matching catch block on open-curly after `try'."
-  :type 'boolean
-  :group 'js2-mode)
-
 (defvar js2-mode-map
   (let ((map (make-sparse-keymap))
         keys)

commit 068a36adff25e244dcbb21aafb953fc3b66c5853
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 16:16:48 2013 +0400

    js2-imenu-extras: Define a minor mode
    
    js2-do-parse: Use `run-hooks' on `js2-post-parse-callbacks'.
    js2-post-parse-callbacks: Use `add-hook'.
    
    The old way to set up this should still work, too.

diff --git a/js2-imenu-extras.el b/js2-imenu-extras.el
index 3061905..e8e15a5 100644
--- a/js2-imenu-extras.el
+++ b/js2-imenu-extras.el
@@ -1,5 +1,7 @@
 ;;; js2-imenu-extras.el --- Imenu support for additional constructs
 
+;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
+
 ;; Author:    Dmitry Gutov <address@hidden>
 ;; Keywords:  languages, javascript, imenu
 
@@ -21,14 +23,11 @@
 ;;; Commentary:
 
 ;; This package adds Imenu support for additional framework constructs and
-;; general patterns to `js2-mode'.
+;; structural patterns to `js2-mode'.
 
 ;; Usage:
 
-;; (eval-after-load 'js2-mode
-;;   '(progn
-;;      (require 'js2-imenu-extras)
-;;      (js2-imenu-extras-setup)))
+;; (add-hook 'js2-mode-hook 'js2-imenu-extras-mode)
 
 ;; To customize how it works:
 ;;   M-x customize-group RET js2-imenu RET
@@ -100,9 +99,13 @@ prefix any functions defined inside the IIFE with the 
module name."
 ;;;###autoload
 (defun js2-imenu-extras-setup ()
   (when js2-imenu-enabled-frameworks
-    (add-to-list 'js2-post-parse-callbacks 'js2-imenu-record-declarations t))
+    (add-hook 'js2-post-parse-callbacks 'js2-imenu-record-declarations t t))
   (when (or js2-imenu-show-other-functions js2-imenu-show-module-pattern)
-    (add-to-list 'js2-post-parse-callbacks 'js2-imenu-walk-ast t)))
+    (add-hook 'js2-post-parse-callbacks 'js2-imenu-walk-ast t t)))
+
+(defun js2-imenu-extras-remove ()
+  (remove-hook 'js2-post-parse-callbacks 'js2-imenu-record-declarations t)
+  (remove-hook 'js2-post-parse-callbacks 'js2-imenu-walk-ast t))
 
 (defun js2-imenu-record-declarations ()
   (let* ((styles (loop for style in js2-imenu-extension-styles
@@ -208,4 +211,12 @@ NODE must be `js2-assign-node'."
                 (js2-record-imenu-entry fn target-qname
                                         (js2-node-abs-pos target))))))))))
 
+;;;###autoload
+(define-minor-mode js2-imenu-extras-mode
+  "Toggle Imenu support for frameworks and structural patterns."
+  :lighter ""
+  (if js2-imenu-extras-mode
+      (js2-imenu-extras-setup)
+    (js2-imenu-extras-remove)))
+
 (provide 'js2-imenu-extras)
diff --git a/js2-mode.el b/js2-mode.el
index b489458..f7efc53 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -7136,8 +7136,7 @@ Scanner should be initialized."
     ;; Give extensions a chance to muck with things before highlighting starts.
     (let ((js2-additional-externs js2-additional-externs))
       (save-excursion
-        (dolist (callback js2-post-parse-callbacks)
-          (funcall callback)))
+        (run-hooks 'js2-post-parse-callbacks))
       (js2-highlight-undeclared-vars))
     root))
 

commit 4c735454d91f9674da0ecea950504888b1e10ff7
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 00:19:59 2013 +0400

    Release 0.6.9

diff --git a/NEWS.md b/NEWS.md
index d8a0c91..1c33f7c 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,7 +1,8 @@
 # History of user-visible changes
 
-## Next
+## 2013-05-10 (0.6.9)
 
+* `company-capf` respects `:exit-function` completion property.
 * `company-backends`: `prefix` command can return `t` in the cdr.
 * `company-clang-begin-after-member-access`: New option.
 * Mouse click outside the tooltip aborts completion.
diff --git a/company.el b/company.el
index 4328924..5b800e4 100644
--- a/company.el
+++ b/company.el
@@ -4,9 +4,9 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6.8
+;; Version: 0.6.9
 ;; Keywords: abbrev, convenience, matching
-;; URL: http://company-mode.github.com/
+;; URL: http://company-mode.github.io/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x
 
 ;; This file is part of GNU Emacs.

commit 41b1eea33bf85095a2211e8963b0b307ce20147f
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 10 00:16:07 2013 +0400

    Make 'make test' work when the test file is compiled

diff --git a/company-tests.el b/company-tests.el
index 7ff9889..011a5d4 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -25,6 +25,7 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
 (require 'ert)
 (require 'company)
 (require 'company-keywords)

commit 409bc6a7d16a9edc3337b90ca878acc3f1e3ae17
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 23:17:58 2013 +0400

    Add Stefan's email

diff --git a/company-capf.el b/company-capf.el
index e614cb0..60e4494 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
-;; Author: Stefan Monnier
+;; Author: Stefan Monnier <address@hidden>
 
 ;; This file is part of GNU Emacs.
 

commit 4508b7a70e18da25d20cc2ac471086fdd51acf2a
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 23:16:55 2013 +0400

    company-capf: Change `require-match' comment

diff --git a/company-capf.el b/company-capf.el
index 455e992..e614cb0 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -66,7 +66,7 @@ Requires Emacs 24.1 or newer."
     (meta nil)           ;FIXME: Return one-line docstring for `arg'.
     (doc-buffer nil)     ;FIXME: Return help buffer for `arg'.
     (location nil)       ;FIXME: Return (BUF . POS) or (FILE . LINENB) of 
`arg'.
-    (require-match nil)  ;This should be a property of the front-end!
+    (require-match nil)  ;Front-ends should also have a say in this.
     (init nil)       ;Don't bother: plenty of other ways to initialize the 
code.
     (post-completion
      (let* ((res (company--capf-data))

commit 1331b718431597d4dcf2bf432ec642b456fe408b
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 23:14:31 2013 +0400

    Move company-capf to a separate file

diff --git a/company-capf.el b/company-capf.el
new file mode 100644
index 0000000..455e992
--- /dev/null
+++ b/company-capf.el
@@ -0,0 +1,80 @@
+;;; company-capf.el --- company-mode completion-at-point-functions back-end 
-*- lexical-binding: t -*-
+
+;; Copyright (C) 2013  Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
+
+(defun company--capf-data ()
+  (let ((data (run-hook-wrapped 'completion-at-point-functions
+                                ;; Ignore misbehaving functions.
+                                #'completion--capf-wrapper 'optimist)))
+    (when (consp data) data)))
+
+(defun company-capf (command &optional arg &rest _args)
+  "`company-mode' back-end using `completion-at-point-functions'.
+Requires Emacs 24.1 or newer."
+  (interactive (list 'interactive))
+  (case command
+    (interactive (company-begin-backend 'company-capf))
+    (prefix
+     (let ((res (company--capf-data)))
+       (when res
+         (if (> (nth 2 res) (point))
+             'stop
+           (buffer-substring-no-properties (nth 1 res) (point))))))
+    (candidates
+     (let ((res (company--capf-data)))
+       (when res
+         (let* ((table (nth 3 res))
+                (pred (plist-get (nthcdr 4 res) :predicate))
+                (meta (completion-metadata
+                       (buffer-substring (nth 1 res) (nth 2 res))
+                       table pred))
+                (sortfun (cdr (assq 'display-sort-function meta)))
+                (candidates (all-completions arg table pred)))
+           (if sortfun (funcall sortfun candidates) candidates)))))
+    (sorted
+     (let ((res (company--capf-data)))
+       (when res
+         (let ((meta (completion-metadata
+                      (buffer-substring (nth 1 res) (nth 2 res))
+                      (nth 3 res) (plist-get (nthcdr 4 res) :predicate))))
+           (cdr (assq 'display-sort-function meta))))))
+    (duplicates nil)     ;Don't bother.
+    (no-cache t)         ;FIXME: Improve!
+    (meta nil)           ;FIXME: Return one-line docstring for `arg'.
+    (doc-buffer nil)     ;FIXME: Return help buffer for `arg'.
+    (location nil)       ;FIXME: Return (BUF . POS) or (FILE . LINENB) of 
`arg'.
+    (require-match nil)  ;This should be a property of the front-end!
+    (init nil)       ;Don't bother: plenty of other ways to initialize the 
code.
+    (post-completion
+     (let* ((res (company--capf-data))
+            (exit-function (plist-get (nthcdr 4 res) :exit-function)))
+       (if exit-function
+           (funcall exit-function arg 'finished))))
+    ))
+
+(provide 'company-capf)
+
+;;; company-capf.el ends here
diff --git a/company.el b/company.el
index 2bd6114..4328924 100644
--- a/company.el
+++ b/company.el
@@ -213,6 +213,7 @@ If this many lines are not available, prefer to display the 
tooltip above."
 
 (defvar company-safe-backends
   '((company-abbrev . "Abbrev")
+    (company-capf . "completion-at-point-functions")
     (company-clang . "Clang")
     (company-css . "CSS")
     (company-dabbrev . "dabbrev for plain text")
@@ -241,56 +242,6 @@ If this many lines are not available, prefer to display 
the tooltip above."
                         (assq backend company-safe-backends))
                 (return t))))))
 
-(defun company--capf-data ()
-  (let ((data (run-hook-wrapped 'completion-at-point-functions
-                                ;; Ignore misbehaving functions.
-                                #'completion--capf-wrapper 'optimist)))
-    (when (consp data) data)))
-
-(defun company-capf (command &optional arg &rest _args)
-  "`company-mode' back-end using `completion-at-point-functions'.
-Requires Emacs 24.1 or newer."
-  (interactive (list 'interactive))
-  (case command
-    (interactive (company-begin-backend 'company-capf))
-    (prefix
-     (let ((res (company--capf-data)))
-       (when res
-         (if (> (nth 2 res) (point))
-             'stop
-           (buffer-substring-no-properties (nth 1 res) (point))))))
-    (candidates
-     (let ((res (company--capf-data)))
-       (when res
-         (let* ((table (nth 3 res))
-                (pred (plist-get (nthcdr 4 res) :predicate))
-                (meta (completion-metadata
-                      (buffer-substring (nth 1 res) (nth 2 res))
-                      table pred))
-                (sortfun (cdr (assq 'display-sort-function meta)))
-                (candidates (all-completions arg table pred)))
-           (if sortfun (funcall sortfun candidates) candidates)))))
-    (sorted
-     (let ((res (company--capf-data)))
-       (when res
-         (let ((meta (completion-metadata
-                      (buffer-substring (nth 1 res) (nth 2 res))
-                      (nth 3 res) (plist-get (nthcdr 4 res) :predicate))))
-           (cdr (assq 'display-sort-function meta))))))
-    (duplicates nil) ;Don't bother.
-    (no-cache t)     ;FIXME: Improve!
-    (meta nil)       ;FIXME: Return one-line docstring for `arg'.
-    (doc-buffer nil) ;FIXME: Return help buffer for `arg'.
-    (location nil)   ;FIXME: Return (BUF . POS) or (FILE . LINENB) of `arg'.
-    (require-match nil)            ;This should be a property of the front-end!
-    (init nil)      ;Don't bother: plenty of other ways to initialize the code.
-    (post-completion
-     (let* ((res (company--capf-data))
-            (exit-function (plist-get (nthcdr 4 res) :exit-function)))
-       (if exit-function
-           (funcall exit-function arg 'finished))))
-    ))
-
 (defcustom company-backends '(company-elisp company-nxml company-css
                               company-semantic company-clang company-eclim
                               company-xcode company-ropemacs

commit 3d7683107180203654e0da80ed556240bc94c2b3
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 22:46:26 2013 +0400

    Fix some more compilation warnings

diff --git a/company-eclim.el b/company-eclim.el
index 864f550..ea0b73e 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -69,6 +69,8 @@ eclim can only complete correctly when the buffer has been 
saved."
 (defvar company-eclim--doc nil)
 (make-variable-buffer-local 'company-eclim--doc)
 
+(declare-function json-read "json")
+
 (defun company-eclim--call-process (&rest args)
   (let ((coding-system-for-read 'utf-8)
         res)
diff --git a/company-elisp.el b/company-elisp.el
index b55ed9f..5bfc27e 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -111,7 +111,7 @@ first in the candidates list."
         res)
     (condition-case nil
         (save-excursion
-          (dotimes (i company-elisp-parse-depth)
+          (dotimes (_ company-elisp-parse-depth)
             (up-list -1)
             (save-excursion
               (when (eq (char-after) ?\()
@@ -126,7 +126,7 @@ first in the candidates list."
                                   company-elisp-var-binding-regexp))
                     (down-list 1)
                     (condition-case nil
-                        (dotimes (i company-elisp-parse-limit)
+                        (dotimes (_ company-elisp-parse-limit)
                           (save-excursion
                             (when (looking-at "[ \t\n]*(")
                               (down-list 1))
diff --git a/company-tests.el b/company-tests.el
index 9b8e914..7ff9889 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -28,6 +28,8 @@
 (require 'ert)
 (require 'company)
 (require 'company-keywords)
+(require 'company-elisp)
+(require 'company-clang)
 
 ;;; Core
 
diff --git a/company.el b/company.el
index 2625e2a..2bd6114 100644
--- a/company.el
+++ b/company.el
@@ -1357,6 +1357,10 @@ and invoke the normal binding."
     (company-abort)
     (company--unread-last-input)))
 
+(defvar company-pseudo-tooltip-overlay)
+
+(defvar company-tooltip-offset)
+
 (defun company--inside-tooltip-p (event-col-row row height)
   (let* ((ovl company-pseudo-tooltip-overlay)
          (column (overlay-get ovl 'company-column))

commit 837c8899e6957a9acbd058d3c3d92bc165956f07
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 21:54:33 2013 +0400

    Add compile target

diff --git a/Makefile b/Makefile
index ff1dc3e..f11b04e 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ elpa: *.el
        tar cvf company-$$version.tar --mode 644 "$$dir"
 
 clean:
-       @rm -rf company-*/ company-*.tar company-*.tar.bz2
+       @rm -rf company-*/ company-*.tar company-*.tar.bz2 *.elc ert.el
 
 test:
        ${EMACS} -Q -nw -L . -l company-tests.el \
@@ -32,3 +32,6 @@ test-batch:
 downloads:
        ${EMACS} -Q --batch -l ert || \
        ${CURL} ${ERT_URL} > ert.el
+
+compile:
+       ${EMACS} -Q --batch -L . -f batch-byte-compile company.el company-*.el

commit f480808a73a2e60c2480bd89825d0af60b75b9fb
Author: Stefan Monnier <address@hidden>
Date:   Thu May 9 10:43:37 2013 +0400

    * company.el (company-capf): Add support for `sorted' and `post-completion'.
      (company--capf-data): New function.
      (company-backend): Declare before first use.
      (company-require-match-p): Only call company-require-match when needed.
      (company--continue-failed): Don't use backward-delete-char 
non-interactively.
      (company-search-assert-enabled): Demote it, since it comes too late to
      be inlined.
      (company--replacement-string, company--create-lines)
      (company-pseudo-tooltip-edit, company-doc-buffer): Silence the 
byte-compiler.

diff --git a/company.el b/company.el
index 824af82..2625e2a 100644
--- a/company.el
+++ b/company.el
@@ -71,6 +71,7 @@
 
 (eval-when-compile (require 'cl))
 
+;; FIXME: Use `user-error'.
 (add-to-list 'debug-ignored-errors "^.* frontend cannot be used twice$")
 (add-to-list 'debug-ignored-errors "^Echo area cannot be used twice$")
 (add-to-list 'debug-ignored-errors "^No \\(document\\|loc\\)ation available$")
@@ -171,16 +172,16 @@
 Each front-end is a function that takes one argument.  It is called with
 one of the following arguments:
 
-'show: When the visualization should start.
+`show': When the visualization should start.
 
-'hide: When the visualization should end.
+`hide': When the visualization should end.
 
-'update: When the data has been updated.
+`update': When the data has been updated.
 
-'pre-command: Before every command that is executed while the
+`pre-command': Before every command that is executed while the
 visualization is active.
 
-'post-command: After every command that is executed while the
+`post-command': After every command that is executed while the
 visualization is active.
 
 The visualized data is stored in `company-prefix', `company-candidates',
@@ -240,27 +241,55 @@ If this many lines are not available, prefer to display 
the tooltip above."
                         (assq backend company-safe-backends))
                 (return t))))))
 
-(defun company-capf (command &optional arg &rest args)
+(defun company--capf-data ()
+  (let ((data (run-hook-wrapped 'completion-at-point-functions
+                                ;; Ignore misbehaving functions.
+                                #'completion--capf-wrapper 'optimist)))
+    (when (consp data) data)))
+
+(defun company-capf (command &optional arg &rest _args)
   "`company-mode' back-end using `completion-at-point-functions'.
 Requires Emacs 24.1 or newer."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-capf))
     (prefix
-     (let ((res (run-hook-wrapped 'completion-at-point-functions
-                                  ;; Ignore misbehaving functions.
-                                  #'completion--capf-wrapper 'optimist)))
-       (when (consp res)
+     (let ((res (company--capf-data)))
+       (when res
          (if (> (nth 2 res) (point))
              'stop
            (buffer-substring-no-properties (nth 1 res) (point))))))
     (candidates
-     (let ((res (run-hook-wrapped 'completion-at-point-functions
-                                  ;; Ignore misbehaving functions.
-                                  #'completion--capf-wrapper 'optimist)))
-       (when (consp res)
-         (all-completions arg (nth 3 res)
-                          (plist-get (nthcdr 4 res) :predicate)))))))
+     (let ((res (company--capf-data)))
+       (when res
+         (let* ((table (nth 3 res))
+                (pred (plist-get (nthcdr 4 res) :predicate))
+                (meta (completion-metadata
+                      (buffer-substring (nth 1 res) (nth 2 res))
+                      table pred))
+                (sortfun (cdr (assq 'display-sort-function meta)))
+                (candidates (all-completions arg table pred)))
+           (if sortfun (funcall sortfun candidates) candidates)))))
+    (sorted
+     (let ((res (company--capf-data)))
+       (when res
+         (let ((meta (completion-metadata
+                      (buffer-substring (nth 1 res) (nth 2 res))
+                      (nth 3 res) (plist-get (nthcdr 4 res) :predicate))))
+           (cdr (assq 'display-sort-function meta))))))
+    (duplicates nil) ;Don't bother.
+    (no-cache t)     ;FIXME: Improve!
+    (meta nil)       ;FIXME: Return one-line docstring for `arg'.
+    (doc-buffer nil) ;FIXME: Return help buffer for `arg'.
+    (location nil)   ;FIXME: Return (BUF . POS) or (FILE . LINENB) of `arg'.
+    (require-match nil)            ;This should be a property of the front-end!
+    (init nil)      ;Don't bother: plenty of other ways to initialize the code.
+    (post-completion
+     (let* ((res (company--capf-data))
+            (exit-function (plist-get (nthcdr 4 res) :exit-function)))
+       (if exit-function
+           (funcall exit-function arg 'finished))))
+    ))
 
 (defcustom company-backends '(company-elisp company-nxml company-css
                               company-semantic company-clang company-eclim
@@ -281,8 +310,8 @@ The first argument is the command requested from the 
back-end.  It is one
 of the following:
 
 `prefix': The back-end should return the text to be completed.  It must be text
-immediately before `point'.  Returning nil passes control to the next back-end.
-The function should return 'stop if it should complete but cannot \(e.g. if it
+immediately before point.  Returning nil passes control to the next back-end.
+The function should return `stop' if it should complete but cannot \(e.g. if it
 is in the middle of a string\).  Instead of a string, the back-end may return a
 cons where car is the prefix and cdr is used in `company-minimum-prefix-length'
 test. It's either number or t, in which case the test automatically succeeds.
@@ -372,8 +401,8 @@ consider using the `post-completion' command instead."
   "If enabled, disallow non-matching input.
 This can be a function do determine if a match is required.
 
-This can be overridden by the back-end, if it returns t or 'never to
-'require-match.  `company-auto-complete' also takes precedence over this."
+This can be overridden by the back-end, if it returns t or `never' to
+`require-match'.  `company-auto-complete' also takes precedence over this."
   :type '(choice (const :tag "Off" nil)
                  (function :tag "Predicate function")
                  (const :tag "On, if user interaction took place"
@@ -605,6 +634,9 @@ keymap during active completions (`company-active-map'):
 
 ;;; backends 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(defvar company-backend nil)
+(make-variable-buffer-local 'company-backend)
+
 (defun company-grab (regexp &optional expression limit)
   (when (looking-back regexp limit)
     (or (match-string-no-properties (or expression 0)) "")))
@@ -670,9 +702,6 @@ keymap during active completions (`company-active-map'):
 
 ;;; completion mechanism 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defvar company-backend nil)
-(make-variable-buffer-local 'company-backend)
-
 (defvar company-prefix nil)
 (make-variable-buffer-local 'company-prefix)
 
@@ -895,10 +924,10 @@ can retrieve meta-data for them."
 (defun company-require-match-p ()
   (let ((backend-value (company-call-backend 'require-match)))
     (or (eq backend-value t)
-        (and (if (functionp company-require-match)
+        (and (not (eq backend-value 'never))
+             (if (functionp company-require-match)
                  (funcall company-require-match)
-               (eq company-require-match t))
-             (not (eq backend-value 'never))))))
+               (eq company-require-match t))))))
 
 (defun company-auto-complete-p (input)
   "Return non-nil, if input starts with punctuation or parentheses."
@@ -938,7 +967,7 @@ can retrieve meta-data for them."
        ((and (company--string-incremental-p company-prefix new-prefix)
              (company-require-match-p))
         ;; wrong incremental input, but required match
-        (backward-delete-char (length input))
+        (delete-char (- (length input)))
         (ding)
         (message "Matching input is required")
         company-candidates)
@@ -1258,7 +1287,7 @@ Don't start this directly, use 
`company-search-candidates' or
     (kill-local-variable 'company-search-old-selection)
     (company-enable-overriding-keymap company-active-map)))
 
-(defsubst company-search-assert-enabled ()
+(defun company-search-assert-enabled ()
   (company-assert-enabled)
   (unless company-search-mode
     (company-uninstall-map)
@@ -1456,7 +1485,7 @@ To show the number next to the candidates in some 
back-ends, enable
             (cons selected (company-call-backend 'meta selected))))
     (cdr company-last-metadata)))
 
-(defun company-doc-buffer (&optional string)
+(defun company-doc-buffer (&optional _string)
   (with-current-buffer (get-buffer-create "*Company meta-data*")
     (erase-buffer)
     (current-buffer)))
@@ -1561,6 +1590,8 @@ completes the input.
 
 Example:
 \(company-begin-with '\(\"foo\" \"foobar\" \"foobarbaz\"\)\)"
+  ;; FIXME: When Emacs 23 is no longer a concern, replace
+  ;; `company-begin-with-marker' with a lexical variable; use a lexical 
closure.
   (setq company-begin-with-marker (copy-marker (point) t))
   (company-begin-backend
    `(lambda (command &optional arg &rest ignored)
@@ -1680,7 +1711,7 @@ Example:
   (let (new)
     (when align-top
       ;; untouched lines first
-      (dotimes (i (- (length old) (length lines)))
+      (dotimes (_ (- (length old) (length lines)))
         (push (pop old) new)))
     ;; length into old lines.
     (while old
@@ -1722,7 +1753,7 @@ Example:
           len (min limit len)
           lines-copy lines)
 
-    (dotimes (i len)
+    (dotimes (_ len)
       (setq width (max (length (pop lines-copy)) width)))
     (setq width (min width (window-width)))
 
@@ -1816,7 +1847,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
       (company-pseudo-tooltip-show (1+ (cdr col-row)) (car col-row)
                                    company-selection))))
 
-(defun company-pseudo-tooltip-edit (lines selection)
+(defun company-pseudo-tooltip-edit (selection)
   (let ((height (overlay-get company-pseudo-tooltip-overlay 'company-height)))
     (overlay-put company-pseudo-tooltip-overlay 'company-before
                  (apply 'company--replacement-string
@@ -1871,8 +1902,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
     (hide (company-pseudo-tooltip-hide)
           (setq company-tooltip-offset 0))
     (update (when (overlayp company-pseudo-tooltip-overlay)
-              (company-pseudo-tooltip-edit company-candidates
-                                           company-selection)))))
+              (company-pseudo-tooltip-edit company-selection)))))
 
 (defun company-pseudo-tooltip-unless-just-one-frontend (command)
   "`company-pseudo-tooltip-frontend', but not shown for single candidates."

commit d159a22470d500c7095261266e7bff9139bac2fb
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 08:22:59 2013 +0400

    emacs22 fails to install

diff --git a/.travis.yml b/.travis.yml
index a717d57..bd24745 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,24 +4,11 @@ language: emacs-lisp
 
 env:
   matrix:
-    - EMACS=emacs22
     - EMACS=emacs23
     - EMACS=emacs24
     - EMACS=emacs-snapshot
 
 install:
-  - if [ "$EMACS" = "emacs22" ]; then
-        curl -Os 
http://security.ubuntu.com/ubuntu/pool/universe/e/emacs22/emacs22_22.2-0ubuntu9_i386.deb
 &&
-        curl -Os 
http://security.ubuntu.com/ubuntu/pool/universe/e/emacs22/emacs22-bin-common_22.2-0ubuntu9_i386.deb
 &&
-        curl -Os 
http://security.ubuntu.com/ubuntu/pool/universe/e/emacs22/emacs22-common_22.2-0ubuntu9_all.deb
 &&
-        curl -Os 
http://security.ubuntu.com/ubuntu/pool/universe/e/emacs22/emacs22-el_22.2-0ubuntu9_all.deb
 &&
-        curl -Os 
http://security.ubuntu.com/ubuntu/pool/universe/e/emacs22/emacs22-gtk_22.2-0ubuntu9_i386.deb
 &&
-        sudo apt-get update -qq &&
-        sudo apt-get remove -qq emacs emacs23-bin-common emacs23-common 
emacs23-nox &&
-        sudo apt-get install -qq libjpeg62 xaw3dg &&
-        sudo dpkg -i emacs22_22.2-0ubuntu9_i386.deb 
emacs22-bin-common_22.2-0ubuntu9_i386.deb emacs22-common_22.2-0ubuntu9_all.deb 
emacs22-el_22.2-0ubuntu9_all.deb emacs22-gtk_22.2-0ubuntu9_i386.deb &&
-        sudo update-alternatives --set emacs22 /usr/bin/emacs22-gtk;
-    fi
   - if [ "$EMACS" = "emacs23" ]; then
         sudo apt-get update -qq &&
         sudo apt-get install -qq emacs23-gtk emacs23-el;

commit 2e9af64d0fb19dda43da7ed90df825f3b231d6d4
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 08:12:07 2013 +0400

    ERT window should occupy the whole frame

diff --git a/Makefile b/Makefile
index 6da5117..ff1dc3e 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,8 @@ clean:
        @rm -rf company-*/ company-*.tar company-*.tar.bz2
 
 test:
-       ${EMACS} -Q -nw -L . -l company-tests.el --eval "(ert t)"
+       ${EMACS} -Q -nw -L . -l company-tests.el \
+       --eval "(let (pop-up-windows) (ert t))"
 
 test-batch:
        ${EMACS} -Q --batch -L . -l company-tests.el \
diff --git a/company-tests.el b/company-tests.el
index 7478918..9b8e914 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -182,14 +182,13 @@
     (insert "aaaa\n bb\nccccc\nddd")
     (search-backward "bb")
     (let ((col-row (company--col-row))
-          (company-tooltip-limit 5)
           (company-candidates-length 2)
           (company-candidates '("123" "45")))
       (company-pseudo-tooltip-show (cdr col-row) (car col-row) 0)
       (let ((ov company-pseudo-tooltip-overlay))
         (should (eq (overlay-get ov 'company-width) 3))
         ;; FIXME: Make it 2?
-        (should (eq (overlay-get ov 'company-height) 5))
+        (should (eq (overlay-get ov 'company-height) 10))
         (should (eq (overlay-get ov 'company-column) (car col-row)))
         (should (string= (overlay-get ov 'company-before)
                          " 123\nc45 c\nddd\n"))))))

commit 0a0e8c6fec890b2ce9823da234f7668e55162987
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 08:09:03 2013 +0400

    Decrease company-tooltip-limit in test
    
    Less likely to fail in smaller terminal window.

diff --git a/company-tests.el b/company-tests.el
index 9b8e914..7478918 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -182,13 +182,14 @@
     (insert "aaaa\n bb\nccccc\nddd")
     (search-backward "bb")
     (let ((col-row (company--col-row))
+          (company-tooltip-limit 5)
           (company-candidates-length 2)
           (company-candidates '("123" "45")))
       (company-pseudo-tooltip-show (cdr col-row) (car col-row) 0)
       (let ((ov company-pseudo-tooltip-overlay))
         (should (eq (overlay-get ov 'company-width) 3))
         ;; FIXME: Make it 2?
-        (should (eq (overlay-get ov 'company-height) 10))
+        (should (eq (overlay-get ov 'company-height) 5))
         (should (eq (overlay-get ov 'company-column) (car col-row)))
         (should (string= (overlay-get ov 'company-before)
                          " 123\nc45 c\nddd\n"))))))

commit a254018f99467ad86d0bd6a798b9ef88ca92e371
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 07:54:52 2013 +0400

    Add build status badge

diff --git a/README.md b/README.md
index 5501ec2..4f79bbc 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,4 @@
 See the [homepage](http://company-mode.github.com/).
 [![githalytics.com 
alpha](https://cruel-carlota.pagodabox.com/336ef4be2595a7859d52e2c17b7da2b2 
"githalytics.com")](http://githalytics.com/company-mode/company-mode)
+
+[![Build 
Status](https://travis-ci.org/company-mode/company-mode.png?branch=master)](https://travis-ci.org/company-mode/company-mode)

commit 5e0b93a40db3299f32ff6861906067ae7f881607
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 07:51:52 2013 +0400

    Use emacs -L argument

diff --git a/Makefile b/Makefile
index 20c472e..6da5117 100644
--- a/Makefile
+++ b/Makefile
@@ -22,13 +22,11 @@ clean:
        @rm -rf company-*/ company-*.tar company-*.tar.bz2
 
 test:
-       ${EMACS} -Q -nw --eval "(add-to-list 'load-path \".\")" \
-       -l company-tests.el --eval "(ert t)"
+       ${EMACS} -Q -nw -L . -l company-tests.el --eval "(ert t)"
 
 test-batch:
-       ${EMACS} -Q --batch --eval "(add-to-list 'load-path \".\")" \
-       -l company-tests.el --eval "(ert-run-tests-batch-and-exit \
-         '(not (tag interactive)))"
+       ${EMACS} -Q --batch -L . -l company-tests.el \
+       --eval "(ert-run-tests-batch-and-exit '(not (tag interactive)))"
 
 downloads:
        ${EMACS} -Q --batch -l ert || \

commit f06ba5a6a919049f169d7507433b8f4f85b5b90c
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 07:38:53 2013 +0400

    Use stable URL for ERT

diff --git a/Makefile b/Makefile
index a4bebd1..20c472e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 EMACS=emacs
 CURL=curl --silent
-ERT_URL=http://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/emacs-lisp/ert.el
+ERT_URL=http://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/emacs-lisp/ert.el?h=emacs-24
 
 .PHONY: ert test test-batch
 

commit 6e37b4c18e63464a544941f6968a4b063b4eb16b
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 07:33:33 2013 +0400

    Add a backslash

diff --git a/Makefile b/Makefile
index f95e01e..a4bebd1 100644
--- a/Makefile
+++ b/Makefile
@@ -31,5 +31,5 @@ test-batch:
          '(not (tag interactive)))"
 
 downloads:
-       ${EMACS} -Q --batch -l ert ||
+       ${EMACS} -Q --batch -l ert || \
        ${CURL} ${ERT_URL} > ert.el

commit dea7474d33b5164c40cee3e557eb287913da566f
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 07:26:55 2013 +0400

    Try the new travis.yml

diff --git a/.gitignore b/.gitignore
index c531d98..2ecd291 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 *.elc
+ert.el
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..a717d57
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,48 @@
+# https://github.com/rolandwalker/emacs-travis
+
+language: emacs-lisp
+
+env:
+  matrix:
+    - EMACS=emacs22
+    - EMACS=emacs23
+    - EMACS=emacs24
+    - EMACS=emacs-snapshot
+
+install:
+  - if [ "$EMACS" = "emacs22" ]; then
+        curl -Os 
http://security.ubuntu.com/ubuntu/pool/universe/e/emacs22/emacs22_22.2-0ubuntu9_i386.deb
 &&
+        curl -Os 
http://security.ubuntu.com/ubuntu/pool/universe/e/emacs22/emacs22-bin-common_22.2-0ubuntu9_i386.deb
 &&
+        curl -Os 
http://security.ubuntu.com/ubuntu/pool/universe/e/emacs22/emacs22-common_22.2-0ubuntu9_all.deb
 &&
+        curl -Os 
http://security.ubuntu.com/ubuntu/pool/universe/e/emacs22/emacs22-el_22.2-0ubuntu9_all.deb
 &&
+        curl -Os 
http://security.ubuntu.com/ubuntu/pool/universe/e/emacs22/emacs22-gtk_22.2-0ubuntu9_i386.deb
 &&
+        sudo apt-get update -qq &&
+        sudo apt-get remove -qq emacs emacs23-bin-common emacs23-common 
emacs23-nox &&
+        sudo apt-get install -qq libjpeg62 xaw3dg &&
+        sudo dpkg -i emacs22_22.2-0ubuntu9_i386.deb 
emacs22-bin-common_22.2-0ubuntu9_i386.deb emacs22-common_22.2-0ubuntu9_all.deb 
emacs22-el_22.2-0ubuntu9_all.deb emacs22-gtk_22.2-0ubuntu9_i386.deb &&
+        sudo update-alternatives --set emacs22 /usr/bin/emacs22-gtk;
+    fi
+  - if [ "$EMACS" = "emacs23" ]; then
+        sudo apt-get update -qq &&
+        sudo apt-get install -qq emacs23-gtk emacs23-el;
+    fi
+  - if [ "$EMACS" = "emacs24" ]; then
+        sudo add-apt-repository -y ppa:cassou/emacs &&
+        sudo apt-get update -qq &&
+        sudo apt-get install -qq emacs24 emacs24-el;
+    fi
+  - if [ "$EMACS" = "emacs-snapshot" ]; then
+        sudo add-apt-repository -y ppa:cassou/emacs &&
+        sudo apt-get update -qq &&
+        sudo apt-get install -qq emacs-snapshot &&
+        sudo apt-get install -qq emacs-snapshot-el emacs-snapshot-gtk;
+    fi
+
+before_script:
+  make downloads
+
+script:
+  make test-batch EMACS=${EMACS}
+
+notifications:
+  email: false
diff --git a/Makefile b/Makefile
index db28faf..f95e01e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,8 @@
 EMACS=emacs
+CURL=curl --silent
+ERT_URL=http://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/emacs-lisp/ert.el
+
+.PHONY: ert test test-batch
 
 package: *.el
        @ver=`grep -o "Version: .*" company.el | cut -c 10-`; \
@@ -25,3 +29,7 @@ test-batch:
        ${EMACS} -Q --batch --eval "(add-to-list 'load-path \".\")" \
        -l company-tests.el --eval "(ert-run-tests-batch-and-exit \
          '(not (tag interactive)))"
+
+downloads:
+       ${EMACS} -Q --batch -l ert ||
+       ${CURL} ${ERT_URL} > ert.el

commit 7d557877cf536db6639f6598bcc87001f9f59c11
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 07:05:35 2013 +0400

    company--inside-tooltip-p: Be more precise
    
    when company-candidates-length < overlay's company-height property

diff --git a/company.el b/company.el
index 9e65bd4..824af82 100644
--- a/company.el
+++ b/company.el
@@ -1328,30 +1328,32 @@ and invoke the normal binding."
     (company-abort)
     (company--unread-last-input)))
 
-(defun company--inside-tooltip-p (event-col-row ovl-row)
-  (when company-pseudo-tooltip-overlay
-    (let* ((ovl company-pseudo-tooltip-overlay)
-           (column (overlay-get ovl 'company-column))
-           (width (overlay-get ovl 'company-width))
-           (height (overlay-get ovl 'company-height))
-           (evt-col (car event-col-row))
-           (evt-row (cdr event-col-row)))
-      (and (>= evt-col column)
-           (< evt-col (+ column width))
-           (if (> height 0)
-               (and (> evt-row ovl-row)
-                    (<= evt-row (+ ovl-row height) ))
-             (and (< evt-row ovl-row)
-                  (>= evt-row (+ ovl-row height))))))))
+(defun company--inside-tooltip-p (event-col-row row height)
+  (let* ((ovl company-pseudo-tooltip-overlay)
+         (column (overlay-get ovl 'company-column))
+         (width (overlay-get ovl 'company-width))
+         (evt-col (car event-col-row))
+         (evt-row (cdr event-col-row)))
+    (and (>= evt-col column)
+         (< evt-col (+ column width))
+         (if (> height 0)
+             (and (> evt-row row)
+                  (<= evt-row (+ row height) ))
+           (and (< evt-row row)
+                (>= evt-row (+ row height)))))))
 
 (defun company-select-mouse (event)
   "Select the candidate picked by the mouse."
   (interactive "e")
   (let ((event-col-row (posn-actual-col-row (event-start event)))
-        (ovl-row (company--row)))
-    (if (company--inside-tooltip-p event-col-row ovl-row)
-        (let ((ovl-height (overlay-get company-pseudo-tooltip-overlay
-                                       'company-height)))
+        (ovl-row (company--row))
+        (ovl-height (and company-pseudo-tooltip-overlay
+                         (min (overlay-get company-pseudo-tooltip-overlay
+                                           'company-height)
+                              company-candidates-length))))
+    (if (and ovl-height
+             (company--inside-tooltip-p event-col-row ovl-row ovl-height))
+        (progn
           (company-set-selection (+ (cdr event-col-row)
                                     (if (zerop company-tooltip-offset)
                                         -1

commit 81fc9e178f2a5a15b8253bcc3c70854dc9cd7736
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 06:48:56 2013 +0400

    Fix #21

diff --git a/company-tests.el b/company-tests.el
index 309d8f1..9b8e914 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -160,6 +160,7 @@
       (should (null (company-explicit-action-p))))))
 
 (ert-deftest company-pseudo-tooltip-does-not-get-displaced ()
+  :tags '(interactive)
   (with-temp-buffer
     (save-window-excursion
       (set-window-buffer nil (current-buffer))
@@ -175,6 +176,34 @@
         (company-call 'open-line 1)
         (should (eq 2 (overlay-start company-pseudo-tooltip-overlay)))))))
 
+(defun company-test-pseudo-tooltip-overlay-show ()
+  (save-window-excursion
+    (set-window-buffer nil (current-buffer))
+    (insert "aaaa\n bb\nccccc\nddd")
+    (search-backward "bb")
+    (let ((col-row (company--col-row))
+          (company-candidates-length 2)
+          (company-candidates '("123" "45")))
+      (company-pseudo-tooltip-show (cdr col-row) (car col-row) 0)
+      (let ((ov company-pseudo-tooltip-overlay))
+        (should (eq (overlay-get ov 'company-width) 3))
+        ;; FIXME: Make it 2?
+        (should (eq (overlay-get ov 'company-height) 10))
+        (should (eq (overlay-get ov 'company-column) (car col-row)))
+        (should (string= (overlay-get ov 'company-before)
+                         " 123\nc45 c\nddd\n"))))))
+
+(ert-deftest company-pseudo-tooltip-overlay-show ()
+  :tags '(interactive)
+  (with-temp-buffer
+    (company-test-pseudo-tooltip-overlay-show)))
+
+(ert-deftest company-pseudo-tooltip-overlay-show-with-header-line ()
+  :tags '(interactive)
+  (with-temp-buffer
+    (setq header-line-format "foo bar")
+    (company-test-pseudo-tooltip-overlay-show)))
+
 ;;; Template
 
 (ert-deftest company-template-removed-after-the-last-jump ()
diff --git a/company.el b/company.el
index 901aac1..9e65bd4 100644
--- a/company.el
+++ b/company.el
@@ -1779,6 +1779,10 @@ Returns a negative number if the tooltip should be 
displayed above point."
     (let* ((height (company--pseudo-tooltip-height))
            above)
 
+      (when (and header-line-format
+                 (version< "24" emacs-version))
+        (decf row))
+
       (when (< height 0)
         (setq row (+ row height -1)
               above t))

commit c1dd7729321250407f804f0fe26939ea141f6e14
Author: Dmitry Gutov <address@hidden>
Date:   Thu May 9 06:40:06 2013 +0400

    Add test targets

diff --git a/Makefile b/Makefile
index de124c5..db28faf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+EMACS=emacs
+
 package: *.el
        @ver=`grep -o "Version: .*" company.el | cut -c 10-`; \
        tar cjvf company-$$ver.tar.bz2 --mode 644 `git ls-files '*.el' | xargs`
@@ -14,3 +16,12 @@ elpa: *.el
 
 clean:
        @rm -rf company-*/ company-*.tar company-*.tar.bz2
+
+test:
+       ${EMACS} -Q -nw --eval "(add-to-list 'load-path \".\")" \
+       -l company-tests.el --eval "(ert t)"
+
+test-batch:
+       ${EMACS} -Q --batch --eval "(add-to-list 'load-path \".\")" \
+       -l company-tests.el --eval "(ert-run-tests-batch-and-exit \
+         '(not (tag interactive)))"

commit 27d3053993f73460b3ec48f4ae9779577f3c829c
Author: unknown <address@hidden>
Date:   Wed May 8 22:29:40 2013 -0400

    force unix mode so line endings are not converted

diff --git a/websocket.el b/websocket.el
index 8fda4fd..fc53ffd 100644
--- a/websocket.el
+++ b/websocket.el
@@ -842,6 +842,7 @@ connection, which should be kept in order to pass to
              :protocols (process-get server :protocol)
              :extensions (mapcar 'car (process-get server :extensions)))))
     (add-to-list 'websocket-server-websockets ws)
+    (set-process-coding-system client 'unix 'unix)
     (process-put client :websocket ws)
     (set-process-filter client 'websocket-server-filter)
     ;; set-process-filter-multibyte is obsolete, but make-network-process's

commit d4913b4147167bdcde22b44e4f0ec74f265e562d
Author: Dmitry Gutov <address@hidden>
Date:   Mon May 6 16:07:25 2013 +0400

    Update company-clang.el
    
    stardard -> standard

diff --git a/company-clang.el b/company-clang.el
index bdf8ca4..a26c691 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -266,7 +266,7 @@ with `company-clang-set-prefix' or automatically through a 
custom
 `company-clang-prefix-guesser'.
 
 With Clang versions before 2.9, we have to save the buffer before performing
-completion.  With Clang 2.9 and later, buffer contents are passed via stardard
+completion.  With Clang 2.9 and later, buffer contents are passed via standard
 input."
   (interactive (list 'interactive))
   (case command

commit 9add1d8d3339153a5ec121a47e89bfc3ef1b1002
Author: Dmitry Gutov <address@hidden>
Date:   Mon May 6 14:06:00 2013 +0400

    company-clang-begin-after-member-access: include C++'s scope operator

diff --git a/company-clang.el b/company-clang.el
index 6abebe7..bdf8ca4 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -39,10 +39,11 @@
   :type 'file)
 
 (defcustom company-clang-begin-after-member-access t
-  "When non-nil, automatic completion will start whenever the current symbol
-is preceded by \".\" or \"->\", ignoring `company-minimum-prefix-length'.
+  "When non-nil, automatic completion will start whenever the current symbol is
+preceded by \".\", \"->\" or \"::\", ignoring `company-minimum-prefix-length'.
 
-If `company-begin-commands' is a list, it should include `c-electric-lt-gt'.")
+If `company-begin-commands' is a list, it should include `c-electric-lt-gt' and
+`c-electric-colon', for automatic completion right after \">\" and \":\".")
 
 (defcustom company-clang-arguments nil
   "Additional arguments to pass to clang when completing.
@@ -213,7 +214,7 @@ Prefix files (-include ...) can be selected with
         (if (and company-clang-begin-after-member-access
                  (save-excursion
                    (forward-char (- (length symbol)))
-                   (looking-back "\\.\\|->" (- (point) 3))))
+                   (looking-back "\\.\\|->\\|::" (- (point) 2))))
             (cons symbol t)
           symbol)
       'stop)))

commit ac6121486845963000096bec0d81b81742f13702
Author: Dmitry Gutov <address@hidden>
Date:   Mon May 6 10:19:39 2013 +0400

    Close #19

diff --git a/NEWS.md b/NEWS.md
index db8cbe0..d8a0c91 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,8 @@
 
 ## Next
 
+* `company-backends`: `prefix` command can return `t` in the cdr.
+* `company-clang-begin-after-member-access`: New option.
 * Mouse click outside the tooltip aborts completion.
 * `company-clang` uses standard input to pass the contents of current buffer to
   Clang 2.9+, otherwise saves the buffer and passes the path to the file.
diff --git a/company-clang.el b/company-clang.el
index 947afe2..6abebe7 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -38,6 +38,12 @@
   "Location of clang executable."
   :type 'file)
 
+(defcustom company-clang-begin-after-member-access t
+  "When non-nil, automatic completion will start whenever the current symbol
+is preceded by \".\" or \"->\", ignoring `company-minimum-prefix-length'.
+
+If `company-begin-commands' is a list, it should include `c-electric-lt-gt'.")
+
 (defcustom company-clang-arguments nil
   "Additional arguments to pass to clang when completing.
 Prefix files (-include ...) can be selected with
@@ -201,6 +207,17 @@ Prefix files (-include ...) can be selected with
          prefix
          (company-clang--build-complete-args (- (point) (length prefix)))))
 
+(defun company-clang--prefix ()
+  (let ((symbol (company-grab-symbol)))
+    (if symbol
+        (if (and company-clang-begin-after-member-access
+                 (save-excursion
+                   (forward-char (- (length symbol)))
+                   (looking-back "\\.\\|->" (- (point) 3))))
+            (cons symbol t)
+          symbol)
+      'stop)))
+
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defconst company-clang-required-version 1.1)
@@ -263,7 +280,7 @@ input."
                  buffer-file-name
                  company-clang-executable
                  (not (company-in-string-or-comment))
-                 (or (company-grab-symbol) 'stop)))
+                 (company-clang--prefix)))
     (candidates (company-clang--candidates arg))
     (meta (gethash arg company-clang--meta-cache))
     (crop (and (string-match ":\\|(" arg)
diff --git a/company.el b/company.el
index 2a9b9db..901aac1 100644
--- a/company.el
+++ b/company.el
@@ -280,13 +280,12 @@ Each back-end is a function that takes a variable number 
of arguments.
 The first argument is the command requested from the back-end.  It is one
 of the following:
 
-`prefix': The back-end should return the text to be completed.  It must be
-text immediately before `point'.  Returning nil passes control to the next
-back-end.  The function should return 'stop if it should complete but cannot
-\(e.g. if it is in the middle of a string\).  If the returned value is only
-part of the prefix (e.g. the part after \"->\" in C), the back-end may return a
-cons of prefix and prefix length, which is then used in the
-`company-minimum-prefix-length' test.
+`prefix': The back-end should return the text to be completed.  It must be text
+immediately before `point'.  Returning nil passes control to the next back-end.
+The function should return 'stop if it should complete but cannot \(e.g. if it
+is in the middle of a string\).  Instead of a string, the back-end may return a
+cons where car is the prefix and cdr is used in `company-minimum-prefix-length'
+test. It's either number or t, in which case the test automatically succeeds.
 
 `candidates': The second argument is the prefix to be completed.  The
 return value should be a list of candidates that start with the prefix.
@@ -951,8 +950,9 @@ can retrieve meta-data for them."
 (defun company--good-prefix-p (prefix)
   (and (or (company-explicit-action-p)
            (unless (eq prefix 'stop)
-             (>= (or (cdr-safe prefix) (length prefix))
-                 company-minimum-prefix-length)))
+             (or (eq (cdr-safe prefix) t)
+                 (>= (or (cdr-safe prefix) (length prefix))
+                     company-minimum-prefix-length))))
        (stringp (or (car-safe prefix) prefix))))
 
 (defun company--continue ()

commit 76d189f52b6965447e6b0451fa62181a980fa6fc
Author: Dmitry Gutov <address@hidden>
Date:   Sat May 4 13:21:19 2013 +0400

    company-select-mouse: work correctly when tooltip is expanded up

diff --git a/company.el b/company.el
index 2734ae7..2a9b9db 100644
--- a/company.el
+++ b/company.el
@@ -1338,8 +1338,11 @@ and invoke the normal binding."
            (evt-row (cdr event-col-row)))
       (and (>= evt-col column)
            (< evt-col (+ column width))
-           (> evt-row ovl-row)
-           (<= evt-row (+ ovl-row height) )))))
+           (if (> height 0)
+               (and (> evt-row ovl-row)
+                    (<= evt-row (+ ovl-row height) ))
+             (and (< evt-row ovl-row)
+                  (>= evt-row (+ ovl-row height))))))))
 
 (defun company-select-mouse (event)
   "Select the candidate picked by the mouse."
@@ -1347,12 +1350,16 @@ and invoke the normal binding."
   (let ((event-col-row (posn-actual-col-row (event-start event)))
         (ovl-row (company--row)))
     (if (company--inside-tooltip-p event-col-row ovl-row)
-        (progn
-          (company-set-selection (- (cdr event-col-row)
+        (let ((ovl-height (overlay-get company-pseudo-tooltip-overlay
+                                       'company-height)))
+          (company-set-selection (+ (cdr event-col-row)
                                     (if (zerop company-tooltip-offset)
-                                        1
-                                      (- 2 company-tooltip-offset))
-                                    ovl-row))
+                                        -1
+                                      (- company-tooltip-offset 2))
+                                    (- ovl-row)
+                                    (if (< ovl-height 0)
+                                        (- 1 ovl-height)
+                                      0)))
           t)
       (company-abort)
       (company--unread-last-input)

commit 61e87e829103cc8356807f3dcd77a5bc1f0e09c9
Author: Dmitry Gutov <address@hidden>
Date:   Sat May 4 12:38:10 2013 +0400

    Fix #20

diff --git a/NEWS.md b/NEWS.md
index 92daabb..db8cbe0 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* Mouse click outside the tooltip aborts completion.
 * `company-clang` uses standard input to pass the contents of current buffer to
   Clang 2.9+, otherwise saves the buffer and passes the path to the file.
 * `company-clang-auto-save` option has been removed.
diff --git a/company.el b/company.el
index 50205a8..2734ae7 100644
--- a/company.el
+++ b/company.el
@@ -1328,16 +1328,35 @@ and invoke the normal binding."
     (company-abort)
     (company--unread-last-input)))
 
+(defun company--inside-tooltip-p (event-col-row ovl-row)
+  (when company-pseudo-tooltip-overlay
+    (let* ((ovl company-pseudo-tooltip-overlay)
+           (column (overlay-get ovl 'company-column))
+           (width (overlay-get ovl 'company-width))
+           (height (overlay-get ovl 'company-height))
+           (evt-col (car event-col-row))
+           (evt-row (cdr event-col-row)))
+      (and (>= evt-col column)
+           (< evt-col (+ column width))
+           (> evt-row ovl-row)
+           (<= evt-row (+ ovl-row height) )))))
+
 (defun company-select-mouse (event)
   "Select the candidate picked by the mouse."
   (interactive "e")
-  (when (nth 4 (event-start event))
-    (company-set-selection (- (cdr (posn-actual-col-row (event-start event)))
-                              (if (zerop company-tooltip-offset)
-                                  1
-                                (- 2 company-tooltip-offset))
-                              (company--row)))
-    t))
+  (let ((event-col-row (posn-actual-col-row (event-start event)))
+        (ovl-row (company--row)))
+    (if (company--inside-tooltip-p event-col-row ovl-row)
+        (progn
+          (company-set-selection (- (cdr event-col-row)
+                                    (if (zerop company-tooltip-offset)
+                                        1
+                                      (- 2 company-tooltip-offset))
+                                    ovl-row))
+          t)
+      (company-abort)
+      (company--unread-last-input)
+      nil)))
 
 (defun company-complete-mouse (event)
   "Complete the candidate picked by the mouse."
@@ -1769,10 +1788,11 @@ Returns a negative number if the tooltip should be 
displayed above point."
 
         (setq company-pseudo-tooltip-overlay ov)
         (overlay-put ov 'company-replacement-args args)
-        (overlay-put ov 'company-before
-                     (apply 'company--replacement-string
-                            (company--create-lines selection (abs height))
-                            args))
+
+        (let ((lines (company--create-lines selection (abs height))))
+          (overlay-put ov 'company-before
+                       (apply 'company--replacement-string lines args))
+          (overlay-put ov 'company-width (string-width (car lines))))
 
         (overlay-put ov 'company-column column)
         (overlay-put ov 'company-height height)))))
@@ -1784,8 +1804,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
                                    company-selection))))
 
 (defun company-pseudo-tooltip-edit (lines selection)
-  (let ((column (overlay-get company-pseudo-tooltip-overlay 'company-column))
-        (height (overlay-get company-pseudo-tooltip-overlay 'company-height)))
+  (let ((height (overlay-get company-pseudo-tooltip-overlay 'company-height)))
     (overlay-put company-pseudo-tooltip-overlay 'company-before
                  (apply 'company--replacement-string
                         (company--create-lines selection (abs height))

commit f5ee458241950b42443415e5bf42eab182b100ce
Author: Dmitry Gutov <address@hidden>
Date:   Sat May 4 10:49:31 2013 +0400

    company-select-mouse: Pick correct item when company-tooltip-offset > 0

diff --git a/company.el b/company.el
index e00ae92..50205a8 100644
--- a/company.el
+++ b/company.el
@@ -1333,8 +1333,10 @@ and invoke the normal binding."
   (interactive "e")
   (when (nth 4 (event-start event))
     (company-set-selection (- (cdr (posn-actual-col-row (event-start event)))
-                              (company--row)
-                              1))
+                              (if (zerop company-tooltip-offset)
+                                  1
+                                (- 2 company-tooltip-offset))
+                              (company--row)))
     t))
 
 (defun company-complete-mouse (event)

commit 0b019b223ccd5cae67211ae8498091f186148477
Author: Constantin <address@hidden>
Date:   Fri Apr 26 23:00:29 2013 +0400

    company-clang: with 2.9+, use stdin
    
    Fall back to saving the buffer in earlier versions automatically.
    Remove the option `company-clang-auto-save'.
    
    Close #18.

diff --git a/NEWS.md b/NEWS.md
index a660d9a..92daabb 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,9 @@
 
 ## Next
 
+* `company-clang` uses standard input to pass the contents of current buffer to
+  Clang 2.9+, otherwise saves the buffer and passes the path to the file.
+* `company-clang-auto-save` option has been removed.
 * Better interaction with `outline-minor-mode`.
 * `company-dabbrev-code` supports all `prog-mode` derivatives.
 
diff --git a/company-clang.el b/company-clang.el
index 954b9be..947afe2 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -38,12 +38,6 @@
   "Location of clang executable."
   :type 'file)
 
-(defcustom company-clang-auto-save t
-  "Determines whether to save the buffer when retrieving completions.
-clang can only complete correctly when the buffer has been saved."
-  :type '(choice (const :tag "Off" nil)
-                 (const :tag "On" t)))
-
 (defcustom company-clang-arguments nil
   "Additional arguments to pass to clang when completing.
 Prefix files (-include ...) can be selected with
@@ -109,6 +103,12 @@ Prefix files (-include ...) can be selected with
 
 (defvar company-clang--meta-cache nil)
 
+(defun company-clang--lang-option ()
+     (if (eq major-mode 'objc-mode)
+         (if (string= "m" (file-name-extension buffer-file-name))
+             "objective-c" "objective-c++")
+       (substring (symbol-name major-mode) 0 -5)))
+
 (defun company-clang--parse-output (prefix objc)
   (goto-char (point-min))
   (let ((pattern (format company-clang--completion-pattern
@@ -142,7 +142,7 @@ Prefix files (-include ...) can be selected with
          (err (if (re-search-forward pattern nil t)
                   (buffer-substring-no-properties (point-min)
                                                   (1- (match-beginning 0)))
-                ;; Warn the user more agressively if no match was found.
+                ;; Warn the user more aggressively if no match was found.
                 (message "clang failed with error %d:\n%s" res cmd)
                 (buffer-string))))
 
@@ -157,31 +157,41 @@ Prefix files (-include ...) can be selected with
         (goto-char (point-min))))))
 
 (defun company-clang--call-process (prefix &rest args)
-  (let ((objc (derived-mode-p 'objc-mode)))
-    (with-temp-buffer
-      (let ((res (apply 'call-process company-clang-executable nil t nil 
args)))
-        (unless (eq 0 res)
-          (company-clang--handle-error res args))
-        ;; Still try to get any useful input.
-        (company-clang--parse-output prefix objc)))))
+  (let ((objc (derived-mode-p 'objc-mode))
+        (buf (get-buffer-create "*clang-output*"))
+        res)
+    (with-current-buffer buf (erase-buffer))
+    (setq res (if (company-clang--auto-save-p)
+                  (apply 'call-process company-clang-executable nil buf nil 
args)
+                (apply 'call-process-region (point-min) (point-max)
+                       company-clang-executable nil buf nil args)))
+    (with-current-buffer buf
+      (unless (eq 0 res)
+        (company-clang--handle-error res args))
+      ;; Still try to get any useful input.
+      (company-clang--parse-output prefix objc))))
 
 (defsubst company-clang--build-location (pos)
   (save-excursion
     (goto-char pos)
-    (format "%s:%d:%d" buffer-file-name (line-number-at-pos)
+    (format "%s:%d:%d"
+            (if (company-clang--auto-save-p) buffer-file-name "-")
+            (line-number-at-pos)
             (1+ (current-column)))))
 
 (defsubst company-clang--build-complete-args (pos)
   (append '("-cc1" "-fsyntax-only" "-code-completion-macros")
+          (unless (company-clang--auto-save-p)
+            (list "-x" (company-clang--lang-option)))
           company-clang-arguments
           (when (stringp company-clang--prefix)
             (list "-include" (expand-file-name company-clang--prefix)))
           '("-code-completion-at")
           (list (company-clang--build-location pos))
-          (list buffer-file-name)))
+          (list (if (company-clang--auto-save-p) buffer-file-name "-"))))
 
 (defun company-clang--candidates (prefix)
-  (and company-clang-auto-save
+  (and (company-clang--auto-save-p)
        (buffer-modified-p)
        (basic-save-buffer))
   (when (null company-clang--prefix)
@@ -195,6 +205,11 @@ Prefix files (-include ...) can be selected with
 
 (defconst company-clang-required-version 1.1)
 
+(defvar company-clang--version nil)
+
+(defun company-clang--auto-save-p ()
+  (< company-clang--version 2.9))
+
 (defsubst company-clang-version ()
   "Return the version of `company-clang-executable'."
   (with-temp-buffer
@@ -232,15 +247,17 @@ Additional command line arguments can be specified in
 with `company-clang-set-prefix' or automatically through a custom
 `company-clang-prefix-guesser'.
 
-Completions only work correctly when the buffer has been saved.
-`company-clang-auto-save' determines whether to do this automatically."
+With Clang versions before 2.9, we have to save the buffer before performing
+completion.  With Clang 2.9 and later, buffer contents are passed via stardard
+input."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-clang))
     (init (when (memq major-mode company-clang-modes)
             (unless company-clang-executable
               (error "Company found no clang executable"))
-            (when (< (company-clang-version) company-clang-required-version)
+            (setq company-clang--version (company-clang-version))
+            (when (< company-clang--version company-clang-required-version)
               (error "Company requires clang version 1.1"))))
     (prefix (and (memq major-mode company-clang-modes)
                  buffer-file-name

commit 1c8600b4ccc326ea8046e22baff403d7918b14d7
Merge: eda0852 baa85ed
Author: Dmitry Gutov <address@hidden>
Date:   Fri May 3 00:04:33 2013 -0700

    Merge pull request #103 from johan/interpreter-mode-alist
    
    Also aid  "#! /usr/bin/env node" type auto major mode selection


commit baa85ed19e057e78d24f001f9331d31575c8c688
Author: Johan Sundström <address@hidden>
Date:   Thu May 2 23:59:27 2013 -0700

    Also aid "#! /usr/bin/env node" type auto major mode selection

diff --git a/js2-mode.el b/js2-mode.el
index afd1981..b489458 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -56,6 +56,10 @@
 
 ;;   (add-hook 'js-mode-hook 'js2-minor-mode)
 
+;; You may also want to hook it in for shell scripts running via node.js:
+
+;;   (add-to-list 'interpreter-mode-alist '("node" . js2-mode))
+
 ;; To customize how it works:
 ;;   M-x customize-group RET js2-mode RET
 

commit eda08529b0f8cecb84c57ced2e0776524c830a8b
Merge: 5c3f8ac 073e167
Author: Dmitry Gutov <address@hidden>
Date:   Tue Apr 30 21:47:28 2013 -0700

    Merge pull request #101 from pd/node-typed-arrays
    
    Add typed array externs


commit 073e167270d6a968fef45c1f0d20aeedc062fa52
Author: Kyle Hargraves <address@hidden>
Date:   Tue Apr 30 20:37:59 2013 -0700

    Add js2-typed-array-externs, js2-set-default-externs

diff --git a/js2-mode.el b/js2-mode.el
index 7ac3105..afd1981 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -167,11 +167,6 @@
             ;; W3C XML
             XPathResult XMLHttpRequest
 
-            ;; Khronos Typed Array Specification
-            ArrayBuffer Uint8ClampedArray DataView
-            Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array
-            Float32Array Float64Array
-
             ;; console object.  Provided by at least Chrome and Firefox.
             console))
   "Browser externs.
@@ -191,14 +186,18 @@ Set `js2-include-rhino-externs' to t to include them.")
 (defvar js2-node-externs
   (mapcar 'symbol-name
           '(__dirname __filename Buffer clearInterval clearTimeout require
-            console exports global module process setInterval setTimeout
+            console exports global module process setInterval setTimeout))
+  "Node.js externs.
+Set `js2-include-node-externs' to t to include them.")
 
-            ;; node.js also supports Typed Arrays
-            ArrayBuffer Uint8ClampedArray DataView
+(defvar js2-typed-array-externs
+  (mapcar 'symbol-name
+          '(ArrayBuffer Uint8ClampedArray DataView
             Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array
             Float32Array Float64Array))
-  "Node.js externs.
-Set `js2-include-node-externs' to t to include them.")
+  "Khronos typed array externs. Available in most modern browsers and
+in node.js >= 0.6. If `js2-include-node-externs' or 
`js2-include-browser-externs'
+are enabled, these will also be included.")
 
 ;;; Variables
 
@@ -6415,6 +6414,17 @@ it is considered declared."
                               'js2-external-variable))))
     (setq js2-recorded-identifiers nil)))
 
+(defun js2-set-default-externs ()
+  "Set the value of `js2-default-externs' based on the various
+`js2-include-?-externs' variables."
+  (setq js2-default-externs
+        (append js2-ecma-262-externs
+                (if js2-include-browser-externs js2-browser-externs)
+                (if js2-include-rhino-externs js2-rhino-externs)
+                (if js2-include-node-externs js2-node-externs)
+                (if (or js2-include-browser-externs js2-include-node-externs)
+                    js2-typed-array-externs))))
+
 ;;; IMenu support
 
 ;; We currently only support imenu, but eventually should support speedbar and
@@ -10055,11 +10065,7 @@ highlighting features of `js2-mode'."
   (set (make-local-variable 'max-lisp-eval-depth)
        (max max-lisp-eval-depth 3000))
   (setq next-error-function #'js2-next-error)
-  (setq js2-default-externs
-        (append js2-ecma-262-externs
-                (if js2-include-browser-externs js2-browser-externs)
-                (if js2-include-rhino-externs js2-rhino-externs)
-                (if js2-include-node-externs js2-node-externs)))
+  (js2-set-default-externs)
   ;; Experiment:  make reparse-delay longer for longer files.
   (if (plusp js2-dynamic-idle-timer-adjust)
       (setq js2-idle-timer-delay
@@ -10240,12 +10246,6 @@ Selecting an error will jump it to the corresponding 
source-buffer error.
     (make-local-variable 'adaptive-fill-regexp)
     (c-setup-paragraph-variables))
 
-  (setq js2-default-externs
-        (append js2-ecma-262-externs
-                (if js2-include-browser-externs js2-browser-externs)
-                (if js2-include-rhino-externs js2-rhino-externs)
-                (if js2-include-node-externs js2-node-externs)))
-
   (setq font-lock-defaults '(nil t))
 
   ;; Experiment:  make reparse-delay longer for longer files.
@@ -10267,6 +10267,7 @@ Selecting an error will jump it to the corresponding 
source-buffer error.
         js2-mode-comments-hidden nil
         js2-mode-buffer-dirty-p t
         js2-mode-parsing nil)
+  (js2-set-default-externs)
   (js2-reparse))
 
 (defun js2-mode-exit ()

commit ed098081e740a9db75af3ea8f77edc3191de3d58
Author: Kyle Hargraves <address@hidden>
Date:   Tue Apr 30 14:33:28 2013 -0700

    Add typed array types to js2-node-externs
    
    node.js has supported typed arrays since 0.6:
    
    https://github.com/joyent/node/wiki/API-changes-between-v0.4-and-v0.6
    https://github.com/joyent/node/issues/1322
    https://github.com/joyent/node/commit/97b0000

diff --git a/js2-mode.el b/js2-mode.el
index 06824bd..7ac3105 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -191,7 +191,12 @@ Set `js2-include-rhino-externs' to t to include them.")
 (defvar js2-node-externs
   (mapcar 'symbol-name
           '(__dirname __filename Buffer clearInterval clearTimeout require
-            console exports global module process setInterval setTimeout))
+            console exports global module process setInterval setTimeout
+
+            ;; node.js also supports Typed Arrays
+            ArrayBuffer Uint8ClampedArray DataView
+            Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array
+            Float32Array Float64Array))
   "Node.js externs.
 Set `js2-include-node-externs' to t to include them.")
 

commit 947aebba714790a8d5be48987f32af1a1def2bbe
Author: Dmitry Gutov <address@hidden>
Date:   Fri Apr 26 12:41:02 2013 +0400

    * company-buffer-lines: Get rid of `done'
    
    When there's no trailing newline, `vertical-motion' moves to eol anyway.
    So it's all fine, as long as END <= (point-max).

diff --git a/company.el b/company.el
index 4b5dbcc..e00ae92 100644
--- a/company.el
+++ b/company.el
@@ -1621,15 +1621,14 @@ Example:
 
 (defun company-buffer-lines (beg end)
   (goto-char beg)
-  (let (lines done)
-    (while (and (< (point) end) (not done))
+  (let (lines)
+    (while (< (point) end)
       (let ((bol (point)))
         ;; A visual line can contain several physical lines (e.g. with 
outline's
         ;; folding overlay).  Take only the first one.
         (re-search-forward "$")
         (push (buffer-substring bol (min end (point))) lines))
-      (unless (= 1 (vertical-motion 1))
-        (setq done t)))
+      (vertical-motion 1))
     (nreverse lines)))
 
 (defsubst company-modify-line (old new offset)

commit a696ca3aef5df9260ee2564b0c0b77d5b5c3a8a5
Author: Dmitry Gutov <address@hidden>
Date:   Fri Apr 26 12:25:48 2013 +0400

    Fix #16

diff --git a/NEWS.md b/NEWS.md
index 31c50b4..a660d9a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* Better interaction with `outline-minor-mode`.
 * `company-dabbrev-code` supports all `prog-mode` derivatives.
 
 ## 2013-04-16 (0.6.8)
diff --git a/company.el b/company.el
index 7f30932..4b5dbcc 100644
--- a/company.el
+++ b/company.el
@@ -1621,13 +1621,15 @@ Example:
 
 (defun company-buffer-lines (beg end)
   (goto-char beg)
-  (let (lines)
-    (while (and (= 1 (vertical-motion 1))
-                (<= (point) end))
-      (push (buffer-substring beg (min end (1- (point)))) lines)
-      (setq beg (point)))
-    (unless (eq beg end)
-      (push (buffer-substring beg end) lines))
+  (let (lines done)
+    (while (and (< (point) end) (not done))
+      (let ((bol (point)))
+        ;; A visual line can contain several physical lines (e.g. with 
outline's
+        ;; folding overlay).  Take only the first one.
+        (re-search-forward "$")
+        (push (buffer-substring bol (min end (point))) lines))
+      (unless (= 1 (vertical-motion 1))
+        (setq done t)))
     (nreverse lines)))
 
 (defsubst company-modify-line (old new offset)
@@ -1802,6 +1804,8 @@ Returns a negative number if the tooltip should be 
displayed above point."
 (defun company-pseudo-tooltip-unhide ()
   (when company-pseudo-tooltip-overlay
     (overlay-put company-pseudo-tooltip-overlay 'invisible t)
+    ;; Beat outline's folding overlays, at least.
+    (overlay-put company-pseudo-tooltip-overlay 'priority 1)
     (overlay-put company-pseudo-tooltip-overlay 'before-string
                  (overlay-get company-pseudo-tooltip-overlay 'company-before))
     (overlay-put company-pseudo-tooltip-overlay 'window (selected-window))))

commit 0fd01279dff979f8831764d96dd7d9a1f046bf29
Author: Dmitry Gutov <address@hidden>
Date:   Fri Apr 26 09:31:04 2013 +0400

    * company-dabbrev-code-modes: Remove espresso-mode, add prog-mode

diff --git a/NEWS.md b/NEWS.md
index 8718d4b..31c50b4 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,9 @@
 # History of user-visible changes
 
+## Next
+
+* `company-dabbrev-code` supports all `prog-mode` derivatives.
+
 ## 2013-04-16 (0.6.8)
 
 * `company-auto-complete` is disabled by default.
diff --git a/company-dabbrev-code.el b/company-dabbrev-code.el
index 2b13237..e4c548e 100644
--- a/company-dabbrev-code.el
+++ b/company-dabbrev-code.el
@@ -35,10 +35,9 @@
 
 (defcustom company-dabbrev-code-modes
   '(asm-mode batch-file-mode c++-mode c-mode cperl-mode csharp-mode css-mode
-    emacs-lisp-mode erlang-mode espresso-mode f90-mode fortran-mode
-    haskell-mode java-mode javascript-mode jde-mode js2-mode lisp-mode
-    lua-mode objc-mode perl-mode php-mode python-mode ruby-mode scheme-mode
-    shell-script-mode)
+    emacs-lisp-mode erlang-mode f90-mode fortran-mode haskell-mode java-mode
+    javascript-mode jde-mode js2-mode lisp-mode lua-mode objc-mode perl-mode
+    php-mode prog-mode python-mode ruby-mode scheme-mode shell-script-mode)
   "Modes that use `company-dabbrev-code'.
 In all these modes `company-dabbrev-code' will complete only symbols, not text
 in comments or strings.  In other modes `company-dabbrev-code' will pass 
control

commit 1d919104f29f8a5dd9f9f5e09b6c4d168a43e3b5
Author: Thierry Volpiatto <address@hidden>
Date:   Sun Apr 21 07:57:29 2013 +0200

    * eldoc-eval.el (eldoc-mode-in-minibuffer): Get rid of 
`minibuffer-completion-contents'.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index b5e377f..2879caf 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -72,13 +72,6 @@ Should take one arg: the string to display"
          (not cursor-in-echo-area)
          (not (eq (selected-window) (minibuffer-window))))))
 
-;; Emacs-24.4 make `minibuffer-completion-contents' obsolete,
-;; inline it to shutup byte compiler.
-(defun eldoc-eval-minibuffer-completion-contents ()
-  "Return the user input in a minibuffer before point as a string.
-That is what completion commands operate on."
-  (buffer-substring (field-beginning) (point)))
-
 ;; Internal.
 (defvar eldoc-active-minibuffers-list nil
   "Store actives minibuffers with eldoc enabled.")
@@ -159,14 +152,10 @@ See `with-eldoc-in-minibuffer'."
     (condition-case err
         (when (member buf eldoc-active-minibuffers-list)
           (with-current-buffer buf
-            (let* ((str-all (eldoc-eval-minibuffer-completion-contents))
-                   (sym     (when str-all
-                              (with-temp-buffer
-                                (insert str-all)
-                                (goto-char (point-max))
-                                (unless (looking-back ")\\|\"")
-                                  (forward-char -1))
-                                (eldoc-current-symbol))))
+            (let* ((sym (save-excursion
+                          (unless (looking-back ")\\|\"")
+                            (forward-char -1))
+                          (eldoc-current-symbol)))
                    (info-fn (eldoc-fnsym-in-current-sexp))
                    (doc     (or (eldoc-get-var-docstring sym)
                                 (eldoc-get-fnsym-args-string

commit 4c4829d664ab875f7cd63061b22b68d58846e19d
Author: Leo Liu <address@hidden>
Date:   Sat Apr 20 20:22:26 2013 +0800

    Doc fix and support the silver search

diff --git a/README.rst b/README.rst
index 36c5fac..9d4e14f 100644
--- a/README.rst
+++ b/README.rst
@@ -1,11 +1,12 @@
-=======================================================
- Emacs Interface to `Ack <http://betterthangrep.com>`_
-=======================================================
+==============================================================
+ Emacs Interface to `Ack <http://beyondgrep.com>`_-like Tools
+==============================================================
  
-This package brings the full power of `ack
-<http://betterthangrep.com>`_ to `emacs
-<http://www.gnu.org/software/emacs>`_ by allowing you to run it
-seamlessly with its large set of options.
+This package brings the full power of `ack <http://beyondgrep.com>`_
+to `emacs <http://www.gnu.org/software/emacs>`_ by allowing you to run
+it seamlessly with its large set of options. Ack-like tools such as
+`the silver searcher <https://github.com/ggreer/the_silver_searcher>`_
+and ``git/hg/bzr grep`` are well supported too.
 
 It is part of `GNU ELPA <http://elpa.gnu.org>`_ - the official package
 archive for `emacs <http://www.gnu.org/software/emacs>`_. Patches,
@@ -14,9 +15,11 @@ feature requests and bug reports are welcome.
 Features
 --------
 
-- Keep all features of `ack <http://betterthangrep.com>`_ and more
+- Keep all features of `ack <http://beyondgrep.com>`_ and more
 - Handle colors using the standard library ``ansi-color.el``
 - Completion for ack options while reading from the minibuffer
+- Support `the silver search (ag)
+  <https://github.com/ggreer/the_silver_searcher>`_
 - Support ``git grep``, ``hg grep`` and ``bzr grep``
 
 Install
diff --git a/ack.el b/ack.el
index f7d8fa2..01529d7 100644
--- a/ack.el
+++ b/ack.el
@@ -1,9 +1,9 @@
-;;; ack.el --- interface to ack            -*- lexical-binding: t; -*-
+;;; ack.el --- interface to ack-like tools   -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 1.0
+;; Version: 1.01
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
 ;; URL: https://github.com/leoliu/ack-el
@@ -23,11 +23,14 @@
 
 ;;; Commentary:
 
-;; This package provides an interface to ack http://betterthangrep.com
-;; -- a tool like grep, designed for programmers with large trees of
+;; This package provides an interface to ack http://beyondgrep.com --
+;; a tool like grep, designed for programmers with large trees of
 ;; heterogeneous source code. It builds on standard packages
-;; `compile.el' and `ansi-color.el' and let you seamlessly run `ack'
+;; `compile.el' and `ansi-color.el' and lets you seamlessly run `ack'
 ;; with its large set of options.
+;;
+;; Ack-like tools such as the silver search (ag) and git/hg/bzr grep
+;; are well supported too.
 
 ;;; Usage:
 
@@ -75,13 +78,15 @@
   ;; Note: on GNU/Linux ack may be renamed to ack-grep
   (concat (file-name-nondirectory (or (executable-find "ack-grep")
                                       (executable-find "ack")
+                                      (executable-find "ag")
                                       "ack")) " ")
-  "The default ack command for \\[ack].
+  "The default command for \\[ack].
 
 Note also options to ack can be specified in ACK_OPTIONS
-environment variable and ~/.ackrc, which you can disable by the
+environment variable and .ackrc, which you can disable by the
 --noenv switch."
   :type 'string
+  :safe 'stringp
   :group 'ack)
 
 (defcustom ack-buffer-name-function nil
@@ -260,7 +265,9 @@ This gets tacked on the end of the generated expressions.")
   (interactive)
   (delete-minibuffer-contents)
   (let ((ack (or (car (split-string ack-command nil t)) "ack")))
-    (skeleton-insert `(nil ,ack " -g '(?i:" _ ")'"))))
+    (if (equal ack "ag")
+        (skeleton-insert `(nil ,ack " -ig '" _ "'"))
+      (skeleton-insert `(nil ,ack " -g '(?i:" _ ")'")))))
 
 ;; Work around bug http://debbugs.gnu.org/13811
 (defvar ack--project-root nil)          ; dynamically bound in `ack'
diff --git a/pcmpl-ack.el b/pcmpl-ack.el
index 3584e83..3029367 100644
--- a/pcmpl-ack.el
+++ b/pcmpl-ack.el
@@ -23,7 +23,7 @@
 ;;; Commentary:
 
 ;; Provide pcompletion support for the cli tool `ack' which can be
-;; downloaded from http://betterthangrep.com.
+;; downloaded from http://beyondgrep.com.
 ;;
 ;; Install:
 ;;   (autoload 'pcomplete/ack "pcmpl-ack")

commit 0a642d5d31a8e0e22a4b2b2a48dafd6393b81aa9
Author: Thierry Volpiatto <address@hidden>
Date:   Sat Apr 20 09:39:08 2013 +0200

    * eldoc-eval.el (eldoc-eval-minibuffer-completion-contents): like 
`minibuffer-completion-contents' to shutup byte compiler.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index 419ae5a..b5e377f 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -72,6 +72,13 @@ Should take one arg: the string to display"
          (not cursor-in-echo-area)
          (not (eq (selected-window) (minibuffer-window))))))
 
+;; Emacs-24.4 make `minibuffer-completion-contents' obsolete,
+;; inline it to shutup byte compiler.
+(defun eldoc-eval-minibuffer-completion-contents ()
+  "Return the user input in a minibuffer before point as a string.
+That is what completion commands operate on."
+  (buffer-substring (field-beginning) (point)))
+
 ;; Internal.
 (defvar eldoc-active-minibuffers-list nil
   "Store actives minibuffers with eldoc enabled.")
@@ -152,7 +159,7 @@ See `with-eldoc-in-minibuffer'."
     (condition-case err
         (when (member buf eldoc-active-minibuffers-list)
           (with-current-buffer buf
-            (let* ((str-all (minibuffer-completion-contents))
+            (let* ((str-all (eldoc-eval-minibuffer-completion-contents))
                    (sym     (when str-all
                               (with-temp-buffer
                                 (insert str-all)

commit 6f34d76541a64d51ae40ef0f5864072c7e677511
Merge: ffdfdad 8563865
Author: Thierry Volpiatto <address@hidden>
Date:   Sat Apr 20 09:15:48 2013 +0200

    Merge branch 'master' of github.com:thierryvolpiatto/eldoc-eval


commit ffdfdad41eb066a3e967efb25f05e4cb776a20bf
Author: Thierry Volpiatto <address@hidden>
Date:   Sat Apr 20 09:14:33 2013 +0200

    * eldoc-eval.el (eval-prefered-function): Renamed with eldoc prefix.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index dbc142e..87870c0 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -45,7 +45,7 @@ Should take one arg: the string to display"
   :group 'eldoc
   :type 'number)
 
-(defcustom eval-prefered-function 'pp-eval-expression
+(defcustom eldoc-eval-prefered-function 'pp-eval-expression
   "Prefered function to use with `M-:'."
   :group 'lisp
   :type 'function)
@@ -173,7 +173,7 @@ See `with-eldoc-in-minibuffer'."
   "Eval expression with eldoc support in mode-line."
   (interactive)
   (with-eldoc-in-minibuffer
-    (call-interactively eval-prefered-function)))
+    (call-interactively eldoc-eval-prefered-function)))
 
 ;; Bind it to `M-:'.
 (global-set-key [remap eval-expression] 'eval-expression-with-eldoc)

commit 7c61476f696330e560d5d868fe8f779cd36b113c
Author: Leo Liu <address@hidden>
Date:   Sat Apr 20 11:36:07 2013 +0800

    Doc fix and release 1.0

diff --git a/README.rst b/README.rst
index f6910f9..36c5fac 100644
--- a/README.rst
+++ b/README.rst
@@ -1,75 +1,43 @@
-==========================================
- Emacs Interface to command-line tool ack
-==========================================
-
-From http://betterthangrep.com/
-
-    ack is a tool like grep, designed for programmers with large trees
-    of heterogeneous source code.
-
-    ack is written purely in Perl, and takes advantage of the power of
-    Perl's regular expressions.
-
-This package is part of `GNU ELPA <http://elpa.gnu.org>`_.
-
-Patches, feature requests and bug reports are welcome. Thanks.
+=======================================================
+ Emacs Interface to `Ack <http://betterthangrep.com>`_
+=======================================================
+ 
+This package brings the full power of `ack
+<http://betterthangrep.com>`_ to `emacs
+<http://www.gnu.org/software/emacs>`_ by allowing you to run it
+seamlessly with its large set of options.
+
+It is part of `GNU ELPA <http://elpa.gnu.org>`_ - the official package
+archive for `emacs <http://www.gnu.org/software/emacs>`_. Patches,
+feature requests and bug reports are welcome.
 
 Features
 --------
 
-- Neither ``--nogroup`` nor ``--noheading`` is required
+- Keep all features of `ack <http://betterthangrep.com>`_ and more
 - Handle colors using the standard library ``ansi-color.el``
 - Completion for ack options while reading from the minibuffer
 - Support ``git grep``, ``hg grep`` and ``bzr grep``
 
-Screenshots
------------
-
-.. figure:: http://i.imgur.com/mrk8k.png
-   :width: 400 px
-   :target: http://i.imgur.com/mrk8k.png
-   :alt: ack-git-grep.png
-
-   ``git --no-pager grep -n --color 'hg grep'``
-
-.. figure:: http://i.imgur.com/a72Ap.png
-   :width: 400 px
-   :target: http://i.imgur.com/a72Ap.png
-   :alt: ack-emacs23-1.png
-
-   ``ack --column 'ack is.*tool'``
-
-.. figure:: http://i.imgur.com/U2vFz.png
-   :width: 400 px
-   :target: http://i.imgur.com/U2vFz.png
-   :alt: ack-emacs23-2.png
-
-   ``ack --column --nogroup --nocolor 'ack is.*tool'``
-
 Install
 -------
 
-Place ``ack.el`` in the ``load-path`` and add to your init file::
-
-  (require 'ack)
+``M-x package-install RET ack RET``
 
-or::
-
- (autoload 'ack "ack" nil t)
-
-Completion (optional)
-~~~~~~~~~~~~~~~~~~~~~
+Screenshots
+-----------
 
-UPDATE: ``pcmpl-ack.el`` is merged into emacs trunk and should appear
-in emacs 24.4.
+* ack
 
-Place ``pcmpl-ack.el`` in the ``load-path`` and add::
+.. figure:: http://i.imgur.com/VwWyzAe.png
+   :target: http://i.imgur.com/VwWyzAe.png
+   :alt: ack.png
 
-  (autoload 'pcomplete/ack "pcmpl-ack")
-  (autoload 'pcomplete/ack-grep "pcmpl-ack")
+* git grep
 
-to your init file. After this you will be able complete ``ack``
-options while ``M-x ack`` or in shell/eshell.
+.. figure:: http://i.imgur.com/rwjC4pa.png
+   :target: http://i.imgur.com/rwjC4pa.png
+   :alt: ack-git-grep.png
 
 Usage
 -----
diff --git a/ack.el b/ack.el
index 12b8815..f7d8fa2 100644
--- a/ack.el
+++ b/ack.el
@@ -1,9 +1,9 @@
-;;; ack.el --- Emacs interface to ack           -*- lexical-binding: t; -*-
+;;; ack.el --- interface to ack            -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2012, 2013  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.9
+;; Version: 1.0
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
 ;; URL: https://github.com/leoliu/ack-el
@@ -23,8 +23,31 @@
 
 ;;; Commentary:
 
-;; ack is a tool like grep, designed for programmers with large trees
-;; of heterogeneous source code - http://betterthangrep.com/.
+;; This package provides an interface to ack http://betterthangrep.com
+;; -- a tool like grep, designed for programmers with large trees of
+;; heterogeneous source code. It builds on standard packages
+;; `compile.el' and `ansi-color.el' and let you seamlessly run `ack'
+;; with its large set of options.
+
+;;; Usage:
+
+;; +  Type `M-x ack' and provide a pattern to search.
+;; +  Type `C-u M-x ack' to search from current project root.
+;; +  Type `C-u C-u M-x ack' to interactively choose a directory to
+;;    search.
+;;
+;; Note: use `ack-default-directory-function' for customised
+;; behaviour.
+;;
+;; When in the minibuffer the following key bindings may be useful:
+;;
+;; +  `M-I' inserts a template for case-insensitive file name search
+;; +  `M-G' inserts a template for `git grep', `hg grep' or `bzr grep'
+;; +  `M-Y' inserts the symbol at point from the window before entering
+;;    the minibuffer
+;; +  `TAB' completes ack options
+
+;;; Bugs: https://github.com/leoliu/ack-el/issues
 
 ;;; Code:
 
diff --git a/pcmpl-ack.el b/pcmpl-ack.el
index 942a552..3584e83 100644
--- a/pcmpl-ack.el
+++ b/pcmpl-ack.el
@@ -1,6 +1,6 @@
-;;; pcmpl-ack.el --- completion for ack tool    -*- lexical-binding: t; -*-
+;;; pcmpl-ack.el --- completion for ack    -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2012, 2013  Free Software Foundation, Inc.
+;; Copyright (C) 2012-2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
 ;; Keywords: tools, processes, convenience

commit 152bc897170749a4fb24ab0f0a0d32dd5523e4f9
Author: Dmitry Gutov <address@hidden>
Date:   Fri Apr 19 05:03:44 2013 +0400

    Track with githalytics

diff --git a/README.md b/README.md
index db5f6b6..5501ec2 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,2 @@
 See the [homepage](http://company-mode.github.com/).
+[![githalytics.com 
alpha](https://cruel-carlota.pagodabox.com/336ef4be2595a7859d52e2c17b7da2b2 
"githalytics.com")](http://githalytics.com/company-mode/company-mode)

commit 92ac3d0ef663bca26abbda33cc20a02a58b1c328
Author: Dmitry Gutov <address@hidden>
Date:   Tue Apr 16 15:36:19 2013 +0400

    Release 0.6.8

diff --git a/NEWS.md b/NEWS.md
index 91064a4..8718d4b 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,6 +1,6 @@
 # History of user-visible changes
 
-## Next
+## 2013-04-16 (0.6.8)
 
 * `company-auto-complete` is disabled by default.
 * `company-auto-complete-chars` default value includes fewer syntax classes.
@@ -9,7 +9,7 @@
 * `company-clang` expands function calls for all three modes now.
 * `company-clang` supports `c++-mode` by default.
 
-## 2013-04-01 (0.6.7)
+## 2013-04-05 (0.6.7)
 
 * Two `company-elisp` tweaks.
 
diff --git a/company.el b/company.el
index 9f13518..7f30932 100644
--- a/company.el
+++ b/company.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6.7
+;; Version: 0.6.8
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x

commit 40752cef83b8b7fbc8d662bd4fcf532b2250b2aa
Author: Dmitry Gutov <address@hidden>
Date:   Tue Apr 16 15:31:20 2013 +0400

    Revert "company--multi-backend-adapter: Use each respective backend's 
prefix"
    
    This reverts commit a982f0fe043c31aca1a11a663c41c33b76ef0c19.
    
    Maybe re-apply later; will have to save the correspondence between 
candidates
    and backends, e.g. for company-strip-prefix.

diff --git a/NEWS.md b/NEWS.md
index b63d5ed..91064a4 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,9 +2,6 @@
 
 ## Next
 
-* Candidates from grouped back-ends are retrieved more accurately: each
-  `candidates` command receives in the second argument the respective value the
-  back-end returned to the `prefix` command.
 * `company-auto-complete` is disabled by default.
 * `company-auto-complete-chars` default value includes fewer syntax classes.
 * In expanded function calls, arguments skipped by the user default to "argN".
diff --git a/company-tests.el b/company-tests.el
index 657486b..309d8f1 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -159,25 +159,6 @@
       (should (null company-candidates))
       (should (null (company-explicit-action-p))))))
 
-(ert-deftest company-multi-backend-adapter-uses-respective-prefixes ()
-  ;; And ignores the second argument.
-  (let ((company-backend
-         (list (lambda (command &optional arg)
-                 (case command
-                   (prefix "bar")
-                   (candidates (mapcar (lambda (tail) (concat arg "-" tail))
-                                       '("a" "b" "c")))))
-               (lambda (command &optional arg)
-                 (case command
-                   (prefix "foo-bar")
-                   (candidates (mapcar (lambda (tail) (concat arg "-" tail))
-                                       '("d" "e"))))))))
-    (should (equal (sort '("bar-a" "bar-b" "bar-c" "foo-bar-d" "foo-bar-e")
-                         'string<)
-                   (company-call-backend 'candidates "hubba-hubba")))))
-
-;; Pseudo-Tooltip
-
 (ert-deftest company-pseudo-tooltip-does-not-get-displaced ()
   (with-temp-buffer
     (save-window-excursion
diff --git a/company.el b/company.el
index 3fa8353..9f13518 100644
--- a/company.el
+++ b/company.el
@@ -658,9 +658,9 @@ keymap during active completions (`company-active-map'):
     (case command
       (candidates
        (loop for backend in backends
-             for prefix = (funcall backend 'prefix)
-             when prefix
-             append (funcall backend 'candidates prefix)))
+             when (equal (funcall backend 'prefix)
+                         (car args))
+             append (apply backend 'candidates args)))
       (sorted nil)
       (duplicates t)
       (otherwise

commit caa962bb9d4ce1760170fd3da1d4cdf653060204
Author: Leo Liu <address@hidden>
Date:   Tue Apr 16 14:31:33 2013 +0800

    Notice: pcmpl-ack.el merged into emacs trunk

diff --git a/README.rst b/README.rst
index df1e75a..f6910f9 100644
--- a/README.rst
+++ b/README.rst
@@ -60,6 +60,9 @@ or::
 Completion (optional)
 ~~~~~~~~~~~~~~~~~~~~~
 
+UPDATE: ``pcmpl-ack.el`` is merged into emacs trunk and should appear
+in emacs 24.4.
+
 Place ``pcmpl-ack.el`` in the ``load-path`` and add::
 
   (autoload 'pcomplete/ack "pcmpl-ack")

commit a982f0fe043c31aca1a11a663c41c33b76ef0c19
Author: Dmitry Gutov <address@hidden>
Date:   Tue Apr 16 06:24:53 2013 +0400

    company--multi-backend-adapter: Use each respective backend's prefix

diff --git a/NEWS.md b/NEWS.md
index 91064a4..b63d5ed 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,9 @@
 
 ## Next
 
+* Candidates from grouped back-ends are retrieved more accurately: each
+  `candidates` command receives in the second argument the respective value the
+  back-end returned to the `prefix` command.
 * `company-auto-complete` is disabled by default.
 * `company-auto-complete-chars` default value includes fewer syntax classes.
 * In expanded function calls, arguments skipped by the user default to "argN".
diff --git a/company-tests.el b/company-tests.el
index 309d8f1..657486b 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -159,6 +159,25 @@
       (should (null company-candidates))
       (should (null (company-explicit-action-p))))))
 
+(ert-deftest company-multi-backend-adapter-uses-respective-prefixes ()
+  ;; And ignores the second argument.
+  (let ((company-backend
+         (list (lambda (command &optional arg)
+                 (case command
+                   (prefix "bar")
+                   (candidates (mapcar (lambda (tail) (concat arg "-" tail))
+                                       '("a" "b" "c")))))
+               (lambda (command &optional arg)
+                 (case command
+                   (prefix "foo-bar")
+                   (candidates (mapcar (lambda (tail) (concat arg "-" tail))
+                                       '("d" "e"))))))))
+    (should (equal (sort '("bar-a" "bar-b" "bar-c" "foo-bar-d" "foo-bar-e")
+                         'string<)
+                   (company-call-backend 'candidates "hubba-hubba")))))
+
+;; Pseudo-Tooltip
+
 (ert-deftest company-pseudo-tooltip-does-not-get-displaced ()
   (with-temp-buffer
     (save-window-excursion
diff --git a/company.el b/company.el
index 9f13518..3fa8353 100644
--- a/company.el
+++ b/company.el
@@ -658,9 +658,9 @@ keymap during active completions (`company-active-map'):
     (case command
       (candidates
        (loop for backend in backends
-             when (equal (funcall backend 'prefix)
-                         (car args))
-             append (apply backend 'candidates args)))
+             for prefix = (funcall backend 'prefix)
+             when prefix
+             append (funcall backend 'candidates prefix)))
       (sorted nil)
       (duplicates t)
       (otherwise

commit b7f831babd449ba7ed04f1e3a7e82ff178af2c18
Author: Dmitry Gutov <address@hidden>
Date:   Sun Apr 14 06:45:59 2013 +0400

    company-template-c-like-templatify: use "argN" as actual field text
    
    * company-template-add-field: Change the third argument type back; add an
      optional fourth argument; move point to the end of the field.
    
    * company-template-c-like-templatify, company-clang-objc-templatify: Adjust 
for
      the above. Use `point-marker'.
    
    * company-template-field-at: Extract from `company-template-forward-field'.

diff --git a/NEWS.md b/NEWS.md
index cec4fa2..91064a4 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,8 +4,9 @@
 
 * `company-auto-complete` is disabled by default.
 * `company-auto-complete-chars` default value includes fewer syntax classes.
+* In expanded function calls, arguments skipped by the user default to "argN".
 * `company-eclim` and `company-clang` do not strip argument types from fields.
-* `company-clang` expand function calls into templates for all three modes now.
+* `company-clang` expands function calls for all three modes now.
 * `company-clang` supports `c++-mode` by default.
 
 ## 2013-04-01 (0.6.7)
diff --git a/company-clang.el b/company-clang.el
index 60e29c1..954b9be 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -208,22 +208,18 @@ Prefix files (-include ...) can be selected with
       0)))
 
 (defun company-clang-objc-templatify (selector)
-  (let* ((end (point))
+  (let* ((end (point-marker))
          (beg (- (point) (length selector)))
          (templ (company-template-declare-template beg end))
          (cnt 0))
     (save-excursion
       (goto-char beg)
-      (while (search-forward ":" end t)
-        (let* ((name (format "arg%d" cnt))
-               (len (length name)))
-          (incf end len)
-          (let ((pt (point)))
-            (insert name)
-            (company-template-add-field templ pt (point)))
-          (when (< (point) end)
-            (insert " ")
-            (incf end))
+      (catch 'stop
+        (while (search-forward ":" end t)
+          (company-template-add-field templ (point) (format "arg%d" cnt))
+          (if (< (point) end)
+              (insert " ")
+            (throw 'stop t))
           (incf cnt))))
     (company-template-move-to-first templ)))
 
diff --git a/company-template.el b/company-template.el
index fd4447f..6ffd648 100644
--- a/company-template.el
+++ b/company-template.el
@@ -64,10 +64,12 @@
            (setq minimum pos)))
     (push-mark)
     (goto-char minimum)
-    (let ((field (loop for ovl in (overlays-at start)
-                       when (overlay-get ovl 'company-template-parent)
-                       return ovl)))
-      (company-template-remove-field field))))
+    (company-template-remove-field (company-template-field-at start))))
+
+(defun company-template-field-at (&optional point)
+  (loop for ovl in (overlays-at (or point (point)))
+        when (overlay-get ovl 'company-template-parent)
+        return ovl))
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
@@ -91,21 +93,26 @@
         (delq templ company-template--buffer-templates))
   (delete-overlay templ))
 
-(defun company-template-add-field (templ beg end)
-  "Add a field to template TEMPL, from BEG to END."
+(defun company-template-add-field (templ pos text &optional display)
+  "Add new field to template TEMPL at POS, inserting TEXT.
+When DISPLAY is non-nil, set the respective property on the overlay.
+Leave point at the end of the field."
   (assert templ)
-  (save-excursion
-    (when (> end (overlay-end templ))
-      (move-overlay templ (overlay-start templ) end))
-    (let ((ov (make-overlay beg end))
-          (siblings (overlay-get templ 'company-template-fields)))
-      ;; (overlay-put ov 'evaporate t)
-      (overlay-put ov 'intangible t)
-      (overlay-put ov 'face 'company-template-field)
-      (overlay-put ov 'company-template-parent templ)
-      (overlay-put ov 'insert-in-front-hooks '(company-template-insert-hook))
-      (push ov siblings)
-      (overlay-put templ 'company-template-fields siblings))))
+  (goto-char pos)
+  (insert text)
+  (when (> (point) (overlay-end templ))
+    (move-overlay templ (overlay-start templ) (point)))
+  (let ((ov (make-overlay pos (+ pos (length text))))
+        (siblings (overlay-get templ 'company-template-fields)))
+    ;; (overlay-put ov 'evaporate t)
+    (overlay-put ov 'intangible t)
+    (overlay-put ov 'face 'company-template-field)
+    (when display
+      (overlay-put ov 'display display))
+    (overlay-put ov 'company-template-parent templ)
+    (overlay-put ov 'insert-in-front-hooks '(company-template-insert-hook))
+    (push ov siblings)
+    (overlay-put templ 'company-template-fields siblings)))
 
 (defun company-template-remove-field (ovl &optional clear)
   (when (overlayp ovl)
@@ -140,17 +147,21 @@
 ;; common 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defun company-template-c-like-templatify (call)
-  (let* ((end (point))
-         (beg (- (point) (length call))))
+  (let* ((end (point-marker))
+         (beg (- (point) (length call)))
+         (cnt 0))
     (goto-char beg)
     (when (search-forward "(" end 'move)
       (if (eq (char-after) ?\))
           (forward-char 1)
         (let ((templ (company-template-declare-template beg end)))
           (while (re-search-forward (concat " *\\([^,)]*\\)[,)]") end t)
-            (company-template-add-field templ
-                                        (match-beginning 1)
-                                        (match-end 1)))
+            (let ((sig (match-string 1)))
+              (delete-region (match-beginning 1) (match-end 1))
+              (save-excursion
+                (company-template-add-field templ (match-beginning 1)
+                                            (format "arg%d" cnt) sig))
+              (incf cnt)))
           (company-template-move-to-first templ))))))
 
 (provide 'company-template)
diff --git a/company-tests.el b/company-tests.el
index 5aa4fd8..309d8f1 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -29,6 +29,8 @@
 (require 'company)
 (require 'company-keywords)
 
+;;; Core
+
 (ert-deftest company-sorted-keywords ()
   "Test that keywords in `company-keywords-alist' are in alphabetical order."
   (dolist (pair company-keywords-alist)
@@ -173,15 +175,17 @@
         (company-call 'open-line 1)
         (should (eq 2 (overlay-start company-pseudo-tooltip-overlay)))))))
 
+;;; Template
+
 (ert-deftest company-template-removed-after-the-last-jump ()
   (with-temp-buffer
-    (insert "{ foo foo }")
+    (insert "{ }")
     (goto-char 2)
     (let ((tpl (company-template-declare-template (point) (1- (point-max)))))
       (save-excursion
         (dotimes (i 2)
-          (search-forward "foo")
-          (company-template-add-field tpl (match-beginning 0) (match-end 0))))
+          (insert " ")
+          (company-template-add-field tpl (point) "foo")))
       (company-call 'template-forward-field)
       (should (= 3 (point)))
       (company-call 'template-forward-field)
@@ -193,10 +197,12 @@
 
 (ert-deftest company-template-removed-after-input-and-jump ()
   (with-temp-buffer
-    (insert "{ bar }")
+    (insert "{ }")
     (goto-char 2)
     (let ((tpl (company-template-declare-template (point) (1- (point-max)))))
-      (company-template-add-field tpl 3 6)
+      (save-excursion
+        (insert " ")
+        (company-template-add-field tpl (point) "bar"))
       (company-call 'template-move-to-first tpl)
       (should (= 3 (point)))
       (dolist (c (string-to-list "tee"))
@@ -215,6 +221,18 @@
     (let ((this-command command))
       (run-hooks 'post-command-hook))))
 
+(ert-deftest company-template-c-like-templatify ()
+  (with-temp-buffer
+    (let ((text "foo(int a, short b)"))
+      (insert text)
+      (company-template-c-like-templatify text)
+      (should (equal "foo(arg0, arg1)" (buffer-string)))
+      (should (looking-at "arg0"))
+      (should (equal "int a"
+                     (overlay-get (company-template-field-at) 'display))))))
+
+;;; Elisp
+
 (defmacro company-elisp-with-buffer (contents &rest body)
   (declare (indent 0))
   `(with-temp-buffer
@@ -379,3 +397,14 @@
   (company-elisp-with-buffer
     "(defun foob ()|)"
     (should (equal "" (company-elisp 'prefix)))))
+
+;;; Clang
+
+(ert-deftest company-clang-objc-templatify ()
+  (with-temp-buffer
+    (let ((text "createBookWithTitle:andAuthor:"))
+      (insert text)
+      (company-clang-objc-templatify text)
+      (should (equal "createBookWithTitle:arg0 andAuthor:arg1" 
(buffer-string)))
+      (should (looking-at "arg0"))
+      (should (null (overlay-get (company-template-field-at) 'display))))))

commit 6a095e308b15d4dcc2358d8a2a3f88e440433a24
Author: Dmitry Gutov <address@hidden>
Date:   Sun Apr 14 01:26:58 2013 +0400

    Update NEWS
    
    Refs #11

diff --git a/NEWS.md b/NEWS.md
index a788f59..cec4fa2 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,8 @@
 
 ## Next
 
+* `company-auto-complete` is disabled by default.
+* `company-auto-complete-chars` default value includes fewer syntax classes.
 * `company-eclim` and `company-clang` do not strip argument types from fields.
 * `company-clang` expand function calls into templates for all three modes now.
 * `company-clang` supports `c++-mode` by default.

commit 320a9d09cb3b9b484286c4bc1290d4887467d58f
Author: Dmitry Gutov <address@hidden>
Date:   Sun Apr 14 00:36:16 2013 +0400

    Close #11
    
    * Turn off auto-complete by default.
    * Decrease the default auto-complete-chars list.
    * Remove company-punctuation-p, is was unused.

diff --git a/company.el b/company.el
index a1147a1..9f13518 100644
--- a/company.el
+++ b/company.el
@@ -381,7 +381,7 @@ This can be overridden by the back-end, if it returns t or 
'never to
                         'company-explicit-action-p)
                  (const :tag "On" t)))
 
-(defcustom company-auto-complete 'company-explicit-action-p
+(defcustom company-auto-complete nil
   "Determines when to auto-complete.
 If this is enabled, all characters from `company-auto-complete-chars' complete
 the selected completion.  This can also be a function."
@@ -391,7 +391,7 @@ the selected completion.  This can also be a function."
                         'company-explicit-action-p)
                  (const :tag "On" t)))
 
-(defcustom company-auto-complete-chars '(?\  ?\( ?\) ?. ?\" ?$ ?\' ?< ?| ?!)
+(defcustom company-auto-complete-chars '(?\  ?\) ?.)
   "Determines which characters trigger an automatic completion.
 See `company-auto-complete'.  If this is a string, each string character causes
 completion.  If it is a list of syntax description characters (see
@@ -901,10 +901,6 @@ can retrieve meta-data for them."
                (eq company-require-match t))
              (not (eq backend-value 'never))))))
 
-(defun company-punctuation-p (input)
-  "Return non-nil, if input starts with punctuation or parentheses."
-  (memq (char-syntax (string-to-char input)) '(?. ?\( ?\))))
-
 (defun company-auto-complete-p (input)
   "Return non-nil, if input starts with punctuation or parentheses."
   (and (if (functionp company-auto-complete)

commit 8563865558b7cf54956906c8c7b5c0dc98bced7c
Merge: d5f74fe f3813a6
Author: Thierry Volpiatto <address@hidden>
Date:   Fri Apr 12 11:01:03 2013 -0700

    Merge pull request #1 from purcell/patch-1
    
    Fix file header line for ELPA compatibility


commit f3813a6acf3b795ac1b0e261b5c769c3791b2a87
Author: Steve Purcell <address@hidden>
Date:   Fri Apr 12 19:46:36 2013 +0200

    Fix file header line for ELPA compatibility
    
    A triple-dash is required by the `package-buffer-info` function.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index dbc142e..41cd366 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -1,4 +1,4 @@
-;;; eldoc-eval.el -- Show eldoc when using M-:
+;;; eldoc-eval.el --- Show eldoc when using M-:
 
 ;; Copyright (C) 2011 Free Software Foundation, Inc.
 

commit f77e02d4f996749f51bbc4c035c0e0d7dc16bb03
Author: Dmitry Gutov <address@hidden>
Date:   Wed Apr 10 17:12:48 2013 +0400

    company-backends: Move semantic in front of clang
    
    semantic-mode need to be explicitly enabled, but company-clang always works 
as
    long as Clang is installed.

diff --git a/company.el b/company.el
index 09d0bb9..a1147a1 100644
--- a/company.el
+++ b/company.el
@@ -263,7 +263,7 @@ Requires Emacs 24.1 or newer."
                           (plist-get (nthcdr 4 res) :predicate)))))))
 
 (defcustom company-backends '(company-elisp company-nxml company-css
-                              company-clang company-semantic company-eclim
+                              company-semantic company-clang company-eclim
                               company-xcode company-ropemacs
                               (company-gtags company-etags company-dabbrev-code
                                company-keywords)

commit b46447516d13fe5b56428215b8c9d6dd35451375
Author: Dmitry Gutov <address@hidden>
Date:   Wed Apr 10 05:37:35 2013 +0400

    Fix the template tests

diff --git a/company-tests.el b/company-tests.el
index d4ab0b7..5aa4fd8 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -175,14 +175,13 @@
 
 (ert-deftest company-template-removed-after-the-last-jump ()
   (with-temp-buffer
-    (insert "{ }")
+    (insert "{ foo foo }")
     (goto-char 2)
     (let ((tpl (company-template-declare-template (point) (1- (point-max)))))
       (save-excursion
         (dotimes (i 2)
-          (insert " ")
-          (company-template-add-field tpl (point) "foo")
-          (forward-char 3)))
+          (search-forward "foo")
+          (company-template-add-field tpl (match-beginning 0) (match-end 0))))
       (company-call 'template-forward-field)
       (should (= 3 (point)))
       (company-call 'template-forward-field)
@@ -194,12 +193,10 @@
 
 (ert-deftest company-template-removed-after-input-and-jump ()
   (with-temp-buffer
-    (insert "{ }")
+    (insert "{ bar }")
     (goto-char 2)
     (let ((tpl (company-template-declare-template (point) (1- (point-max)))))
-      (save-excursion
-        (insert " ")
-        (company-template-add-field tpl (point) "bar"))
+      (company-template-add-field tpl 3 6)
       (company-call 'template-move-to-first tpl)
       (should (= 3 (point)))
       (dolist (c (string-to-list "tee"))

commit 78f8b974a8f68ebc4258d5b1fcbf4b03f2223501
Author: Dmitry Gutov <address@hidden>
Date:   Wed Apr 10 05:02:34 2013 +0400

    company-clang docstring: Clang with capital C

diff --git a/company-clang.el b/company-clang.el
index c8cfc61..60e29c1 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -228,7 +228,7 @@ Prefix files (-include ...) can be selected with
     (company-template-move-to-first templ)))
 
 (defun company-clang (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for clang.
+  "`company-mode' completion back-end for Clang.
 Clang is a parser for C and ObjC.  Clang version 1.1 or newer is required.
 
 Additional command line arguments can be specified in

commit 49436401cdcb18029dd37bb41c5c8f28ffe69776
Author: Dmitry Gutov <address@hidden>
Date:   Wed Apr 10 04:59:39 2013 +0400

    company-clang post-completion: early abort when ObjC and no ":"

diff --git a/company-clang.el b/company-clang.el
index 8b0770d..c8cfc61 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -256,11 +256,10 @@ Completions only work correctly when the buffer has been 
saved.
     (crop (and (string-match ":\\|(" arg)
                (substring arg 0 (match-beginning 0))))
     (post-completion (cond
-                      ((derived-mode-p 'objc-mode)
-                       (string-match ":" arg)
-                       (company-clang-objc-templatify arg))
-                      (t
-                       (company-template-c-like-templatify arg))))))
+                      ((not (derived-mode-p 'objc-mode))
+                       (company-template-c-like-templatify arg))
+                      ((string-match ":" arg)
+                       (company-clang-objc-templatify arg))))))
 
 (provide 'company-clang)
 ;;; company-clang.el ends here

commit 988cf9d8c21499ebdec0eb6d15ba4d92d5a2830d
Author: Dmitry Gutov <address@hidden>
Date:   Wed Apr 10 04:34:00 2013 +0400

    Support c++-mode in company-clang; templatify calls in C and C++
    
    Close #7
    
    * company-clang--completion-pattern: Ignore (Hidden) entries.
    * company-clang--parse-output: Add function arguments to the candidate text,
    * unless we're dealing with ObjC (no problem with overloads there).
    * company-clang: Templatify function call in C in C++, same as 
`company-eclim'.
    * company-eclim--templatify: Move to company-template.el, rename to
      `company-template-c-like-templatify', don't strip the argument types from 
fields.
      Detecting where the type ends and the arg name begins is hard for C and 
C++,
      because there may be no argument name. And showing types is useful anyway.
    * company-template-add-field: Change the third argument from string to 
number.
    * company-template-move-to-first: When no fields, jump to the end.

diff --git a/NEWS.md b/NEWS.md
index 9a8fc7d..a788f59 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,11 @@
 # History of user-visible changes
 
+## Next
+
+* `company-eclim` and `company-clang` do not strip argument types from fields.
+* `company-clang` expand function calls into templates for all three modes now.
+* `company-clang` supports `c++-mode` by default.
+
 ## 2013-04-01 (0.6.7)
 
 * Two `company-elisp` tweaks.
diff --git a/company-clang.el b/company-clang.el
index 178170f..8b0770d 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -55,7 +55,7 @@ Prefix files (-include ...) can be selected with
   "A function to determine the prefix file for the current buffer."
   :type '(function :tag "Guesser function" nil))
 
-(defvar company-clang-modes '(c-mode objc-mode)
+(defvar company-clang-modes '(c-mode c++-mode objc-mode)
   "Major modes which clang may complete.")
 
 ;; prefix 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -100,15 +100,16 @@ Prefix files (-include ...) can be selected with
 
 ;; parsing 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-;; TODO: How to handle OVERLOAD and Pattern?
+;; TODO: Handle Pattern (syntactic hints would be neat).
+;; Do we ever see OVERLOAD (or OVERRIDE)?
 (defconst company-clang--completion-pattern
-  "^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\)\\(?: : \\(.*\\)$\\)?")
+  "^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\)\\(?: : \\(.*\\)$\\)?$")
 
 (defconst company-clang--error-buffer-name "*clang error*")
 
 (defvar company-clang--meta-cache nil)
 
-(defun company-clang--parse-output (prefix)
+(defun company-clang--parse-output (prefix objc)
   (goto-char (point-min))
   (let ((pattern (format company-clang--completion-pattern
                          (regexp-quote prefix)))
@@ -117,13 +118,22 @@ Prefix files (-include ...) can be selected with
     (setq company-clang--meta-cache (make-hash-table :test 'equal))
     (while (re-search-forward pattern nil t)
       (setq match (match-string-no-properties 1))
-      (let ((meta (match-string-no-properties 2)))
-        (when (and meta (not (string= match meta)))
-          (puthash match meta company-clang--meta-cache)))
       (unless (equal match "Pattern")
+        (let ((meta (match-string-no-properties 2)))
+          (when (and meta (not (string= match meta)))
+            (setq meta (company-clang--strip-formatting meta))
+            (when (and (not objc) (string-match "\\((.*)\\)" meta))
+              (setq match (concat match (match-string 1 meta))))
+            (puthash match meta company-clang--meta-cache)))
         (push match lines)))
     lines))
 
+(defun company-clang--strip-formatting (text)
+  (replace-regexp-in-string
+   "#]" " "
+   (replace-regexp-in-string "[<{[]#\\|#[>}]" "" text t)
+   t))
+
 (defun company-clang--handle-error (res args)
   (goto-char (point-min))
   (let* ((buf (get-buffer-create company-clang--error-buffer-name))
@@ -147,12 +157,13 @@ Prefix files (-include ...) can be selected with
         (goto-char (point-min))))))
 
 (defun company-clang--call-process (prefix &rest args)
-  (with-temp-buffer
-    (let ((res (apply 'call-process company-clang-executable nil t nil args)))
-      (unless (eq 0 res)
-        (company-clang--handle-error res args))
-      ;; Still try to get any useful input.
-      (company-clang--parse-output prefix))))
+  (let ((objc (derived-mode-p 'objc-mode)))
+    (with-temp-buffer
+      (let ((res (apply 'call-process company-clang-executable nil t nil 
args)))
+        (unless (eq 0 res)
+          (company-clang--handle-error res args))
+        ;; Still try to get any useful input.
+        (company-clang--parse-output prefix objc)))))
 
 (defsubst company-clang--build-location (pos)
   (save-excursion
@@ -207,8 +218,9 @@ Prefix files (-include ...) can be selected with
         (let* ((name (format "arg%d" cnt))
                (len (length name)))
           (incf end len)
-          (company-template-add-field templ (match-end 0) name)
-          (goto-char (+ (match-end 0) len))
+          (let ((pt (point)))
+            (insert name)
+            (company-template-add-field templ pt (point)))
           (when (< (point) end)
             (insert " ")
             (incf end))
@@ -240,18 +252,15 @@ Completions only work correctly when the buffer has been 
saved.
                  (not (company-in-string-or-comment))
                  (or (company-grab-symbol) 'stop)))
     (candidates (company-clang--candidates arg))
-    (meta (let ((meta (gethash arg company-clang--meta-cache)))
-            (when meta
-              (replace-regexp-in-string
-               "#]" " "
-               (replace-regexp-in-string "[<{[]#\\|#[>}]" "" meta t)
-               t))))
-    (crop (and (derived-mode-p 'objc-mode)
-               (string-match ":" arg)
+    (meta (gethash arg company-clang--meta-cache))
+    (crop (and (string-match ":\\|(" arg)
                (substring arg 0 (match-beginning 0))))
-    (post-completion (and (derived-mode-p 'objc-mode)
-                          (string-match ":" arg)
-                          (company-clang-objc-templatify arg)))))
+    (post-completion (cond
+                      ((derived-mode-p 'objc-mode)
+                       (string-match ":" arg)
+                       (company-clang-objc-templatify arg))
+                      (t
+                       (company-template-c-like-templatify arg))))))
 
 (provide 'company-clang)
 ;;; company-clang.el ends here
diff --git a/company-eclim.el b/company-eclim.el
index eb95187..864f550 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -142,19 +142,6 @@ eclim can only complete correctly when the buffer has been 
saved."
 (defun company-eclim--meta (candidate)
   (gethash candidate company-eclim--doc))
 
-(defun company-eclim--templatify (call)
-  (let* ((end (point))
-         (beg (- (point) (length call)))
-         (templ (company-template-declare-template beg end)))
-    (save-excursion
-      (goto-char beg)
-      (while (re-search-forward "\\([(,] ?\\)\\([^ ]+ \\)\\([^ ,)]*\\)" end t)
-        (let ((name (match-string 3)))
-          (replace-match "\\1" t)
-          (decf end (length (match-string 2)))
-          (company-template-add-field templ (point) name))))
-    (company-template-move-to-first templ)))
-
 (defun company-eclim (command &optional arg &rest ignored)
   "`company-mode' completion back-end for Eclim.
 Eclim provides access to Eclipse Java IDE features for other editors.
@@ -179,7 +166,7 @@ Completions only work correctly when the buffer has been 
saved.
     (crop (when (string-match "(" arg)
             (substring arg 0 (match-beginning 0))))
     (post-completion (when (string-match "([^)]" arg)
-                       (company-eclim--templatify arg)))))
+                       (company-template-c-like-templatify arg)))))
 
 (provide 'company-eclim)
 ;;; company-eclim.el ends here
diff --git a/company-template.el b/company-template.el
index ffceda1..fd4447f 100644
--- a/company-template.el
+++ b/company-template.el
@@ -47,9 +47,8 @@
 
 (defun company-template-move-to-first (templ)
   (interactive)
-  (let ((fields (overlay-get templ 'company-template-fields)))
-    (push-mark)
-    (goto-char (apply 'min (mapcar 'overlay-start fields)))))
+  (goto-char (overlay-start templ))
+  (company-template-forward-field))
 
 (defun company-template-forward-field ()
   (interactive)
@@ -92,15 +91,13 @@
         (delq templ company-template--buffer-templates))
   (delete-overlay templ))
 
-(defun company-template-add-field (templ pos text)
+(defun company-template-add-field (templ beg end)
+  "Add a field to template TEMPL, from BEG to END."
   (assert templ)
   (save-excursion
-    (save-excursion
-      (goto-char pos)
-      (insert text)
-      (when (> (point) (overlay-end templ))
-        (move-overlay templ (overlay-start templ) (point))))
-    (let ((ov (make-overlay pos (+ pos (length text))))
+    (when (> end (overlay-end templ))
+      (move-overlay templ (overlay-start templ) end))
+    (let ((ov (make-overlay beg end))
           (siblings (overlay-get templ 'company-template-fields)))
       ;; (overlay-put ov 'evaporate t)
       (overlay-put ov 'intangible t)
@@ -140,5 +137,21 @@
   (unless company-template--buffer-templates
     (remove-hook 'post-command-hook 'company-template-post-command t)))
 
+;; common 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defun company-template-c-like-templatify (call)
+  (let* ((end (point))
+         (beg (- (point) (length call))))
+    (goto-char beg)
+    (when (search-forward "(" end 'move)
+      (if (eq (char-after) ?\))
+          (forward-char 1)
+        (let ((templ (company-template-declare-template beg end)))
+          (while (re-search-forward (concat " *\\([^,)]*\\)[,)]") end t)
+            (company-template-add-field templ
+                                        (match-beginning 1)
+                                        (match-end 1)))
+          (company-template-move-to-first templ))))))
+
 (provide 'company-template)
 ;;; company-template.el ends here

commit db19d03474dee277158b3ed5de088aee9d152913
Author: Dmitry Gutov <address@hidden>
Date:   Wed Apr 10 01:01:00 2013 +0400

    Some capitalization and more uniformity

diff --git a/company-elisp.el b/company-elisp.el
index 41069cd..b55ed9f 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -1,4 +1,4 @@
-;;; company-elisp.el --- company-mode completion back-end for emacs-lisp-mode 
-*- lexical-binding: t -*-
+;;; company-elisp.el --- company-mode completion back-end for Emacs Lisp -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2009, 2011-2013  Free Software Foundation, Inc.
 
@@ -31,7 +31,7 @@
 (require 'find-func)
 
 (defgroup company-elisp nil
-  "Completion back-end for emacs-lisp-mode."
+  "Completion back-end for Emacs Lisp."
   :group 'company)
 
 (defcustom company-elisp-detect-function-context t
@@ -193,7 +193,7 @@ first in the candidates list."
 
 ;;;###autoload
 (defun company-elisp (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for `emacs-lisp-mode'."
+  "`company-mode' completion back-end for Emacs Lisp."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-elisp))
diff --git a/company.el b/company.el
index a08b222..09d0bb9 100644
--- a/company.el
+++ b/company.el
@@ -212,22 +212,22 @@ If this many lines are not available, prefer to display 
the tooltip above."
 
 (defvar company-safe-backends
   '((company-abbrev . "Abbrev")
-    (company-clang . "clang")
+    (company-clang . "Clang")
     (company-css . "CSS")
     (company-dabbrev . "dabbrev for plain text")
     (company-dabbrev-code . "dabbrev for code")
-    (company-eclim . "eclim (an Eclipse interace)")
+    (company-eclim . "Eclim (an Eclipse interface)")
     (company-elisp . "Emacs Lisp")
     (company-etags . "etags")
     (company-files . "Files")
     (company-gtags . "GNU Global")
-    (company-ispell . "ispell")
+    (company-ispell . "Ispell")
     (company-keywords . "Programming language keywords")
     (company-nxml . "nxml")
     (company-oddmuse . "Oddmuse")
     (company-pysmell . "PySmell")
     (company-ropemacs . "ropemacs")
-    (company-semantic . "CEDET Semantic")
+    (company-semantic . "Semantic")
     (company-tempo . "Tempo templates")
     (company-xcode . "Xcode")))
 (put 'company-safe-backends 'risky-local-variable t)

commit a2724d172a55091de641baba1b6382b2d24668de
Author: Dmitry Gutov <address@hidden>
Date:   Wed Apr 10 00:55:23 2013 +0400

    Write "tooltip" uniformly as one word

diff --git a/company.el b/company.el
index fa0b864..a08b222 100644
--- a/company.el
+++ b/company.el
@@ -91,7 +91,7 @@
      (:background "cornsilk"))
     (((class color) (min-colors 88) (background dark))
      (:background "yellow")))
-  "Face used for the tool tip.")
+  "Face used for the tooltip.")
 
 (defface company-tooltip-selection
   '((default :inherit company-tooltip)
@@ -100,11 +100,11 @@
     (((class color) (min-colors 88) (background dark))
      (:background "orange1"))
     (t (:background "green")))
-  "Face used for the selection in the tool tip.")
+  "Face used for the selection in the tooltip.")
 
 (defface company-tooltip-mouse
   '((default :inherit highlight))
-  "Face used for the tool tip item under the mouse.")
+  "Face used for the tooltip item under the mouse.")
 
 (defface company-tooltip-common
   '((default :inherit company-tooltip)
@@ -112,7 +112,7 @@
      :foreground "darkred")
     (((background dark))
      :foreground "red"))
-  "Face used for the common completion in the tool tip.")
+  "Face used for the common completion in the tooltip.")
 
 (defface company-tooltip-common-selection
   '((default :inherit company-tooltip-selection)
@@ -120,7 +120,7 @@
      :foreground "darkred")
     (((background dark))
      :foreground "red"))
-  "Face used for the selected common completion in the tool tip.")
+  "Face used for the selected common completion in the tooltip.")
 
 (defface company-preview
   '((t :background "blue4"
@@ -202,11 +202,11 @@ The visualized data is stored in `company-prefix', 
`company-candidates',
                          (function :tag "custom function" nil))))
 
 (defcustom company-tooltip-limit 10
-  "The maximum number of candidates in the tool tip"
+  "The maximum number of candidates in the tooltip"
   :type 'integer)
 
 (defcustom company-tooltip-minimum 6
-  "The minimum height of the tool tip.
+  "The minimum height of the tooltip.
 If this many lines are not available, prefer to display the tooltip above."
   :type 'integer)
 
@@ -1815,7 +1815,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
    (point) (overlay-start company-pseudo-tooltip-overlay)))
 
 (defun company-pseudo-tooltip-frontend (command)
-  "`company-mode' front-end similar to a tool-tip but based on overlays."
+  "`company-mode' front-end similar to a tooltip but based on overlays."
   (case command
     (pre-command (company-pseudo-tooltip-hide-temporarily))
     (post-command

commit 4b909bfb2baed9afaf2762b0b13b9490ad4bc246
Author: Dmitry Gutov <address@hidden>
Date:   Wed Apr 10 00:48:12 2013 +0400

    Define groups for back-ends; remove explicit :group declarations
    
    defcustom defaults to the group last defined in the file.
    
    Refs #8

diff --git a/company-clang.el b/company-clang.el
index e014bd6..178170f 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -1,4 +1,4 @@
-;;; company-clang.el --- company-mode completion back-end for clang
+;;; company-clang.el --- company-mode completion back-end for Clang
 
 ;; Copyright (C) 2009, 2011, 2013  Free Software Foundation, Inc.
 
@@ -29,16 +29,18 @@
 (require 'company-template)
 (eval-when-compile (require 'cl))
 
+(defgroup company-clang nil
+  "Completion back-end for Clang."
+  :group 'company)
+
 (defcustom company-clang-executable
   (executable-find "clang")
   "Location of clang executable."
-  :group 'company-clang
   :type 'file)
 
 (defcustom company-clang-auto-save t
   "Determines whether to save the buffer when retrieving completions.
 clang can only complete correctly when the buffer has been saved."
-  :group 'company-clang
   :type '(choice (const :tag "Off" nil)
                  (const :tag "On" t)))
 
@@ -47,12 +49,10 @@ clang can only complete correctly when the buffer has been 
saved."
 Prefix files (-include ...) can be selected with
 `company-clang-set-prefix' or automatically through a custom
 `company-clang-prefix-guesser'."
-  :group 'company-clang
   :type '(repeat (string :tag "Argument" nil)))
 
 (defcustom company-clang-prefix-guesser 'company-clang-guess-prefix
   "A function to determine the prefix file for the current buffer."
-  :group 'company-clang
   :type '(function :tag "Guesser function" nil))
 
 (defvar company-clang-modes '(c-mode objc-mode)
diff --git a/company-dabbrev-code.el b/company-dabbrev-code.el
index 030e3be..2b13237 100644
--- a/company-dabbrev-code.el
+++ b/company-dabbrev-code.el
@@ -29,6 +29,10 @@
 (require 'company-dabbrev)
 (eval-when-compile (require 'cl))
 
+(defgroup company-dabbrev-code nil
+  "dabbrev-like completion back-end for code."
+  :group 'company)
+
 (defcustom company-dabbrev-code-modes
   '(asm-mode batch-file-mode c++-mode c-mode cperl-mode csharp-mode css-mode
     emacs-lisp-mode erlang-mode espresso-mode f90-mode fortran-mode
@@ -40,7 +44,6 @@ In all these modes `company-dabbrev-code' will complete only 
symbols, not text
 in comments or strings.  In other modes `company-dabbrev-code' will pass 
control
 to other back-ends \(e.g. `company-dabbrev'\).
 Value t means complete in all modes."
-  :group 'company
   :type '(choice (repeat (symbol :tag "Major mode"))
                  (const tag "All modes" t)))
 
@@ -49,14 +52,12 @@ Value t means complete in all modes."
 If `all', search all other buffers.  If t, search buffers with the same
 major mode.
 See also `company-dabbrev-code-time-limit'."
-  :group 'company
   :type '(choice (const :tag "Off" nil)
                  (const :tag "Same major mode" t)
                  (const :tag "All" all)))
 
 (defcustom company-dabbrev-code-time-limit .5
   "Determines how long `company-dabbrev-code' should look for matches."
-  :group 'company
   :type '(choice (const :tag "Off" nil)
                  (number :tag "Seconds")))
 
diff --git a/company-dabbrev.el b/company-dabbrev.el
index 6d43ee4..1be9792 100644
--- a/company-dabbrev.el
+++ b/company-dabbrev.el
@@ -28,25 +28,26 @@
 (require 'company)
 (eval-when-compile (require 'cl))
 
+(defgroup company-dabbrev nil
+  "dabbrev-like completion back-end."
+  :group 'company)
+
 (defcustom company-dabbrev-other-buffers 'all
   "Determines whether `company-dabbrev' should search other buffers.
 If `all', search all other buffers.  If t, search buffers with the same
 major mode.
 See also `company-dabbrev-time-limit'."
-  :group 'company
   :type '(choice (const :tag "Off" nil)
                  (const :tag "Same major mode" t)
                  (const :tag "All" all)))
 
 (defcustom company-dabbrev-time-limit .5
   "Determines how many seconds `company-dabbrev' should look for matches."
-  :group 'company
   :type '(choice (const :tag "Off" nil)
                  (number :tag "Seconds")))
 
 (defcustom company-dabbrev-char-regexp "\\sw"
   "A regular expression matching the characters `company-dabbrev' looks for."
-  :group 'company
   :type 'regexp)
 
 (defmacro company-dabrev--time-limit-while (test start limit &rest body)
diff --git a/company-eclim.el b/company-eclim.el
index ab6329e..eb95187 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -1,4 +1,4 @@
-;;; company-eclim.el --- company-mode completion back-end for eclim.
+;;; company-eclim.el --- company-mode completion back-end for Eclim
 
 ;; Copyright (C) 2009, 2011, 2013  Free Software Foundation, Inc.
 
@@ -34,6 +34,10 @@
 (require 'company-template)
 (eval-when-compile (require 'cl))
 
+(defgroup company-eclim nil
+  "Completion back-end for Eclim."
+  :group 'company)
+
 (defun company-eclim-executable-find ()
   (let (file)
     (dolist (eclipse-root '("/Applications/eclipse" "/usr/lib/eclipse"
@@ -46,13 +50,11 @@
 (defcustom company-eclim-executable
   (or (executable-find "eclim") (company-eclim-executable-find))
   "Location of eclim executable."
-  :group 'company
   :type 'file)
 
 (defcustom company-eclim-auto-save t
   "Determines whether to save the buffer when retrieving completions.
 eclim can only complete correctly when the buffer has been saved."
-  :group 'company
   :type '(choice (const :tag "Off" nil)
                  (const :tag "On" t)))
 
diff --git a/company-elisp.el b/company-elisp.el
index 2046f6a..41069cd 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -30,17 +30,19 @@
 (require 'help-mode)
 (require 'find-func)
 
+(defgroup company-elisp nil
+  "Completion back-end for emacs-lisp-mode."
+  :group 'company)
+
 (defcustom company-elisp-detect-function-context t
   "If enabled, offer Lisp functions only in appropriate contexts.
 Functions are offered for completion only after ' and \(."
-  :group 'company
   :type '(choice (const :tag "Off" nil)
                  (const :tag "On" t)))
 
 (defcustom company-elisp-show-locals-first t
   "If enabled, locally bound variables and functions are displayed
 first in the candidates list."
-  :group 'company
   :type '(choice (const :tag "Off" nil)
                  (const :tag "On" t)))
 
diff --git a/company-etags.el b/company-etags.el
index 2bfca80..956e294 100644
--- a/company-etags.el
+++ b/company-etags.el
@@ -28,11 +28,14 @@
 (require 'company)
 (require 'etags)
 
+(defgroup company-etags nil
+  "Completion back-end for etags."
+  :group 'company)
+
 (defcustom company-etags-use-main-table-list t
   "Always search `tags-table-list' if set.
 If this is disabled, `company-etags' will try to find the one table for each
 buffer automatically."
-  :group 'company-mode
   :type '(choice (const :tag "off" nil)
                  (const :tag "on" t)))
 
diff --git a/company-gtags.el b/company-gtags.el
index 91c3929..6b4e399 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -28,11 +28,14 @@
 (require 'company)
 (eval-when-compile (require 'cl))
 
+(defgroup company-gtags nil
+  "Completion back-end for GNU Global."
+  :group 'company)
+
 (defcustom company-gtags-executable
   (executable-find "global")
   "Location of GNU global executable."
-  :type 'string
-  :group 'company)
+  :type 'string)
 
 (define-obsolete-variable-alias
   'company-gtags-gnu-global-program-name
diff --git a/company-ispell.el b/company-ispell.el
index eee5c0c..9647f85 100644
--- a/company-ispell.el
+++ b/company-ispell.el
@@ -1,4 +1,4 @@
-;;; company-ispell.el --- company-mode completion back-end using ispell
+;;; company-ispell.el --- company-mode completion back-end using Ispell
 
 ;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
@@ -29,10 +29,13 @@
 (require 'ispell)
 (eval-when-compile (require 'cl))
 
+(defgroup company-ispell nil
+  "Completion back-end using Ispell."
+  :group 'company)
+
 (defcustom company-ispell-dictionary nil
   "Dictionary to use for `company-ispell'.
 If nil, use `ispell-complete-word-dict'."
-  :group 'company
   :type '(choice (const :tag "default (nil)" nil)
                  (file :tag "dictionary" t)))
 
@@ -51,7 +54,7 @@ If nil, use `ispell-complete-word-dict'."
 
 ;;;###autoload
 (defun company-ispell (command &optional arg &rest ignored)
-  "`company-mode' completion back-end using ispell."
+  "`company-mode' completion back-end using Ispell."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-ispell))
diff --git a/company-ropemacs.el b/company-ropemacs.el
index 6cffbf1..17a660a 100644
--- a/company-ropemacs.el
+++ b/company-ropemacs.el
@@ -1,4 +1,4 @@
-;;; company-ropemacs.el --- company-mode completion back-end for pysmell.el
+;;; company-ropemacs.el --- company-mode completion back-end for ropemacs
 
 ;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
diff --git a/company-semantic.el b/company-semantic.el
index 66a23b3..92cd178 100644
--- a/company-semantic.el
+++ b/company-semantic.el
@@ -1,4 +1,4 @@
-;;; company-semantic.el --- company-mode back-end using CEDET Semantic
+;;; company-semantic.el --- company-mode completion back-end using Semantic
 
 ;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
@@ -39,9 +39,12 @@
 (declare-function semantic-tag-buffer "semantic/tag")
 (declare-function semantic-active-p "semantic")
 
+(defgroup company-semantic nil
+  "Completion back-end using Semantic."
+  :group 'company)
+
 (defcustom company-semantic-metadata-function 'company-semantic-summary-and-doc
   "The function turning a semantic tag into doc information."
-  :group 'company
   :type 'function)
 
 (defvar company-semantic-modes '(c-mode c++-mode jde-mode java-mode))
diff --git a/company-xcode.el b/company-xcode.el
index 5903131..ac8d133 100644
--- a/company-xcode.el
+++ b/company-xcode.el
@@ -28,9 +28,12 @@
 (require 'company)
 (eval-when-compile (require 'cl))
 
+(defgroup company-xcode nil
+  "Completion back-end for Xcode projects."
+  :group 'company)
+
 (defcustom company-xcode-xcodeindex-executable (executable-find "xcodeindex")
   "Location of xcodeindex executable."
-  :group 'company-xcode
   :type 'file)
 
 (defvar company-xcode-tags nil)
@@ -50,7 +53,6 @@ valid in most contexts."
   :set (lambda (variable value)
          (set variable value)
          (company-xcode-reset))
-  :group 'company-xcode
   :type '(set (const "Category") (const "Class") (const "Class Method")
               (const "Class Variable") (const "Constant") (const "Enum")
               (const "Field") (const "Instance Method")
diff --git a/company.el b/company.el
index 86aff74..fa0b864 100644
--- a/company.el
+++ b/company.el
@@ -91,8 +91,7 @@
      (:background "cornsilk"))
     (((class color) (min-colors 88) (background dark))
      (:background "yellow")))
-  "Face used for the tool tip."
-  :group 'company)
+  "Face used for the tool tip.")
 
 (defface company-tooltip-selection
   '((default :inherit company-tooltip)
@@ -101,13 +100,11 @@
     (((class color) (min-colors 88) (background dark))
      (:background "orange1"))
     (t (:background "green")))
-  "Face used for the selection in the tool tip."
-  :group 'company)
+  "Face used for the selection in the tool tip.")
 
 (defface company-tooltip-mouse
   '((default :inherit highlight))
-  "Face used for the tool tip item under the mouse."
-  :group 'company)
+  "Face used for the tool tip item under the mouse.")
 
 (defface company-tooltip-common
   '((default :inherit company-tooltip)
@@ -115,8 +112,7 @@
      :foreground "darkred")
     (((background dark))
      :foreground "red"))
-  "Face used for the common completion in the tool tip."
-  :group 'company)
+  "Face used for the common completion in the tool tip.")
 
 (defface company-tooltip-common-selection
   '((default :inherit company-tooltip-selection)
@@ -124,36 +120,30 @@
      :foreground "darkred")
     (((background dark))
      :foreground "red"))
-  "Face used for the selected common completion in the tool tip."
-  :group 'company)
+  "Face used for the selected common completion in the tool tip.")
 
 (defface company-preview
   '((t :background "blue4"
        :foreground "wheat"))
-  "Face used for the completion preview."
-  :group 'company)
+  "Face used for the completion preview.")
 
 (defface company-preview-common
   '((t :inherit company-preview
        :foreground "red"))
-  "Face used for the common part of the completion preview."
-  :group 'company)
+  "Face used for the common part of the completion preview.")
 
 (defface company-preview-search
   '((t :inherit company-preview
        :background "blue1"))
-  "Face used for the search string in the completion preview."
-  :group 'company)
+  "Face used for the search string in the completion preview.")
 
 (defface company-echo nil
-  "Face used for completions in the echo area."
-  :group 'company)
+  "Face used for completions in the echo area.")
 
 (defface company-echo-common
   '((((background dark)) (:foreground "firebrick1"))
     (((background light)) (:background "firebrick4")))
-  "Face used for the common part of completions in the echo area."
-  :group 'company)
+  "Face used for the common part of completions in the echo area.")
 
 (defun company-frontends-set (variable value)
   ;; uniquify
@@ -197,7 +187,6 @@ The visualized data is stored in `company-prefix', 
`company-candidates',
 `company-common', `company-selection', `company-point' and
 `company-search-string'."
   :set 'company-frontends-set
-  :group 'company
   :type '(repeat (choice (const :tag "echo" company-echo-frontend)
                          (const :tag "echo, strip common"
                                 company-echo-strip-common-frontend)
@@ -214,13 +203,11 @@ The visualized data is stored in `company-prefix', 
`company-candidates',
 
 (defcustom company-tooltip-limit 10
   "The maximum number of candidates in the tool tip"
-  :group 'company
   :type 'integer)
 
 (defcustom company-tooltip-minimum 6
   "The minimum height of the tool tip.
 If this many lines are not available, prefer to display the tooltip above."
-  :group 'company
   :type 'integer)
 
 (defvar company-safe-backends
@@ -343,7 +330,6 @@ e.g. to expand a snippet.
 The back-end should return nil for all commands it does not support or
 does not know about.  It should also be callable interactively and use
 `company-begin-backend' to start itself in that case."
-  :group 'company
   :type `(repeat
           (choice
            :tag "Back-end"
@@ -363,14 +349,12 @@ does not know about.  It should also be callable 
interactively and use
   "Hook run when company starts completing.
 The hook is called with one argument that is non-nil if the completion was
 started manually."
-  :group 'company
   :type 'hook)
 
 (defcustom company-completion-cancelled-hook nil
   "Hook run when company cancels completing.
 The hook is called with one argument that is non-nil if the completion was
 aborted manually."
-  :group 'company
   :type 'hook)
 
 (defcustom company-completion-finished-hook nil
@@ -379,12 +363,10 @@ The hook is called with the selected candidate as an 
argument.
 
 If you indend to use it to post-process candidates from a specific back-end,
 consider using the `post-completion' command instead."
-  :group 'company
   :type 'hook)
 
 (defcustom company-minimum-prefix-length 3
   "The minimum prefix length for automatic completion."
-  :group 'company
   :type '(integer :tag "prefix length"))
 
 (defcustom company-require-match 'company-explicit-action-p
@@ -393,7 +375,6 @@ This can be a function do determine if a match is required.
 
 This can be overridden by the back-end, if it returns t or 'never to
 'require-match.  `company-auto-complete' also takes precedence over this."
-  :group 'company
   :type '(choice (const :tag "Off" nil)
                  (function :tag "Predicate function")
                  (const :tag "On, if user interaction took place"
@@ -404,7 +385,6 @@ This can be overridden by the back-end, if it returns t or 
'never to
   "Determines when to auto-complete.
 If this is enabled, all characters from `company-auto-complete-chars' complete
 the selected completion.  This can also be a function."
-  :group 'company
   :type '(choice (const :tag "Off" nil)
                  (function :tag "Predicate function")
                  (const :tag "On, if user interaction took place"
@@ -421,7 +401,6 @@ This can also be a function, which is called with the new 
input and should
 return non-nil if company should auto-complete.
 
 A character that is part of a valid candidate never triggers auto-completion."
-  :group 'company
   :type '(choice (string :tag "Characters")
                  (set :tag "Syntax"
                       (const :tag "Whitespace" ?\ )
@@ -444,7 +423,6 @@ A character that is part of a valid candidate never 
triggers auto-completion."
   "The idle delay in seconds until automatic completions starts.
 A value of nil means never complete automatically, t means complete
 immediately when a prefix of `company-minimum-prefix-length' is reached."
-  :group 'company
   :type '(choice (const :tag "never (nil)" nil)
                  (const :tag "immediate (t)" t)
                  (number :tag "seconds")))
@@ -455,14 +433,12 @@ If this is t, it will complete after any command.  See 
`company-idle-delay'.
 
 Alternatively any command with a non-nil 'company-begin property is treated as
 if it was on this list."
-  :group 'company
   :type '(choice (const :tag "Any command" t)
                  (const :tag "Self insert command" '(self-insert-command))
                  (repeat :tag "Commands" function)))
 
 (defcustom company-show-numbers nil
   "If enabled, show quick-access numbers for the first ten candidates."
-  :group 'company
   :type '(choice (const :tag "off" nil)
                  (const :tag "on" t)))
 

commit 898d24473460332ab92bea5367b93ce6b8aa86f8
Author: Dmitry Gutov <address@hidden>
Date:   Wed Apr 10 00:17:03 2013 +0400

    Remove the As

diff --git a/company-abbrev.el b/company-abbrev.el
index a28c88d..0c4e327 100644
--- a/company-abbrev.el
+++ b/company-abbrev.el
@@ -1,4 +1,4 @@
-;;; company-abbrev.el --- A company-mode completion back-end for abbrev
+;;; company-abbrev.el --- company-mode completion back-end for abbrev
 
 ;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
@@ -35,7 +35,7 @@
 
 ;;;###autoload
 (defun company-abbrev (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for abbrev."
+  "`company-mode' completion back-end for abbrev."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-abbrev
diff --git a/company-clang.el b/company-clang.el
index 6844bb0..e014bd6 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -1,4 +1,4 @@
-;;; company-clang.el --- A company-mode completion back-end for clang
+;;; company-clang.el --- company-mode completion back-end for clang
 
 ;; Copyright (C) 2009, 2011, 2013  Free Software Foundation, Inc.
 
@@ -216,7 +216,7 @@ Prefix files (-include ...) can be selected with
     (company-template-move-to-first templ)))
 
 (defun company-clang (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for clang.
+  "`company-mode' completion back-end for clang.
 Clang is a parser for C and ObjC.  Clang version 1.1 or newer is required.
 
 Additional command line arguments can be specified in
diff --git a/company-css.el b/company-css.el
index 6546a10..11e195a 100644
--- a/company-css.el
+++ b/company-css.el
@@ -1,4 +1,4 @@
-;;; company-css.el --- A company-mode completion back-end for css-mode
+;;; company-css.el --- company-mode completion back-end for css-mode
 
 ;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
 
@@ -278,7 +278,7 @@ Returns \"\" if no property found, but feasible at this 
position."
 
 ;;;###autoload
 (defun company-css (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for `css-mode'."
+  "`company-mode' completion back-end for `css-mode'."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-css))
diff --git a/company-dabbrev-code.el b/company-dabbrev-code.el
index b98c17d..030e3be 100644
--- a/company-dabbrev-code.el
+++ b/company-dabbrev-code.el
@@ -1,4 +1,4 @@
-;;; company-dabbrev-code.el --- A dabbrev-like company-mode back-end for code
+;;; company-dabbrev-code.el --- dabbrev-like company-mode back-end for code
 
 ;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
 
@@ -68,7 +68,7 @@ See also `company-dabbrev-code-time-limit'."
 
 ;;;###autoload
 (defun company-dabbrev-code (command &optional arg &rest ignored)
-  "A dabbrev-like `company-mode' back-end for code.
+  "dabbrev-like `company-mode' back-end for code.
 The back-end looks for all symbols in the current buffer that aren't in
 comments or strings."
   (interactive (list 'interactive))
diff --git a/company-dabbrev.el b/company-dabbrev.el
index 5f43b83..6d43ee4 100644
--- a/company-dabbrev.el
+++ b/company-dabbrev.el
@@ -1,4 +1,4 @@
-;;; company-dabbrev.el --- A dabbrev-like company-mode completion back-end
+;;; company-dabbrev.el --- dabbrev-like company-mode completion back-end
 
 ;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
 
@@ -109,7 +109,7 @@ See also `company-dabbrev-time-limit'."
 
 ;;;###autoload
 (defun company-dabbrev (command &optional arg &rest ignored)
-  "A dabbrev-like `company-mode' completion back-end."
+  "dabbrev-like `company-mode' completion back-end."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-dabbrev))
diff --git a/company-eclim.el b/company-eclim.el
index b9ac242..ab6329e 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -1,4 +1,4 @@
-;;; company-eclim.el --- A company-mode completion back-end for eclim.
+;;; company-eclim.el --- company-mode completion back-end for eclim.
 
 ;; Copyright (C) 2009, 2011, 2013  Free Software Foundation, Inc.
 
@@ -154,7 +154,7 @@ eclim can only complete correctly when the buffer has been 
saved."
     (company-template-move-to-first templ)))
 
 (defun company-eclim (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for Eclim.
+  "`company-mode' completion back-end for Eclim.
 Eclim provides access to Eclipse Java IDE features for other editors.
 
 Eclim version 1.7.13 or newer (?) is required.
diff --git a/company-elisp.el b/company-elisp.el
index 338acc5..2046f6a 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -1,4 +1,4 @@
-;;; company-elisp.el --- A company-mode completion back-end for 
emacs-lisp-mode -*- lexical-binding: t -*-
+;;; company-elisp.el --- company-mode completion back-end for emacs-lisp-mode 
-*- lexical-binding: t -*-
 
 ;; Copyright (C) 2009, 2011-2013  Free Software Foundation, Inc.
 
@@ -191,7 +191,7 @@ first in the candidates list."
 
 ;;;###autoload
 (defun company-elisp (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for `emacs-lisp-mode'."
+  "`company-mode' completion back-end for `emacs-lisp-mode'."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-elisp))
diff --git a/company-etags.el b/company-etags.el
index 88b9fca..2bfca80 100644
--- a/company-etags.el
+++ b/company-etags.el
@@ -1,4 +1,4 @@
-;;; company-etags.el --- A company-mode completion back-end for etags
+;;; company-etags.el --- company-mode completion back-end for etags
 
 ;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
@@ -66,7 +66,7 @@ buffer automatically."
 
 ;;;###autoload
 (defun company-etags (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for etags."
+  "`company-mode' completion back-end for etags."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-etags))
diff --git a/company-files.el b/company-files.el
index ebb11c0..3b7a7d0 100644
--- a/company-files.el
+++ b/company-files.el
@@ -1,4 +1,4 @@
-;;; company-files.el --- A company-mode completion back-end for file names
+;;; company-files.el --- company-mode completion back-end for file names
 
 ;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
@@ -75,7 +75,7 @@
 
 ;;;###autoload
 (defun company-files (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end existing file names."
+  "`company-mode' completion back-end existing file names."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-files))
diff --git a/company-gtags.el b/company-gtags.el
index 59ad7c8..91c3929 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -1,4 +1,4 @@
-;;; company-gtags.el --- A company-mode completion back-end for GNU Global
+;;; company-gtags.el --- company-mode completion back-end for GNU Global
 
 ;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
@@ -70,7 +70,7 @@
 
 ;;;###autoload
 (defun company-gtags (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for GNU Global."
+  "`company-mode' completion back-end for GNU Global."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-gtags))
diff --git a/company-ispell.el b/company-ispell.el
index 8a73988..eee5c0c 100644
--- a/company-ispell.el
+++ b/company-ispell.el
@@ -1,4 +1,4 @@
-;;; company-ispell.el --- A company-mode completion back-end using ispell
+;;; company-ispell.el --- company-mode completion back-end using ispell
 
 ;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
@@ -51,7 +51,7 @@ If nil, use `ispell-complete-word-dict'."
 
 ;;;###autoload
 (defun company-ispell (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end using ispell."
+  "`company-mode' completion back-end using ispell."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-ispell))
diff --git a/company-keywords.el b/company-keywords.el
index 75d37d6..750540c 100644
--- a/company-keywords.el
+++ b/company-keywords.el
@@ -216,7 +216,7 @@
 
 ;;;###autoload
 (defun company-keywords (command &optional arg &rest ignored)
-  "A `company-mode' back-end for programming language keywords."
+  "`company-mode' back-end for programming language keywords."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-keywords))
diff --git a/company-nxml.el b/company-nxml.el
index 33d6f7b..62e6e31 100644
--- a/company-nxml.el
+++ b/company-nxml.el
@@ -1,4 +1,4 @@
-;;; company-nxml.el --- A company-mode completion back-end for nxml-mode
+;;; company-nxml.el --- company-mode completion back-end for nxml-mode
 
 ;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
@@ -121,7 +121,7 @@
 
 ;;;###autoload
 (defun company-nxml (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for `nxml-mode'."
+  "`company-mode' completion back-end for `nxml-mode'."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-nxml))
diff --git a/company-oddmuse.el b/company-oddmuse.el
index 8d60a2e..b76c87e 100644
--- a/company-oddmuse.el
+++ b/company-oddmuse.el
@@ -1,4 +1,4 @@
-;;; company-oddmuse.el --- A company-mode completion back-end for oddmuse-mode
+;;; company-oddmuse.el --- company-mode completion back-end for oddmuse-mode
 
 ;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
@@ -42,7 +42,7 @@
 
 ;;;###autoload
 (defun company-oddmuse (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for `oddmuse-mode'."
+  "`company-mode' completion back-end for `oddmuse-mode'."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-oddmuse))
diff --git a/company-pysmell.el b/company-pysmell.el
index fe36eef..063d8ea 100644
--- a/company-pysmell.el
+++ b/company-pysmell.el
@@ -1,4 +1,4 @@
-;;; company-pysmell.el --- A company-mode completion back-end for pysmell.el
+;;; company-pysmell.el --- company-mode completion back-end for pysmell.el
 
 ;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
@@ -53,7 +53,7 @@
 
 ;;;###autoload
 (defun company-pysmell (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for pysmell.
+  "`company-mode' completion back-end for pysmell.
 This requires pysmell.el and pymacs.el."
   (interactive (list 'interactive))
   (case command
diff --git a/company-ropemacs.el b/company-ropemacs.el
index bba9bcb..6cffbf1 100644
--- a/company-ropemacs.el
+++ b/company-ropemacs.el
@@ -1,4 +1,4 @@
-;;; company-ropemacs.el --- A company-mode completion back-end for pysmell.el
+;;; company-ropemacs.el --- company-mode completion back-end for pysmell.el
 
 ;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
@@ -57,7 +57,7 @@
       (cons (elt location 0) (elt location 1)))))
 
 (defun company-ropemacs (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for ropemacs."
+  "`company-mode' completion back-end for ropemacs."
   (interactive (list 'interactive))
   (case command
     (init (when (and (derived-mode-p 'python-mode)
diff --git a/company-semantic.el b/company-semantic.el
index c376710..66a23b3 100644
--- a/company-semantic.el
+++ b/company-semantic.el
@@ -1,4 +1,4 @@
-;;; company-semantic.el --- A company-mode back-end using CEDET Semantic
+;;; company-semantic.el --- company-mode back-end using CEDET Semantic
 
 ;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
@@ -111,7 +111,7 @@ Symbols are chained by \".\" or \"->\"."
 
 ;;;###autoload
 (defun company-semantic (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end using CEDET Semantic."
+  "`company-mode' completion back-end using CEDET Semantic."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-semantic))
diff --git a/company-tempo.el b/company-tempo.el
index 1dda49e..feea698 100644
--- a/company-tempo.el
+++ b/company-tempo.el
@@ -1,4 +1,4 @@
-;;; company-tempo.el --- A company-mode completion back-end for tempo
+;;; company-tempo.el --- company-mode completion back-end for tempo
 
 ;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
@@ -48,7 +48,7 @@
 
 ;;;###autoload
 (defun company-tempo (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for tempo."
+  "`company-mode' completion back-end for tempo."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-tempo
diff --git a/company-xcode.el b/company-xcode.el
index b558fe8..5903131 100644
--- a/company-xcode.el
+++ b/company-xcode.el
@@ -1,4 +1,4 @@
-;;; company-xcode.el --- A company-mode completion back-end for Xcode projects
+;;; company-xcode.el --- company-mode completion back-end for Xcode projects
 
 ;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
@@ -105,7 +105,7 @@ valid in most contexts."
                         company-xcode-tags))))))
 ;;;###autoload
 (defun company-xcode (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for Xcode projects."
+  "`company-mode' completion back-end for Xcode projects."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-xcode))
diff --git a/company.el b/company.el
index cbfa62f..86aff74 100644
--- a/company.el
+++ b/company.el
@@ -1839,7 +1839,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
    (point) (overlay-start company-pseudo-tooltip-overlay)))
 
 (defun company-pseudo-tooltip-frontend (command)
-  "A `company-mode' front-end similar to a tool-tip but based on overlays."
+  "`company-mode' front-end similar to a tool-tip but based on overlays."
   (case command
     (pre-command (company-pseudo-tooltip-hide-temporarily))
     (post-command
@@ -1909,7 +1909,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
     (setq company-preview-overlay nil)))
 
 (defun company-preview-frontend (command)
-  "A `company-mode' front-end showing the selection as if it had been 
inserted."
+  "`company-mode' front-end showing the selection as if it had been inserted."
   (case command
     (pre-command (company-preview-hide))
     (post-command (company-preview-show-at-point (point)))
@@ -2013,19 +2013,19 @@ Returns a negative number if the tooltip should be 
displayed above point."
     (company-echo-show)))
 
 (defun company-echo-frontend (command)
-  "A `company-mode' front-end showing the candidates in the echo area."
+  "`company-mode' front-end showing the candidates in the echo area."
   (case command
     (post-command (company-echo-show-soon 'company-echo-format))
     (hide (company-echo-hide))))
 
 (defun company-echo-strip-common-frontend (command)
-  "A `company-mode' front-end showing the candidates in the echo area."
+  "`company-mode' front-end showing the candidates in the echo area."
   (case command
     (post-command (company-echo-show-soon 'company-echo-strip-common-format))
     (hide (company-echo-hide))))
 
 (defun company-echo-metadata-frontend (command)
-  "A `company-mode' front-end showing the documentation in the echo area."
+  "`company-mode' front-end showing the documentation in the echo area."
   (case command
     (post-command (company-echo-show-when-idle 'company-fetch-metadata))
     (hide (company-echo-hide))))

commit 5c3f8acb7acb3214cf693e9842c5288fe810c5dc
Merge: 7e80033 ae0e0c7
Author: Dmitry Gutov <address@hidden>
Date:   Tue Apr 9 09:23:01 2013 -0700

    Merge pull request #95 from ruediger/typed-array-externs
    
    Typed array externs and console object


commit ae0e0c73b0bc0ad447d34b4900320e4f934de377
Author: Rüdiger Sonderfeld <address@hidden>
Date:   Tue Apr 9 18:20:02 2013 +0200

    Typed Array: remove TypedArray and ArrayBufferView.
    
    They are just interfaces.
    
    Signed-off-by: Rüdiger Sonderfeld <address@hidden>

diff --git a/js2-mode.el b/js2-mode.el
index 75c3214..06824bd 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -168,7 +168,7 @@
             XPathResult XMLHttpRequest
 
             ;; Khronos Typed Array Specification
-            ArrayBuffer ArrayBufferView TypedArray Uint8ClampedArray DataView
+            ArrayBuffer Uint8ClampedArray DataView
             Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array
             Float32Array Float64Array
 

commit 81f654a44addbe4376c18c9f7fc401b8103a606f
Author: Rüdiger Sonderfeld <address@hidden>
Date:   Tue Apr 9 16:51:59 2013 +0200

    Add console Object to browser externs.
    
    console is provided by at least Firefox and Chrome.
    
    Signed-off-by: Rüdiger Sonderfeld <address@hidden>

diff --git a/js2-mode.el b/js2-mode.el
index 15cb0c5..75c3214 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -170,7 +170,10 @@
             ;; Khronos Typed Array Specification
             ArrayBuffer ArrayBufferView TypedArray Uint8ClampedArray DataView
             Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array
-            Float32Array Float64Array))
+            Float32Array Float64Array
+
+            ;; console object.  Provided by at least Chrome and Firefox.
+            console))
   "Browser externs.
 You can cause these to be included or excluded with the custom
 variable `js2-include-browser-externs'.")

commit d5837b4f4aa8c9e393579432afaf14716b608309
Author: Rüdiger Sonderfeld <address@hidden>
Date:   Tue Apr 9 16:51:19 2013 +0200

    Add Typed Array Spec Externs.
    
    Signed-off-by: Rüdiger Sonderfeld <address@hidden>

diff --git a/js2-mode.el b/js2-mode.el
index 0853bac..15cb0c5 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -165,7 +165,12 @@
             DocumentRange Range RangeException
 
             ;; W3C XML
-            XPathResult XMLHttpRequest))
+            XPathResult XMLHttpRequest
+
+            ;; Khronos Typed Array Specification
+            ArrayBuffer ArrayBufferView TypedArray Uint8ClampedArray DataView
+            Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array
+            Float32Array Float64Array))
   "Browser externs.
 You can cause these to be included or excluded with the custom
 variable `js2-include-browser-externs'.")

commit 8774bc9596333d838cd941e0d8b27065b8002894
Author: Leo Liu <address@hidden>
Date:   Fri Apr 5 15:53:43 2013 +0800

    Fix #6: do not override split-window-preferred-function
    
    Use new user variable ggtags-split-window-function instead for
    customised behaviour.

diff --git a/ggtags.el b/ggtags.el
index 4d8671b..a41079f 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -93,6 +93,11 @@ If nil, use Emacs default."
                  integer)
   :group 'ggtags)
 
+(defcustom ggtags-split-window-function split-window-preferred-function
+  "A function to control how ggtags pops up the auxiliary window."
+  :type 'function
+  :group 'ggtags)
+
 (defvar ggtags-cache nil)               ; (ROOT TABLE DIRTY TIMESTAMP)
 
 (defvar ggtags-current-tag-name nil)
@@ -235,8 +240,7 @@ When called with prefix, ask the name and kind of tag."
   (ggtags-check-root-directory)
   (ggtags-navigation-mode +1)
   (ring-insert find-tag-marker-ring (point-marker))
-  (let ((split-window-preferred-function
-         (lambda (w) (split-window (frame-root-window w))))
+  (let ((split-window-preferred-function ggtags-split-window-function)
         (default-directory (ggtags-root-directory)))
     (compilation-start
      (if (or verbose (not buffer-file-name))
@@ -256,8 +260,7 @@ When called with prefix, ask the name and kind of tag."
   (interactive)
   (ggtags-ensure-global-buffer
     (ggtags-navigation-mode +1)
-    (let ((split-window-preferred-function
-           (lambda (w) (split-window (frame-root-window w)))))
+    (let ((split-window-preferred-function ggtags-split-window-function))
       (compile-goto-error))))
 
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)

commit 8dceda389115b397de48becc4b68a64f4dc4bbab
Author: Dmitry Gutov <address@hidden>
Date:   Fri Apr 5 00:07:27 2013 +0400

    Bump version in company.el

diff --git a/company.el b/company.el
index 13c61ee..cbfa62f 100644
--- a/company.el
+++ b/company.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6.6
+;; Version: 0.6.7
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x

commit ed643b908e0674ffc1aec9af2df5380ddfcedbb8
Author: Dmitry Gutov <address@hidden>
Date:   Fri Apr 5 00:02:43 2013 +0400

    company-elisp--candidates-predicate: Consider bindings without values
    
    * company-elisp-with-buffer: Bind company-elisp-detect-function-context to 
t.
    * Release 0.6.7.

diff --git a/NEWS.md b/NEWS.md
index b6000b7..9a8fc7d 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,9 @@
 # History of user-visible changes
 
+## 2013-04-01 (0.6.7)
+
+* Two `company-elisp` tweaks.
+
 ## 2013-04-01 (0.6.6)
 
 * `company-elisp` doesn't offer completions when typing the name and the
diff --git a/company-elisp.el b/company-elisp.el
index 000f30c..338acc5 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -157,24 +157,29 @@ first in the candidates list."
 
 (defun company-elisp--candidates-predicate (prefix)
   (let* ((completion-ignore-case nil)
-         (before (char-before (- (point) (length prefix)))))
+         (beg (- (point) (length prefix)))
+         (before (char-before beg)))
     (if (and company-elisp-detect-function-context
              (not (memq before '(?' ?`))))
         (if (and (eq before ?\()
                  (not
                   (save-excursion
                     (ignore-errors
-                      (up-list -2)
-                      (and (save-excursion
-                             (forward-char 1)
-                             (looking-at "[ \t\n]*("))
-                           (prog1 (search-backward "(")
-                             (forward-char 1))
-                           (looking-at company-elisp-var-binding-regexp))))))
+                      (goto-char (1- beg))
+                      (or (company-elisp--before-binding-varlist-p)
+                          (progn
+                            (up-list -1)
+                            (company-elisp--before-binding-varlist-p)))))))
             'fboundp
           'boundp)
       'company-elisp--predicate)))
 
+(defun company-elisp--before-binding-varlist-p ()
+  (save-excursion
+    (and (prog1 (search-backward "(")
+           (forward-char 1))
+         (looking-at company-elisp-var-binding-regexp))))
+
 (defun company-elisp--doc (symbol)
   (let* ((symbol (intern symbol))
          (doc (if (fboundp symbol)
diff --git a/company-tests.el b/company-tests.el
index fdc2189..d4ab0b7 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -225,37 +225,34 @@
      (setq major-mode 'emacs-lisp-mode)
      (re-search-backward "|")
      (replace-match "")
-     ,@body))
+     (let ((company-elisp-detect-function-context t))
+       ,@body)))
 
 (ert-deftest company-elisp-candidates-predicate ()
   (company-elisp-with-buffer
     "(foo ba|)"
-    (should (eq (let ((company-elisp-detect-function-context t))
-                  (company-elisp--candidates-predicate "ba"))
+    (should (eq (company-elisp--candidates-predicate "ba")
                 'boundp))
     (should (eq (let (company-elisp-detect-function-context)
                   (company-elisp--candidates-predicate "ba"))
                 'company-elisp--predicate)))
   (company-elisp-with-buffer
     "(foo| )"
-    (should (eq (let ((company-elisp-detect-function-context t))
-                  (company-elisp--candidates-predicate "foo"))
+    (should (eq (company-elisp--candidates-predicate "foo")
                 'fboundp))
     (should (eq (let (company-elisp-detect-function-context)
                   (company-elisp--candidates-predicate "foo"))
                 'company-elisp--predicate)))
   (company-elisp-with-buffer
     "(foo 'b|)"
-    (should (eq (let ((company-elisp-detect-function-context t))
-                  (company-elisp--candidates-predicate "b"))
+    (should (eq (company-elisp--candidates-predicate "b")
                 'company-elisp--predicate))))
 
 (ert-deftest company-elisp-candidates-predicate-in-docstring ()
   (company-elisp-with-buffer
    "(def foo () \"Doo be doo `ide|"
    (should (eq 'company-elisp--predicate
-               (let ((company-elisp-detect-function-context t))
-                 (company-elisp--candidates-predicate "ide"))))))
+               (company-elisp--candidates-predicate "ide")))))
 
 ;; This one's also an integration test.
 (ert-deftest company-elisp-candidates-recognizes-binding-form ()
@@ -273,6 +270,16 @@
       (should (equal '("when")
                      (company-elisp-candidates "wh"))))))
 
+(ert-deftest company-elisp-candidates-predicate-binding-without-value ()
+  (loop for (text prefix predicate) in '(("(let (foo|" "foo" boundp)
+                                         ("(let (foo (bar|" "bar" boundp)
+                                         ("(let (foo) (bar|" "bar" fboundp))
+        do
+        (eval `(company-elisp-with-buffer
+                 ,text
+                 (should (eq ',predicate
+                             (company-elisp--candidates-predicate 
,prefix)))))))
+
 (ert-deftest company-elisp-finds-vars ()
   (let ((obarray [boo bar baz backquote])
         (boo t)

commit 7e80033bef50bd077b335543275736a552889104
Merge: f713d6f da7ddff
Author: Dmitry Gutov <address@hidden>
Date:   Thu Apr 4 08:34:19 2013 -0700

    Merge pull request #93 from ruediger/use-asm
    
    Treat "use asm" as having side effects.


commit da7ddff57963996119c50d75b89db70fc83a5888
Author: Rüdiger Sonderfeld <address@hidden>
Date:   Thu Apr 4 15:16:27 2013 +0200

    Treat "use asm" as having side effects.
    
    Support for asm.js.  Change in `js2-node-has-side-effects'.
    
    Signed-off-by: Rüdiger Sonderfeld <address@hidden>

diff --git a/js2-mode.el b/js2-mode.el
index 10655c5..0853bac 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -4601,7 +4601,7 @@ You should use `js2-print-tree' instead of this function."
         (let ((expr (js2-expr-stmt-node-expr node)))
           (or (js2-node-has-side-effects expr)
               (when (js2-string-node-p expr)
-                (string= "use strict" (js2-string-node-value expr))))))
+                (member (js2-string-node-value expr) '("use strict" "use 
asm"))))))
        ((= tt js2-COMMA)
         (js2-node-has-side-effects (js2-infix-node-right node)))
        ((or (= tt js2-AND)

commit 6422b3e7efb554bbfc8b9d9f051402d9097573b1
Author: Dmitry Gutov <address@hidden>
Date:   Wed Apr 3 11:16:33 2013 +0400

    company-elisp--candidates-predicate: Consider backquote

diff --git a/company-elisp.el b/company-elisp.el
index faab0b0..000f30c 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -159,7 +159,7 @@ first in the candidates list."
   (let* ((completion-ignore-case nil)
          (before (char-before (- (point) (length prefix)))))
     (if (and company-elisp-detect-function-context
-             (not (eq before ?')))
+             (not (memq before '(?' ?`))))
         (if (and (eq before ?\()
                  (not
                   (save-excursion
diff --git a/company-tests.el b/company-tests.el
index 33437d8..fdc2189 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -250,6 +250,13 @@
                   (company-elisp--candidates-predicate "b"))
                 'company-elisp--predicate))))
 
+(ert-deftest company-elisp-candidates-predicate-in-docstring ()
+  (company-elisp-with-buffer
+   "(def foo () \"Doo be doo `ide|"
+   (should (eq 'company-elisp--predicate
+               (let ((company-elisp-detect-function-context t))
+                 (company-elisp--candidates-predicate "ide"))))))
+
 ;; This one's also an integration test.
 (ert-deftest company-elisp-candidates-recognizes-binding-form ()
   (let ((company-elisp-detect-function-context t)

commit 33d2acd2a8fa3ac7e6cb5f712baa8507662cf2c8
Author: Dmitry Gutov <address@hidden>
Date:   Mon Apr 1 09:04:45 2013 +0400

    company-manual-begin: Clear `explicit-action` when no candidates

diff --git a/NEWS.md b/NEWS.md
index 4a46891..b6000b7 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,6 +1,6 @@
 # History of user-visible changes
 
-## Next
+## 2013-04-01 (0.6.6)
 
 * `company-elisp` doesn't offer completions when typing the name and the
   arguments of a new function or macro definition, allowing to fall back to
diff --git a/company-tests.el b/company-tests.el
index 811e4cc..33437d8 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -148,6 +148,15 @@
         (company-call 'self-insert-command 1))
       (should (string= "ab " (buffer-string))))))
 
+(ert-deftest company-clears-explicit-action-when-no-matches ()
+  (with-temp-buffer
+    (company-mode)
+    (let (company-frontends
+          company-backends)
+      (company-call 'manual-begin) ;; fails
+      (should (null company-candidates))
+      (should (null (company-explicit-action-p))))))
+
 (ert-deftest company-pseudo-tooltip-does-not-get-displaced ()
   (with-temp-buffer
     (save-window-excursion
diff --git a/company.el b/company.el
index 35b0780..13c61ee 100644
--- a/company.el
+++ b/company.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6.5
+;; Version: 0.6.6
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x
@@ -895,7 +895,10 @@ can retrieve meta-data for them."
 (defun company-manual-begin ()
   (interactive)
   (setq company--explicit-action t)
-  (company-auto-begin))
+  (unwind-protect
+      (company-auto-begin)
+    (unless company-candidates
+      (setq company--explicit-action nil))))
 
 (defun company-other-backend (&optional backward)
   (interactive (list current-prefix-arg))

commit 8a23e481449111d0050e0250039ae8a0558807c0
Author: Dmitry Gutov <address@hidden>
Date:   Sun Mar 31 22:52:39 2013 +0400

    company-elisp: Don't complete defun name or arglist

diff --git a/NEWS.md b/NEWS.md
index 6297652..4a46891 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,11 @@
 # History of user-visible changes
 
+## Next
+
+* `company-elisp` doesn't offer completions when typing the name and the
+  arguments of a new function or macro definition, allowing to fall back to
+  other back-ends like `company-dabbrev-code`.
+
 ## 2013-03-30 (0.6.5)
 
 * Fixed keybindings when running in a terminal.
diff --git a/company-elisp.el b/company-elisp.el
index 53b4885..faab0b0 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -47,8 +47,9 @@ first in the candidates list."
 (defun company-elisp--prefix ()
   (let ((prefix (company-grab-symbol)))
     (if prefix
-        (unless (and (company-in-string-or-comment)
-                     (/= (char-before (- (point) (length prefix))) ?`))
+        (when (if (company-in-string-or-comment)
+                  (= (char-before (- (point) (length prefix))) ?`)
+                (company-elisp--should-complete))
           prefix)
       'stop)))
 
@@ -58,23 +59,49 @@ first in the candidates list."
       (facep symbol)
       (featurep symbol)))
 
+(defun company-elisp--fns-regexp (&rest names)
+  (concat "\\_<\\(?:cl-\\)?" (regexp-opt names) "\\*?\\_>"))
+
 (defvar company-elisp-parse-limit 30)
 (defvar company-elisp-parse-depth 100)
 
+(defvar company-elisp-defun-names '("defun" "defmacro" "defsubst"))
+
 (defvar company-elisp-var-binding-regexp
-  (concat "\\_<\\(?:cl-\\)?" (regexp-opt '("let" "defun" "defmacro" "defsubst"
-                                           "lambda" "lexical-let"))
-          "\\*?\\_>")
+  (apply #'company-elisp--fns-regexp "let" "lambda" "lexical-let"
+         company-elisp-defun-names)
   "Regular expression matching head of a multiple variable bindings form.")
 
 (defvar company-elisp-var-binding-regexp-1
-  (concat "\\_<\\(?:cl-\\)?" (regexp-opt '("dolist" "dotimes")) "\\_>")
+  (company-elisp--fns-regexp "dolist" "dotimes")
   "Regular expression matching head of a form with one variable binding.")
 
 (defvar company-elisp-fun-binding-regexp
-  (concat "\\_<\\(?:cl-\\)?" (regexp-opt '("flet" "labels")) "\\*?\\_>")
+  (company-elisp--fns-regexp "flet" "labels")
   "Regular expression matching head of a function bindings form.")
 
+(defvar company-elisp-defuns-regexp
+  (concat "([ \t\n]*"
+          (apply #'company-elisp--fns-regexp company-elisp-defun-names)))
+
+(defun company-elisp--should-complete ()
+  (let ((start (point))
+        (depth (car (syntax-ppss))))
+    (not
+     (when (> depth 0)
+       (save-excursion
+         (up-list (- depth))
+         (when (looking-at company-elisp-defuns-regexp)
+           (forward-char)
+           (forward-sexp 1)
+           (unless (= (point) start)
+             (condition-case nil
+                 (let ((args-end (scan-sexps (point) 2)))
+                   (or (null args-end)
+                       (> args-end start)))
+               (scan-error
+                t)))))))))
+
 (defun company-elisp--locals (prefix functions-p)
   (let ((regexp (concat "[ \t\n]*\\(\\_<" (regexp-quote prefix)
                         "\\(?:\\sw\\|\\s_\\)*\\_>\\)"))
diff --git a/company-tests.el b/company-tests.el
index 011b67f..811e4cc 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -213,6 +213,7 @@
   (declare (indent 0))
   `(with-temp-buffer
      (insert ,contents)
+     (setq major-mode 'emacs-lisp-mode)
      (re-search-backward "|")
      (replace-match "")
      ,@body))
@@ -332,3 +333,29 @@
     (let ((obarray [float-pi])
           (company-elisp-show-locals-first t))
       (should (equal '("float-pi") (company-elisp-candidates "f"))))))
+
+(ert-deftest company-elisp-shouldnt-complete-defun-name ()
+  (company-elisp-with-buffer
+    "(defun foob|)"
+    (should (null (company-elisp 'prefix)))))
+
+(ert-deftest company-elisp-should-complete-def-call ()
+  (company-elisp-with-buffer
+    "(defu|"
+    (should (equal "defu" (company-elisp 'prefix)))))
+
+(ert-deftest company-elisp-should-complete-in-defvar ()
+  ;; It will also complete the var name, at least for now.
+  (company-elisp-with-buffer
+    "(defvar abc de|"
+    (should (equal "de" (company-elisp 'prefix)))))
+
+(ert-deftest company-elisp-shouldnt-complete-in-defun-arglist ()
+  (company-elisp-with-buffer
+    "(defsubst foobar (ba|"
+    (should (null (company-elisp 'prefix)))))
+
+(ert-deftest company-elisp-prefix-in-defun-body ()
+  (company-elisp-with-buffer
+    "(defun foob ()|)"
+    (should (equal "" (company-elisp 'prefix)))))

commit 0259e7b94c7c6c00072454ade0716cb5d3646dbc
Author: Dmitry Gutov <address@hidden>
Date:   Sun Mar 31 19:58:49 2013 +0400

    company-grab-lisp-symbol -> company-elisp--prefix; mark other privates

diff --git a/company-elisp.el b/company-elisp.el
index a27edae..53b4885 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -44,7 +44,7 @@ first in the candidates list."
   :type '(choice (const :tag "Off" nil)
                  (const :tag "On" t)))
 
-(defun company-grab-lisp-symbol ()
+(defun company-elisp--prefix ()
   (let ((prefix (company-grab-symbol)))
     (if prefix
         (unless (and (company-in-string-or-comment)
@@ -52,7 +52,7 @@ first in the candidates list."
           prefix)
       'stop)))
 
-(defun company-elisp-predicate (symbol)
+(defun company-elisp--predicate (symbol)
   (or (boundp symbol)
       (fboundp symbol)
       (facep symbol)
@@ -75,7 +75,7 @@ first in the candidates list."
   (concat "\\_<\\(?:cl-\\)?" (regexp-opt '("flet" "labels")) "\\*?\\_>")
   "Regular expression matching head of a function bindings form.")
 
-(defun company-elisp-locals (prefix functions-p)
+(defun company-elisp--locals (prefix functions-p)
   (let ((regexp (concat "[ \t\n]*\\(\\_<" (regexp-quote prefix)
                         "\\(?:\\sw\\|\\s_\\)*\\_>\\)"))
         (pos (point))
@@ -114,9 +114,9 @@ first in the candidates list."
     res))
 
 (defun company-elisp-candidates (prefix)
-  (let* ((predicate (company-elisp-candidates-predicate prefix))
-         (locals (company-elisp-locals prefix (eq predicate 'fboundp)))
-         (globals (company-elisp-globals prefix predicate))
+  (let* ((predicate (company-elisp--candidates-predicate prefix))
+         (locals (company-elisp--locals prefix (eq predicate 'fboundp)))
+         (globals (company-elisp--globals prefix predicate))
          (locals (loop for local in locals
                        when (not (member local globals))
                        collect local)))
@@ -125,10 +125,10 @@ first in the candidates list."
                 (sort globals 'string<))
       (append locals globals))))
 
-(defun company-elisp-globals (prefix predicate)
+(defun company-elisp--globals (prefix predicate)
   (all-completions prefix obarray predicate))
 
-(defun company-elisp-candidates-predicate (prefix)
+(defun company-elisp--candidates-predicate (prefix)
   (let* ((completion-ignore-case nil)
          (before (char-before (- (point) (length prefix)))))
     (if (and company-elisp-detect-function-context
@@ -146,9 +146,9 @@ first in the candidates list."
                            (looking-at company-elisp-var-binding-regexp))))))
             'fboundp
           'boundp)
-      'company-elisp-predicate)))
+      'company-elisp--predicate)))
 
-(defun company-elisp-doc (symbol)
+(defun company-elisp--doc (symbol)
   (let* ((symbol (intern symbol))
          (doc (if (fboundp symbol)
                   (documentation symbol t)
@@ -164,10 +164,10 @@ first in the candidates list."
   (case command
     (interactive (company-begin-backend 'company-elisp))
     (prefix (and (eq (derived-mode-p 'emacs-lisp-mode) 'emacs-lisp-mode)
-                 (company-grab-lisp-symbol)))
+                 (company-elisp--prefix)))
     (candidates (company-elisp-candidates arg))
     (sorted company-elisp-show-locals-first)
-    (meta (company-elisp-doc arg))
+    (meta (company-elisp--doc arg))
     (doc-buffer (let ((symbol (intern arg)))
                   (save-window-excursion
                     (ignore-errors
diff --git a/company-tests.el b/company-tests.el
index d053965..011b67f 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -221,24 +221,24 @@
   (company-elisp-with-buffer
     "(foo ba|)"
     (should (eq (let ((company-elisp-detect-function-context t))
-                  (company-elisp-candidates-predicate "ba"))
+                  (company-elisp--candidates-predicate "ba"))
                 'boundp))
     (should (eq (let (company-elisp-detect-function-context)
-                  (company-elisp-candidates-predicate "ba"))
-                'company-elisp-predicate)))
+                  (company-elisp--candidates-predicate "ba"))
+                'company-elisp--predicate)))
   (company-elisp-with-buffer
     "(foo| )"
     (should (eq (let ((company-elisp-detect-function-context t))
-                  (company-elisp-candidates-predicate "foo"))
+                  (company-elisp--candidates-predicate "foo"))
                 'fboundp))
     (should (eq (let (company-elisp-detect-function-context)
-                  (company-elisp-candidates-predicate "foo"))
-                'company-elisp-predicate)))
+                  (company-elisp--candidates-predicate "foo"))
+                'company-elisp--predicate)))
   (company-elisp-with-buffer
     "(foo 'b|)"
     (should (eq (let ((company-elisp-detect-function-context t))
-                  (company-elisp-candidates-predicate "b"))
-                'company-elisp-predicate))))
+                  (company-elisp--candidates-predicate "b"))
+                'company-elisp--predicate))))
 
 ;; This one's also an integration test.
 (ert-deftest company-elisp-candidates-recognizes-binding-form ()
@@ -262,21 +262,21 @@
         (bar t)
         (baz t))
     (should (equal '("bar" "baz")
-                   (company-elisp-globals "ba" 'boundp)))))
+                   (company-elisp--globals "ba" 'boundp)))))
 
 (ert-deftest company-elisp-finds-functions ()
   (let ((obarray [when what whelp])
         (what t)
         (whelp t))
     (should (equal '("when")
-                   (company-elisp-globals "wh" 'fboundp)))))
+                   (company-elisp--globals "wh" 'fboundp)))))
 
 (ert-deftest company-elisp-finds-things ()
   (let ((obarray [when what whelp])
         (what t)
         (whelp t))
     (should (equal '("what" "whelp" "when")
-                   (sort (company-elisp-globals "wh" 'company-elisp-predicate)
+                   (sort (company-elisp--globals "wh" 
'company-elisp--predicate)
                          'string<)))))
 
 (ert-deftest company-elisp-locals-vars ()
@@ -286,7 +286,7 @@
          (lambda (boo baz)
            b|)))"
     (should (equal '("bar" "baz" "boo")
-                   (company-elisp-locals "b" nil)))))
+                   (company-elisp--locals "b" nil)))))
 
 (ert-deftest company-elisp-locals-single-var ()
   (company-elisp-with-buffer
@@ -294,7 +294,7 @@
        (dolist (item items)
          it|))"
     (should (equal '("itk" "item")
-                   (company-elisp-locals "it" nil)))))
+                   (company-elisp--locals "it" nil)))))
 
 (ert-deftest company-elisp-locals-funs ()
   (company-elisp-with-buffer
@@ -303,13 +303,13 @@
        (let ((fun 4))
          (f| )))"
     (should (equal '("fee" "foo")
-                   (sort (company-elisp-locals "f" t) 'string<)))))
+                   (sort (company-elisp--locals "f" t) 'string<)))))
 
 (ert-deftest company-elisp-locals-skips-current-varlist ()
   (company-elisp-with-buffer
     "(let ((foo 1)
            (f| )))"
-    (should (null (company-elisp-locals "f" nil)))))
+    (should (null (company-elisp--locals "f" nil)))))
 
 (ert-deftest company-elisp-show-locals-first ()
   (company-elisp-with-buffer

commit b446a994bb90e8a62cc7ff362c8e0421ef9c226f
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 30 22:34:35 2013 +0400

    company-elisp-fun-binding-regexp: Consider cl-flet*

diff --git a/company-elisp.el b/company-elisp.el
index 284775a..a27edae 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -72,7 +72,7 @@ first in the candidates list."
   "Regular expression matching head of a form with one variable binding.")
 
 (defvar company-elisp-fun-binding-regexp
-  (concat "\\_<\\(?:cl-\\)?" (regexp-opt '("flet" "labels")) "\\_>")
+  (concat "\\_<\\(?:cl-\\)?" (regexp-opt '("flet" "labels")) "\\*?\\_>")
   "Regular expression matching head of a function bindings form.")
 
 (defun company-elisp-locals (prefix functions-p)

commit ed75169bc3f458a25a192186c0d05bff8a54be36
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 30 22:31:38 2013 +0400

    company-pseudo-tooltip-frontend: Redraw less often when expanded upward

diff --git a/company.el b/company.el
index 4590683..35b0780 100644
--- a/company.el
+++ b/company.el
@@ -1797,7 +1797,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
                             args))
 
         (overlay-put ov 'company-column column)
-        (overlay-put ov 'company-height (abs height))))))
+        (overlay-put ov 'company-height height)))))
 
 (defun company-pseudo-tooltip-show-at-point (pos)
   (let ((col-row (company--col-row pos)))
@@ -1810,7 +1810,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
         (height (overlay-get company-pseudo-tooltip-overlay 'company-height)))
     (overlay-put company-pseudo-tooltip-overlay 'company-before
                  (apply 'company--replacement-string
-                        (company--create-lines selection height)
+                        (company--create-lines selection (abs height))
                         (overlay-get company-pseudo-tooltip-overlay
                                      'company-replacement-args)))))
 

commit fa89135e030bdea584b9c3f87992e82f6b3fe1ab
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 30 17:58:36 2013 +0400

    company-elisp-show-locals-first: Add keywords to the defcustom

diff --git a/company-elisp.el b/company-elisp.el
index d878db0..284775a 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -39,7 +39,10 @@ Functions are offered for completion only after ' and \(."
 
 (defcustom company-elisp-show-locals-first t
   "If enabled, locally bound variables and functions are displayed
-first in the candidates list.")
+first in the candidates list."
+  :group 'company
+  :type '(choice (const :tag "Off" nil)
+                 (const :tag "On" t)))
 
 (defun company-grab-lisp-symbol ()
   (let ((prefix (company-grab-symbol)))

commit 50293ad01f7ad9e1280a0b0845545516260f4505
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 30 07:12:31 2013 +0400

    company-elisp-var-binding-regexp: The three def macros also have cl versions

diff --git a/company-elisp.el b/company-elisp.el
index e4baca1..d878db0 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -59,8 +59,8 @@ first in the candidates list.")
 (defvar company-elisp-parse-depth 100)
 
 (defvar company-elisp-var-binding-regexp
-  (concat "\\_<" (regexp-opt '("let" "defun" "defmacro" "defsubst"
-                               "lambda" "lexical-let"))
+  (concat "\\_<\\(?:cl-\\)?" (regexp-opt '("let" "defun" "defmacro" "defsubst"
+                                           "lambda" "lexical-let"))
           "\\*?\\_>")
   "Regular expression matching head of a multiple variable bindings form.")
 

commit 4ff66327158ede1b470fc4616db1b68d9f561cd4
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 30 07:00:47 2013 +0400

    Change the summary in generated -pkg

diff --git a/Makefile b/Makefile
index d49adf3..de124c5 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ elpa: *.el
        mkdir -p "$$dir"; \
        cp `git ls-files '*.el' | xargs` company-$$version; \
        echo "(define-package \"company\" \"$$version\" \
-       \"extensible inline text completion mechanism\")" \
+       \"Modular in-buffer completion framework\")" \
        > "$$dir"/company-pkg.el; \
        tar cvf company-$$version.tar --mode 644 "$$dir"
 

commit 83cbc7d328415bdf7aedfa02ca3017d5cb16dd11
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 30 06:57:57 2013 +0400

    Release 0.6.5

diff --git a/NEWS.md b/NEWS.md
index f18fad5..6297652 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,6 +1,6 @@
 # History of user-visible changes
 
-## Next
+## 2013-03-30 (0.6.5)
 
 * Fixed keybindings when running in a terminal.
 * `company-elisp-show-locals-first`: new customizable variable.
diff --git a/company-elisp.el b/company-elisp.el
index e685c2f..e4baca1 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -1,6 +1,6 @@
 ;;; company-elisp.el --- A company-mode completion back-end for 
emacs-lisp-mode -*- lexical-binding: t -*-
 
-;; Copyright (C) 2009, 2011-2012  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011-2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
diff --git a/company.el b/company.el
index 2e7a8f1..4590683 100644
--- a/company.el
+++ b/company.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6.4
+;; Version: 0.6.5
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x

commit 9218392f6e80c0f24979259721b23e9e75d61002
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 30 06:50:23 2013 +0400

    Fix #6
    
    Same problem and solution as in capitaomorte/yasnippet#296.

diff --git a/NEWS.md b/NEWS.md
index fed0e2a..f18fad5 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* Fixed keybindings when running in a terminal.
 * `company-elisp-show-locals-first`: new customizable variable.
 * `company-elisp` shows more accurate and comprehensive candidates list.
 
diff --git a/company.el b/company.el
index ad0a649..2e7a8f1 100644
--- a/company.el
+++ b/company.el
@@ -490,7 +490,9 @@ The work-around consists of adding a newline.")
     (define-key keymap [up-mouse-1] 'ignore)
     (define-key keymap [up-mouse-3] 'ignore)
     (define-key keymap [return] 'company-complete-selection)
+    (define-key keymap (kbd "RET") 'company-complete-selection)
     (define-key keymap [tab] 'company-complete-common)
+    (define-key keymap (kbd "TAB") 'company-complete-common)
     (define-key keymap (kbd "<f1>") 'company-show-doc-buffer)
     (define-key keymap "\C-w" 'company-show-location)
     (define-key keymap "\C-s" 'company-search-candidates)

commit 3ac29fb27bc3809d04ce54f773dc5b3e3ccde78e
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 29 19:10:45 2013 +0400

    Fix NEWS entry

diff --git a/NEWS.md b/NEWS.md
index 374f69d..fed0e2a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -3,7 +3,7 @@
 ## Next
 
 * `company-elisp-show-locals-first`: new customizable variable.
-* `company-eclim` shows more accurate and comprehensive candidates.
+* `company-elisp` shows more accurate and comprehensive candidates list.
 
 ## 2013-03-26 (0.6.4)
 

commit d260c2486281f630301925a1d6d2ebcc16bea1b8
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 29 14:31:19 2013 +0400

    company.el: lexical-binding: t

diff --git a/company.el b/company.el
index 5635026..ad0a649 100644
--- a/company.el
+++ b/company.el
@@ -1,4 +1,4 @@
-;;; company.el --- Modular in-buffer completion framework
+;;; company.el --- Modular in-buffer completion framework  -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2009-2013  Free Software Foundation, Inc.
 

commit 42e431dc7f4a22b476884139aa4d8b73aebdd25c
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 29 13:58:22 2013 +0400

    company-elisp-candidates-predicate: Blacklist specific special forms

diff --git a/company-elisp.el b/company-elisp.el
index eec64f4..e685c2f 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -135,8 +135,12 @@ first in the candidates list.")
                   (save-excursion
                     (ignore-errors
                       (up-list -2)
-                      (forward-char 1)
-                      (looking-at " *(")))))
+                      (and (save-excursion
+                             (forward-char 1)
+                             (looking-at "[ \t\n]*("))
+                           (prog1 (search-backward "(")
+                             (forward-char 1))
+                           (looking-at company-elisp-var-binding-regexp))))))
             'fboundp
           'boundp)
       'company-elisp-predicate)))
diff --git a/company-tests.el b/company-tests.el
index 4fcb83c..d053965 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -242,15 +242,19 @@
 
 ;; This one's also an integration test.
 (ert-deftest company-elisp-candidates-recognizes-binding-form ()
-  (company-elisp-with-buffer
-    "(let ((foo 7) (wh| )))"
-    (let ((obarray [when what whelp])
-          (what 1)
-          (whelp 2)
-          (wisp 3))
+  (let ((company-elisp-detect-function-context t)
+        (obarray [when what whelp])
+        (what 1)
+        (whelp 2)
+        (wisp 3))
+    (company-elisp-with-buffer
+      "(let ((foo 7) (wh| )))"
       (should (equal '("what" "whelp")
-                     (let ((company-elisp-detect-function-context t))
-                       (company-elisp-candidates "wh")))))))
+                     (company-elisp-candidates "wh"))))
+    (company-elisp-with-buffer
+      "(cond ((null nil) (wh| )))"
+      (should (equal '("when")
+                     (company-elisp-candidates "wh"))))))
 
 (ert-deftest company-elisp-finds-vars ()
   (let ((obarray [boo bar baz backquote])

commit 36108c9f82d401113c2b87c18576e9835bd44e1c
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 29 13:26:32 2013 +0400

    company-elisp-candidates: Deal with duplicates

diff --git a/company-elisp.el b/company-elisp.el
index c862edb..eec64f4 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -1,4 +1,4 @@
-;;; company-elisp.el --- A company-mode completion back-end for emacs-lisp-mode
+;;; company-elisp.el --- A company-mode completion back-end for 
emacs-lisp-mode -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2009, 2011-2012  Free Software Foundation, Inc.
 
@@ -113,7 +113,10 @@ first in the candidates list.")
 (defun company-elisp-candidates (prefix)
   (let* ((predicate (company-elisp-candidates-predicate prefix))
          (locals (company-elisp-locals prefix (eq predicate 'fboundp)))
-         (globals (company-elisp-globals prefix predicate)))
+         (globals (company-elisp-globals prefix predicate))
+         (locals (loop for local in locals
+                       when (not (member local globals))
+                       collect local)))
     (if company-elisp-show-locals-first
         (append (sort locals 'string<)
                 (sort globals 'string<))
diff --git a/company-tests.el b/company-tests.el
index 0ca2e11..4fcb83c 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -320,3 +320,11 @@
         (should (eq t (company-elisp 'sorted)))
         (should (equal '("flee" "floo" "flop" "float-pi")
                        (company-elisp-candidates "fl")))))))
+
+(ert-deftest company-elisp-candidates-no-duplicates ()
+  (company-elisp-with-buffer
+    "(let ((float-pi 4))
+       f|)"
+    (let ((obarray [float-pi])
+          (company-elisp-show-locals-first t))
+      (should (equal '("float-pi") (company-elisp-candidates "f"))))))

commit fb0e4cf536171c8faedd1df612563a327bb7baae
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 29 12:36:13 2013 +0400

    company-elisp-show-locals-first: New defcustom

diff --git a/NEWS.md b/NEWS.md
index 2aced04..374f69d 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,10 @@
 # History of user-visible changes
 
+## Next
+
+* `company-elisp-show-locals-first`: new customizable variable.
+* `company-eclim` shows more accurate and comprehensive candidates.
+
 ## 2013-03-26 (0.6.4)
 
 * `company-eclim` shows valid completions after an opening paren.
diff --git a/company-elisp.el b/company-elisp.el
index 52126bd..c862edb 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -37,6 +37,10 @@ Functions are offered for completion only after ' and \(."
   :type '(choice (const :tag "Off" nil)
                  (const :tag "On" t)))
 
+(defcustom company-elisp-show-locals-first t
+  "If enabled, locally bound variables and functions are displayed
+first in the candidates list.")
+
 (defun company-grab-lisp-symbol ()
   (let ((prefix (company-grab-symbol)))
     (if prefix
@@ -107,9 +111,13 @@ Functions are offered for completion only after ' and \(."
     res))
 
 (defun company-elisp-candidates (prefix)
-  (let ((predicate (company-elisp-candidates-predicate prefix)))
-    (append (company-elisp-locals prefix (eq predicate 'fboundp))
-            (company-elisp-globals prefix predicate))))
+  (let* ((predicate (company-elisp-candidates-predicate prefix))
+         (locals (company-elisp-locals prefix (eq predicate 'fboundp)))
+         (globals (company-elisp-globals prefix predicate)))
+    (if company-elisp-show-locals-first
+        (append (sort locals 'string<)
+                (sort globals 'string<))
+      (append locals globals))))
 
 (defun company-elisp-globals (prefix predicate)
   (all-completions prefix obarray predicate))
@@ -148,6 +156,7 @@ Functions are offered for completion only after ' and \(."
     (prefix (and (eq (derived-mode-p 'emacs-lisp-mode) 'emacs-lisp-mode)
                  (company-grab-lisp-symbol)))
     (candidates (company-elisp-candidates arg))
+    (sorted company-elisp-show-locals-first)
     (meta (company-elisp-doc arg))
     (doc-buffer (let ((symbol (intern arg)))
                   (save-window-excursion
diff --git a/company-tests.el b/company-tests.el
index c9e52cb..0ca2e11 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -306,3 +306,17 @@
     "(let ((foo 1)
            (f| )))"
     (should (null (company-elisp-locals "f" nil)))))
+
+(ert-deftest company-elisp-show-locals-first ()
+  (company-elisp-with-buffer
+    "(let ((floo 1)
+           (flop 2)
+           (flee 3))
+       fl|)"
+    (let ((obarray [float-pi]))
+      (let (company-elisp-show-locals-first)
+        (should (eq nil (company-elisp 'sorted))))
+      (let ((company-elisp-show-locals-first t))
+        (should (eq t (company-elisp 'sorted)))
+        (should (equal '("flee" "floo" "flop" "float-pi")
+                       (company-elisp-candidates "fl")))))))

commit bcae310be39553776055e0d8bc6289555f6ed736
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 29 12:08:43 2013 +0400

    company-elisp-locals: Skip current varlist

diff --git a/company-elisp.el b/company-elisp.el
index 42e3fef..52126bd 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -80,30 +80,29 @@ Functions are offered for completion only after ' and \(."
             (save-excursion
               (when (eq (char-after) ?\()
                 (forward-char 1)
-                (skip-chars-forward " \t\n")
-                (cond
-                 ((looking-at (if functions-p
-                                  company-elisp-fun-binding-regexp
-                                company-elisp-var-binding-regexp))
-                  (down-list 1)
-                  (condition-case nil
-                      (dotimes (i company-elisp-parse-limit)
-                        (save-excursion
-                          (when (looking-at "[ \t\n]*(")
-                            (down-list 1))
-                          (and (looking-at regexp)
-                               ;; Don't add incomplete text as candidate.
-                               (not (eq (match-end 0) pos))
-                               (pushnew (match-string-no-properties 1) res)))
-                        (forward-sexp))
-                    (scan-error nil)))
-                 ((unless functions-p
-                    (looking-at company-elisp-var-binding-regexp-1))
-                  (down-list 1)
-                  (and (looking-at regexp)
-                       ;; Don't add incomplete text as candidate.
-                       (not (eq (match-end 0) pos))
-                       (pushnew (match-string-no-properties 1) res))))))))
+                (when (ignore-errors
+                        (save-excursion (forward-list)
+                                        (<= (point) pos)))
+                  (skip-chars-forward " \t\n")
+                  (cond
+                   ((looking-at (if functions-p
+                                    company-elisp-fun-binding-regexp
+                                  company-elisp-var-binding-regexp))
+                    (down-list 1)
+                    (condition-case nil
+                        (dotimes (i company-elisp-parse-limit)
+                          (save-excursion
+                            (when (looking-at "[ \t\n]*(")
+                              (down-list 1))
+                            (when (looking-at regexp)
+                              (pushnew (match-string-no-properties 1) res)))
+                          (forward-sexp))
+                      (scan-error nil)))
+                   ((unless functions-p
+                      (looking-at company-elisp-var-binding-regexp-1))
+                    (down-list 1)
+                    (when (looking-at regexp)
+                      (pushnew (match-string-no-properties 1) res)))))))))
       (scan-error nil))
     res))
 
diff --git a/company-tests.el b/company-tests.el
index 77ccee7..c9e52cb 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -300,3 +300,9 @@
          (f| )))"
     (should (equal '("fee" "foo")
                    (sort (company-elisp-locals "f" t) 'string<)))))
+
+(ert-deftest company-elisp-locals-skips-current-varlist ()
+  (company-elisp-with-buffer
+    "(let ((foo 1)
+           (f| )))"
+    (should (null (company-elisp-locals "f" nil)))))

commit d0963a5db772b31f77f8a34700cfa401906302fd
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 29 11:48:03 2013 +0400

    company-elisp-locals: Differentiate local function and variable bindings

diff --git a/company-elisp.el b/company-elisp.el
index b6e5961..42e3fef 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -54,51 +54,63 @@ Functions are offered for completion only after ' and \(."
 (defvar company-elisp-parse-limit 30)
 (defvar company-elisp-parse-depth 100)
 
-(defvar company-elisp-binding-regexp
-  (concat "([ \t\n]*\\_<" (regexp-opt '("let" "defun" "defmacro" "defsubst"
-                                        "lambda" "lexical-let" "flet" 
"labels"))
-          "\\*?")
-  "Regular expression matching sexps containing variable bindings.")
+(defvar company-elisp-var-binding-regexp
+  (concat "\\_<" (regexp-opt '("let" "defun" "defmacro" "defsubst"
+                               "lambda" "lexical-let"))
+          "\\*?\\_>")
+  "Regular expression matching head of a multiple variable bindings form.")
 
-(defvar company-elisp-binding-regexp-1
-  (concat "([ \t\n]*\\_<" (regexp-opt '("dolist" "dotimes")))
-  "Regular expression matching sexps containing one variable binding.")
+(defvar company-elisp-var-binding-regexp-1
+  (concat "\\_<\\(?:cl-\\)?" (regexp-opt '("dolist" "dotimes")) "\\_>")
+  "Regular expression matching head of a form with one variable binding.")
 
-(defun company-elisp-locals (prefix)
+(defvar company-elisp-fun-binding-regexp
+  (concat "\\_<\\(?:cl-\\)?" (regexp-opt '("flet" "labels")) "\\_>")
+  "Regular expression matching head of a function bindings form.")
+
+(defun company-elisp-locals (prefix functions-p)
   (let ((regexp (concat "[ \t\n]*\\(\\_<" (regexp-quote prefix)
                         "\\(?:\\sw\\|\\s_\\)*\\_>\\)"))
         (pos (point))
         res)
-    (ignore-errors
-      (save-excursion
-        (dotimes (i company-elisp-parse-depth)
-          (up-list -1)
-          (save-excursion
-            (cond
-             ((looking-at company-elisp-binding-regexp)
-              (down-list 2)
-              (ignore-errors
-                (dotimes (i company-elisp-parse-limit)
-                  (save-excursion
-                    (when (looking-at "[ \t\n]*(")
-                      (down-list 1))
-                    (and (looking-at regexp)
-                         ;; Don't add incomplete text as candidate.
-                         (not (eq (match-end 0) pos))
-                         (push (match-string-no-properties 1) res)))
-                  (forward-sexp))))
-             ((looking-at company-elisp-binding-regexp-1)
-              (down-list 2)
-              (and (looking-at regexp)
-                   ;; Don't add incomplete text as candidate.
-                   (not (eq (match-end 0) pos))
-                   (pushnew (match-string-no-properties 1) res))))))))
+    (condition-case nil
+        (save-excursion
+          (dotimes (i company-elisp-parse-depth)
+            (up-list -1)
+            (save-excursion
+              (when (eq (char-after) ?\()
+                (forward-char 1)
+                (skip-chars-forward " \t\n")
+                (cond
+                 ((looking-at (if functions-p
+                                  company-elisp-fun-binding-regexp
+                                company-elisp-var-binding-regexp))
+                  (down-list 1)
+                  (condition-case nil
+                      (dotimes (i company-elisp-parse-limit)
+                        (save-excursion
+                          (when (looking-at "[ \t\n]*(")
+                            (down-list 1))
+                          (and (looking-at regexp)
+                               ;; Don't add incomplete text as candidate.
+                               (not (eq (match-end 0) pos))
+                               (pushnew (match-string-no-properties 1) res)))
+                        (forward-sexp))
+                    (scan-error nil)))
+                 ((unless functions-p
+                    (looking-at company-elisp-var-binding-regexp-1))
+                  (down-list 1)
+                  (and (looking-at regexp)
+                       ;; Don't add incomplete text as candidate.
+                       (not (eq (match-end 0) pos))
+                       (pushnew (match-string-no-properties 1) res))))))))
+      (scan-error nil))
     res))
 
 (defun company-elisp-candidates (prefix)
-  (append (company-elisp-locals prefix)
-          (company-elisp-globals prefix
-                                 (company-elisp-candidates-predicate prefix))))
+  (let ((predicate (company-elisp-candidates-predicate prefix)))
+    (append (company-elisp-locals prefix (eq predicate 'fboundp))
+            (company-elisp-globals prefix predicate))))
 
 (defun company-elisp-globals (prefix predicate)
   (all-completions prefix obarray predicate))
diff --git a/company-tests.el b/company-tests.el
index 30d898b..77ccee7 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -240,7 +240,7 @@
                   (company-elisp-candidates-predicate "b"))
                 'company-elisp-predicate))))
 
-;; Mix it up with an integration test.
+;; This one's also an integration test.
 (ert-deftest company-elisp-candidates-recognizes-binding-form ()
   (company-elisp-with-buffer
     "(let ((foo 7) (wh| )))"
@@ -274,3 +274,29 @@
     (should (equal '("what" "whelp" "when")
                    (sort (company-elisp-globals "wh" 'company-elisp-predicate)
                          'string<)))))
+
+(ert-deftest company-elisp-locals-vars ()
+  (company-elisp-with-buffer
+    "(let ((foo 5) (bar 6))
+       (cl-labels ((borg ()))
+         (lambda (boo baz)
+           b|)))"
+    (should (equal '("bar" "baz" "boo")
+                   (company-elisp-locals "b" nil)))))
+
+(ert-deftest company-elisp-locals-single-var ()
+  (company-elisp-with-buffer
+    "(dotimes (itk 100)
+       (dolist (item items)
+         it|))"
+    (should (equal '("itk" "item")
+                   (company-elisp-locals "it" nil)))))
+
+(ert-deftest company-elisp-locals-funs ()
+  (company-elisp-with-buffer
+    "(cl-labels ((foo ())
+                 (fee ()))
+       (let ((fun 4))
+         (f| )))"
+    (should (equal '("fee" "foo")
+                   (sort (company-elisp-locals "f" t) 'string<)))))

commit 8427b8f1edd77234349930f440b2f03bf519221b
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 29 09:09:41 2013 +0400

    company-elisp-candidates: Recognize when inside varlist
    
    * Extract -candidates-predicate and -globals.
    * Add tests.
    * Rename -parse-local to -locals, accept just one argument.

diff --git a/company-elisp.el b/company-elisp.el
index 986cd3d..b6e5961 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -64,10 +64,11 @@ Functions are offered for completion only after ' and \(."
   (concat "([ \t\n]*\\_<" (regexp-opt '("dolist" "dotimes")))
   "Regular expression matching sexps containing one variable binding.")
 
-(defun company-elisp-parse-local (prefix vars)
+(defun company-elisp-locals (prefix)
   (let ((regexp (concat "[ \t\n]*\\(\\_<" (regexp-quote prefix)
                         "\\(?:\\sw\\|\\s_\\)*\\_>\\)"))
-        (pos (point)))
+        (pos (point))
+        res)
     (ignore-errors
       (save-excursion
         (dotimes (i company-elisp-parse-depth)
@@ -84,27 +85,39 @@ Functions are offered for completion only after ' and \(."
                     (and (looking-at regexp)
                          ;; Don't add incomplete text as candidate.
                          (not (eq (match-end 0) pos))
-                         (add-to-list 'vars (match-string-no-properties 1))))
+                         (push (match-string-no-properties 1) res)))
                   (forward-sexp))))
              ((looking-at company-elisp-binding-regexp-1)
               (down-list 2)
               (and (looking-at regexp)
                    ;; Don't add incomplete text as candidate.
                    (not (eq (match-end 0) pos))
-                   (add-to-list 'vars (match-string-no-properties 1)))))))))
-    vars))
+                   (pushnew (match-string-no-properties 1) res))))))))
+    res))
 
 (defun company-elisp-candidates (prefix)
+  (append (company-elisp-locals prefix)
+          (company-elisp-globals prefix
+                                 (company-elisp-candidates-predicate prefix))))
+
+(defun company-elisp-globals (prefix predicate)
+  (all-completions prefix obarray predicate))
+
+(defun company-elisp-candidates-predicate (prefix)
   (let* ((completion-ignore-case nil)
-         (before (char-before (- (point) (length prefix))))
-         (predicate (if (and company-elisp-detect-function-context
-                             (not (eq before ?')))
-                        (if (eq before ?\()
-                            'fboundp
-                          'boundp)
-                      'company-elisp-predicate))
-         (candidates (all-completions prefix obarray predicate)))
-    (company-elisp-parse-local prefix candidates)))
+         (before (char-before (- (point) (length prefix)))))
+    (if (and company-elisp-detect-function-context
+             (not (eq before ?')))
+        (if (and (eq before ?\()
+                 (not
+                  (save-excursion
+                    (ignore-errors
+                      (up-list -2)
+                      (forward-char 1)
+                      (looking-at " *(")))))
+            'fboundp
+          'boundp)
+      'company-elisp-predicate)))
 
 (defun company-elisp-doc (symbol)
   (let* ((symbol (intern symbol))
diff --git a/company-tests.el b/company-tests.el
index 5d08c94..30d898b 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -208,3 +208,69 @@
     (apply command args)
     (let ((this-command command))
       (run-hooks 'post-command-hook))))
+
+(defmacro company-elisp-with-buffer (contents &rest body)
+  (declare (indent 0))
+  `(with-temp-buffer
+     (insert ,contents)
+     (re-search-backward "|")
+     (replace-match "")
+     ,@body))
+
+(ert-deftest company-elisp-candidates-predicate ()
+  (company-elisp-with-buffer
+    "(foo ba|)"
+    (should (eq (let ((company-elisp-detect-function-context t))
+                  (company-elisp-candidates-predicate "ba"))
+                'boundp))
+    (should (eq (let (company-elisp-detect-function-context)
+                  (company-elisp-candidates-predicate "ba"))
+                'company-elisp-predicate)))
+  (company-elisp-with-buffer
+    "(foo| )"
+    (should (eq (let ((company-elisp-detect-function-context t))
+                  (company-elisp-candidates-predicate "foo"))
+                'fboundp))
+    (should (eq (let (company-elisp-detect-function-context)
+                  (company-elisp-candidates-predicate "foo"))
+                'company-elisp-predicate)))
+  (company-elisp-with-buffer
+    "(foo 'b|)"
+    (should (eq (let ((company-elisp-detect-function-context t))
+                  (company-elisp-candidates-predicate "b"))
+                'company-elisp-predicate))))
+
+;; Mix it up with an integration test.
+(ert-deftest company-elisp-candidates-recognizes-binding-form ()
+  (company-elisp-with-buffer
+    "(let ((foo 7) (wh| )))"
+    (let ((obarray [when what whelp])
+          (what 1)
+          (whelp 2)
+          (wisp 3))
+      (should (equal '("what" "whelp")
+                     (let ((company-elisp-detect-function-context t))
+                       (company-elisp-candidates "wh")))))))
+
+(ert-deftest company-elisp-finds-vars ()
+  (let ((obarray [boo bar baz backquote])
+        (boo t)
+        (bar t)
+        (baz t))
+    (should (equal '("bar" "baz")
+                   (company-elisp-globals "ba" 'boundp)))))
+
+(ert-deftest company-elisp-finds-functions ()
+  (let ((obarray [when what whelp])
+        (what t)
+        (whelp t))
+    (should (equal '("when")
+                   (company-elisp-globals "wh" 'fboundp)))))
+
+(ert-deftest company-elisp-finds-things ()
+  (let ((obarray [when what whelp])
+        (what t)
+        (whelp t))
+    (should (equal '("what" "whelp" "when")
+                   (sort (company-elisp-globals "wh" 'company-elisp-predicate)
+                         'string<)))))

commit f5e957045bb1f45f2aef8fd2ff43828e8a19891f
Author: Leo Liu <address@hidden>
Date:   Thu Mar 28 10:48:43 2013 +0800

    Comment fix

diff --git a/ggtags.el b/ggtags.el
index f2c6da2..4d8671b 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.6.2
+;; Version: 0.6.3
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -23,8 +23,30 @@
 
 ;;; Commentary:
 
-;; Use GNU Global source code tagging system in Emacs.
-;; http://www.gnu.org/software/global
+;; A package to integrate GNU Global source code tagging system
+;; (http://www.gnu.org/software/global) with Emacs.
+;;
+;; Usage:
+;;
+;; Type `M-x ggtags-mode' to enable the minor mode, or as usual enable
+;; it in your desired major mode hooks. When the mode is on the symbol
+;; at point is underlined if it is a valid (definition) tag.
+;;
+;; `M-.' finds definition or references according to the context at
+;; point, i.e. if point is at a definition tag find references and
+;; vice versa. `C-u M-.' is verbose and will ask you the name - with
+;; completion - and the type of tag to search.
+;;
+;; If multiple matches are found, navigation mode is entered. In this
+;; mode, `M-n' and `M-p' moves to next and previous match, `M-}' and
+;; `M-{' to next and previous file respectively. `M-o' toggles between
+;; full and abbreviated displays of file names in the auxiliary popup
+;; window. When you locate the right match, press RET to finish which
+;; hides the auxiliary window and exits navigation mode. You can
+;; resume the search using `M-,'. To abort the search press `M-*'.
+;;
+;; Normally after a few searches a dozen buffers are created visiting
+;; files tracked by GNU Global. `C-c M-k' helps clean them up.
 
 ;;; Code:
 

commit e7dc3a7617d84b0f6955d0921a9143bbff2ba4ab
Author: Leo Liu <address@hidden>
Date:   Tue Mar 26 14:06:53 2013 +0800

    Fix #4: handle buffers not visiting files more gracefully

diff --git a/ggtags.el b/ggtags.el
index bc31168..f2c6da2 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -217,10 +217,10 @@ When called with prefix, ask the name and kind of tag."
          (lambda (w) (split-window (frame-root-window w))))
         (default-directory (ggtags-root-directory)))
     (compilation-start
-     (if verbose
+     (if (or verbose (not buffer-file-name))
          (format "global %s %s \"%s\""
                  ggtags-global-options
-                 (if (y-or-n-p "Kind (y for definition n for reference)? ")
+                 (if (y-or-n-p "Find definition (n for reference)? ")
                      "" "-r")
                  name)
        (format "global %s --from-here=%d:%s \"%s\""

commit 8ec2c2db395f14ab194cd585150b8cbc6dadf42f
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 26 08:18:00 2013 +0400

    company-eclim: Get valid completions just after an opening paren

diff --git a/NEWS.md b/NEWS.md
index ebb0dc6..2aced04 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## 2013-03-26 (0.6.4)
 
+* `company-eclim` shows valid completions after an opening paren.
 * Expanded template does not get removed until the point leaves it.  After your
   input the last argument in a method call expanded by `company-eclim`, you can
   press `<tab>` once more, to jump after the closing paren.  No other bundled
diff --git a/company-eclim.el b/company-eclim.el
index b0444c0..b9ac242 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -120,7 +120,8 @@ eclim can only complete correctly when the buffer has been 
saved."
                               (company-eclim--call-process
                                "java_complete" "-p" 
(company-eclim--project-name)
                                "-f" project-file
-                               "-o" (number-to-string (1- (point)))
+                               "-o" (number-to-string
+                                     (company-eclim--search-point prefix))
                                "-e" "utf-8"
                                "-l" "standard"))))
       (let* ((meta (cdr (assoc 'info item)))
@@ -131,6 +132,11 @@ eclim can only complete correctly when the buffer has been 
saved."
   (let ((completion-ignore-case nil))
     (all-completions prefix company-eclim--doc)))
 
+(defun company-eclim--search-point (prefix)
+  (if (or (plusp (length prefix)) (eq (char-before) ?.))
+      (1- (point))
+    (point)))
+
 (defun company-eclim--meta (candidate)
   (gethash candidate company-eclim--doc))
 

commit 35e38bb102b04fa59f64e9bfe7b693d2082d748a
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 26 08:04:40 2013 +0400

    company-template: Hold off on removing the template until point leaves

diff --git a/NEWS.md b/NEWS.md
index 6de6d11..ebb0dc6 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,12 @@
 # History of user-visible changes
 
+## 2013-03-26 (0.6.4)
+
+* Expanded template does not get removed until the point leaves it.  After your
+  input the last argument in a method call expanded by `company-eclim`, you can
+  press `<tab>` once more, to jump after the closing paren.  No other bundled
+  back-ends are affected.
+
 ## 2013-03-25 (0.6.3)
 
 * New tooltip face colors used on themes with light background.
diff --git a/company-template.el b/company-template.el
index 05389ac..ffceda1 100644
--- a/company-template.el
+++ b/company-template.el
@@ -39,7 +39,9 @@
 (defun company-template-templates-at (pos)
   (let (os)
     (dolist (o (overlays-at pos))
-      (when (overlay-get o 'company-template-fields)
+      ;; FIXME: Always return the whole list of templates?
+      ;; We remove templates not at point after every command.
+      (when (memq o company-template--buffer-templates)
         (push o os)))
     os))
 
@@ -121,11 +123,9 @@
 
 (defun company-template-clean-up (&optional pos)
   "Clean up all templates that don't contain POS."
-  (unless pos (setq pos (point)))
-  (let ((local-ovs (overlays-in (- pos 2) pos)))
+  (let ((local-ovs (overlays-at (or pos (point)))))
     (dolist (templ company-template--buffer-templates)
-      (unless (and (memq templ local-ovs)
-                   (overlay-get templ 'company-template-fields))
+      (unless (memq templ local-ovs)
         (company-template-remove-template templ)))))
 
 ;; hooks 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/company-tests.el b/company-tests.el
index 55675c9..5d08c94 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -73,8 +73,7 @@
                      (prefix "a")
                      (candidates '("a" "ab" "ac")))))))
       (let (this-command)
-        (company-complete))
-      (company-post-command)
+        (company-call 'complete))
       (should (eq 3 company-candidates-length)))))
 
 (ert-deftest company-require-match-explicit ()
@@ -91,8 +90,7 @@
       (let (this-command)
         (company-complete))
       (let ((last-command-event ?e))
-        (self-insert-command 1))
-      (company-post-command)
+        (company-call 'self-insert-command 1))
       (should (eq 2 company-candidates-length))
       (should (eq 3 (point))))))
 
@@ -110,8 +108,7 @@
       (company-idle-begin (current-buffer) (selected-window)
                           (buffer-chars-modified-tick) (point))
       (let ((last-command-event ?e))
-        (self-insert-command 1))
-      (company-post-command)
+        (company-call 'self-insert-command 1))
       (should (eq nil company-candidates-length))
       (should (eq 4 (point))))))
 
@@ -130,8 +127,7 @@
       (let (this-command)
         (company-complete))
       (let ((last-command-event ? ))
-        (self-insert-command 1))
-      (company-post-command)
+        (company-call 'self-insert-command 1))
       (should (string= "abcd " (buffer-string))))))
 
 (ert-deftest company-no-auto-complete-when-idle ()
@@ -149,8 +145,7 @@
       (company-idle-begin (current-buffer) (selected-window)
                           (buffer-chars-modified-tick) (point))
       (let ((last-command-event ? ))
-        (self-insert-command 1))
-      (company-post-command)
+        (company-call 'self-insert-command 1))
       (should (string= "ab " (buffer-string))))))
 
 (ert-deftest company-pseudo-tooltip-does-not-get-displaced ()
@@ -165,8 +160,51 @@
              (list (lambda (c &optional arg)
                      (case c (prefix "") (candidates '("a" "b" "c")))))))
         (let (this-command)
-          (company-complete))
-        (company-post-command)
-        (open-line 1)
-        (company-post-command)
+          (company-call 'complete))
+        (company-call 'open-line 1)
         (should (eq 2 (overlay-start company-pseudo-tooltip-overlay)))))))
+
+(ert-deftest company-template-removed-after-the-last-jump ()
+  (with-temp-buffer
+    (insert "{ }")
+    (goto-char 2)
+    (let ((tpl (company-template-declare-template (point) (1- (point-max)))))
+      (save-excursion
+        (dotimes (i 2)
+          (insert " ")
+          (company-template-add-field tpl (point) "foo")
+          (forward-char 3)))
+      (company-call 'template-forward-field)
+      (should (= 3 (point)))
+      (company-call 'template-forward-field)
+      (should (= 7 (point)))
+      (company-call 'template-forward-field)
+      (should (= 11 (point)))
+      (should (zerop (length (overlay-get tpl 'company-template-fields))))
+      (should (null (overlay-buffer tpl))))))
+
+(ert-deftest company-template-removed-after-input-and-jump ()
+  (with-temp-buffer
+    (insert "{ }")
+    (goto-char 2)
+    (let ((tpl (company-template-declare-template (point) (1- (point-max)))))
+      (save-excursion
+        (insert " ")
+        (company-template-add-field tpl (point) "bar"))
+      (company-call 'template-move-to-first tpl)
+      (should (= 3 (point)))
+      (dolist (c (string-to-list "tee"))
+        (let ((last-command-event c))
+          (company-call 'self-insert-command 1)))
+      (should (string= "{ tee }" (buffer-string)))
+      (should (overlay-buffer tpl))
+      (company-call 'template-forward-field)
+      (should (= 7 (point)))
+      (should (null (overlay-buffer tpl))))))
+
+(defun company-call (name &rest args)
+  (let* ((maybe (intern (format "company-%s" name)))
+         (command (if (fboundp maybe) maybe name)))
+    (apply command args)
+    (let ((this-command command))
+      (run-hooks 'post-command-hook))))
diff --git a/company.el b/company.el
index 5680735..5635026 100644
--- a/company.el
+++ b/company.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6.3
+;; Version: 0.6.4
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x

commit 99efa0e85d46f3dff2185d5439704aa809403084
Author: Leo Liu <address@hidden>
Date:   Mon Mar 25 20:45:54 2013 +0800

    Give higher priority to ggtags-navigation-mode
    
    or modes such as view-mode may shadow its key bindings.

diff --git a/ggtags.el b/ggtags.el
index 9992eaf..bc31168 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -515,5 +515,14 @@ When called with prefix, ask the name and kind of tag."
       (setq he-expand-list (cdr he-expand-list))
       t)))
 
+;;; Finish up
+
+;; Higher priority for `ggtags-navigation-mode' to avoid being
+;; hijacked by modes such as `view-mode'.
+(defvar ggtags-mode-map-alist
+  `((ggtags-navigation-mode . ,ggtags-navigation-mode-map)))
+
+(add-to-list 'emulation-mode-map-alists 'ggtags-mode-map-alist)
+
 (provide 'ggtags)
 ;;; ggtags.el ends here

commit cdebad70a0873c0f9eca7b572aebe8b9a6f203e2
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 25 13:59:31 2013 +0400

    Add new tooltip face colors

diff --git a/NEWS.md b/NEWS.md
index cc21755..6de6d11 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,7 +1,8 @@
 # History of user-visible changes
 
-## Next
+## 2013-03-25 (0.6.3)
 
+* New tooltip face colors used on themes with light background.
 * Pseudo-tooltip stays up-to-date when text is inserted after the point.
 * Fixed `company-require-match` mechanics.
 
diff --git a/company.el b/company.el
index 078400f..5680735 100644
--- a/company.el
+++ b/company.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6.2
+;; Version: 0.6.3
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x
@@ -86,14 +86,20 @@
   :group 'matching)
 
 (defface company-tooltip
-  '((t :background "yellow"
-       :foreground "black"))
+  '((default :foreground "black")
+    (((class color) (min-colors 88) (background light))
+     (:background "cornsilk"))
+    (((class color) (min-colors 88) (background dark))
+     (:background "yellow")))
   "Face used for the tool tip."
   :group 'company)
 
 (defface company-tooltip-selection
   '((default :inherit company-tooltip)
-    (((class color) (min-colors 88)) (:background "orange1"))
+    (((class color) (min-colors 88) (background light))
+     (:background "light blue"))
+    (((class color) (min-colors 88) (background dark))
+     (:background "orange1"))
     (t (:background "green")))
   "Face used for the selection in the tool tip."
   :group 'company)
@@ -104,14 +110,20 @@
   :group 'company)
 
 (defface company-tooltip-common
-  '((t :inherit company-tooltip
-       :foreground "red"))
+  '((default :inherit company-tooltip)
+    (((background light))
+     :foreground "darkred")
+    (((background dark))
+     :foreground "red"))
   "Face used for the common completion in the tool tip."
   :group 'company)
 
 (defface company-tooltip-common-selection
-  '((t :inherit company-tooltip-selection
-       :foreground "red"))
+  '((default :inherit company-tooltip-selection)
+    (((background light))
+     :foreground "darkred")
+    (((background dark))
+     :foreground "red"))
   "Face used for the selected common completion in the tool tip."
   :group 'company)
 

commit 3a0a1eebe2be8f71c9541ed11a8bd79343cedb7e
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 25 11:39:46 2013 +0400

    company-pseudo-tooltip-frontend: Redraw when diplaced

diff --git a/NEWS.md b/NEWS.md
index fc1ffc2..cc21755 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* Pseudo-tooltip stays up-to-date when text is inserted after the point.
 * Fixed `company-require-match` mechanics.
 
 ## 2013-03-24 (0.6.2)
diff --git a/company-tests.el b/company-tests.el
index ee477e7..55675c9 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -152,3 +152,21 @@
         (self-insert-command 1))
       (company-post-command)
       (should (string= "ab " (buffer-string))))))
+
+(ert-deftest company-pseudo-tooltip-does-not-get-displaced ()
+  (with-temp-buffer
+    (save-window-excursion
+      (set-window-buffer nil (current-buffer))
+      (save-excursion (insert " ff"))
+      (company-mode)
+      (let ((company-frontends '(company-pseudo-tooltip-frontend))
+            (company-begin-commands '(self-insert-command))
+            (company-backends
+             (list (lambda (c &optional arg)
+                     (case c (prefix "") (candidates '("a" "b" "c")))))))
+        (let (this-command)
+          (company-complete))
+        (company-post-command)
+        (open-line 1)
+        (company-post-command)
+        (should (eq 2 (overlay-start company-pseudo-tooltip-overlay)))))))
diff --git a/company.el b/company.el
index 0d33ad3..078400f 100644
--- a/company.el
+++ b/company.el
@@ -1817,6 +1817,10 @@ Returns a negative number if the tooltip should be 
displayed above point."
                  (overlay-get company-pseudo-tooltip-overlay 'company-before))
     (overlay-put company-pseudo-tooltip-overlay 'window (selected-window))))
 
+(defun company-pseudo-tooltip-guard ()
+  (buffer-substring-no-properties
+   (point) (overlay-start company-pseudo-tooltip-overlay)))
+
 (defun company-pseudo-tooltip-frontend (command)
   "A `company-mode' front-end similar to a tool-tip but based on overlays."
   (case command
@@ -1828,10 +1832,15 @@ Returns a negative number if the tooltip should be 
displayed above point."
                          0))
            (new-height (company--pseudo-tooltip-height)))
        (unless (and (>= (* old-height new-height) 0)
-                    (>= (abs old-height) (abs new-height)))
+                    (>= (abs old-height) (abs new-height))
+                    (equal (company-pseudo-tooltip-guard)
+                           (overlay-get company-pseudo-tooltip-overlay
+                                        'company-guard)))
          ;; Redraw needed.
          (company-pseudo-tooltip-show-at-point (- (point)
-                                                  (length company-prefix)))))
+                                                  (length company-prefix)))
+         (overlay-put company-pseudo-tooltip-overlay
+                      'company-guard (company-pseudo-tooltip-guard))))
      (company-pseudo-tooltip-unhide))
     (hide (company-pseudo-tooltip-hide)
           (setq company-tooltip-offset 0))

commit 177478df812600d37d41b7f14443c97a42f9ddd0
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 25 06:43:31 2013 +0400

    company-completion-finished-hook: mention post-completion command

diff --git a/company.el b/company.el
index 674fc96..0d33ad3 100644
--- a/company.el
+++ b/company.el
@@ -363,7 +363,10 @@ aborted manually."
 
 (defcustom company-completion-finished-hook nil
   "Hook run when company successfully completes.
-The hook is called with the selected candidate as an argument."
+The hook is called with the selected candidate as an argument.
+
+If you indend to use it to post-process candidates from a specific back-end,
+consider using the `post-completion' command instead."
   :group 'company
   :type 'hook)
 
@@ -405,7 +408,7 @@ completion.  If it is a list of syntax description 
characters (see
 This can also be a function, which is called with the new input and should
 return non-nil if company should auto-complete.
 
-A character that is part of a valid candidate never starts auto-completion."
+A character that is part of a valid candidate never triggers auto-completion."
   :group 'company
   :type '(choice (string :tag "Characters")
                  (set :tag "Syntax"

commit 1c07663062f3456c64f6d0f2554e505b7815c921
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 25 03:10:16 2013 +0400

    company-eclim: Rewrite commentary

diff --git a/company-eclim.el b/company-eclim.el
index e6e2fb6..b0444c0 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -21,12 +21,12 @@
 
 ;;; Commentary:
 ;;
-;; Eclim version 1.7.13 or newer (?) is required.
+;; Using `emacs-eclim' together with (or instead of) this back-end is
+;; recommended, as it allows you to use other Eclim features.
 ;;
-;; This completion backend is pretty barebone.
-;;
-;; `emacs-eclim' provides an alternative backend, and it also allows you to
-;; actually control Eclim from Emacs.
+;; The alternative back-end provided by `emacs-eclim' uses `yasnippet'
+;; instead of `company-template' to expand function calls, and it supports
+;; some languages other than Java.
 
 ;;; Code:
 
@@ -148,8 +148,10 @@ eclim can only complete correctly when the buffer has been 
saved."
     (company-template-move-to-first templ)))
 
 (defun company-eclim (command &optional arg &rest ignored)
-  "A `company-mode' completion back-end for eclim.
-eclim provides access to Eclipse Java IDE features for other editors.
+  "A `company-mode' completion back-end for Eclim.
+Eclim provides access to Eclipse Java IDE features for other editors.
+
+Eclim version 1.7.13 or newer (?) is required.
 
 Completions only work correctly when the buffer has been saved.
 `company-eclim-auto-save' determines whether to do this automatically."

commit 5a18e987dd87b33d1e8c8250d08f6580b1eb1737
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 25 02:53:49 2013 +0400

    Add two tests for company-auto-complete

diff --git a/company-tests.el b/company-tests.el
index fd89b58..ee477e7 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -96,7 +96,7 @@
       (should (eq 2 company-candidates-length))
       (should (eq 3 (point))))))
 
-(ert-deftest company-dont-require-match-idle ()
+(ert-deftest company-dont-require-match-when-idle ()
   (with-temp-buffer
     (insert "ab")
     (company-mode)
@@ -114,3 +114,41 @@
       (company-post-command)
       (should (eq nil company-candidates-length))
       (should (eq 4 (point))))))
+
+(ert-deftest company-auto-complete-explicit ()
+  (with-temp-buffer
+    (insert "ab")
+    (company-mode)
+    (let (company-frontends
+          (company-auto-complete 'company-explicit-action-p)
+          (company-auto-complete-chars '(? ))
+          (company-backends
+           (list (lambda (command &optional arg)
+                   (case command
+                     (prefix (buffer-substring (point-min) (point)))
+                     (candidates '("abcd" "abef")))))))
+      (let (this-command)
+        (company-complete))
+      (let ((last-command-event ? ))
+        (self-insert-command 1))
+      (company-post-command)
+      (should (string= "abcd " (buffer-string))))))
+
+(ert-deftest company-no-auto-complete-when-idle ()
+  (with-temp-buffer
+    (insert "ab")
+    (company-mode)
+    (let (company-frontends
+          (company-auto-complete 'company-explicit-action-p)
+          (company-auto-complete-chars '(? ))
+          (company-backends
+           (list (lambda (command &optional arg)
+                   (case command
+                     (prefix (buffer-substring (point-min) (point)))
+                     (candidates '("abcd" "abef")))))))
+      (company-idle-begin (current-buffer) (selected-window)
+                          (buffer-chars-modified-tick) (point))
+      (let ((last-command-event ? ))
+        (self-insert-command 1))
+      (company-post-command)
+      (should (string= "ab " (buffer-string))))))

commit eba32647fcbc74480d8955cd26381e3bdc7cf96d
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 25 02:03:55 2013 +0400

    company-calculate-candidates: Instead of company-candidates, use candidates

diff --git a/NEWS.md b/NEWS.md
index e05f109..fc1ffc2 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,9 @@
 # History of user-visible changes
 
+## Next
+
+* Fixed `company-require-match` mechanics.
+
 ## 2013-03-24 (0.6.2)
 
 * `global-company-mode` is now autoloaded.
diff --git a/company-tests.el b/company-tests.el
index 84b3503..fd89b58 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -66,11 +66,51 @@
     (company-mode)
     (should-error
      (company-begin-backend (lambda (command &rest ignore))))
-    (let ((company-backends
+    (let (company-frontends
+          (company-backends
            (list (lambda (command &optional arg)
                    (case command
                      (prefix "a")
                      (candidates '("a" "ab" "ac")))))))
-      (company-complete)
-      (setq this-command 'company-complete)
+      (let (this-command)
+        (company-complete))
+      (company-post-command)
       (should (eq 3 company-candidates-length)))))
+
+(ert-deftest company-require-match-explicit ()
+  (with-temp-buffer
+    (insert "ab")
+    (company-mode)
+    (let (company-frontends
+          (company-require-match 'company-explicit-action-p)
+          (company-backends
+           (list (lambda (command &optional arg)
+                   (case command
+                     (prefix (buffer-substring (point-min) (point)))
+                     (candidates '("abc" "abd")))))))
+      (let (this-command)
+        (company-complete))
+      (let ((last-command-event ?e))
+        (self-insert-command 1))
+      (company-post-command)
+      (should (eq 2 company-candidates-length))
+      (should (eq 3 (point))))))
+
+(ert-deftest company-dont-require-match-idle ()
+  (with-temp-buffer
+    (insert "ab")
+    (company-mode)
+    (let (company-frontends
+          (company-require-match 'company-explicit-action-p)
+          (company-backends
+           (list (lambda (command &optional arg)
+                   (case command
+                     (prefix (buffer-substring (point-min) (point)))
+                     (candidates '("abc" "abd")))))))
+      (company-idle-begin (current-buffer) (selected-window)
+                          (buffer-chars-modified-tick) (point))
+      (let ((last-command-event ?e))
+        (self-insert-command 1))
+      (company-post-command)
+      (should (eq nil company-candidates-length))
+      (should (eq 4 (point))))))
diff --git a/company.el b/company.el
index e7e0540..674fc96 100644
--- a/company.el
+++ b/company.el
@@ -316,7 +316,7 @@ return the cons of buffer and buffer location, or of file 
and line
 number where the completion candidate was defined.
 
 `require-match': If this value is t, the user is not allowed to enter anything
-not offering as a candidate.  Use with care!  The default value nil gives the
+not offered as a candidate.  Use with care!  The default value nil gives the
 user that choice with `company-require-match'.  Return value 'never overrides
 that option the other way around.
 
@@ -841,14 +841,13 @@ can retrieve meta-data for them."
               (while c2
                 (setcdr c2 (progn (while (equal (pop c2) (car c2)))
                                   c2)))))))
-    (if (and candidates
-             (or (cdr candidates)
-                 (not (eq t (compare-strings (car candidates) nil nil
-                                             prefix nil nil ignore-case)))))
-        candidates
-      ;; Already completed and unique; don't start.
-      ;; FIXME: Not the right place? maybe when setting?
-      (and company-candidates t))))
+    (when candidates
+      (if (or (cdr candidates)
+              (not (eq t (compare-strings (car candidates) nil nil
+                                          prefix nil nil ignore-case))))
+          candidates
+        ;; Already completed and unique; don't start.
+        t))))
 
 (defun company-idle-begin (buf win tick pos)
   (and company-mode

commit 43d9131e07bceb60ab136074b1d32becb5be0c02
Author: Dmitry Gutov <address@hidden>
Date:   Sun Mar 24 03:52:56 2013 +0400

    company-eclim--project-name: Simplify

diff --git a/company-eclim.el b/company-eclim.el
index f8a55dc..e6e2fb6 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -98,11 +98,9 @@ eclim can only complete correctly when the buffer has been 
saved."
       (let ((dir (company-eclim--project-dir)))
         (when dir
           (setq company-eclim--project-name
-                (let ((project (loop for project in 
(company-eclim--project-list)
-                                     when (equal (cdr (assoc 'path project)) 
dir)
-                                     return project)))
-                  (when project
-                    (cdr (assoc 'name project)))))))))
+                (loop for project in (company-eclim--project-list)
+                      when (equal (cdr (assoc 'path project)) dir)
+                      return (cdr (assoc 'name project))))))))
 
 (defun company-eclim--candidates (prefix)
   (interactive "d")

commit c58998e8e4ebf93434c77b5b7b2691213a3533c8
Author: Dmitry Gutov <address@hidden>
Date:   Sun Mar 24 02:19:02 2013 +0400

    global-company-mode: extract turn-on function

diff --git a/NEWS.md b/NEWS.md
index a16a8df..e05f109 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,9 @@
 # History of user-visible changes
 
+## 2013-03-24 (0.6.2)
+
+* `global-company-mode` is now autoloaded.
+
 ## 2013-03-23 (0.6.1)
 
 * Documented `init` and `post-completion` back-end commands.
diff --git a/company.el b/company.el
index 0ddc945..e7e0540 100644
--- a/company.el
+++ b/company.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6.1
+;; Version: 0.6.2
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x
@@ -551,9 +551,11 @@ keymap during active completions (`company-active-map'):
     (kill-local-variable 'company-point)))
 
 ;;;###autoload
-(define-globalized-minor-mode global-company-mode company-mode
-  (lambda () (unless (or noninteractive (eq (aref (buffer-name) 0) ?\s))
-          (company-mode 1))))
+(define-globalized-minor-mode global-company-mode company-mode company-mode-on)
+
+(defun company-mode-on ()
+  (unless (or noninteractive (eq (aref (buffer-name) 0) ?\s))
+    (company-mode 1)))
 
 (defsubst company-assert-enabled ()
   (unless company-mode

commit 4b2c71f7919166c4a37487c8859285a1f49f8a07
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 23 21:22:11 2013 +0400

    Silence some byte-compilation warnings

diff --git a/company-clang.el b/company-clang.el
index 3d28f0c..6844bb0 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -26,6 +26,7 @@
 ;;; Code:
 
 (require 'company)
+(require 'company-template)
 (eval-when-compile (require 'cl))
 
 (defcustom company-clang-executable
diff --git a/company-eclim.el b/company-eclim.el
index 599bf6e..f8a55dc 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -31,6 +31,7 @@
 ;;; Code:
 
 (require 'company)
+(require 'company-template)
 (eval-when-compile (require 'cl))
 
 (defun company-eclim-executable-find ()
@@ -97,10 +98,9 @@ eclim can only complete correctly when the buffer has been 
saved."
       (let ((dir (company-eclim--project-dir)))
         (when dir
           (setq company-eclim--project-name
-                (let ((project (find-if (lambda (project)
-                                          (equal (cdr (assoc 'path project))
-                                                 dir))
-                                        (company-eclim--project-list))))
+                (let ((project (loop for project in 
(company-eclim--project-list)
+                                     when (equal (cdr (assoc 'path project)) 
dir)
+                                     return project)))
                   (when project
                     (cdr (assoc 'name project)))))))))
 
diff --git a/company-elisp.el b/company-elisp.el
index ec3161d..986cd3d 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -28,6 +28,7 @@
 (require 'company)
 (eval-when-compile (require 'cl))
 (require 'help-mode)
+(require 'find-func)
 
 (defcustom company-elisp-detect-function-context t
   "If enabled, offer Lisp functions only in appropriate contexts.
diff --git a/company.el b/company.el
index 60a3aee..0ddc945 100644
--- a/company.el
+++ b/company.el
@@ -656,10 +656,10 @@ keymap during active completions (`company-active-map'):
     (apply 'company--multi-backend-adapter company-backend args)))
 
 (defun company--multi-backend-adapter (backends command &rest args)
-  (let ((backends (remove-if (lambda (b)
-                               (and (symbolp b)
-                                    (eq 'failed (get b 'company-init))))
-                             backends)))
+  (let ((backends (loop for b in backends
+                        when (not (and (symbolp b)
+                                       (eq 'failed (get b 'company-init))))
+                        collect b)))
     (case command
       (candidates
        (loop for backend in backends
@@ -2000,9 +2000,5 @@ Returns a negative number if the tooltip should be 
displayed above point."
     (post-command (company-echo-show-when-idle 'company-fetch-metadata))
     (hide (company-echo-hide))))
 
-;; templates 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(autoload 'company-template-declare-template "company-template")
-
 (provide 'company)
 ;;; company.el ends here

commit c985070615a9be6a350708855fe2454906317c78
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 23 20:38:15 2013 +0400

    Autoload global-company-mode

diff --git a/company.el b/company.el
index facf48b..60a3aee 100644
--- a/company.el
+++ b/company.el
@@ -550,6 +550,7 @@ keymap during active completions (`company-active-map'):
     (company-cancel)
     (kill-local-variable 'company-point)))
 
+;;;###autoload
 (define-globalized-minor-mode global-company-mode company-mode
   (lambda () (unless (or noninteractive (eq (aref (buffer-name) 0) ?\s))
           (company-mode 1))))

commit 3dd60d13c7bb4af33d1a0b0ff320d39039cfe9a0
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 23 08:11:13 2013 +0400

    Release 0.6.1

diff --git a/NEWS.md b/NEWS.md
index 5d86295..a16a8df 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,6 +1,6 @@
 # History of user-visible changes
 
-## Next
+## 2013-03-23 (0.6.1)
 
 * Documented `init` and `post-completion` back-end commands.
 * `company-eclim` and `company-clang` only expand the template on explicit user
diff --git a/company.el b/company.el
index 33c6c95..facf48b 100644
--- a/company.el
+++ b/company.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <address@hidden>
-;; Version: 0.6
+;; Version: 0.6.1
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x

commit 509f231cb803209017a31299343c2a3317fc2a4d
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 23 08:07:42 2013 +0400

    company-eclim: Work when Eclim was launched late

diff --git a/company-eclim.el b/company-eclim.el
index 6d89369..599bf6e 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -60,7 +60,7 @@ eclim can only complete correctly when the buffer has been 
saved."
 (defvar company-eclim--project-dir 'unknown)
 (make-variable-buffer-local 'company-eclim--project-dir)
 
-(defvar company-eclim--project-name 'unknown)
+(defvar company-eclim--project-name nil)
 (make-variable-buffer-local 'company-eclim--project-name)
 
 (defvar company-eclim--doc nil)
@@ -93,15 +93,16 @@ eclim can only complete correctly when the buffer has been 
saved."
     company-eclim--project-dir))
 
 (defun company-eclim--project-name ()
-  (if (eq company-eclim--project-name 'unknown)
-      (setq company-eclim--project-name
-            (let ((project (find-if (lambda (project)
-                                      (equal (cdr (assoc 'path project))
-                                             (company-eclim--project-dir)))
-                                    (company-eclim--project-list))))
-              (when project
-                (cdr (assoc 'name project)))))
-    company-eclim--project-name))
+  (or company-eclim--project-name
+      (let ((dir (company-eclim--project-dir)))
+        (when dir
+          (setq company-eclim--project-name
+                (let ((project (find-if (lambda (project)
+                                          (equal (cdr (assoc 'path project))
+                                                 dir))
+                                        (company-eclim--project-list))))
+                  (when project
+                    (cdr (assoc 'name project)))))))))
 
 (defun company-eclim--candidates (prefix)
   (interactive "d")

commit 29fbc711eda6a3c43033ef4e8c3a4603aff3db87
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 23 07:58:25 2013 +0400

    company--multi-backend-adapter: safe > fast
    
    Fixes list corruption when running test company-multi-backend-with-lambdas
    repeatedly.

diff --git a/company.el b/company.el
index 17b48a0..33c6c95 100644
--- a/company.el
+++ b/company.el
@@ -664,7 +664,7 @@ keymap during active completions (`company-active-map'):
        (loop for backend in backends
              when (equal (funcall backend 'prefix)
                          (car args))
-             nconc (apply backend 'candidates args)))
+             append (apply backend 'candidates args)))
       (sorted nil)
       (duplicates t)
       (otherwise

commit 24c73b930aff562cacf9c068b7f1c9ab6521eab2
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 23 07:12:07 2013 +0400

    company-begin-backend: unset company-backend on error

diff --git a/company-tests.el b/company-tests.el
index 7bcc0a0..84b3503 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -1,6 +1,6 @@
 ;;; company-tests.el --- company-mode tests
 
-;; Copyright (C) 2011  Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -59,3 +59,18 @@
                    (prefix "z")
                    (candidates '("c" "d")))))))
     (should (equal (company-call-backend 'candidates "z") '("a" "b" "c" 
"d")))))
+
+(ert-deftest company-begin-backend-failure-doesnt-break-company-backends ()
+  (with-temp-buffer
+    (insert "a")
+    (company-mode)
+    (should-error
+     (company-begin-backend (lambda (command &rest ignore))))
+    (let ((company-backends
+           (list (lambda (command &optional arg)
+                   (case command
+                     (prefix "a")
+                     (candidates '("a" "ab" "ac")))))))
+      (company-complete)
+      (setq this-command 'company-complete)
+      (should (eq 3 company-candidates-length)))))
diff --git a/company.el b/company.el
index 5d64f3a..17b48a0 100644
--- a/company.el
+++ b/company.el
@@ -1522,7 +1522,9 @@ To show the number next to the candidates in some 
back-ends, enable
   (setq company-backend backend)
   ;; Return non-nil if active.
   (or (company-manual-begin)
-      (error "Cannot complete at point")))
+      (progn
+        (setq company-backend nil)
+        (error "Cannot complete at point"))))
 
 (defun company-begin-with (candidates
                            &optional prefix-length require-match callback)

commit 9a2dba0b6ef2f9b6a0191c8a43c9dc083d31b804
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 23 04:45:48 2013 +0400

    Support lambda values in grouped backends list

diff --git a/company-tests.el b/company-tests.el
index 691e3ae..7bcc0a0 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -47,3 +47,15 @@
     (should (eq nil (company--good-prefix-p 'stop)))
     (should (eq t (company--good-prefix-p '("foo" . 5))))
     (should (eq nil (company--good-prefix-p '("foo" . 4))))))
+
+(ert-deftest company-multi-backend-with-lambdas ()
+  (let ((company-backend
+         (list (lambda (command &optional arg &rest ignore)
+                 (case command
+                   (prefix "z")
+                   (candidates '("a" "b"))))
+               (lambda (command &optional arg &rest ignore)
+                 (case command
+                   (prefix "z")
+                   (candidates '("c" "d")))))))
+    (should (equal (company-call-backend 'candidates "z") '("a" "b" "c" 
"d")))))
diff --git a/company.el b/company.el
index b60db36..5d64f3a 100644
--- a/company.el
+++ b/company.el
@@ -655,7 +655,9 @@ keymap during active completions (`company-active-map'):
     (apply 'company--multi-backend-adapter company-backend args)))
 
 (defun company--multi-backend-adapter (backends command &rest args)
-  (let ((backends (remove-if (lambda (b) (eq 'failed (get b 'company-init)))
+  (let ((backends (remove-if (lambda (b)
+                               (and (symbolp b)
+                                    (eq 'failed (get b 'company-init))))
                              backends)))
     (case command
       (candidates

commit 6d979b80e37d66b83172feaa1cdb8b5b994619c0
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 23 02:43:27 2013 +0400

    Handle 'stop prefix directly

diff --git a/company-tests.el b/company-tests.el
index 1f5db14..691e3ae 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -29,7 +29,7 @@
 (require 'company)
 (require 'company-keywords)
 
-(ert-deftest sorted-keywords ()
+(ert-deftest company-sorted-keywords ()
   "Test that keywords in `company-keywords-alist' are in alphabetical order."
   (dolist (pair company-keywords-alist)
     (when (consp (cdr pair))
@@ -38,3 +38,12 @@
           (should (not (equal prev next)))
           (should (string< prev next))
           (setq prev next))))))
+
+(ert-deftest company-good-prefix ()
+  (let ((company-minimum-prefix-length 5)
+        company--explicit-action)
+    (should (eq t (company--good-prefix-p "address@hidden")))
+    (should (eq nil (company--good-prefix-p "abcd")))
+    (should (eq nil (company--good-prefix-p 'stop)))
+    (should (eq t (company--good-prefix-p '("foo" . 5))))
+    (should (eq nil (company--good-prefix-p '("foo" . 4))))))
diff --git a/company.el b/company.el
index 4a93d62..b60db36 100644
--- a/company.el
+++ b/company.el
@@ -954,8 +954,9 @@ can retrieve meta-data for them."
 
 (defun company--good-prefix-p (prefix)
   (and (or (company-explicit-action-p)
-           (>= (or (cdr-safe prefix) (length prefix))
-               company-minimum-prefix-length))
+           (unless (eq prefix 'stop)
+             (>= (or (cdr-safe prefix) (length prefix))
+                 company-minimum-prefix-length)))
        (stringp (or (car-safe prefix) prefix))))
 
 (defun company--continue ()

commit 6d14ffbfd6c1dc061c291d630ed63d3b2241c043
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 23 02:34:50 2013 +0400

    Document 'init and 'post-completion

diff --git a/.dir-locals.el b/.dir-locals.el
index 3a4c010..0f821cf 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,3 +1,4 @@
 ((nil . ((indent-tabs-mode . nil)
          (fill-column . 80)
-         (sentence-end-double-space . t))))
+         (sentence-end-double-space . t)
+         (emacs-lisp-docstring-fill-column . t))))
diff --git a/NEWS.md b/NEWS.md
index 157e6de..5d86295 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* Documented `init` and `post-completion` back-end commands.
 * `company-eclim` and `company-clang` only expand the template on explicit user
   action (such as `company-complete-{selection,number,mouse}`).
 * `company-template` has some breaking changes.  When point is at one of the
diff --git a/company.el b/company.el
index b434747..4a93d62 100644
--- a/company.el
+++ b/company.el
@@ -320,6 +320,14 @@ not offering as a candidate.  Use with care!  The default 
value nil gives the
 user that choice with `company-require-match'.  Return value 'never overrides
 that option the other way around.
 
+`init': Called once for each buffer, the back-end can check for external
+programs and files and load any required libraries.  Raising an error here will
+show up in message log once, and the backend will not be used for completion.
+
+`post-completion': Called after a completion candidate has been inserted into
+the buffer.  The second argument is the candidate.  Can be used to modify it,
+e.g. to expand a snippet.
+
 The back-end should return nil for all commands it does not support or
 does not know about.  It should also be callable interactively and use
 `company-begin-backend' to start itself in that case."

commit 809c7833579de5217069c6e678c30e0667c22a9a
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 23 00:45:12 2013 +0400

    And another rename. Hopefully, this one will stick.

diff --git a/company-clang.el b/company-clang.el
index fc426d3..3d28f0c 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -245,7 +245,7 @@ Completions only work correctly when the buffer has been 
saved.
                "#]" " "
                (replace-regexp-in-string "[<{[]#\\|#[>}]" "" meta t)
                t))))
-    (safe (and (derived-mode-p 'objc-mode)
+    (crop (and (derived-mode-p 'objc-mode)
                (string-match ":" arg)
                (substring arg 0 (match-beginning 0))))
     (post-completion (and (derived-mode-p 'objc-mode)
diff --git a/company-eclim.el b/company-eclim.el
index fd74a01..6d89369 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -167,7 +167,7 @@ Completions only work correctly when the buffer has been 
saved.
     (meta (company-eclim--meta arg))
     ;; because "" doesn't return everything
     (no-cache (equal arg ""))
-    (safe (when (string-match "(" arg)
+    (crop (when (string-match "(" arg)
             (substring arg 0 (match-beginning 0))))
     (post-completion (when (string-match "([^)]" arg)
                        (company-eclim--templatify arg)))))
diff --git a/company.el b/company.el
index ff4f29f..b434747 100644
--- a/company.el
+++ b/company.el
@@ -797,7 +797,7 @@ can retrieve meta-data for them."
     (setq company-candidates nil)))
 
 (defun company--safe-candidate (str)
-  (or (company-call-backend 'safe str)
+  (or (company-call-backend 'crop str)
       str))
 
 (defun company-calculate-candidates (prefix)

commit 06ca7849f29189687aa380a2c3d9c84c7859aabe
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 22 09:07:04 2013 +0400

    Introduce `company--auto-completion', rename 'common to 'safe

diff --git a/NEWS.md b/NEWS.md
index f53a9fe..157e6de 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,13 +2,14 @@
 
 ## Next
 
+* `company-eclim` and `company-clang` only expand the template on explicit user
+  action (such as `company-complete-{selection,number,mouse}`).
 * `company-template` has some breaking changes.  When point is at one of the
   fields, it's displayed at the beginning, not right after it; `<tab>` jumps to
   the next field, `forward-word` and `subword-forward` remappings are removed;
   when you jump to the next field, if the current one hasn't been edited, the
   overlay gets removed but the text remains.
-* `company-eclim` shows method overloads and inserts templates for calls.
-* `company-clang` ObjC arguments template insertion now requires explicit user 
action.
+* `company-eclim` shows method overloads and expands templates for calls.
 * `company-clang-objc-templatify` does not insert spaces after colons anymore.
 * `company-clang` is now only initialized in supported buffers.
   So, no error messages if you don't have Clang until you open a C file.
diff --git a/company-clang.el b/company-clang.el
index 9dbd12d..fc426d3 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -245,9 +245,9 @@ Completions only work correctly when the buffer has been 
saved.
                "#]" " "
                (replace-regexp-in-string "[<{[]#\\|#[>}]" "" meta t)
                t))))
-    (common (and (derived-mode-p 'objc-mode)
-                 (string-match ":" arg)
-                 (substring arg 0 (match-beginning 0))))
+    (safe (and (derived-mode-p 'objc-mode)
+               (string-match ":" arg)
+               (substring arg 0 (match-beginning 0))))
     (post-completion (and (derived-mode-p 'objc-mode)
                           (string-match ":" arg)
                           (company-clang-objc-templatify arg)))))
diff --git a/company-eclim.el b/company-eclim.el
index c481dd9..fd74a01 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -167,8 +167,8 @@ Completions only work correctly when the buffer has been 
saved.
     (meta (company-eclim--meta arg))
     ;; because "" doesn't return everything
     (no-cache (equal arg ""))
-    (common (when (string-match "(" arg)
-              (substring arg 0 (match-beginning 0))))
+    (safe (when (string-match "(" arg)
+            (substring arg 0 (match-beginning 0))))
     (post-completion (when (string-match "([^)]" arg)
                        (company-eclim--templatify arg)))))
 
diff --git a/company.el b/company.el
index fe87eed..ff4f29f 100644
--- a/company.el
+++ b/company.el
@@ -696,6 +696,10 @@ keymap during active completions (`company-active-map'):
   "Non-nil, if explicit completion took place.")
 (make-variable-buffer-local 'company--explicit-action)
 
+(defvar company--auto-completion nil
+  "Non-nil when current candidate is being completed automatically.
+Controlled by `company-auto-complete'.")
+
 (defvar company--point-max nil)
 (make-variable-buffer-local 'company--point-max)
 
@@ -787,12 +791,15 @@ can retrieve meta-data for them."
   (push (cons company-prefix company-candidates) company-candidates-cache)
   ;; Calculate common.
   (let ((completion-ignore-case (company-call-backend 'ignore-case)))
-    (let ((common (try-completion company-prefix company-candidates)))
-      (setq company-common (or (company-call-backend 'common common)
-                               common))))
+    (setq company-common (company--safe-candidate
+                          (try-completion company-prefix company-candidates))))
   (when (eq company-common t)
     (setq company-candidates nil)))
 
+(defun company--safe-candidate (str)
+  (or (company-call-backend 'safe str)
+      str))
+
 (defun company-calculate-candidates (prefix)
   (let ((candidates (cdr (assoc prefix company-candidates-cache)))
         (ignore-case (company-call-backend 'ignore-case)))
@@ -922,7 +929,8 @@ can retrieve meta-data for them."
         ;; auto-complete
         (save-excursion
           (goto-char company-point)
-          (company-complete-selection)
+          (let ((company--auto-completion t))
+            (company-complete-selection))
           nil))
        ((and (company--string-incremental-p company-prefix new-prefix)
              (company-require-match-p))
@@ -1334,7 +1342,10 @@ and invoke the normal binding."
   "Complete the selected candidate."
   (interactive)
   (when (company-manual-begin)
-    (company-finish (nth company-selection company-candidates))))
+    (let ((result (nth company-selection company-candidates)))
+      (when company--auto-completion
+        (setq result (company--safe-candidate result)))
+      (company-finish result))))
 
 (defun company-complete-common ()
   "Complete the common part of all candidates."

commit 23ed20ed236761b2aee517bca01810b9324698de
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 22 08:01:56 2013 +0400

    company-eclim: Don't auto-complete common part after the paren

diff --git a/company-eclim.el b/company-eclim.el
index cda300c..c481dd9 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -167,6 +167,8 @@ Completions only work correctly when the buffer has been 
saved.
     (meta (company-eclim--meta arg))
     ;; because "" doesn't return everything
     (no-cache (equal arg ""))
+    (common (when (string-match "(" arg)
+              (substring arg 0 (match-beginning 0))))
     (post-completion (when (string-match "([^)]" arg)
                        (company-eclim--templatify arg)))))
 

commit 0970c3d32dc3aff696f41d9a4fe9050c2318d65b
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 22 05:58:53 2013 +0400

    company-template: Bring closer to yasnippet behavior

diff --git a/NEWS.md b/NEWS.md
index 57019cd..f53a9fe 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,12 +2,17 @@
 
 ## Next
 
-* `company-eclim` shows method overloads and inserts call templates with 
placeholders.
+* `company-template` has some breaking changes.  When point is at one of the
+  fields, it's displayed at the beginning, not right after it; `<tab>` jumps to
+  the next field, `forward-word` and `subword-forward` remappings are removed;
+  when you jump to the next field, if the current one hasn't been edited, the
+  overlay gets removed but the text remains.
+* `company-eclim` shows method overloads and inserts templates for calls.
 * `company-clang` ObjC arguments template insertion now requires explicit user 
action.
 * `company-clang-objc-templatify` does not insert spaces after colons anymore.
 * `company-clang` is now only initialized in supported buffers.
   So, no error messages if you don't have Clang until you open a C file.
-* `company-clang` recognizes Clang included with recent Xcode.
+* `company-clang` recognizes Clang included in recent Xcode.
 * New commands `company-select-previous-or-abort` and
   `company-select-next-or-abort`, bound to `<up>` and `<down>`.
 
diff --git a/company-clang.el b/company-clang.el
index 6135f24..9dbd12d 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -198,14 +198,20 @@ Prefix files (-include ...) can be selected with
 (defun company-clang-objc-templatify (selector)
   (let* ((end (point))
          (beg (- (point) (length selector)))
-         (templ (company-template-declare-template beg end)))
+         (templ (company-template-declare-template beg end))
+         (cnt 0))
     (save-excursion
       (goto-char beg)
       (while (search-forward ":" end t)
-        (replace-match ": ")
-        (incf end)
-        (company-template-add-field templ (1- (match-end 0)) "<arg>"))
-      (delete-char -1))
+        (let* ((name (format "arg%d" cnt))
+               (len (length name)))
+          (incf end len)
+          (company-template-add-field templ (match-end 0) name)
+          (goto-char (+ (match-end 0) len))
+          (when (< (point) end)
+            (insert " ")
+            (incf end))
+          (incf cnt))))
     (company-template-move-to-first templ)))
 
 (defun company-clang (command &optional arg &rest ignored)
diff --git a/company-eclim.el b/company-eclim.el
index 1637f3c..cda300c 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -141,12 +141,11 @@ eclim can only complete correctly when the buffer has 
been saved."
          (templ (company-template-declare-template beg end)))
     (save-excursion
       (goto-char beg)
-      (while (re-search-forward "\\([(,] ?\\)\\(?:[^ ]+ \\)\\([^ ,)]*\\)" end 
t)
-        (let ((name (match-string 2)))
+      (while (re-search-forward "\\([(,] ?\\)\\([^ ]+ \\)\\([^ ,)]*\\)" end t)
+        (let ((name (match-string 3)))
           (replace-match "\\1" t)
-          (decf end (- (length (match-string 0))
-                       (length (match-string 1))))
-          (company-template-add-field templ (point) (format "<%s>" name)))))
+          (decf end (length (match-string 2)))
+          (company-template-add-field templ (point) name))))
     (company-template-move-to-first templ)))
 
 (defun company-eclim (command &optional arg &rest ignored)
diff --git a/company-template.el b/company-template.el
index 69eac7c..05389ac 100644
--- a/company-template.el
+++ b/company-template.el
@@ -31,14 +31,12 @@
 
 (defvar company-template-nav-map
   (let ((keymap (make-sparse-keymap)))
-    (define-key keymap [remap forward-word] 'company-template-forward-field)
-    (define-key keymap [remap subword-forward] 'company-template-forward-field)
-    ;; M-n
+    (define-key keymap [tab] 'company-template-forward-field)
     keymap))
 
 ;; interactive 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defsubst company-template-templates-at (pos)
+(defun company-template-templates-at (pos)
   (let (os)
     (dolist (o (overlays-at pos))
       (when (overlay-get o 'company-template-fields)
@@ -53,19 +51,22 @@
 
 (defun company-template-forward-field ()
   (interactive)
-  (let* ((templates (company-template-templates-at (point)))
+  (let* ((start (point))
+         (templates (company-template-templates-at (point)))
          (minimum (apply 'max (mapcar 'overlay-end templates)))
-         (fields (apply 'append
-                        (mapcar (lambda (templ)
-                                  (overlay-get templ 'company-template-fields))
-                                templates))))
+         (fields (loop for templ in templates
+                       append (overlay-get templ 'company-template-fields))))
     (dolist (pos (mapcar 'overlay-start fields))
       (and pos
            (> pos (point))
            (< pos minimum)
            (setq minimum pos)))
     (push-mark)
-    (goto-char minimum)))
+    (goto-char minimum)
+    (let ((field (loop for ovl in (overlays-at start)
+                       when (overlay-get ovl 'company-template-parent)
+                       return ovl)))
+      (company-template-remove-field field))))
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
@@ -76,6 +77,7 @@
   (let ((ov (make-overlay beg end)))
     ;; (overlay-put ov 'face 'highlight)
     (overlay-put ov 'keymap company-template-nav-map)
+    (overlay-put ov 'priority 101)
     (overlay-put ov 'evaporate t)
     (push ov company-template--buffer-templates)
     (add-hook 'post-command-hook 'company-template-post-command nil t)
@@ -91,42 +93,47 @@
 (defun company-template-add-field (templ pos text)
   (assert templ)
   (save-excursion
-    ;; (goto-char pos)
-    (let ((ov (make-overlay pos pos))
-          (siblings (overlay-get templ 'company-template-fields))
-          (label (propertize text 'face 'company-template-field
-                             'company-template-parent templ)))
-      (overlay-put ov 'face 'highlight)
-      (add-text-properties 0 1 '(cursor t) label)
-      (overlay-put ov 'after-string label)
+    (save-excursion
+      (goto-char pos)
+      (insert text)
+      (when (> (point) (overlay-end templ))
+        (move-overlay templ (overlay-start templ) (point))))
+    (let ((ov (make-overlay pos (+ pos (length text))))
+          (siblings (overlay-get templ 'company-template-fields)))
       ;; (overlay-put ov 'evaporate t)
       (overlay-put ov 'intangible t)
+      (overlay-put ov 'face 'company-template-field)
       (overlay-put ov 'company-template-parent templ)
-      (overlay-put ov 'insert-in-front-hooks '(company-template-remove))
+      (overlay-put ov 'insert-in-front-hooks '(company-template-insert-hook))
       (push ov siblings)
       (overlay-put templ 'company-template-fields siblings))))
 
-(defun company-template-remove-field (field)
-  (when (overlayp field)
-    ;; (delete-region (overlay-start field) (overlay-end field))
-    (delete-overlay field))
-  ;; TODO: unlink
-  )
+(defun company-template-remove-field (ovl &optional clear)
+  (when (overlayp ovl)
+    (when (overlay-buffer ovl)
+      (when clear
+        (delete-region (overlay-start ovl) (overlay-end ovl)))
+      (delete-overlay ovl))
+    (let* ((templ (overlay-get ovl 'company-template-parent))
+           (siblings (overlay-get templ 'company-template-fields)))
+      (setq siblings (delq ovl siblings))
+      (overlay-put templ 'company-template-fields siblings))))
 
 (defun company-template-clean-up (&optional pos)
   "Clean up all templates that don't contain POS."
   (unless pos (setq pos (point)))
   (let ((local-ovs (overlays-in (- pos 2) pos)))
     (dolist (templ company-template--buffer-templates)
-      (unless (memq templ local-ovs)
+      (unless (and (memq templ local-ovs)
+                   (overlay-get templ 'company-template-fields))
         (company-template-remove-template templ)))))
 
 ;; hooks 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defun company-template-remove (overlay after-p beg end &optional r)
+(defun company-template-insert-hook (ovl after-p &rest ignore)
   "Called when a snippet input prompt is modified."
-  (when after-p
-    (delete-overlay overlay)))
+  (unless after-p
+    (company-template-remove-field ovl t)))
 
 (defun company-template-post-command ()
   (company-template-clean-up)

commit 56a1a36395f0d1bffab96532d71e4345eb8076eb
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 22 01:09:58 2013 +0400

    company-eclim: Show overloads, insert call templates

diff --git a/NEWS.md b/NEWS.md
index 0be44ad..57019cd 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* `company-eclim` shows method overloads and inserts call templates with 
placeholders.
 * `company-clang` ObjC arguments template insertion now requires explicit user 
action.
 * `company-clang-objc-templatify` does not insert spaces after colons anymore.
 * `company-clang` is now only initialized in supported buffers.
diff --git a/company-eclim.el b/company-eclim.el
index e5bce3b..1637f3c 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -116,25 +116,38 @@ eclim can only complete correctly when the buffer has 
been saved."
                                    "-p" (company-eclim--project-name)
                                    "-f" project-file))
     (setq company-eclim--doc
-          (cdr (assoc 'completions
-                      (company-eclim--call-process
-                       "java_complete" "-p" (company-eclim--project-name)
-                       "-f" project-file
-                       "-o" (number-to-string (1- (point)))
-                       "-e" "utf-8"
-                       "-l" "standard")))))
+          (make-hash-table :test 'equal))
+    (dolist (item (cdr (assoc 'completions
+                              (company-eclim--call-process
+                               "java_complete" "-p" 
(company-eclim--project-name)
+                               "-f" project-file
+                               "-o" (number-to-string (1- (point)))
+                               "-e" "utf-8"
+                               "-l" "standard"))))
+      (let* ((meta (cdr (assoc 'info item)))
+             (completion meta))
+        (when (string-match " [:-]" completion)
+          (setq completion (substring completion 0 (match-beginning 0))))
+        (puthash completion meta company-eclim--doc))))
   (let ((completion-ignore-case nil))
-    ;; TODO: Handle overloaded methods somehow. Show one candidate per 
overload?
-    ;; That would look nice, but kinda useless: a bunch of candidates for the
-    ;; same completion. Maybe do expansion like 
`company-clang-objc-templatify'.
-    (all-completions prefix (mapcar (lambda (item) (cdr (assoc 'completion 
item)))
-                                    company-eclim--doc))))
+    (all-completions prefix company-eclim--doc)))
 
 (defun company-eclim--meta (candidate)
-  (cdr (assoc 'info (find-if
-                     (lambda (item) (equal (cdr (assoc 'completion item))
-                                      arg))
-                     company-eclim--doc))))
+  (gethash candidate company-eclim--doc))
+
+(defun company-eclim--templatify (call)
+  (let* ((end (point))
+         (beg (- (point) (length call)))
+         (templ (company-template-declare-template beg end)))
+    (save-excursion
+      (goto-char beg)
+      (while (re-search-forward "\\([(,] ?\\)\\(?:[^ ]+ \\)\\([^ ,)]*\\)" end 
t)
+        (let ((name (match-string 2)))
+          (replace-match "\\1" t)
+          (decf end (- (length (match-string 0))
+                       (length (match-string 1))))
+          (company-template-add-field templ (point) (format "<%s>" name)))))
+    (company-template-move-to-first templ)))
 
 (defun company-eclim (command &optional arg &rest ignored)
   "A `company-mode' completion back-end for eclim.
@@ -153,9 +166,10 @@ Completions only work correctly when the buffer has been 
saved.
                  (or (company-grab-symbol) 'stop)))
     (candidates (company-eclim--candidates arg))
     (meta (company-eclim--meta arg))
-    (duplicates t)
     ;; because "" doesn't return everything
-    (no-cache (equal arg ""))))
+    (no-cache (equal arg ""))
+    (post-completion (when (string-match "([^)]" arg)
+                       (company-eclim--templatify arg)))))
 
 (provide 'company-eclim)
 ;;; company-eclim.el ends here

commit 1f30a34741c61f35b18d66b6b506bc2a8242f858
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 21 21:10:08 2013 +0400

    Add experimental backend command 'common

diff --git a/NEWS.md b/NEWS.md
index de36cbd..0be44ad 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* `company-clang` ObjC arguments template insertion now requires explicit user 
action.
 * `company-clang-objc-templatify` does not insert spaces after colons anymore.
 * `company-clang` is now only initialized in supported buffers.
   So, no error messages if you don't have Clang until you open a C file.
diff --git a/company-clang.el b/company-clang.el
index 7fc66a9..6135f24 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -239,6 +239,9 @@ Completions only work correctly when the buffer has been 
saved.
                "#]" " "
                (replace-regexp-in-string "[<{[]#\\|#[>}]" "" meta t)
                t))))
+    (common (and (derived-mode-p 'objc-mode)
+                 (string-match ":" arg)
+                 (substring arg 0 (match-beginning 0))))
     (post-completion (and (derived-mode-p 'objc-mode)
                           (string-match ":" arg)
                           (company-clang-objc-templatify arg)))))
diff --git a/company.el b/company.el
index df758e1..fe87eed 100644
--- a/company.el
+++ b/company.el
@@ -787,7 +787,9 @@ can retrieve meta-data for them."
   (push (cons company-prefix company-candidates) company-candidates-cache)
   ;; Calculate common.
   (let ((completion-ignore-case (company-call-backend 'ignore-case)))
-    (setq company-common (try-completion company-prefix company-candidates)))
+    (let ((common (try-completion company-prefix company-candidates)))
+      (setq company-common (or (company-call-backend 'common common)
+                               common))))
   (when (eq company-common t)
     (setq company-candidates nil)))
 
@@ -823,9 +825,9 @@ can retrieve meta-data for them."
              (or (cdr candidates)
                  (not (eq t (compare-strings (car candidates) nil nil
                                              prefix nil nil ignore-case)))))
-        ;; Don't start when already completed and unique.
         candidates
-      ;; Not the right place? maybe when setting?
+      ;; Already completed and unique; don't start.
+      ;; FIXME: Not the right place? maybe when setting?
       (and company-candidates t))))
 
 (defun company-idle-begin (buf win tick pos)

commit 9bf653e045719b0823de5c809bcf0b8751f8c3a8
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 21 19:57:26 2013 +0400

    company-clang-objc-templatify: No extra space before args

diff --git a/NEWS.md b/NEWS.md
index a14f605..de36cbd 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* `company-clang-objc-templatify` does not insert spaces after colons anymore.
 * `company-clang` is now only initialized in supported buffers.
   So, no error messages if you don't have Clang until you open a C file.
 * `company-clang` recognizes Clang included with recent Xcode.
diff --git a/company-clang.el b/company-clang.el
index 6b80ef0..7fc66a9 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -202,8 +202,8 @@ Prefix files (-include ...) can be selected with
     (save-excursion
       (goto-char beg)
       (while (search-forward ":" end t)
-        (replace-match ":  ")
-        (incf end 2)
+        (replace-match ": ")
+        (incf end)
         (company-template-add-field templ (1- (match-end 0)) "<arg>"))
       (delete-char -1))
     (company-template-move-to-first templ)))

commit 9ff7b4160ffc4d7639f8b184f58d0f5a4abe897a
Author: Leo Liu <address@hidden>
Date:   Thu Mar 21 12:29:19 2013 +0800

    Fix last change

diff --git a/ggtags.el b/ggtags.el
index 6cac43e..9992eaf 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -132,7 +132,7 @@ Return -1 if it does not exist."
   (> (ggtags-get-timestamp key)
      (or (fourth (ggtags-cache-get key)) 0)))
 
-(defvar-local ggtags-root-directory 'init
+(defvar-local ggtags-root-directory 'unset
   "Internal; use function `ggtags-root-directory' instead.")
 
 ;;;###autoload
@@ -406,7 +406,7 @@ When called with prefix, ask the name and kind of tag."
          (message "%d %s killed" count (if (= count 1) "buffer" "buffers")))))
 
 (defun ggtags-after-save-function ()
-  (let ((root (ggtags-root-directory)))
+  (let ((root (with-demoted-errors (ggtags-root-directory))))
     (and root (ggtags-cache-mark-dirty root t))))
 
 (defvar ggtags-tag-overlay nil)
@@ -456,10 +456,10 @@ When called with prefix, ask the name and kind of tag."
   :lighter (:eval (if ggtags-navigation-mode "" " GG"))
   (if ggtags-mode
       (progn
-        (or (ggtags-root-directory)
-            (message "File GTAGS not found"))
         (add-hook 'after-save-hook 'ggtags-after-save-function nil t)
-        (add-hook 'post-command-hook 'ggtags-post-command-function nil t))
+        (if (executable-find "global")
+            (add-hook 'post-command-hook 'ggtags-post-command-function nil t)
+          (message "Failed to find GNU Global")))
     (remove-hook 'after-save-hook 'ggtags-after-save-function t)
     (remove-hook 'post-command-hook 'ggtags-post-command-function t)
     (and (overlayp ggtags-tag-overlay)
@@ -481,8 +481,8 @@ When called with prefix, ask the name and kind of tag."
   (when buffer-file-name
     (let ((file (file-truename buffer-file-name)))
       (with-temp-buffer
-        (when (zerop (with-demoted-errors
-                       (call-process "global" nil t nil "-f" file)))
+        (when (with-demoted-errors
+                (zerop (call-process "global" nil t nil "-f" file)))
           (goto-char (point-min))
           (loop while (re-search-forward
                        "^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)" nil t)
@@ -503,7 +503,7 @@ When called with prefix, ask the name and kind of tag."
                       (point))
       (setq he-expand-list
             (and (not (equal he-search-string ""))
-                 (ggtags-root-directory)
+                 (with-demoted-errors (ggtags-root-directory))
                  (sort (all-completions he-search-string
                                         (ggtags-tag-names))
                        'string-lessp))))

commit 1868d5c64e9fbc764bb668fd8077b6f4829464b3
Author: Leo Liu <address@hidden>
Date:   Thu Mar 21 11:14:29 2013 +0800

    Remove ggtags-ignore-file-error and its uses
    
    If `gtags' or `global' that ggtags-mode relies on can not be found,
    users should get the error.
    
    See https://github.com/leoliu/ggtags/issues/2

diff --git a/ggtags.el b/ggtags.el
index ea58b52..6cac43e 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.6.1
+;; Version: 0.6.2
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -79,15 +79,9 @@ If nil, use Emacs default."
 (defvar ggtags-global-error "match"
   "Stem of message to print when no matches are found.")
 
-(defmacro ggtags-ignore-file-error (&rest body)
-  (declare (indent 0))
-  `(condition-case nil
-       (progn ,@body)
-     (file-error nil)))
-
 ;; http://thread.gmane.org/gmane.comp.gnu.global.bugs/1518
 (defvar ggtags-global-has-path-style    ; introduced in global 6.2.8
-  (ggtags-ignore-file-error
+  (with-demoted-errors                  ; in case `global' not found
     (and (string-match-p "^--path-style "
                          (shell-command-to-string "global --help"))
          t))
@@ -146,11 +140,10 @@ Return -1 if it does not exist."
   (if (string-or-null-p ggtags-root-directory)
       ggtags-root-directory
     (setq ggtags-root-directory
-          (ggtags-ignore-file-error
-           (with-temp-buffer
-             (when (zerop (call-process "global" nil (list t nil) nil "-pr"))
-               (file-name-as-directory
-                (comment-string-strip (buffer-string) t t))))))))
+          (with-temp-buffer
+            (when (zerop (call-process "global" nil (list t nil) nil "-pr"))
+              (file-name-as-directory
+               (comment-string-strip (buffer-string) t t)))))))
 
 (defun ggtags-check-root-directory ()
   (or (ggtags-root-directory) (error "File GTAGS not found")))
@@ -160,14 +153,13 @@ Return -1 if it does not exist."
       (if (yes-or-no-p "File GTAGS not found; run gtags? ")
           (let ((root (read-directory-name "Directory: " nil nil t)))
             (and (= (length root) 0) (error "No directory chosen"))
-            (ggtags-ignore-file-error
-              (with-temp-buffer
-                (if (zerop (let ((default-directory
-                                   (file-name-as-directory root)))
-                             (call-process "gtags" nil t)))
-                    (message "File GTAGS generated in `%s'"
-                             (ggtags-root-directory))
-                  (error "%s" (comment-string-strip (buffer-string) t t))))))
+            (with-temp-buffer
+              (if (zerop (let ((default-directory
+                                 (file-name-as-directory root)))
+                           (call-process "gtags" nil t)))
+                  (message "File GTAGS generated in `%s'"
+                           (ggtags-root-directory))
+                (error "%s" (comment-string-strip (buffer-string) t t)))))
         (error "Aborted"))))
 
 (defun ggtags-tag-names-1 (root &optional prefix)
@@ -488,15 +480,15 @@ When called with prefix, ask the name and kind of tag."
   "A function suitable for `imenu-create-index-function'."
   (when buffer-file-name
     (let ((file (file-truename buffer-file-name)))
-      (ggtags-ignore-file-error
-        (with-temp-buffer
-          (when (zerop (call-process "global" nil t nil "-f" file))
-            (goto-char (point-min))
-            (loop while (re-search-forward
-                         "^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)" nil t)
-                  collect (list (match-string 1)
-                                (string-to-number (match-string 2))
-                                'ggtags-goto-imenu-index))))))))
+      (with-temp-buffer
+        (when (zerop (with-demoted-errors
+                       (call-process "global" nil t nil "-f" file)))
+          (goto-char (point-min))
+          (loop while (re-search-forward
+                       "^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)" nil t)
+                collect (list (match-string 1)
+                              (string-to-number (match-string 2))
+                              'ggtags-goto-imenu-index)))))))
 
 ;;; hippie-expand
 

commit da32a6a4e9fd28006e4a53e99250e80587cb50bf
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 21 01:20:38 2013 +0400

    company-clang: Only initialize in supported major modes

diff --git a/NEWS.md b/NEWS.md
index 1e562ff..a14f605 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,8 @@
 
 ## Next
 
+* `company-clang` is now only initialized in supported buffers.
+  So, no error messages if you don't have Clang until you open a C file.
 * `company-clang` recognizes Clang included with recent Xcode.
 * New commands `company-select-previous-or-abort` and
   `company-select-next-or-abort`, bound to `<up>` and `<down>`.
diff --git a/company-clang.el b/company-clang.el
index 7c3a3b4..6b80ef0 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -222,10 +222,11 @@ Completions only work correctly when the buffer has been 
saved.
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-clang))
-    (init (unless company-clang-executable
-            (error "Company found no clang executable"))
-          (when (< (company-clang-version) company-clang-required-version)
-            (error "Company requires clang version 1.1")))
+    (init (when (memq major-mode company-clang-modes)
+            (unless company-clang-executable
+              (error "Company found no clang executable"))
+            (when (< (company-clang-version) company-clang-required-version)
+              (error "Company requires clang version 1.1"))))
     (prefix (and (memq major-mode company-clang-modes)
                  buffer-file-name
                  company-clang-executable

commit 38aa1ca2f88607c8cd9f9b5a14bf0dfadadc5546
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 21 01:04:27 2013 +0400

    Update NEWS

diff --git a/NEWS.md b/NEWS.md
index a4d0afe..1e562ff 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* `company-clang` recognizes Clang included with recent Xcode.
 * New commands `company-select-previous-or-abort` and
   `company-select-next-or-abort`, bound to `<up>` and `<down>`.
 

commit 5b0f5b93f6982545561de5d7be19b3fc291a0814
Author: Dmitry Gutov <address@hidden>
Date:   Wed Mar 20 23:46:43 2013 +0400

    company-clang: Update docstring

diff --git a/company-clang.el b/company-clang.el
index e239c61..7c3a3b4 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -210,8 +210,7 @@ Prefix files (-include ...) can be selected with
 
 (defun company-clang (command &optional arg &rest ignored)
   "A `company-mode' completion back-end for clang.
-Clang is a parser for C and ObjC.  The unreleased development version of
-clang (1.1) is required.
+Clang is a parser for C and ObjC.  Clang version 1.1 or newer is required.
 
 Additional command line arguments can be specified in
 `company-clang-arguments'.  Prefix files (-include ...) can be selected

commit 3c666787bf15c85809ca0c4f3813169b819d3270
Author: Dmitry Gutov <address@hidden>
Date:   Wed Mar 20 23:40:27 2013 +0400

    Fix #3

diff --git a/company-clang.el b/company-clang.el
index 966ef79..e239c61 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -181,16 +181,19 @@ Prefix files (-include ...) can be selected with
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defconst company-clang-required-version "1.1")
+(defconst company-clang-required-version 1.1)
 
 (defsubst company-clang-version ()
   "Return the version of `company-clang-executable'."
   (with-temp-buffer
     (call-process company-clang-executable nil t nil "--version")
     (goto-char (point-min))
-    (if (re-search-forward "clang version \\([0-9.]+\\)" nil t)
-        (match-string-no-properties 1)
-      "0")))
+    (if (re-search-forward "clang\\(?: version \\|-\\)\\([0-9.]+\\)" nil t)
+        (let ((ver (string-to-number (match-string-no-properties 1))))
+          (if (> ver 100)
+              (/ ver 100)
+            ver))
+      0)))
 
 (defun company-clang-objc-templatify (selector)
   (let* ((end (point))
@@ -222,8 +225,7 @@ Completions only work correctly when the buffer has been 
saved.
     (interactive (company-begin-backend 'company-clang))
     (init (unless company-clang-executable
             (error "Company found no clang executable"))
-          (when (version< (company-clang-version)
-                          company-clang-required-version)
+          (when (< (company-clang-version) company-clang-required-version)
             (error "Company requires clang version 1.1")))
     (prefix (and (memq major-mode company-clang-modes)
                  buffer-file-name

commit f18a8bc3004da4382bdcfdfa4cf515853b0d2e1b
Author: Leo Liu <address@hidden>
Date:   Wed Mar 20 19:52:12 2013 +0800

    Update README.rst

diff --git a/README.rst b/README.rst
index efe01d4..45d0cfa 100644
--- a/README.rst
+++ b/README.rst
@@ -3,8 +3,7 @@
 =========================
  
 A package for working with `GNU Global
-<http://www.gnu.org/software/global>`_ source tagging system inside
-Emacs.
+<http://www.gnu.org/software/global>`_ source tagging system in Emacs.
 
 This package is part of `GNU ELPA <http://elpa.gnu.org>`_
 (``M-x list-packages``).
@@ -20,6 +19,15 @@ Features
    features)
 #. Abbreviated display of file names
 
+Why GNU Global
+~~~~~~~~~~~~~~
+
+The opengrok project composed a feature comparison table between a few
+tools. The `page
+<http://hub.opensolaris.org/bin/view/Project+opengrok>`_ is taken
+offline after 2013-03-24 but `here <http://i.imgur.com/IQCPQ0j.png>`_
+is a backup.
+
 Screenshot
 ~~~~~~~~~~
 

commit acf66fb09d6bb44e00e789994fa0bb916213459a
Author: Leo Liu <address@hidden>
Date:   Wed Mar 20 19:09:51 2013 +0800

    Cache the value of function ggtags-root-directory

diff --git a/ggtags.el b/ggtags.el
index 59828c0..ea58b52 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -38,7 +38,13 @@
 (eval-when-compile
   (unless (fboundp 'setq-local)
     (defmacro setq-local (var val)
-      (list 'set (list 'make-local-variable (list 'quote var)) val))))
+      (list 'set (list 'make-local-variable (list 'quote var)) val)))
+
+  (unless (fboundp 'defvar-local)
+    (defmacro defvar-local (var val &optional docstring)
+      (declare (debug defvar) (doc-string 3))
+      (list 'progn (list 'defvar var val docstring)
+            (list 'make-variable-buffer-local (list 'quote var))))))
 
 (defgroup ggtags nil
   "GNU Global source code tagging system."
@@ -132,13 +138,19 @@ Return -1 if it does not exist."
   (> (ggtags-get-timestamp key)
      (or (fourth (ggtags-cache-get key)) 0)))
 
+(defvar-local ggtags-root-directory 'init
+  "Internal; use function `ggtags-root-directory' instead.")
+
 ;;;###autoload
 (defun ggtags-root-directory ()
-  (ggtags-ignore-file-error
-    (with-temp-buffer
-      (when (zerop (call-process "global" nil (list t nil) nil "-pr"))
-        (file-name-as-directory
-         (comment-string-strip (buffer-string) t t))))))
+  (if (string-or-null-p ggtags-root-directory)
+      ggtags-root-directory
+    (setq ggtags-root-directory
+          (ggtags-ignore-file-error
+           (with-temp-buffer
+             (when (zerop (call-process "global" nil (list t nil) nil "-pr"))
+               (file-name-as-directory
+                (comment-string-strip (buffer-string) t t))))))))
 
 (defun ggtags-check-root-directory ()
   (or (ggtags-root-directory) (error "File GTAGS not found")))

commit 48afb6016c87bd72ce6c14b1947b2c22a8827f66
Author: Leo Liu <address@hidden>
Date:   Wed Mar 20 19:00:29 2013 +0800

    New function try-complete-ggtags-tag for hippie-expand

diff --git a/ggtags.el b/ggtags.el
index 20600bf..59828c0 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -463,6 +463,7 @@ When called with prefix, ask the name and kind of tag."
     (setq ggtags-tag-overlay nil)))
 
 ;;; imenu
+
 (defun ggtags-goto-imenu-index (name line &rest _args)
   (save-restriction
     (widen)
@@ -485,5 +486,30 @@ When called with prefix, ask the name and kind of tag."
                                 (string-to-number (match-string 2))
                                 'ggtags-goto-imenu-index))))))))
 
+;;; hippie-expand
+
+;;;###autoload
+(defun try-complete-ggtags-tag (old)
+  "A function suitable for `hippie-expand-try-functions-list'."
+  (with-no-warnings                     ; to avoid loading hippie-exp
+    (unless old
+      (he-init-string (if (looking-back "\\_<.*" (line-beginning-position))
+                          (match-beginning 0)
+                        (point))
+                      (point))
+      (setq he-expand-list
+            (and (not (equal he-search-string ""))
+                 (ggtags-root-directory)
+                 (sort (all-completions he-search-string
+                                        (ggtags-tag-names))
+                       'string-lessp))))
+    (if (null he-expand-list)
+        (progn
+          (if old (he-reset-string))
+          nil)
+      (he-substitute-string (car he-expand-list))
+      (setq he-expand-list (cdr he-expand-list))
+      t)))
+
 (provide 'ggtags)
 ;;; ggtags.el ends here

commit dd7ce94b2bb4a8967cd442c601cb4bcb765306a8
Author: Dmitry Gutov <address@hidden>
Date:   Wed Mar 20 10:35:15 2013 +0400

    company-pseudo-tooltip-show: No need to set overlay window here

diff --git a/company.el b/company.el
index 2d2aead..df758e1 100644
--- a/company.el
+++ b/company.el
@@ -1752,8 +1752,7 @@ Returns a negative number if the tooltip should be 
displayed above point."
                             args))
 
         (overlay-put ov 'company-column column)
-        (overlay-put ov 'company-height (abs height))
-        (overlay-put ov 'window (selected-window))))))
+        (overlay-put ov 'company-height (abs height))))))
 
 (defun company-pseudo-tooltip-show-at-point (pos)
   (let ((col-row (company--col-row pos)))

commit 1e34bac4cc864071284c40b7a0d06cc4b039890b
Author: Dmitry Gutov <address@hidden>
Date:   Wed Mar 20 09:18:02 2013 +0400

    Add new commands: `company-select-{previous,next}-or-abort`

diff --git a/NEWS.md b/NEWS.md
index bca1d9e..a4d0afe 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,10 @@
 # History of user-visible changes
 
+## Next
+
+* New commands `company-select-previous-or-abort` and
+  `company-select-next-or-abort`, bound to `<up>` and `<down>`.
+
 ## 2013-03-19 (0.6)
 
 * Across-the-board bugfixing.
diff --git a/company.el b/company.el
index 8b097b3..2d2aead 100644
--- a/company.el
+++ b/company.el
@@ -458,8 +458,8 @@ The work-around consists of adding a newline.")
     (define-key keymap "\C-g" 'company-abort)
     (define-key keymap (kbd "M-n") 'company-select-next)
     (define-key keymap (kbd "M-p") 'company-select-previous)
-    (define-key keymap (kbd "<down>") 'company-select-next)
-    (define-key keymap (kbd "<up>") 'company-select-previous)
+    (define-key keymap (kbd "<down>") 'company-select-next-or-abort)
+    (define-key keymap (kbd "<up>") 'company-select-previous-or-abort)
     (define-key keymap [down-mouse-1] 'ignore)
     (define-key keymap [down-mouse-3] 'ignore)
     (define-key keymap [mouse-1] 'company-complete-mouse)
@@ -1191,9 +1191,7 @@ can retrieve meta-data for them."
   (interactive)
   (company-search-assert-enabled)
   (company-search-mode 0)
-  (when last-input-event
-    (clear-this-command-keys t)
-    (setq unread-command-events (list last-input-event))))
+  (company--unread-last-input))
 
 (defvar company-search-map
   (let ((i 0)
@@ -1202,7 +1200,7 @@ can retrieve meta-data for them."
         (set-char-table-range (nth 1 keymap) (cons #x100 (max-char))
                               'company-search-printing-char)
       (with-no-warnings
-        ;; obselete in Emacs 23
+        ;; obsolete in Emacs 23
         (let ((l (generic-character-list))
               (table (nth 1 keymap)))
           (while l
@@ -1297,6 +1295,24 @@ followed by `company-search-kill-others' after each 
input."
   (when (company-manual-begin)
     (company-set-selection (1- company-selection))))
 
+(defun company-select-next-or-abort ()
+  "Select the next candidate if more than one, else abort
+and invoke the normal binding."
+  (interactive)
+  (if (> company-candidates-length 1)
+      (company-select-next)
+    (company-abort)
+    (company--unread-last-input)))
+
+(defun company-select-previous-or-abort ()
+  "Select the previous candidate if more than one, else abort
+and invoke the normal binding."
+  (interactive)
+  (if (> company-candidates-length 1)
+      (company-select-previous)
+    (company-abort)
+    (company--unread-last-input)))
+
 (defun company-select-mouse (event)
   "Select the candidate picked by the mouse."
   (interactive "e")
@@ -1415,9 +1431,12 @@ To show the number next to the candidates in some 
back-ends, enable
          (while (memq (setq cmd (key-binding (vector (list (read-event)))))
                       company--electric-commands)
            (call-interactively cmd))
-         (when last-input-event
-           (clear-this-command-keys t)
-           (setq unread-command-events (list last-input-event)))))))
+         (company--unread-last-input)))))
+
+(defun company--unread-last-input ()
+  (when last-input-event
+    (clear-this-command-keys t)
+    (setq unread-command-events (list last-input-event))))
 
 (defun company-show-doc-buffer ()
   "Temporarily show a buffer with the complete documentation for the 
selection."

commit dae36cc520cf60960d0d650ff09c09ecf5525d3a
Author: Dmitry Gutov <address@hidden>
Date:   Wed Mar 20 08:55:19 2013 +0400

    Extract NEWS.md
    
    * Reorder 0.6's entries in reverse chronological order, like in other 
versions.

diff --git a/.dir-locals.el b/.dir-locals.el
index a4fea85..3a4c010 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,2 +1,3 @@
 ((nil . ((indent-tabs-mode . nil)
-         (fill-column . 80))))
+         (fill-column . 80)
+         (sentence-end-double-space . t))))
diff --git a/NEWS.md b/NEWS.md
new file mode 100644
index 0000000..bca1d9e
--- /dev/null
+++ b/NEWS.md
@@ -0,0 +1,101 @@
+# History of user-visible changes
+
+## 2013-03-19 (0.6)
+
+* Across-the-board bugfixing.
+* `company-pysmell` is not used by default anymore.
+* Loading of `nxml`, `semantic`, `pymacs` and `ropemacs` is now deferred.
+* Candidates from grouped back-ends are merged more conservatively: only
+  back-ends that return the same prefix at point are used.
+* `company-clang` now shows meta information, too.
+* Some performance improvements.
+* Fixed two old tooltip annoyances.
+* Instead of `overrriding-terminal-local-map`, we're now using
+  `emulation-mode-map-alists` (experimental).  This largely means that when the
+  completion keymap is active, other minor modes' keymaps are still used, so,
+  for example, it's not as easy to accidentally circumvent `paredit-mode`
+  when it's enabled.
+* `company-elisp` has seen some improvements.
+* Added `company-capf`: completion adapter using
+  `completion-at-point-functions`.  (Stefan Monnier)
+* Clang completions now include macros and are case-sensitive.
+* Switching between tag files now works correctly with `company-etags`.
+
+## 2010-02-24 (0.5)
+
+* `company-ropemacs` now provides location and docs.  (Fernando H. Silva)
+* Added `company-with-candidate-inserted` macro.
+* Added `company-clang` back-end.
+* Added new mechanism for non-consecutive insertion.
+  (So far only used by clang for ObjC.)
+* The semantic back-end now shows meta information for local symbols.
+* Added compatibility for CEDET in Emacs 23.2 and from CVS.  (Oleg Andreev)
+
+## 2009-05-07 (0.4.3)
+
+* Added `company-other-backend`.
+* Idle completion no longer interrupts multi-key command input.
+* Added `company-ropemacs` and `company-pysmell` back-ends.
+
+## 2009-04-25 (0.4.2)
+
+* In C modes . and -> now count towards `company-minimum-prefix-length`.
+* Reverted default front-end back to `company-preview-if-just-one-frontend`.
+* The pseudo tooltip will no longer be clipped at the right window edge.
+* Added `company-tooltip-minimum`.
+* Windows compatibility fixes.
+
+## 2009-04-19 (0.4.1)
+
+* Added `global-company-mode`.
+* Performance enhancements.
+* Added `company-eclim` back-end.
+* Added safer workaround for Emacs `posn-col-row` bug.
+
+## 2009-04-18 (0.4)
+
+* Automatic completion is now aborted if the prefix gets too short.
+* Added option `company-dabbrev-time-limit`.
+* `company-backends` now supports merging back-ends.
+* Added back-end `company-dabbrev-code` for generic code.
+* Fixed `company-begin-with`.
+
+## 2009-04-15 (0.3.1)
+
+* Added 'stop prefix to prevent dabbrev from completing inside of symbols.
+* Fixed issues with tabbar-mode and line-spacing.
+* Performance enhancements.
+
+## 2009-04-12 (0.3)
+
+* Added `company-begin-commands` option.
+* Added abbrev, tempo and Xcode back-ends.
+* Back-ends are now interactive.  You can start them with M-x backend-name.
+* Added `company-begin-with` for starting company from elisp-code.
+* Added hooks.
+* Added `company-require-match` and `company-auto-complete` options.
+
+## 2009-04-05 (0.2.1)
+
+* Improved Emacs Lisp back-end behavior for local variables.
+* Added `company-elisp-detect-function-context` option.
+* The mouse can now be used for selection.
+
+## 2009-03-22 (0.2)
+
+* Added `company-show-location`.
+* Added etags back-end.
+* Added work-around for end-of-buffer bug.
+* Added `company-filter-candidates`.
+* More local Lisp variables are now included in the candidates.
+
+## 2009-03-21 (0.1.5)
+
+* Fixed elisp documentation buffer always showing the same doc.
+* Added `company-echo-strip-common-frontend`.
+* Added `company-show-numbers` option and M-0 ... M-9 default bindings.
+* Don't hide the echo message if it isn't shown.
+
+## 2009-03-20 (0.1)
+
+* Initial release.
diff --git a/company.el b/company.el
index 59ddcc6..8b097b3 100644
--- a/company.el
+++ b/company.el
@@ -65,93 +65,7 @@
 ;;
 ;;; Change Log:
 ;;
-;; 2013-03-19 (0.6)
-;;    Switching between tag files now works correctly with `company-etags'.
-;;    Clang completions now include macros and are case-sensitive.
-;;    Added `company-capf': completion adapter using
-;;    `completion-at-point-functions'.  (Stefan Monnier)
-;;    `company-elisp' has some improvements.
-;;    Instead of `overrriding-terminal-local-map', we're now using
-;;    `emulation-mode-map-alists' (experimental).  This largely means that when
-;;    the completion keymap is active, other minor modes' keymaps are still
-;;    used, so, for example, it's not as easy to circumvent `paredit-mode'
-;;    accidentally when it's enabled.
-;;    Fixed two old tooltip annoyances.
-;;    Some performance improvements.
-;;    `company-clang' now shows meta information, too.
-;;    Candidates from grouped back-ends are merged more conservatively: only
-;;    back-ends that return the same prefix at point are used.
-;;    Loading of `nxml', `semantic', `pymacs' and `ropemacs' is now deferred.
-;;    `company-pysmell' is not used by default anymore.
-;;    Across-the-board bugfixing.
-;;
-;; 2010-02-24 (0.5)
-;;    `company-ropemacs' now provides location and docs.  (Fernando H. Silva)
-;;    Added `company-with-candidate-inserted' macro.
-;;    Added `company-clang' back-end.
-;;    Added new mechanism for non-consecutive insertion.
-;;      (So far only used by clang for ObjC.)
-;;    The semantic back-end now shows meta information for local symbols.
-;;    Added compatibility for CEDET in Emacs 23.2 and from CVS.  (Oleg Andreev)
-;;
-;; 2009-05-07 (0.4.3)
-;;    Added `company-other-backend'.
-;;    Idle completion no longer interrupts multi-key command input.
-;;    Added `company-ropemacs' and `company-pysmell' back-ends.
-;;
-;; 2009-04-25 (0.4.2)
-;;    In C modes . and -> now count towards `company-minimum-prefix-length'.
-;;    Reverted default front-end back to 
`company-preview-if-just-one-frontend'.
-;;    The pseudo tooltip will no longer be clipped at the right window edge.
-;;    Added `company-tooltip-minimum'.
-;;    Windows compatibility fixes.
-;;
-;; 2009-04-19 (0.4.1)
-;;    Added `global-company-mode'.
-;;    Performance enhancements.
-;;    Added `company-eclim' back-end.
-;;    Added safer workaround for Emacs `posn-col-row' bug.
-;;
-;; 2009-04-18 (0.4)
-;;    Automatic completion is now aborted if the prefix gets too short.
-;;    Added option `company-dabbrev-time-limit'.
-;;    `company-backends' now supports merging back-ends.
-;;    Added back-end `company-dabbrev-code' for generic code.
-;;    Fixed `company-begin-with'.
-;;
-;; 2009-04-15 (0.3.1)
-;;    Added 'stop prefix to prevent dabbrev from completing inside of symbols.
-;;    Fixed issues with tabbar-mode and line-spacing.
-;;    Performance enhancements.
-;;
-;; 2009-04-12 (0.3)
-;;    Added `company-begin-commands' option.
-;;    Added abbrev, tempo and Xcode back-ends.
-;;    Back-ends are now interactive.  You can start them with M-x backend-name.
-;;    Added `company-begin-with' for starting company from elisp-code.
-;;    Added hooks.
-;;    Added `company-require-match' and `company-auto-complete' options.
-;;
-;; 2009-04-05 (0.2.1)
-;;    Improved Emacs Lisp back-end behavior for local variables.
-;;    Added `company-elisp-detect-function-context' option.
-;;    The mouse can now be used for selection.
-;;
-;; 2009-03-22 (0.2)
-;;    Added `company-show-location'.
-;;    Added etags back-end.
-;;    Added work-around for end-of-buffer bug.
-;;    Added `company-filter-candidates'.
-;;    More local Lisp variables are now included in the candidates.
-;;
-;; 2009-03-21 (0.1.5)
-;;    Fixed elisp documentation buffer always showing the same doc.
-;;    Added `company-echo-strip-common-frontend'.
-;;    Added `company-show-numbers' option and M-0 ... M-9 default bindings.
-;;    Don't hide the echo message if it isn't shown.
-;;
-;; 2009-03-20 (0.1)
-;;    Initial release.
+;; See NEWS.md in the repository.
 
 ;;; Code:
 

commit 72fbcfaba1f40b692845a38d9c3c36d8338de59a
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 18:46:51 2013 +0400

    Update summary string

diff --git a/company.el b/company.el
index 8f1e711..59ddcc6 100644
--- a/company.el
+++ b/company.el
@@ -1,4 +1,4 @@
-;;; company.el --- Extensible inline text completion mechanism
+;;; company.el --- Modular in-buffer completion framework
 
 ;; Copyright (C) 2009-2013  Free Software Foundation, Inc.
 

commit 1925479b9f782bbe339e7f9e80653cecd6f12f2f
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 18:12:18 2013 +0400

    company-tests: add copyright boilerplate

diff --git a/company-tests.el b/company-tests.el
index bb1e654..1f5db14 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -1,3 +1,30 @@
+;;; company-tests.el --- company-mode tests
+
+;; Copyright (C) 2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
+
 (require 'ert)
 (require 'company)
 (require 'company-keywords)

commit fecb101033b11233cb3eb0a2b288665f5c1ff1d1
Author: Leo Liu <address@hidden>
Date:   Tue Mar 19 18:54:22 2013 +0800

    (sit-for 0) to allow compilation-auto-jump in timer to run
    
    See http://debbugs.gnu.org/13829 for more info.

diff --git a/ggtags.el b/ggtags.el
index 601f466..20600bf 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.6
+;; Version: 0.6.1
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -287,6 +287,7 @@ When called with prefix, ask the name and kind of tag."
                    (point) 'compilation-message))))
     (ggtags-navigation-mode -1)
     ;; 0.5s delay for `ggtags-auto-jump-to-first-match'
+    (sit-for 0)                    ; See: http://debbugs.gnu.org/13829
     (ggtags-navigation-mode-cleanup buf 0.5)))
 
 (define-compilation-mode ggtags-global-mode "Global"
@@ -338,8 +339,7 @@ When called with prefix, ask the name and kind of tag."
            (when (and (derived-mode-p 'ggtags-global-mode)
                       (get-buffer-window))
              (delete-window (get-buffer-window)))
-           (and time (run-with-idle-timer time nil
-                                          'kill-buffer (current-buffer)))))))
+           (and time (run-with-idle-timer time nil 'kill-buffer buf))))))
 
 (defun ggtags-navigation-mode-done ()
   (interactive)

commit 72a824ffdf93287d72a0479a6a210ad0af46724a
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 07:38:07 2013 +0400

    Release 0.6

diff --git a/company.el b/company.el
index b692c40..8f1e711 100644
--- a/company.el
+++ b/company.el
@@ -3,9 +3,10 @@
 ;; Copyright (C) 2009-2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
-;; Version: 0.5
+;; Maintainer: Dmitry Gutov <address@hidden>
+;; Version: 0.6
 ;; Keywords: abbrev, convenience, matching
-;; URL: http://nschum.de/src/emacs/company-mode/
+;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x
 
 ;; This file is part of GNU Emacs.
@@ -64,7 +65,8 @@
 ;;
 ;;; Change Log:
 ;;
-;;    Switching tags now works correctly in `company-etags'.
+;; 2013-03-19 (0.6)
+;;    Switching between tag files now works correctly with `company-etags'.
 ;;    Clang completions now include macros and are case-sensitive.
 ;;    Added `company-capf': completion adapter using
 ;;    `completion-at-point-functions'.  (Stefan Monnier)
@@ -81,6 +83,7 @@
 ;;    back-ends that return the same prefix at point are used.
 ;;    Loading of `nxml', `semantic', `pymacs' and `ropemacs' is now deferred.
 ;;    `company-pysmell' is not used by default anymore.
+;;    Across-the-board bugfixing.
 ;;
 ;; 2010-02-24 (0.5)
 ;;    `company-ropemacs' now provides location and docs.  (Fernando H. Silva)

commit c2fcc867f9014315646f0641069cdd3b614a8bc2
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 07:29:04 2013 +0400

    Fix typo: pysmell -> pymacs

diff --git a/company.el b/company.el
index 106422f..b692c40 100644
--- a/company.el
+++ b/company.el
@@ -79,7 +79,7 @@
 ;;    `company-clang' now shows meta information, too.
 ;;    Candidates from grouped back-ends are merged more conservatively: only
 ;;    back-ends that return the same prefix at point are used.
-;;    Loading of `nxml', `semantic', `pysmell' and `ropemacs' is now deferred.
+;;    Loading of `nxml', `semantic', `pymacs' and `ropemacs' is now deferred.
 ;;    `company-pysmell' is not used by default anymore.
 ;;
 ;; 2010-02-24 (0.5)

commit ab9d10a7fc525a4ffcf3c90b218484c4fc7089bd
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 07:05:46 2013 +0400

    Fix company-echo-frontend

diff --git a/company.el b/company.el
index cfd0420..106422f 100644
--- a/company.el
+++ b/company.el
@@ -1934,6 +1934,10 @@ Returns a negative number if the tooltip should be 
displayed above point."
 (defvar company-echo-last-msg nil)
 (make-variable-buffer-local 'company-echo-last-msg)
 
+(defvar company-echo-timer nil)
+
+(defvar company-echo-delay .01)
+
 (defun company-echo-show (&optional getter)
   (when getter
     (setq company-echo-last-msg (funcall getter)))

commit 65a07086a81663b372c8589da4a966fa672956e7
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 06:51:34 2013 +0400

    Phrasing

diff --git a/company.el b/company.el
index 06f2d3f..cfd0420 100644
--- a/company.el
+++ b/company.el
@@ -29,7 +29,7 @@
 ;; candidates are called back-ends, modules for displaying them are front-ends.
 ;;
 ;; Company comes with many back-ends, e.g. `company-elisp'.  These are
-;; distributed in individual files and can be used individually.
+;; distributed in separate files and can be used individually.
 ;;
 ;; Place company.el and the back-ends you want to use in a directory and add 
the
 ;; following to your .emacs:

commit 32b8bc35f054b315f8ff2bffc6489589c43d5964
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 06:50:23 2013 +0400

    company-backends: remove 'company-pysmell

diff --git a/company.el b/company.el
index d2bf000..06f2d3f 100644
--- a/company.el
+++ b/company.el
@@ -79,6 +79,8 @@
 ;;    `company-clang' now shows meta information, too.
 ;;    Candidates from grouped back-ends are merged more conservatively: only
 ;;    back-ends that return the same prefix at point are used.
+;;    Loading of `nxml', `semantic', `pysmell' and `ropemacs' is now deferred.
+;;    `company-pysmell' is not used by default anymore.
 ;;
 ;; 2010-02-24 (0.5)
 ;;    `company-ropemacs' now provides location and docs.  (Fernando H. Silva)
@@ -348,7 +350,7 @@ Requires Emacs 24.1 or newer."
                               company-clang company-semantic company-eclim
                               company-xcode company-ropemacs
                               (company-gtags company-etags company-dabbrev-code
-                               company-pysmell company-keywords)
+                               company-keywords)
                               company-oddmuse company-files company-dabbrev)
   "The list of active back-ends (completion engines).
 Each list elements can itself be a list of back-ends.  In that case their

commit ecf7af6c22f3ba8bd189ebb3b3f86d1bb85f7441
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 06:27:36 2013 +0400

    company-ropemacs: defer loading pymacs and ropemacs

diff --git a/company-ropemacs.el b/company-ropemacs.el
index 8c54d51..bba9bcb 100644
--- a/company-ropemacs.el
+++ b/company-ropemacs.el
@@ -28,13 +28,6 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl))
-(require 'pymacs)
-
-(unless (fboundp 'rope-completions)
-  (pymacs-load "ropemacs" "rope-"))
-
-(unless (fboundp 'rope-completions)
-  (error "rope-completions not found, try development version of ropemacs"))
 
 (defun company-ropemacs--grab-symbol ()
   (let ((symbol (company-grab-symbol)))
@@ -67,6 +60,10 @@
   "A `company-mode' completion back-end for ropemacs."
   (interactive (list 'interactive))
   (case command
+    (init (when (and (derived-mode-p 'python-mode)
+                     (not (fboundp 'rope-completions)))
+            (require 'pymacs)
+            (pymacs-load "ropemacs" "rope-")))
     (interactive (company-begin-backend 'company-ropemacs))
     (prefix (and (derived-mode-p 'python-mode)
                  (not (company-in-string-or-comment))

commit 78d6ef179eeec28502ff821f2a28d7ba641adebc
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 06:09:07 2013 +0400

    company--pseudo-tooltip-height: account for wrapped lines

diff --git a/company.el b/company.el
index 13b0db4..d2bf000 100644
--- a/company.el
+++ b/company.el
@@ -1776,7 +1776,7 @@ Example:
 (defsubst company--pseudo-tooltip-height ()
   "Calculate the appropriate tooltip height.
 Returns a negative number if the tooltip should be displayed above point."
-  (let* ((lines (count-lines (window-start) (point-at-bol)))
+  (let* ((lines (company--row))
          (below (- (company--window-inner-height) 1 lines)))
     (if (and (< below (min company-tooltip-minimum company-candidates-length))
              (> lines below))

commit 7a195c6bb28b93a12a73a51c445e35cd017f2c68
Author: Leo Liu <address@hidden>
Date:   Tue Mar 19 08:25:39 2013 +0800

    ack-mode-display-match has been merged upstream
    
    as compilation-display-error.

diff --git a/ack.el b/ack.el
index e6cab60..12b8815 100644
--- a/ack.el
+++ b/ack.el
@@ -217,17 +217,19 @@ This gets tacked on the end of the generated 
expressions.")
                         (match-string 1 file)
                       file))))))
 
-(defun ack-mode-display-match ()
-  "Display in another window the match in current line."
-  (interactive)
-  (setq compilation-current-error (point))
-  (next-error-no-select 0))
-
 (define-compilation-mode ack-mode "Ack"
   "A compilation mode tailored for ack."
   (setq-local compilation-disable-input t)
   (setq-local compilation-error-face 'compilation-info)
-  (add-hook 'compilation-filter-hook 'ack-filter nil t)
+  (add-hook 'compilation-filter-hook 'ack-filter nil t))
+
+;;; `compilation-display-error' is introduced in 24.4
+(unless (fboundp 'compilation-display-error)
+  (defun ack-mode-display-match ()
+    "Display in another window the match in current line."
+    (interactive)
+    (setq compilation-current-error (point))
+    (next-error-no-select 0))
   (define-key ack-mode-map "\C-o" #'ack-mode-display-match))
 
 (defun ack-skel-file ()

commit 9f69658a364991b0bbae940eb388dcc452aaa8c6
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 04:23:25 2013 +0400

    Phrasing

diff --git a/company.el b/company.el
index 5ccee5f..13b0db4 100644
--- a/company.el
+++ b/company.el
@@ -53,10 +53,9 @@
 ;;     (candidates (list "foobar" "foobaz" "foobarbaz"))
 ;;     (meta (format "This value is named %s" arg))))
 ;;
-;; Sometimes it is a good idea to mix two back-ends together, for example to
-;; enrich gtags with dabbrev-code results (to emulate local variables):
-;; To do this, add a list with the merged back-ends as an element in
-;; company-backends.
+;; Sometimes it is a good idea to mix several back-ends together, for example 
to
+;; enrich gtags with dabbrev-code results (to emulate local variables).
+;; To do this, add a list with both back-ends as an element in 
company-backends.
 ;;
 ;; Known Issues:
 ;; When point is at the very end of the buffer, the pseudo-tooltip appears very

commit 6009938d5bf83ea53e59831feaec5af549d0d0ac
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 04:19:11 2013 +0400

    company-dabbrev-code: use case-fold-search
    
    e7c7ba09d9b0bd859b0561009be5eab5020593ed was only half right.

diff --git a/company-dabbrev-code.el b/company-dabbrev-code.el
index 64f60c7..b98c17d 100644
--- a/company-dabbrev-code.el
+++ b/company-dabbrev-code.el
@@ -78,7 +78,7 @@ comments or strings."
                      (apply 'derived-mode-p company-dabbrev-code-modes))
                  (not (company-in-string-or-comment))
                  (or (company-grab-symbol) 'stop)))
-    (candidates (let ((completion-ignore-case nil))
+    (candidates (let ((case-fold-search nil))
                   (company-dabbrev--search
                    (company-dabbrev-code--make-regexp arg)
                    company-dabbrev-code-time-limit

commit 52a81628a9646f9aba03528b26efc5c6cb4a08f2
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 03:46:02 2013 +0400

    company-eclim: reorder commentary text

diff --git a/company-eclim.el b/company-eclim.el
index 592e345..e5bce3b 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -21,12 +21,12 @@
 
 ;;; Commentary:
 ;;
+;; Eclim version 1.7.13 or newer (?) is required.
+;;
 ;; This completion backend is pretty barebone.
 ;;
 ;; `emacs-eclim' provides an alternative backend, and it also allows you to
-;; actually control Eclim from Emacs. Check it out.
-;;
-;; Eclim version 1.7.13 or newer (?) is required.
+;; actually control Eclim from Emacs.
 
 ;;; Code:
 

commit d79c8d053db68cff5d718b64e44b0b31d9d4b948
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 01:00:03 2013 +0400

    company--multi-backend-adapter: use cl-loop and nconc

diff --git a/company.el b/company.el
index 3c4e55e..5ccee5f 100644
--- a/company.el
+++ b/company.el
@@ -733,11 +733,10 @@ keymap during active completions (`company-active-map'):
                              backends)))
     (case command
       (candidates
-       (apply 'append (mapcar (lambda (backend)
-                                (when (equal (funcall backend 'prefix)
-                                             (car args))
-                                  (apply backend 'candidates args)))
-                              backends)))
+       (loop for backend in backends
+             when (equal (funcall backend 'prefix)
+                         (car args))
+             nconc (apply backend 'candidates args)))
       (sorted nil)
       (duplicates t)
       (otherwise

commit 06270357092d267fd65e501a37a15e2f5e306e92
Author: Dmitry Gutov <address@hidden>
Date:   Tue Mar 19 00:45:23 2013 +0400

    company--multi-backend-adapter: only use candidates from back-ends with the 
same prefix

diff --git a/company.el b/company.el
index 081b3bf..3c4e55e 100644
--- a/company.el
+++ b/company.el
@@ -78,6 +78,8 @@
 ;;    Fixed two old tooltip annoyances.
 ;;    Some performance improvements.
 ;;    `company-clang' now shows meta information, too.
+;;    Candidates from grouped back-ends are merged more conservatively: only
+;;    back-ends that return the same prefix at point are used.
 ;;
 ;; 2010-02-24 (0.5)
 ;;    `company-ropemacs' now provides location and docs.  (Fernando H. Silva)
@@ -731,7 +733,10 @@ keymap during active completions (`company-active-map'):
                              backends)))
     (case command
       (candidates
-       (apply 'append (mapcar (lambda (backend) (apply backend command args))
+       (apply 'append (mapcar (lambda (backend)
+                                (when (equal (funcall backend 'prefix)
+                                             (car args))
+                                  (apply backend 'candidates args)))
                               backends)))
       (sorted nil)
       (duplicates t)

commit 408c2e07e8064a5e6d7486ecafd19b2ee8a9ac7b
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 19:36:37 2013 +0400

    company-pysmell: update the commentary
    
    Pysmell hasn't been updated in 4 years, there's no reason why the back-end
    would stop working.

diff --git a/company-pysmell.el b/company-pysmell.el
index 8ee889a..fe36eef 100644
--- a/company-pysmell.el
+++ b/company-pysmell.el
@@ -22,7 +22,8 @@
 
 ;;; Commentary:
 ;;
-;; Someone who can actually install Pysmell should tell us if this still works.
+;; The main problem with using this backend is installing Pysmell.
+;; I couldn't manage to do that. --Dmitry
 
 ;;; Code:
 

commit d5f74fe53238d8dbf55dc8450b27b491861dc74d
Author: Thierry Volpiatto <address@hidden>
Date:   Mon Mar 18 11:59:00 2013 +0100

    * eldoc-eval.el: only need to inline 
eldoc-display-message-no-interference-p and set eldoc-message-function to 
'message.
    Fix recursive minibuffers: Don't send eldoc info of current-buffer.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index cede787..dbc142e 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -61,37 +61,7 @@ Should take one arg: the string to display"
 ;; minibuffer is in use, disable this and inline old Emacs behavior.
 
 (when (boundp 'eldoc-message-function)
-  (setq eldoc-message-function nil)
-
-  (defun eldoc-message (&rest args)
-    (let ((omessage eldoc-last-message))
-      (setq eldoc-last-message
-            (cond ((eq (car args) eldoc-last-message) eldoc-last-message)
-                  ((null (car args)) nil)
-                  ;; If only one arg, no formatting to do, so put it in
-                  ;; eldoc-last-message so eq test above might succeed on
-                  ;; subsequent calls.
-                  ((null (cdr args)) (car args))
-                  (t (apply 'format args))))
-      ;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages
-      ;; are recorded in a log.  Do not put eldoc messages in that log since
-      ;; they are Legion.
-      ;; Emacs way of preventing log messages.
-      (let ((message-log-max nil))
-        (cond (eldoc-last-message (message "%s" eldoc-last-message))
-              (omessage (message nil)))))
-    eldoc-last-message)
-
-  (defun eldoc-display-message-p ()
-    (and (eldoc-display-message-no-interference-p)
-         ;; If this-command is non-nil while running via an idle
-         ;; timer, we're still in the middle of executing a command,
-         ;; e.g. a query-replace where it would be annoying to
-         ;; overwrite the echo area.
-         (and (not this-command)
-              (symbolp last-command)
-              (intern-soft (symbol-name last-command)
-                           eldoc-message-commands))))
+  (setq eldoc-message-function 'message)
 
   (defun eldoc-display-message-no-interference-p ()
     (and eldoc-mode
@@ -175,27 +145,26 @@ See `with-eldoc-in-minibuffer'."
 
 (defun eldoc-mode-in-minibuffer ()
   "Show eldoc for current minibuffer input."
-  (let ((buf (with-selected-window (minibuffer-window)
-               (buffer-name))))
+  (let ((buf (buffer-name (window-buffer (active-minibuffer-window)))))
     ;; If this minibuffer have been started with
     ;;`with-eldoc-in-minibuffer' give it eldoc support
     ;; and update mode-line, otherwise do nothing.
     (condition-case err
         (when (member buf eldoc-active-minibuffers-list)
-          (let* ((str-all (with-current-buffer buf
-                            (minibuffer-completion-contents)))
-                 (sym     (when str-all
-                            (with-temp-buffer
-                              (insert str-all)
-                              (goto-char (point-max))
-                              (unless (looking-back ")\\|\"")
-                                (forward-char -1))
-                              (eldoc-current-symbol))))
-                 (info-fn (eldoc-fnsym-in-current-sexp))
-                 (doc     (or (eldoc-get-var-docstring sym)
-                              (eldoc-get-fnsym-args-string
-                               (car info-fn) (cadr info-fn)))))
-            (when doc (funcall eldoc-in-minibuffer-show-fn doc))))
+          (with-current-buffer buf
+            (let* ((str-all (minibuffer-completion-contents))
+                   (sym     (when str-all
+                              (with-temp-buffer
+                                (insert str-all)
+                                (goto-char (point-max))
+                                (unless (looking-back ")\\|\"")
+                                  (forward-char -1))
+                                (eldoc-current-symbol))))
+                   (info-fn (eldoc-fnsym-in-current-sexp))
+                   (doc     (or (eldoc-get-var-docstring sym)
+                                (eldoc-get-fnsym-args-string
+                                 (car info-fn) (cadr info-fn)))))
+              (when doc (funcall eldoc-in-minibuffer-show-fn doc)))))
       (scan-error nil)
       (beginning-of-buffer nil)
       (error (message "Eldoc in minibuffer error: %S" err)))))

commit c0fefbb2b457a87c271fdd3a91d907f15d8c1d21
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 09:38:04 2013 +0400

    company-keywords: fix interactive invocation

diff --git a/company-keywords.el b/company-keywords.el
index 20bd7b0..75d37d6 100644
--- a/company-keywords.el
+++ b/company-keywords.el
@@ -219,7 +219,7 @@
   "A `company-mode' back-end for programming language keywords."
   (interactive (list 'interactive))
   (case command
-    (interactive (company-begin-backend 'company-))
+    (interactive (company-begin-backend 'company-keywords))
     (prefix (and (assq major-mode company-keywords-alist)
                  (not (company-in-string-or-comment))
                  (or (company-grab-symbol) 'stop)))

commit 3b953efb9a7071f7dfb34906247e2a8e554fbb45
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 09:13:55 2013 +0400

    company-nxml: don't load nxml ourselves

diff --git a/company-nxml.el b/company-nxml.el
index 0be1819..33d6f7b 100644
--- a/company-nxml.el
+++ b/company-nxml.el
@@ -1,6 +1,6 @@
 ;;; company-nxml.el --- A company-mode completion back-end for nxml-mode
 
-;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -26,10 +26,19 @@
 ;;; Code:
 
 (require 'company)
-(require 'nxml-mode)
-(require 'rng-nxml)
 (eval-when-compile (require 'cl))
 
+(defvar rng-open-elements)
+(defvar rng-validate-mode)
+(defvar rng-in-attribute-regex)
+(defvar rng-in-attribute-value-regex)
+(declare-function rng-set-state-after "rng-nxml")
+(declare-function rng-match-possible-start-tag-names "rng-match")
+(declare-function rng-adjust-state-for-attribute "rng-nxml")
+(declare-function rng-match-possible-attribute-names "rng-match")
+(declare-function rng-adjust-state-for-attribute-value "rng-nxml")
+(declare-function rng-match-possible-value-strings "rng-match")
+
 (defconst company-nxml-token-regexp
   "\\(?:[_[:alpha:]][-._[:alnum:]]*\\_>\\)")
 

commit 48ecab18628772451b8870fdc5ac4587cd7be3ba
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 09:02:24 2013 +0400

    company-files: insert slash when appropriate

diff --git a/company-files.el b/company-files.el
index 6b34d57..ebb11c0 100644
--- a/company-files.el
+++ b/company-files.el
@@ -1,6 +1,6 @@
 ;;; company-files.el --- A company-mode completion back-end for file names
 
-;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -67,7 +67,9 @@
         (when (file-directory-p file)
           ;; Add one level of children.
           (dolist (child (company-files-directory-files file ""))
-            (push (concat file child) candidates))))
+            (push (concat file
+                          (unless (eq (aref file (1- (length file))) ?/) "/")
+                          child) candidates))))
       (setq company-files-completion-cache (cons dir (nreverse candidates))))
     (cdr company-files-completion-cache)))
 

commit f2c4167c3371da3632fc264a6fd111d9be4ffaf4
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 08:43:22 2013 +0400

    company-etags: not always sorted

diff --git a/company-etags.el b/company-etags.el
index 508aac8..88b9fca 100644
--- a/company-etags.el
+++ b/company-etags.el
@@ -79,8 +79,7 @@ buffer automatically."
                 (when (fboundp 'find-tag-noselect)
                   (save-excursion
                     (let ((buffer (find-tag-noselect arg)))
-                      (cons buffer (with-current-buffer buffer (point))))))))
-    (sorted t)))
+                      (cons buffer (with-current-buffer buffer (point))))))))))
 
 (provide 'company-etags)
 ;;; company-etags.el ends here

commit a2cdaf107a29ad6c23ba24ad60c09411b4e06a9e
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 08:24:42 2013 +0400

    company-pysmell: add a note

diff --git a/company-pysmell.el b/company-pysmell.el
index 8cfe10d..8ee889a 100644
--- a/company-pysmell.el
+++ b/company-pysmell.el
@@ -22,6 +22,7 @@
 
 ;;; Commentary:
 ;;
+;; Someone who can actually install Pysmell should tell us if this still works.
 
 ;;; Code:
 

commit 6ffcecc4be2d87a0cd9d061937cbd6083aa99666
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 07:59:22 2013 +0400

    company-ropemacs: describe dependencies

diff --git a/company-ropemacs.el b/company-ropemacs.el
index 2b402f7..8c54d51 100644
--- a/company-ropemacs.el
+++ b/company-ropemacs.el
@@ -1,6 +1,6 @@
 ;;; company-ropemacs.el --- A company-mode completion back-end for pysmell.el
 
-;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -22,6 +22,8 @@
 
 ;;; Commentary:
 ;;
+;; Requires pymacs Emacs package (you can get it from Marmalade),
+;; and on Python side: pymacs, rope, ropemacs and ropemode.
 
 ;;; Code:
 

commit f923ea8dc00419742ddd2745c5ef3b5d0c20da07
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 07:11:00 2013 +0400

    company-eclim: Update to new communication protocol

diff --git a/company-eclim.el b/company-eclim.el
index db486c1..592e345 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -1,6 +1,6 @@
 ;;; company-eclim.el --- A company-mode completion back-end for eclim.
 
-;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011, 2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -19,9 +19,14 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
-
 ;;; Commentary:
 ;;
+;; This completion backend is pretty barebone.
+;;
+;; `emacs-eclim' provides an alternative backend, and it also allows you to
+;; actually control Eclim from Emacs. Check it out.
+;;
+;; Eclim version 1.7.13 or newer (?) is required.
 
 ;;; Code:
 
@@ -61,28 +66,23 @@ eclim can only complete correctly when the buffer has been 
saved."
 (defvar company-eclim--doc nil)
 (make-variable-buffer-local 'company-eclim--doc)
 
-(defun company-eclim--buffer-lines ()
-  (goto-char (point-max))
-  (let (lines)
-    (while (= 0 (forward-line -1))
-      (push (buffer-substring-no-properties (point-at-bol) (point-at-eol))
-            lines))
-    lines))
-
 (defun company-eclim--call-process (&rest args)
   (let ((coding-system-for-read 'utf-8)
         res)
+    (require 'json)
     (with-temp-buffer
       (if (= 0 (setq res (apply 'call-process company-eclim-executable nil t 
nil
                                 "-command" args)))
-          (company-eclim--buffer-lines)
+          (let ((json-array-type 'list))
+            (goto-char (point-min))
+            (unless (eobp)
+              (json-read)))
         (message "Company-eclim command failed with error %d:\n%s" res
                  (buffer-substring (point-min) (point-max)))
         nil))))
 
 (defun company-eclim--project-list ()
-  (mapcar (lambda (line) (nreverse (split-string line " *- *" nil)))
-          (company-eclim--call-process "project_list")))
+  (company-eclim--call-process "project_list"))
 
 (defun company-eclim--project-dir ()
   (if (eq company-eclim--project-dir 'unknown)
@@ -95,8 +95,12 @@ eclim can only complete correctly when the buffer has been 
saved."
 (defun company-eclim--project-name ()
   (if (eq company-eclim--project-name 'unknown)
       (setq company-eclim--project-name
-            (car (cddr (assoc (company-eclim--project-dir)
-                              (company-eclim--project-list)))))
+            (let ((project (find-if (lambda (project)
+                                      (equal (cdr (assoc 'path project))
+                                             (company-eclim--project-dir)))
+                                    (company-eclim--project-list))))
+              (when project
+                (cdr (assoc 'name project)))))
     company-eclim--project-name))
 
 (defun company-eclim--candidates (prefix)
@@ -109,19 +113,28 @@ eclim can only complete correctly when the buffer has 
been saved."
         (basic-save-buffer))
       ;; FIXME: Sometimes this isn't finished when we complete.
       (company-eclim--call-process "java_src_update"
-                                  "-p" (company-eclim--project-name)
-                                  "-f" project-file))
+                                   "-p" (company-eclim--project-name)
+                                   "-f" project-file))
     (setq company-eclim--doc
-          (mapcar (lambda (line)
-                    (cdr (split-string line "|" nil)))
-                  (company-eclim--call-process
-                   "java_complete" "-p" (company-eclim--project-name)
-                   "-f" project-file
-                   "-o" (number-to-string (1- (point)))
-                   "-e" "utf-8"
-                   "-l" "standard"))))
+          (cdr (assoc 'completions
+                      (company-eclim--call-process
+                       "java_complete" "-p" (company-eclim--project-name)
+                       "-f" project-file
+                       "-o" (number-to-string (1- (point)))
+                       "-e" "utf-8"
+                       "-l" "standard")))))
   (let ((completion-ignore-case nil))
-    (all-completions prefix (mapcar 'car company-eclim--doc))))
+    ;; TODO: Handle overloaded methods somehow. Show one candidate per 
overload?
+    ;; That would look nice, but kinda useless: a bunch of candidates for the
+    ;; same completion. Maybe do expansion like 
`company-clang-objc-templatify'.
+    (all-completions prefix (mapcar (lambda (item) (cdr (assoc 'completion 
item)))
+                                    company-eclim--doc))))
+
+(defun company-eclim--meta (candidate)
+  (cdr (assoc 'info (find-if
+                     (lambda (item) (equal (cdr (assoc 'completion item))
+                                      arg))
+                     company-eclim--doc))))
 
 (defun company-eclim (command &optional arg &rest ignored)
   "A `company-mode' completion back-end for eclim.
@@ -139,7 +152,8 @@ Completions only work correctly when the buffer has been 
saved.
                  (not (company-in-string-or-comment))
                  (or (company-grab-symbol) 'stop)))
     (candidates (company-eclim--candidates arg))
-    (meta (cadr (assoc arg company-eclim--doc)))
+    (meta (company-eclim--meta arg))
+    (duplicates t)
     ;; because "" doesn't return everything
     (no-cache (equal arg ""))))
 
diff --git a/company.el b/company.el
index 174f129..081b3bf 100644
--- a/company.el
+++ b/company.el
@@ -344,7 +344,7 @@ Requires Emacs 24.1 or newer."
                           (plist-get (nthcdr 4 res) :predicate)))))))
 
 (defcustom company-backends '(company-elisp company-nxml company-css
-                              company-eclim company-semantic company-clang
+                              company-clang company-semantic company-eclim
                               company-xcode company-ropemacs
                               (company-gtags company-etags company-dabbrev-code
                                company-pysmell company-keywords)

commit 393453f1e22a10bbe7c56637500db8ff9223b30e
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 04:47:30 2013 +0400

    company--multi-backend-adapter: Skip backends that failed init

diff --git a/company.el b/company.el
index f728ca2..174f129 100644
--- a/company.el
+++ b/company.el
@@ -727,17 +727,19 @@ keymap during active completions (`company-active-map'):
     (apply 'company--multi-backend-adapter company-backend args)))
 
 (defun company--multi-backend-adapter (backends command &rest args)
-  (case command
-    (candidates
-     (apply 'append (mapcar (lambda (backend) (apply backend command args))
-                            backends)))
-    (sorted nil)
-    (duplicates t)
-    (otherwise
-     (let (value)
-       (dolist (backend backends)
-         (when (setq value (apply backend command args))
-           (return value)))))))
+  (let ((backends (remove-if (lambda (b) (eq 'failed (get b 'company-init)))
+                             backends)))
+    (case command
+      (candidates
+       (apply 'append (mapcar (lambda (backend) (apply backend command args))
+                              backends)))
+      (sorted nil)
+      (duplicates t)
+      (otherwise
+       (let (value)
+         (dolist (backend backends)
+           (when (setq value (apply backend command args))
+             (return value))))))))
 
 ;;; completion mechanism 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 

commit d121d4ece2a4e973347db3404071419bf1c19e63
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 04:22:45 2013 +0400

    company-semantic: Don't load any Semantic packages ourselves

diff --git a/company-semantic.el b/company-semantic.el
index 1495059..c376710 100644
--- a/company-semantic.el
+++ b/company-semantic.el
@@ -1,6 +1,6 @@
 ;;; company-semantic.el --- A company-mode back-end using CEDET Semantic
 
-;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011, 2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -26,10 +26,19 @@
 ;;; Code:
 
 (require 'company)
-(or (require 'semantic-analyze nil t)
-    (require 'semantic/analyze))
 (eval-when-compile (require 'cl))
 
+(defvar semantic-idle-summary-function)
+(declare-function semantic-documentation-for-tag "semantic/doc" )
+(declare-function semantic-analyze-current-context "semantic/analyze")
+(declare-function semantic-analyze-possible-completions "semantic/complete")
+(declare-function semantic-analyze-find-tags-by-prefix "semantic/analyze/fcn")
+(declare-function semantic-tag-class "semantic/tag")
+(declare-function semantic-tag-name "semantic/tag")
+(declare-function semantic-tag-start "semantic/tag")
+(declare-function semantic-tag-buffer "semantic/tag")
+(declare-function semantic-active-p "semantic")
+
 (defcustom company-semantic-metadata-function 'company-semantic-summary-and-doc
   "The function turning a semantic tag into doc information."
   :group 'company
@@ -106,8 +115,9 @@ Symbols are chained by \".\" or \"->\"."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-semantic))
-    (prefix (and (memq major-mode company-semantic-modes)
+    (prefix (and (featurep 'semantic)
                  (semantic-active-p)
+                 (memq major-mode company-semantic-modes)
                  (not (company-in-string-or-comment))
                  (or (company-semantic--grab) 'stop)))
     (candidates (if (and (equal arg "")

commit f219f7fdcc19575c7890b7a7405bcdd1dd993881
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 03:44:41 2013 +0400

    company-clang: show meta

diff --git a/company-clang.el b/company-clang.el
index 160b9f8..966ef79 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -101,18 +101,24 @@ Prefix files (-include ...) can be selected with
 
 ;; TODO: How to handle OVERLOAD and Pattern?
 (defconst company-clang--completion-pattern
-  "^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\)")
+  "^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\)\\(?: : \\(.*\\)$\\)?")
 
 (defconst company-clang--error-buffer-name "*clang error*")
 
+(defvar company-clang--meta-cache nil)
+
 (defun company-clang--parse-output (prefix)
   (goto-char (point-min))
   (let ((pattern (format company-clang--completion-pattern
                          (regexp-quote prefix)))
         (case-fold-search nil)
         lines match)
+    (setq company-clang--meta-cache (make-hash-table :test 'equal))
     (while (re-search-forward pattern nil t)
       (setq match (match-string-no-properties 1))
+      (let ((meta (match-string-no-properties 2)))
+        (when (and meta (not (string= match meta)))
+          (puthash match meta company-clang--meta-cache)))
       (unless (equal match "Pattern")
         (push match lines)))
     lines))
@@ -225,6 +231,12 @@ Completions only work correctly when the buffer has been 
saved.
                  (not (company-in-string-or-comment))
                  (or (company-grab-symbol) 'stop)))
     (candidates (company-clang--candidates arg))
+    (meta (let ((meta (gethash arg company-clang--meta-cache)))
+            (when meta
+              (replace-regexp-in-string
+               "#]" " "
+               (replace-regexp-in-string "[<{[]#\\|#[>}]" "" meta t)
+               t))))
     (post-completion (and (derived-mode-p 'objc-mode)
                           (string-match ":" arg)
                           (company-clang-objc-templatify arg)))))
diff --git a/company.el b/company.el
index a841f98..f728ca2 100644
--- a/company.el
+++ b/company.el
@@ -77,6 +77,7 @@
 ;;    accidentally when it's enabled.
 ;;    Fixed two old tooltip annoyances.
 ;;    Some performance improvements.
+;;    `company-clang' now shows meta information, too.
 ;;
 ;; 2010-02-24 (0.5)
 ;;    `company-ropemacs' now provides location and docs.  (Fernando H. Silva)

commit 292684bd46ca5c9eb5a4ee6942b92f92896a716e
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 03:00:11 2013 +0400

    company-clang-guess-prefix: don't error out when no such file

diff --git a/company-clang.el b/company-clang.el
index 63486d0..160b9f8 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -1,6 +1,6 @@
 ;;; company-clang.el --- A company-mode completion back-end for clang
 
-;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011, 2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -77,7 +77,7 @@ Prefix files (-include ...) can be selected with
   ;; Prefixes seem to be called .pch.  Pre-compiled headers do, too.
   ;; So we look at the magic number to rule them out.
   (let* ((file (company-clang--guess-pch-file buffer-file-name))
-         (magic-number (company-clang--file-substring file 0 4)))
+         (magic-number (and file (company-clang--file-substring file 0 4))))
     (unless (member magic-number '("CPCH" "gpch"))
       file)))
 

commit 25f2c535458972bb1309f7c602454bb56b656fd2
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 02:47:35 2013 +0400

    global-company-mode: don't turn on in invisible buffers
    
    Before: (js2-time (with-temp-buffer (fundamental-mode))) => 0.0282
    After:  (js2-time (with-temp-buffer (fundamental-mode))) => 0.0018

diff --git a/company.el b/company.el
index cebd6ca..a841f98 100644
--- a/company.el
+++ b/company.el
@@ -76,7 +76,7 @@
 ;;    used, so, for example, it's not as easy to circumvent `paredit-mode'
 ;;    accidentally when it's enabled.
 ;;    Fixed two old tooltip annoyances.
-;;    Improved tooltip performance.
+;;    Some performance improvements.
 ;;
 ;; 2010-02-24 (0.5)
 ;;    `company-ropemacs' now provides location and docs.  (Fernando H. Silva)
@@ -622,7 +622,8 @@ keymap during active completions (`company-active-map'):
     (kill-local-variable 'company-point)))
 
 (define-globalized-minor-mode global-company-mode company-mode
-  (lambda () (company-mode 1)))
+  (lambda () (unless (or noninteractive (eq (aref (buffer-name) 0) ?\s))
+          (company-mode 1))))
 
 (defsubst company-assert-enabled ()
   (unless company-mode

commit 1043ae9a1eafc6f5cb3ffb60d1410a16afb8e2ff
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 02:30:24 2013 +0400

    No more duplicate elements in company--disabled-backends

diff --git a/company.el b/company.el
index 4edf651..cebd6ca 100644
--- a/company.el
+++ b/company.el
@@ -576,7 +576,7 @@ The work-around consists of adding a newline.")
          (unless (memq backend company--disabled-backends)
            (message "Company back-end '%s' could not be initialized:\n%s"
                     backend (error-message-string err)))
-         (push backend company--disabled-backends)
+         (pushnew backend company--disabled-backends)
          nil))
     (mapc 'company-init-backend backend)))
 

commit ac36be9b2ca1348cbd912ad2938d2c4fcc88b64c
Author: Thierry Volpiatto <address@hidden>
Date:   Sun Mar 17 22:53:31 2013 +0100

    * eldoc-eval.el: Inline old eldoc code only in 24.4.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index 88c5852..cede787 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -60,48 +60,47 @@ Should take one arg: the string to display"
 ;; with Emacs-24.4 show the eldoc info of current-buffer while
 ;; minibuffer is in use, disable this and inline old Emacs behavior.
 
-(and (boundp 'eldoc-message-function) (setq eldoc-message-function nil))
-
-;;; Inline old definition (24.3)
-;;
-(defun eldoc-message (&rest args)
-  (let ((omessage eldoc-last-message))
-    (setq eldoc-last-message
-         (cond ((eq (car args) eldoc-last-message) eldoc-last-message)
-               ((null (car args)) nil)
-               ;; If only one arg, no formatting to do, so put it in
-               ;; eldoc-last-message so eq test above might succeed on
-               ;; subsequent calls.
-               ((null (cdr args)) (car args))
-               (t (apply 'format args))))
-    ;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages
-    ;; are recorded in a log.  Do not put eldoc messages in that log since
-    ;; they are Legion.
-    ;; Emacs way of preventing log messages.
-    (let ((message-log-max nil))
-      (cond (eldoc-last-message (message "%s" eldoc-last-message))
-           (omessage (message nil)))))
-  eldoc-last-message)
-
-(defun eldoc-display-message-p ()
-  (and (eldoc-display-message-no-interference-p)
-       ;; If this-command is non-nil while running via an idle
-       ;; timer, we're still in the middle of executing a command,
-       ;; e.g. a query-replace where it would be annoying to
-       ;; overwrite the echo area.
-       (and (not this-command)
-           (symbolp last-command)
-           (intern-soft (symbol-name last-command)
-                        eldoc-message-commands))))
-
-(defun eldoc-display-message-no-interference-p ()
-  (and eldoc-mode
-       (not executing-kbd-macro)
-       (not (and (boundp 'edebug-active) edebug-active))
-       ;; Having this mode operate in an active minibuffer/echo area causes
-       ;; interference with what's going on there.
-       (not cursor-in-echo-area)
-       (not (eq (selected-window) (minibuffer-window)))))
+(when (boundp 'eldoc-message-function)
+  (setq eldoc-message-function nil)
+
+  (defun eldoc-message (&rest args)
+    (let ((omessage eldoc-last-message))
+      (setq eldoc-last-message
+            (cond ((eq (car args) eldoc-last-message) eldoc-last-message)
+                  ((null (car args)) nil)
+                  ;; If only one arg, no formatting to do, so put it in
+                  ;; eldoc-last-message so eq test above might succeed on
+                  ;; subsequent calls.
+                  ((null (cdr args)) (car args))
+                  (t (apply 'format args))))
+      ;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages
+      ;; are recorded in a log.  Do not put eldoc messages in that log since
+      ;; they are Legion.
+      ;; Emacs way of preventing log messages.
+      (let ((message-log-max nil))
+        (cond (eldoc-last-message (message "%s" eldoc-last-message))
+              (omessage (message nil)))))
+    eldoc-last-message)
+
+  (defun eldoc-display-message-p ()
+    (and (eldoc-display-message-no-interference-p)
+         ;; If this-command is non-nil while running via an idle
+         ;; timer, we're still in the middle of executing a command,
+         ;; e.g. a query-replace where it would be annoying to
+         ;; overwrite the echo area.
+         (and (not this-command)
+              (symbolp last-command)
+              (intern-soft (symbol-name last-command)
+                           eldoc-message-commands))))
+
+  (defun eldoc-display-message-no-interference-p ()
+    (and eldoc-mode
+         (not executing-kbd-macro)
+         (not (and (boundp 'edebug-active) edebug-active))
+         ;; Having this mode operate in an active minibuffer/echo area causes
+         ;; interference with what's going on there.
+         (not cursor-in-echo-area)
+         (not (eq (selected-window) (minibuffer-window))))))
 
 ;; Internal.
 (defvar eldoc-active-minibuffers-list nil

commit ba3e433b5b0c78ffe08637a167bda549d1077527
Author: Dmitry Gutov <address@hidden>
Date:   Mon Mar 18 00:51:01 2013 +0400

    Fix #2

diff --git a/company-clang.el b/company-clang.el
index 7613e31..63486d0 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -180,10 +180,9 @@ Prefix files (-include ...) can be selected with
 (defsubst company-clang-version ()
   "Return the version of `company-clang-executable'."
   (with-temp-buffer
-    (switch-to-buffer (current-buffer))
     (call-process company-clang-executable nil t nil "--version")
     (goto-char (point-min))
-    (if (re-search-forward "\\clang version \\([0-9.]+\\)" nil t)
+    (if (re-search-forward "clang version \\([0-9.]+\\)" nil t)
         (match-string-no-properties 1)
       "0")))
 

commit 5f961af80f5ca612dd74adace3fdcd3644a8078a
Author: Thierry Volpiatto <address@hidden>
Date:   Sun Mar 17 19:01:49 2013 +0100

    Fix compatibility with emacs-24.4.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index b806358..88c5852 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -22,8 +22,8 @@
 ;;; Commentary:
 
 ;;; Code:
-(require 'eldoc)
 
+(require 'eldoc)
 
 ;;; Minibuffer support.
 ;;  Enable displaying eldoc info in something else
@@ -55,6 +55,54 @@ Should take one arg: the string to display"
   :group 'lisp
   :type 'boolean)
 
+;;; Compatibility with Emacs-24.4
+;; New implementation of eldoc in minibuffer that come
+;; with Emacs-24.4 show the eldoc info of current-buffer while
+;; minibuffer is in use, disable this and inline old Emacs behavior.
+
+(and (boundp 'eldoc-message-function) (setq eldoc-message-function nil))
+
+;;; Inline old definition (24.3)
+;;
+(defun eldoc-message (&rest args)
+  (let ((omessage eldoc-last-message))
+    (setq eldoc-last-message
+         (cond ((eq (car args) eldoc-last-message) eldoc-last-message)
+               ((null (car args)) nil)
+               ;; If only one arg, no formatting to do, so put it in
+               ;; eldoc-last-message so eq test above might succeed on
+               ;; subsequent calls.
+               ((null (cdr args)) (car args))
+               (t (apply 'format args))))
+    ;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages
+    ;; are recorded in a log.  Do not put eldoc messages in that log since
+    ;; they are Legion.
+    ;; Emacs way of preventing log messages.
+    (let ((message-log-max nil))
+      (cond (eldoc-last-message (message "%s" eldoc-last-message))
+           (omessage (message nil)))))
+  eldoc-last-message)
+
+(defun eldoc-display-message-p ()
+  (and (eldoc-display-message-no-interference-p)
+       ;; If this-command is non-nil while running via an idle
+       ;; timer, we're still in the middle of executing a command,
+       ;; e.g. a query-replace where it would be annoying to
+       ;; overwrite the echo area.
+       (and (not this-command)
+           (symbolp last-command)
+           (intern-soft (symbol-name last-command)
+                        eldoc-message-commands))))
+
+(defun eldoc-display-message-no-interference-p ()
+  (and eldoc-mode
+       (not executing-kbd-macro)
+       (not (and (boundp 'edebug-active) edebug-active))
+       ;; Having this mode operate in an active minibuffer/echo area causes
+       ;; interference with what's going on there.
+       (not cursor-in-echo-area)
+       (not (eq (selected-window) (minibuffer-window)))))
+
 ;; Internal.
 (defvar eldoc-active-minibuffers-list nil
   "Store actives minibuffers with eldoc enabled.")

commit 9e572a0823cd101c9424652c7bccd510d60e5743
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 16 23:12:42 2013 +0400

    More succinct link sentence

diff --git a/README.md b/README.md
index 3cda743..db5f6b6 100644
--- a/README.md
+++ b/README.md
@@ -1 +1 @@
-See <http://company-mode.github.com/> for more information.
+See the [homepage](http://company-mode.github.com/).

commit cb71facbe560a5155350dcc0466d4d47b8fa05dc
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 16 08:24:34 2013 +0400

    company-buffer-lines: Use vertical-motion
    
    So that we don't skip continuation lines

diff --git a/company.el b/company.el
index 8cdfa40..4edf651 100644
--- a/company.el
+++ b/company.el
@@ -1657,7 +1657,7 @@ Example:
 (defun company-buffer-lines (beg end)
   (goto-char beg)
   (let (lines)
-    (while (and (zerop (forward-line 1))
+    (while (and (= 1 (vertical-motion 1))
                 (<= (point) end))
       (push (buffer-substring beg (min end (1- (point)))) lines)
       (setq beg (point)))

commit b330d2ea8468fa102950f781205ec98c7942f44a
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 16 07:54:44 2013 +0400

    company-calculate-candidates: recognize already completed in different case
    
    Ignore case when appropriate while comparing the current prefix with the 
sole
    candidate.

diff --git a/company.el b/company.el
index cd82f0b..8cdfa40 100644
--- a/company.el
+++ b/company.el
@@ -866,11 +866,12 @@ can retrieve meta-data for them."
     (setq company-candidates nil)))
 
 (defun company-calculate-candidates (prefix)
-  (let ((candidates (cdr (assoc prefix company-candidates-cache))))
+  (let ((candidates (cdr (assoc prefix company-candidates-cache)))
+        (ignore-case (company-call-backend 'ignore-case)))
     (or candidates
         (when company-candidates-cache
           (let ((len (length prefix))
-                (completion-ignore-case (company-call-backend 'ignore-case))
+                (completion-ignore-case ignore-case)
                 prev)
             (dotimes (i (1+ len))
               (when (setq prev (cdr (assoc (substring prefix 0 (- len i))
@@ -892,8 +893,10 @@ can retrieve meta-data for them."
               (while c2
                 (setcdr c2 (progn (while (equal (pop c2) (car c2)))
                                   c2)))))))
-    (if (or (cdr candidates)
-            (not (equal (car candidates) prefix)))
+    (if (and candidates
+             (or (cdr candidates)
+                 (not (eq t (compare-strings (car candidates) nil nil
+                                             prefix nil nil ignore-case)))))
         ;; Don't start when already completed and unique.
         candidates
       ;; Not the right place? maybe when setting?

commit 4cc87816c157ea2831a286a2264a1f259c535cc2
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 16 05:03:10 2013 +0400

    Add more words

diff --git a/README.md b/README.md
index 3e3a101..3cda743 100644
--- a/README.md
+++ b/README.md
@@ -1 +1 @@
-See <http://company-mode.github.com/>.
+See <http://company-mode.github.com/> for more information.

commit 34875c88d73c92ca009c9d50e1d85aa9eabf7f32
Author: Dmitry Gutov <address@hidden>
Date:   Sat Mar 16 04:35:35 2013 +0400

    Move the whole description to the homepage

diff --git a/README.md b/README.md
index 8dce327..3e3a101 100644
--- a/README.md
+++ b/README.md
@@ -1,48 +1 @@
-Company Mode
-====
-
-About
-----
-
-Company is an Emacs extension for performing text completion.
-
-Completion candidates are retrieved from a variety of back-ends, such as
-`abbrev`, `Semantic`, `Eclim`, `etags`, etc.
-
-Screenshots
-----
-
-[<img src="screenshots/company-elisp.png" alt="company-elisp" 
width="256"/>](screenshots/company-elisp.png)
-[<img src="screenshots/company-cpp.png" alt="company-cpp" 
width="256"/>](screenshots/company-cpp.png)
-
-Installation
-----
-
-This package is part of [GNU ELPA](http://elpa.gnu.org/) (<kbd>M-x
-list-packages</kbd>).
-
-Usage
-----
-
-Once installed, enable `company-mode` with <kbd>M-x company-mode</kbd>.
-
-Completion will start automatically after you type a few letters. Use
-<kbd>M-n</kbd>, <kbd>M-p</kbd>, <kbd>\<tab\></kbd> and <kbd>\<return\></kbd> to
-complete. Search through the completions with <kbd>C-s</kbd>, <kbd>C-r</kbd> 
and
-<kbd>C-o</kbd>.
-
-To use `company-mode` in all buffers, add the following to your init file:
-
-    (global-company-mode)
-
-To set up preferred back-ends, customize `company-backends`.
-
-Also see this variable's docstring for information on writing a back-end.
-
-For more information, see the docstring for `company-mode`.
-
-Feedback
-----
-
-If you experience any problems or have a feature request, please use the
-[issue tracker](https://github.com/dgutov/company/issues).
+See <http://company-mode.github.com/>.
diff --git a/screenshots/company-cpp.png b/screenshots/company-cpp.png
deleted file mode 100644
index c2817ba..0000000
Binary files a/screenshots/company-cpp.png and /dev/null differ
diff --git a/screenshots/company-elisp.png b/screenshots/company-elisp.png
deleted file mode 100644
index c87c994..0000000
Binary files a/screenshots/company-elisp.png and /dev/null differ

commit fc4844b21da115448ddabce87735e0f6f69b102b
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 15 19:34:56 2013 +0400

    company-buffer-lines: Speed up
    
    I wonder what had been fixed in 9b2b5b6c623579057e9322bd44a7342d0b08ee92
    exactly. It will probably bite us later.

diff --git a/company.el b/company.el
index 8344b63..cd82f0b 100644
--- a/company.el
+++ b/company.el
@@ -76,6 +76,7 @@
 ;;    used, so, for example, it's not as easy to circumvent `paredit-mode'
 ;;    accidentally when it's enabled.
 ;;    Fixed two old tooltip annoyances.
+;;    Improved tooltip performance.
 ;;
 ;; 2010-02-24 (0.5)
 ;;    `company-ropemacs' now provides location and docs.  (Fernando H. Silva)
@@ -1652,9 +1653,8 @@ Example:
 
 (defun company-buffer-lines (beg end)
   (goto-char beg)
-  (let ((row (company--row))
-        lines)
-    (while (and (equal (move-to-window-line (incf row)) row)
+  (let (lines)
+    (while (and (zerop (forward-line 1))
                 (<= (point) end))
       (push (buffer-substring beg (min end (1- (point)))) lines)
       (setq beg (point)))

commit afc950fec4b6b9d7c8e6ea48caa22cb36287c869
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 15 18:54:00 2013 +0400

    company-safe-substring: use a temp buffer
    
    * No more situations where we replace actual text with whitespace.
    
    * Still don't handle wide characters, except by untabifying in advance.
    
    * It's fast enough, although it woudln't hurt to replace most of the string
      splitting and munching in the callers with direct buffer manipulation.

diff --git a/company.el b/company.el
index fce59f7..8344b63 100644
--- a/company.el
+++ b/company.el
@@ -1437,15 +1437,18 @@ To show the number next to the candidates in some 
back-ends, enable
 (defsubst company-safe-substring (str from &optional to)
   (if (> from (string-width str))
       ""
-    (if to
-        (let* ((res (substring str from (min to (length str))))
-               (padding (- to from (string-width res)))
-               (cutting-comp (and (> (length str) to)
-                                  (get-text-property to 'composition str))))
-          (concat res
-                  (when (and (> padding 0) (not cutting-comp))
-                    (company-space-string padding))))
-      (substring str from))))
+    (with-temp-buffer
+      (insert str)
+      (move-to-column from)
+      (let ((beg (point)))
+        (if to
+            (progn
+              (move-to-column to)
+              (concat (buffer-substring beg (point))
+                      (let ((padding (- to (current-column))))
+                        (when (> padding 0)
+                          (company-space-string padding)))))
+          (buffer-substring beg (point-max)))))))
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 

commit f08f6f6d960dec80eb8bf9749856e7364cc1bbf1
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 15 07:45:27 2013 +0400

    * company-safe-substring: consider composition when to <= str's width
    
    Still not perfect, but AFAICT writing a fully accurate `substring-by-width`
    function would be wasteful performance-wise.

diff --git a/company.el b/company.el
index 51525cb..fce59f7 100644
--- a/company.el
+++ b/company.el
@@ -1435,13 +1435,17 @@ To show the number next to the candidates in some 
back-ends, enable
     (make-string len ?\ )))
 
 (defsubst company-safe-substring (str from &optional to)
-  (let ((len (string-width str)))
-    (if (> from len)
-        ""
-      (if (and to (> to len))
-          (concat (substring str from)
-                  (company-space-string (- to len)))
-        (substring str from to)))))
+  (if (> from (string-width str))
+      ""
+    (if to
+        (let* ((res (substring str from (min to (length str))))
+               (padding (- to from (string-width res)))
+               (cutting-comp (and (> (length str) to)
+                                  (get-text-property to 'composition str))))
+          (concat res
+                  (when (and (> padding 0) (not cutting-comp))
+                    (company-space-string padding))))
+      (substring str from))))
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 

commit d861f1d075faf63ef11af087b0d53c19b08867da
Author: Dmitry Gutov <address@hidden>
Date:   Fri Mar 15 06:01:03 2013 +0400

    Fix two tooltip problems
    
    * company-safe-substring: take into account character composition.
    * company--replacement-string: append default face everywhere, so that we 
never
      inherit face background from the character at the end of the overlay.

diff --git a/company.el b/company.el
index 364440b..51525cb 100644
--- a/company.el
+++ b/company.el
@@ -75,6 +75,7 @@
 ;;    the completion keymap is active, other minor modes' keymaps are still
 ;;    used, so, for example, it's not as easy to circumvent `paredit-mode'
 ;;    accidentally when it's enabled.
+;;    Fixed two old tooltip annoyances.
 ;;
 ;; 2010-02-24 (0.5)
 ;;    `company-ropemacs' now provides location and docs.  (Fernando H. Silva)
@@ -1434,7 +1435,7 @@ To show the number next to the candidates in some 
back-ends, enable
     (make-string len ?\ )))
 
 (defsubst company-safe-substring (str from &optional to)
-  (let ((len (length str)))
+  (let ((len (string-width str)))
     (if (> from len)
         ""
       (if (and to (> to len))
@@ -1681,9 +1682,12 @@ Example:
     ;; Append whole new lines.
     (while lines
       (push (concat (company-space-string column) (pop lines)) new))
-    (concat (when nl "\n")
-            (mapconcat 'identity (nreverse new) "\n")
-            "\n")))
+
+    (let ((str (concat (when nl "\n")
+                       (mapconcat 'identity (nreverse new) "\n")
+                       "\n")))
+      (font-lock-append-text-property 0 (length str) 'face 'default str)
+      str)))
 
 (defun company--create-lines (selection limit)
 

commit 9108df1d0052c70998dee701c58abfb74e36c0ed
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 14 03:36:28 2013 +0400

    Tweak README#Feedback

diff --git a/README.md b/README.md
index cd8619e..8dce327 100644
--- a/README.md
+++ b/README.md
@@ -44,5 +44,5 @@ For more information, see the docstring for `company-mode`.
 Feedback
 ----
 
-If you experience any problems or have a feature request, use the
-[Issue Tracker](https://github.com/dgutov/company/issues).
+If you experience any problems or have a feature request, please use the
+[issue tracker](https://github.com/dgutov/company/issues).

commit 7331c6efd2c9569da8aeecda8d64a421a157b5dc
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 14 03:24:12 2013 +0400

    Make company-capf work

diff --git a/company.el b/company.el
index f5e0f01..364440b 100644
--- a/company.el
+++ b/company.el
@@ -319,7 +319,8 @@ If this many lines are not available, prefer to display the 
tooltip above."
                 (return t))))))
 
 (defun company-capf (command &optional arg &rest args)
-  "Adapter for Company completion to use `completion-at-point-functions'."
+  "`company-mode' back-end using `completion-at-point-functions'.
+Requires Emacs 24.1 or newer."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-capf))
@@ -328,19 +329,18 @@ If this many lines are not available, prefer to display 
the tooltip above."
                                   ;; Ignore misbehaving functions.
                                   #'completion--capf-wrapper 'optimist)))
        (when (consp res)
-         (if (> (nth 1 res) (point))
+         (if (> (nth 2 res) (point))
              'stop
-           (buffer-substring-no-properties (nth 0 res) (point))))))
+           (buffer-substring-no-properties (nth 1 res) (point))))))
     (candidates
      (let ((res (run-hook-wrapped 'completion-at-point-functions
                                   ;; Ignore misbehaving functions.
                                   #'completion--capf-wrapper 'optimist)))
        (when (consp res)
-         (all-completions arg (nth 2 res)
-                          (plist-get (nthcdr 3 res) :predicate)))))))
+         (all-completions arg (nth 3 res)
+                          (plist-get (nthcdr 4 res) :predicate)))))))
 
-(defcustom company-backends '(;; company-capf ;FIXME: Untested!
-                              company-elisp company-nxml company-css
+(defcustom company-backends '(company-elisp company-nxml company-css
                               company-eclim company-semantic company-clang
                               company-xcode company-ropemacs
                               (company-gtags company-etags company-dabbrev-code

commit 739760229c25979f00456ce62b0bf729d6e6fcda
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 14 02:47:15 2013 +0400

    * company--should-complete: not in minibuffer

diff --git a/company.el b/company.el
index 0e80997..f5e0f01 100644
--- a/company.el
+++ b/company.el
@@ -1,6 +1,6 @@
 ;;; company.el --- Extensible inline text completion mechanism
 
-;; Copyright (C) 2009-2012  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2013  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 ;; Version: 0.5
@@ -807,7 +807,8 @@ can retrieve meta-data for them."
 
 (defun company--should-complete ()
   (and (not (or buffer-read-only overriding-terminal-local-map
-                overriding-local-map))
+                overriding-local-map
+                (minibufferp)))
        ;; Check if in the middle of entering a key combination.
        (or (equal (this-command-keys-vector) [])
            (not (keymapp (key-binding (this-command-keys-vector)))))

commit 8bf39d5e3ee15eb9c4fd111eb08e081e2cfdb513
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 14 01:29:10 2013 +0400

    Backquote "company-mode"

diff --git a/README.md b/README.md
index 6aa95dc..cd8619e 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ list-packages</kbd>).
 Usage
 ----
 
-Once installed, enable company-mode with <kbd>M-x company-mode</kbd>.
+Once installed, enable `company-mode` with <kbd>M-x company-mode</kbd>.
 
 Completion will start automatically after you type a few letters. Use
 <kbd>M-n</kbd>, <kbd>M-p</kbd>, <kbd>\<tab\></kbd> and <kbd>\<return\></kbd> to

commit 0b6d832a8d1a7db39b1d6fbd877bb5139ded6c06
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 14 01:27:53 2013 +0400

    Fix typo, remove "modular"

diff --git a/README.md b/README.md
index 894de1c..6aa95dc 100644
--- a/README.md
+++ b/README.md
@@ -5,8 +5,9 @@ About
 ----
 
 Company is an Emacs extension for performing text completion.
-Completion candidates are retrieved from a variety of modular
-back-ends, such as `abbrev`, `Semantic`, `Eclim`, `etags`, etc.
+
+Completion candidates are retrieved from a variety of back-ends, such as
+`abbrev`, `Semantic`, `Eclim`, `etags`, etc.
 
 Screenshots
 ----
@@ -30,7 +31,7 @@ Completion will start automatically after you type a few 
letters. Use
 complete. Search through the completions with <kbd>C-s</kbd>, <kbd>C-r</kbd> 
and
 <kbd>C-o</kbd>.
 
-To use `company-mode` is all buffers, add the following to your init file:
+To use `company-mode` in all buffers, add the following to your init file:
 
     (global-company-mode)
 

commit 9e1a4d8a3b4b738e238ac6a385ab9f1434f805f8
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 14 01:19:51 2013 +0400

    Escape the angle brackets

diff --git a/README.md b/README.md
index f636e58..894de1c 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ Usage
 Once installed, enable company-mode with <kbd>M-x company-mode</kbd>.
 
 Completion will start automatically after you type a few letters. Use
-<kbd>M-n</kbd>, <kbd>M-p</kbd>, <kbd><tab></kbd> and <kbd><return></kbd> to
+<kbd>M-n</kbd>, <kbd>M-p</kbd>, <kbd>\<tab\></kbd> and <kbd>\<return\></kbd> to
 complete. Search through the completions with <kbd>C-s</kbd>, <kbd>C-r</kbd> 
and
 <kbd>C-o</kbd>.
 

commit 9b1f9009d934ec917bf4770518df9dd5b4fe2f1a
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 14 01:16:25 2013 +0400

    And another one

diff --git a/README.md b/README.md
index ecf56fd..f636e58 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ back-ends, such as `abbrev`, `Semantic`, `Eclim`, `etags`, 
etc.
 Screenshots
 ----
 
-[<img src="screenshots/company-elisp.png" alt="company-elisp" 
width="256/>](screenshots/company-elisp.png)
+[<img src="screenshots/company-elisp.png" alt="company-elisp" 
width="256"/>](screenshots/company-elisp.png)
 [<img src="screenshots/company-cpp.png" alt="company-cpp" 
width="256"/>](screenshots/company-cpp.png)
 
 Installation

commit d3dda607ca2c34ddfed658ab52833ec8741d7c10
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 14 01:15:25 2013 +0400

    Add missing quote

diff --git a/README.md b/README.md
index af9d28b..ecf56fd 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Screenshots
 ----
 
 [<img src="screenshots/company-elisp.png" alt="company-elisp" 
width="256/>](screenshots/company-elisp.png)
-[<img src="screenshots/company-cpp.png" alt="company-cpp" 
width="256/>](screenshots/company-cpp.png)
+[<img src="screenshots/company-cpp.png" alt="company-cpp" 
width="256"/>](screenshots/company-cpp.png)
 
 Installation
 ----

commit a97240339cf2fc42c0df5d66e0602e8c49e6e9d7
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 14 01:13:55 2013 +0400

    Improve the README, add old screenshots

diff --git a/README.md b/README.md
index ff48917..af9d28b 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,47 @@
-Company is an Emacs extension for performing text completion.
-Completion candidates are retrieved from a variety of modular
-back-ends, such as Semantic.
-
-Once installed, enable company-mode with <kbd>M-x company-mode</kbd>.
-For further information, see the docstring for `company-mode`.
+Company Mode
+====
+
+About
+----
+
+Company is an Emacs extension for performing text completion.
+Completion candidates are retrieved from a variety of modular
+back-ends, such as `abbrev`, `Semantic`, `Eclim`, `etags`, etc.
+
+Screenshots
+----
+
+[<img src="screenshots/company-elisp.png" alt="company-elisp" 
width="256/>](screenshots/company-elisp.png)
+[<img src="screenshots/company-cpp.png" alt="company-cpp" 
width="256/>](screenshots/company-cpp.png)
+
+Installation
+----
+
+This package is part of [GNU ELPA](http://elpa.gnu.org/) (<kbd>M-x
+list-packages</kbd>).
+
+Usage
+----
+
+Once installed, enable company-mode with <kbd>M-x company-mode</kbd>.
+
+Completion will start automatically after you type a few letters. Use
+<kbd>M-n</kbd>, <kbd>M-p</kbd>, <kbd><tab></kbd> and <kbd><return></kbd> to
+complete. Search through the completions with <kbd>C-s</kbd>, <kbd>C-r</kbd> 
and
+<kbd>C-o</kbd>.
+
+To use `company-mode` is all buffers, add the following to your init file:
+
+    (global-company-mode)
+
+To set up preferred back-ends, customize `company-backends`.
+
+Also see this variable's docstring for information on writing a back-end.
+
+For more information, see the docstring for `company-mode`.
+
+Feedback
+----
+
+If you experience any problems or have a feature request, use the
+[Issue Tracker](https://github.com/dgutov/company/issues).
diff --git a/screenshots/company-cpp.png b/screenshots/company-cpp.png
new file mode 100644
index 0000000..c2817ba
Binary files /dev/null and b/screenshots/company-cpp.png differ
diff --git a/screenshots/company-elisp.png b/screenshots/company-elisp.png
new file mode 100644
index 0000000..c87c994
Binary files /dev/null and b/screenshots/company-elisp.png differ

commit 6d9d3032e24eeb856115b6309b2ffbbbb8dbcf38
Author: Dmitry Gutov <address@hidden>
Date:   Wed Mar 13 23:44:41 2013 +0400

    Update copyright dates and the changelog

diff --git a/company-elisp.el b/company-elisp.el
index c45e873..ec3161d 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -1,6 +1,6 @@
 ;;; company-elisp.el --- A company-mode completion back-end for emacs-lisp-mode
 
-;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011-2012  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
diff --git a/company.el b/company.el
index b3606ed..0e80997 100644
--- a/company.el
+++ b/company.el
@@ -1,6 +1,6 @@
 ;;; company.el --- Extensible inline text completion mechanism
 
-;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2009-2012  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 ;; Version: 0.5
@@ -65,9 +65,16 @@
 ;;
 ;;; Change Log:
 ;;
+;;    Switching tags now works correctly in `company-etags'.
+;;    Clang completions now include macros and are case-sensitive.
 ;;    Added `company-capf': completion adapter using
 ;;    `completion-at-point-functions'.  (Stefan Monnier)
-;;    Switching tags now works correctly in `company-etags'.
+;;    `company-elisp' has some improvements.
+;;    Instead of `overrriding-terminal-local-map', we're now using
+;;    `emulation-mode-map-alists' (experimental).  This largely means that when
+;;    the completion keymap is active, other minor modes' keymaps are still
+;;    used, so, for example, it's not as easy to circumvent `paredit-mode'
+;;    accidentally when it's enabled.
 ;;
 ;; 2010-02-24 (0.5)
 ;;    `company-ropemacs' now provides location and docs.  (Fernando H. Silva)

commit 8b7d5ff1768dc573b9d2e64d1fc8a5973de163b9
Author: Dmitry Gutov <address@hidden>
Date:   Wed Mar 13 06:14:14 2013 +0400

    Remove leading asterisks from docstrings
    
    They don't make variables customizable anymore.

diff --git a/company-clang.el b/company-clang.el
index 7cb85e3..7613e31 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -30,19 +30,19 @@
 
 (defcustom company-clang-executable
   (executable-find "clang")
-  "*Location of clang executable."
+  "Location of clang executable."
   :group 'company-clang
   :type 'file)
 
 (defcustom company-clang-auto-save t
-  "*Determines whether to save the buffer when retrieving completions.
+  "Determines whether to save the buffer when retrieving completions.
 clang can only complete correctly when the buffer has been saved."
   :group 'company-clang
   :type '(choice (const :tag "Off" nil)
                  (const :tag "On" t)))
 
 (defcustom company-clang-arguments nil
-  "*Additional arguments to pass to clang when completing.
+  "Additional arguments to pass to clang when completing.
 Prefix files (-include ...) can be selected with
 `company-clang-set-prefix' or automatically through a custom
 `company-clang-prefix-guesser'."
@@ -50,7 +50,7 @@ Prefix files (-include ...) can be selected with
   :type '(repeat (string :tag "Argument" nil)))
 
 (defcustom company-clang-prefix-guesser 'company-clang-guess-prefix
-  "*A function to determine the prefix file for the current buffer."
+  "A function to determine the prefix file for the current buffer."
   :group 'company-clang
   :type '(function :tag "Guesser function" nil))
 
diff --git a/company-dabbrev-code.el b/company-dabbrev-code.el
index 5cedcc4..64f60c7 100644
--- a/company-dabbrev-code.el
+++ b/company-dabbrev-code.el
@@ -35,7 +35,7 @@
     haskell-mode java-mode javascript-mode jde-mode js2-mode lisp-mode
     lua-mode objc-mode perl-mode php-mode python-mode ruby-mode scheme-mode
     shell-script-mode)
-  "*Modes that use `company-dabbrev-code'.
+  "Modes that use `company-dabbrev-code'.
 In all these modes `company-dabbrev-code' will complete only symbols, not text
 in comments or strings.  In other modes `company-dabbrev-code' will pass 
control
 to other back-ends \(e.g. `company-dabbrev'\).
@@ -45,7 +45,7 @@ Value t means complete in all modes."
                  (const tag "All modes" t)))
 
 (defcustom company-dabbrev-code-other-buffers t
-  "*Determines whether `company-dabbrev-code' should search other buffers.
+  "Determines whether `company-dabbrev-code' should search other buffers.
 If `all', search all other buffers.  If t, search buffers with the same
 major mode.
 See also `company-dabbrev-code-time-limit'."
@@ -55,7 +55,7 @@ See also `company-dabbrev-code-time-limit'."
                  (const :tag "All" all)))
 
 (defcustom company-dabbrev-code-time-limit .5
-  "*Determines how long `company-dabbrev-code' should look for matches."
+  "Determines how long `company-dabbrev-code' should look for matches."
   :group 'company
   :type '(choice (const :tag "Off" nil)
                  (number :tag "Seconds")))
diff --git a/company-dabbrev.el b/company-dabbrev.el
index 03223cf..5f43b83 100644
--- a/company-dabbrev.el
+++ b/company-dabbrev.el
@@ -29,7 +29,7 @@
 (eval-when-compile (require 'cl))
 
 (defcustom company-dabbrev-other-buffers 'all
-  "*Determines whether `company-dabbrev' should search other buffers.
+  "Determines whether `company-dabbrev' should search other buffers.
 If `all', search all other buffers.  If t, search buffers with the same
 major mode.
 See also `company-dabbrev-time-limit'."
@@ -39,13 +39,13 @@ See also `company-dabbrev-time-limit'."
                  (const :tag "All" all)))
 
 (defcustom company-dabbrev-time-limit .5
-  "*Determines how many seconds `company-dabbrev' should look for matches."
+  "Determines how many seconds `company-dabbrev' should look for matches."
   :group 'company
   :type '(choice (const :tag "Off" nil)
                  (number :tag "Seconds")))
 
 (defcustom company-dabbrev-char-regexp "\\sw"
-  "*A regular expression matching the characters `company-dabbrev' looks for."
+  "A regular expression matching the characters `company-dabbrev' looks for."
   :group 'company
   :type 'regexp)
 
diff --git a/company-eclim.el b/company-eclim.el
index be08fa0..db486c1 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -39,12 +39,12 @@
 
 (defcustom company-eclim-executable
   (or (executable-find "eclim") (company-eclim-executable-find))
-  "*Location of eclim executable."
+  "Location of eclim executable."
   :group 'company
   :type 'file)
 
 (defcustom company-eclim-auto-save t
-  "*Determines whether to save the buffer when retrieving completions.
+  "Determines whether to save the buffer when retrieving completions.
 eclim can only complete correctly when the buffer has been saved."
   :group 'company
   :type '(choice (const :tag "Off" nil)
diff --git a/company-elisp.el b/company-elisp.el
index f3a1809..c45e873 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -30,7 +30,7 @@
 (require 'help-mode)
 
 (defcustom company-elisp-detect-function-context t
-  "*If enabled, offer Lisp functions only in appropriate contexts.
+  "If enabled, offer Lisp functions only in appropriate contexts.
 Functions are offered for completion only after ' and \(."
   :group 'company
   :type '(choice (const :tag "Off" nil)
diff --git a/company-etags.el b/company-etags.el
index 6807f98..508aac8 100644
--- a/company-etags.el
+++ b/company-etags.el
@@ -29,7 +29,7 @@
 (require 'etags)
 
 (defcustom company-etags-use-main-table-list t
-  "*Always search `tags-table-list' if set.
+  "Always search `tags-table-list' if set.
 If this is disabled, `company-etags' will try to find the one table for each
 buffer automatically."
   :group 'company-mode
diff --git a/company-gtags.el b/company-gtags.el
index 62c9707..59ad7c8 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -30,7 +30,7 @@
 
 (defcustom company-gtags-executable
   (executable-find "global")
-  "*Location of GNU global executable."
+  "Location of GNU global executable."
   :type 'string
   :group 'company)
 
diff --git a/company-ispell.el b/company-ispell.el
index 05266af..8a73988 100644
--- a/company-ispell.el
+++ b/company-ispell.el
@@ -30,7 +30,7 @@
 (eval-when-compile (require 'cl))
 
 (defcustom company-ispell-dictionary nil
-  "*Dictionary to use for `company-ispell'.
+  "Dictionary to use for `company-ispell'.
 If nil, use `ispell-complete-word-dict'."
   :group 'company
   :type '(choice (const :tag "default (nil)" nil)
diff --git a/company-keywords.el b/company-keywords.el
index 88af112..20bd7b0 100644
--- a/company-keywords.el
+++ b/company-keywords.el
@@ -212,7 +212,7 @@
     (espresso-mode . javascript-mode)
     (cperl-mode . perl-mode)
     (jde-mode . java-mode))
-  "*Alist mapping major-modes to sorted keywords for `company-keywords'.")
+  "Alist mapping major-modes to sorted keywords for `company-keywords'.")
 
 ;;;###autoload
 (defun company-keywords (command &optional arg &rest ignored)
diff --git a/company-semantic.el b/company-semantic.el
index eacf1c7..1495059 100644
--- a/company-semantic.el
+++ b/company-semantic.el
@@ -31,7 +31,7 @@
 (eval-when-compile (require 'cl))
 
 (defcustom company-semantic-metadata-function 'company-semantic-summary-and-doc
-  "*The function turning a semantic tag into doc information."
+  "The function turning a semantic tag into doc information."
   :group 'company
   :type 'function)
 
diff --git a/company-template.el b/company-template.el
index 53d9687..69eac7c 100644
--- a/company-template.el
+++ b/company-template.el
@@ -26,7 +26,7 @@
 (defface company-template-field
   '((((background dark)) (:background "yellow" :foreground "black"))
     (((background light)) (:background "orange" :foreground "black")))
-  "*Face used for editable text in template fields."
+  "Face used for editable text in template fields."
   :group 'company)
 
 (defvar company-template-nav-map
diff --git a/company-xcode.el b/company-xcode.el
index 42e00de..b558fe8 100644
--- a/company-xcode.el
+++ b/company-xcode.el
@@ -29,7 +29,7 @@
 (eval-when-compile (require 'cl))
 
 (defcustom company-xcode-xcodeindex-executable (executable-find "xcodeindex")
-  "*Location of xcodeindex executable."
+  "Location of xcodeindex executable."
   :group 'company-xcode
   :type 'file)
 
@@ -43,7 +43,7 @@
 (defcustom company-xcode-types
   '("Class" "Constant" "Enum" "Macro" "Modeled Class" "Structure"
     "Type" "Union" "Function")
-  "*The types of symbols offered by `company-xcode'.
+  "The types of symbols offered by `company-xcode'.
 No context-enabled completion is available.  Types like methods will be
 offered regardless of whether the class supports them.  The defaults should be
 valid in most contexts."
diff --git a/company.el b/company.el
index 142ecab..b3606ed 100644
--- a/company.el
+++ b/company.el
@@ -158,59 +158,59 @@
 (defface company-tooltip
   '((t :background "yellow"
        :foreground "black"))
-  "*Face used for the tool tip."
+  "Face used for the tool tip."
   :group 'company)
 
 (defface company-tooltip-selection
   '((default :inherit company-tooltip)
     (((class color) (min-colors 88)) (:background "orange1"))
     (t (:background "green")))
-  "*Face used for the selection in the tool tip."
+  "Face used for the selection in the tool tip."
   :group 'company)
 
 (defface company-tooltip-mouse
   '((default :inherit highlight))
-  "*Face used for the tool tip item under the mouse."
+  "Face used for the tool tip item under the mouse."
   :group 'company)
 
 (defface company-tooltip-common
   '((t :inherit company-tooltip
        :foreground "red"))
-  "*Face used for the common completion in the tool tip."
+  "Face used for the common completion in the tool tip."
   :group 'company)
 
 (defface company-tooltip-common-selection
   '((t :inherit company-tooltip-selection
        :foreground "red"))
-  "*Face used for the selected common completion in the tool tip."
+  "Face used for the selected common completion in the tool tip."
   :group 'company)
 
 (defface company-preview
   '((t :background "blue4"
        :foreground "wheat"))
-  "*Face used for the completion preview."
+  "Face used for the completion preview."
   :group 'company)
 
 (defface company-preview-common
   '((t :inherit company-preview
        :foreground "red"))
-  "*Face used for the common part of the completion preview."
+  "Face used for the common part of the completion preview."
   :group 'company)
 
 (defface company-preview-search
   '((t :inherit company-preview
        :background "blue1"))
-  "*Face used for the search string in the completion preview."
+  "Face used for the search string in the completion preview."
   :group 'company)
 
 (defface company-echo nil
-  "*Face used for completions in the echo area."
+  "Face used for completions in the echo area."
   :group 'company)
 
 (defface company-echo-common
   '((((background dark)) (:foreground "firebrick1"))
     (((background light)) (:background "firebrick4")))
-  "*Face used for the common part of completions in the echo area."
+  "Face used for the common part of completions in the echo area."
   :group 'company)
 
 (defun company-frontends-set (variable value)
@@ -235,7 +235,7 @@
 (defcustom company-frontends '(company-pseudo-tooltip-unless-just-one-frontend
                                company-preview-if-just-one-frontend
                                company-echo-metadata-frontend)
-  "*The list of active front-ends (visualizations).
+  "The list of active front-ends (visualizations).
 Each front-end is a function that takes one argument.  It is called with
 one of the following arguments:
 
@@ -271,12 +271,12 @@ The visualized data is stored in `company-prefix', 
`company-candidates',
                          (function :tag "custom function" nil))))
 
 (defcustom company-tooltip-limit 10
-  "*The maximum number of candidates in the tool tip"
+  "The maximum number of candidates in the tool tip"
   :group 'company
   :type 'integer)
 
 (defcustom company-tooltip-minimum 6
-  "*The minimum height of the tool tip.
+  "The minimum height of the tool tip.
 If this many lines are not available, prefer to display the tooltip above."
   :group 'company
   :type 'integer)
@@ -339,7 +339,7 @@ If this many lines are not available, prefer to display the 
tooltip above."
                               (company-gtags company-etags company-dabbrev-code
                                company-pysmell company-keywords)
                               company-oddmuse company-files company-dabbrev)
-  "*The list of active back-ends (completion engines).
+  "The list of active back-ends (completion engines).
 Each list elements can itself be a list of back-ends.  In that case their
 completions are merged.  Otherwise only the first matching back-end returns
 results.
@@ -410,32 +410,32 @@ does not know about.  It should also be callable 
interactively and use
 (put 'company-backends 'safe-local-variable 'company-safe-backends-p)
 
 (defcustom company-completion-started-hook nil
-  "*Hook run when company starts completing.
+  "Hook run when company starts completing.
 The hook is called with one argument that is non-nil if the completion was
 started manually."
   :group 'company
   :type 'hook)
 
 (defcustom company-completion-cancelled-hook nil
-  "*Hook run when company cancels completing.
+  "Hook run when company cancels completing.
 The hook is called with one argument that is non-nil if the completion was
 aborted manually."
   :group 'company
   :type 'hook)
 
 (defcustom company-completion-finished-hook nil
-  "*Hook run when company successfully completes.
+  "Hook run when company successfully completes.
 The hook is called with the selected candidate as an argument."
   :group 'company
   :type 'hook)
 
 (defcustom company-minimum-prefix-length 3
-  "*The minimum prefix length for automatic completion."
+  "The minimum prefix length for automatic completion."
   :group 'company
   :type '(integer :tag "prefix length"))
 
 (defcustom company-require-match 'company-explicit-action-p
-  "*If enabled, disallow non-matching input.
+  "If enabled, disallow non-matching input.
 This can be a function do determine if a match is required.
 
 This can be overridden by the back-end, if it returns t or 'never to
@@ -488,7 +488,7 @@ A character that is part of a valid candidate never starts 
auto-completion."
                  (function :tag "Predicate function")))
 
 (defcustom company-idle-delay .7
-  "*The idle delay in seconds until automatic completions starts.
+  "The idle delay in seconds until automatic completions starts.
 A value of nil means never complete automatically, t means complete
 immediately when a prefix of `company-minimum-prefix-length' is reached."
   :group 'company
@@ -497,7 +497,7 @@ immediately when a prefix of 
`company-minimum-prefix-length' is reached."
                  (number :tag "seconds")))
 
 (defcustom company-begin-commands t
-  "*A list of commands following which company will start completing.
+  "A list of commands following which company will start completing.
 If this is t, it will complete after any command.  See `company-idle-delay'.
 
 Alternatively any command with a non-nil 'company-begin property is treated as
@@ -508,13 +508,13 @@ if it was on this list."
                  (repeat :tag "Commands" function)))
 
 (defcustom company-show-numbers nil
-  "*If enabled, show quick-access numbers for the first ten candidates."
+  "If enabled, show quick-access numbers for the first ten candidates."
   :group 'company
   :type '(choice (const :tag "off" nil)
                  (const :tag "on" t)))
 
 (defvar company-end-of-buffer-workaround t
-  "*Work around a visualization bug when completing at the end of the buffer.
+  "Work around a visualization bug when completing at the end of the buffer.
 The work-around consists of adding a newline.")
 
 ;;; mode 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -578,7 +578,7 @@ The work-around consists of adding a newline.")
 
 ;;;###autoload
 (define-minor-mode company-mode
-  "\"complete anything\"; in in-buffer completion framework.
+  "\"complete anything\"; is an in-buffer completion framework.
 Completion starts automatically, depending on the values
 `company-idle-delay' and `company-minimum-prefix-length'.
 

commit cb0a58684509ba5d3546d7d08a11b136ca294c11
Author: Dmitry Gutov <address@hidden>
Date:   Wed Mar 13 05:58:20 2013 +0400

    Merge changes from the GNU ELPA repository
    
    * Add company-capf: adapter for `completion-at-point-functions'.
    * Lots of header and docstring tweaks.
    * Copy README to README.md, adjust formatting.

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..ff48917
--- /dev/null
+++ b/README.md
@@ -0,0 +1,6 @@
+Company is an Emacs extension for performing text completion.
+Completion candidates are retrieved from a variety of modular
+back-ends, such as Semantic.
+
+Once installed, enable company-mode with <kbd>M-x company-mode</kbd>.
+For further information, see the docstring for `company-mode`.
diff --git a/company-abbrev.el b/company-abbrev.el
index 57939e8..a28c88d 100644
--- a/company-abbrev.el
+++ b/company-abbrev.el
@@ -1,21 +1,29 @@
-;;; company-abbrev.el --- a company-mode completion back-end for abbrev
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-abbrev.el --- A company-mode completion back-end for abbrev
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
diff --git a/company-clang.el b/company-clang.el
index 73825f2..7cb85e3 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -1,28 +1,36 @@
-;;; company-clang.el --- a company-mode completion back-end for clang
-;;
-;; Copyright (C) 2010 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-clang.el --- A company-mode completion back-end for clang
+
+;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
 
 (defcustom company-clang-executable
   (executable-find "clang")
-  "*Location of clang executable"
+  "*Location of clang executable."
   :group 'company-clang
   :type 'file)
 
diff --git a/company-css.el b/company-css.el
index 6c8f4c0..6546a10 100644
--- a/company-css.el
+++ b/company-css.el
@@ -1,21 +1,27 @@
-;;; company-css.el --- a company-mode completion back-end for css-mode
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-css.el --- A company-mode completion back-end for css-mode
+
+;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
@@ -241,7 +247,7 @@
           "\\)*"
           "\\(\\(?:#\\|\\_<[[:alpha:]]\\)\\(?:[[:alnum:]-#]*\\_>\\)?\\_>\\|\\)"
           "\\=")
-  "A regular expression matching CSS tags")
+  "A regular expression matching CSS tags.")
 
 ;;; pseudo id
 (defconst company-css-pseudo-regexp
@@ -255,7 +261,7 @@
           "\\)*"
           "\\(?:\\(?:\\#\\|\\_<[[:alpha:]]\\)[[:alnum:]-#]*\\):"
           "\\([[:alpha:]-]+\\_>\\|\\)\\_>\\=")
-  "A regular expression matching CSS pseudo classes")
+  "A regular expression matching CSS pseudo classes.")
 
 ;;; properties
 
@@ -268,7 +274,7 @@ Returns \"\" if no property found, but feasible at this 
position."
 ;;; values
 (defconst company-css-property-value-regexp
   "\\_<\\([[:alpha:]-]+\\):\\(?:[^};]*[[:space:]]+\\)?\\([^};]*\\_>\\|\\)\\="
-  "A regular expression matching CSS tags")
+  "A regular expression matching CSS tags.")
 
 ;;;###autoload
 (defun company-css (command &optional arg &rest ignored)
diff --git a/company-dabbrev-code.el b/company-dabbrev-code.el
index 5d962e2..5cedcc4 100644
--- a/company-dabbrev-code.el
+++ b/company-dabbrev-code.el
@@ -1,21 +1,29 @@
-;;; company-dabbrev-code.el --- a dabbrev-like company-mode back-end for code
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-dabbrev-code.el --- A dabbrev-like company-mode back-end for code
+
+;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (require 'company-dabbrev)
@@ -38,8 +46,8 @@ Value t means complete in all modes."
 
 (defcustom company-dabbrev-code-other-buffers t
   "*Determines whether `company-dabbrev-code' should search other buffers.
-If 'all, search all other buffers.  If t, search buffers with the same
-major-mode.
+If `all', search all other buffers.  If t, search buffers with the same
+major mode.
 See also `company-dabbrev-code-time-limit'."
   :group 'company
   :type '(choice (const :tag "Off" nil)
diff --git a/company-dabbrev.el b/company-dabbrev.el
index f4453e9..03223cf 100644
--- a/company-dabbrev.el
+++ b/company-dabbrev.el
@@ -1,29 +1,37 @@
-;;; company-dabbrev.el --- a dabbrev-like company-mode completion back-end
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-dabbrev.el --- A dabbrev-like company-mode completion back-end
+
+;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
 
 (defcustom company-dabbrev-other-buffers 'all
   "*Determines whether `company-dabbrev' should search other buffers.
-If 'all, search all other buffers.  If t, search buffers with the same
-major-mode.
+If `all', search all other buffers.  If t, search buffers with the same
+major mode.
 See also `company-dabbrev-time-limit'."
   :group 'company
   :type '(choice (const :tag "Off" nil)
diff --git a/company-eclim.el b/company-eclim.el
index f28bdb0..be08fa0 100644
--- a/company-eclim.el
+++ b/company-eclim.el
@@ -1,21 +1,29 @@
-;;; company-eclim.el --- a company-mode completion back-end for eclim.
-;;
-;; Copyright (C) 2009-2010 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-eclim.el --- A company-mode completion back-end for eclim.
+
+;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
@@ -31,7 +39,7 @@
 
 (defcustom company-eclim-executable
   (or (executable-find "eclim") (company-eclim-executable-find))
-  "*Location of eclim executable"
+  "*Location of eclim executable."
   :group 'company
   :type 'file)
 
diff --git a/company-elisp.el b/company-elisp.el
index 1073f28..f3a1809 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -1,28 +1,36 @@
-;;; company-elisp.el --- a company-mode completion back-end for emacs-lisp-mode
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-elisp.el --- A company-mode completion back-end for emacs-lisp-mode
+
+;; Copyright (C) 2009, 2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
 (require 'help-mode)
 
 (defcustom company-elisp-detect-function-context t
-  "*If enabled, offer lisp functions only in appropriate contexts.
+  "*If enabled, offer Lisp functions only in appropriate contexts.
 Functions are offered for completion only after ' and \(."
   :group 'company
   :type '(choice (const :tag "Off" nil)
diff --git a/company-etags.el b/company-etags.el
index a4c2f1d..6807f98 100644
--- a/company-etags.el
+++ b/company-etags.el
@@ -1,21 +1,29 @@
-;;; company-etags.el --- a company-mode completion back-end for etags
-;;
-;; Copyright (C) 2009-2010 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-etags.el --- A company-mode completion back-end for etags
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (require 'etags)
diff --git a/company-files.el b/company-files.el
index bc76469..6b34d57 100644
--- a/company-files.el
+++ b/company-files.el
@@ -1,21 +1,29 @@
-;;; company-files.el --- a company-mode completion back-end for file names
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-files.el --- A company-mode completion back-end for file names
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
@@ -65,7 +73,7 @@
 
 ;;;###autoload
 (defun company-files (command &optional arg &rest ignored)
-  "a `company-mode' completion back-end existing file names."
+  "A `company-mode' completion back-end existing file names."
   (interactive (list 'interactive))
   (case command
     (interactive (company-begin-backend 'company-files))
diff --git a/company-gtags.el b/company-gtags.el
index 2630f73..62c9707 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -1,34 +1,42 @@
-;;; company-gtags.el --- a company-mode completion back-end for GNU Global
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-gtags.el --- A company-mode completion back-end for GNU Global
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
 
 (defcustom company-gtags-executable
   (executable-find "global")
-  "*Location of GNU global executable"
+  "*Location of GNU global executable."
   :type 'string
   :group 'company)
 
 (define-obsolete-variable-alias
   'company-gtags-gnu-global-program-name
-  'company-gtags-executable)
+  'company-gtags-executable "earlier")
 
 (defvar company-gtags--tags-available-p 'unknown)
 (make-variable-buffer-local 'company-gtags--tags-available-p)
diff --git a/company-ispell.el b/company-ispell.el
index c4acebc..05266af 100644
--- a/company-ispell.el
+++ b/company-ispell.el
@@ -1,21 +1,29 @@
-;;; company-ispell.el --- a company-mode completion back-end using ispell
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-ispell.el --- A company-mode completion back-end using ispell
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (require 'ispell)
diff --git a/company-keywords.el b/company-keywords.el
index 3efda9e..88af112 100644
--- a/company-keywords.el
+++ b/company-keywords.el
@@ -1,21 +1,29 @@
-;;; company-keywords.el --- a company back-end for programming language 
keywords
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-keywords.el --- A company back-end for programming language 
keywords
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
@@ -225,5 +233,3 @@
 
 (provide 'company-keywords)
 ;;; company-keywords.el ends here
-
-
diff --git a/company-nxml.el b/company-nxml.el
index 5d05bc6..0be1819 100644
--- a/company-nxml.el
+++ b/company-nxml.el
@@ -1,21 +1,29 @@
-;;; company-nxml.el --- a company-mode completion back-end for nxml-mode
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-nxml.el --- A company-mode completion back-end for nxml-mode
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (require 'nxml-mode)
@@ -29,8 +37,8 @@
   (replace-regexp-in-string "w" company-nxml-token-regexp
    "<w\\(?::w\\)?\
 \\(?:[ \t\r\n]+w\\(?::w\\)?[ \t\r\n]*=\
-[ \t\r\n]*\\(?:\"[^\"]*\"\\|'[^']*'\\)\\)*\
-[ \t\r\n]+\\(w\\(:w\\)?\\)[ \t\r\n]*=[ \t\r\n]*\
+\[ \t\r\n]*\\(?:\"[^\"]*\"\\|'[^']*'\\)\\)*\
+\[ \t\r\n]+\\(w\\(:w\\)?\\)[ \t\r\n]*=[ \t\r\n]*\
 \\(\"\\([^\"]*\\>\\)\\|'\\([^']*\\>\\)\\)\\="
    t t))
 
diff --git a/company-oddmuse.el b/company-oddmuse.el
index 344a8be..8d60a2e 100644
--- a/company-oddmuse.el
+++ b/company-oddmuse.el
@@ -1,21 +1,29 @@
-;;; company-oddmuse.el --- a company-mode completion back-end for oddmuse-mode
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-oddmuse.el --- A company-mode completion back-end for oddmuse-mode
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when 'compile (require 'yaooddmuse nil t))
diff --git a/company-pysmell.el b/company-pysmell.el
index 83dfebb..8cfe10d 100644
--- a/company-pysmell.el
+++ b/company-pysmell.el
@@ -1,21 +1,29 @@
-;;; company-pysmell.el --- a company-mode completion back-end for pysmell.el
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-pysmell.el --- A company-mode completion back-end for pysmell.el
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (eval-when-compile (require 'cl))
 (require 'pysmell)
diff --git a/company-ropemacs.el b/company-ropemacs.el
index e63a8df..2b402f7 100644
--- a/company-ropemacs.el
+++ b/company-ropemacs.el
@@ -1,21 +1,29 @@
-;;; company-ropemacs.el --- a company-mode completion back-end for pysmell.el
-;;
-;; Copyright (C) 2009-2010 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-ropemacs.el --- A company-mode completion back-end for pysmell.el
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (eval-when-compile (require 'cl))
 (require 'pymacs)
diff --git a/company-semantic.el b/company-semantic.el
index f22266d..eacf1c7 100644
--- a/company-semantic.el
+++ b/company-semantic.el
@@ -1,21 +1,29 @@
-;;; company-semantic.el --- a company-mode back-end using CEDET Semantic
-;;
-;; Copyright (C) 2009-2010 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-semantic.el --- A company-mode back-end using CEDET Semantic
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (or (require 'semantic-analyze nil t)
@@ -30,7 +38,7 @@
 (defvar company-semantic-modes '(c-mode c++-mode jde-mode java-mode))
 
 (defvar company-semantic--current-tags nil
-  "Tags for the current context")
+  "Tags for the current context.")
 
 (defun company-semantic-doc-or-summary (tag)
   (or (semantic-documentation-for-tag tag)
@@ -110,7 +118,7 @@ Symbols are chained by \".\" or \"->\"."
                    (assoc arg company-semantic--current-tags)))
     (doc-buffer (company-semantic-doc-buffer
                  (assoc arg company-semantic--current-tags)))
-    ;; because "" is an empty context and doesn't return local variables
+    ;; Because "" is an empty context and doesn't return local variables.
     (no-cache (equal arg ""))
     (location (let ((tag (assoc arg company-semantic--current-tags)))
                 (when (buffer-live-p (semantic-tag-buffer tag))
diff --git a/company-template.el b/company-template.el
index f9b0fcd..53d9687 100644
--- a/company-template.el
+++ b/company-template.el
@@ -1,3 +1,26 @@
+;;; company-template.el
+
+;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
 (eval-when-compile (require 'cl))
 
 (defface company-template-field
diff --git a/company-tempo.el b/company-tempo.el
index efba482..1dda49e 100644
--- a/company-tempo.el
+++ b/company-tempo.el
@@ -1,21 +1,29 @@
-;;; company-tempo.el --- a company-mode completion back-end for tempo
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-tempo.el --- A company-mode completion back-end for tempo
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
diff --git a/company-xcode.el b/company-xcode.el
index 884a78d..42e00de 100644
--- a/company-xcode.el
+++ b/company-xcode.el
@@ -1,27 +1,35 @@
-;;; company-xcode.el --- a company-mode completion back-end for Xcode projects
-;;
-;; Copyright (C) 2009 Nikolaj Schumacher
-;;
-;; This file is part of company 0.5.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;;; company-xcode.el --- A company-mode completion back-end for Xcode projects
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+;;
+
+;;; Code:
 
 (require 'company)
 (eval-when-compile (require 'cl))
 
 (defcustom company-xcode-xcodeindex-executable (executable-find "xcodeindex")
-  "*Location of xcodeindex executable"
+  "*Location of xcodeindex executable."
   :group 'company-xcode
   :type 'file)
 
@@ -35,7 +43,7 @@
 (defcustom company-xcode-types
   '("Class" "Constant" "Enum" "Macro" "Modeled Class" "Structure"
     "Type" "Union" "Function")
-  "*The types of symbols offered by `company-xcode'
+  "*The types of symbols offered by `company-xcode'.
 No context-enabled completion is available.  Types like methods will be
 offered regardless of whether the class supports them.  The defaults should be
 valid in most contexts."
diff --git a/company.el b/company.el
index 317e1a7..142ecab 100644
--- a/company.el
+++ b/company.el
@@ -1,28 +1,28 @@
-;;; company.el --- extensible inline text completion mechanism
-;;
-;; Copyright (C) 2009-2010 Nikolaj Schumacher
-;;
-;; Author: Nikolaj Schumacher <bugs * nschum de>
+;;; company.el --- Extensible inline text completion mechanism
+
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
+
+;; Author: Nikolaj Schumacher
 ;; Version: 0.5
 ;; Keywords: abbrev, convenience, matching
-;; URL: http://nschum.de/src/emacs/company/
+;; URL: http://nschum.de/src/emacs/company-mode/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x
-;;
-;; This file is NOT part of GNU Emacs.
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
-;;
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
 ;;; Commentary:
 ;;
 ;; Company is a modular completion mechanism.  Modules for retrieving 
completion
@@ -65,6 +65,8 @@
 ;;
 ;;; Change Log:
 ;;
+;;    Added `company-capf': completion adapter using
+;;    `completion-at-point-functions'.  (Stefan Monnier)
 ;;    Switching tags now works correctly in `company-etags'.
 ;;
 ;; 2010-02-24 (0.5)
@@ -134,7 +136,7 @@
 ;;
 ;; 2009-03-20 (0.1)
 ;;    Initial release.
-;;
+
 ;;; Code:
 
 (eval-when-compile (require 'cl))
@@ -309,7 +311,29 @@ If this many lines are not available, prefer to display 
the tooltip above."
                         (assq backend company-safe-backends))
                 (return t))))))
 
-(defcustom company-backends '(company-elisp company-nxml company-css
+(defun company-capf (command &optional arg &rest args)
+  "Adapter for Company completion to use `completion-at-point-functions'."
+  (interactive (list 'interactive))
+  (case command
+    (interactive (company-begin-backend 'company-capf))
+    (prefix
+     (let ((res (run-hook-wrapped 'completion-at-point-functions
+                                  ;; Ignore misbehaving functions.
+                                  #'completion--capf-wrapper 'optimist)))
+       (when (consp res)
+         (if (> (nth 1 res) (point))
+             'stop
+           (buffer-substring-no-properties (nth 0 res) (point))))))
+    (candidates
+     (let ((res (run-hook-wrapped 'completion-at-point-functions
+                                  ;; Ignore misbehaving functions.
+                                  #'completion--capf-wrapper 'optimist)))
+       (when (consp res)
+         (all-completions arg (nth 2 res)
+                          (plist-get (nthcdr 3 res) :predicate)))))))
+
+(defcustom company-backends '(;; company-capf ;FIXME: Untested!
+                              company-elisp company-nxml company-css
                               company-eclim company-semantic company-clang
                               company-xcode company-ropemacs
                               (company-gtags company-etags company-dabbrev-code
@@ -327,7 +351,7 @@ Each back-end is a function that takes a variable number of 
arguments.
 The first argument is the command requested from the back-end.  It is one
 of the following:
 
-'prefix: The back-end should return the text to be completed.  It must be
+`prefix': The back-end should return the text to be completed.  It must be
 text immediately before `point'.  Returning nil passes control to the next
 back-end.  The function should return 'stop if it should complete but cannot
 \(e.g. if it is in the middle of a string\).  If the returned value is only
@@ -335,33 +359,33 @@ part of the prefix (e.g. the part after \"->\" in C), the 
back-end may return a
 cons of prefix and prefix length, which is then used in the
 `company-minimum-prefix-length' test.
 
-'candidates: The second argument is the prefix to be completed.  The
+`candidates': The second argument is the prefix to be completed.  The
 return value should be a list of candidates that start with the prefix.
 
 Optional commands:
 
-'sorted: The back-end may return t here to indicate that the candidates
+`sorted': The back-end may return t here to indicate that the candidates
 are sorted and will not need to be sorted again.
 
-'duplicates: If non-nil, company will take care of removing duplicates
+`duplicates': If non-nil, company will take care of removing duplicates
 from the list.
 
-'no-cache: Usually company doesn't ask for candidates again as completion
+`no-cache': Usually company doesn't ask for candidates again as completion
 progresses, unless the back-end returns t for this command.  The second
 argument is the latest prefix.
 
-'meta: The second argument is a completion candidate.  The back-end should
+`meta': The second argument is a completion candidate.  The back-end should
 return a (short) documentation string for it.
 
-'doc-buffer: The second argument is a completion candidate.  The back-end 
should
-create a buffer (preferably with `company-doc-buffer'), fill it with
-documentation and return it.
+`doc-buffer': The second argument is a completion candidate.
+The back-end should create a buffer (preferably with `company-doc-buffer'),
+fill it with documentation and return it.
 
-'location: The second argument is a completion candidate.  The back-end can
+`location': The second argument is a completion candidate.  The back-end can
 return the cons of buffer and buffer location, or of file and line
 number where the completion candidate was defined.
 
-'require-match: If this value is t, the user is not allowed to enter anything
+`require-match': If this value is t, the user is not allowed to enter anything
 not offering as a candidate.  Use with care!  The default value nil gives the
 user that choice with `company-require-match'.  Return value 'never overrides
 that option the other way around.

commit ffdeedf11ae57e976c8bc164ebfdcf1aff869a74
Author: Leo Liu <address@hidden>
Date:   Fri Mar 8 18:39:19 2013 +0800

    Fix #1: use path-separator instead

diff --git a/ggtags.el b/ggtags.el
index d3f13a4..601f466 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -105,7 +105,8 @@ Return -1 if it does not exist."
       -1)))
 
 (defun ggtags-get-libpath ()
-  (split-string (or (getenv "GTAGSLIBPATH") "") ":" t))
+  (split-string (or (getenv "GTAGSLIBPATH") "")
+                (regexp-quote path-separator) t))
 
 (defun ggtags-cache-get (key)
   (assoc key ggtags-cache))

commit f713d6fb3b46417d500d2836d9b6aa8df2093e54
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 7 20:12:12 2013 +0400

    * js2-multiline-decl-indentation: Simplify a logical condition

diff --git a/js2-mode.el b/js2-mode.el
index c8d56a3..10655c5 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -9593,11 +9593,10 @@ to a multiline declaration statement.  See 
`js2-pretty-multiline-declarations'."
                         (js2-backward-sws)
                         (or (eq (char-before) ?,)
                             (and (not (eq (char-before) ?\;))
-                                 (and
-                                  (prog2 (skip-syntax-backward ".")
-                                      (looking-at js2-indent-operator-re)
-                                    (js2-backward-sws))
-                                  (not (eq (char-before) ?\;))))
+                                 (prog2 (skip-syntax-backward ".")
+                                     (looking-at js2-indent-operator-re)
+                                   (js2-backward-sws))
+                                 (not (eq (char-before) ?\;)))
                             (js2-same-line pos)))))
           (condition-case err
               (backward-sexp)

commit 38585ff9eaf38ed0f38cccd9b8943204ee059652
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 7 06:22:39 2013 +0400

    emacs -l doesn't handle wilcards

diff --git a/Makefile b/Makefile
index 6d05248..36f2cb9 100644
--- a/Makefile
+++ b/Makefile
@@ -20,4 +20,5 @@ js2-imenu-extras.elc: js2-mode.elc
        emacs $(BATCHFLAGS) -l ./js2-mode.elc -f batch-byte-compile $*.el
 
 test:
-       emacs $(BATCHFLAGS) -l js2-mode.el -l tests/*.el -f ert-run-tests-batch
+       emacs $(BATCHFLAGS) -l js2-mode.el -l tests/parser.el\
+         -l tests/indent.el -f ert-run-tests-batch

commit fd16a6299ece3b9b0c85aaa1b48ffbdf56541270
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 7 06:19:16 2013 +0400

    Update Makefile

diff --git a/Makefile b/Makefile
index 3ff3d8c..6d05248 100644
--- a/Makefile
+++ b/Makefile
@@ -20,4 +20,4 @@ js2-imenu-extras.elc: js2-mode.elc
        emacs $(BATCHFLAGS) -l ./js2-mode.elc -f batch-byte-compile $*.el
 
 test:
-       emacs $(BATCHFLAGS) -l js2-mode.el -l tests/ast.el -f 
ert-run-tests-batch
+       emacs $(BATCHFLAGS) -l js2-mode.el -l tests/*.el -f ert-run-tests-batch
diff --git a/tests/indent.el b/tests/indent.el
index d363374..b0d1b31 100644
--- a/tests/indent.el
+++ b/tests/indent.el
@@ -13,7 +13,8 @@
 (defmacro* js2-deftest-indent (name content &key bind)
   `(ert-deftest ,name ()
      (let ,(append '((js2-basic-offset 2)
-                     (js2-pretty-multiline-declarations t))
+                     (js2-pretty-multiline-declarations t)
+                     (inhibit-point-motion-hooks t))
                    bind)
        (js2-test-indent ,content))))
 

commit 1c3b98ac36bda12408d94b27092dc3b47e647593
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 7 06:15:18 2013 +0400

    Fix #89

diff --git a/js2-mode.el b/js2-mode.el
index d48505c..c8d56a3 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -7,7 +7,7 @@
 ;;         Dmitry Gutov <address@hidden>
 ;; URL:  https://github.com/mooz/js2-mode/
 ;;       http://code.google.com/p/js2-mode/
-;; Version: 20130228
+;; Version: 20130307
 ;; Keywords: languages, javascript
 ;; Package-Requires: ((emacs "24.1"))
 
@@ -9594,7 +9594,7 @@ to a multiline declaration statement.  See 
`js2-pretty-multiline-declarations'."
                         (or (eq (char-before) ?,)
                             (and (not (eq (char-before) ?\;))
                                  (and
-                                  (prog2 (skip-chars-backward "[[:punct:]]")
+                                  (prog2 (skip-syntax-backward ".")
                                       (looking-at js2-indent-operator-re)
                                     (js2-backward-sws))
                                   (not (eq (char-before) ?\;))))
diff --git a/tests/indent.el b/tests/indent.el
index f09734e..d363374 100644
--- a/tests/indent.el
+++ b/tests/indent.el
@@ -7,7 +7,8 @@
       (insert (replace-regexp-in-string "^ *" "" s))
       (js2-mode)
       (indent-region (point-min) (point-max))
-      (should (string= s (buffer-substring (point-min) (point)))))))
+      (should (string= s (buffer-substring-no-properties
+                          (point-min) (point)))))))
 
 (defmacro* js2-deftest-indent (name content &key bind)
   `(ert-deftest ,name ()
@@ -39,6 +40,10 @@
   "var foo = 100500 /
   |      16;")
 
+(js2-deftest-indent no-multiline-decl-with-operator-inside-string
+  "var foo = bar('/protocols/')
+  |baz()")
+
 (js2-deftest-indent no-multiline-decl-implicit-semicolon
   "var foo = 100500
   |1")

commit aebd60c8865fd914e45a05f1ac5ad86988404e04
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 7 06:09:18 2013 +0400

    Add some indentation tests

diff --git a/tests/indent.el b/tests/indent.el
new file mode 100644
index 0000000..f09734e
--- /dev/null
+++ b/tests/indent.el
@@ -0,0 +1,69 @@
+(require 'ert)
+(require 'js2-mode)
+
+(defun js2-test-indent (content)
+  (let ((s (replace-regexp-in-string "^ *|" "" content)))
+    (with-temp-buffer
+      (insert (replace-regexp-in-string "^ *" "" s))
+      (js2-mode)
+      (indent-region (point-min) (point-max))
+      (should (string= s (buffer-substring (point-min) (point)))))))
+
+(defmacro* js2-deftest-indent (name content &key bind)
+  `(ert-deftest ,name ()
+     (let ,(append '((js2-basic-offset 2)
+                     (js2-pretty-multiline-declarations t))
+                   bind)
+       (js2-test-indent ,content))))
+
+(put 'js2-deftest-indent 'lisp-indent-function 'defun)
+
+(js2-deftest-indent no-multiline-decl-indent-after-semicolon
+  "var foo = 1;
+  |bar = 2")
+
+(js2-deftest-indent multiline-decl-indent-after-comma
+  "let foo = 1,
+  |    bar = 2")
+
+(js2-deftest-indent no-multiline-decl-when-disabled
+  "let foo = 1,
+  |bar = 2"
+  :bind ((js2-pretty-multiline-declarations nil)))
+
+(js2-deftest-indent multiline-decl-with-continued-expr
+  "var foo = 100500
+  |      + 1")
+
+(js2-deftest-indent multiline-decl-with-continued-expr-same-line
+  "var foo = 100500 /
+  |      16;")
+
+(js2-deftest-indent no-multiline-decl-implicit-semicolon
+  "var foo = 100500
+  |1")
+
+(js2-deftest-indent multiline-decl-sees-keyword-width
+  "const foo = 1,
+  |      bar = 2;")
+
+(js2-deftest-indent multiline-decl-second-arg-value-parenthesised
+  "var foo = 1,
+  |    bar = [
+  |      1, 2,
+  |      3, 4
+  |    ],
+  |    baz = 5;")
+
+(js2-deftest-indent multiline-decl-first-arg-function-normal
+  "var foo = function() {
+  |  return 7;
+  |},
+  |    bar = 8;")
+
+(js2-deftest-indent multiline-decl-first-arg-function-indent-all
+  "var foo = function() {
+  |      return 7;
+  |    },
+  |    bar = 8;"
+  :bind ((js2-pretty-multiline-declarations 'all)))

commit 5309fdede51856423e09f3af021e01876c286109
Author: Dmitry Gutov <address@hidden>
Date:   Thu Mar 7 05:33:33 2013 +0400

    tests{ast -> parser}.el

diff --git a/tests/ast.el b/tests/parser.el
similarity index 62%
rename from tests/ast.el
rename to tests/parser.el
index 1611049..00b7cff 100644
--- a/tests/ast.el
+++ b/tests/parser.el
@@ -9,7 +9,7 @@
     (should (null js2-mode-buffer-dirty-p))
     js2-mode-ast))
 
-(defun js2-test-ast-string (code-string &key syntax-error)
+(defun js2-test-parse-string (code-string &key syntax-error)
   (let ((ast (js2-test-string-to-ast code-string)))
     (if syntax-error
         (let ((errors (js2-ast-root-errors ast)))
@@ -24,7 +24,7 @@
         (should (string= code-string (buffer-substring-no-properties
                                       (point-min) (point))))))))
 
-(defmacro* js2-deftest-ast (name code-string &key bind syntax-error)
+(defmacro* js2-deftest-parse (name code-string &key bind syntax-error)
   "Parse CODE-STRING.  If SYNTAX-ERROR is nil, print syntax tree
 with `js2-print-tree' and assert the result to be equal to the
 original string.  If SYNTAX-ERROR is passed, expect syntax error
@@ -32,82 +32,82 @@ highlighting substring equal to SYNTAX-ERROR value.
 BIND defines bindings to apply them around the test."
   `(ert-deftest ,name ()
      (let ,(append bind '((js2-basic-offset 2)))
-       (js2-test-ast-string ,code-string :syntax-error ,syntax-error))))
+       (js2-test-parse-string ,code-string :syntax-error ,syntax-error))))
 
-(put 'js2-deftest-ast 'lisp-indent-function 'defun)
+(put 'js2-deftest-parse 'lisp-indent-function 'defun)
 
 ;;; Callers of `js2-valid-prop-name-token'.
 
-(js2-deftest-ast parse-property-access-when-not-keyword
+(js2-deftest-parse parse-property-access-when-not-keyword
   "A.foo = 3;")
 
-(js2-deftest-ast parse-property-access-when-keyword
+(js2-deftest-parse parse-property-access-when-keyword
   "A.in = 3;"
   :bind ((js2-allow-keywords-as-property-names t)))
 
-(js2-deftest-ast parse-property-access-when-keyword-no-xml
+(js2-deftest-parse parse-property-access-when-keyword-no-xml
   "A.in = 3;"
   :bind ((js2-allow-keywords-as-property-names t)
          (js2-compiler-xml-available nil)))
 
-(js2-deftest-ast parse-array-literal-when-not-keyword
+(js2-deftest-parse parse-array-literal-when-not-keyword
   "a = {b: 1};")
 
-(js2-deftest-ast parse-array-literal-when-keyword
+(js2-deftest-parse parse-array-literal-when-keyword
   "a = {in: 1};"
   :bind ((js2-allow-keywords-as-property-names t)))
 
 ;;; 'of' contextual keyword.
 
-(js2-deftest-ast parse-array-comp-loop-with-of
+(js2-deftest-parse parse-array-comp-loop-with-of
   "[a for (a of [])];")
 
-(js2-deftest-ast parse-for-of
+(js2-deftest-parse parse-for-of
   "for (var a of []) {\n}")
 
-(js2-deftest-ast of-can-be-var-name
+(js2-deftest-parse of-can-be-var-name
   "var of = 3;")
 
-(js2-deftest-ast of-can-be-function-name
+(js2-deftest-parse of-can-be-function-name
   "function of() {\n}")
 
 ;;; Destructuring binding.
 
-(js2-deftest-ast destruct-in-declaration
+(js2-deftest-parse destruct-in-declaration
   "var {a, b} = {a: 1, b: 2};")
 
-(js2-deftest-ast destruct-in-arguments
+(js2-deftest-parse destruct-in-arguments
   "function f({a: aa, b: bb}) {\n}")
 
-(js2-deftest-ast destruct-in-array-comp-loop
+(js2-deftest-parse destruct-in-array-comp-loop
   "[a + b for ([a, b] in [[0, 1], [1, 2]])];")
 
-(js2-deftest-ast destruct-in-catch-clause
+(js2-deftest-parse destruct-in-catch-clause
   "try {\n} catch ({a, b}) {\n  a + b;\n}")
 
 ;;; Function parameters.
 
-(js2-deftest-ast function-with-default-parameters
+(js2-deftest-parse function-with-default-parameters
   "function foo(a = 1, b = a + 1) {\n}")
 
-(js2-deftest-ast function-with-no-default-after-default
+(js2-deftest-parse function-with-no-default-after-default
   "function foo(a = 1, b) {\n}"
   :syntax-error "b")
 
-(js2-deftest-ast function-with-destruct-after-default
+(js2-deftest-parse function-with-destruct-after-default
   "function foo(a = 1, {b, c}) {\n}"
   :syntax-error "{")
 
-(js2-deftest-ast function-with-rest-parameter
+(js2-deftest-parse function-with-rest-parameter
   "function foo(a, b, ...rest) {\n}")
 
-(js2-deftest-ast function-with-param-after-rest-parameter
+(js2-deftest-parse function-with-param-after-rest-parameter
   "function foo(a, ...b, rest) {\n}"
   :syntax-error "rest")
 
-(js2-deftest-ast function-with-destruct-after-rest-parameter
+(js2-deftest-parse function-with-destruct-after-rest-parameter
   "function foo(a, ...b, {}) {\n}"
   :syntax-error "{}")
 
-(js2-deftest-ast function-with-rest-after-default-parameter
+(js2-deftest-parse function-with-rest-after-default-parameter
   "function foo(a = 1, ...rest) {\n}")

commit a28e0c3b186c123b158749de2d38815757d20962
Author: Leo Liu <address@hidden>
Date:   Fri Mar 1 12:58:53 2013 +0800

    Make use of the new switch --path-style to global

diff --git a/ggtags.el b/ggtags.el
index d5a4037..d3f13a4 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -79,6 +79,14 @@ If nil, use Emacs default."
        (progn ,@body)
      (file-error nil)))
 
+;; http://thread.gmane.org/gmane.comp.gnu.global.bugs/1518
+(defvar ggtags-global-has-path-style    ; introduced in global 6.2.8
+  (ggtags-ignore-file-error
+    (and (string-match-p "^--path-style "
+                         (shell-command-to-string "global --help"))
+         t))
+  "Non-nil if `global' supports --path-style switch.")
+
 (defmacro ggtags-ensure-global-buffer (&rest body)
   (declare (indent 0))
   `(progn
@@ -185,6 +193,11 @@ Return -1 if it does not exist."
              (format (if default "Tag (default %s): " "Tag: ") default)
              tags nil t nil nil default)))))
 
+(defvar ggtags-global-options
+  (concat "-v --result=grep"
+          (and ggtags-global-has-path-style " --path-style=shorter"))
+  "Options (as a string) for running `global'.")
+
 ;;;###autoload
 (defun ggtags-find-tag (name &optional verbose)
   "Find definitions or references to tag NAME by context.
@@ -200,11 +213,13 @@ When called with prefix, ask the name and kind of tag."
         (default-directory (ggtags-root-directory)))
     (compilation-start
      (if verbose
-         (format "global -v%s --result=grep \"%s\""
+         (format "global %s %s \"%s\""
+                 ggtags-global-options
                  (if (y-or-n-p "Kind (y for definition n for reference)? ")
-                     "" "r")
+                     "" "-r")
                  name)
-       (format "global -v --result=grep --from-here=%d:%s \"%s\""
+       (format "global %s --from-here=%d:%s \"%s\""
+               ggtags-global-options
                (line-number-at-pos)
                (expand-file-name buffer-file-name)
                name))

commit 63f135e2bafcb6dfd9a8014045f8e89d46e2f707
Author: Dmitry Gutov <address@hidden>
Date:   Thu Feb 28 11:38:33 2013 +0400

    * js2-mode-forward-sexp: never jump over an unbalanced paren
    
    Fixes #78

diff --git a/js2-mode.el b/js2-mode.el
index a21d3f7..d48505c 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -7,7 +7,7 @@
 ;;         Dmitry Gutov <address@hidden>
 ;; URL:  https://github.com/mooz/js2-mode/
 ;;       http://code.google.com/p/js2-mode/
-;; Version: 20130227
+;; Version: 20130228
 ;; Keywords: languages, javascript
 ;; Package-Requires: ((emacs "24.1"))
 
@@ -10925,7 +10925,7 @@ move backward across N balanced expressions."
   (save-restriction
     (widen) ;; `blink-matching-open' calls `narrow-to-region'
     (js2-reparse))
-  (let ((scan-msg "Containing expression ends prematurely")
+  (let (forward-sexp-function
         node (start (point)) pos lp rp child)
     (cond
      ;; backward-sexp
@@ -10936,22 +10936,26 @@ move backward across N balanced expressions."
      ((and arg (minusp arg))
       (dotimes (i (- arg))
         (js2-backward-sws)
-        (forward-char -1)  ; enter the node we backed up to
+        (forward-char -1)   ; Enter the node we backed up to.
         (when (setq node (js2-node-at-point (point) t))
           (setq pos (js2-node-abs-pos node))
           (let ((parens (js2-mode-forward-sexp-parens node pos)))
             (setq lp (car parens)
-                  rp (cdr parens))))
-        (goto-char
-         (or (when (and lp (> start lp))
-               (if (and rp (<= start rp))
-                   (if (setq child (js2-node-closest-child node (point) lp t))
-                       (js2-node-abs-pos child)
-                     (goto-char start)
-                     (signal 'scan-error (list scan-msg lp lp)))
-                 lp))
-             pos
-             (point-min)))))
+                  rp (cdr parens)))
+          (when (and lp (> start lp))
+            (if (and rp (<= start rp))
+                ;; Between parens, check if there's a child node we can jump.
+                (when (setq child (js2-node-closest-child node (point) lp t))
+                  (setq pos (js2-node-abs-pos child)))
+              ;; Before both parens.
+              (setq pos lp)))
+          (let ((state (parse-partial-sexp start pos)))
+            (goto-char (if (not (zerop (car state)))
+                           ;; Stumble at the unbalanced paren if < 0, or
+                           ;; jump a bit further if > 0.
+                           (scan-sexps start -1)
+                         pos))))
+        (unless pos (goto-char (point-min)))))
      (t
       ;; forward-sexp
       (dotimes (i arg)
@@ -10960,25 +10964,27 @@ move backward across N balanced expressions."
           (setq pos (js2-node-abs-pos node))
           (let ((parens (js2-mode-forward-sexp-parens node pos)))
             (setq lp (car parens)
-                  rp (cdr parens))))
-        (goto-char
-         (or (when (and rp (<= start rp))
-               (if (> start lp)
-                   (if (setq child (js2-node-closest-child node (point) rp))
-                       (js2-node-abs-end child)
-                     (goto-char start)
-                     (signal 'scan-error (list scan-msg rp (1+ rp))))
-                 (1+ rp)))
-             (and pos
-                  (+ pos
-                     (js2-node-len
+                  rp (cdr parens)))
+          (or
+           (when (and rp (<= start rp))
+             (if (> start lp)
+                 (when (setq child (js2-node-closest-child node (point) rp))
+                   (setq pos (js2-node-abs-end child)))
+               (setq pos (1+ rp))))
+           ;; No parens or child nodes, looks for the end of the curren node.
+           (incf pos (js2-node-len
                       (if (js2-expr-stmt-node-p (js2-node-parent node))
-                          ;; stop after the semicolon
+                          ;; Stop after the semicolon.
                           (js2-node-parent node)
                         node))))
-             (point-max))))))))
+          (let ((state (save-excursion (parse-partial-sexp start pos))))
+            (goto-char (if (not (zerop (car state)))
+                           (scan-sexps start 1)
+                         pos))))
+        (unless pos (goto-char (point-max))))))))
 
 (defun js2-mode-forward-sexp-parens (node abs-pos)
+  "Return a cons cell with positions of main parens in NODE."
   (cond
    ((or (js2-array-node-p node)
         (js2-object-node-p node)

commit 3eb2651ce2ddff6f2dc83720eb15ba2617457b94
Author: Dmitry Gutov <address@hidden>
Date:   Thu Feb 28 01:02:16 2013 +0400

    Fix js2-node-[lr]p for js2-paren-node

diff --git a/js2-mode.el b/js2-mode.el
index 44411ab..a21d3f7 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -4162,7 +4162,7 @@ Note that the position may be nil in the case of a parse 
error."
    ((js2-call-node-p node)
     (js2-call-node-lp node))
    ((js2-paren-node-p node)
-    (js2-node-pos node))
+    0)
    ((js2-switch-node-p node)
     (js2-switch-node-lp node))
    ((js2-catch-node-p node)
@@ -4197,7 +4197,7 @@ Note that the position may be nil in the case of a parse 
error."
    ((js2-call-node-p node)
     (js2-call-node-rp node))
    ((js2-paren-node-p node)
-    (+ (js2-node-pos node) (js2-node-len node)))
+    (1- (js2-node-len node)))
    ((js2-switch-node-p node)
     (js2-switch-node-rp node))
    ((js2-catch-node-p node)
@@ -10954,7 +10954,6 @@ move backward across N balanced expressions."
              (point-min)))))
      (t
       ;; forward-sexp
-      (js2-forward-sws)
       (dotimes (i arg)
         (js2-forward-sws)
         (when (setq node (js2-node-at-point (point) t))

commit 02f64d8bb616c81ff1c422c8130097a712ad559b
Author: Dmitry Gutov <address@hidden>
Date:   Wed Feb 27 03:19:58 2013 +0400

    Remove some of the unused definitions

diff --git a/js2-mode.el b/js2-mode.el
index 091e00b..44411ab 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -7,7 +7,7 @@
 ;;         Dmitry Gutov <address@hidden>
 ;; URL:  https://github.com/mooz/js2-mode/
 ;;       http://code.google.com/p/js2-mode/
-;; Version: 20130219
+;; Version: 20130227
 ;; Keywords: languages, javascript
 ;; Package-Requires: ((emacs "24.1"))
 
@@ -1952,12 +1952,6 @@ Returns nil if element is not found in the list."
   (and (>= pos (point-at-bol))
        (<= pos (point-at-eol))))
 
-(defun js2-same-line-2 (p1 p2)
-  "Return t if P1 is on the same line as P2."
-  (save-excursion
-    (goto-char p1)
-    (js2-same-line p2)))
-
 (defun js2-code-bug ()
   "Signal an error when we encounter an unexpected code path."
   (error "failed assertion"))
@@ -2186,12 +2180,6 @@ If any given node in NODES is nil, doesn't record that 
link."
 (put 'cl-struct-js2-scope 'js2-visitor 'js2-visit-block)
 (put 'cl-struct-js2-scope 'js2-printer 'js2-print-none)
 
-(defun js2-scope-set-parent-scope (scope parent)
-  (setf (js2-scope-parent-scope scope) parent
-        (js2-scope-top scope) (if (null parent)
-                                  scope
-                                (js2-scope-top parent))))
-
 (defun js2-node-get-enclosing-scope (node)
   "Return the innermost `js2-scope' node surrounding NODE.
 Returns nil if there is no enclosing scope node."
@@ -4072,18 +4060,6 @@ If N has no parent pointer, returns N."
         (js2-node-root parent)
       n)))
 
-(defun js2-node-position-in-parent (node &optional parent)
-  "Return the position of NODE in parent's block-kids list.
-PARENT can be supplied if known.  Positioned returned is zero-indexed.
-Returns 0 if NODE is not a child of a block statement, or if NODE
-is not a statement node."
-  (let ((p (or parent (js2-node-parent node)))
-        (i 0))
-    (if (not (js2-block-node-p p))
-        i
-      (or (js2-position node (js2-block-node-kids p))
-          0))))
-
 (defsubst js2-node-short-name (n)
   "Return the short name of node N as a string, e.g. `js2-if-node'."
   (substring (symbol-name (aref n 0))
@@ -4488,25 +4464,6 @@ If NODE is the ast-root, returns nil."
       (setq node (js2-node-parent node)))
     node))
 
-(defun js2-nested-function-p (node)
-  "Return t if NODE is a nested function, or is inside a nested function."
-  (unless (js2-ast-root-p node)
-    (js2-function-node-p (if (js2-function-node-p node)
-                             (js2-node-parent-script-or-fn node)
-                           (js2-node-parent-script-or-fn
-                            (js2-node-parent-script-or-fn node))))))
-
-(defun js2-mode-shift-kids (kids start offset)
-  (dolist (kid kids)
-    (if (> (js2-node-pos kid) start)
-        (incf (js2-node-pos kid) offset))))
-
-(defun js2-mode-shift-children (parent start offset)
-  "Update start-positions of all children of PARENT beyond START."
-  (let ((root (js2-node-root parent)))
-    (js2-mode-shift-kids (js2-node-child-list parent) start offset)
-    (js2-mode-shift-kids (js2-ast-root-comments root) start offset)))
-
 (defun js2-node-is-descendant (node ancestor)
   "Return t if NODE is a descendant of ANCESTOR."
   (while (and node
@@ -4661,28 +4618,6 @@ You should use `js2-print-tree' instead of this 
function."
        (t
         (aref js2-side-effecting-tokens tt))))))
 
-(defun js2-member-expr-leftmost-name (node)
-  "For an expr such as foo.bar.baz, return leftmost node foo.
-NODE is any `js2-node' object.  If it represents a member expression,
-which is any sequence of property gets, element-gets, function calls,
-or xml descendants/filter operators, then we look at the lexically
-leftmost (first) node in the chain.  If it is a name-node we return it.
-Note that NODE can be a raw name-node and it will be returned as well.
-If NODE is not a name-node or member expression, or if it is a member
-expression whose leftmost target is not a name node, returns nil."
-  (let ((continue t)
-        result)
-    (while (and continue (not result))
-      (cond
-       ((js2-name-node-p node)
-        (setq result node))
-       ((js2-prop-get-node-p node)
-        (setq node (js2-prop-get-node-left node)))
-       ;; TODO:  handle call-nodes, xml-nodes, others?
-       (t
-        (setq continue nil))))
-    result))
-
 (defconst js2-stmt-node-types
   (list js2-BLOCK
         js2-BREAK
@@ -6032,10 +5967,6 @@ corresponding number.  Otherwise return -1."
       (js2-xml-discard-string)
       nil)))
 
-(defun js2-scanner-get-line ()
-  "Return the text of the current scan line."
-  (buffer-substring (point-at-bol) (point-at-eol)))
-
 ;;; Highlighting
 
 (defun js2-set-face (beg end face &optional record)
@@ -6049,19 +5980,6 @@ corresponding number.  Otherwise return -1."
         (push (list beg end face) js2-mode-fontifications)
       (put-text-property beg end 'font-lock-face face))))
 
-(defun js2-set-kid-face (pos kid len face)
-  "Set-face on a child node.
-POS is absolute buffer position of parent.
-KID is the child node.
-LEN is the length to fontify.
-FACE is the face to fontify with."
-  (js2-set-face (+ pos (js2-node-pos kid))
-                (+ pos (js2-node-pos kid) (js2-node-len kid))
-                face))
-
-(defsubst js2-fontify-kwd (start length)
-  (js2-set-face start (+ start length) 'font-lock-keyword-face))
-
 (defsubst js2-clear-face (beg end)
   (remove-text-properties beg end '(font-lock-face nil
                                     help-echo nil
@@ -9887,14 +9805,6 @@ If POS is non-nil, go to that point and return 
indentation for that line."
     (skip-chars-forward " \t")
     (looking-at "case\\s-.+:")))
 
-(defun js2-syntax-bol ()
-  "Return the point at the first non-whitespace char on the line.
-Returns `point-at-bol' if the line is empty."
-  (save-excursion
-    (beginning-of-line)
-    (skip-chars-forward " \t")
-    (point)))
-
 (defun js2-bounce-indent (normal-col parse-status &optional backwards)
   "Cycle among alternate computed indentation positions.
 PARSE-STATUS is the result of `parse-partial-sexp' from the beginning
@@ -10711,48 +10621,6 @@ Also moves past comment delimiters when inside 
comments."
       (skip-chars-backward " \t")
     (goto-char (point-at-eol))))
 
-(defsubst js2-mode-inside-string ()
-  "Return non-nil if inside a string.
-Actually returns the quote character that begins the string."
-  (nth 3 (syntax-ppss)))
-
-(defun js2-mode-inside-comment-or-string ()
-  "Return non-nil if inside a comment or string."
-  (or
-   (let ((comment-start
-          (save-excursion
-            (goto-char (point-at-bol))
-            (if (re-search-forward "//" (point-at-eol) t)
-                (match-beginning 0)))))
-     (and comment-start
-          (<= comment-start (point))))
-   (let ((parse-state (syntax-ppss)))
-     (or (nth 3 parse-state)
-         (nth 4 parse-state)))))
-
-
-(defun js2-insert-catch-skel (try-pos)
-  "Complete a try/catch block after inserting a { following a try keyword.
-Rationale is that a try always needs a catch or a finally, and the catch is
-the more likely of the two.
-
-TRY-POS is the buffer position of the try keyword.  The open-curly should
-already have been inserted."
-  (insert "{")
-  (let ((try-col (save-excursion
-                   (goto-char try-pos)
-                   (current-column))))
-    (insert "\n")
-    (undo-boundary)
-    (js2-indent-line) ;; indent the blank line where cursor will end up
-    (save-excursion
-      (insert "\n")
-      (indent-to try-col)
-      (insert "} catch (x) {\n\n")
-      (indent-to try-col)
-      (insert "}"))))
-
-
 (defun js2-mode-wait-for-parse (callback)
   "Invoke CALLBACK when parsing is finished.
 If parsing is already finished, calls CALLBACK immediately."

commit 67738bd56bdf9e3c3cd89bef68c4d4a11b220719
Author: Dmitry Gutov <address@hidden>
Date:   Wed Feb 27 01:36:30 2013 +0400

    Fix #87

diff --git a/js2-mode.el b/js2-mode.el
index f10019e..091e00b 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -9707,6 +9707,8 @@ statement without braces, else returns nil."
                      (skip-chars-backward " \t" (point-at-bol)))
                    (let ((pt (point)))
                      (back-to-indentation)
+                     (when (looking-at "}[ \t]*")
+                       (goto-char (match-end 0)))
                      (and (looking-at js2-possibly-braceless-keywords-re)
                           (= (match-end 0) pt)
                           (not (js2-end-of-do-while-loop-p))))))

commit e90d7c659dd4531185c78dacf376241de32fa7d1
Author: Dmitry Gutov <address@hidden>
Date:   Wed Feb 27 00:00:03 2013 +0400

    js2-insert-and-indent was unused

diff --git a/js2-mode.el b/js2-mode.el
index 1aa1d72..f10019e 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -9529,29 +9529,6 @@ of continued expressions.")
   (regexp-opt '("var" "let" "const") 'words)
   "Regular expression matching variable declaration keywords.")
 
-;; This function has horrible results if you're typing an array
-;; such as [[1, 2], [3, 4], [5, 6]].  Bounce indenting -really- sucks
-;; in conjunction with electric-indent, so just disabling it.
-(defsubst js2-code-at-bol-p ()
-  "Return t if the first character on line is non-whitespace."
-  nil)
-
-(defun js2-insert-and-indent (key)
-  "Run command bound to KEY and indent current line.
-Runs the command bound to KEY in the global keymap and indents
-the current line."
-  (interactive (list (this-command-keys)))
-  (let ((cmd (lookup-key (current-global-map) key)))
-    (if (commandp cmd)
-        (call-interactively cmd)))
-  ;; don't do the electric keys inside comments or strings,
-  ;; and don't do bounce-indent with them.
-  (let ((parse-state (syntax-ppss (point)))
-        (js2-bounce-indent-p (js2-code-at-bol-p)))
-    (unless (or (nth 3 parse-state)
-                (nth 4 parse-state))
-      (indent-according-to-mode))))
-
 (defun js2-re-search-forward-inner (regexp &optional bound count)
   "Auxiliary function for `js2-re-search-forward'."
   (let (parse saved-point)

commit 81ecc1dde62a4ed0c914ee206b0bf891e6425960
Author: Leo Liu <address@hidden>
Date:   Tue Feb 26 01:44:57 2013 +0800

    Fix #1: work around bug http://debbugs.gnu.org/13811

diff --git a/ack.el b/ack.el
index 08e077a..e6cab60 100644
--- a/ack.el
+++ b/ack.el
@@ -237,7 +237,8 @@ This gets tacked on the end of the generated expressions.")
   (let ((ack (or (car (split-string ack-command nil t)) "ack")))
     (skeleton-insert `(nil ,ack " -g '(?i:" _ ")'"))))
 
-(defvar project-root)                   ; dynamically bound in `ack'
+;; Work around bug http://debbugs.gnu.org/13811
+(defvar ack--project-root nil)          ; dynamically bound in `ack'
 
 (defun ack-skel-vc-grep ()
   "Insert a template for vc grep search."
@@ -251,7 +252,7 @@ This gets tacked on the end of the generated expressions.")
          (backend (downcase (substring which 1)))
          (cmd (or (cdr (assoc which ack-vc-grep-commands))
                   (error "No command provided for `%s grep'" backend))))
-    (setq project-root root)
+    (setq ack--project-root root)
     (delete-minibuffer-contents)
     (skeleton-insert `(nil ,cmd " '" _ "'"))))
 
@@ -311,7 +312,7 @@ Otherwise, interactively choose a directory."
            (format "Run %s in `%s': "
                    (match-string-no-properties 1)
                    (file-name-nondirectory
-                    (directory-file-name project-root)))))))))
+                    (directory-file-name ack--project-root)))))))))
 
 (defun ack-minibuffer-setup-function ()
   (shell-completion-vars)
@@ -331,7 +332,7 @@ minibuffer:
 
 \\{ack-minibuffer-local-map}"
   (interactive
-   (let ((project-root (or (funcall ack-default-directory-function
+   (let ((ack--project-root (or (funcall ack-default-directory-function
                                     current-prefix-arg)
                            default-directory))
          ;; Disable completion cycling; see http://debbugs.gnu.org/12221
@@ -341,7 +342,7 @@ minibuffer:
                                    ack-command
                                    ack-minibuffer-local-map
                                    nil 'ack-history))
-           project-root)))
+           ack--project-root)))
   (let ((default-directory (expand-file-name
                             (or directory default-directory))))
     ;; Change to the compilation buffer so that `ack-buffer-name-function' can

commit dcfe4ddaec667cd8af1827e570bc8b428ad5428d
Author: Dmitry Gutov <address@hidden>
Date:   Tue Feb 19 19:16:33 2013 +0400

    Use \\' instead of $

diff --git a/README.md b/README.md
index e7431f0..d66c69a 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ Then put js2-mode.elc into your site-lisp directory.
 In your emacs config:
 
     (autoload 'js2-mode "js2-mode" nil t)
-    (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
+    (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
 
 See <http://code.google.com/p/js2-mode/wiki/InstallationInstructions> for
 additional details.
diff --git a/js2-mode.el b/js2-mode.el
index bab5bfc..1aa1d72 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -49,7 +49,7 @@
 ;;
 ;; To install it as your major mode for JavaScript editing:
 
-;;   (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
+;;   (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
 
 ;; Alternately, to install it as a minor mode just for JavaScript linting,
 ;; you must add it to the appropriate major-mode hook.  Normally this would be:

commit 390b63293ed70673a840dcf52dd94041f242ca10
Author: Dmitry Gutov <address@hidden>
Date:   Tue Feb 19 06:18:07 2013 +0400

    Bump the date

diff --git a/js2-mode.el b/js2-mode.el
index de71592..bab5bfc 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -7,7 +7,7 @@
 ;;         Dmitry Gutov <address@hidden>
 ;; URL:  https://github.com/mooz/js2-mode/
 ;;       http://code.google.com/p/js2-mode/
-;; Version: 20130217
+;; Version: 20130219
 ;; Keywords: languages, javascript
 ;; Package-Requires: ((emacs "24.1"))
 

commit 729ef3e0cc7d1ebb0a3f0461dfa542ab24d48013
Author: Dmitry Gutov <address@hidden>
Date:   Tue Feb 19 06:12:58 2013 +0400

    Don't include Rhino externs by default, too

diff --git a/js2-mode.el b/js2-mode.el
index 8e7d073..de71592 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -812,7 +812,7 @@ See `js2-additional-externs' for more information about 
externs."
   :type 'boolean
   :group 'js2-mode)
 
-(defcustom js2-include-rhino-externs t
+(defcustom js2-include-rhino-externs nil
   "Non-nil to include Mozilla Rhino externs in the master externs list.
 See `js2-additional-externs' for more information about externs."
   :type 'boolean

commit ba49dd76036f659791be3fe78a093ec97da88b47
Author: Dmitry Gutov <address@hidden>
Date:   Tue Feb 19 06:12:06 2013 +0400

    Support Node.js externs
    
    Close #86

diff --git a/js2-mode.el b/js2-mode.el
index 20fbb84..8e7d073 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -180,6 +180,13 @@ variable `js2-include-browser-externs'.")
   "Mozilla Rhino externs.
 Set `js2-include-rhino-externs' to t to include them.")
 
+(defvar js2-node-externs
+  (mapcar 'symbol-name
+          '(__dirname __filename Buffer clearInterval clearTimeout require
+            console exports global module process setInterval setTimeout))
+  "Node.js externs.
+Set `js2-include-node-externs' to t to include them.")
+
 ;;; Variables
 
 (defun js2-mark-safe-local (name pred)
@@ -791,9 +798,9 @@ These are currently only used for highlighting undeclared 
variables,
 which only worries about top-level (unqualified) references.
 As js2-mode's processing improves, we will flesh out this list.
 
-The initial value is set to `js2-ecma-262-externs', unless you
-have set `js2-include-browser-externs', in which case the browser
-externs are also included.
+The initial value is set to `js2-ecma-262-externs', unless some
+of the `js2-include-?-externs' variables are set to t, in which
+case the browser, Rhino and/or Node.js externs are also included.
 
 See `js2-additional-externs' for more information.")
 
@@ -811,6 +818,12 @@ See `js2-additional-externs' for more information about 
externs."
   :type 'boolean
   :group 'js2-mode)
 
+(defcustom js2-include-node-externs nil
+  "Non-nil to include Node.js externs in the master externs list.
+See `js2-additional-externs' for more information about externs."
+  :type 'boolean
+  :group 'js2-mode)
+
 (js2-deflocal js2-additional-externs nil
   "A buffer-local list of additional external declarations.
 It is used to decide whether variables are considered undeclared
@@ -10144,7 +10157,8 @@ highlighting features of `js2-mode'."
   (setq js2-default-externs
         (append js2-ecma-262-externs
                 (if js2-include-browser-externs js2-browser-externs)
-                (if js2-include-rhino-externs js2-rhino-externs)))
+                (if js2-include-rhino-externs js2-rhino-externs)
+                (if js2-include-node-externs js2-node-externs)))
   ;; Experiment:  make reparse-delay longer for longer files.
   (if (plusp js2-dynamic-idle-timer-adjust)
       (setq js2-idle-timer-delay
@@ -10328,7 +10342,8 @@ Selecting an error will jump it to the corresponding 
source-buffer error.
   (setq js2-default-externs
         (append js2-ecma-262-externs
                 (if js2-include-browser-externs js2-browser-externs)
-                (if js2-include-rhino-externs js2-rhino-externs)))
+                (if js2-include-rhino-externs js2-rhino-externs)
+                (if js2-include-node-externs js2-node-externs)))
 
   (setq font-lock-defaults '(nil t))
 

commit 2ac3a72df85a0827017af119da69a3102f6c28d2
Author: Dmitry Gutov <address@hidden>
Date:   Tue Feb 19 05:51:03 2013 +0400

    js2-add-browser-externs is not defined

diff --git a/js2-mode.el b/js2-mode.el
index afc471e..20fbb84 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -801,9 +801,6 @@ See `js2-additional-externs' for more information.")
   "Non-nil to include browser externs in the master externs list.
 If you work on JavaScript files that are not intended for browsers,
 such as Mozilla Rhino server-side JavaScript, set this to nil.
-You can always include them on a per-file basis by calling
-`js2-add-browser-externs' from a function on `js2-mode-hook'.
-
 See `js2-additional-externs' for more information about externs."
   :type 'boolean
   :group 'js2-mode)

commit 2621fccb238fbfcc337cb853c2fba6a57c42d300
Author: Dmitry Gutov <address@hidden>
Date:   Tue Feb 19 05:46:21 2013 +0400

    Google Gears has been dead for a while now

diff --git a/js2-mode.el b/js2-mode.el
index eb16a41..afc471e 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -180,14 +180,6 @@ variable `js2-include-browser-externs'.")
   "Mozilla Rhino externs.
 Set `js2-include-rhino-externs' to t to include them.")
 
-(defvar js2-gears-externs
-  (mapcar 'symbol-name
-          '(
-            ;; TODO(stevey):  add these
-            ))
-  "Google Gears externs.
-Set `js2-include-gears-externs' to t to include them.")
-
 ;;; Variables
 
 (defun js2-mark-safe-local (name pred)
@@ -822,12 +814,6 @@ See `js2-additional-externs' for more information about 
externs."
   :type 'boolean
   :group 'js2-mode)
 
-(defcustom js2-include-gears-externs t
-  "Non-nil to include Google Gears externs in the master externs list.
-See `js2-additional-externs' for more information about externs."
-  :type 'boolean
-  :group 'js2-mode)
-
 (js2-deflocal js2-additional-externs nil
   "A buffer-local list of additional external declarations.
 It is used to decide whether variables are considered undeclared
@@ -10161,7 +10147,6 @@ highlighting features of `js2-mode'."
   (setq js2-default-externs
         (append js2-ecma-262-externs
                 (if js2-include-browser-externs js2-browser-externs)
-                (if js2-include-gears-externs js2-gears-externs)
                 (if js2-include-rhino-externs js2-rhino-externs)))
   ;; Experiment:  make reparse-delay longer for longer files.
   (if (plusp js2-dynamic-idle-timer-adjust)
@@ -10346,7 +10331,6 @@ Selecting an error will jump it to the corresponding 
source-buffer error.
   (setq js2-default-externs
         (append js2-ecma-262-externs
                 (if js2-include-browser-externs js2-browser-externs)
-                (if js2-include-gears-externs js2-gears-externs)
                 (if js2-include-rhino-externs js2-rhino-externs)))
 
   (setq font-lock-defaults '(nil t))

commit e861ebcbf4bfc303be5ff3866b77e791e14a08fd
Author: Dmitry Gutov <address@hidden>
Date:   Tue Feb 19 05:44:48 2013 +0400

    Add URL header and some explanation

diff --git a/js2-mode.el b/js2-mode.el
index 59dec5a..eb16a41 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -5,6 +5,8 @@
 ;; Author: Steve Yegge <address@hidden>
 ;;         mooz <address@hidden>
 ;;         Dmitry Gutov <address@hidden>
+;; URL:  https://github.com/mooz/js2-mode/
+;;       http://code.google.com/p/js2-mode/
 ;; Version: 20130217
 ;; Keywords: languages, javascript
 ;; Package-Requires: ((emacs "24.1"))
@@ -73,6 +75,10 @@
 ;; This means that `js2-mode' is currently only useful for editing JavaScript
 ;; files, and not for editing JavaScript within <script> tags or templates.
 
+;; The project page on GitHub is used for development and issue tracking.
+;; The original homepage at Google Code is mentioned here for posterity, it has
+;; outdated information and is mostly unmaintained.
+
 ;;; Code:
 
 (eval-when-compile

commit c7999fae536e0cb3af675e1ba308e4ad13497c01
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 08:21:45 2013 +0400

    Remove leftover make-obsolete-variable statement

diff --git a/js2-mode.el b/js2-mode.el
index 1543943..59dec5a 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -219,8 +219,6 @@ Similar to `c-basic-offset'."
   :type 'integer)
 (js2-mark-safe-local 'js2-basic-offset 'integerp)
 
-(make-obsolete-variable 'js2-auto-indent-p 'electric-indent-mode "1.0")
-
 (defcustom js2-bounce-indent-p nil
   "Non-nil to have indent-line function choose among alternatives.
 If nil, the indent-line function will indent to a predetermined column

commit 2f274258aeb4a66e16d3f90bec40b00b6f080dff
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 08:18:50 2013 +0400

    Update copyright notice; switch back to date-based versioning
    
    The latter, by popular demand. Apparently, 2009xxxx > 1.1, so this change 
will
    make the users of the old js2-mode who installed it through package.el (and 
who
    don't use Melpa) definitely notice the new version.

diff --git a/js2-mode.el b/js2-mode.el
index cf0402c..1543943 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -1,11 +1,11 @@
 ;;; js2-mode.el --- Improved JavaScript editing mode
 
-;; Copyright (C) 2009, 2011, 2012  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011-2013  Free Software Foundation, Inc.
 
 ;; Author: Steve Yegge <address@hidden>
 ;;         mooz <address@hidden>
 ;;         Dmitry Gutov <address@hidden>
-;; Version: 1.1
+;; Version: 20130217
 ;; Keywords: languages, javascript
 ;; Package-Requires: ((emacs "24.1"))
 

commit cdd25bb4c7723ee0f10c59f0afd8e7a75fd4d031
Merge: ef7de01 807010e
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 08:05:13 2013 +0400

    Merge branch 'emacs24'
    
    Emacs 24-only code is now master, for legacy check out emacs23.
    
    The commit log is going to have a lot of duplicates, sorry about that.
    Still, this way, many users can do a fast-forward merge.

diff --cc js2-mode.el
index d23d8a1,0b5947f..cf0402c
--- a/js2-mode.el
+++ b/js2-mode.el
@@@ -209,22 -219,6 +219,7 @@@ Similar to `c-basic-offset'.
    :type 'integer)
  (js2-mark-safe-local 'js2-basic-offset 'integerp)
  
- ;; TODO(stevey):  move this code into a separate minor mode.
- (defcustom js2-mirror-mode nil
-   "Non-nil to insert closing brackets, parens, etc. automatically."
-   :group 'js2-mode
-   :type 'boolean)
- 
- (make-obsolete-variable 'js2-mirror-mode 'electric-pair-mode "1.0")
- 
- (defcustom js2-auto-indent-p nil
-   "Automatic indentation with punctuation characters.
- If non-nil, the current line is indented when certain punctuations
- are inserted."
-   :group 'js2-mode
-   :type 'boolean)
- 
 +(make-obsolete-variable 'js2-auto-indent-p 'electric-indent-mode "1.0")
  
  (defcustom js2-bounce-indent-p nil
    "Non-nil to have indent-line function choose among alternatives.

commit 807010e5ebfe9e3501e679f17cfd5ba3217db870
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 07:47:08 2013 +0400

    Link to branch emacs23

diff --git a/README.md b/README.md
index bb574f8..ba5bb50 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ additional details.
 Emacs 22 and 23
 ===============
 
-This version requires Emacs 24. For backwards-compatible version, check out 
the [`master` branch](https://github.com/mooz/js2-mode/tree/master).
+This version requires Emacs 24. For a backward compatible version, check out 
the branch [emacs23](https://github.com/mooz/js2-mode/tree/emacs23).
 
 Bugs
 ====

commit c3b45e3d3375f8ecd7f30060432a0265ab93d2db
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 07:41:17 2013 +0400

    Remove link to js2-highlight-vars-mode, add one to skewer-mode

diff --git a/README.md b/README.md
index 833c798..bb574f8 100644
--- a/README.md
+++ b/README.md
@@ -38,5 +38,5 @@ See Also
 
 Some third-party modes that use the generated syntax tree:
 
-* 
[js2-highlight-vars-mode](http://mihai.bazon.net/projects/editing-javascript-with-emacs-js2-mode/js2-highlight-vars-mode)
 * [js2-refactor](https://github.com/magnars/js2-refactor.el)
+* [skewer-mode](https://github.com/skeeto/skewer-mode)

commit ef7de01af0262c366b3e7fffb615bbddd43a1e88
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 07:41:17 2013 +0400

    Remove link to js2-highlight-vars-mode, add one to skewer-mode

diff --git a/README.md b/README.md
index eba462c..4867219 100644
--- a/README.md
+++ b/README.md
@@ -37,5 +37,5 @@ See Also
 
 Some third-party modes that use the generated syntax tree:
 
-* 
[js2-highlight-vars-mode](http://mihai.bazon.net/projects/editing-javascript-with-emacs-js2-mode/js2-highlight-vars-mode)
 * [js2-refactor](https://github.com/magnars/js2-refactor.el)
+* [skewer-mode](https://github.com/skeeto/skewer-mode)

commit 65854534288acb77e47bc45ed407a8e282332438
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 07:28:03 2013 +0400

    Change the wiki link

diff --git a/README.md b/README.md
index 82c9b52..eba462c 100644
--- a/README.md
+++ b/README.md
@@ -3,8 +3,7 @@ Description
 
 An improved JavaScript mode for GNU Emacs. Forked from 
<http://code.google.com/p/js2-mode/>.
 
-For some of the user-visible changes, see
-[Changes from the original 
mode](https://github.com/mooz/js2-mode/wiki/Changes-from-the-original-mode).
+For some of the latest changes, see [latest user-visible 
changes](https://github.com/mooz/js2-mode/wiki/Latest-user-visible-changes).
 
 Installation
 ======

commit eca4241cb8f0f972b12ec0eda1537605dc28458a
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 07:28:03 2013 +0400

    Change the wiki link

diff --git a/README.md b/README.md
index a8f5ac8..833c798 100644
--- a/README.md
+++ b/README.md
@@ -3,8 +3,7 @@ Description
 
 An improved JavaScript mode for GNU Emacs. Forked from 
<http://code.google.com/p/js2-mode/>.
 
-For some of the user-visible changes, see
-[Changes from the original 
mode](https://github.com/mooz/js2-mode/wiki/Changes-from-the-original-mode).
+For some of the latest changes, see [latest user-visible 
changes](https://github.com/mooz/js2-mode/wiki/Latest-user-visible-changes).
 
 Installation
 ======

commit 624f5e661849ac91d53afbb333403114eee4ecfb
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 07:14:38 2013 +0400

    keywords-as-property-names is also valid JS 5.1
    
    Refs #41

diff --git a/js2-mode.el b/js2-mode.el
index b1e0e21..0b5947f 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -360,7 +360,7 @@ Examples:
   var foo = {int: 5, while: 6, continue: 7};
   foo.return = 8;
 
-Ecma-262 forbids this syntax, but many browsers support it."
+Ecma-262 5.1 allows this syntax, but some engines still don't."
   :type 'boolean
   :group 'js2-mode)
 

commit bfb482fd6b4ad4c14ddfd23546f44df628b0c1a7
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 07:14:38 2013 +0400

    keywords-as-property-names is also valid JS 5.1
    
    Refs #41

diff --git a/js2-mode.el b/js2-mode.el
index e56f3cd..d23d8a1 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -405,7 +405,7 @@ Examples:
   var foo = {int: 5, while: 6, continue: 7};
   foo.return = 8;
 
-Ecma-262 forbids this syntax, but many browsers support it."
+Ecma-262 5.1 allows this syntax, but some engines still don't."
   :type 'boolean
   :group 'js2-mode)
 

commit 6d7b67ece15c78c43ff5ef1cca556def20356bb1
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 06:52:05 2013 +0400

    Trailing comma is legal ecma-262-5.1
    
    Fixes #85

diff --git a/js2-mode.el b/js2-mode.el
index de465f1..e56f3cd 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -337,8 +337,7 @@ even if this flag is non-nil."
 
 (defcustom js2-strict-trailing-comma-warning t
   "Non-nil to warn about trailing commas in array literals.
-Ecma-262 forbids them, but many browsers permit them.  IE is the
-big exception, and can produce bugs if you have trailing commas."
+Ecma-262-5.1 allows them, but older versions of IE raise an error."
   :type 'boolean
   :group 'js2-mode)
 
@@ -1748,7 +1747,7 @@ the correct number of ARGS must be provided."
          "Code has no side effects")
 
 (js2-msg "msg.extra.trailing.comma"
-         "Trailing comma is not legal in an ECMA-262 object initializer")
+         "Trailing comma is not supported in some browsers")
 
 (js2-msg "msg.array.trailing.comma"
          "Trailing comma yields different behavior across browsers")

commit fc2fa199996b6253bf510308569c7afe8b009d2b
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 17 06:52:05 2013 +0400

    Trailing comma is legal ecma-262-5.1
    
    Fixes #85

diff --git a/js2-mode.el b/js2-mode.el
index 69eac43..b1e0e21 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -292,8 +292,7 @@ even if this flag is non-nil."
 
 (defcustom js2-strict-trailing-comma-warning t
   "Non-nil to warn about trailing commas in array literals.
-Ecma-262 forbids them, but many browsers permit them.  IE is the
-big exception, and can produce bugs if you have trailing commas."
+Ecma-262-5.1 allows them, but older versions of IE raise an error."
   :type 'boolean
   :group 'js2-mode)
 
@@ -1664,7 +1663,7 @@ the correct number of ARGS must be provided."
          "Code has no side effects")
 
 (js2-msg "msg.extra.trailing.comma"
-         "Trailing comma is not legal in an ECMA-262 object initializer")
+         "Trailing comma is not supported in some browsers")
 
 (js2-msg "msg.array.trailing.comma"
          "Trailing comma yields different behavior across browsers")

commit 214e28d45b679b6538f8206d6af7be6935dd3038
Author: Leo Liu <address@hidden>
Date:   Thu Feb 14 15:34:19 2013 +0800

    Use setq-local

diff --git a/ack.el b/ack.el
index 8f89873..08e077a 100644
--- a/ack.el
+++ b/ack.el
@@ -32,6 +32,11 @@
 (require 'ansi-color)
 (autoload 'shell-completion-vars "shell")
 
+(eval-when-compile
+  (unless (fboundp 'setq-local)
+    (defmacro setq-local (var val)
+      (list 'set (list 'make-local-variable (list 'quote var)) val))))
+
 (defgroup ack nil
   "Run `ack' and display the results."
   :group 'tools
@@ -196,23 +201,21 @@ This gets tacked on the end of the generated 
expressions.")
   (when (string-match-p "^[ \t]*hg[ \t]" (car compilation-arguments))
     (setq compilation-error-regexp-alist
           '(("^\\(.+?:[0-9]+:\\)\\(?:\\([0-9]+\\):\\)?" 1 2)))
-    (make-local-variable 'compilation-parse-errors-filename-function)
-    (setq compilation-parse-errors-filename-function
-          (lambda (file)
-            (save-match-data
-              (if (string-match "\\(.+\\):\\([0-9]+\\):" file)
-                  (match-string 1 file)
-                file)))))
+    (setq-local compilation-parse-errors-filename-function
+                (lambda (file)
+                  (save-match-data
+                    (if (string-match "\\(.+\\):\\([0-9]+\\):" file)
+                        (match-string 1 file)
+                      file)))))
   ;; Handle `bzr grep' output
   (when (string-match-p "^[ \t]*bzr[ \t]" (car compilation-arguments))
-    (make-local-variable 'compilation-parse-errors-filename-function)
-    (setq compilation-parse-errors-filename-function
-          (lambda (file)
-            (save-match-data
-              ;; 'bzr grep -r' has files like `termcolor.py~147'
-              (if (string-match "\\(.+\\)~\\([0-9]+\\)" file)
-                  (match-string 1 file)
-                file))))))
+    (setq-local compilation-parse-errors-filename-function
+                (lambda (file)
+                  (save-match-data
+                    ;; 'bzr grep -r' has files like `termcolor.py~147'
+                    (if (string-match "\\(.+\\)~\\([0-9]+\\)" file)
+                        (match-string 1 file)
+                      file))))))
 
 (defun ack-mode-display-match ()
   "Display in another window the match in current line."
@@ -222,9 +225,8 @@ This gets tacked on the end of the generated expressions.")
 
 (define-compilation-mode ack-mode "Ack"
   "A compilation mode tailored for ack."
-  (set (make-local-variable 'compilation-disable-input) t)
-  (set (make-local-variable 'compilation-error-face)
-       'compilation-info)
+  (setq-local compilation-disable-input t)
+  (setq-local compilation-error-face 'compilation-info)
   (add-hook 'compilation-filter-hook 'ack-filter nil t)
   (define-key ack-mode-map "\C-o" #'ack-mode-display-match))
 

commit f66b9811b330f1748cb0093270345291f88419a8
Author: Leo Liu <address@hidden>
Date:   Wed Feb 13 16:02:44 2013 +0800

    Enhance minibuffer prompt update feature
    
    New user variable ack-minibuffer-setup-hook.

diff --git a/ack.el b/ack.el
index 586eabd..8f89873 100644
--- a/ack.el
+++ b/ack.el
@@ -89,6 +89,11 @@ Used by `ack-guess-project-root'."
   :type '(repeat string)
   :group 'ack)
 
+(defcustom ack-minibuffer-setup-hook nil
+  "Ack-specific hook for `minibuffer-setup-hook'."
+  :type 'hook
+  :group 'ack)
+
 ;;; ======== END of USER OPTIONS ========
 
 (defvar ack-history nil "History list for ack.")
@@ -223,13 +228,6 @@ This gets tacked on the end of the generated expressions.")
   (add-hook 'compilation-filter-hook 'ack-filter nil t)
   (define-key ack-mode-map "\C-o" #'ack-mode-display-match))
 
-(defun ack-update-minibuffer-prompt (prompt)
-  "Visually replace minibuffer prompt with PROMPT."
-  (when (minibufferp)
-    (let ((inhibit-read-only t))
-      (put-text-property
-       (point-min) (minibuffer-prompt-end) 'display prompt))))
-
 (defun ack-skel-file ()
   "Insert a template for case-insensitive file name search."
   (interactive)
@@ -252,9 +250,6 @@ This gets tacked on the end of the generated expressions.")
          (cmd (or (cdr (assoc which ack-vc-grep-commands))
                   (error "No command provided for `%s grep'" backend))))
     (setq project-root root)
-    (ack-update-minibuffer-prompt
-     (format "Run %s grep in `%s': " backend
-             (file-name-nondirectory (directory-file-name project-root))))
     (delete-minibuffer-contents)
     (skeleton-insert `(nil ,cmd " '" _ "'"))))
 
@@ -302,6 +297,27 @@ Otherwise, interactively choose a directory."
         (ack-default-directory '(16))))
    (t (read-directory-name "In directory: " nil nil t))))
 
+(defun ack-update-minibuffer-prompt (&optional _beg _end _len)
+  (when (minibufferp)
+    (let ((inhibit-read-only t))
+      (save-excursion
+        (goto-char (minibuffer-prompt-end))
+        (when (looking-at "\\(\\w+\\)\\s-")
+          (put-text-property
+           (point-min) (minibuffer-prompt-end)
+           'display
+           (format "Run %s in `%s': "
+                   (match-string-no-properties 1)
+                   (file-name-nondirectory
+                    (directory-file-name project-root)))))))))
+
+(defun ack-minibuffer-setup-function ()
+  (shell-completion-vars)
+  (add-hook 'after-change-functions
+            #'ack-update-minibuffer-prompt nil t)
+  (ack-update-minibuffer-prompt)
+  (run-hooks 'ack-minibuffer-setup-hook))
+
 ;;;###autoload
 (defun ack (command-args &optional directory)
   "Run ack using COMMAND-ARGS and collect output in a buffer.
@@ -318,12 +334,11 @@ minibuffer:
                            default-directory))
          ;; Disable completion cycling; see http://debbugs.gnu.org/12221
          (completion-cycle-threshold nil))
-     (list (minibuffer-with-setup-hook 'shell-completion-vars
-             (read-from-minibuffer
-              (format "Run ack in `%s': "
-                      (file-name-nondirectory
-                       (directory-file-name project-root)))
-              ack-command ack-minibuffer-local-map nil 'ack-history))
+     (list (minibuffer-with-setup-hook 'ack-minibuffer-setup-function
+             (read-from-minibuffer "Ack: "
+                                   ack-command
+                                   ack-minibuffer-local-map
+                                   nil 'ack-history))
            project-root)))
   (let ((default-directory (expand-file-name
                             (or directory default-directory))))

commit cd4a73fa21cfc6764a21cad41647a93954d940a4
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 10 10:02:06 2013 +0400

    Mark the obsolete variables as such
    
    Close #80

diff --git a/js2-mode.el b/js2-mode.el
index 2074173..de465f1 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -215,6 +215,8 @@ Similar to `c-basic-offset'."
   :group 'js2-mode
   :type 'boolean)
 
+(make-obsolete-variable 'js2-mirror-mode 'electric-pair-mode "1.0")
+
 (defcustom js2-auto-indent-p nil
   "Automatic indentation with punctuation characters.
 If non-nil, the current line is indented when certain punctuations
@@ -222,6 +224,8 @@ are inserted."
   :group 'js2-mode
   :type 'boolean)
 
+(make-obsolete-variable 'js2-auto-indent-p 'electric-indent-mode "1.0")
+
 (defcustom js2-bounce-indent-p nil
   "Non-nil to have indent-line function choose among alternatives.
 If nil, the indent-line function will indent to a predetermined column
@@ -259,24 +263,32 @@ This is unusual for Emacs modes but common in IDEs like 
Eclipse."
   :type 'boolean
   :group 'js2-mode)
 
+(make-obsolete-variable 'js2-indent-on-enter-key nil "1.0")
+
 (defcustom js2-enter-indents-newline nil
   "Non-nil to have Enter/Return key indent the newly-inserted line.
 This is unusual for Emacs modes but common in IDEs like Eclipse."
   :type 'boolean
   :group 'js2-mode)
 
+(make-obsolete-variable 'js2-enter-indents-newline nil "1.0")
+
 (defcustom js2-rebind-eol-bol-keys t
   "Non-nil to rebind `beginning-of-line' and `end-of-line' keys.
 If non-nil, bounce between bol/eol and first/last non-whitespace char."
   :group 'js2-mode
   :type 'boolean)
 
+(make-obsolete-variable 'js2-rebind-eol-bol-keys nil "1.0")
+
 (defcustom js2-electric-keys '("{" "}" "(" ")" "[" "]" ":" ";" "," "*")
   "Keys that auto-indent when `js2-auto-indent-p' is non-nil.
 Each value in the list is passed to `define-key'."
   :type 'list
   :group 'js2-mode)
 
+(make-obsolete-variable 'js2-electric-keys 'electric-indent-chars "1.0")
+
 (defcustom js2-idle-timer-delay 0.2
   "Delay in secs before re-parsing after user makes changes.
 Multiplied by `js2-dynamic-idle-timer-adjust', which see."
@@ -302,6 +314,8 @@ If `js2-dynamic-idle-timer-adjust' is 0 or negative,
   :type 'boolean
   :group 'js2-mode)
 
+(make-obsolete-variable 'js2-mode-escape-quotes nil "1.0")
+
 (defcustom js2-concat-multiline-strings t
   "Non-nil to automatically turn a newline in mid-string into a
 string concatenation.  When `eol', the '+' will be inserted at the
@@ -407,6 +421,8 @@ This is useful for xulrunner apps."
   :type 'boolean
   :group 'js2-mode)
 
+(make-obsolete-variable 'js2-cleanup-whitespace 'before-save-hook "1.0")
+
 (defcustom js2-move-point-on-right-click t
   "Non-nil to move insertion point when you right-click.
 This makes right-click context menu behavior a bit more intuitive,

commit d6d936c7a272ebce700be845d7e54e7d917afdec
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 10 09:03:53 2013 +0400

    Make sure js2-mode-ast is available for callbacks

diff --git a/js2-imenu-extras.el b/js2-imenu-extras.el
index f9215a4..3061905 100644
--- a/js2-imenu-extras.el
+++ b/js2-imenu-extras.el
@@ -104,8 +104,6 @@ prefix any functions defined inside the IIFE with the 
module name."
   (when (or js2-imenu-show-other-functions js2-imenu-show-module-pattern)
     (add-to-list 'js2-post-parse-callbacks 'js2-imenu-walk-ast t)))
 
-(declare (special root))
-
 (defun js2-imenu-record-declarations ()
   (let* ((styles (loop for style in js2-imenu-extension-styles
                        when (memq (plist-get style :framework)
@@ -113,9 +111,7 @@ prefix any functions defined inside the IIFE with the 
module name."
                        collect style))
          (re (mapconcat (lambda (style)
                           (concat "\\(" (plist-get style :call-re) "\\)"))
-                        styles "\\|"))
-         ;; Dynamic scoping. Ew.
-         (js2-mode-ast root))
+                        styles "\\|")))
     (goto-char (point-min))
     (while (js2-re-search-forward re nil t)
       (loop for i from 0 to (1- (length styles))
@@ -163,7 +159,7 @@ prefix any functions defined inside the IIFE with the 
module name."
 
 (defun js2-imenu-walk-ast ()
   (js2-visit-ast
-   root
+   js2-mode-ast
    (lambda (node end-p)
      (unless end-p
        (cond
diff --git a/js2-mode.el b/js2-mode.el
index 5502730..2074173 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -879,7 +879,7 @@ externs appropriate for the specific file, perhaps based on 
its path.
 These should go in `js2-additional-externs', which is buffer-local.
 
 Finally, you can add a function to `js2-post-parse-callbacks',
-which is called after parsing completes, and `root' is bound to
+which is called after parsing completes, and `js2-mode-ast' is bound to
 the root of the parse tree.  At this stage you can set up an AST
 node visitor using `js2-visit-ast' and examine the parse tree
 for specific import patterns that may imply the existence of
@@ -7384,6 +7384,7 @@ Scanner should be initialized."
         (push comment (js2-ast-root-comments root))
         (js2-node-add-children root comment)))
     (setf (js2-node-len root) (- end pos))
+    (setq js2-mode-ast root)  ; Make sure this is available for callbacks.
     ;; Give extensions a chance to muck with things before highlighting starts.
     (let ((js2-additional-externs js2-additional-externs))
       (dolist (callback js2-post-parse-callbacks)
@@ -10608,7 +10609,7 @@ buffer will only rebuild its `js2-mode-ast' if the 
buffer is dirty."
                     (js2-time
                      (setq interrupted-p
                            (catch 'interrupted
-                             (setq js2-mode-ast (js2-parse))
+                             (js2-parse)
                              ;; if parsing is interrupted, comments and regex
                              ;; literals stay ignored by `parse-partial-sexp'
                              (remove-text-properties (point-min) (point-max)

commit 91a2895d72470c81e67bf40227bbcaa615d8894c
Author: Dmitry Gutov <address@hidden>
Date:   Sun Feb 10 09:03:53 2013 +0400

    Make sure js2-mode-ast is available for callbacks

diff --git a/js2-imenu-extras.el b/js2-imenu-extras.el
index f9215a4..3061905 100644
--- a/js2-imenu-extras.el
+++ b/js2-imenu-extras.el
@@ -104,8 +104,6 @@ prefix any functions defined inside the IIFE with the 
module name."
   (when (or js2-imenu-show-other-functions js2-imenu-show-module-pattern)
     (add-to-list 'js2-post-parse-callbacks 'js2-imenu-walk-ast t)))
 
-(declare (special root))
-
 (defun js2-imenu-record-declarations ()
   (let* ((styles (loop for style in js2-imenu-extension-styles
                        when (memq (plist-get style :framework)
@@ -113,9 +111,7 @@ prefix any functions defined inside the IIFE with the 
module name."
                        collect style))
          (re (mapconcat (lambda (style)
                           (concat "\\(" (plist-get style :call-re) "\\)"))
-                        styles "\\|"))
-         ;; Dynamic scoping. Ew.
-         (js2-mode-ast root))
+                        styles "\\|")))
     (goto-char (point-min))
     (while (js2-re-search-forward re nil t)
       (loop for i from 0 to (1- (length styles))
@@ -163,7 +159,7 @@ prefix any functions defined inside the IIFE with the 
module name."
 
 (defun js2-imenu-walk-ast ()
   (js2-visit-ast
-   root
+   js2-mode-ast
    (lambda (node end-p)
      (unless end-p
        (cond
diff --git a/js2-mode.el b/js2-mode.el
index 702b32c..69eac43 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -843,7 +843,7 @@ externs appropriate for the specific file, perhaps based on 
its path.
 These should go in `js2-additional-externs', which is buffer-local.
 
 Finally, you can add a function to `js2-post-parse-callbacks',
-which is called after parsing completes, and `root' is bound to
+which is called after parsing completes, and `js2-mode-ast' is bound to
 the root of the parse tree.  At this stage you can set up an AST
 node visitor using `js2-visit-ast' and examine the parse tree
 for specific import patterns that may imply the existence of
@@ -7187,6 +7187,7 @@ Scanner should be initialized."
         (push comment (js2-ast-root-comments root))
         (js2-node-add-children root comment)))
     (setf (js2-node-len root) (- end pos))
+    (setq js2-mode-ast root)  ; Make sure this is available for callbacks.
     ;; Give extensions a chance to muck with things before highlighting starts.
     (let ((js2-additional-externs js2-additional-externs))
       (save-excursion
@@ -10448,7 +10449,7 @@ buffer will only rebuild its `js2-mode-ast' if the 
buffer is dirty."
                     (js2-time
                      (setq interrupted-p
                            (catch 'interrupted
-                             (setq js2-mode-ast (js2-parse))
+                             (js2-parse)
                              ;; if parsing is interrupted, comments and regex
                              ;; literals stay ignored by `parse-partial-sexp'
                              (remove-text-properties (point-min) (point-max)

commit 2273af9f6bc85e7244f5229d9a53ae5a1d197eb0
Author: Leo Liu <address@hidden>
Date:   Thu Feb 7 22:50:42 2013 +0800

    Bump version number to 0.9

diff --git a/README.rst b/README.rst
index cc3ec52..df1e75a 100644
--- a/README.rst
+++ b/README.rst
@@ -12,7 +12,7 @@ From http://betterthangrep.com/
 
 This package is part of `GNU ELPA <http://elpa.gnu.org>`_.
 
-Feature requests and bug reports are welcome. Thanks.
+Patches, feature requests and bug reports are welcome. Thanks.
 
 Features
 --------
diff --git a/ack.el b/ack.el
index 2c7493e..586eabd 100644
--- a/ack.el
+++ b/ack.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2012, 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.8
+;; Version: 0.9
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
 ;; URL: https://github.com/leoliu/ack-el

commit 5f9278407351f5b8143b9f989e152723d1fbcc40
Author: Leo Liu <address@hidden>
Date:   Thu Feb 7 16:24:01 2013 +0800

    Fix thinko

diff --git a/ack.el b/ack.el
index 2033c95..2c7493e 100644
--- a/ack.el
+++ b/ack.el
@@ -179,8 +179,8 @@ This gets tacked on the end of the generated expressions.")
      nil nil (4 compilation-column-face nil t))
     ;; none grouping line (--nogroup or --noheading)
     
("^\\(.+?\\)\\(:\\|-\\)\\([1-9][0-9]*\\)\\2\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
-     (1 3 (ack--column-start . ack--column-end)
-        nil nil (4 compilation-column-face nil t)))
+     1 3 (ack--column-start . ack--column-end)
+     nil nil (4 compilation-column-face nil t))
     ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
   "Ack version of `compilation-error-regexp-alist' (which see).")
 

commit a13e76c84739db1849169efbaf6112626ce720f5
Author: Leo Liu <address@hidden>
Date:   Thu Feb 7 14:53:46 2013 +0800

    New command C-o (ack-mode-display-match) for ack-mode

diff --git a/ack.el b/ack.el
index 22511e9..2033c95 100644
--- a/ack.el
+++ b/ack.el
@@ -209,12 +209,19 @@ This gets tacked on the end of the generated 
expressions.")
                   (match-string 1 file)
                 file))))))
 
+(defun ack-mode-display-match ()
+  "Display in another window the match in current line."
+  (interactive)
+  (setq compilation-current-error (point))
+  (next-error-no-select 0))
+
 (define-compilation-mode ack-mode "Ack"
   "A compilation mode tailored for ack."
   (set (make-local-variable 'compilation-disable-input) t)
   (set (make-local-variable 'compilation-error-face)
        'compilation-info)
-  (add-hook 'compilation-filter-hook 'ack-filter nil t))
+  (add-hook 'compilation-filter-hook 'ack-filter nil t)
+  (define-key ack-mode-map "\C-o" #'ack-mode-display-match))
 
 (defun ack-update-minibuffer-prompt (prompt)
   "Visually replace minibuffer prompt with PROMPT."

commit d74c943aad4b5957ba22fa22ecc026a36c5c1237
Author: Leo Liu <address@hidden>
Date:   Thu Feb 7 14:21:47 2013 +0800

    Remove emacs 23 support in 'master' branch

diff --git a/README.rst b/README.rst
index f0c656a..cc3ec52 100644
--- a/README.rst
+++ b/README.rst
@@ -21,7 +21,6 @@ Features
 - Handle colors using the standard library ``ansi-color.el``
 - Completion for ack options while reading from the minibuffer
 - Support ``git grep``, ``hg grep`` and ``bzr grep``
-- Support both emacs 23 and 24
 
 Screenshots
 -----------
@@ -85,6 +84,12 @@ key bindings may be useful:
   the minibuffer
 - ``TAB`` => completion for ack options
 
+Emacs23
+-------
+
+Check out the `emacs23
+<https://github.com/leoliu/ack-el/tree/emacs23>`_ branch.
+
 Bugs
 ----
 
diff --git a/ack.el b/ack.el
index 6b1655d..22511e9 100644
--- a/ack.el
+++ b/ack.el
@@ -1,4 +1,4 @@
-;;; ack.el --- Emacs interface to ack
+;;; ack.el --- Emacs interface to ack           -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2012, 2013  Free Software Foundation, Inc.
 
@@ -30,8 +30,7 @@
 
 (require 'compile)
 (require 'ansi-color)
-(when (>= emacs-major-version 24)
-  (autoload 'shell-completion-vars "shell"))
+(autoload 'shell-completion-vars "shell")
 
 (defgroup ack nil
   "Run `ack' and display the results."
@@ -129,10 +128,6 @@ This function is called from `compilation-filter-hook'."
   "Additional things to highlight in ack output.
 This gets tacked on the end of the generated expressions.")
 
-(when (< emacs-major-version 24)
-  (defvar ack--column-start 'ack--column-start)
-  (defvar ack--column-end 'ack--column-end))
-
 (defun ack--column-start ()
   (or (let* ((beg (match-end 0))
              (end (save-excursion
@@ -171,48 +166,11 @@ This gets tacked on the end of the generated 
expressions.")
                        (min (1+ (line-end-position)) (point-max)) 'ack-file 
file)
     (list file)))
 
-;;; For emacs < 24
-(when (< emacs-major-version 24)
-  (defun ack--line (file col)
-    (if (string-match-p "\\`[1-9][0-9]*\\'" (car file))
-        (let ((has-ansi-color (overlays-at (match-beginning 1))))
-          ;; See `compilation-mode-font-lock-keywords' where there is
-          ;; overriding font-locking of FILE. Thus use the display
-          ;; property here to avoid being overridden.
-          (put-text-property
-           (match-beginning 1) (match-end 1)
-           'display
-           (propertize (match-string-no-properties 1)
-                       'face (list (and (not has-ansi-color)
-                                        compilation-line-face)
-                                   :weight 'normal :inherit 'underline)))
-          (list nil (ack--file)
-                (string-to-number (match-string 1))
-                (1- (string-to-number (match-string 3)))))
-      (put-text-property (match-beginning 3)
-                         (match-end 3)
-                         'font-lock-face compilation-line-face)
-      (list nil file
-            (string-to-number (match-string 3))
-            (when (match-string 4)
-              (put-text-property (match-beginning 4)
-                                 (match-end 4)
-                                 'font-lock-face compilation-column-face)
-              (1- (string-to-number (match-string 4))))))))
-
-;;; In emacs-24 and above, `compilation-mode-font-lock-keywords' ->
+;;; `compilation-mode-font-lock-keywords' ->
 ;;; `compilation--ensure-parse' -> `compilation--parse-region' ->
 ;;; `compilation-parse-errors' -> `compilation-error-properties'.
 ;;; `compilation-error-properties' returns nil if a previous pattern
 ;;; in the regexp alist has already been applied in a region.
-;;;
-;;; In emacs-23, `ack-regexp-alist' is a part of `font-lock-keywords'
-;;; after some transformation, so later entries can override earlier
-;;; entries.
-;;;
-;;; The output of 'ack --group --column WHATEVER' matches both regexps
-;;; in `ack-regexp-alist' and this fails emacs-23 in finding the right
-;;; file. So ack--line is used to disambiguate this case.
 
 (defconst ack-error-regexp-alist
   `(;; grouping line (--group or --heading)
@@ -221,15 +179,11 @@ This gets tacked on the end of the generated 
expressions.")
      nil nil (4 compilation-column-face nil t))
     ;; none grouping line (--nogroup or --noheading)
     
("^\\(.+?\\)\\(:\\|-\\)\\([1-9][0-9]*\\)\\2\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
-     ,@(if (>= emacs-major-version 24)
-           '(1 3 (ack--column-start . ack--column-end)
-               nil nil (4 compilation-column-face nil t))
-         '(1 ack--line 4)))
+     (1 3 (ack--column-start . ack--column-end)
+        nil nil (4 compilation-column-face nil t)))
     ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
   "Ack version of `compilation-error-regexp-alist' (which see).")
 
-(defvar ack--ansi-color-last-marker)
-
 (defvar ack-process-setup-function 'ack-process-setup)
 
 (defun ack-process-setup ()
@@ -237,8 +191,6 @@ This gets tacked on the end of the generated expressions.")
   (when (string-match-p "^[ \t]*hg[ \t]" (car compilation-arguments))
     (setq compilation-error-regexp-alist
           '(("^\\(.+?:[0-9]+:\\)\\(?:\\([0-9]+\\):\\)?" 1 2)))
-    (when (< emacs-major-version 24)
-      (setq font-lock-keywords (compilation-mode-font-lock-keywords)))
     (make-local-variable 'compilation-parse-errors-filename-function)
     (setq compilation-parse-errors-filename-function
           (lambda (file)
@@ -262,16 +214,7 @@ This gets tacked on the end of the generated expressions.")
   (set (make-local-variable 'compilation-disable-input) t)
   (set (make-local-variable 'compilation-error-face)
        'compilation-info)
-  (if (>= emacs-major-version 24)
-      (add-hook 'compilation-filter-hook 'ack-filter nil t)
-    (set (make-local-variable 'ack--ansi-color-last-marker)
-         (point-min-marker))
-    (font-lock-add-keywords
-     nil '(((lambda (limit)
-              (let ((beg (marker-position ack--ansi-color-last-marker)))
-                (move-marker ack--ansi-color-last-marker limit)
-                (ansi-color-apply-on-region beg ack--ansi-color-last-marker))
-              nil))))))
+  (add-hook 'compilation-filter-hook 'ack-filter nil t))
 
 (defun ack-update-minibuffer-prompt (prompt)
   "Visually replace minibuffer prompt with PROMPT."
@@ -285,7 +228,7 @@ This gets tacked on the end of the generated expressions.")
   (interactive)
   (delete-minibuffer-contents)
   (let ((ack (or (car (split-string ack-command nil t)) "ack")))
-    (skeleton-insert '(nil ack " -g '(?i:" _ ")'"))))
+    (skeleton-insert `(nil ,ack " -g '(?i:" _ ")'"))))
 
 (defvar project-root)                   ; dynamically bound in `ack'
 
@@ -306,7 +249,7 @@ This gets tacked on the end of the generated expressions.")
      (format "Run %s grep in `%s': " backend
              (file-name-nondirectory (directory-file-name project-root))))
     (delete-minibuffer-contents)
-    (skeleton-insert '(nil cmd " '" _ "'"))))
+    (skeleton-insert `(nil ,cmd " '" _ "'"))))
 
 (defun ack-yank-symbol-at-point ()
   "Yank the symbol from the window before entering the minibuffer."
@@ -321,9 +264,7 @@ This gets tacked on the end of the generated expressions.")
 (defvar ack-minibuffer-local-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map minibuffer-local-map)
-    (define-key map "\t" (if (>= emacs-major-version 24)
-                             'completion-at-point
-                           'pcomplete))
+    (define-key map "\t" 'completion-at-point)
     (define-key map "\M-I" 'ack-skel-file)
     (define-key map "\M-G" 'ack-skel-vc-grep)
     (define-key map "\M-Y" 'ack-yank-symbol-at-point)
@@ -370,9 +311,7 @@ minibuffer:
                            default-directory))
          ;; Disable completion cycling; see http://debbugs.gnu.org/12221
          (completion-cycle-threshold nil))
-     (list (minibuffer-with-setup-hook (if (>= emacs-major-version 24)
-                                           'shell-completion-vars
-                                         'pcomplete-shell-setup)
+     (list (minibuffer-with-setup-hook 'shell-completion-vars
              (read-from-minibuffer
               (format "Run ack in `%s': "
                       (file-name-nondirectory
diff --git a/pcmpl-ack.el b/pcmpl-ack.el
index 766168a..942a552 100644
--- a/pcmpl-ack.el
+++ b/pcmpl-ack.el
@@ -1,4 +1,4 @@
-;;; pcmpl-ack.el --- completion for ack tool
+;;; pcmpl-ack.el --- completion for ack tool    -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2012, 2013  Free Software Foundation, Inc.
 

commit 0ce35d2e0edb36f9616d15beee26516c373109d7
Author: Leo Liu <address@hidden>
Date:   Tue Feb 5 21:19:28 2013 +0800

    Customise error message with ggtags-global-error

diff --git a/ggtags.el b/ggtags.el
index 75c395a..d5a4037 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.5
+;; Version: 0.6
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -69,6 +69,10 @@ If nil, use Emacs default."
 
 (defvar ggtags-current-tag-name nil)
 
+;; Used by ggtags-global-mode
+(defvar ggtags-global-error "match"
+  "Stem of message to print when no matches are found.")
+
 (defmacro ggtags-ignore-file-error (&rest body)
   (declare (indent 0))
   `(condition-case nil
@@ -450,10 +454,6 @@ When called with prefix, ask the name and kind of tag."
     (forward-line (1- line))
     (ggtags-move-to-tag name)))
 
-;; NOTE: `ggtags-build-imenu-index' is signficantly faster and more
-;; precise than the similar feature provided by cc mode. Tested with
-;; ClassFileWriter.java of the rhino project.
-
 ;;;###autoload
 (defun ggtags-build-imenu-index ()
   "A function suitable for `imenu-create-index-function'."

commit 8f1b568741b158db05b9d7f62960a42e902f80a1
Author: Leo Liu <address@hidden>
Date:   Tue Feb 5 09:16:39 2013 +0800

    Better handling of GTAGSLIBPATH in ggtags-tag-names

diff --git a/ggtags.el b/ggtags.el
index 08f36eb..75c395a 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -92,6 +92,9 @@ Return -1 if it does not exist."
         (float-time (nth 5 (file-attributes file)))
       -1)))
 
+(defun ggtags-get-libpath ()
+  (split-string (or (getenv "GTAGSLIBPATH") "") ":" t))
+
 (defun ggtags-cache-get (key)
   (assoc key ggtags-cache))
 
@@ -142,6 +145,19 @@ Return -1 if it does not exist."
                   (error "%s" (comment-string-strip (buffer-string) t t))))))
         (error "Aborted"))))
 
+(defun ggtags-tag-names-1 (root &optional prefix)
+  (when root
+    (if (ggtags-cache-stale-p root)
+        (let* ((default-directory (file-name-as-directory root))
+               (tags (with-demoted-errors
+                       (split-string
+                        (with-output-to-string
+                          (call-process "global" nil (list standard-output nil)
+                                        nil "-c" (or prefix "")))))))
+          (and tags (ggtags-cache-set root tags))
+          tags)
+      (cadr (ggtags-cache-get root)))))
+
 ;;;###autoload
 (defun ggtags-tag-names (&optional prefix)
   "Get a list of tag names starting with PREFIX."
@@ -150,16 +166,9 @@ Return -1 if it does not exist."
       (if (zerop (call-process "global" nil nil nil "-u"))
           (ggtags-cache-mark-dirty root nil)
         (message "ggtags: error running 'global -u'")))
-    (if (ggtags-cache-stale-p root)
-        (let ((tags (ggtags-ignore-file-error
-                      (split-string
-                       (with-output-to-string
-                         (call-process "global" nil (list standard-output nil)
-                                       nil "-cT" (or prefix "")))))))
-          (when tags
-            (ggtags-cache-set root tags))
-          tags)
-      (cadr (ggtags-cache-get root)))))
+    (apply 'append (mapcar (lambda (r)
+                             (ggtags-tag-names-1 r prefix))
+                           (cons root (ggtags-get-libpath))))))
 
 (defun ggtags-read-tag (quick)
   (ggtags-ensure-root-directory)
@@ -356,8 +365,7 @@ When called with prefix, ask the name and kind of tag."
   "Kill all buffers visiting files in the root directory."
   (interactive "p")
   (ggtags-check-root-directory)
-  (let ((gtagslibpath (split-string (or (getenv "GTAGSLIBPATH") "") ":" t))
-        (root (ggtags-root-directory))
+  (let ((root (ggtags-root-directory))
         (count 0)
         (some (lambda (pred list)
                 (loop for x in list when (funcall pred x) return it))))
@@ -367,7 +375,7 @@ When called with prefix, ask the name and kind of tag."
                        (buffer-file-name buf))))
         (when (and file (funcall some (apply-partially #'file-in-directory-p
                                                        (file-truename file))
-                                 (cons root gtagslibpath)))
+                                 (cons root (ggtags-get-libpath))))
           (and (kill-buffer buf)
                (incf count)))))
     (and interactive

commit 291285e9edd45a4e8a04807779b2d8f906c8c4c1
Author: Thierry Volpiatto <address@hidden>
Date:   Mon Feb 4 12:45:59 2013 +0100

    Fix error message in condition-case.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index ebd2a74..b806358 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -151,7 +151,7 @@ See `with-eldoc-in-minibuffer'."
             (when doc (funcall eldoc-in-minibuffer-show-fn doc))))
       (scan-error nil)
       (beginning-of-buffer nil)
-      (error (and debug-on-error (message "Eldoc in minibuffer error: %S" 
err))))))
+      (error (message "Eldoc in minibuffer error: %S" err)))))
 
 (defun eval-expression-with-eldoc ()
   "Eval expression with eldoc support in mode-line."

commit 920957f2004997dbe1f497432f6728c30c3da394
Author: Leo Liu <address@hidden>
Date:   Sat Feb 2 17:54:42 2013 +0800

    Update README.rst

diff --git a/README.rst b/README.rst
index 6418253..efe01d4 100644
--- a/README.rst
+++ b/README.rst
@@ -6,9 +6,10 @@ A package for working with `GNU Global
 <http://www.gnu.org/software/global>`_ source tagging system inside
 Emacs.
 
-This package is part of `GNU ELPA <http://elpa.gnu.org>`_.
+This package is part of `GNU ELPA <http://elpa.gnu.org>`_
+(``M-x list-packages``).
 
-Feature requests and bug reports are welcome. Thanks.
+Patches, feature requests and bug reports are welcome. Thanks.
 
 Features
 ~~~~~~~~
@@ -23,18 +24,38 @@ Screenshot
 ~~~~~~~~~~
 
 .. figure:: http://i.imgur.com/d430rmm.png
-   :width: 400px
+   :width: 500px
    :target: http://i.imgur.com/d430rmm.png
    :alt: ggtags.png
 
-Install
-~~~~~~~
+Tutorial
+~~~~~~~~
+
+Type ``M-x ggtags-mode`` to enable the minor mode, or as usual enable
+it in your desired major mode hooks. When the mode is on the symbol at
+point is underlined if it is a valid tag.
+
+``M-.`` finds definitions or references according to the tag at point,
+i.e. if point is at a definition tag find references and vice versa.
+``C-u M-.`` is verbose and will ask you the name - with completion
+- and the type of tag to search.
+
+If multiple matches are found, navigation mode is entered. In this
+mode, ``M-n`` and ``M-p`` moves to next and previous match, ``M-}``
+and ``M-{`` to next and previous file respectively. ``M-o`` toggles
+between full and abbreviated displays of file names in the auxiliary
+popup window. When you locate the right match, press RET to finish
+which hides the auxiliary window and exits navigation mode. You can
+resume the search using ``M-,``. To abort the search press ``M-*``.
 
-Place ``ggtags.el`` in the ``load-path`` and add to your init file::
+Normally after a few searches a dozen buffers are created visiting
+files tracked by GNU Global. ``C-c M-k`` helps clean them up.
 
-  (require 'ggtags)
+Development
+~~~~~~~~~~~
 
-Use ``M-x ggtags-mode`` to enable the mode and ``M-.`` to find tags.
+The goal is to make working with GNU Global in Emacs as effortless and
+intuitively as possible.
 
 Bugs
 ~~~~

commit 07062a9b12e63b3069d9790149873510e1c64c36
Author: Leo Liu <address@hidden>
Date:   Sat Feb 2 17:36:55 2013 +0800

    Be consistent in popping up windows

diff --git a/ggtags.el b/ggtags.el
index c4a9d1f..08f36eb 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -201,7 +201,9 @@ When called with prefix, ask the name and kind of tag."
   (interactive)
   (ggtags-ensure-global-buffer
     (ggtags-navigation-mode +1)
-    (compile-goto-error)))
+    (let ((split-window-preferred-function
+           (lambda (w) (split-window (frame-root-window w)))))
+      (compile-goto-error))))
 
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)
   (let ((count (save-excursion

commit 7e914a0ae0b19531bb7e0040e01943d2f3079fa9
Author: Leo Liu <address@hidden>
Date:   Sat Feb 2 17:28:54 2013 +0800

    Teach ggtags-kill-file-buffers to look in GTAGSLIBPATH

diff --git a/ggtags.el b/ggtags.el
index b22f61c..c4a9d1f 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -354,13 +354,18 @@ When called with prefix, ask the name and kind of tag."
   "Kill all buffers visiting files in the root directory."
   (interactive "p")
   (ggtags-check-root-directory)
-  (let ((root (ggtags-root-directory))
-        (count 0))
+  (let ((gtagslibpath (split-string (or (getenv "GTAGSLIBPATH") "") ":" t))
+        (root (ggtags-root-directory))
+        (count 0)
+        (some (lambda (pred list)
+                (loop for x in list when (funcall pred x) return it))))
     (dolist (buf (buffer-list))
       (let ((file (and (buffer-live-p buf)
                        (not (eq buf (current-buffer)))
                        (buffer-file-name buf))))
-        (when (and file (file-in-directory-p (file-truename file) root))
+        (when (and file (funcall some (apply-partially #'file-in-directory-p
+                                                       (file-truename file))
+                                 (cons root gtagslibpath)))
           (and (kill-buffer buf)
                (incf count)))))
     (and interactive

commit 30a7a207c3f07344e98a9b5adccff89eff11b278
Author: Leo Liu <address@hidden>
Date:   Sat Feb 2 17:11:24 2013 +0800

    Bind M-, to ggtags-find-tag-resume

diff --git a/ggtags.el b/ggtags.el
index 1e0d320..b22f61c 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -408,7 +408,7 @@ When called with prefix, ask the name and kind of tag."
 (defvar ggtags-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map "\M-." 'ggtags-find-tag)
-    (define-key map "\C-c\M-n" 'ggtags-find-tag-resume)
+    (define-key map "\M-," 'ggtags-find-tag-resume)
     (define-key map "\C-c\M-k" 'ggtags-kill-file-buffers)
     map))
 

commit 74eea614e64b29d0b00f0df6c3b1946014ec7d23
Author: Leo Liu <address@hidden>
Date:   Sat Feb 2 01:42:47 2013 +0800

    Command ggtags-find-tag learns to do what I mean
    
    See: http://article.gmane.org/gmane.comp.gnu.global.general/329

diff --git a/ggtags.el b/ggtags.el
index f9bd7c3..1e0d320 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -161,22 +161,23 @@ Return -1 if it does not exist."
           tags)
       (cadr (ggtags-cache-get root)))))
 
-(defun ggtags-read-tag (&optional reference)
+(defun ggtags-read-tag (quick)
   (ggtags-ensure-root-directory)
   (let* ((tags (ggtags-tag-names))
          (sym (thing-at-point 'symbol))
          (default (and (member sym tags) sym)))
     (setq ggtags-current-tag-name
-          (completing-read
-           (format (if default
-                       "%s for tag (default %s): "
-                     "%s for tag: ")
-                   (if reference "Reference" "Definition") default)
-           tags nil t nil nil default))))
+          (if quick (or default (error "No valid tag at point"))
+            (completing-read
+             (format (if default "Tag (default %s): " "Tag: ") default)
+             tags nil t nil nil default)))))
 
 ;;;###autoload
-(defun ggtags-find-tag (name &optional reference)
-  (interactive (list (ggtags-read-tag current-prefix-arg)
+(defun ggtags-find-tag (name &optional verbose)
+  "Find definitions or references to tag NAME by context.
+If point is at a definition tag, find references, and vice versa.
+When called with prefix, ask the name and kind of tag."
+  (interactive (list (ggtags-read-tag (not current-prefix-arg))
                      current-prefix-arg))
   (ggtags-check-root-directory)
   (ggtags-navigation-mode +1)
@@ -184,9 +185,17 @@ Return -1 if it does not exist."
   (let ((split-window-preferred-function
          (lambda (w) (split-window (frame-root-window w))))
         (default-directory (ggtags-root-directory)))
-    (compilation-start (format "global -v%s --result=grep \"%s\""
-                               (if reference "r" "") name)
-                       'ggtags-global-mode)))
+    (compilation-start
+     (if verbose
+         (format "global -v%s --result=grep \"%s\""
+                 (if (y-or-n-p "Kind (y for definition n for reference)? ")
+                     "" "r")
+                 name)
+       (format "global -v --result=grep --from-here=%d:%s \"%s\""
+               (line-number-at-pos)
+               (expand-file-name buffer-file-name)
+               name))
+     'ggtags-global-mode)))
 
 (defun ggtags-find-tag-resume ()
   (interactive)

commit 10801fc4e6f4c42069b0be08f372053a8e5f7c81
Author: Leo Liu <address@hidden>
Date:   Fri Feb 1 21:01:10 2013 +0800

    Tweak parameters to global in ggtags-tag-names
    
    -T tells global to include tags from tag files in GTAGSLIBPATH.

diff --git a/ggtags.el b/ggtags.el
index 5653b3c..f9bd7c3 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -155,7 +155,7 @@ Return -1 if it does not exist."
                       (split-string
                        (with-output-to-string
                          (call-process "global" nil (list standard-output nil)
-                                       nil "-c" (or prefix "")))))))
+                                       nil "-cT" (or prefix "")))))))
           (when tags
             (ggtags-cache-set root tags))
           tags)

commit 273978d3395868d4aaef8001cf5f15d17b63feec
Author: Leo Liu <address@hidden>
Date:   Fri Feb 1 21:00:58 2013 +0800

    Highlight tag at point using idle timer for efficiency
    
    Also enhance ggtags-highlight-tag-at-point to re-highlight tag at
    point correctly after it is modified.

diff --git a/ggtags.el b/ggtags.el
index 7929e6e..5653b3c 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -194,28 +194,6 @@ Return -1 if it does not exist."
     (ggtags-navigation-mode +1)
     (compile-goto-error)))
 
-(defvar ggtags-tag-overlay nil)
-(make-variable-buffer-local 'ggtags-tag-overlay)
-
-(defun ggtags-highlight-tag-at-point ()
-  (unless (overlayp ggtags-tag-overlay)
-    (setq ggtags-tag-overlay (make-overlay (point) (point)))
-    (overlay-put ggtags-tag-overlay 'ggtags t))
-  (let ((bounds (bounds-of-thing-at-point 'symbol)))
-    (cond
-     ((not bounds)
-      (overlay-put ggtags-tag-overlay 'face nil)
-      (move-overlay ggtags-tag-overlay (point) (point)))
-     ((notany (lambda (o)
-                (overlay-get o 'ggtags))
-              (overlays-at (car bounds)))
-      (move-overlay ggtags-tag-overlay (car bounds) (cdr bounds))
-      (overlay-put ggtags-tag-overlay 'face
-                   (when (member (buffer-substring (car bounds) (cdr bounds))
-                                 (ggtags-tag-names))
-                     'ggtags-highlight))
-      (overlay-put ggtags-tag-overlay 'window t)))))
-
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)
   (let ((count (save-excursion
                  (goto-char (point-max))
@@ -383,6 +361,41 @@ Return -1 if it does not exist."
   (let ((root (ggtags-root-directory)))
     (and root (ggtags-cache-mark-dirty root t))))
 
+(defvar ggtags-tag-overlay nil)
+(defvar ggtags-highlight-tag-timer nil)
+(make-variable-buffer-local 'ggtags-tag-overlay)
+
+(defun ggtags-highlight-tag-at-point (buffer)
+  (when (eq buffer (current-buffer))
+    (unless (overlayp ggtags-tag-overlay)
+      (setq ggtags-tag-overlay (make-overlay (point) (point)))
+      (overlay-put ggtags-tag-overlay 'ggtags t))
+    (let* ((bounds (bounds-of-thing-at-point 'symbol))
+           (valid-tag (when bounds
+                        (member (buffer-substring (car bounds) (cdr bounds))
+                                (ggtags-tag-names))))
+           (o ggtags-tag-overlay)
+           (done-p (lambda ()
+                     (and (memq o (overlays-at (car bounds)))
+                          (= (overlay-start o) (car bounds))
+                          (= (overlay-end o) (cdr bounds))
+                          (or (and valid-tag (overlay-get o 'face))
+                              (and (not valid-tag) (not (overlay-get o 
'face))))))))
+      (cond
+       ((not bounds)
+        (overlay-put ggtags-tag-overlay 'face nil)
+        (move-overlay ggtags-tag-overlay (point) (point)))
+       ((not (funcall done-p))
+        (move-overlay o (car bounds) (cdr bounds))
+        (overlay-put o 'face (and valid-tag 'ggtags-highlight)))))))
+
+(defun ggtags-post-command-function ()
+  (when (timerp ggtags-highlight-tag-timer)
+    (cancel-timer ggtags-highlight-tag-timer))
+  (setq ggtags-highlight-tag-timer
+        (run-with-idle-timer 0.2 nil 'ggtags-highlight-tag-at-point
+                             (current-buffer))))
+
 (defvar ggtags-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map "\M-." 'ggtags-find-tag)
@@ -398,9 +411,9 @@ Return -1 if it does not exist."
         (or (ggtags-root-directory)
             (message "File GTAGS not found"))
         (add-hook 'after-save-hook 'ggtags-after-save-function nil t)
-        (add-hook 'post-command-hook 'ggtags-highlight-tag-at-point nil t))
+        (add-hook 'post-command-hook 'ggtags-post-command-function nil t))
     (remove-hook 'after-save-hook 'ggtags-after-save-function t)
-    (remove-hook 'post-command-hook 'ggtags-highlight-tag-at-point t)
+    (remove-hook 'post-command-hook 'ggtags-post-command-function t)
     (and (overlayp ggtags-tag-overlay)
          (delete-overlay ggtags-tag-overlay))
     (setq ggtags-tag-overlay nil)))

commit 69b1b57fa8a9ecbb80930d028be30aaf0f934050
Author: Leo Liu <address@hidden>
Date:   Fri Feb 1 19:05:28 2013 +0800

    Remove use of user-error in ggtags-mode definition
    
    which prevents following forms from execution.

diff --git a/ggtags.el b/ggtags.el
index a6416f2..7929e6e 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -395,9 +395,8 @@ Return -1 if it does not exist."
   :lighter (:eval (if ggtags-navigation-mode "" " GG"))
   (if ggtags-mode
       (progn
-        (unless (ggtags-root-directory)
-          (funcall (if (fboundp 'user-error) 'user-error 'message)
-                   "File GTAGS not found"))
+        (or (ggtags-root-directory)
+            (message "File GTAGS not found"))
         (add-hook 'after-save-hook 'ggtags-after-save-function nil t)
         (add-hook 'post-command-hook 'ggtags-highlight-tag-at-point nil t))
     (remove-hook 'after-save-hook 'ggtags-after-save-function t)

commit c1d27be5a4b47ff5a3b36386531741dd7cf177b9
Author: Leo Liu <address@hidden>
Date:   Fri Feb 1 13:24:01 2013 +0800

    Rename ggtags-cache-timestamp to ggtags-get-timestamp

diff --git a/ggtags.el b/ggtags.el
index 54a4255..a6416f2 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -84,8 +84,9 @@ If nil, use Emacs default."
          (error "No global buffer found"))
      (with-current-buffer compilation-last-buffer ,@body)))
 
-(defun ggtags-cache-timestamp (root)
-  "Get the timestamp of file GTAGS in ROOT directory."
+(defun ggtags-get-timestamp (root)
+  "Get the timestamp (float) of file GTAGS in ROOT directory.
+Return -1 if it does not exist."
   (let ((file (expand-file-name "GTAGS" root)))
     (if (file-exists-p file)
         (float-time (nth 5 (file-attributes file)))
@@ -112,7 +113,7 @@ If nil, use Emacs default."
 
 (defun ggtags-cache-stale-p (key)
   "Value is non-nil if tags in cache needs to be rebuilt."
-  (> (ggtags-cache-timestamp key)
+  (> (ggtags-get-timestamp key)
      (or (fourth (ggtags-cache-get key)) 0)))
 
 ;;;###autoload

commit d2b33b2a37726e5ccb36c9eea68ee3446d442bc2
Author: Leo Liu <address@hidden>
Date:   Fri Feb 1 01:54:16 2013 +0800

    Do not abuse assert in what it is designed for
    
    An `assert' should be used for something that should *never* be false.

diff --git a/ggtags.el b/ggtags.el
index b3219c2..54a4255 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -78,10 +78,10 @@ If nil, use Emacs default."
 (defmacro ggtags-ensure-global-buffer (&rest body)
   (declare (indent 0))
   `(progn
-     (assert (and (buffer-live-p compilation-last-buffer)
-                  (with-current-buffer compilation-last-buffer
-                    (derived-mode-p 'ggtags-global-mode)))
-             nil "No global buffer found")
+     (or (and (buffer-live-p compilation-last-buffer)
+              (with-current-buffer compilation-last-buffer
+                (derived-mode-p 'ggtags-global-mode)))
+         (error "No global buffer found"))
      (with-current-buffer compilation-last-buffer ,@body)))
 
 (defun ggtags-cache-timestamp (root)
@@ -124,13 +124,13 @@ If nil, use Emacs default."
          (comment-string-strip (buffer-string) t t))))))
 
 (defun ggtags-check-root-directory ()
-  (assert (ggtags-root-directory) nil "File GTAGS not found"))
+  (or (ggtags-root-directory) (error "File GTAGS not found")))
 
 (defun ggtags-ensure-root-directory ()
   (or (ggtags-root-directory)
       (if (yes-or-no-p "File GTAGS not found; run gtags? ")
           (let ((root (read-directory-name "Directory: " nil nil t)))
-            (assert (not (zerop (length root))) nil "No directory chosen")
+            (and (= (length root) 0) (error "No directory chosen"))
             (ggtags-ignore-file-error
               (with-temp-buffer
                 (if (zerop (let ((default-directory

commit 7c55d29882ff67a19368bab5ed8bf93082a8377e
Author: Leo Liu <address@hidden>
Date:   Fri Feb 1 00:56:23 2013 +0800

    Fix ggtags-global-exit-message-function

diff --git a/ggtags.el b/ggtags.el
index 120893b..b3219c2 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1,6 +1,6 @@
 ;;; ggtags.el --- GNU Global source code tagging system -*- lexical-binding: 
t; -*-
 
-;; Copyright (C) 2013  Leo Liu
+;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
 ;; Version: 0.5
@@ -217,9 +217,10 @@ If nil, use Emacs default."
 
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)
   (let ((count (save-excursion
-                 (goto-char (point-min))
-                 (and (re-search-forward "^\\([0-9]+\\) objects? located" nil 
t)
-                      (string-to-number (match-string 1))))))
+                 (goto-char (point-max))
+                 (if (re-search-backward "^\\([0-9]+\\) objects? located" nil 
t)
+                     (string-to-number (match-string 1))
+                   0))))
     (cons (if (> exit-status 0)
               msg
             (format "found %d %s" count (if (= count 1) "match" "matches")))

commit c1d78d95db50af380f53f4b4c0737434e41ebf1b
Author: Leo Liu <address@hidden>
Date:   Thu Jan 31 16:55:04 2013 +0800

    Actually turn off ggtags-navigation-mode when in minibuffer

diff --git a/ggtags.el b/ggtags.el
index 05b8044..120893b 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -353,10 +353,9 @@ If nil, use Emacs default."
   (if ggtags-navigation-mode
       (progn
         (add-hook 'next-error-hook 'ggtags-move-to-tag)
-        (add-hook 'minibuffer-setup-hook
-                  'ggtags-minibuffer-setup-function nil t))
+        (add-hook 'minibuffer-setup-hook 'ggtags-minibuffer-setup-function))
     (remove-hook 'next-error-hook 'ggtags-move-to-tag)
-    (remove-hook 'minibuffer-setup-hook 'ggtags-minibuffer-setup-function t)))
+    (remove-hook 'minibuffer-setup-hook 'ggtags-minibuffer-setup-function)))
 
 (defun ggtags-minibuffer-setup-function ()
   ;; Disable ggtags-navigation-mode in minibuffer.

commit 7450e102b1108ec2edc319a4d61ecc6f633be961
Author: Leo Liu <address@hidden>
Date:   Thu Jan 31 16:53:57 2013 +0800

    Ignore bogus file lines in ggtags-abbreviate-files

diff --git a/ggtags.el b/ggtags.el
index 60bdc2a..05b8044 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -247,9 +247,12 @@ If nil, use Emacs default."
   (goto-char start)
   (when ggtags-global-abbreviate-filename
     (while (re-search-forward "^\\([^:\n]+\\):[0-9]+:" end t)
-      (when (or (not (numberp ggtags-global-abbreviate-filename))
-                (> (length (match-string 1))
-                   ggtags-global-abbreviate-filename))
+      (when (and (or (not (numberp ggtags-global-abbreviate-filename))
+                     (> (length (match-string 1))
+                        ggtags-global-abbreviate-filename))
+                 ;; Ignore bogus file lines such as:
+                 ;;     Global found 2 matches at Thu Jan 31 13:45:19
+                 (get-text-property (match-beginning 0) 'compilation-message))
         (ggtags-abbreviate-file (match-beginning 1) (match-end 1))))))
 
 (defun ggtags-handle-single-match (buf _how)

commit 843a78d2a4fedd18386510ee78152d31898c74ee
Author: Leo Liu <address@hidden>
Date:   Tue Jan 29 11:42:40 2013 +0800

    Initial import

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..02fbd33
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,12 @@
+.PHONY: all clean
+
+ELCFILES = $(addsuffix .elc, $(basename $(wildcard *.el)))
+
+all: $(ELCFILES)
+
+%.elc : %.el
+       @echo Compiling $<
+       @emacs -batch -q -no-site-file -f batch-byte-compile $<
+
+clean:
+       @rm -f *.elc
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..6418253
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,42 @@
+=========================
+ Use GNU Global in Emacs
+=========================
+ 
+A package for working with `GNU Global
+<http://www.gnu.org/software/global>`_ source tagging system inside
+Emacs.
+
+This package is part of `GNU ELPA <http://elpa.gnu.org>`_.
+
+Feature requests and bug reports are welcome. Thanks.
+
+Features
+~~~~~~~~
+
+#. Automatically run ``global -u`` when needed
+#. Highlight valid tag at point
+#. Built on top of ``compile.el`` (asynchonrous and other nice
+   features)
+#. Abbreviated display of file names
+
+Screenshot
+~~~~~~~~~~
+
+.. figure:: http://i.imgur.com/d430rmm.png
+   :width: 400px
+   :target: http://i.imgur.com/d430rmm.png
+   :alt: ggtags.png
+
+Install
+~~~~~~~
+
+Place ``ggtags.el`` in the ``load-path`` and add to your init file::
+
+  (require 'ggtags)
+
+Use ``M-x ggtags-mode`` to enable the mode and ``M-.`` to find tags.
+
+Bugs
+~~~~
+
+https://github.com/leoliu/ggtags/issues
diff --git a/ggtags.el b/ggtags.el
new file mode 100644
index 0000000..60bdc2a
--- /dev/null
+++ b/ggtags.el
@@ -0,0 +1,433 @@
+;;; ggtags.el --- GNU Global source code tagging system -*- lexical-binding: 
t; -*-
+
+;; Copyright (C) 2013  Leo Liu
+
+;; Author: Leo Liu <address@hidden>
+;; Version: 0.5
+;; Keywords: tools, convenience
+;; Created: 2013-01-29
+;; URL: https://github.com/leoliu/ggtags
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Use GNU Global source code tagging system in Emacs.
+;; http://www.gnu.org/software/global
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+(require 'compile)
+(require 'etags)                        ; for find-tag-marker-ring
+
+(if (not (fboundp 'comment-string-strip))
+    (autoload 'comment-string-strip "newcomment"))
+
+(eval-when-compile
+  (unless (fboundp 'setq-local)
+    (defmacro setq-local (var val)
+      (list 'set (list 'make-local-variable (list 'quote var)) val))))
+
+(defgroup ggtags nil
+  "GNU Global source code tagging system."
+  :group 'tools)
+
+(defface ggtags-highlight '((t (:underline t)))
+  "Face used to highlight a valid tag at point.")
+
+(defcustom ggtags-auto-jump-to-first-match t
+  "Non-nil to automatically jump to the first match."
+  :type 'boolean
+  :group 'ggtags)
+
+(defcustom ggtags-global-window-height 8 ; ggtags-global-mode
+  "Number of lines for the 'global' popup window.
+If nil, use Emacs default."
+  :type '(choice (const :tag "Default" nil) integer)
+  :group 'ggtags)
+
+(defcustom ggtags-global-abbreviate-filename 35
+  "Non-nil to display file names abbreviated such as '/u/b/env'."
+  :type '(choice (const :tag "No" nil)
+                 (const :tag "Always" t)
+                 integer)
+  :group 'ggtags)
+
+(defvar ggtags-cache nil)               ; (ROOT TABLE DIRTY TIMESTAMP)
+
+(defvar ggtags-current-tag-name nil)
+
+(defmacro ggtags-ignore-file-error (&rest body)
+  (declare (indent 0))
+  `(condition-case nil
+       (progn ,@body)
+     (file-error nil)))
+
+(defmacro ggtags-ensure-global-buffer (&rest body)
+  (declare (indent 0))
+  `(progn
+     (assert (and (buffer-live-p compilation-last-buffer)
+                  (with-current-buffer compilation-last-buffer
+                    (derived-mode-p 'ggtags-global-mode)))
+             nil "No global buffer found")
+     (with-current-buffer compilation-last-buffer ,@body)))
+
+(defun ggtags-cache-timestamp (root)
+  "Get the timestamp of file GTAGS in ROOT directory."
+  (let ((file (expand-file-name "GTAGS" root)))
+    (if (file-exists-p file)
+        (float-time (nth 5 (file-attributes file)))
+      -1)))
+
+(defun ggtags-cache-get (key)
+  (assoc key ggtags-cache))
+
+(defun ggtags-cache-set (key val &optional dirty)
+  (let ((c (ggtags-cache-get key)))
+    (if c
+        (setcdr c (list val dirty (float-time)))
+      (push (list key val dirty (float-time)) ggtags-cache))))
+
+(defun ggtags-cache-mark-dirty (key flag)
+  "Return non-nil if operation is successful."
+  (let ((cache (ggtags-cache-get key)))
+    (when cache
+      (setcar (cddr cache) flag))))
+
+(defun ggtags-cache-dirty-p (key)
+  "Value is non-nil if 'global -u' is needed."
+  (third (ggtags-cache-get key)))
+
+(defun ggtags-cache-stale-p (key)
+  "Value is non-nil if tags in cache needs to be rebuilt."
+  (> (ggtags-cache-timestamp key)
+     (or (fourth (ggtags-cache-get key)) 0)))
+
+;;;###autoload
+(defun ggtags-root-directory ()
+  (ggtags-ignore-file-error
+    (with-temp-buffer
+      (when (zerop (call-process "global" nil (list t nil) nil "-pr"))
+        (file-name-as-directory
+         (comment-string-strip (buffer-string) t t))))))
+
+(defun ggtags-check-root-directory ()
+  (assert (ggtags-root-directory) nil "File GTAGS not found"))
+
+(defun ggtags-ensure-root-directory ()
+  (or (ggtags-root-directory)
+      (if (yes-or-no-p "File GTAGS not found; run gtags? ")
+          (let ((root (read-directory-name "Directory: " nil nil t)))
+            (assert (not (zerop (length root))) nil "No directory chosen")
+            (ggtags-ignore-file-error
+              (with-temp-buffer
+                (if (zerop (let ((default-directory
+                                   (file-name-as-directory root)))
+                             (call-process "gtags" nil t)))
+                    (message "File GTAGS generated in `%s'"
+                             (ggtags-root-directory))
+                  (error "%s" (comment-string-strip (buffer-string) t t))))))
+        (error "Aborted"))))
+
+;;;###autoload
+(defun ggtags-tag-names (&optional prefix)
+  "Get a list of tag names starting with PREFIX."
+  (let ((root (ggtags-root-directory)))
+    (when (and root (ggtags-cache-dirty-p root))
+      (if (zerop (call-process "global" nil nil nil "-u"))
+          (ggtags-cache-mark-dirty root nil)
+        (message "ggtags: error running 'global -u'")))
+    (if (ggtags-cache-stale-p root)
+        (let ((tags (ggtags-ignore-file-error
+                      (split-string
+                       (with-output-to-string
+                         (call-process "global" nil (list standard-output nil)
+                                       nil "-c" (or prefix "")))))))
+          (when tags
+            (ggtags-cache-set root tags))
+          tags)
+      (cadr (ggtags-cache-get root)))))
+
+(defun ggtags-read-tag (&optional reference)
+  (ggtags-ensure-root-directory)
+  (let* ((tags (ggtags-tag-names))
+         (sym (thing-at-point 'symbol))
+         (default (and (member sym tags) sym)))
+    (setq ggtags-current-tag-name
+          (completing-read
+           (format (if default
+                       "%s for tag (default %s): "
+                     "%s for tag: ")
+                   (if reference "Reference" "Definition") default)
+           tags nil t nil nil default))))
+
+;;;###autoload
+(defun ggtags-find-tag (name &optional reference)
+  (interactive (list (ggtags-read-tag current-prefix-arg)
+                     current-prefix-arg))
+  (ggtags-check-root-directory)
+  (ggtags-navigation-mode +1)
+  (ring-insert find-tag-marker-ring (point-marker))
+  (let ((split-window-preferred-function
+         (lambda (w) (split-window (frame-root-window w))))
+        (default-directory (ggtags-root-directory)))
+    (compilation-start (format "global -v%s --result=grep \"%s\""
+                               (if reference "r" "") name)
+                       'ggtags-global-mode)))
+
+(defun ggtags-find-tag-resume ()
+  (interactive)
+  (ggtags-ensure-global-buffer
+    (ggtags-navigation-mode +1)
+    (compile-goto-error)))
+
+(defvar ggtags-tag-overlay nil)
+(make-variable-buffer-local 'ggtags-tag-overlay)
+
+(defun ggtags-highlight-tag-at-point ()
+  (unless (overlayp ggtags-tag-overlay)
+    (setq ggtags-tag-overlay (make-overlay (point) (point)))
+    (overlay-put ggtags-tag-overlay 'ggtags t))
+  (let ((bounds (bounds-of-thing-at-point 'symbol)))
+    (cond
+     ((not bounds)
+      (overlay-put ggtags-tag-overlay 'face nil)
+      (move-overlay ggtags-tag-overlay (point) (point)))
+     ((notany (lambda (o)
+                (overlay-get o 'ggtags))
+              (overlays-at (car bounds)))
+      (move-overlay ggtags-tag-overlay (car bounds) (cdr bounds))
+      (overlay-put ggtags-tag-overlay 'face
+                   (when (member (buffer-substring (car bounds) (cdr bounds))
+                                 (ggtags-tag-names))
+                     'ggtags-highlight))
+      (overlay-put ggtags-tag-overlay 'window t)))))
+
+(defun ggtags-global-exit-message-function (_process-status exit-status msg)
+  (let ((count (save-excursion
+                 (goto-char (point-min))
+                 (and (re-search-forward "^\\([0-9]+\\) objects? located" nil 
t)
+                      (string-to-number (match-string 1))))))
+    (cons (if (> exit-status 0)
+              msg
+            (format "found %d %s" count (if (= count 1) "match" "matches")))
+          exit-status)))
+
+(defun ggtags-abbreviate-file (start end)
+  (let ((inhibit-read-only t)
+        (amount (if (numberp ggtags-global-abbreviate-filename)
+                    (- (- end start) ggtags-global-abbreviate-filename)
+                  999))
+        (advance-word (lambda ()
+                        "Return the length of the text made invisible."
+                        (let ((wend (min end (progn (forward-word 1) (point))))
+                              (wbeg (max start (progn (backward-word 1) 
(point)))))
+                          (goto-char wend)
+                          (if (<= (- wend wbeg) 1)
+                              0
+                            (put-text-property (1+ wbeg) wend 'invisible t)
+                            (1- (- wend wbeg)))))))
+    (goto-char start)
+    (while (and (> amount 0) (> end (point)))
+      (decf amount (funcall advance-word)))))
+
+(defun ggtags-abbreviate-files (start end)
+  (goto-char start)
+  (when ggtags-global-abbreviate-filename
+    (while (re-search-forward "^\\([^:\n]+\\):[0-9]+:" end t)
+      (when (or (not (numberp ggtags-global-abbreviate-filename))
+                (> (length (match-string 1))
+                   ggtags-global-abbreviate-filename))
+        (ggtags-abbreviate-file (match-beginning 1) (match-end 1))))))
+
+(defun ggtags-handle-single-match (buf _how)
+  (unless (or (not ggtags-auto-jump-to-first-match)
+              (save-excursion
+                (goto-char (point-min))
+                (ignore-errors
+                  (goto-char (compilation-next-single-property-change
+                              (point) 'compilation-message))
+                  (end-of-line)
+                  (compilation-next-single-property-change
+                   (point) 'compilation-message))))
+    (ggtags-navigation-mode -1)
+    ;; 0.5s delay for `ggtags-auto-jump-to-first-match'
+    (ggtags-navigation-mode-cleanup buf 0.5)))
+
+(define-compilation-mode ggtags-global-mode "Global"
+  "A mode for showing outputs from gnu global."
+  (setq-local compilation-auto-jump-to-first-error
+              ggtags-auto-jump-to-first-match)
+  (setq-local compilation-scroll-output 'first-error)
+  (setq-local compilation-disable-input t)
+  (setq-local compilation-always-kill t)
+  (setq-local compilation-error-face 'compilation-info)
+  (setq-local compilation-exit-message-function
+              'ggtags-global-exit-message-function)
+  (setq-local truncate-lines t)
+  (jit-lock-register #'ggtags-abbreviate-files)
+  (add-hook 'compilation-finish-functions 'ggtags-handle-single-match nil t)
+  (define-key ggtags-global-mode-map "o" 'visible-mode))
+
+(defvar ggtags-navigation-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\M-n" 'next-error)
+    (define-key map "\M-p" 'previous-error)
+    (define-key map "\M-}" 'ggtags-navigation-next-file)
+    (define-key map "\M-{" 'ggtags-navigation-previous-file)
+    (define-key map "\M-o" 'ggtags-navigation-visible-mode)
+    (define-key map "\r" 'ggtags-navigation-mode-done)
+    ;; Intercept M-. and M-* keys
+    (define-key map [remap pop-tag-mark] 'ggtags-navigation-mode-abort)
+    (define-key map [remap ggtags-find-tag] 'undefined)
+    map))
+
+(defun ggtags-move-to-tag (&optional name)
+  "Move to NAME tag in current line."
+  (let ((orig (point))
+        (tag (or name ggtags-current-tag-name)))
+    (beginning-of-line)
+    (if (and tag (re-search-forward
+                  (concat "\\_<" (regexp-quote tag) "\\_>")
+                  (line-end-position)
+                  t))
+        (goto-char (match-beginning 0))
+      (goto-char orig))))
+
+(defun ggtags-navigation-mode-cleanup (&optional buf time)
+  (let ((buf (or buf compilation-last-buffer)))
+    (and (buffer-live-p buf)
+         (with-current-buffer buf
+           (when (get-buffer-process (current-buffer))
+             (kill-compilation))
+           (when (and (derived-mode-p 'ggtags-global-mode)
+                      (get-buffer-window))
+             (delete-window (get-buffer-window)))
+           (and time (run-with-idle-timer time nil
+                                          'kill-buffer (current-buffer)))))))
+
+(defun ggtags-navigation-mode-done ()
+  (interactive)
+  (ggtags-navigation-mode -1)
+  (ggtags-navigation-mode-cleanup))
+
+(defun ggtags-navigation-mode-abort ()
+  (interactive)
+  (pop-tag-mark)
+  (ggtags-navigation-mode -1)
+  (ggtags-navigation-mode-cleanup nil 0))
+
+(defun ggtags-navigation-next-file (n)
+  (interactive "p")
+  (ggtags-ensure-global-buffer
+    (compilation-next-file n)
+    (compile-goto-error)))
+
+(defun ggtags-navigation-previous-file (n)
+  (interactive "p")
+  (ggtags-navigation-next-file (- n)))
+
+(defun ggtags-navigation-visible-mode (&optional arg)
+  (interactive (list (or current-prefix-arg 'toggle)))
+  (ggtags-ensure-global-buffer
+    (visible-mode arg)))
+
+(define-minor-mode ggtags-navigation-mode nil
+  :lighter (" GG[" (:propertize "n" face error) "]")
+  :global t
+  (if ggtags-navigation-mode
+      (progn
+        (add-hook 'next-error-hook 'ggtags-move-to-tag)
+        (add-hook 'minibuffer-setup-hook
+                  'ggtags-minibuffer-setup-function nil t))
+    (remove-hook 'next-error-hook 'ggtags-move-to-tag)
+    (remove-hook 'minibuffer-setup-hook 'ggtags-minibuffer-setup-function t)))
+
+(defun ggtags-minibuffer-setup-function ()
+  ;; Disable ggtags-navigation-mode in minibuffer.
+  (setq-local ggtags-navigation-mode nil))
+
+(defun ggtags-kill-file-buffers (&optional interactive)
+  "Kill all buffers visiting files in the root directory."
+  (interactive "p")
+  (ggtags-check-root-directory)
+  (let ((root (ggtags-root-directory))
+        (count 0))
+    (dolist (buf (buffer-list))
+      (let ((file (and (buffer-live-p buf)
+                       (not (eq buf (current-buffer)))
+                       (buffer-file-name buf))))
+        (when (and file (file-in-directory-p (file-truename file) root))
+          (and (kill-buffer buf)
+               (incf count)))))
+    (and interactive
+         (message "%d %s killed" count (if (= count 1) "buffer" "buffers")))))
+
+(defun ggtags-after-save-function ()
+  (let ((root (ggtags-root-directory)))
+    (and root (ggtags-cache-mark-dirty root t))))
+
+(defvar ggtags-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\M-." 'ggtags-find-tag)
+    (define-key map "\C-c\M-n" 'ggtags-find-tag-resume)
+    (define-key map "\C-c\M-k" 'ggtags-kill-file-buffers)
+    map))
+
+;;;###autoload
+(define-minor-mode ggtags-mode nil
+  :lighter (:eval (if ggtags-navigation-mode "" " GG"))
+  (if ggtags-mode
+      (progn
+        (unless (ggtags-root-directory)
+          (funcall (if (fboundp 'user-error) 'user-error 'message)
+                   "File GTAGS not found"))
+        (add-hook 'after-save-hook 'ggtags-after-save-function nil t)
+        (add-hook 'post-command-hook 'ggtags-highlight-tag-at-point nil t))
+    (remove-hook 'after-save-hook 'ggtags-after-save-function t)
+    (remove-hook 'post-command-hook 'ggtags-highlight-tag-at-point t)
+    (and (overlayp ggtags-tag-overlay)
+         (delete-overlay ggtags-tag-overlay))
+    (setq ggtags-tag-overlay nil)))
+
+;;; imenu
+(defun ggtags-goto-imenu-index (name line &rest _args)
+  (save-restriction
+    (widen)
+    (goto-char (point-min))
+    (forward-line (1- line))
+    (ggtags-move-to-tag name)))
+
+;; NOTE: `ggtags-build-imenu-index' is signficantly faster and more
+;; precise than the similar feature provided by cc mode. Tested with
+;; ClassFileWriter.java of the rhino project.
+
+;;;###autoload
+(defun ggtags-build-imenu-index ()
+  "A function suitable for `imenu-create-index-function'."
+  (when buffer-file-name
+    (let ((file (file-truename buffer-file-name)))
+      (ggtags-ignore-file-error
+        (with-temp-buffer
+          (when (zerop (call-process "global" nil t nil "-f" file))
+            (goto-char (point-min))
+            (loop while (re-search-forward
+                         "^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)" nil t)
+                  collect (list (match-string 1)
+                                (string-to-number (match-string 2))
+                                'ggtags-goto-imenu-index))))))))
+
+(provide 'ggtags)
+;;; ggtags.el ends here

commit ecadddfd280bbd9239952ea06e24b995a7f57fb2
Author: Thierry Volpiatto <address@hidden>
Date:   Sat Jan 26 12:43:38 2013 +0100

    Fix scan and bob errors.

diff --git a/eldoc-eval.el b/eldoc-eval.el
index 609c138..ebd2a74 100644
--- a/eldoc-eval.el
+++ b/eldoc-eval.el
@@ -149,6 +149,8 @@ See `with-eldoc-in-minibuffer'."
                               (eldoc-get-fnsym-args-string
                                (car info-fn) (cadr info-fn)))))
             (when doc (funcall eldoc-in-minibuffer-show-fn doc))))
+      (scan-error nil)
+      (beginning-of-buffer nil)
       (error (and debug-on-error (message "Eldoc in minibuffer error: %S" 
err))))))
 
 (defun eval-expression-with-eldoc ()

commit 3baf07adedffade081703ce45059b4a3182e0865
Merge: 540578b 1fa14bb
Author: Andrew Hyatt <address@hidden>
Date:   Wed Jan 23 18:48:29 2013 -0800

    Merge pull request #28 from jscheid/master
    
    Improve error display in default error handler


commit 1fa14bb71df4b0fabc123234a517533a19077f6d
Author: Julian Scheid <address@hidden>
Date:   Wed Jan 23 21:11:07 2013 +0100

    Improve error display in default error handler.
    
    - Pretty-print the error message, and include the error type.  Previously, 
only
      the error arguments were printed so that e.g. `end-of-buffer' would be
      rendered just as "nil".  Pretty-printing makes the output of the default 
error
      handler consistent with default error output.
    
    - Use `display-warning' rather than `message'.  Rationale: the error handler
      might be called many times in quick succession, overwriting previous 
messages.
      Also, the messages output by the error handler might be overwritten by
      messages emitted by other parts of the code (e.g. by websocket callbacks
      invoked after the error occurred.)
    
      Although past messages are always available in the *Messages* buffer, with
      `display-warning' errors are displayed more prominently since the 
*Warnings*
      buffer is unburied whenever new errors are printed.

diff --git a/websocket-test.el b/websocket-test.el
index 19746fd..f7c5936 100644
--- a/websocket-test.el
+++ b/websocket-test.el
@@ -573,3 +573,24 @@
     (should (eq 'conn-b (websocket-conn (car closed-websockets))))
     (should (eq 1 (length websocket-server-websockets)))
     (should (eq 'conn-a (websocket-conn (car websocket-server-websockets))))))
+
+(ert-deftest websocket-default-error-handler ()
+  (flet ((try-error
+          (callback-type err expected-message)
+          (flet ((display-warning
+                  (type message &optional level buffer-name)
+                  (should (eq type 'websocket))
+                  (should (eq level :error))
+                  (should (string= message expected-message))))
+            (websocket-default-error-handler nil
+                                             callback-type
+                                             err))))
+    (try-error
+     'on-message
+     '(end-of-buffer)
+     "in callback `on-message': End of buffer")
+
+    (try-error
+     'on-close
+     '(wrong-number-of-arguments 1 2)
+     "in callback `on-close': Wrong number of arguments: 1, 2")))
diff --git a/websocket.el b/websocket.el
index b5f4c70..8fda4fd 100644
--- a/websocket.el
+++ b/websocket.el
@@ -363,9 +363,25 @@ the frame finishes.  If the frame is not completed, return 
NIL."
        :length (if payloadp payload-end 1)
        :completep (> fin 0)))))
 
+(defun websocket-format-error (err)
+  "Format an error message like command level does. ERR should be
+a cons of error symbol and error data."
+
+  ;; Formatting code adapted from `edebug-report-error'
+  (concat (or (get (car err) 'error-message)
+              (format "peculiar error (%s)" (car err)))
+          (when (cdr err)
+            (format ": %s"
+                    (mapconcat #'prin1-to-string
+                               (cdr err) ", ")))))
+
 (defun websocket-default-error-handler (websocket type err)
   "The default error handler used to handle errors in callbacks."
-  (message "Error found in callback `%S': %s" type (cdr err)))
+  (display-warning 'websocket
+                   (format "in callback `%S': %s"
+                           type
+                           (websocket-format-error err))
+                   :error))
 
 ;; Error symbols in use by the library
 (put 'websocket-unsupported-protocol 'error-conditions

commit f4ae1de92f40837e67af46378fd27d02c0e6bd22
Author: Thierry Volpiatto <address@hidden>
Date:   Sun Jan 13 20:24:58 2013 +0100

    Initial commit, add files.

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e69de29
diff --git a/eldoc-eval.el b/eldoc-eval.el
new file mode 100644
index 0000000..609c138
--- /dev/null
+++ b/eldoc-eval.el
@@ -0,0 +1,165 @@
+;;; eldoc-eval.el -- Show eldoc when using M-:
+
+;; Copyright (C) 2011 Free Software Foundation, Inc.
+
+;; Author: Thierry Volpiatto <address@hidden>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+(require 'eldoc)
+
+
+;;; Minibuffer support.
+;;  Enable displaying eldoc info in something else
+;;  Than minibuffer when this one is in use.
+;;
+(defcustom eldoc-in-minibuffer t
+  "Turn on eldoc in minibuffer."
+  :group 'eldoc
+  :type 'bolean)
+
+(defcustom eldoc-in-minibuffer-show-fn 'eldoc-show-in-mode-line
+  "A function to display eldoc info.
+Should take one arg: the string to display"
+  :group 'eldoc
+  :type 'function)
+
+(defcustom eldoc-show-in-mode-line-delay 12
+  "The time we show eldoc when Emacs is idle."
+  :group 'eldoc
+  :type 'number)
+
+(defcustom eval-prefered-function 'pp-eval-expression
+  "Prefered function to use with `M-:'."
+  :group 'lisp
+  :type 'function)
+
+(defcustom  eldoc-in-minibuffer-own-frame-p nil
+  "Whether minibuffer have own frame or not."
+  :group 'lisp
+  :type 'boolean)
+
+;; Internal.
+(defvar eldoc-active-minibuffers-list nil
+  "Store actives minibuffers with eldoc enabled.")
+(defvar eldoc-mode-line-rolling-flag nil)
+
+(defun eldoc-store-minibuffer ()
+  "Store minibuffer buffer name in `eldoc-active-minibuffers-list'.
+This function is called by each minibuffer started with eldoc support.
+See `with-eldoc-in-minibuffer'."
+  (with-selected-window (minibuffer-window)
+    (push (buffer-name) eldoc-active-minibuffers-list)))
+
+(defmacro with-eldoc-in-minibuffer (&rest body)
+  "Enable eldoc support for minibuffer input that run in BODY."
+  (declare (indent 0) (debug t))
+  `(let ((timer (and eldoc-in-minibuffer
+                     (run-with-idle-timer
+                      eldoc-idle-delay
+                      'repeat 'eldoc-mode-in-minibuffer))))
+     (unwind-protect
+         (minibuffer-with-setup-hook
+             ;; When minibuffer is activated in body,
+             ;; store it.
+             'eldoc-store-minibuffer
+           ,@body)
+       (and timer (cancel-timer timer))
+       ;; Each time a minibuffer exit or abort
+       ;; his buffer is removed from stack,
+       ;; assuming we can only exit the active minibuffer
+       ;; on top of stack.
+       (setq eldoc-active-minibuffers-list
+             (cdr eldoc-active-minibuffers-list)))))
+
+(defun eldoc-current-buffer ()
+  "The `current-buffer' before activating minibuffer."
+  (with-selected-frame (last-nonminibuffer-frame)
+    (window-buffer
+     (cond (eldoc-in-minibuffer-own-frame-p
+            (selected-window))
+           ((fboundp 'window-in-direction)
+            (window-in-direction 
+             'above (minibuffer-window)))
+           (t (minibuffer-selected-window))))))
+
+(defun eldoc-show-in-mode-line (str)
+  "Display string STR in the mode-line next to minibuffer."
+  (let (mode-line-in-non-selected-windows)
+    (with-current-buffer (eldoc-current-buffer)
+      (make-local-variable 'mode-line-format)
+      (let ((mode-line-format (concat " " str)))
+        (eldoc-maybe-roll-message-in-mode-line mode-line-format))
+      (force-mode-line-update))))
+
+(defun eldoc-maybe-roll-message-in-mode-line (str)
+  (let* ((max (window-width (get-buffer-window (eldoc-current-buffer))))
+         (len (length str))
+         (tmp-str str))
+    (if (and (> len max) eldoc-mode-line-rolling-flag)
+        (while (sit-for 0.3)
+           (setq tmp-str (substring tmp-str 2)
+                 mode-line-format (concat tmp-str " [<]" str))
+           (force-mode-line-update nil)
+           (when (< (length tmp-str) 2) (setq tmp-str str)))
+        (force-mode-line-update nil)
+        (sit-for eldoc-show-in-mode-line-delay))))
+
+(defun eldoc-mode-line-toggle-rolling ()
+  (interactive)
+  (setq eldoc-mode-line-rolling-flag (not eldoc-mode-line-rolling-flag)))
+(define-key minibuffer-local-map (kbd "<C-M-right>") 
'eldoc-mode-line-toggle-rolling)
+
+(defun eldoc-mode-in-minibuffer ()
+  "Show eldoc for current minibuffer input."
+  (let ((buf (with-selected-window (minibuffer-window)
+               (buffer-name))))
+    ;; If this minibuffer have been started with
+    ;;`with-eldoc-in-minibuffer' give it eldoc support
+    ;; and update mode-line, otherwise do nothing.
+    (condition-case err
+        (when (member buf eldoc-active-minibuffers-list)
+          (let* ((str-all (with-current-buffer buf
+                            (minibuffer-completion-contents)))
+                 (sym     (when str-all
+                            (with-temp-buffer
+                              (insert str-all)
+                              (goto-char (point-max))
+                              (unless (looking-back ")\\|\"")
+                                (forward-char -1))
+                              (eldoc-current-symbol))))
+                 (info-fn (eldoc-fnsym-in-current-sexp))
+                 (doc     (or (eldoc-get-var-docstring sym)
+                              (eldoc-get-fnsym-args-string
+                               (car info-fn) (cadr info-fn)))))
+            (when doc (funcall eldoc-in-minibuffer-show-fn doc))))
+      (error (and debug-on-error (message "Eldoc in minibuffer error: %S" 
err))))))
+
+(defun eval-expression-with-eldoc ()
+  "Eval expression with eldoc support in mode-line."
+  (interactive)
+  (with-eldoc-in-minibuffer
+    (call-interactively eval-prefered-function)))
+
+;; Bind it to `M-:'.
+(global-set-key [remap eval-expression] 'eval-expression-with-eldoc)
+
+
+(provide 'eldoc-eval)
+;;; eldoc-eval.el ends here

commit 086cacd47c24f1a8707a82689d5dec49656f7562
Author: Leo Liu <address@hidden>
Date:   Sun Jan 13 00:38:02 2013 +0800

    New command ack-yank-symbol-at-point and bind it to M-Y
    
    Thanks to address@hidden for request and testing.

diff --git a/README.rst b/README.rst
index 96cbb64..f0c656a 100644
--- a/README.rst
+++ b/README.rst
@@ -81,6 +81,8 @@ key bindings may be useful:
 
 - ``M-I`` => insert a template for case-insensitive file name search
 - ``M-G`` => insert a template for ``git grep``, ``hg grep`` or ``bzr grep``
+- ``M-Y`` => grab the symbol at point from the window before entering
+  the minibuffer
 - ``TAB`` => completion for ack options
 
 Bugs
diff --git a/ack.el b/ack.el
index d58a7ff..6b1655d 100644
--- a/ack.el
+++ b/ack.el
@@ -1,6 +1,6 @@
 ;;; ack.el --- Emacs interface to ack
 
-;; Copyright (C) 2012  Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
 ;; Version: 0.8
@@ -308,6 +308,16 @@ This gets tacked on the end of the generated expressions.")
     (delete-minibuffer-contents)
     (skeleton-insert '(nil cmd " '" _ "'"))))
 
+(defun ack-yank-symbol-at-point ()
+  "Yank the symbol from the window before entering the minibuffer."
+  (interactive)
+  (let ((symbol (and (minibuffer-selected-window)
+                     (with-current-buffer
+                         (window-buffer (minibuffer-selected-window))
+                       (thing-at-point 'symbol)))))
+    (if symbol (insert symbol)
+      (minibuffer-message "No symbol found"))))
+
 (defvar ack-minibuffer-local-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map minibuffer-local-map)
@@ -316,6 +326,7 @@ This gets tacked on the end of the generated expressions.")
                            'pcomplete))
     (define-key map "\M-I" 'ack-skel-file)
     (define-key map "\M-G" 'ack-skel-vc-grep)
+    (define-key map "\M-Y" 'ack-yank-symbol-at-point)
     (define-key map "'" 'skeleton-pair-insert-maybe)
     map)
   "Keymap used for reading `ack' command and args in minibuffer.")
diff --git a/pcmpl-ack.el b/pcmpl-ack.el
index ea504a8..766168a 100644
--- a/pcmpl-ack.el
+++ b/pcmpl-ack.el
@@ -1,6 +1,6 @@
 ;;; pcmpl-ack.el --- completion for ack tool
 
-;; Copyright (C) 2012  Free Software Foundation, Inc.
+;; Copyright (C) 2012, 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
 ;; Keywords: tools, processes, convenience

commit ec0427470f8fe5e2a10c7658b8689852afe2a890
Author: Dmitry Gutov <address@hidden>
Date:   Sat Dec 29 07:25:31 2012 +0400

    Don't use overriding-terminal-local-map
    
    Use emulation-mode-map-alists instead.
    
    This way, all non-shadowed bindings (like paredit's) are intact.
    
    Also had to change tab and return's key notations in the map definition,
    because otherwise they were still captured by yasnippet and autopair,
    respectively.

diff --git a/company.el b/company.el
index d001a9f..317e1a7 100644
--- a/company.el
+++ b/company.el
@@ -512,8 +512,8 @@ The work-around consists of adding a newline.")
     (define-key keymap [mouse-3] 'company-select-mouse)
     (define-key keymap [up-mouse-1] 'ignore)
     (define-key keymap [up-mouse-3] 'ignore)
-    (define-key keymap "\C-m" 'company-complete-selection)
-    (define-key keymap "\t" 'company-complete-common)
+    (define-key keymap [return] 'company-complete-selection)
+    (define-key keymap [tab] 'company-complete-common)
     (define-key keymap (kbd "<f1>") 'company-show-doc-buffer)
     (define-key keymap "\C-w" 'company-show-location)
     (define-key keymap "\C-s" 'company-search-candidates)
@@ -598,31 +598,28 @@ keymap during active completions (`company-active-map'):
 
 ;;; keymaps 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defvar company-overriding-keymap-bound nil)
-(make-variable-buffer-local 'company-overriding-keymap-bound)
-
-(defvar company-old-keymap nil)
-(make-variable-buffer-local 'company-old-keymap)
-
 (defvar company-my-keymap nil)
 (make-variable-buffer-local 'company-my-keymap)
 
+(defvar company-emulation-alist '((t . nil)))
+
 (defsubst company-enable-overriding-keymap (keymap)
-  (setq company-my-keymap keymap)
-  (when company-overriding-keymap-bound
-    (company-uninstall-map)))
+  (company-uninstall-map)
+  (setq company-my-keymap keymap))
+
+(defun company-ensure-emulation-alist ()
+  (unless (eq 'company-emulation-alist (car emulation-mode-map-alists))
+    (setq emulation-mode-map-alists
+          (cons 'company-emulation-alist
+                (delq 'company-emulation-alist emulation-mode-map-alists)))))
 
 (defun company-install-map ()
-  (unless (or company-overriding-keymap-bound
+  (unless (or (cdar company-emulation-alist)
               (null company-my-keymap))
-    (setq company-old-keymap overriding-terminal-local-map
-          overriding-terminal-local-map company-my-keymap
-          company-overriding-keymap-bound t)))
+    (setf (cdar company-emulation-alist) company-my-keymap)))
 
 (defun company-uninstall-map ()
-  (when (eq overriding-terminal-local-map company-my-keymap)
-    (setq overriding-terminal-local-map company-old-keymap
-          company-overriding-keymap-bound nil)))
+  (setf (cdar company-emulation-alist) nil))
 
 ;; Hack:
 ;; Emacs calculates the active keymaps before reading the event.  That means we
@@ -1046,6 +1043,7 @@ can retrieve meta-data for them."
       (setq company-added-newline (buffer-chars-modified-tick)))
     (setq company-point (point)
           company--point-max (point-max))
+    (company-ensure-emulation-alist)
     (company-enable-overriding-keymap company-active-map)
     (company-call-frontends 'update)))
 

commit 843455d84ba4de1140232b4f540fa50105081e4f
Author: Dmitry Gutov <address@hidden>
Date:   Thu Dec 27 04:55:13 2012 +0400

    * company-elisp: complete features and faces,
      find docs and definitions of non-function symbols properly

diff --git a/company-elisp.el b/company-elisp.el
index 1e2b171..1073f28 100644
--- a/company-elisp.el
+++ b/company-elisp.el
@@ -38,7 +38,9 @@ Functions are offered for completion only after ' and \(."
 
 (defun company-elisp-predicate (symbol)
   (or (boundp symbol)
-      (fboundp symbol)))
+      (fboundp symbol)
+      (facep symbol)
+      (featurep symbol)))
 
 (defvar company-elisp-parse-limit 30)
 (defvar company-elisp-parse-depth 100)
@@ -116,13 +118,22 @@ Functions are offered for completion only after ' and \(."
     (meta (company-elisp-doc arg))
     (doc-buffer (let ((symbol (intern arg)))
                   (save-window-excursion
-                    (when (or (ignore-errors (describe-function symbol))
-                              (ignore-errors (describe-variable symbol)))
+                    (ignore-errors
+                      (cond
+                       ((fboundp symbol) (describe-function symbol))
+                       ((boundp symbol) (describe-variable symbol))
+                       ((featurep symbol) (describe-package symbol))
+                       ((facep symbol) (describe-face symbol))
+                       (t (signal 'user-error nil)))
                       (help-buffer)))))
     (location (let ((sym (intern arg)))
-                (or (ignore-errors (find-definition-noselect sym nil))
-                    (ignore-errors (find-definition-noselect sym 'defvar))
-                    (ignore-errors (find-definition-noselect sym t)))))))
+                (cond
+                 ((fboundp sym) (find-definition-noselect sym nil))
+                 ((boundp sym) (find-definition-noselect sym 'defvar))
+                 ((featurep sym) (cons (find-file-noselect (find-library-name
+                                                            (symbol-name sym)))
+                                       0))
+                 ((facep sym) (find-definition-noselect sym 'defface)))))))
 
 (provide 'company-elisp)
 ;;; company-elisp.el ends here

commit 7630a844c3453409825364e0ccb1504b1efa4b08
Author: Dmitry Gutov <address@hidden>
Date:   Wed Dec 26 07:33:43 2012 +0400

    Returns -> Return

diff --git a/js2-mode.el b/js2-mode.el
index b35f76d..702b32c 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -6693,7 +6693,7 @@ that it's an external variable, which must also be in the 
top-level scope."
      (t t))))
 
 (defun js2-wrapper-function-p (node)
-  "Returns t if NODE is a function expression that's immediately invoked.
+  "Return t if NODE is a function expression that's immediately invoked.
 NODE must be `js2-function-node'."
   (let ((parent (js2-node-parent node)))
     (or
@@ -6952,7 +6952,7 @@ The flags, if any, are saved in 
`js2-current-flagged-token'."
       tt)))  ; return unflagged token
 
 (defun js2-peek-flagged-token ()
-  "Returns the current token along with any flags set for it."
+  "Return the current token along with any flags set for it."
   (js2-peek-token)
   js2-current-flagged-token)
 
@@ -9681,7 +9681,7 @@ indented to the same column as the current line."
                    (= (current-indentation) saved-indent))))))))
 
 (defun js2-multiline-decl-indentation ()
-  "Returns the declaration indentation column if the current line belongs
+  "Return the declaration indentation column if the current line belongs
 to a multiline declaration statement.  See 
`js2-pretty-multiline-declarations'."
   (let (forward-sexp-function ; use Lisp version
         at-opening-bracket)

commit eb89f06d7e4329f5041dce998f2e093259c6b4ef
Author: Dmitry Gutov <address@hidden>
Date:   Wed Dec 26 07:26:21 2012 +0400

    Toggles -> Toggle

diff --git a/js2-mode.el b/js2-mode.el
index 782dbc1..b35f76d 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10705,7 +10705,7 @@ PARSE-STATUS is as documented in `parse-partial-sexp'."
     (js2-indent-line)))
 
 (defun js2-beginning-of-line ()
-  "Toggles point between bol and first non-whitespace char in line.
+  "Toggle point between bol and first non-whitespace char in line.
 Also moves past comment delimiters when inside comments."
   (interactive)
   (let (node beg)
@@ -10725,7 +10725,7 @@ Also moves past comment delimiters when inside 
comments."
       (goto-char (point-at-bol))))))
 
 (defun js2-end-of-line ()
-  "Toggles point between eol and last non-whitespace char in line."
+  "Toggle point between eol and last non-whitespace char in line."
   (interactive)
   (if (eolp)
       (skip-chars-backward " \t")

commit e378db4d306907e8af78bb1c766d5dbddbbbf4f2
Author: Dmitry Gutov <address@hidden>
Date:   Tue Dec 25 04:08:50 2012 +0400

    2011, too

diff --git a/js2-mode.el b/js2-mode.el
index 4d25e6b..782dbc1 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -1,6 +1,6 @@
 ;;; js2-mode.el --- Improved JavaScript editing mode
 
-;; Copyright (C) 2009, 2012  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2011, 2012  Free Software Foundation, Inc.
 
 ;; Author: Steve Yegge <address@hidden>
 ;;         mooz <address@hidden>

commit 8b78584fd26a465f66ecd3c32c5f4106823bae51
Author: Dmitry Gutov <address@hidden>
Date:   Tue Dec 25 03:23:00 2012 +0400

    Tweak headers, remove extra vars, set the version to 1.0

diff --git a/js2-mode.el b/js2-mode.el
index b9fb5ed..5502730 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -1,12 +1,12 @@
-;;; js2-mode.el --- an improved JavaScript editing mode
+;;; js2-mode.el --- Improved JavaScript editing mode
 
-;; Copyright (C) 2009  Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2012  Free Software Foundation, Inc.
 
-;; Author:  Steve Yegge <address@hidden>
-;; Contributors:  mooz <address@hidden>
-;;                Dmitry Gutov <address@hidden>
-;; Version:  See `js2-mode-version'
-;; Keywords:  languages, javascript
+;; Author: Steve Yegge <address@hidden>
+;;         mooz <address@hidden>
+;;         Dmitry Gutov <address@hidden>
+;; Version: 1.0
+;; Keywords: languages, javascript
 
 ;; This file is part of GNU Emacs.
 
@@ -28,7 +28,7 @@
 ;; This JavaScript editing mode supports:
 
 ;;  - strict recognition of the Ecma-262 language standard
-;;  - support for most Rhino and SpiderMonkey extensions from 1.5 to 1.8
+;;  - support for most Rhino and SpiderMonkey extensions from 1.5 and up
 ;;  - parsing support for ECMAScript for XML (E4X, ECMA-357)
 ;;  - accurate syntax highlighting using a recursive-descent parser
 ;;  - on-the-fly reporting of syntax errors and strict-mode warnings
@@ -309,12 +309,6 @@ end of the line, otherwise, at the beginning of the next 
line."
   :type '(choice (const t) (const eol) (const nil))
   :group 'js2-mode)
 
-(defcustom js2-mode-squeeze-spaces t
-  "Non-nil to normalize whitespace when filling in comments.
-Multiple runs of spaces are converted to a single space."
-  :type 'boolean
-  :group 'js2-mode)
-
 (defcustom js2-mode-show-parse-errors t
   "True to highlight parse errors."
   :type 'boolean
@@ -470,9 +464,6 @@ which doesn't seem particularly useful, but Rhino permits 
it."
   :type 'boolean
   :group 'js2-mode)
 
-(defvar js2-mode-version 20101228
-  "Release number for `js2-mode'.")
-
 ;; scanner variables
 
 (defmacro js2-deflocal (name value &optional comment)
@@ -7081,8 +7072,8 @@ i.e. one or more nodes, and an integer position as the 
list tail."
 
 ;;; Parser
 
-(defconst js2-version "1.8.0"
-  "Version of JavaScript supported, plus minor js2 version.")
+(defconst js2-version "1.8.5"
+  "Version of JavaScript supported.")
 
 (defmacro js2-record-face (face)
   "Record a style run of FACE for the current token."

commit bc1e159ee95c120041c972b147bbe81a3f178bf5
Author: Dmitry Gutov <address@hidden>
Date:   Tue Dec 25 03:20:16 2012 +0400

    Tweak headers, remove extra variables, set the version to 1.1

diff --git a/js2-mode.el b/js2-mode.el
index 0e4d518..4d25e6b 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -2,11 +2,12 @@
 
 ;; Copyright (C) 2009, 2012  Free Software Foundation, Inc.
 
-;; Author:  Steve Yegge <address@hidden>
-;; Contributors:  mooz <address@hidden>
-;;                Dmitry Gutov <address@hidden>
-;; Version:  See `js2-mode-version'
-;; Keywords:  languages, javascript
+;; Author: Steve Yegge <address@hidden>
+;;         mooz <address@hidden>
+;;         Dmitry Gutov <address@hidden>
+;; Version: 1.1
+;; Keywords: languages, javascript
+;; Package-Requires: ((emacs "24.1"))
 
 ;; This file is part of GNU Emacs.
 
@@ -28,7 +29,7 @@
 ;; This JavaScript editing mode supports:
 
 ;;  - strict recognition of the Ecma-262 language standard
-;;  - support for most Rhino and SpiderMonkey extensions from 1.5 to 1.8
+;;  - support for most Rhino and SpiderMonkey extensions from 1.5 and up
 ;;  - parsing support for ECMAScript for XML (E4X, ECMA-357)
 ;;  - accurate syntax highlighting using a recursive-descent parser
 ;;  - on-the-fly reporting of syntax errors and strict-mode warnings
@@ -40,7 +41,6 @@
 ;;    - show some or all block comments as /*...*/
 ;;  - context-sensitive menu bar and popup menus
 ;;  - code browsing using the `imenu' package
-;;  - typing helpers such as automatic insertion of matching braces/parens
 ;;  - many customization options
 
 ;; Installation:
@@ -83,7 +83,6 @@
 
 (eval-and-compile
   (require 'cc-mode)     ; (only) for `c-populate-syntax-table'
-  (require 'cc-langs)    ; it's here in Emacs 21...
   (require 'cc-engine))  ; for `c-paragraph-start' et. al.
 
 (defvar electric-layout-rules)
@@ -272,11 +271,6 @@ If `js2-dynamic-idle-timer-adjust' is 0 or negative,
   :type 'number
   :group 'js2-mode)
 
-(defcustom js2-mode-escape-quotes t
-  "Non-nil to disable automatic quote-escaping inside strings."
-  :type 'boolean
-  :group 'js2-mode)
-
 (defcustom js2-concat-multiline-strings t
   "Non-nil to automatically turn a newline in mid-string into a
 string concatenation.  When `eol', the '+' will be inserted at the
@@ -284,12 +278,6 @@ end of the line, otherwise, at the beginning of the next 
line."
   :type '(choice (const t) (const eol) (const nil))
   :group 'js2-mode)
 
-(defcustom js2-mode-squeeze-spaces t
-  "Non-nil to normalize whitespace when filling in comments.
-Multiple runs of spaces are converted to a single space."
-  :type 'boolean
-  :group 'js2-mode)
-
 (defcustom js2-mode-show-parse-errors t
   "True to highlight parse errors."
   :type 'boolean
@@ -440,9 +428,6 @@ which doesn't seem particularly useful, but Rhino permits 
it."
   :type 'boolean
   :group 'js2-mode)
 
-(defvar js2-mode-version 20120416
-  "Release number for `js2-mode'.")
-
 ;; scanner variables
 
 (defmacro js2-deflocal (name value &optional comment)
@@ -6891,8 +6876,8 @@ i.e. one or more nodes, and an integer position as the 
list tail."
 
 ;;; Parser
 
-(defconst js2-version "1.8.0"
-  "Version of JavaScript supported, plus minor js2 version.")
+(defconst js2-version "1.8.5"
+  "Version of JavaScript supported.")
 
 (defmacro js2-record-face (face)
   "Record a style run of FACE for the current token."

commit 139014fb75e81fe1d6f355543d85de898e61d555
Author: Dmitry Gutov <address@hidden>
Date:   Tue Dec 25 02:45:13 2012 +0400

    Close #79

diff --git a/js2-mode.el b/js2-mode.el
index d2bb052..b9fb5ed 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -1174,9 +1174,6 @@ another file, or you've got a potential bug."
     (define-key map (kbd "C-c C-o") #'js2-mode-toggle-element)
     (define-key map (kbd "C-c C-w") #'js2-mode-toggle-warnings-and-errors)
     (define-key map (kbd "C-c C-`") #'js2-next-error)
-    ;; also define user's preference for next-error, if available
-    (if (setq keys (where-is-internal #'next-error))
-        (define-key map (car keys) #'js2-next-error))
     (define-key map (or (car (where-is-internal #'mark-defun))
                         (kbd "M-C-h"))
       #'js2-mark-defun)

commit bbaa2843a38bd689950e9263c4f4ba5747eb53ed
Merge: 40dbc69 a310dfc
Author: Dmitry Gutov <address@hidden>
Date:   Thu Dec 13 01:27:53 2012 +0400

    Merge branch 'master' into emacs24
    
    Conflicts:
        js2-mode.el


commit a310dfc91eec38ce2bf3553ef5bde2fe532b4505
Author: Dmitry Gutov <address@hidden>
Date:   Thu Dec 13 01:21:22 2012 +0400

    Fix #77, left over from #58
    
    Also, don't walk the tree unless js2-mode-show-overlay is t.

diff --git a/js2-mode.el b/js2-mode.el
index 1ba5318..d2bb052 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10648,10 +10648,10 @@ buffer will only rebuild its `js2-mode-ast' if the 
buffer is dirty."
   "Debugging aid:  highlight selected AST node on mouse click."
   (interactive "e")
   (mouse-set-point event)
-  (let ((node (js2-node-at-point))
-        beg
-        end)
-    (when js2-mode-show-overlay
+  (setq deactivate-mark t)
+  (when js2-mode-show-overlay
+    (let ((node (js2-node-at-point))
+          beg end)
       (if (null node)
           (message "No node found at location %s" (point))
         (setq beg (js2-node-abs-pos node)
@@ -10668,8 +10668,6 @@ buffer will only rebuild its `js2-mode-ast' if the 
buffer is dirty."
                      (js2-node-short-name (js2-node-parent node))
                    "nil"))))))
 
-(put 'js2-mode-show-node 'CUA 'move)
-
 (defun js2-mode-hide-overlay (&optional p1 p2)
   "Remove the debugging overlay when the point moves.
 P1 and P2 are the old and new values of point, respectively."

commit 40dbc6935b8012a62e6f6af8048d5849a64edc6f
Merge: 1b19cbe 6b3f092
Author: Dmitry Gutov <address@hidden>
Date:   Thu Dec 13 01:17:07 2012 +0400

    Pretend to merge branch 'master' into emacs24
    
    Conflicts:
        README.md
        js2-mode.el


commit 803ff3611c32b0cf677f565e4d501a686bb705ae
Author: Leo Liu <address@hidden>
Date:   Tue Nov 13 12:56:49 2012 +0800

    New user option ack-buffer-name-function
    
    Thanks to address@hidden for request and testing.

diff --git a/ack.el b/ack.el
index 8e85531..d58a7ff 100644
--- a/ack.el
+++ b/ack.el
@@ -57,6 +57,12 @@ environment variable and ~/.ackrc, which you can disable by 
the
   :type 'string
   :group 'ack)
 
+(defcustom ack-buffer-name-function nil
+  "If non-nil, a function to compute the name of an ack buffer.
+See `compilation-buffer-name-function' for details."
+  :type '(choice function (const nil))
+  :group 'ack)
+
 (defcustom ack-vc-grep-commands
   '((".git" . "git --no-pager grep --color -n -i")
     (".hg" . "hg grep -n -i")
@@ -364,7 +370,11 @@ minibuffer:
            project-root)))
   (let ((default-directory (expand-file-name
                             (or directory default-directory))))
-    (compilation-start command-args 'ack-mode)))
+    ;; Change to the compilation buffer so that `ack-buffer-name-function' can
+    ;; make use of `compilation-arguments'.
+    (with-current-buffer (compilation-start command-args 'ack-mode)
+      (when ack-buffer-name-function
+        (rename-buffer (funcall ack-buffer-name-function "ack"))))))
 
 (provide 'ack)
 ;;; ack.el ends here

commit 540578b749644cd6f4d97fc137dd9fce907dae68
Author: Andrew Hyatt <address@hidden>
Date:   Sat Oct 13 18:46:02 2012 -0400

    Add third client in the list of clients.  Now that we have three
    clients, bump version to 1.0.

diff --git a/README.org b/README.org
index 3734b68..a8d42f8 100644
--- a/README.org
+++ b/README.org
@@ -11,19 +11,7 @@ An example of how to use the library is in the
 This library is compatible with emacs 23 and 24, although only emacs
 24 support secure websockets.
 
-* Version
-
-** Version 1.0 requiements
-This version should be usable, but needs the following:
-
-- 3 clients using this module.  Without this many clients, it's hard
-  to be sure the API is right, or there isn't a hidden bug in the
-  module.
-
-Notably, this project is experimenting with an eieio-based API (see
-the EIEIO branch).  Please send us any feedback about the API.
-
-** Version release checklist
+* Version release checklist
 
 Each version that is released should be checked with this checklist:
 
@@ -37,6 +25,7 @@ Each version that is released should be checked with this 
checklist:
 
 - [[https://github.com/tkf/emacs-ipython-notebook][Emacs IPython Notebook]]
 - [[https://github.com/syohex/emacs-realtime-markdown-viewer][Emacs Realtime 
Markdown Viewer]]
+- [[https://github.com/jscheid/kite][Kite]]
 
 If you are using this module for your own emacs package, please let me
 know by editing this file, adding your project, and sending a pull
diff --git a/websocket.el b/websocket.el
index e96a904..b5f4c70 100644
--- a/websocket.el
+++ b/websocket.el
@@ -5,7 +5,7 @@
 ;; Author: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Maintainer: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Keywords: Communication, Websocket, Server
-;; Version: 0.93.1
+;; Version: 1.0
 ;;
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -101,7 +101,7 @@ same for the protocols.
   accept-string
   (inflight-input nil))
 
-(defvar websocket-version "0.93.1"
+(defvar websocket-version "1.0"
   "Version numbers of this version of websocket.el.")
 
 (defvar websocket-debug nil

commit a0a66f2f6a1edf5368251bca7e76cafe2232fd1f
Author: Leo Liu <address@hidden>
Date:   Mon Oct 8 22:21:47 2012 +0800

    Make minibuffer prompt more informative

diff --git a/ack.el b/ack.el
index d97335d..8e85531 100644
--- a/ack.el
+++ b/ack.el
@@ -267,6 +267,13 @@ This gets tacked on the end of the generated expressions.")
                 (ansi-color-apply-on-region beg ack--ansi-color-last-marker))
               nil))))))
 
+(defun ack-update-minibuffer-prompt (prompt)
+  "Visually replace minibuffer prompt with PROMPT."
+  (when (minibufferp)
+    (let ((inhibit-read-only t))
+      (put-text-property
+       (point-min) (minibuffer-prompt-end) 'display prompt))))
+
 (defun ack-skel-file ()
   "Insert a template for case-insensitive file name search."
   (interactive)
@@ -285,10 +292,13 @@ This gets tacked on the end of the generated 
expressions.")
          (root (or (ack-guess-project-root default-directory regexp)
                    (error "Cannot locate vc project root")))
          (which (car (directory-files root nil regexp)))
+         (backend (downcase (substring which 1)))
          (cmd (or (cdr (assoc which ack-vc-grep-commands))
-                  (error "No command provided for `%s grep'"
-                         (substring which 1)))))
+                  (error "No command provided for `%s grep'" backend))))
     (setq project-root root)
+    (ack-update-minibuffer-prompt
+     (format "Run %s grep in `%s': " backend
+             (file-name-nondirectory (directory-file-name project-root))))
     (delete-minibuffer-contents)
     (skeleton-insert '(nil cmd " '" _ "'"))))
 
@@ -338,16 +348,19 @@ minibuffer:
 
 \\{ack-minibuffer-local-map}"
   (interactive
-   (let ((project-root (funcall ack-default-directory-function
-                                current-prefix-arg))
+   (let ((project-root (or (funcall ack-default-directory-function
+                                    current-prefix-arg)
+                           default-directory))
          ;; Disable completion cycling; see http://debbugs.gnu.org/12221
          (completion-cycle-threshold nil))
      (list (minibuffer-with-setup-hook (if (>= emacs-major-version 24)
                                            'shell-completion-vars
                                          'pcomplete-shell-setup)
-             (read-from-minibuffer "Run ack (like this): "
-                                   ack-command ack-minibuffer-local-map
-                                   nil 'ack-history))
+             (read-from-minibuffer
+              (format "Run ack in `%s': "
+                      (file-name-nondirectory
+                       (directory-file-name project-root)))
+              ack-command ack-minibuffer-local-map nil 'ack-history))
            project-root)))
   (let ((default-directory (expand-file-name
                             (or directory default-directory))))

commit 2583c1b67ff8abe6341bc7a1fc661eb40d75694a
Author: Leo Liu <address@hidden>
Date:   Mon Oct 8 17:20:29 2012 +0800

    Merge changes from GNU ELPA

diff --git a/README.rst b/README.rst
index f702340..96cbb64 100644
--- a/README.rst
+++ b/README.rst
@@ -72,9 +72,9 @@ options while ``M-x ack`` or in shell/eshell.
 Usage
 -----
 
-- ``M-x ack`` and provide a pattern to search.
-- ``C-u M-x ack`` like ``M-x ack`` but allow you to select a
-  directory to search.
+- Type ``M-x ack`` and provide a pattern to search.
+- Type ``C-u M-x ack`` to search from current project root.
+- Type ``C-u C-u M-x ack`` to interactively choose a directory to search.
 
 While reading ack command and args from the minibuffer, the following
 key bindings may be useful:
diff --git a/ack.el b/ack.el
index 78bfd81..d97335d 100644
--- a/ack.el
+++ b/ack.el
@@ -1,6 +1,6 @@
 ;;; ack.el --- Emacs interface to ack
 
-;; Copyright (C) 2012  Leo Liu
+;; Copyright (C) 2012  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
 ;; Version: 0.8
diff --git a/pcmpl-ack.el b/pcmpl-ack.el
index dfac435..ea504a8 100644
--- a/pcmpl-ack.el
+++ b/pcmpl-ack.el
@@ -1,6 +1,6 @@
 ;;; pcmpl-ack.el --- completion for ack tool
 
-;; Copyright (C) 2012  Leo Liu
+;; Copyright (C) 2012  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
 ;; Keywords: tools, processes, convenience

commit 0fce282ff01c002509443372fec2279794f89cf4
Merge: b65328c 297244f
Author: Andrew Hyatt <address@hidden>
Date:   Sun Oct 7 20:48:30 2012 -0700

    Merge pull request #26 from tkf/better-wss-error-for-emacs-23
    
    Better wss error for emacs 23


commit 297244fcfd3766c1cd741b90d630d85f9d9a0258
Author: Takafumi Arakaki <address@hidden>
Date:   Sat Oct 6 22:42:22 2012 +0200

    Document the new error websocket-wss-needs-emacs-24

diff --git a/websocket.el b/websocket.el
index 1d9164c..e96a904 100644
--- a/websocket.el
+++ b/websocket.el
@@ -620,7 +620,12 @@ websocket processing, all of them having the 
error-condition
 `websocket-error' in addition to their own symbol:
 
 `websocket-unsupported-protocol': Data in the error signal is the
-protocol (such as \"wss\") that is unsupported.
+protocol that is unsupported.  For example, giving a URL starting
+with http by mistake raises this error.
+
+`websocket-wss-needs-emacs-24': Trying to connect wss protocol
+using Emacs < 24 raises this error.  You can catch this error
+also by `websocket-unsupported-protocol'.
 
 `websocket-received-error-http-response': Data in the error
 signal is the integer error number.

commit 99ab8c8ae50995afced95712e11bfa21ef02c71e
Author: Takafumi Arakaki <address@hidden>
Date:   Sat Oct 6 22:32:45 2012 +0200

    Add a new error websocket-wss-needs-emacs-24

diff --git a/websocket.el b/websocket.el
index 58238d0..1d9164c 100644
--- a/websocket.el
+++ b/websocket.el
@@ -371,6 +371,11 @@ the frame finishes.  If the frame is not completed, return 
NIL."
 (put 'websocket-unsupported-protocol 'error-conditions
      '(error websocket-error websocket-unsupported-protocol))
 (put 'websocket-unsupported-protocol 'error-message "Unsupported websocket 
protocol")
+(put 'websocket-wss-needs-emacs-24 'error-conditions
+     '(error websocket-error websocket-unsupported-protocol
+             websocket-wss-needs-emacs-24))
+(put 'websocket-wss-needs-emacs-24 'error-message
+     "wss protocol is not supported for Emacs before version 24.")
 (put 'websocket-received-error-http-response 'error-conditions
      '(error websocket-error websocket-received-error-http-response))
 (put 'websocket-received-error-http-response 'error-message
@@ -646,7 +651,7 @@ describing the problem with the frame.
                          (condition-case-no-debug nil
                              (open-network-stream name buf host port :type 
type :nowait nil)
                            (wrong-number-of-arguments
-                            (signal 'websocket-unsupported-protocol "wss")))))
+                            (signal 'websocket-wss-needs-emacs-24 "wss")))))
                  (signal 'websocket-unsupported-protocol (url-type 
url-struct))))
          (websocket (websocket-inner-create
                      :conn conn

commit 3c5871ba43930d0aef427559e643b8ba32aac043
Author: Takafumi Arakaki <address@hidden>
Date:   Sat Oct 6 22:27:57 2012 +0200

    Fix error message for websocket-unsupported-protocol

diff --git a/websocket.el b/websocket.el
index c340e63..58238d0 100644
--- a/websocket.el
+++ b/websocket.el
@@ -370,7 +370,7 @@ the frame finishes.  If the frame is not completed, return 
NIL."
 ;; Error symbols in use by the library
 (put 'websocket-unsupported-protocol 'error-conditions
      '(error websocket-error websocket-unsupported-protocol))
-(put 'websocket-unsupported-protocol 'error-message "Unsupport websocket 
protocol")
+(put 'websocket-unsupported-protocol 'error-message "Unsupported websocket 
protocol")
 (put 'websocket-received-error-http-response 'error-conditions
      '(error websocket-error websocket-received-error-http-response))
 (put 'websocket-received-error-http-response 'error-message

commit 379547c62aa3dfd2b20474a1a68f42d3df0bdd72
Author: Leo Liu <address@hidden>
Date:   Thu Oct 4 18:47:18 2012 +0800

    Release version 0.8

diff --git a/README.rst b/README.rst
index 8d07e85..f702340 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
 ==========================================
  Emacs Interface to command-line tool ack
 ==========================================
- 
+
 From http://betterthangrep.com/
 
     ack is a tool like grep, designed for programmers with large trees
@@ -10,6 +10,8 @@ From http://betterthangrep.com/
     ack is written purely in Perl, and takes advantage of the power of
     Perl's regular expressions.
 
+This package is part of `GNU ELPA <http://elpa.gnu.org>`_.
+
 Feature requests and bug reports are welcome. Thanks.
 
 Features
@@ -81,6 +83,11 @@ key bindings may be useful:
 - ``M-G`` => insert a template for ``git grep``, ``hg grep`` or ``bzr grep``
 - ``TAB`` => completion for ack options
 
+Bugs
+----
+
+https://github.com/leoliu/ack-el/issues
+
 Contributors
 ------------
 Phillip Lord
diff --git a/ack.el b/ack.el
index 80ed813..78bfd81 100644
--- a/ack.el
+++ b/ack.el
@@ -3,9 +3,10 @@
 ;; Copyright (C) 2012  Leo Liu
 
 ;; Author: Leo Liu <address@hidden>
+;; Version: 0.8
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
-;; Version: 0.7
+;; URL: https://github.com/leoliu/ack-el
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
diff --git a/pcmpl-ack.el b/pcmpl-ack.el
index 64ddff4..dfac435 100644
--- a/pcmpl-ack.el
+++ b/pcmpl-ack.el
@@ -5,6 +5,7 @@
 ;; Author: Leo Liu <address@hidden>
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-09-26
+;; URL: https://github.com/leoliu/ack-el
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by

commit 1be7648c0248bb95505c2c26b1bef70c2cf38ebe
Author: Leo Liu <address@hidden>
Date:   Thu Oct 4 18:20:25 2012 +0800

    Add 'bzr grep' to ack-vc-grep-commands

diff --git a/README.rst b/README.rst
index 882ee8c..8d07e85 100644
--- a/README.rst
+++ b/README.rst
@@ -18,7 +18,7 @@ Features
 - Neither ``--nogroup`` nor ``--noheading`` is required
 - Handle colors using the standard library ``ansi-color.el``
 - Completion for ack options while reading from the minibuffer
-- Support ``git grep`` and ``hg grep``
+- Support ``git grep``, ``hg grep`` and ``bzr grep``
 - Support both emacs 23 and 24
 
 Screenshots
@@ -78,7 +78,7 @@ While reading ack command and args from the minibuffer, the 
following
 key bindings may be useful:
 
 - ``M-I`` => insert a template for case-insensitive file name search
-- ``M-G`` => insert a template for ``git grep`` or ``hg grep``
+- ``M-G`` => insert a template for ``git grep``, ``hg grep`` or ``bzr grep``
 - ``TAB`` => completion for ack options
 
 Contributors
diff --git a/ack.el b/ack.el
index e5b6e5c..80ed813 100644
--- a/ack.el
+++ b/ack.el
@@ -57,9 +57,10 @@ environment variable and ~/.ackrc, which you can disable by 
the
   :group 'ack)
 
 (defcustom ack-vc-grep-commands
-  '((".git" . "git --no-pager grep -i -n --color")
-    ;; (".bzr" . "bzr grep")
-    (".hg" . "hg grep -i -n"))
+  '((".git" . "git --no-pager grep --color -n -i")
+    (".hg" . "hg grep -n -i")
+    ;; Plugin bzr-grep required for bzr < 2.6
+    (".bzr" . "bzr grep --color=always -n -i"))
   "An alist of vc grep commands for `ack-skel-vc-grep'.
 Each element is of the form (VC_DIR . CMD)."
   :type '(repeat (cons string string))
@@ -225,6 +226,7 @@ This gets tacked on the end of the generated expressions.")
 (defvar ack-process-setup-function 'ack-process-setup)
 
 (defun ack-process-setup ()
+  ;; Handle `hg grep' output
   (when (string-match-p "^[ \t]*hg[ \t]" (car compilation-arguments))
     (setq compilation-error-regexp-alist
           '(("^\\(.+?:[0-9]+:\\)\\(?:\\([0-9]+\\):\\)?" 1 2)))
@@ -236,6 +238,16 @@ This gets tacked on the end of the generated expressions.")
             (save-match-data
               (if (string-match "\\(.+\\):\\([0-9]+\\):" file)
                   (match-string 1 file)
+                file)))))
+  ;; Handle `bzr grep' output
+  (when (string-match-p "^[ \t]*bzr[ \t]" (car compilation-arguments))
+    (make-local-variable 'compilation-parse-errors-filename-function)
+    (setq compilation-parse-errors-filename-function
+          (lambda (file)
+            (save-match-data
+              ;; 'bzr grep -r' has files like `termcolor.py~147'
+              (if (string-match "\\(.+\\)~\\([0-9]+\\)" file)
+                  (match-string 1 file)
                 file))))))
 
 (define-compilation-mode ack-mode "Ack"

commit 88ada6dc4f6228bdd03ebc4eb0675ab54d79d387
Author: Leo Liu <address@hidden>
Date:   Thu Oct 4 14:48:06 2012 +0800

    New user variable ack-default-directory-function
    
    to decide default directory to run `ack'.
    Rename ack-project-pattern-list to ack-project-root-patterns.

diff --git a/ack.el b/ack.el
index 4884e9f..e5b6e5c 100644
--- a/ack.el
+++ b/ack.el
@@ -37,26 +37,6 @@
   :group 'tools
   :group 'processes)
 
-(defcustom ack-project-pattern-list
-  (list (concat "\\`" (regexp-quote dir-locals-file) "\\'")
-        "\\`Project\\.ede\\'"
-        "\\.xcodeproj\\'"         ; xcode
-        "\\`\\.ropeproject\\'"    ; python rope
-        ;; ".git" ".svn" ".hg" ".bzr" ".CVS"
-        "\\`\\.\\(?:CVS\\|bzr\\|git\\|hg\\|svn\\)\\'")
-  "A list of regexps that match files in a project root."
-  :type '(repeat string)
-  :group 'ack)
-
-(defcustom ack-vc-grep-commands
-  '((".git" . "git --no-pager grep -i -n --color")
-    ;; (".bzr" . "bzr grep")
-    (".hg" . "hg grep -i -n"))
-  "An alist of vc grep commands for `ack-skel-vc-grep'.
-Each element is of the form (VC_DIR . CMD)."
-  :type '(repeat (cons string string))
-  :group 'ack)
-
 ;; Used implicitly by `define-compilation-mode'
 (defcustom ack-scroll-output nil
   "Similar to `compilation-scroll-output' but for the *Ack* buffer."
@@ -76,6 +56,32 @@ environment variable and ~/.ackrc, which you can disable by 
the
   :type 'string
   :group 'ack)
 
+(defcustom ack-vc-grep-commands
+  '((".git" . "git --no-pager grep -i -n --color")
+    ;; (".bzr" . "bzr grep")
+    (".hg" . "hg grep -i -n"))
+  "An alist of vc grep commands for `ack-skel-vc-grep'.
+Each element is of the form (VC_DIR . CMD)."
+  :type '(repeat (cons string string))
+  :group 'ack)
+
+(defcustom ack-default-directory-function 'ack-default-directory
+  "A function to return the default directory for `ack'.
+It is called with one arg, the prefix arg to `ack'."
+  :type 'function
+  :group 'ack)
+
+(defcustom ack-project-root-patterns
+  (list (concat "\\`" (regexp-quote dir-locals-file) "\\'")
+        "\\`Project\\.ede\\'"
+        "\\.xcodeproj\\'"               ; xcode
+        "\\`\\.ropeproject\\'"          ; python rope
+        "\\`\\.\\(?:CVS\\|bzr\\|git\\|hg\\|svn\\)\\'")
+  "A list of regexps to match files in a project root.
+Used by `ack-guess-project-root'."
+  :type '(repeat string)
+  :group 'ack)
+
 ;;; ======== END of USER OPTIONS ========
 
 (defvar ack-history nil "History list for ack.")
@@ -249,7 +255,7 @@ This gets tacked on the end of the generated expressions.")
               nil))))))
 
 (defun ack-skel-file ()
-  "Insert a template for case-insensitive filename search."
+  "Insert a template for case-insensitive file name search."
   (interactive)
   (delete-minibuffer-contents)
   (let ((ack (or (car (split-string ack-command nil t)) "ack")))
@@ -287,7 +293,7 @@ This gets tacked on the end of the generated expressions.")
 
 (defun ack-guess-project-root (start-directory &optional regexp)
   (let ((regexp (or regexp
-                    (mapconcat 'identity ack-project-pattern-list "\\|")))
+                    (mapconcat 'identity ack-project-root-patterns "\\|")))
         (parent (file-name-directory
                  (directory-file-name (expand-file-name start-directory)))))
     (if (directory-files start-directory nil regexp)
@@ -295,18 +301,32 @@ This gets tacked on the end of the generated 
expressions.")
       (unless (equal parent start-directory)
         (ack-guess-project-root parent regexp)))))
 
+(defun ack-default-directory (arg)
+  "A function for `ack-default-directory-function'.
+With no \\[universal-argument], return `default-directory';
+With one \\[universal-argument], find the project root according to
+`ack-project-root-patterns';
+Otherwise, interactively choose a directory."
+  (cond
+   ((not arg) default-directory)
+   ((= (prefix-numeric-value arg) 4)
+    (or (ack-guess-project-root default-directory)
+        (ack-default-directory '(16))))
+   (t (read-directory-name "In directory: " nil nil t))))
+
 ;;;###autoload
 (defun ack (command-args &optional directory)
   "Run ack using COMMAND-ARGS and collect output in a buffer.
-With prefix, ask for the DIRECTORY to run ack; otherwise the
-current project root is used.
+When called interactively, the value of DIRECTORY is provided by
+`ack-default-directory-function'.
 
 The following keys are available while reading from the
 minibuffer:
 
 \\{ack-minibuffer-local-map}"
   (interactive
-   (let ((project-root)
+   (let ((project-root (funcall ack-default-directory-function
+                                current-prefix-arg))
          ;; Disable completion cycling; see http://debbugs.gnu.org/12221
          (completion-cycle-threshold nil))
      (list (minibuffer-with-setup-hook (if (>= emacs-major-version 24)
@@ -315,10 +335,7 @@ minibuffer:
              (read-from-minibuffer "Run ack (like this): "
                                    ack-command ack-minibuffer-local-map
                                    nil 'ack-history))
-           (if current-prefix-arg
-               (read-directory-name "In directory: " nil nil t)
-             (or project-root
-                 (ack-guess-project-root default-directory))))))
+           project-root)))
   (let ((default-directory (expand-file-name
                             (or directory default-directory))))
     (compilation-start command-args 'ack-mode)))

commit a2e8934cfadb242af6df209703311b062d72d448
Author: Leo Liu <address@hidden>
Date:   Wed Oct 3 23:37:46 2012 +0800

    Work around bug http://debbugs.gnu.org/12221

diff --git a/ack.el b/ack.el
index 820b842..4884e9f 100644
--- a/ack.el
+++ b/ack.el
@@ -306,7 +306,9 @@ minibuffer:
 
 \\{ack-minibuffer-local-map}"
   (interactive
-   (let ((project-root))
+   (let ((project-root)
+         ;; Disable completion cycling; see http://debbugs.gnu.org/12221
+         (completion-cycle-threshold nil))
      (list (minibuffer-with-setup-hook (if (>= emacs-major-version 24)
                                            'shell-completion-vars
                                          'pcomplete-shell-setup)

commit 6b3f092e023313c5a00c5cb1796b4ba78039e779
Author: Dmitry Gutov <address@hidden>
Date:   Wed Oct 3 05:31:10 2012 +0400

    Show keybindings in the mode description
    
    Close #71

diff --git a/js2-mode.el b/js2-mode.el
index 0281531..1ba5318 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -2105,17 +2105,17 @@ modifications to the buffer."
   (declare (indent 0) (debug t))
   (let ((modified (make-symbol "modified")))
     `(let ((,modified (buffer-modified-p))
-          (inhibit-read-only t)
-          (inhibit-modification-hooks t)
-          (buffer-undo-list t)
-          (deactivate-mark nil)
-          ;; Apparently these avoid file locking problems.
-          (buffer-file-name nil)
-          (buffer-file-truename nil))
+           (inhibit-read-only t)
+           (inhibit-modification-hooks t)
+           (buffer-undo-list t)
+           (deactivate-mark nil)
+           ;; Apparently these avoid file locking problems.
+           (buffer-file-name nil)
+           (buffer-file-truename nil))
        (unwind-protect
-          (progn ,@body)
-        (unless ,modified
-          (restore-buffer-modified-p nil))))))
+           (progn ,@body)
+         (unless ,modified
+           (restore-buffer-modified-p nil))))))
 
 (defmacro js2-with-underscore-as-word-syntax (&rest body)
   "Evaluate BODY with the _ character set to be word-syntax."
@@ -9945,20 +9945,20 @@ indented to the same column as the current line."
   (save-excursion
     (save-match-data
       (when (looking-at "\\s-*\\<while\\>")
-       (if (save-excursion
-             (skip-chars-backward "[ \t\n]*}")
-             (looking-at "[ \t\n]*}"))
-           (save-excursion
-             (backward-list) (backward-word 1) (looking-at "\\<do\\>"))
-         (js2-re-search-backward "\\<do\\>" (point-at-bol) t)
-         (or (looking-at "\\<do\\>")
-             (let ((saved-indent (current-indentation)))
-               (while (and (js2-re-search-backward "^[ \t]*\\<" nil t)
-                           (/= (current-indentation) saved-indent)))
-               (and (looking-at "[ \t]*\\<do\\>")
-                    (not (js2-re-search-forward
-                          "\\<while\\>" (point-at-eol) t))
-                    (= (current-indentation) saved-indent)))))))))
+        (if (save-excursion
+              (skip-chars-backward "[ \t\n]*}")
+              (looking-at "[ \t\n]*}"))
+            (save-excursion
+              (backward-list) (backward-word 1) (looking-at "\\<do\\>"))
+          (js2-re-search-backward "\\<do\\>" (point-at-bol) t)
+          (or (looking-at "\\<do\\>")
+              (let ((saved-indent (current-indentation)))
+                (while (and (js2-re-search-backward "^[ \t]*\\<" nil t)
+                            (/= (current-indentation) saved-indent)))
+                (and (looking-at "[ \t]*\\<do\\>")
+                     (not (js2-re-search-forward
+                           "\\<while\\>" (point-at-eol) t))
+                     (= (current-indentation) saved-indent)))))))))
 
 (defun js2-multiline-decl-indentation ()
   "Returns the declaration indentation column if the current line belongs
@@ -10430,7 +10430,9 @@ If so, we don't ever want to use bounce-indent."
 
 ;;;###autoload
 (defun js2-mode ()
-  "Major mode for editing JavaScript code."
+  "Major mode for editing JavaScript code.
+
+\\{js2-mode-map}"
   (interactive)
   (kill-all-local-variables)
   (set-syntax-table js2-mode-syntax-table)

commit 389992b77b25bfd1cb7e4492965ed8a5f1ff852d
Author: Leo Liu <address@hidden>
Date:   Tue Oct 2 17:41:32 2012 +0800

    Parse ack options on the fly
    
    to support both ack 1.x and 2.x options.

diff --git a/pcmpl-ack.el b/pcmpl-ack.el
index ace80d2..64ddff4 100644
--- a/pcmpl-ack.el
+++ b/pcmpl-ack.el
@@ -30,80 +30,21 @@
 ;; Usage:
 ;;   - To complete short options type '-' first
 ;;   - To complete long options type '--' first
-;;   - Color name completion is also supported following
-;;       --color-filename=, --color-match= and --color-lineno=.
+;;   - Color name completion is supported following
+;;       --color-filename=, --color-match= and --color-lineno=
+;;   - Type completion is supported following --type=
 
 ;;; Code:
 
 (require 'pcomplete)
 
-(defvar pcmpl-ack-short-options
-  (mapconcat (lambda (o) (substring o 1))
-             '("-a" "-A" "-B" "-C" "-c" "-f" "-G" "-g"
-               "-H" "-h" "-i" "-l" "-L" "-m" "-n"
-               "-o" "-Q" "-r" "-R"
-               "-u" "-v" "-w" "-1")
-             "")
-  "Short options for the `ack' command.")
-
-(defvar pcmpl-ack-long-options
-  '("--after-context="
-    "--all-types"
-    "--before-context="
-    "--break"
-    "--nobreak"
-    "--color"
-    "--nocolor"
-    "--colour"
-    "--nocolour"
-    "--color-filename="
-    "--color-match="
-    "--color-lineno="
-    "--column"
-    "--context="
-    "--count"
-    "--env"
-    "--noenv"
-    "--files-with-matches"
-    "--files-without-matches"
-    "--flush"
-    "--follow"
-    "--nofollow"
-    "--group"
-    "--nogroup"
-    "--heading"
-    "--noheading"
-    "--ignore-case"
-    "--ignore-dir="
-    "--noignore-dir="
-    "--invert-match"
-    "--line="
-    "--literal"
-    "--match"
-    "--max-count="
-    "--no-filename"
-    "--output="
-    "--pager="
-    "--nopager"
-    "--passthru"
-    "--print0"
-    "--recurse"
-    "--norecurse"
-    "--smart-case"
-    "--nosmart-case"
-    "--sort-files"
-    "--type="
-    "--type-add"
-    "--type-set"
-    "--unrestricted"
-    "--with-filename"
-    "--word-regexp"
-    "--help"
-    "--help-types"
-    "--man"
-    "--thpppt"
-    "--version")
-  "Long options for the `ack' command.")
+(defcustom pcmpl-ack-program
+  (file-name-nondirectory (or (executable-find "ack-grep")
+                              (executable-find "ack")
+                              "ack"))
+  "Name of the ack program."
+  :type 'file
+  :group 'pcomplete)
 
 (defvar pcmpl-ack-color-options
   '("clear"
@@ -131,13 +72,47 @@
     "on_white")
   "Color names for the `ack' command.")
 
+(defun pcmpl-ack-run (buffer &rest args)
+  "Run ack with ARGS and send the output to BUFFER."
+  (condition-case nil
+      (apply 'call-process (or pcmpl-ack-program "ack") nil buffer nil args)
+    (file-error -1)))
+
+(defun pcmpl-ack-short-options ()
+  "Short options for the `ack' command."
+  (with-temp-buffer
+    (let (options)
+      (when (zerop (pcmpl-ack-run t "--help"))
+        (goto-char (point-min))
+        (while (re-search-forward "^  -\\([^-]\\)" nil t)
+          (push (match-string 1) options))
+        (mapconcat 'identity (nreverse options) "")))))
+
+(defun pcmpl-ack-long-options (&optional arg)
+  "Long options for the `ack' command."
+  (with-temp-buffer
+    (let (options)
+      (when (zerop (pcmpl-ack-run t (or arg "--help")))
+        (goto-char (point-min))
+        (while (re-search-forward
+                "\\(?:   ?\\|, \\)\\(--\\(\\[no\\]\\)?\\([[:alnum:]-]+=?\\)\\)"
+                nil t)
+          (if (not (match-string 2))
+              (push (match-string 1) options)
+            (push (concat "--" (match-string 3)) options)
+            (push (concat "--no" (match-string 3)) options)))
+        (nreverse options)))))
+
+(defun pcmpl-ack-type-options ()
+  "A list of types for the `ack' command."
+  (pcmpl-ack-long-options "--help-types"))
+
 ;;;###autoload
 (defun pcomplete/ack ()
   "Completion for the `ack' command.
 Start an argument with '-' to complete short options and '--' for
 long options."
   ;; No space after =
-  (add-to-list 'pcomplete-suffix-list ?=)
   (while t
     (if (pcomplete-match "^-" 0)
         (cond
@@ -147,9 +122,15 @@ long options."
          ((pcomplete-match "^--\\(?:no\\)?ignore-dir=\\(\\S-*\\)" 0)
           (pcomplete-here* (pcomplete-dirs)
                            (pcomplete-match-string 1 0) t))
+         ((pcomplete-match "^--type=\\(\\S-*\\)" 0)
+          (pcomplete-here* (mapcar (lambda (type-option)
+                                     (substring type-option 2))
+                                   (pcmpl-ack-type-options))
+                           (pcomplete-match-string 1 0) t))
          ((pcomplete-match "^--" 0)
-          (pcomplete-here* pcmpl-ack-long-options))
-         (t (pcomplete-opt pcmpl-ack-short-options)))
+          (pcomplete-here* (append (pcmpl-ack-long-options)
+                                   (pcmpl-ack-type-options))))
+         (t (pcomplete-opt (pcmpl-ack-short-options))))
       (pcomplete-here* (pcomplete-dirs-or-entries)))))
 
 ;;;###autoload

commit fa107c54964494dbe5c4b0e850c34c0350a4160a
Author: Leo Liu <address@hidden>
Date:   Tue Oct 2 17:22:26 2012 +0800

    Document last change

diff --git a/README.rst b/README.rst
index 24d0413..882ee8c 100644
--- a/README.rst
+++ b/README.rst
@@ -18,11 +18,19 @@ Features
 - Neither ``--nogroup`` nor ``--noheading`` is required
 - Handle colors using the standard library ``ansi-color.el``
 - Completion for ack options while reading from the minibuffer
+- Support ``git grep`` and ``hg grep``
 - Support both emacs 23 and 24
 
 Screenshots
 -----------
 
+.. figure:: http://i.imgur.com/mrk8k.png
+   :width: 400 px
+   :target: http://i.imgur.com/mrk8k.png
+   :alt: ack-git-grep.png
+
+   ``git --no-pager grep -n --color 'hg grep'``
+
 .. figure:: http://i.imgur.com/a72Ap.png
    :width: 400 px
    :target: http://i.imgur.com/a72Ap.png
@@ -48,8 +56,8 @@ or::
 
  (autoload 'ack "ack" nil t)
 
-Completion
-~~~~~~~~~~
+Completion (optional)
+~~~~~~~~~~~~~~~~~~~~~
 
 Place ``pcmpl-ack.el`` in the ``load-path`` and add::
 
@@ -70,6 +78,7 @@ While reading ack command and args from the minibuffer, the 
following
 key bindings may be useful:
 
 - ``M-I`` => insert a template for case-insensitive file name search
+- ``M-G`` => insert a template for ``git grep`` or ``hg grep``
 - ``TAB`` => completion for ack options
 
 Contributors

commit f0392a63145a1935e97092100af687482e64aaa9
Author: Leo Liu <address@hidden>
Date:   Mon Oct 1 00:02:24 2012 +0800

    Bind new template command ack-skel-vc-grep to M-G

diff --git a/ack.el b/ack.el
index cddb006..820b842 100644
--- a/ack.el
+++ b/ack.el
@@ -48,6 +48,15 @@
   :type '(repeat string)
   :group 'ack)
 
+(defcustom ack-vc-grep-commands
+  '((".git" . "git --no-pager grep -i -n --color")
+    ;; (".bzr" . "bzr grep")
+    (".hg" . "hg grep -i -n"))
+  "An alist of vc grep commands for `ack-skel-vc-grep'.
+Each element is of the form (VC_DIR . CMD)."
+  :type '(repeat (cons string string))
+  :group 'ack)
+
 ;; Used implicitly by `define-compilation-mode'
 (defcustom ack-scroll-output nil
   "Similar to `compilation-scroll-output' but for the *Ack* buffer."
@@ -207,6 +216,22 @@ This gets tacked on the end of the generated expressions.")
 
 (defvar ack--ansi-color-last-marker)
 
+(defvar ack-process-setup-function 'ack-process-setup)
+
+(defun ack-process-setup ()
+  (when (string-match-p "^[ \t]*hg[ \t]" (car compilation-arguments))
+    (setq compilation-error-regexp-alist
+          '(("^\\(.+?:[0-9]+:\\)\\(?:\\([0-9]+\\):\\)?" 1 2)))
+    (when (< emacs-major-version 24)
+      (setq font-lock-keywords (compilation-mode-font-lock-keywords)))
+    (make-local-variable 'compilation-parse-errors-filename-function)
+    (setq compilation-parse-errors-filename-function
+          (lambda (file)
+            (save-match-data
+              (if (string-match "\\(.+\\):\\([0-9]+\\):" file)
+                  (match-string 1 file)
+                file))))))
+
 (define-compilation-mode ack-mode "Ack"
   "A compilation mode tailored for ack."
   (set (make-local-variable 'compilation-disable-input) t)
@@ -230,6 +255,24 @@ This gets tacked on the end of the generated expressions.")
   (let ((ack (or (car (split-string ack-command nil t)) "ack")))
     (skeleton-insert '(nil ack " -g '(?i:" _ ")'"))))
 
+(defvar project-root)                   ; dynamically bound in `ack'
+
+(defun ack-skel-vc-grep ()
+  "Insert a template for vc grep search."
+  (interactive)
+  (let* ((regexp (concat "\\`" (regexp-opt
+                                (mapcar 'car ack-vc-grep-commands))
+                         "\\'"))
+         (root (or (ack-guess-project-root default-directory regexp)
+                   (error "Cannot locate vc project root")))
+         (which (car (directory-files root nil regexp)))
+         (cmd (or (cdr (assoc which ack-vc-grep-commands))
+                  (error "No command provided for `%s grep'"
+                         (substring which 1)))))
+    (setq project-root root)
+    (delete-minibuffer-contents)
+    (skeleton-insert '(nil cmd " '" _ "'"))))
+
 (defvar ack-minibuffer-local-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map minibuffer-local-map)
@@ -237,6 +280,7 @@ This gets tacked on the end of the generated expressions.")
                              'completion-at-point
                            'pcomplete))
     (define-key map "\M-I" 'ack-skel-file)
+    (define-key map "\M-G" 'ack-skel-vc-grep)
     (define-key map "'" 'skeleton-pair-insert-maybe)
     map)
   "Keymap used for reading `ack' command and args in minibuffer.")
@@ -262,15 +306,17 @@ minibuffer:
 
 \\{ack-minibuffer-local-map}"
   (interactive
-   (list (minibuffer-with-setup-hook (if (>= emacs-major-version 24)
-                                         'shell-completion-vars
-                                       'pcomplete-shell-setup)
-           (read-from-minibuffer "Run ack (like this): "
-                                 ack-command ack-minibuffer-local-map
-                                 nil 'ack-history))
-         (if current-prefix-arg
-             (read-directory-name "In directory: " nil nil t)
-           (ack-guess-project-root default-directory))))
+   (let ((project-root))
+     (list (minibuffer-with-setup-hook (if (>= emacs-major-version 24)
+                                           'shell-completion-vars
+                                         'pcomplete-shell-setup)
+             (read-from-minibuffer "Run ack (like this): "
+                                   ack-command ack-minibuffer-local-map
+                                   nil 'ack-history))
+           (if current-prefix-arg
+               (read-directory-name "In directory: " nil nil t)
+             (or project-root
+                 (ack-guess-project-root default-directory))))))
   (let ((default-directory (expand-file-name
                             (or directory default-directory))))
     (compilation-start command-args 'ack-mode)))

commit aefe34a40d41b3ec57c86e552b0c3e9f29cbdcad
Author: Leo Liu <address@hidden>
Date:   Sun Sep 30 18:09:32 2012 +0800

    Release version 0.7

diff --git a/README.rst b/README.rst
index 5178186..24d0413 100644
--- a/README.rst
+++ b/README.rst
@@ -12,6 +12,31 @@ From http://betterthangrep.com/
 
 Feature requests and bug reports are welcome. Thanks.
 
+Features
+--------
+
+- Neither ``--nogroup`` nor ``--noheading`` is required
+- Handle colors using the standard library ``ansi-color.el``
+- Completion for ack options while reading from the minibuffer
+- Support both emacs 23 and 24
+
+Screenshots
+-----------
+
+.. figure:: http://i.imgur.com/a72Ap.png
+   :width: 400 px
+   :target: http://i.imgur.com/a72Ap.png
+   :alt: ack-emacs23-1.png
+
+   ``ack --column 'ack is.*tool'``
+
+.. figure:: http://i.imgur.com/U2vFz.png
+   :width: 400 px
+   :target: http://i.imgur.com/U2vFz.png
+   :alt: ack-emacs23-2.png
+
+   ``ack --column --nogroup --nocolor 'ack is.*tool'``
+
 Install
 -------
 
@@ -37,15 +62,15 @@ options while ``M-x ack`` or in shell/eshell.
 Usage
 -----
 
-#. ``M-x ack`` and provide a pattern to search.
-#. ``C-u M-x ack`` like ``M-x ack`` but allow you to select a
-   directory to search.
+- ``M-x ack`` and provide a pattern to search.
+- ``C-u M-x ack`` like ``M-x ack`` but allow you to select a
+  directory to search.
 
 While reading ack command and args from the minibuffer, the following
 key bindings may be useful:
 
-#. ``M-I`` => insert a template for case-insensitive file name search
-#. ``TAB`` => completion for ack options
+- ``M-I`` => insert a template for case-insensitive file name search
+- ``TAB`` => completion for ack options
 
 Contributors
 ------------
diff --git a/ack.el b/ack.el
index 200505f..cddb006 100644
--- a/ack.el
+++ b/ack.el
@@ -5,7 +5,7 @@
 ;; Author: Leo Liu <address@hidden>
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
-;; Version: 0.6
+;; Version: 0.7
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -71,14 +71,12 @@ environment variable and ~/.ackrc, which you can disable by 
the
 
 (defvar ack-history nil "History list for ack.")
 
-;; Used implicitly by `define-compilation-mode'
 (defvar ack-first-column 0
   "Value to use for `compilation-first-column' in ack buffers.")
 
 (defvar ack-error-screen-columns nil
   "Value to use for `compilation-error-screen-columns' in ack buffers.")
 
-;; Used implicitly by `define-compilation-mode'
 (defvar ack-error "ack match"
   "Stem of message to print when no matches are found.")
 
@@ -93,7 +91,6 @@ This function is called from `compilation-filter-hook'."
                (put-text-property beg end 'ack-color t)))))
       (ansi-color-apply-on-region compilation-filter-start (point)))))
 
-;; Used implicitly by `define-compilation-mode'
 (defvar ack-mode-font-lock-keywords
   '(("^--$" 0 'shadow)
     ;; Command output lines.

commit 38e5c5efbdcb7606da9aa854e1603323095f5db1
Author: Leo Liu <address@hidden>
Date:   Sun Sep 30 17:49:53 2012 +0800

    Handle the output of 'ack --group --column' for emacs-23

diff --git a/ack.el b/ack.el
index 5ca50d8..200505f 100644
--- a/ack.el
+++ b/ack.el
@@ -151,6 +151,35 @@ This gets tacked on the end of the generated expressions.")
                        (min (1+ (line-end-position)) (point-max)) 'ack-file 
file)
     (list file)))
 
+;;; For emacs < 24
+(when (< emacs-major-version 24)
+  (defun ack--line (file col)
+    (if (string-match-p "\\`[1-9][0-9]*\\'" (car file))
+        (let ((has-ansi-color (overlays-at (match-beginning 1))))
+          ;; See `compilation-mode-font-lock-keywords' where there is
+          ;; overriding font-locking of FILE. Thus use the display
+          ;; property here to avoid being overridden.
+          (put-text-property
+           (match-beginning 1) (match-end 1)
+           'display
+           (propertize (match-string-no-properties 1)
+                       'face (list (and (not has-ansi-color)
+                                        compilation-line-face)
+                                   :weight 'normal :inherit 'underline)))
+          (list nil (ack--file)
+                (string-to-number (match-string 1))
+                (1- (string-to-number (match-string 3)))))
+      (put-text-property (match-beginning 3)
+                         (match-end 3)
+                         'font-lock-face compilation-line-face)
+      (list nil file
+            (string-to-number (match-string 3))
+            (when (match-string 4)
+              (put-text-property (match-beginning 4)
+                                 (match-end 4)
+                                 'font-lock-face compilation-column-face)
+              (1- (string-to-number (match-string 4))))))))
+
 ;;; In emacs-24 and above, `compilation-mode-font-lock-keywords' ->
 ;;; `compilation--ensure-parse' -> `compilation--parse-region' ->
 ;;; `compilation-parse-errors' -> `compilation-error-properties'.
@@ -161,19 +190,21 @@ This gets tacked on the end of the generated 
expressions.")
 ;;; after some transformation, so later entries can override earlier
 ;;; entries.
 ;;;
-;;; The output of 'ack --nocolor --group --column WHATEVER' matches
-;;; both regexps in `ack-regexp-alist' and this fails emacs-23 in
-;;; finding the right file.
+;;; The output of 'ack --group --column WHATEVER' matches both regexps
+;;; in `ack-regexp-alist' and this fails emacs-23 in finding the right
+;;; file. So ack--line is used to disambiguate this case.
 
 (defconst ack-error-regexp-alist
-  '(;; grouping line (--group or --heading)
+  `(;; grouping line (--group or --heading)
     ("^\\([1-9][0-9]*\\)\\(:\\|-\\)\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
      ack--file 1 (ack--column-start . ack--column-end)
      nil nil (4 compilation-column-face nil t))
     ;; none grouping line (--nogroup or --noheading)
     
("^\\(.+?\\)\\(:\\|-\\)\\([1-9][0-9]*\\)\\2\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
-     1 3 (ack--column-start . ack--column-end)
-     nil nil (4 compilation-column-face nil t))
+     ,@(if (>= emacs-major-version 24)
+           '(1 3 (ack--column-start . ack--column-end)
+               nil nil (4 compilation-column-face nil t))
+         '(1 ack--line 4)))
     ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
   "Ack version of `compilation-error-regexp-alist' (which see).")
 

commit 86e1a266379d22948aa24502aa744e6b4762c4ef
Author: Leo Liu <address@hidden>
Date:   Sun Sep 30 11:40:37 2012 +0800

    Fix ack-mode-font-lock-keywords for emacs-23

diff --git a/ack.el b/ack.el
index 97b3fdd..5ca50d8 100644
--- a/ack.el
+++ b/ack.el
@@ -99,11 +99,11 @@ This function is called from `compilation-filter-hook'."
     ;; Command output lines.
     (": \\(.+\\): \\(?:Permission denied\\|No such \\(?:file or 
directory\\|device or address\\)\\)$"
      1 'compilation-error)
-    ;; remove match from ack-regexp-alist before fontifying
-    ("^Ack \\(?:started\\|finished at\\).*"
-     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
+    ;; Remove match from ack-error-regexp-alist before fontifying
+    ("^Ack \\(?:started\\|finished\\) at.*"
+     (0 '(face nil compilation-message nil message nil help-echo nil 
mouse-face nil) t))
     ("^Ack \\(exited 
abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code 
\\([0-9]+\\)\\)?.*"
-     (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)
+     (0 '(face nil compilation-message nil message nil help-echo nil 
mouse-face nil) t)
      (1 'compilation-error)
      (2 'compilation-error nil t)))
   "Additional things to highlight in ack output.

commit 7a0ae5bc110f1082dcc24f63aa0feae9d420a65a
Author: Leo Liu <address@hidden>
Date:   Sun Sep 30 02:23:44 2012 +0800

    Rename ack-regexp-alist to ack-error-regexp-alist

diff --git a/ack.el b/ack.el
index c9f1372..97b3fdd 100644
--- a/ack.el
+++ b/ack.el
@@ -165,7 +165,7 @@ This gets tacked on the end of the generated expressions.")
 ;;; both regexps in `ack-regexp-alist' and this fails emacs-23 in
 ;;; finding the right file.
 
-(defconst ack-regexp-alist
+(defconst ack-error-regexp-alist
   '(;; grouping line (--group or --heading)
     ("^\\([1-9][0-9]*\\)\\(:\\|-\\)\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
      ack--file 1 (ack--column-start . ack--column-end)
@@ -184,8 +184,6 @@ This gets tacked on the end of the generated expressions.")
   (set (make-local-variable 'compilation-disable-input) t)
   (set (make-local-variable 'compilation-error-face)
        'compilation-info)
-  (set (make-local-variable 'compilation-error-regexp-alist)
-       ack-regexp-alist)
   (if (>= emacs-major-version 24)
       (add-hook 'compilation-filter-hook 'ack-filter nil t)
     (set (make-local-variable 'ack--ansi-color-last-marker)

commit 1237b491508e17f120b2bf72ceb7e08e772dc201
Author: Leo Liu <address@hidden>
Date:   Sun Sep 30 02:21:17 2012 +0800

    Better handling of column number highlighting

diff --git a/ack.el b/ack.el
index b457f86..c9f1372 100644
--- a/ack.el
+++ b/ack.el
@@ -122,9 +122,6 @@ This gets tacked on the end of the generated expressions.")
         (when mbeg (- mbeg beg)))
       ;; Use column number from `ack' itself if available
       (when (match-string 4)
-        (put-text-property (match-beginning 4)
-                           (match-end 4)
-                           'font-lock-face compilation-column-face)
         (1- (string-to-number (match-string 4))))))
 
 (defun ack--column-end ()
@@ -171,10 +168,12 @@ This gets tacked on the end of the generated 
expressions.")
 (defconst ack-regexp-alist
   '(;; grouping line (--group or --heading)
     ("^\\([1-9][0-9]*\\)\\(:\\|-\\)\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
-     ack--file 1 (ack--column-start . ack--column-end))
+     ack--file 1 (ack--column-start . ack--column-end)
+     nil nil (4 compilation-column-face nil t))
     ;; none grouping line (--nogroup or --noheading)
     
("^\\(.+?\\)\\(:\\|-\\)\\([1-9][0-9]*\\)\\2\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
-     1 3 (ack--column-start . ack--column-end))
+     1 3 (ack--column-start . ack--column-end)
+     nil nil (4 compilation-column-face nil t))
     ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
   "Ack version of `compilation-error-regexp-alist' (which see).")
 

commit ae1fdace89cf97de3bcafe044b8724c9c4d76028
Author: Leo Liu <address@hidden>
Date:   Sun Sep 30 02:00:23 2012 +0800

    Loose the requirement of --nocolor in emacs 23

diff --git a/ack.el b/ack.el
index 24c8775..b457f86 100644
--- a/ack.el
+++ b/ack.el
@@ -28,8 +28,8 @@
 ;;; Code:
 
 (require 'compile)
+(require 'ansi-color)
 (when (>= emacs-major-version 24)
-  (require 'ansi-color)
   (autoload 'shell-completion-vars "shell"))
 
 (defgroup ack nil
@@ -56,12 +56,9 @@
 
 (defcustom ack-command
   ;; Note: on GNU/Linux ack may be renamed to ack-grep
-  (let ((ack (or (executable-find "ack-grep")
-                 (executable-find "ack")
-                 "ack"))
-        (args (when (< emacs-major-version 24)
-                "--nocolor ")))
-    (concat (file-name-nondirectory ack) " " args))
+  (concat (file-name-nondirectory (or (executable-find "ack-grep")
+                                      (executable-find "ack")
+                                      "ack")) " ")
   "The default ack command for \\[ack].
 
 Note also options to ack can be specified in ACK_OPTIONS
@@ -181,6 +178,8 @@ This gets tacked on the end of the generated expressions.")
     ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
   "Ack version of `compilation-error-regexp-alist' (which see).")
 
+(defvar ack--ansi-color-last-marker)
+
 (define-compilation-mode ack-mode "Ack"
   "A compilation mode tailored for ack."
   (set (make-local-variable 'compilation-disable-input) t)
@@ -188,8 +187,16 @@ This gets tacked on the end of the generated expressions.")
        'compilation-info)
   (set (make-local-variable 'compilation-error-regexp-alist)
        ack-regexp-alist)
-  (when (boundp 'compilation-filter-hook)
-    (add-hook 'compilation-filter-hook 'ack-filter nil t)))
+  (if (>= emacs-major-version 24)
+      (add-hook 'compilation-filter-hook 'ack-filter nil t)
+    (set (make-local-variable 'ack--ansi-color-last-marker)
+         (point-min-marker))
+    (font-lock-add-keywords
+     nil '(((lambda (limit)
+              (let ((beg (marker-position ack--ansi-color-last-marker)))
+                (move-marker ack--ansi-color-last-marker limit)
+                (ansi-color-apply-on-region beg ack--ansi-color-last-marker))
+              nil))))))
 
 (defun ack-skel-file ()
   "Insert a template for case-insensitive filename search."

commit 511dd418fb002dfb636ebf9e0b05fce4c903ae34
Author: Leo Liu <address@hidden>
Date:   Sat Sep 29 15:54:55 2012 +0800

    Document problematic ack-regexp-alist for emacs-23

diff --git a/ack.el b/ack.el
index 61f7f29..24c8775 100644
--- a/ack.el
+++ b/ack.el
@@ -157,6 +157,20 @@ This gets tacked on the end of the generated expressions.")
                        (min (1+ (line-end-position)) (point-max)) 'ack-file 
file)
     (list file)))
 
+;;; In emacs-24 and above, `compilation-mode-font-lock-keywords' ->
+;;; `compilation--ensure-parse' -> `compilation--parse-region' ->
+;;; `compilation-parse-errors' -> `compilation-error-properties'.
+;;; `compilation-error-properties' returns nil if a previous pattern
+;;; in the regexp alist has already been applied in a region.
+;;;
+;;; In emacs-23, `ack-regexp-alist' is a part of `font-lock-keywords'
+;;; after some transformation, so later entries can override earlier
+;;; entries.
+;;;
+;;; The output of 'ack --nocolor --group --column WHATEVER' matches
+;;; both regexps in `ack-regexp-alist' and this fails emacs-23 in
+;;; finding the right file.
+
 (defconst ack-regexp-alist
   '(;; grouping line (--group or --heading)
     ("^\\([1-9][0-9]*\\)\\(:\\|-\\)\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"

commit be3031f0473ff47ed045e81c141b977af937b740
Author: Leo Liu <address@hidden>
Date:   Sat Sep 29 12:00:17 2012 +0800

    Revert "Fix ack-regexp-alist for emacs-23"
    
    This reverts commit 037cdcc2239a7bdf3b8ce61b7d8813eeba6fc856.

diff --git a/ack.el b/ack.el
index d9db9ba..61f7f29 100644
--- a/ack.el
+++ b/ack.el
@@ -60,7 +60,7 @@
                  (executable-find "ack")
                  "ack"))
         (args (when (< emacs-major-version 24)
-                "--nocolor --column ")))
+                "--nocolor ")))
     (concat (file-name-nondirectory ack) " " args))
   "The default ack command for \\[ack].
 
@@ -158,12 +158,12 @@ This gets tacked on the end of the generated 
expressions.")
     (list file)))
 
 (defconst ack-regexp-alist
-  '(;; none grouping line (--nogroup or --noheading)
-    
("^\\(.+?\\)\\(:\\|-\\)\\([1-9][0-9]*\\)\\2\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
-     1 3 (ack--column-start . ack--column-end))
-    ;; grouping line (--group or --heading)
+  '(;; grouping line (--group or --heading)
     ("^\\([1-9][0-9]*\\)\\(:\\|-\\)\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
      ack--file 1 (ack--column-start . ack--column-end))
+    ;; none grouping line (--nogroup or --noheading)
+    
("^\\(.+?\\)\\(:\\|-\\)\\([1-9][0-9]*\\)\\2\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
+     1 3 (ack--column-start . ack--column-end))
     ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
   "Ack version of `compilation-error-regexp-alist' (which see).")
 

commit 5b87a3e075ef777a8ed44245d5e05f35cf1828b9
Author: Leo Liu <address@hidden>
Date:   Fri Sep 28 23:37:00 2012 +0800

    Fix ack-regexp-alist for emacs-23
    
    In emacs 23, last matching element in ack-regexp-alist wins.

diff --git a/ack.el b/ack.el
index 61f7f29..d9db9ba 100644
--- a/ack.el
+++ b/ack.el
@@ -60,7 +60,7 @@
                  (executable-find "ack")
                  "ack"))
         (args (when (< emacs-major-version 24)
-                "--nocolor ")))
+                "--nocolor --column ")))
     (concat (file-name-nondirectory ack) " " args))
   "The default ack command for \\[ack].
 
@@ -158,12 +158,12 @@ This gets tacked on the end of the generated 
expressions.")
     (list file)))
 
 (defconst ack-regexp-alist
-  '(;; grouping line (--group or --heading)
-    ("^\\([1-9][0-9]*\\)\\(:\\|-\\)\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
-     ack--file 1 (ack--column-start . ack--column-end))
-    ;; none grouping line (--nogroup or --noheading)
+  '(;; none grouping line (--nogroup or --noheading)
     
("^\\(.+?\\)\\(:\\|-\\)\\([1-9][0-9]*\\)\\2\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
      1 3 (ack--column-start . ack--column-end))
+    ;; grouping line (--group or --heading)
+    ("^\\([1-9][0-9]*\\)\\(:\\|-\\)\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
+     ack--file 1 (ack--column-start . ack--column-end))
     ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
   "Ack version of `compilation-error-regexp-alist' (which see).")
 

commit 9947b8385420010495fad05bbcd42d73a46b49c3
Author: Leo Liu <address@hidden>
Date:   Fri Sep 28 18:48:36 2012 +0800

    Properly fontify file names in grouping output

diff --git a/ack.el b/ack.el
index a5ca03a..61f7f29 100644
--- a/ack.el
+++ b/ack.el
@@ -147,10 +147,14 @@ This gets tacked on the end of the generated 
expressions.")
                (forward-line -1)
                (looking-at-p "^--$")))
       (setq file (or (get-text-property (line-beginning-position) 'ack-file)
-                     (buffer-substring-no-properties
-                      (line-beginning-position) (line-end-position)))))
+                     (progn
+                       (put-text-property (line-beginning-position)
+                                          (line-end-position)
+                                          'font-lock-face 
compilation-info-face)
+                       (buffer-substring-no-properties
+                        (line-beginning-position) (line-end-position))))))
     (put-text-property (line-beginning-position)
-                       (1+ (line-end-position)) 'ack-file file)
+                       (min (1+ (line-end-position)) (point-max)) 'ack-file 
file)
     (list file)))
 
 (defconst ack-regexp-alist

commit b81dc1690b3cfd4153e7570bdae77894fbc9e0fa
Author: Leo Liu <address@hidden>
Date:   Fri Sep 28 13:33:32 2012 +0800

    Fixes for column number handling

diff --git a/ack.el b/ack.el
index c134846..a5ca03a 100644
--- a/ack.el
+++ b/ack.el
@@ -78,6 +78,9 @@ environment variable and ~/.ackrc, which you can disable by 
the
 (defvar ack-first-column 0
   "Value to use for `compilation-first-column' in ack buffers.")
 
+(defvar ack-error-screen-columns nil
+  "Value to use for `compilation-error-screen-columns' in ack buffers.")
+
 ;; Used implicitly by `define-compilation-mode'
 (defvar ack-error "ack match"
   "Stem of message to print when no matches are found.")
@@ -114,12 +117,18 @@ This gets tacked on the end of the generated 
expressions.")
   (defvar ack--column-end 'ack--column-end))
 
 (defun ack--column-start ()
-  (let* ((beg (match-end 0))
-         (end (save-excursion
-                (goto-char beg)
-                (line-end-position)))
-         (mbeg (text-property-any beg end 'ack-color t)))
-    (when mbeg (- mbeg beg))))
+  (or (let* ((beg (match-end 0))
+             (end (save-excursion
+                    (goto-char beg)
+                    (line-end-position)))
+             (mbeg (text-property-any beg end 'ack-color t)))
+        (when mbeg (- mbeg beg)))
+      ;; Use column number from `ack' itself if available
+      (when (match-string 4)
+        (put-text-property (match-beginning 4)
+                           (match-end 4)
+                           'font-lock-face compilation-column-face)
+        (1- (string-to-number (match-string 4))))))
 
 (defun ack--column-end ()
   (let* ((beg (match-end 0))
@@ -146,10 +155,10 @@ This gets tacked on the end of the generated 
expressions.")
 
 (defconst ack-regexp-alist
   '(;; grouping line (--group or --heading)
-    ("^\\([1-9][0-9]*\\)\\(:\\|-\\)\\(?:[1-9][0-9]*\\2\\)?"
+    ("^\\([1-9][0-9]*\\)\\(:\\|-\\)\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
      ack--file 1 (ack--column-start . ack--column-end))
     ;; none grouping line (--nogroup or --noheading)
-    ("^\\(.+?\\)\\(:\\|-\\)\\([1-9][0-9]*\\)\\2\\(?:\\([1-9][0-9]*\\)\\2\\)?"
+    
("^\\(.+?\\)\\(:\\|-\\)\\([1-9][0-9]*\\)\\2\\(?:\\(?4:[1-9][0-9]*\\)\\2\\)?"
      1 3 (ack--column-start . ack--column-end))
     ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1))
   "Ack version of `compilation-error-regexp-alist' (which see).")

commit 89d510f78de51c2300596577a5469428a105ccbf
Author: Leo Liu <address@hidden>
Date:   Fri Sep 28 10:00:00 2012 +0800

    Fix last change

diff --git a/README.rst b/README.rst
index ded6488..5178186 100644
--- a/README.rst
+++ b/README.rst
@@ -29,6 +29,7 @@ Completion
 Place ``pcmpl-ack.el`` in the ``load-path`` and add::
 
   (autoload 'pcomplete/ack "pcmpl-ack")
+  (autoload 'pcomplete/ack-grep "pcmpl-ack")
 
 to your init file. After this you will be able complete ``ack``
 options while ``M-x ack`` or in shell/eshell.
@@ -45,3 +46,7 @@ key bindings may be useful:
 
 #. ``M-I`` => insert a template for case-insensitive file name search
 #. ``TAB`` => completion for ack options
+
+Contributors
+------------
+Phillip Lord
diff --git a/ack.el b/ack.el
index 8ad3c75..c134846 100644
--- a/ack.el
+++ b/ack.el
@@ -168,7 +168,8 @@ This gets tacked on the end of the generated expressions.")
   "Insert a template for case-insensitive filename search."
   (interactive)
   (delete-minibuffer-contents)
-  (skeleton-insert '(nil "ack -g '(?i:" _ ")'")))
+  (let ((ack (or (car (split-string ack-command nil t)) "ack")))
+    (skeleton-insert '(nil ack " -g '(?i:" _ ")'"))))
 
 (defvar ack-minibuffer-local-map
   (let ((map (make-sparse-keymap)))
diff --git a/pcmpl-ack.el b/pcmpl-ack.el
index ab98150..ace80d2 100644
--- a/pcmpl-ack.el
+++ b/pcmpl-ack.el
@@ -152,5 +152,8 @@ long options."
          (t (pcomplete-opt pcmpl-ack-short-options)))
       (pcomplete-here* (pcomplete-dirs-or-entries)))))
 
+;;;###autoload
+(defalias 'pcomplete/ack-grep 'pcomplete/ack)
+
 (provide 'pcmpl-ack)
 ;;; pcmpl-ack.el ends here

commit a1e6f9ca64d7fc81c000b03b77d5d43497aa7dd2
Author: Phillip Lord <address@hidden>
Date:   Fri Sep 28 09:11:54 2012 +0800

    Add support for ack-grep variant (tiny change)

diff --git a/ack.el b/ack.el
index 299ac47..8ad3c75 100644
--- a/ack.el
+++ b/ack.el
@@ -54,9 +54,14 @@
   :type 'boolean
   :group 'ack)
 
-(defcustom ack-command (if (>= emacs-major-version 24)
-                           "ack "
-                         "ack --nocolor ")
+(defcustom ack-command
+  ;; Note: on GNU/Linux ack may be renamed to ack-grep
+  (let ((ack (or (executable-find "ack-grep")
+                 (executable-find "ack")
+                 "ack"))
+        (args (when (< emacs-major-version 24)
+                "--nocolor ")))
+    (concat (file-name-nondirectory ack) " " args))
   "The default ack command for \\[ack].
 
 Note also options to ack can be specified in ACK_OPTIONS

commit 3555767aeac82d0f3d9f85ae13078207927a99b2
Author: Dmitry Gutov <address@hidden>
Date:   Sat Sep 29 06:34:07 2012 +0400

    Fix #68
    
    While we're at it, allow empty lines inside a continued expression.

diff --git a/js2-mode.el b/js2-mode.el
index 89e4c53..0281531 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -9922,16 +9922,19 @@ a comma)."
   (save-excursion
     (back-to-indentation)
     (or (js2-looking-at-operator-p)
-        ;; comment
-        (and (js2-re-search-backward "\n" nil t)
-            (progn
-              (skip-chars-backward " \t")
-               (unless (bolp)
-                 (backward-char)
-                 (and (js2-looking-at-operator-p)
-                      (and (progn
-                             (backward-char)
-                             (not (looking-at 
"\\*\\|++\\|--\\|/[/*]")))))))))))
+        (when (catch 'found
+                (while (and (re-search-backward "\n" nil t)
+                            (let ((state (syntax-ppss)))
+                              (when (nth 4 state)
+                                (goto-char (nth 8 state))) ;; skip comments
+                              (skip-chars-backward " \t")
+                              (if (bolp)
+                                  t
+                                (throw 'found t))))))
+          (backward-char)
+          (when (js2-looking-at-operator-p)
+            (backward-char)
+            (not (looking-at "\\*\\|++\\|--\\|/[/*]")))))))
 
 (defun js2-end-of-do-while-loop-p ()
   "Returns non-nil if word after point is `while' of a do-while
@@ -10393,10 +10396,10 @@ If so, we don't ever want to use bounce-indent."
         ;; This has to be set before calling parse-partial-sexp below.
         (inhibit-point-motion-hooks t))
     (setq parse-status (save-excursion
-                          (syntax-ppss (point-at-bol)))
+                         (syntax-ppss (point-at-bol)))
           offset (- (point) (save-excursion
-                               (back-to-indentation)
-                               (point))))
+                              (back-to-indentation)
+                              (point))))
     (js2-with-underscore-as-word-syntax
      (if (nth 4 parse-status)
          (js2-lineup-comment parse-status)

commit 1b19cbe7b746467b97927a55078f0a7465991e64
Author: Dmitry Gutov <address@hidden>
Date:   Sat Sep 29 06:34:07 2012 +0400

    Fix #68
    
    While we're at it, allow empty lines inside a continued expression.

diff --git a/js2-mode.el b/js2-mode.el
index a1a3ba3..365bfa7 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -9658,13 +9658,19 @@ and comments have been removed."
   (save-excursion
     (back-to-indentation)
     (or (js2-looking-at-operator-p)
-        (when (js2-re-search-backward "\n" nil t)  ;; skip comments
-          (skip-chars-backward " \t")
-          (unless (bolp) ;; previous line is empty
+        (when (catch 'found
+                (while (and (re-search-backward "\n" nil t)
+                            (let ((state (syntax-ppss)))
+                              (when (nth 4 state)
+                                (goto-char (nth 8 state))) ;; skip comments
+                              (skip-chars-backward " \t")
+                              (if (bolp)
+                                  t
+                                (throw 'found t))))))
+          (backward-char)
+          (when (js2-looking-at-operator-p)
             (backward-char)
-            (when (js2-looking-at-operator-p)
-              (backward-char)
-              (not (looking-at "\\*\\|++\\|--\\|/[/*]"))))))))
+            (not (looking-at "\\*\\|++\\|--\\|/[/*]")))))))
 
 (defun js2-end-of-do-while-loop-p ()
   "Return non-nil if word after point is `while' of a do-while
@@ -10108,10 +10114,10 @@ If so, we don't ever want to use bounce-indent."
         ;; This has to be set before calling parse-partial-sexp below.
         (inhibit-point-motion-hooks t))
     (setq parse-status (save-excursion
-                          (syntax-ppss (point-at-bol)))
+                         (syntax-ppss (point-at-bol)))
           offset (- (point) (save-excursion
-                               (back-to-indentation)
-                               (point))))
+                              (back-to-indentation)
+                              (point))))
     (js2-with-underscore-as-word-syntax
      (if (nth 4 parse-status)
          (js2-lineup-comment parse-status)

commit d529164cfe20b65d1389880981d4ec1f6fb86acb
Author: Leo Liu <address@hidden>
Date:   Thu Sep 27 22:05:47 2012 +0800

    Make it run on emacs-23

diff --git a/ack.el b/ack.el
index 6ea84b3..299ac47 100644
--- a/ack.el
+++ b/ack.el
@@ -28,8 +28,9 @@
 ;;; Code:
 
 (require 'compile)
-(require 'ansi-color)
-(autoload 'shell-completion-vars "shell")
+(when (>= emacs-major-version 24)
+  (require 'ansi-color)
+  (autoload 'shell-completion-vars "shell"))
 
 (defgroup ack nil
   "Run `ack' and display the results."
@@ -53,7 +54,9 @@
   :type 'boolean
   :group 'ack)
 
-(defcustom ack-command "ack "
+(defcustom ack-command (if (>= emacs-major-version 24)
+                           "ack "
+                         "ack --nocolor ")
   "The default ack command for \\[ack].
 
 Note also options to ack can be specified in ACK_OPTIONS
@@ -101,6 +104,10 @@ This function is called from `compilation-filter-hook'."
   "Additional things to highlight in ack output.
 This gets tacked on the end of the generated expressions.")
 
+(when (< emacs-major-version 24)
+  (defvar ack--column-start 'ack--column-start)
+  (defvar ack--column-end 'ack--column-end))
+
 (defun ack--column-start ()
   (let* ((beg (match-end 0))
          (end (save-excursion
@@ -149,7 +156,8 @@ This gets tacked on the end of the generated expressions.")
        'compilation-info)
   (set (make-local-variable 'compilation-error-regexp-alist)
        ack-regexp-alist)
-  (add-hook 'compilation-filter-hook 'ack-filter nil t))
+  (when (boundp 'compilation-filter-hook)
+    (add-hook 'compilation-filter-hook 'ack-filter nil t)))
 
 (defun ack-skel-file ()
   "Insert a template for case-insensitive filename search."
@@ -160,7 +168,9 @@ This gets tacked on the end of the generated expressions.")
 (defvar ack-minibuffer-local-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map minibuffer-local-map)
-    (define-key map "\t" 'completion-at-point)
+    (define-key map "\t" (if (>= emacs-major-version 24)
+                             'completion-at-point
+                           'pcomplete))
     (define-key map "\M-I" 'ack-skel-file)
     (define-key map "'" 'skeleton-pair-insert-maybe)
     map)
@@ -187,7 +197,9 @@ minibuffer:
 
 \\{ack-minibuffer-local-map}"
   (interactive
-   (list (minibuffer-with-setup-hook 'shell-completion-vars
+   (list (minibuffer-with-setup-hook (if (>= emacs-major-version 24)
+                                         'shell-completion-vars
+                                       'pcomplete-shell-setup)
            (read-from-minibuffer "Run ack (like this): "
                                  ack-command ack-minibuffer-local-map
                                  nil 'ack-history))

commit 67d7e79306ee83ec15b8711c092e616bf1ba2fe8
Author: Leo Liu <address@hidden>
Date:   Thu Sep 27 09:40:06 2012 +0800

    Release version 0.6

diff --git a/README.rst b/README.rst
index 31cf7d3..ded6488 100644
--- a/README.rst
+++ b/README.rst
@@ -4,8 +4,8 @@
  
 From http://betterthangrep.com/
 
-    ack is a tool like grep, designed for programmers with large trees of
-    heterogeneous source code.
+    ack is a tool like grep, designed for programmers with large trees
+    of heterogeneous source code.
 
     ack is written purely in Perl, and takes advantage of the power of
     Perl's regular expressions.
@@ -13,12 +13,35 @@ From http://betterthangrep.com/
 Feature requests and bug reports are welcome. Thanks.
 
 Install
-=======
+-------
 
-Place ``ack.el`` in the load-path and put ``(require 'ack)`` or
-``(autoload 'ack "ack" nil t)`` in your ``.emacs``.
+Place ``ack.el`` in the ``load-path`` and add to your init file::
+
+  (require 'ack)
+
+or::
+
+ (autoload 'ack "ack" nil t)
+
+Completion
+~~~~~~~~~~
+
+Place ``pcmpl-ack.el`` in the ``load-path`` and add::
+
+  (autoload 'pcomplete/ack "pcmpl-ack")
+
+to your init file. After this you will be able complete ``ack``
+options while ``M-x ack`` or in shell/eshell.
 
 Usage
-=====
+-----
+
+#. ``M-x ack`` and provide a pattern to search.
+#. ``C-u M-x ack`` like ``M-x ack`` but allow you to select a
+   directory to search.
+
+While reading ack command and args from the minibuffer, the following
+key bindings may be useful:
 
-``M-x ack``
+#. ``M-I`` => insert a template for case-insensitive file name search
+#. ``TAB`` => completion for ack options
diff --git a/ack.el b/ack.el
index 1e8cbab..6ea84b3 100644
--- a/ack.el
+++ b/ack.el
@@ -5,7 +5,7 @@
 ;; Author: Leo Liu <address@hidden>
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
-;; Version: 0.5
+;; Version: 0.6
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by

commit 2f5168af1b4cf2ad6274ecc6fb36cc0e2b1670c5
Author: Leo Liu <address@hidden>
Date:   Thu Sep 27 09:22:42 2012 +0800

    Default DIRECTORY arg to ack to current project root

diff --git a/ack.el b/ack.el
index 62ba3b5..1e8cbab 100644
--- a/ack.el
+++ b/ack.el
@@ -36,6 +36,17 @@
   :group 'tools
   :group 'processes)
 
+(defcustom ack-project-pattern-list
+  (list (concat "\\`" (regexp-quote dir-locals-file) "\\'")
+        "\\`Project\\.ede\\'"
+        "\\.xcodeproj\\'"         ; xcode
+        "\\`\\.ropeproject\\'"    ; python rope
+        ;; ".git" ".svn" ".hg" ".bzr" ".CVS"
+        "\\`\\.\\(?:CVS\\|bzr\\|git\\|hg\\|svn\\)\\'")
+  "A list of regexps that match files in a project root."
+  :type '(repeat string)
+  :group 'ack)
+
 ;; Used implicitly by `define-compilation-mode'
 (defcustom ack-scroll-output nil
   "Similar to `compilation-scroll-output' but for the *Ack* buffer."
@@ -155,10 +166,21 @@ This gets tacked on the end of the generated 
expressions.")
     map)
   "Keymap used for reading `ack' command and args in minibuffer.")
 
+(defun ack-guess-project-root (start-directory &optional regexp)
+  (let ((regexp (or regexp
+                    (mapconcat 'identity ack-project-pattern-list "\\|")))
+        (parent (file-name-directory
+                 (directory-file-name (expand-file-name start-directory)))))
+    (if (directory-files start-directory nil regexp)
+        start-directory
+      (unless (equal parent start-directory)
+        (ack-guess-project-root parent regexp)))))
+
 ;;;###autoload
 (defun ack (command-args &optional directory)
   "Run ack using COMMAND-ARGS and collect output in a buffer.
-With prefix, ask for the DIRECTORY to run ack.
+With prefix, ask for the DIRECTORY to run ack; otherwise the
+current project root is used.
 
 The following keys are available while reading from the
 minibuffer:
@@ -169,8 +191,9 @@ minibuffer:
            (read-from-minibuffer "Run ack (like this): "
                                  ack-command ack-minibuffer-local-map
                                  nil 'ack-history))
-         (and current-prefix-arg
-              (read-directory-name "In directory: " nil nil t))))
+         (if current-prefix-arg
+             (read-directory-name "In directory: " nil nil t)
+           (ack-guess-project-root default-directory))))
   (let ((default-directory (expand-file-name
                             (or directory default-directory))))
     (compilation-start command-args 'ack-mode)))

commit acbeab6ed191f7b7013c7d5b0d3bb2e230fc5673
Author: Leo Liu <address@hidden>
Date:   Wed Sep 26 15:28:40 2012 +0800

    Add completion support for ack

diff --git a/ack.el b/ack.el
index a9eb7ef..62ba3b5 100644
--- a/ack.el
+++ b/ack.el
@@ -29,6 +29,7 @@
 
 (require 'compile)
 (require 'ansi-color)
+(autoload 'shell-completion-vars "shell")
 
 (defgroup ack nil
   "Run `ack' and display the results."
@@ -41,7 +42,7 @@
   :type 'boolean
   :group 'ack)
 
-(defcustom ack-command "ack -- "
+(defcustom ack-command "ack "
   "The default ack command for \\[ack].
 
 Note also options to ack can be specified in ACK_OPTIONS
@@ -139,15 +140,35 @@ This gets tacked on the end of the generated 
expressions.")
        ack-regexp-alist)
   (add-hook 'compilation-filter-hook 'ack-filter nil t))
 
+(defun ack-skel-file ()
+  "Insert a template for case-insensitive filename search."
+  (interactive)
+  (delete-minibuffer-contents)
+  (skeleton-insert '(nil "ack -g '(?i:" _ ")'")))
+
+(defvar ack-minibuffer-local-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map minibuffer-local-map)
+    (define-key map "\t" 'completion-at-point)
+    (define-key map "\M-I" 'ack-skel-file)
+    (define-key map "'" 'skeleton-pair-insert-maybe)
+    map)
+  "Keymap used for reading `ack' command and args in minibuffer.")
+
 ;;;###autoload
 (defun ack (command-args &optional directory)
   "Run ack using COMMAND-ARGS and collect output in a buffer.
 With prefix, ask for the DIRECTORY to run ack.
 
-\\{ack-mode-map}"
+The following keys are available while reading from the
+minibuffer:
+
+\\{ack-minibuffer-local-map}"
   (interactive
-   (list (read-from-minibuffer "Run ack (like this): "
-                               ack-command nil nil 'ack-history)
+   (list (minibuffer-with-setup-hook 'shell-completion-vars
+           (read-from-minibuffer "Run ack (like this): "
+                                 ack-command ack-minibuffer-local-map
+                                 nil 'ack-history))
          (and current-prefix-arg
               (read-directory-name "In directory: " nil nil t))))
   (let ((default-directory (expand-file-name
diff --git a/pcmpl-ack.el b/pcmpl-ack.el
new file mode 100644
index 0000000..ab98150
--- /dev/null
+++ b/pcmpl-ack.el
@@ -0,0 +1,156 @@
+;;; pcmpl-ack.el --- completion for ack tool
+
+;; Copyright (C) 2012  Leo Liu
+
+;; Author: Leo Liu <address@hidden>
+;; Keywords: tools, processes, convenience
+;; Created: 2012-09-26
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Provide pcompletion support for the cli tool `ack' which can be
+;; downloaded from http://betterthangrep.com.
+;;
+;; Install:
+;;   (autoload 'pcomplete/ack "pcmpl-ack")
+;;
+;; Usage:
+;;   - To complete short options type '-' first
+;;   - To complete long options type '--' first
+;;   - Color name completion is also supported following
+;;       --color-filename=, --color-match= and --color-lineno=.
+
+;;; Code:
+
+(require 'pcomplete)
+
+(defvar pcmpl-ack-short-options
+  (mapconcat (lambda (o) (substring o 1))
+             '("-a" "-A" "-B" "-C" "-c" "-f" "-G" "-g"
+               "-H" "-h" "-i" "-l" "-L" "-m" "-n"
+               "-o" "-Q" "-r" "-R"
+               "-u" "-v" "-w" "-1")
+             "")
+  "Short options for the `ack' command.")
+
+(defvar pcmpl-ack-long-options
+  '("--after-context="
+    "--all-types"
+    "--before-context="
+    "--break"
+    "--nobreak"
+    "--color"
+    "--nocolor"
+    "--colour"
+    "--nocolour"
+    "--color-filename="
+    "--color-match="
+    "--color-lineno="
+    "--column"
+    "--context="
+    "--count"
+    "--env"
+    "--noenv"
+    "--files-with-matches"
+    "--files-without-matches"
+    "--flush"
+    "--follow"
+    "--nofollow"
+    "--group"
+    "--nogroup"
+    "--heading"
+    "--noheading"
+    "--ignore-case"
+    "--ignore-dir="
+    "--noignore-dir="
+    "--invert-match"
+    "--line="
+    "--literal"
+    "--match"
+    "--max-count="
+    "--no-filename"
+    "--output="
+    "--pager="
+    "--nopager"
+    "--passthru"
+    "--print0"
+    "--recurse"
+    "--norecurse"
+    "--smart-case"
+    "--nosmart-case"
+    "--sort-files"
+    "--type="
+    "--type-add"
+    "--type-set"
+    "--unrestricted"
+    "--with-filename"
+    "--word-regexp"
+    "--help"
+    "--help-types"
+    "--man"
+    "--thpppt"
+    "--version")
+  "Long options for the `ack' command.")
+
+(defvar pcmpl-ack-color-options
+  '("clear"
+    "reset"
+    "dark"
+    "bold"
+    "underline"
+    "underscore"
+    "blink"
+    "reverse"
+    "concealed"
+    "black"
+    "red"
+    "green"
+    "yellow"
+    "blue"
+    "magenta"
+    "on_black"
+    "on_red"
+    "on_green"
+    "on_yellow"
+    "on_blue"
+    "on_magenta"
+    "on_cyan"
+    "on_white")
+  "Color names for the `ack' command.")
+
+;;;###autoload
+(defun pcomplete/ack ()
+  "Completion for the `ack' command.
+Start an argument with '-' to complete short options and '--' for
+long options."
+  ;; No space after =
+  (add-to-list 'pcomplete-suffix-list ?=)
+  (while t
+    (if (pcomplete-match "^-" 0)
+        (cond
+         ((pcomplete-match "^--color-\\w+=\\(\\S-*\\)" 0)
+          (pcomplete-here* pcmpl-ack-color-options
+                           (pcomplete-match-string 1 0) t))
+         ((pcomplete-match "^--\\(?:no\\)?ignore-dir=\\(\\S-*\\)" 0)
+          (pcomplete-here* (pcomplete-dirs)
+                           (pcomplete-match-string 1 0) t))
+         ((pcomplete-match "^--" 0)
+          (pcomplete-here* pcmpl-ack-long-options))
+         (t (pcomplete-opt pcmpl-ack-short-options)))
+      (pcomplete-here* (pcomplete-dirs-or-entries)))))
+
+(provide 'pcmpl-ack)
+;;; pcmpl-ack.el ends here

commit 061fde1ff9d88407908c349146fbee568bf0b632
Author: Dmitry Gutov <address@hidden>
Date:   Sat Sep 22 23:06:47 2012 +0400

    js2-mode-extend-comment: Move (js2-indent-line) outside the (cond)

diff --git a/js2-mode.el b/js2-mode.el
index 7a876a8..a1a3ba3 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10710,9 +10710,9 @@ PARSE-STATUS is as documented in `parse-partial-sexp'."
               (and (zerop (forward-line 1))
                    (looking-at "\\s-*//"))))
       (indent-to col)
-      (insert "// "))
-     ;; Don't need to extend the comment after all.
-     (js2-indent-line))))
+      (insert "// ")))
+    ;; Don't need to extend the comment after all.
+    (js2-indent-line)))
 
 (defun js2-beginning-of-line ()
   "Toggles point between bol and first non-whitespace char in line.

commit 0a84731c4fe8b85482ba10637def80b932b112e9
Author: Dmitry Gutov <address@hidden>
Date:   Sat Sep 22 22:51:52 2012 +0400

    Simplify error list annotation and destructuring

diff --git a/js2-mode.el b/js2-mode.el
index 9710b56..7a876a8 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10203,7 +10203,7 @@ highlighting features of `js2-mode'."
             (lst type)
             "Add diagnostic TYPE and line number to errs list"
             (mapcar (lambda (err)
-                      (cons err (list type (line-number-at-pos (nth 1 err)))))
+                      (list err type (line-number-at-pos (nth 1 err))))
                     lst)))
     (let* ((srcbuf (current-buffer))
            (errbuf (get-buffer-create "*js-lint*"))
@@ -10219,7 +10219,7 @@ highlighting features of `js2-mode'."
         (let ((inhibit-read-only t))
           (erase-buffer)
           (dolist (err all-errs)
-            (destructuring-bind ((msg-key beg end &rest) . (type line)) err
+            (destructuring-bind ((msg-key beg end &rest) type line) err
               (insert-text-button
                (format "line %d: %s" line (js2-get-msg msg-key))
                'face type

commit 45e8cca8bd8ffc6f4d22d38d18d04576899ca7e5
Author: Dmitry Gutov <address@hidden>
Date:   Sat Sep 22 17:31:20 2012 +0400

    Fix js2-display-error-list
    
    Regression from 14c6ea539b9ee7b98d0c6b870c23202798ba37b3

diff --git a/js2-mode.el b/js2-mode.el
index f433db7..9710b56 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10203,8 +10203,7 @@ highlighting features of `js2-mode'."
             (lst type)
             "Add diagnostic TYPE and line number to errs list"
             (mapcar (lambda (err)
-                      (append err (list type
-                                        (line-number-at-pos (nth 1 err)))))
+                      (cons err (list type (line-number-at-pos (nth 1 err)))))
                     lst)))
     (let* ((srcbuf (current-buffer))
            (errbuf (get-buffer-create "*js-lint*"))
@@ -10215,12 +10214,12 @@ highlighting features of `js2-mode'."
                       (when js2-mode-ast (js2-ast-root-warnings js2-mode-ast))
                       'js2-warning))  ; must be a valid face name
            (all-errs (sort (append errors warnings)
-                           (lambda (e1 e2) (< (nth 1 e1) (nth 1 e2))))))
+                           (lambda (e1 e2) (< (cadar e1) (cadar e2))))))
       (with-current-buffer errbuf
         (let ((inhibit-read-only t))
           (erase-buffer)
           (dolist (err all-errs)
-            (destructuring-bind (msg-key beg end type line) err
+            (destructuring-bind ((msg-key beg end &rest) . (type line)) err
               (insert-text-button
                (format "line %d: %s" line (js2-get-msg msg-key))
                'face type

commit 7b9dd8ff21072c833ec4838868bb7b69a1a6d955
Author: Dmitry Gutov <address@hidden>
Date:   Sat Sep 22 08:00:18 2012 +0400

    Don't need `funcall` where FUNCTION is constant

diff --git a/js2-mode.el b/js2-mode.el
index d2c06c4..f433db7 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -1269,7 +1269,7 @@ First match-group is the leading whitespace.")
 
 ;; TODO(stevey):  construct this table at compile-time.
 (defmacro js2-msg (key &rest strings)
-  `(puthash ,key (funcall #'concat ,@strings)
+  `(puthash ,key (concat ,@strings)
             js2-message-table))
 
 (defun js2-get-msg (msg-key)
@@ -10215,8 +10215,7 @@ highlighting features of `js2-mode'."
                       (when js2-mode-ast (js2-ast-root-warnings js2-mode-ast))
                       'js2-warning))  ; must be a valid face name
            (all-errs (sort (append errors warnings)
-                           (lambda (e1 e2)
-                             (funcall '< (nth 1 e1) (nth 1 e2))))))
+                           (lambda (e1 e2) (< (nth 1 e1) (nth 1 e2))))))
       (with-current-buffer errbuf
         (let ((inhibit-read-only t))
           (erase-buffer)

commit be599424f028dbde8d37e81d5dcd8e9737a6ffa2
Author: Dmitry Gutov <address@hidden>
Date:   Wed Sep 12 05:33:59 2012 +0400

    Remove run-mode-hooks call, define-derived-mode already does that

diff --git a/js2-mode.el b/js2-mode.el
index e37b901..d2c06c4 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10372,10 +10372,6 @@ Selecting an error will jump it to the corresponding 
source-buffer error.
   (set (make-local-variable 'line-move-ignore-invisible) t)
   (set (make-local-variable 'forward-sexp-function) #'js2-mode-forward-sexp)
 
-  (if (fboundp 'run-mode-hooks)
-      (run-mode-hooks 'js2-mode-hook)
-    (run-hooks 'js2-mode-hook))
-
   (setq js2-mode-functions-hidden nil
         js2-mode-comments-hidden nil
         js2-mode-buffer-dirty-p t

commit 52241c5544294964b9e9d2f0b61ace82384779a4
Author: Dmitry Gutov <address@hidden>
Date:   Tue Sep 11 06:03:10 2012 +0400

    you -> your

diff --git a/README.md b/README.md
index e605dae..a8f5ac8 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ Installation
 
 Then put js2-mode.elc into your site-lisp directory.
 
-In you emacs config:
+In your emacs config:
 
     (autoload 'js2-mode "js2-mode" nil t)
     (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))

commit be0394e00f530fdd999f13e3d653b3eba8977434
Author: Dmitry Gutov <address@hidden>
Date:   Tue Sep 11 06:03:10 2012 +0400

    you -> your

diff --git a/README.md b/README.md
index 4ff9786..82c9b52 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ Installation
 
 Then put js2-mode.elc into your site-lisp directory.
 
-In you emacs config:
+In your emacs config:
 
     (autoload 'js2-mode "js2-mode" nil t)
     (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))

commit fef03725b09448959075b63b73c7e6ebe14b3a27
Author: Dmitry Gutov <address@hidden>
Date:   Tue Sep 11 05:59:45 2012 +0400

    Move "the" outside the link

diff --git a/README.md b/README.md
index e67a00a..e605dae 100644
--- a/README.md
+++ b/README.md
@@ -27,8 +27,7 @@ additional details.
 Emacs 22 and 23
 ===============
 
-This version requires Emacs 24. For backwards-compatible version, check out 
[the
-`master` branch](https://github.com/mooz/js2-mode/tree/master).
+This version requires Emacs 24. For backwards-compatible version, check out 
the [`master` branch](https://github.com/mooz/js2-mode/tree/master).
 
 Bugs
 ====

commit 6fb5901f57f031cf68280c34e31d455f7535546d
Author: Dmitry Gutov <address@hidden>
Date:   Tue Sep 11 05:58:19 2012 +0400

    Add section "Emacs 22 and 23"

diff --git a/README.md b/README.md
index 3964091..e67a00a 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Description
 
 An improved JavaScript mode for GNU Emacs. Forked from 
<http://code.google.com/p/js2-mode/>.
 
-For the list of user-visible changes, see
+For some of the user-visible changes, see
 [Changes from the original 
mode](https://github.com/mooz/js2-mode/wiki/Changes-from-the-original-mode).
 
 Installation
@@ -11,6 +11,7 @@ Installation
 
     $ git clone git://github.com/mooz/js2-mode.git
     $ cd js2-mode
+    $ git checkout emacs24
     $ emacs --batch -f batch-byte-compile js2-mode.el
 
 Then put js2-mode.elc into your site-lisp directory.
@@ -23,6 +24,12 @@ In you emacs config:
 See <http://code.google.com/p/js2-mode/wiki/InstallationInstructions> for
 additional details.
 
+Emacs 22 and 23
+===============
+
+This version requires Emacs 24. For backwards-compatible version, check out 
[the
+`master` branch](https://github.com/mooz/js2-mode/tree/master).
+
 Bugs
 ====
 

commit 5efdc9a2d8bdba4515390e8143fecad22ae28cd7
Author: Dmitry Gutov <address@hidden>
Date:   Tue Sep 11 05:54:25 2012 +0400

    Add section "Emacs 24"

diff --git a/README.md b/README.md
index 3964091..4ff9786 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Description
 
 An improved JavaScript mode for GNU Emacs. Forked from 
<http://code.google.com/p/js2-mode/>.
 
-For the list of user-visible changes, see
+For some of the user-visible changes, see
 [Changes from the original 
mode](https://github.com/mooz/js2-mode/wiki/Changes-from-the-original-mode).
 
 Installation
@@ -23,6 +23,11 @@ In you emacs config:
 See <http://code.google.com/p/js2-mode/wiki/InstallationInstructions> for
 additional details.
 
+Emacs 24
+========
+
+The version from the [branch 
`emacs24`](https://github.com/mooz/js2-mode/tree/emacs24) is recommended.
+
 Bugs
 ====
 

commit bbb15a4a6c03a2e64ca6037fddb92e9f3df3c1c3
Author: Dmitry Gutov <address@hidden>
Date:   Tue Sep 11 05:13:30 2012 +0400

    Tweak `js2-line-break` behavior, bind it to M-j
    
    js2-indent-on-enter-key, js2-enter-indents-newline: Remove.
    js2-line-break: Always indent the line.
    js2-mode-split-string: Use js2-indent-line. Remove the variable 
quote-string.
    js2-mode-extend-comment: Support block comments at the end of the line.
    Delete whitespace around the newline. Always indent the line.

diff --git a/js2-mode.el b/js2-mode.el
index cfbbdc2..e37b901 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -252,18 +252,6 @@ lines, it won't be indented additionally:
   :type 'symbol)
 (js2-mark-safe-local 'js2-pretty-multiline-declarations 'symbolp)
 
-(defcustom js2-indent-on-enter-key nil
-  "Non-nil to have Enter/Return key indent the line.
-This is unusual for Emacs modes but common in IDEs like Eclipse."
-  :type 'boolean
-  :group 'js2-mode)
-
-(defcustom js2-enter-indents-newline nil
-  "Non-nil to have Enter/Return key indent the newly-inserted line.
-This is unusual for Emacs modes but common in IDEs like Eclipse."
-  :type 'boolean
-  :group 'js2-mode)
-
 (defcustom js2-idle-timer-delay 0.2
   "Delay in secs before re-parsing after user makes changes.
 Multiplied by `js2-dynamic-idle-timer-adjust', which see."
@@ -1126,6 +1114,7 @@ another file, or you've got a potential bug."
   (let ((map (make-sparse-keymap))
         keys)
     (define-key map [mouse-1] #'js2-mode-show-node)
+    (define-key map (kbd "M-j") #'js2-line-break)
     (define-key map (kbd "C-c C-e") #'js2-mode-hide-element)
     (define-key map (kbd "C-c C-s") #'js2-mode-show-element)
     (define-key map (kbd "C-c C-a") #'js2-mode-show-all)
@@ -10640,7 +10629,10 @@ This ensures that the counts and `next-error' are 
correct."
 (defalias #'js2-echo-help #'js2-echo-error)
 
 (defun js2-line-break (&optional soft)
-  "Break line at point."
+  "Break line at point and indent, continuing comment if within one.
+If inside a string, and `js2-concat-multiline-strings' is not
+nil, turn it into concatenation."
+  (interactive)
   (let ((parse-status (syntax-ppss)))
     (cond
      ;; Check if we're inside a string.
@@ -10650,46 +10642,36 @@ This ensures that the counts and `next-error' are 
correct."
         (insert "\n")))
      ;; Check if inside a block comment.
      ((nth 4 parse-status)
-      (js2-mode-extend-comment))
+      (js2-mode-extend-comment (nth 8 parse-status)))
      (t
-      (newline)))))
+      (newline-and-indent)))))
 
 (defun js2-mode-split-string (parse-status)
   "Turn a newline in mid-string into a string concatenation.
 PARSE-STATUS is as documented in `parse-partial-sexp'."
   (let* ((col (current-column))
          (quote-char (nth 3 parse-status))
-         (quote-string (string quote-char))
          (string-beg (nth 8 parse-status))
-         (at-eol (eq js2-concat-multiline-strings 'eol))
-         (indent (or
-                  (save-excursion
-                    (back-to-indentation)
-                    (if (looking-at "\\+")
-                        (current-column)))
-                  (save-excursion
-                    (goto-char string-beg)
-                    (if (looking-back "\\+\\s-+")
-                        (goto-char (match-beginning 0)))
-                    (current-column)))))
+         (at-eol (eq js2-concat-multiline-strings 'eol)))
     (insert quote-char)
     (if at-eol
         (insert " +\n")
       (insert "\n"))
-    ;; FIXME: This does not match the behavior of `js2-indent-line'.
-    (indent-to indent)
     (unless at-eol
       (insert "+ "))
-    (insert quote-string)
+    (js2-indent-line)
+    (insert quote-char)
     (when (eolp)
-      (insert quote-string)
+      (insert quote-char)
       (backward-char 1))))
 
-(defun js2-mode-extend-comment ()
+(defun js2-mode-extend-comment (start-pos)
   "Indent the line and, when inside a comment block, add comment prefix."
   (let (star single col first-line needs-close)
     (save-excursion
       (back-to-indentation)
+      (when (< (point) start-pos)
+        (goto-char start-pos))
       (cond
        ((looking-at "\\*[^/]")
         (setq star t
@@ -10718,6 +10700,7 @@ PARSE-STATUS is as documented in `parse-partial-sexp'."
                 (save-excursion
                   (skip-chars-forward " \t\r\n")
                   (not (eq (char-after) ?*))))))
+    (delete-horizontal-space)
     (insert "\n")
     (cond
      (star
@@ -10734,9 +10717,8 @@ PARSE-STATUS is as documented in `parse-partial-sexp'."
                    (looking-at "\\s-*//"))))
       (indent-to col)
       (insert "// "))
-     ;; don't need to extend the comment after all
-     (js2-enter-indents-newline
-      (js2-indent-line)))))
+     ;; Don't need to extend the comment after all.
+     (js2-indent-line))))
 
 (defun js2-beginning-of-line ()
   "Toggles point between bol and first non-whitespace char in line.

commit a54bd05a8f35ec42abf22dcca541571ef2f21e1a
Merge: c3ec4af cca2fab
Author: Dmitry Gutov <address@hidden>
Date:   Mon Sep 10 07:40:44 2012 +0400

    Merge branch 'master' into emacs24


commit 2619e05769df4b48c56bca513e8a371cf3d45231
Author: Lawrence Mitchell <address@hidden>
Date:   Sun Sep 9 18:35:19 2012 +0100

    Update copyright in line with ELPA version

diff --git a/f90-interface-browser.el b/f90-interface-browser.el
index 4840f67..c33996c 100644
--- a/f90-interface-browser.el
+++ b/f90-interface-browser.el
@@ -1,29 +1,26 @@
 ;;; f90-interface-browser.el --- Parse and browse f90 interfaces
 
-;; This file is NOT part of Emacs.
+;; Copyright (C) 2011, 2012  Free Software Foundation, Inc
 
-;; Copyright (C) 2011, 2012 Lawrence Mitchell <address@hidden>
-;; Filename: f90-interface-browser.el
+;; Author: Lawrence Mitchell <address@hidden>
 ;; Created: 2011-07-06
 ;; Available-from: http://github.com/wence-/f90-iface/
 ;; Version: 1.1
 
 ;; COPYRIGHT NOTICE
 
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2 of the
-;; License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more
-;; details. http://www.gnu.org/copyleft/gpl.html
-;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If you did not, write to the Free Software
-;; Foundation, Inc., 675 Mass Ave., Cambridge, MA 02139, USA.
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 ;; You write (or work on) large, modern fortran code bases.  These

commit cca2fabf40a165b196b436cf371ebca7eaec7707
Author: Dmitry Gutov <address@hidden>
Date:   Sat Sep 8 20:06:49 2012 +0400

    Fix #66

diff --git a/js2-mode.el b/js2-mode.el
index ba112e5..89e4c53 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10410,9 +10410,9 @@ If so, we don't ever want to use bounce-indent."
               (not (js2-1-line-comment-continuation-p)))
          (js2-bounce-indent indent-col parse-status bounce-backwards))
         ;; just indent to the guesser's likely spot
-        (t (indent-line-to indent-col)))
-       (when (plusp offset)
-         (forward-char offset))))))
+        (t (indent-line-to indent-col))))
+     (when (plusp offset)
+       (forward-char offset)))))
 
 (defun js2-indent-region (start end)
   "Indent the region, but don't use bounce indenting."

commit c3ec4af58c12c787a8e09cdcd74b986e93e59964
Merge: 1482463 47dd40b
Author: Dmitry Gutov <address@hidden>
Date:   Tue Sep 4 05:15:54 2012 +0400

    Merge branch 'master' into emacs24


commit 47dd40b100ecae0deef41a6533b402fec740e65d
Author: Dmitry Gutov <address@hidden>
Date:   Tue Sep 4 02:42:57 2012 +0400

    Fix #63

diff --git a/js2-mode.el b/js2-mode.el
index 7a8c744..ba112e5 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -11448,7 +11448,8 @@ With ARG, do it that many times.  Negative arg -N means
 move backward across N balanced expressions."
   (interactive "p")
   (setq arg (or arg 1))
-  (when js2-mode-buffer-dirty-p
+  (save-restriction
+    (widen) ;; `blink-matching-open' calls `narrow-to-region'
     (js2-reparse))
   (let ((scan-msg "Containing expression ends prematurely")
         node (start (point)) pos lp rp child)

commit b65328cc09e7c802ae29142ec5e7fa1f18ecacf1
Author: Andrew Hyatt <address@hidden>
Date:   Sun Sep 2 23:56:07 2012 -0400

    Made the max number of bytes transimssible 2^29 - 1 instead of 2^32 - 1.
    
    This is the maximum positive value an elisp integer can have on 32 bit
    machines.

diff --git a/websocket-test.el b/websocket-test.el
index c965033..19746fd 100644
--- a/websocket-test.el
+++ b/websocket-test.el
@@ -45,17 +45,13 @@
   "\x81\x85\x37\xfa\x21\x3d\x7f\x9f\x4d\x51\x58"
   "'Hello' masked string example, taken from the RFC.")
 
-(defconst websocket-test-64-bit-p
-  (calc-eval '("2^32 <= $") 'pred most-positive-fixnum))
-
 (ert-deftest websocket-get-bytes ()
   (should (equal #x5 (websocket-get-bytes "\x5" 1)))
   (should (equal #x101 (websocket-get-bytes "\x1\x1" 2)))
   (should (equal #xffffff
                  (websocket-get-bytes "\x0\x0\x0\x0\x0\xFF\xFF\xFF" 8)))
-  (when websocket-test-64-bit-p
-    (should-error (websocket-get-bytes "\x0\x0\x0\x1\x0\x0\x0\x1" 8)
-                  :type 'websocket-unparseable-frame))
+  (should-error (websocket-get-bytes "\x0\x0\x0\x1\x0\x0\x0\x1" 8)
+                :type 'websocket-unparseable-frame)
   (should-error (websocket-get-bytes "\x0\x0\x0" 3))
   (should-error (websocket-get-bytes "\x0" 2) :type 
'websocket-unparseable-frame))
 
@@ -276,10 +272,8 @@
   ;; help test websocket-to-bytes.
   (should (equal 30 (websocket-get-bytes (websocket-to-bytes 30 1) 1)))
   (should (equal 300 (websocket-get-bytes (websocket-to-bytes 300 2) 2)))
-  (let ((f (lambda () (websocket-to-bytes 70000 8))))
-    (if websocket-test-64-bit-p
-        (should (equal 70000 (websocket-get-bytes (funcall f) 8)))
-      (should-error (funcall f))))
+  (should (equal 70000 (websocket-get-bytes (websocket-to-bytes 70000 8) 8)))
+  (should-error (websocket-to-bytes 536870912 8) :type 
'websocket-frame-too-large)
   (should-error (websocket-to-bytes 30 3))
   (should-error (websocket-to-bytes 300 1))
   ;; I'd like to test the error for 32-byte systems on 8-byte lengths,
@@ -295,7 +289,7 @@
              websocket-test-hello
              (websocket-encode-frame
               (make-websocket-frame :opcode 'text :payload "Hello" :completep 
t))))
-    (dolist (len (if websocket-test-64-bit-p '(200 70000) '(200 60000)))
+    (dolist (len '(200 70000))
       (let ((long-string (make-string len ?x)))
         (should (equal long-string
                        (websocket-frame-payload
diff --git a/websocket.el b/websocket.el
index 95a7eba..c340e63 100644
--- a/websocket.el
+++ b/websocket.el
@@ -198,13 +198,15 @@ This is based on the KEY from the Sec-WebSocket-Key 
header."
 Return the value as an unsigned integer.  The value N must be a
 power of 2, up to 8.
 
-We support getting frames up to 4294967295 bytes (2^32) long."
+We support getting frames up to 536870911 bytes (2^29 - 1),
+approximately 537M long."
   (if (= n 8)
     (let* ((32-bit-parts
             (bindat-get-field (bindat-unpack '((:val vec 2 u32)) s) :val))
            (cval
             (logior (lsh (aref 32-bit-parts 0) 32) (aref 32-bit-parts 1))))
-      (if (= (aref 32-bit-parts 0) 0)
+      (if (and (= (aref 32-bit-parts 0) 0)
+               (= (lsh (aref 32-bit-parts 1) -29) 0))
           cval
         (signal 'websocket-unparseable-frame
                 "Frame value found too large to parse!")))
@@ -229,7 +231,8 @@ We support getting frames up to 4294967295 bytes (2^32) 
long."
   "Encode the integer VAL in NBYTES of data.
 NBYTES much be a power of 2, up to 8.
 
-This supports encoding values up to "
+This supports encoding values up to 536870911 bytes (2^29 - 1),
+approximately 537M long."
   (when (and (< nbytes 8)
              (> val (expt 2 (* 8 nbytes))))
     ;; not a user-facing error, this must be caused from an error in
@@ -240,7 +243,7 @@ This supports encoding values up to "
       (progn
         (let ((hi-32bits (lsh val -32))
               (low-32bits (logand #xffffffff val)))
-          (when (> hi-32bits 0)
+          (when (or (> hi-32bits 0) (> (lsh low-32bits -29) 0))
             (signal 'websocket-frame-too-large val))
           (bindat-pack `((:val vec 2 u32))
                        `((:val . [,hi-32bits ,low-32bits])))))

commit 1482463fbd97acd81b29d9170d27080a2632de04
Merge: f26abe1 b02f4a0
Author: Dmitry Gutov <address@hidden>
Date:   Mon Sep 3 07:15:54 2012 +0400

    Merge branch 'master' into emacs24

diff --cc js2-mode.el
index f72114f,7a8c744..92392e3
--- a/js2-mode.el
+++ b/js2-mode.el
@@@ -11167,28 -11517,29 +11177,51 @@@ move backward across N balanced express
        (cons (when lp (+ abs-pos lp))
              (when rp (+ abs-pos rp)))))))
  
+ (defun js2-node-closest-child (parent point limit &optional before)
+   (let* ((parent-pos (js2-node-abs-pos parent))
+          (rpoint (- point parent-pos))
+          (rlimit (- limit parent-pos))
+          (min (min rpoint rlimit))
+          (max (max rpoint rlimit))
+          found)
+     (catch 'done
+       (js2-visit-ast
+        parent
+        (lambda (node end-p)
+          (if (eq node parent)
+              t
+            (let ((pos (js2-node-pos node)) ;; Both relative values.
+                  (end (+ (js2-node-pos node) (js2-node-len node))))
+              (when (and (>= pos min) (<= end max)
+                         (if before (< pos rpoint) (> end rpoint)))
+                (setq found node))
+              (when (> end rpoint)
+                (throw 'done nil)))
+            nil))))
+     found))
+ 
 +(defun js2-errors ()
 +  "Return a list of errors found."
 +  (and js2-mode-ast
 +       (js2-ast-root-errors js2-mode-ast)))
 +
 +(defun js2-warnings ()
 +  "Return a list of warnings found."
 +  (and js2-mode-ast
 +       (js2-ast-root-warnings js2-mode-ast)))
 +
 +(defun js2-have-errors-p ()
 +  "Return non-nil if any parse errors or warnings were found."
 +  (or (js2-errors) (js2-warnings)))
 +
 +(defun js2-errors-and-warnings ()
 +  "Return a copy of the concatenated errors and warnings lists.
 +They are appended:  first the errors, then the warnings.
 +Entries are of the form (MSG BEG END)."
 +  (when js2-mode-ast
 +    (append (js2-ast-root-errors js2-mode-ast)
 +            (copy-sequence (js2-ast-root-warnings js2-mode-ast)))))
 +
  (defun js2-next-error (&optional arg reset)
    "Move to next parse error.
  Typically invoked via \\[next-error].

commit 29d8f2f1b8bd3d4dc452060e06ec407b0a6a8cf3
Author: Andrew Hyatt <address@hidden>
Date:   Sun Sep 2 22:20:09 2012 -0400

    Encode all text sent from the websocket-send-text function.
    
    This is necessary for non-ascii text.

diff --git a/websocket-test.el b/websocket-test.el
index 04f14df..c965033 100644
--- a/websocket-test.el
+++ b/websocket-test.el
@@ -400,6 +400,13 @@
          (should-not on-open-calledp)
          (should websocket-closed-calledp))))))
 
+(ert-deftest websocket-send-text ()
+  (flet ((websocket-send (ws frame)
+                         (should (equal
+                                  (websocket-frame-payload frame)
+                                  "\344\275\240\345\245\275"))))
+    (websocket-send-text nil "你好")))
+
 (ert-deftest websocket-send ()
   (let ((ws (websocket-inner-create :conn t :url t :accept-string t)))
     (flet ((websocket-ensure-connected (websocket))
diff --git a/websocket.el b/websocket.el
index 2de93ec..95a7eba 100644
--- a/websocket.el
+++ b/websocket.el
@@ -480,8 +480,12 @@ has connection termination."
 
 (defun websocket-send-text (websocket text)
   "To the WEBSOCKET, send TEXT as a complete frame."
-  (websocket-send websocket (make-websocket-frame :opcode 'text :payload text
-                                                  :completep t)))
+  (websocket-send
+   websocket
+   (make-websocket-frame :opcode 'text
+                         :payload (encode-coding-string
+                                   text 'raw-text)
+                         :completep t)))
 
 (defun websocket-check (frame)
   "Check FRAME for correctness, returning true if correct."

commit 0efcdfe447db605ec188f80ae99caf0a1b48c598
Author: Andrew Hyatt <address@hidden>
Date:   Sun Sep 2 18:57:29 2012 -0400

    Kill processes in the functional test, and make sure that closed
    websocket result in killed processes.

diff --git a/websocket-functional-test.el b/websocket-functional-test.el
index e9dac95..8183635 100644
--- a/websocket-functional-test.el
+++ b/websocket-functional-test.el
@@ -58,6 +58,12 @@
 (assert (null (websocket-openp wstest-ws)))
 
 (stop-process wstest-server-proc)
+(kill-process wstest-server-proc)
+
+;; Make sure the processes are closed.  This happens asynchronously,
+;; so let's wait for it.
+(sleep-for 1)
+(assert (null (process-list)) t)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Remote server test, with wss ;;
@@ -116,4 +122,8 @@
 (assert (equal (car wstest-msgs) "Hi to self!"))
 (websocket-server-close server-conn)
 (assert wstest-closed)
+(websocket-close wstest-ws)
+
+(sleep-for 1)
+(assert (null (process-list)) t)
 (message "\nAll tests passed!\n")

commit d29b171b812893b30fa0b86eebbaf548518992f9
Author: Andrew Hyatt <address@hidden>
Date:   Sun Sep 2 18:56:40 2012 -0400

    Remove calc requirement, based on observations and suggestions by Julian 
Scheid.

diff --git a/websocket-test.el b/websocket-test.el
index e97da1a..04f14df 100644
--- a/websocket-test.el
+++ b/websocket-test.el
@@ -51,10 +51,11 @@
 (ert-deftest websocket-get-bytes ()
   (should (equal #x5 (websocket-get-bytes "\x5" 1)))
   (should (equal #x101 (websocket-get-bytes "\x1\x1" 2)))
-  (let ((f (lambda () (websocket-get-bytes "\x0\x0\x0\x1\x0\x0\x0\x1" 8))))
-    (if websocket-test-64-bit-p
-        (should (equal #x100000001 (funcall f)))
-      (should-error (funcall f) :type 'websocket-unparseable-frame)))
+  (should (equal #xffffff
+                 (websocket-get-bytes "\x0\x0\x0\x0\x0\xFF\xFF\xFF" 8)))
+  (when websocket-test-64-bit-p
+    (should-error (websocket-get-bytes "\x0\x0\x0\x1\x0\x0\x0\x1" 8)
+                  :type 'websocket-unparseable-frame))
   (should-error (websocket-get-bytes "\x0\x0\x0" 3))
   (should-error (websocket-get-bytes "\x0" 2) :type 
'websocket-unparseable-frame))
 
diff --git a/websocket.el b/websocket.el
index 0ec79bf..2de93ec 100644
--- a/websocket.el
+++ b/websocket.el
@@ -47,7 +47,6 @@
 
 (require 'bindat)
 (require 'url-parse)
-(require 'calc)
 (eval-when-compile (require 'cl))
 
 ;;; Code:
@@ -197,16 +196,18 @@ This is based on the KEY from the Sec-WebSocket-Key 
header."
 (defun websocket-get-bytes (s n)
   "From string S, retrieve the value of N bytes.
 Return the value as an unsigned integer.  The value N must be a
-power of 2, up to 8."
+power of 2, up to 8.
+
+We support getting frames up to 4294967295 bytes (2^32) long."
   (if (= n 8)
     (let* ((32-bit-parts
             (bindat-get-field (bindat-unpack '((:val vec 2 u32)) s) :val))
-           (cval (calc-eval '("(2^32 * $ + $$)") nil
-                            (aref 32-bit-parts 0) (aref 32-bit-parts 1))))
-      (when (calc-eval '("$ > $$") 'pred cval most-positive-fixnum)
+           (cval
+            (logior (lsh (aref 32-bit-parts 0) 32) (aref 32-bit-parts 1))))
+      (if (= (aref 32-bit-parts 0) 0)
+          cval
         (signal 'websocket-unparseable-frame
-                "Frame value found too large to parse!"))
-      (string-to-number cval))
+                "Frame value found too large to parse!")))
     ;; n is not 8
     (bindat-get-field
      (condition-case err
@@ -226,26 +227,23 @@ power of 2, up to 8."
 
 (defun websocket-to-bytes (val nbytes)
   "Encode the integer VAL in NBYTES of data.
-NBYTES much be a power of 2, up to 8."
-  (unless (or (and (< nbytes 8)
-                   (< val (expt 2 (* 8 nbytes))))
-              (and (= nbytes 8)
-                   (calc-eval "% < 2^(8 * %%)" 'pred val nbytes)))
+NBYTES much be a power of 2, up to 8.
+
+This supports encoding values up to "
+  (when (and (< nbytes 8)
+             (> val (expt 2 (* 8 nbytes))))
     ;; not a user-facing error, this must be caused from an error in
     ;; this library
     (error "websocket-to-bytes: Value %d could not be expressed in %d bytes"
            val nbytes))
   (if (= nbytes 8)
       (progn
-        (when (calc-eval "$ < 4294967296" 'pred most-positive-fixnum)
-          (signal 'websocket-frame-too-large
-                  most-positive-fixnum))
-        ;; Need to use calc even though at this point things are manageable,
-        ;; since some emacs cannot parse the value 4294967296, even if
-        ;; they never evaluate it.
-        (bindat-pack `((:val vec 2 u32))
-                     `((:val . [,(calc-eval "floor($ / 4294967296)" 'raw val)
-                                ,(calc-eval "$ % 4294967296" 'raw val)]))))
+        (let ((hi-32bits (lsh val -32))
+              (low-32bits (logand #xffffffff val)))
+          (when (> hi-32bits 0)
+            (signal 'websocket-frame-too-large val))
+          (bindat-pack `((:val vec 2 u32))
+                       `((:val . [,hi-32bits ,low-32bits])))))
     (bindat-pack
      `((:val ,(cond ((= nbytes 1) 'u8)
                     ((= nbytes 2) 'u16)
@@ -507,8 +505,8 @@ also the frame.
 
 The frame may be too large for this buid of emacs, in which case
 `websocket-frame-too-large' is returned, with the data of the
-system's `most-positive-fixnum', whose length was exceeded.  This
-also has the `websocket-error' condition."
+size of the frame which was too large to process.  This also has
+the `websocket-error' condition."
   (unless (websocket-check frame)
     (signal 'websocket-illegal-frame frame))
   (websocket-debug websocket "Sending frame, opcode: %s payload: %s"

commit b02f4a0d72d0e2087038fe891e2580c4505415ef
Author: Dmitry Gutov <address@hidden>
Date:   Mon Sep 3 02:29:44 2012 +0400

    Fix infinite timers loop
    
    Refs #49

diff --git a/js2-mode.el b/js2-mode.el
index c7ba811..7a8c744 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10552,9 +10552,12 @@ You can disable this by customizing 
`js2-cleanup-whitespace'."
   (if js2-mode-parse-timer
       (cancel-timer js2-mode-parse-timer))
   (setq js2-mode-parsing nil)
-  (setq js2-mode-parse-timer
-        (run-with-idle-timer js2-idle-timer-delay nil
-                             #'js2-mode-idle-reparse (current-buffer))))
+  (let ((timer (timer-create)))
+    (setq js2-mode-parse-timer timer)
+    (timer-set-function timer 'js2-mode-idle-reparse (list (current-buffer)))
+    (timer-set-idle-time timer js2-idle-timer-delay)
+    ;; http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12326
+    (timer-activate-when-idle timer nil)))
 
 (defun js2-mode-idle-reparse (buffer)
   "Run `js2-reparse' if BUFFER is the current buffer, or schedule

commit 1303cca62f4ea725baf6e2d8c75ddd9578515ac3
Author: Dmitry Gutov <address@hidden>
Date:   Mon Sep 3 02:03:16 2012 +0400

    js2-mode-forward-sexp: When inside "parens", jump over closest child node

diff --git a/js2-mode.el b/js2-mode.el
index 3833e01..c7ba811 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -11448,7 +11448,7 @@ move backward across N balanced expressions."
   (when js2-mode-buffer-dirty-p
     (js2-reparse))
   (let ((scan-msg "Containing expression ends prematurely")
-        node (start (point)) pos lp rp)
+        node (start (point)) pos lp rp child)
     (cond
      ;; backward-sexp
      ;; could probably make this better for some cases:
@@ -11464,13 +11464,16 @@ move backward across N balanced expressions."
           (let ((parens (js2-mode-forward-sexp-parens node pos)))
             (setq lp (car parens)
                   rp (cdr parens))))
-        (goto-char (or (when (and lp (> start lp))
-                         (when (and rp (<= start rp))
-                           (goto-char start)
-                           (signal 'scan-error (list scan-msg lp lp)))
-                         lp)
-                       pos
-                       (point-min)))))
+        (goto-char
+         (or (when (and lp (> start lp))
+               (if (and rp (<= start rp))
+                   (if (setq child (js2-node-closest-child node (point) lp t))
+                       (js2-node-abs-pos child)
+                     (goto-char start)
+                     (signal 'scan-error (list scan-msg lp lp)))
+                 lp))
+             pos
+             (point-min)))))
      (t
       ;; forward-sexp
       (js2-forward-sws)
@@ -11481,18 +11484,22 @@ move backward across N balanced expressions."
           (let ((parens (js2-mode-forward-sexp-parens node pos)))
             (setq lp (car parens)
                   rp (cdr parens))))
-        (goto-char (or (when (and rp (<= start rp))
-                         (when (> start lp)
-                           (goto-char start)
-                           (signal 'scan-error (list scan-msg rp (1+ rp))))
-                         (1+ rp))
-                       (+ pos
-                          (js2-node-len
-                           (if (js2-expr-stmt-node-p (js2-node-parent node))
-                               ;; stop after the semicolon
-                               (js2-node-parent node)
-                             node)))
-                       (point-max))))))))
+        (goto-char
+         (or (when (and rp (<= start rp))
+               (if (> start lp)
+                   (if (setq child (js2-node-closest-child node (point) rp))
+                       (js2-node-abs-end child)
+                     (goto-char start)
+                     (signal 'scan-error (list scan-msg rp (1+ rp))))
+                 (1+ rp)))
+             (and pos
+                  (+ pos
+                     (js2-node-len
+                      (if (js2-expr-stmt-node-p (js2-node-parent node))
+                          ;; stop after the semicolon
+                          (js2-node-parent node)
+                        node))))
+             (point-max))))))))
 
 (defun js2-mode-forward-sexp-parens (node abs-pos)
   (cond
@@ -11507,6 +11514,29 @@ move backward across N balanced expressions."
       (cons (when lp (+ abs-pos lp))
             (when rp (+ abs-pos rp)))))))
 
+(defun js2-node-closest-child (parent point limit &optional before)
+  (let* ((parent-pos (js2-node-abs-pos parent))
+         (rpoint (- point parent-pos))
+         (rlimit (- limit parent-pos))
+         (min (min rpoint rlimit))
+         (max (max rpoint rlimit))
+         found)
+    (catch 'done
+      (js2-visit-ast
+       parent
+       (lambda (node end-p)
+         (if (eq node parent)
+             t
+           (let ((pos (js2-node-pos node)) ;; Both relative values.
+                 (end (+ (js2-node-pos node) (js2-node-len node))))
+             (when (and (>= pos min) (<= end max)
+                        (if before (< pos rpoint) (> end rpoint)))
+               (setq found node))
+             (when (> end rpoint)
+               (throw 'done nil)))
+           nil))))
+    found))
+
 (defun js2-next-error (&optional arg reset)
   "Move to next parse error.
 Typically invoked via \\[next-error].

commit f34455fd511bb445306b4e333f2c2845ee4ad96d
Author: Dmitry Gutov <address@hidden>
Date:   Sun Sep 2 22:22:32 2012 +0400

    js2-mode-forward-sexp-parens: if/else and loop bodies are js2-scope nodes

diff --git a/js2-mode.el b/js2-mode.el
index 95e9065..3833e01 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -11499,7 +11499,7 @@ move backward across N balanced expressions."
    ((or (js2-array-node-p node)
         (js2-object-node-p node)
         (js2-array-comp-node-p node)
-        (eq 'cl-struct-js2-block-node (aref node 0)))
+        (memq (aref node 0) '(cl-struct-js2-block-node cl-struct-js2-scope)))
     (cons abs-pos (+ abs-pos (js2-node-len node) -1)))
    ((js2-paren-expr-node-p node)
     (let ((lp (js2-node-lp node))

commit f26abe1c150264162676826cd48a8fed87f3ada4
Merge: 95ed2b8 7ea106e
Author: Dmitry Gutov <address@hidden>
Date:   Fri Aug 31 08:18:35 2012 +0400

    Merge branch 'master' into emacs24

diff --cc js2-mode.el
index 5ca1557,95e9065..f72114f
--- a/js2-mode.el
+++ b/js2-mode.el
@@@ -10494,11 -10636,13 +10494,12 @@@ buffer will only rebuild its `js2-mode-
          (unless interrupted-p
            (setq js2-mode-parse-timer nil))))))
  
- (defun js2-mode-show-node ()
+ (defun js2-mode-show-node (event)
    "Debugging aid:  highlight selected AST node on mouse click."
-   (interactive)
+   (interactive "e")
+   (mouse-set-point event)
    (let ((node (js2-node-at-point))
 -        beg
 -        end)
 +        beg end)
      (when js2-mode-show-overlay
        (if (null node)
            (message "No node found at location %s" (point))
@@@ -11113,42 -11459,54 +11119,76 @@@ move backward across N balanced express
        (dotimes (i (- arg))
          (js2-backward-sws)
          (forward-char -1)  ; enter the node we backed up to
-         (setq node (js2-node-at-point (point) t))
-         (goto-char (if node
-                        (js2-node-abs-pos node)
-                      (point-min)))))
-     (t
-      ;; forward-sexp
-      (js2-forward-sws)
-      (dotimes (i arg)
-        (js2-forward-sws)
-        (setq node (js2-node-at-point (point) t)
-              end (if node (+ (js2-node-abs-pos node)
-                              (js2-node-len node))))
-        (goto-char (or end (point-max))))))))
+         (when (setq node (js2-node-at-point (point) t))
+           (setq pos (js2-node-abs-pos node))
+           (let ((parens (js2-mode-forward-sexp-parens node pos)))
+             (setq lp (car parens)
+                   rp (cdr parens))))
+         (goto-char (or (when (and lp (> start lp))
+                          (when (and rp (<= start rp))
+                            (goto-char start)
+                            (signal 'scan-error (list scan-msg lp lp)))
+                          lp)
+                        pos
+                        (point-min)))))
+      (t
+       ;; forward-sexp
+       (js2-forward-sws)
+       (dotimes (i arg)
+         (js2-forward-sws)
+         (when (setq node (js2-node-at-point (point) t))
+           (setq pos (js2-node-abs-pos node))
+           (let ((parens (js2-mode-forward-sexp-parens node pos)))
+             (setq lp (car parens)
+                   rp (cdr parens))))
+         (goto-char (or (when (and rp (<= start rp))
+                          (when (> start lp)
+                            (goto-char start)
+                            (signal 'scan-error (list scan-msg rp (1+ rp))))
+                          (1+ rp))
+                        (+ pos
+                           (js2-node-len
+                            (if (js2-expr-stmt-node-p (js2-node-parent node))
+                                ;; stop after the semicolon
+                                (js2-node-parent node)
+                              node)))
+                        (point-max))))))))
+ 
+ (defun js2-mode-forward-sexp-parens (node abs-pos)
+   (cond
+    ((or (js2-array-node-p node)
+         (js2-object-node-p node)
+         (js2-array-comp-node-p node)
+         (eq 'cl-struct-js2-block-node (aref node 0)))
+     (cons abs-pos (+ abs-pos (js2-node-len node) -1)))
+    ((js2-paren-expr-node-p node)
+     (let ((lp (js2-node-lp node))
+           (rp (js2-node-rp node)))
+       (cons (when lp (+ abs-pos lp))
+             (when rp (+ abs-pos rp)))))))
  
 +(defun js2-errors ()
 +  "Return a list of errors found."
 +  (and js2-mode-ast
 +       (js2-ast-root-errors js2-mode-ast)))
 +
 +(defun js2-warnings ()
 +  "Return a list of warnings found."
 +  (and js2-mode-ast
 +       (js2-ast-root-warnings js2-mode-ast)))
 +
 +(defun js2-have-errors-p ()
 +  "Return non-nil if any parse errors or warnings were found."
 +  (or (js2-errors) (js2-warnings)))
 +
 +(defun js2-errors-and-warnings ()
 +  "Return a copy of the concatenated errors and warnings lists.
 +They are appended:  first the errors, then the warnings.
 +Entries are of the form (MSG BEG END)."
 +  (when js2-mode-ast
 +    (append (js2-ast-root-errors js2-mode-ast)
 +            (copy-sequence (js2-ast-root-warnings js2-mode-ast)))))
 +
  (defun js2-next-error (&optional arg reset)
    "Move to next parse error.
  Typically invoked via \\[next-error].

commit 7ea106e70cd528117afb6764662a5832cc0a71f4
Author: Dmitry Gutov <address@hidden>
Date:   Fri Aug 31 07:39:17 2012 +0400

    js2-mode-forward-sexp: Signal scan-error when start == rp

diff --git a/js2-mode.el b/js2-mode.el
index 3f1bbf4..95e9065 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -11481,7 +11481,7 @@ move backward across N balanced expressions."
           (let ((parens (js2-mode-forward-sexp-parens node pos)))
             (setq lp (car parens)
                   rp (cdr parens))))
-        (goto-char (or (when (and rp (< start rp))
+        (goto-char (or (when (and rp (<= start rp))
                          (when (> start lp)
                            (goto-char start)
                            (signal 'scan-error (list scan-msg rp (1+ rp))))

commit 99f7a96c3e41f3868923d9278398b573bebfd122
Author: Dmitry Gutov <address@hidden>
Date:   Wed Aug 29 23:33:52 2012 +0400

    js2-mode-forward-sexp: backtrack before signaling scan-error
    
    * Jump past the semicolon when current node's parent is expr-stmt-node.

diff --git a/js2-mode.el b/js2-mode.el
index 59257d2..3f1bbf4 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -11483,9 +11483,15 @@ move backward across N balanced expressions."
                   rp (cdr parens))))
         (goto-char (or (when (and rp (< start rp))
                          (when (> start lp)
+                           (goto-char start)
                            (signal 'scan-error (list scan-msg rp (1+ rp))))
                          (1+ rp))
-                       (+ pos (js2-node-len node))
+                       (+ pos
+                          (js2-node-len
+                           (if (js2-expr-stmt-node-p (js2-node-parent node))
+                               ;; stop after the semicolon
+                               (js2-node-parent node)
+                             node)))
                        (point-max))))))))
 
 (defun js2-mode-forward-sexp-parens (node abs-pos)

commit 7f15efe5d93ba80a715150ae9e6a15c7d8b1f085
Author: Dmitry Gutov <address@hidden>
Date:   Wed Aug 29 21:24:47 2012 +0400

    js2-mode-forward-sexp: Behave more similarly to `forward-sexp'
    
    * Stop at node parens
    * Signal scan-error upon reaching a parenthesized expression boundary
    * If the buffer is dirty, reparse it synchronously
    
    This increases compatibility with standard *-list commands, evil-mode paren
    motions, and blink-matching-paren feature.
    
    Close #56
    Close #44
    
    js2-node-rp: Fix for js2-elem-get-node.

diff --git a/js2-mode.el b/js2-mode.el
index e2c2796..59257d2 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -4387,7 +4387,7 @@ For `js2-elem-get-node' structs, returns right-bracket 
position.
 Note that the position may be nil in the case of a parse error."
   (cond
    ((js2-elem-get-node-p node)
-    (js2-elem-get-node-lb node))
+    (js2-elem-get-node-rb node))
    ((js2-loop-node-p node)
     (js2-loop-node-rp node))
    ((js2-function-node-p node)
@@ -11445,9 +11445,10 @@ With ARG, do it that many times.  Negative arg -N means
 move backward across N balanced expressions."
   (interactive "p")
   (setq arg (or arg 1))
-  (if js2-mode-buffer-dirty-p
-      (js2-mode-wait-for-parse #'js2-mode-forward-sexp))
-  (let (node end (start (point)))
+  (when js2-mode-buffer-dirty-p
+    (js2-reparse))
+  (let ((scan-msg "Containing expression ends prematurely")
+        node (start (point)) pos lp rp)
     (cond
      ;; backward-sexp
      ;; could probably make this better for some cases:
@@ -11458,19 +11459,47 @@ move backward across N balanced expressions."
       (dotimes (i (- arg))
         (js2-backward-sws)
         (forward-char -1)  ; enter the node we backed up to
-        (setq node (js2-node-at-point (point) t))
-        (goto-char (if node
-                       (js2-node-abs-pos node)
-                     (point-min)))))
-    (t
-     ;; forward-sexp
-     (js2-forward-sws)
-     (dotimes (i arg)
-       (js2-forward-sws)
-       (setq node (js2-node-at-point (point) t)
-             end (if node (+ (js2-node-abs-pos node)
-                             (js2-node-len node))))
-       (goto-char (or end (point-max))))))))
+        (when (setq node (js2-node-at-point (point) t))
+          (setq pos (js2-node-abs-pos node))
+          (let ((parens (js2-mode-forward-sexp-parens node pos)))
+            (setq lp (car parens)
+                  rp (cdr parens))))
+        (goto-char (or (when (and lp (> start lp))
+                         (when (and rp (<= start rp))
+                           (goto-char start)
+                           (signal 'scan-error (list scan-msg lp lp)))
+                         lp)
+                       pos
+                       (point-min)))))
+     (t
+      ;; forward-sexp
+      (js2-forward-sws)
+      (dotimes (i arg)
+        (js2-forward-sws)
+        (when (setq node (js2-node-at-point (point) t))
+          (setq pos (js2-node-abs-pos node))
+          (let ((parens (js2-mode-forward-sexp-parens node pos)))
+            (setq lp (car parens)
+                  rp (cdr parens))))
+        (goto-char (or (when (and rp (< start rp))
+                         (when (> start lp)
+                           (signal 'scan-error (list scan-msg rp (1+ rp))))
+                         (1+ rp))
+                       (+ pos (js2-node-len node))
+                       (point-max))))))))
+
+(defun js2-mode-forward-sexp-parens (node abs-pos)
+  (cond
+   ((or (js2-array-node-p node)
+        (js2-object-node-p node)
+        (js2-array-comp-node-p node)
+        (eq 'cl-struct-js2-block-node (aref node 0)))
+    (cons abs-pos (+ abs-pos (js2-node-len node) -1)))
+   ((js2-paren-expr-node-p node)
+    (let ((lp (js2-node-lp node))
+          (rp (js2-node-rp node)))
+      (cons (when lp (+ abs-pos lp))
+            (when rp (+ abs-pos rp)))))))
 
 (defun js2-next-error (&optional arg reset)
   "Move to next parse error.

commit 36d675fd95dec21602e7b75c4eca3c282b626a29
Author: Takafumi Arakaki <address@hidden>
Date:   Tue Aug 28 09:43:05 2012 +0200

    Add Existing clients: Emacs Realtime Markdown Viewer
    
    Emacs Realtime Markdown Viewer is a Emacs lisp library by @syohex

diff --git a/README.org b/README.org
index a81b8e2..3734b68 100644
--- a/README.org
+++ b/README.org
@@ -36,6 +36,7 @@ Each version that is released should be checked with this 
checklist:
 * Existing clients:
 
 - [[https://github.com/tkf/emacs-ipython-notebook][Emacs IPython Notebook]]
+- [[https://github.com/syohex/emacs-realtime-markdown-viewer][Emacs Realtime 
Markdown Viewer]]
 
 If you are using this module for your own emacs package, please let me
 know by editing this file, adding your project, and sending a pull

commit d8ee6b767476250249522dfa3a746602841af28c
Author: Andrew Hyatt <address@hidden>
Date:   Fri Aug 24 00:38:06 2012 -0400

    Set version to 0.93.1

diff --git a/websocket.el b/websocket.el
index d7d96eb..0ec79bf 100644
--- a/websocket.el
+++ b/websocket.el
@@ -5,7 +5,7 @@
 ;; Author: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Maintainer: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Keywords: Communication, Websocket, Server
-;; Version: 0.93
+;; Version: 0.93.1
 ;;
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -102,7 +102,7 @@ same for the protocols.
   accept-string
   (inflight-input nil))
 
-(defvar websocket-version "0.93"
+(defvar websocket-version "0.93.1"
   "Version numbers of this version of websocket.el.")
 
 (defvar websocket-debug nil

commit a7239526f15989df87dd3a1b86ace42c36254e18
Author: Andrew Hyatt <address@hidden>
Date:   Fri Aug 24 00:35:00 2012 -0400

    Fix issue with inflight-input not being cleared out.

diff --git a/websocket-test.el b/websocket-test.el
index 869ca5b..e97da1a 100644
--- a/websocket-test.el
+++ b/websocket-test.el
@@ -374,7 +374,8 @@
                                        (substring websocket-frames 0 2)))
       (should open-callback-called)
       (websocket-outer-filter fake-ws (substring websocket-frames 2))
-      (should (equal (list frame2 frame1) processed-frames)))
+      (should (equal (list frame2 frame1) processed-frames))
+      (should-not (websocket-inflight-input fake-ws)))
     (flet ((websocket-ready-state (websocket) 'connecting)
            (websocket-close (websocket)))
       (should (eq 500 (cdr (should-error
diff --git a/websocket.el b/websocket.el
index a010fe7..d7d96eb 100644
--- a/websocket.el
+++ b/websocket.el
@@ -689,6 +689,7 @@ connection is invalid, the connection will be closed."
         (end-point 0)
         (text (concat (websocket-inflight-input websocket) output))
         (header-end-pos))
+    (setf (websocket-inflight-input websocket) nil)
     ;; If we've received the complete header, check to see if we've
     ;; received the desired handshake.
     (when (and (eq 'connecting (websocket-ready-state websocket))

commit 4878bd1666badf844156b6f983759e4aebb047d0
Author: Andrew Hyatt <address@hidden>
Date:   Sat Aug 18 22:26:06 2012 -0400

    Change version to version 0.93

diff --git a/websocket.el b/websocket.el
index 3ba8493..a010fe7 100644
--- a/websocket.el
+++ b/websocket.el
@@ -5,7 +5,7 @@
 ;; Author: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Maintainer: Andrew Hyatt <ahyatt at gmail dot com>
 ;; Keywords: Communication, Websocket, Server
-;; Version: 0.92.1
+;; Version: 0.93
 ;;
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -102,7 +102,7 @@ same for the protocols.
   accept-string
   (inflight-input nil))
 
-(defvar websocket-version "0.92.1"
+(defvar websocket-version "0.93"
   "Version numbers of this version of websocket.el.")
 
 (defvar websocket-debug nil

commit 8d31b971122585f477062dbd4d317125acf58945
Author: Andrew Hyatt <address@hidden>
Date:   Sat Aug 18 22:21:59 2012 -0400

    More fixes for file comments.

diff --git a/websocket.el b/websocket.el
index f8928ee..3ba8493 100644
--- a/websocket.el
+++ b/websocket.el
@@ -1,4 +1,4 @@
-;;; websocket.el --- Emacs WebSocket client
+;;; websocket.el --- Emacs WebSocket client and server
 
 ;; Copyright (c) 2010 Andrew Hyatt
 ;;
@@ -71,7 +71,7 @@ A websocket struct is created with `websocket-open'.
 The W3C API \"bufferedAmount\" call is not currently implemented,
 since there is no elisp API to get the buffered amount from the
 subprocess.  There may, in fact, be output data buffered,
-however, when the `on-message' or `close-callback' callbacks are
+however, when the `on-message' or `on-close' callbacks are
 called.
 
 `on-open', `on-message', `on-close', and `on-error' are described

commit 5c2b2351e6d1b9be40b3ac232bcb20fac5eadf69
Author: Andrew Hyatt <address@hidden>
Date:   Thu Aug 16 00:15:18 2012 -0400

    Implement proper behavior on closing of server.
    
    Now all client connections are closed when websocket-server-close is called.

diff --git a/websocket-functional-test.el b/websocket-functional-test.el
index 2bdd74a..e9dac95 100644
--- a/websocket-functional-test.el
+++ b/websocket-functional-test.el
@@ -91,14 +91,16 @@
 
 (message "Testing with emacs websocket server.")
 (message "If this does not pass, make sure your firewall allows the 
connection.")
-
+(setq wstest-closed nil)
 (setq server-conn (websocket-server
                    9998
                    :on-message (lambda (ws frame)
                                  (message "Server received text!")
                                  (websocket-send-text ws
                                   (websocket-frame-payload frame)))
-                   :on-open (lambda (websocket) "Client connection opened!")))
+                   :on-open (lambda (websocket) "Client connection opened!")
+                   :on-close (lambda (websocket)
+                               (setq wstest-closed t))))
 
 (setq wstest-msgs nil
       wstest-ws
@@ -113,4 +115,5 @@
 (sleep-for 0.3)
 (assert (equal (car wstest-msgs) "Hi to self!"))
 (websocket-server-close server-conn)
+(assert wstest-closed)
 (message "\nAll tests passed!\n")
diff --git a/websocket-test.el b/websocket-test.el
index 23086d7..869ca5b 100644
--- a/websocket-test.el
+++ b/websocket-test.el
@@ -323,18 +323,21 @@
                                                              :completep 
t))))))))
 
 (ert-deftest websocket-close ()
-  (let ((sent-frames))
+  (let ((sent-frames)
+        (processes-deleted))
     (flet ((websocket-send (websocket frame) (push frame sent-frames))
            (websocket-openp (websocket) t)
            (kill-buffer (buffer))
-           (process-buffer (conn)))
+           (delete-process (proc))
+           (process-buffer (conn) (add-to-list 'processes-deleted conn)))
       (websocket-close (websocket-inner-create
                         :conn "fake-conn"
                         :url t
                         :accept-string t))
       (should (equal sent-frames (list
                                   (make-websocket-frame :opcode 'close
-                                                        :completep t)))))))
+                                                        :completep t))))
+      (should (equal processes-deleted '("fake-conn"))))))
 
 (ert-deftest websocket-outer-filter ()
   (let* ((fake-ws (websocket-inner-create
@@ -539,3 +542,31 @@
                         ws
                         (plist-get header-info :protocols)
                         (plist-get header-info :extension)))))))
+
+(ert-deftest websocket-server-close ()
+  (let ((websocket-server-websockets
+         (list (websocket-inner-create :conn 'conn-a :url t :accept-string t
+                                       :server-conn 'a
+                                       :ready-state 'open)
+               (websocket-inner-create :conn 'conn-b :url t :accept-string t
+                                       :server-conn 'b
+                                       :ready-state 'open)
+               (websocket-inner-create :conn 'conn-c :url t :accept-string t
+                                       :server-conn 'b
+                                       :ready-state 'closed)))
+        (deleted-processes)
+        (closed-websockets))
+    (flet ((delete-process (conn) (add-to-list 'deleted-processes conn))
+           (websocket-close (ws)
+                            ;; we always remove on closing in the
+                            ;; actual code.
+                            (setq websocket-server-websockets
+                                  (remove ws websocket-server-websockets))
+                            (should-not (eq (websocket-ready-state ws) 
'closed))
+                            (add-to-list 'closed-websockets ws)))
+      (websocket-server-close 'b))
+    (should (equal deleted-processes '(b)))
+    (should (eq 1 (length closed-websockets)))
+    (should (eq 'conn-b (websocket-conn (car closed-websockets))))
+    (should (eq 1 (length websocket-server-websockets)))
+    (should (eq 'conn-a (websocket-conn (car websocket-server-websockets))))))
diff --git a/websocket.el b/websocket.el
index 3d9b00d..f8928ee 100644
--- a/websocket.el
+++ b/websocket.el
@@ -97,6 +97,8 @@ same for the protocols.
   (protocols nil :read-only t)
   (extensions nil :read-only t)
   (conn (assert nil) :read-only t)
+  ;; Only populated for servers, this is the server connection.
+  server-conn
   accept-string
   (inflight-input nil))
 
@@ -533,9 +535,9 @@ connecting or open."
                     (make-websocket-frame :opcode 'close
                                           :completep t))
     (setf (websocket-ready-state websocket) 'closed))
-  ;; Do we want to kill this?  It may result in on-closed not being
-  ;; called.
-  (kill-buffer (process-buffer (websocket-conn websocket))))
+  (let ((buf (process-buffer (websocket-conn websocket))))
+    (delete-process (websocket-conn websocket))
+    (kill-buffer buf)))
 
 (defun websocket-ensure-connected (websocket)
   "If the WEBSOCKET connection is closed, open it."
@@ -757,6 +759,9 @@ of populating the list of server extensions to WEBSOCKET."
 ;; Websocket server ;;
 ;;;;;;;;;;;;;;;;;;;;;;
 
+(defvar websocket-server-websockets nil
+  "A list of current websockets live on any server.")
+
 (defun* websocket-server (port &rest plist)
   "Open a websocket server on PORT.
 This also takes a plist of callbacks: `:on-open', `:on-message',
@@ -775,28 +780,47 @@ connection, which should be kept in order to pass to
     conn))
 
 (defun websocket-server-close (conn)
-  "Closes the websocket, as well as all open websockets."
-  ;; TODO(ahyatt) Delete all open websockets (we have to start keeping
-  ;; track first)
+  "Closes the websocket, as well as all open websockets for this server."
+  (let ((to-delete))
+    (dolist (ws websocket-server-websockets)
+      (when (eq (websocket-server-conn ws) conn)
+        (if (eq (websocket-ready-state ws) 'closed)
+            (add-to-list 'to-delete ws)
+          (websocket-close ws))))
+    (dolist (ws to-delete)
+      (setq websocket-server-websockets (remove ws 
websocket-server-websockets))))
   (delete-process conn))
 
 (defun websocket-server-accept (server client message)
   "Accept a new websocket connection from a client."
-  (message "Connected from %S: %s" client message)
   (let ((ws (websocket-inner-create
+             :server-conn server
              :conn client
              :url client
              :on-open (or (process-get server :on-open) 'identity)
              :on-message (or (process-get server :on-message) (lambda (ws 
frame)))
+             :on-close (lexical-let ((user-method
+                                      (or (process-get server :on-close) 
'identity)))
+                         (lambda (ws)
+                           (setq websocket-server-websockets
+                                 (remove ws websocket-server-websockets))
+                           (funcall user-method ws)))
              :on-error (or (process-get server :on-error)
                            'websocket-default-error-handler)
              :protocols (process-get server :protocol)
              :extensions (mapcar 'car (process-get server :extensions)))))
+    (add-to-list 'websocket-server-websockets ws)
     (process-put client :websocket ws)
     (set-process-filter client 'websocket-server-filter)
     ;; set-process-filter-multibyte is obsolete, but make-network-process's
     ;; :filter-multibyte arg does not seem to do anything.
-    (set-process-filter-multibyte client nil)))
+    (set-process-filter-multibyte client nil)
+    (set-process-sentinel client
+     (lambda (process change)
+       (let ((websocket (process-get process :websocket)))
+         (websocket-debug websocket "State change to %s" change)
+         (unless (eq 'closed (websocket-ready-state websocket))
+           (websocket-try-callback 'websocket-on-close 'on-close 
websocket)))))))
 
 (defun websocket-create-headers (url key protocol extensions)
   "Create connections headers for the given URL, KEY, PROTOCOL and EXTENSIONS.

commit 23b132e4a7c0eb42bd3ca94a2b0efd92fc6d5979
Author: Andrew Hyatt <address@hidden>
Date:   Tue Aug 14 22:35:46 2012 -0400

    Fix failing ert tests

diff --git a/websocket-test.el b/websocket-test.el
index 9fc6e3b..23086d7 100644
--- a/websocket-test.el
+++ b/websocket-test.el
@@ -202,8 +202,7 @@
         (base-headers (concat "Host: www.example.com\r\n"
                               "Upgrade: websocket\r\n"
                               "Connection: Upgrade\r\n"
-                              (format "Sec-WebSocket-Key: %s\r\n"
-                                      (websocket-calculate-accept "key"))
+                              "Sec-WebSocket-Key: key\r\n"
                               "Origin: mysystem\r\n"
                               "Sec-WebSocket-Version: 13\r\n")))
     (should (equal (concat base-headers "\r\n")
@@ -419,7 +418,7 @@
   (let* ((http "HTTP/1.1")
          (host "Host: authority")
          (upgrade "Upgrade: websocket")
-         (key (format "Sec-Websocket-Key: %s" (base64-encode-string "key")))
+         (key (format "Sec-Websocket-Key: %s" "key"))
          (version "Sec-Websocket-Version: 13")
          (origin "Origin: origin")
          (protocol "Sec-Websocket-Protocol: protocol")
@@ -487,7 +486,7 @@
            (websocket-close (ws) (setq closed t))
            (process-get (process sym) ws))
      ;; Bad request, in two parts
-     (flet ((websocket-verify-client-headers (ws text) nil))
+     (flet ((websocket-verify-client-headers (text) nil))
        (websocket-server-filter nil "HTTP/1.0 GET /foo \r\n")
        (should-not closed)
        (websocket-server-filter nil &qu