{"action":"created","issue":{"url":"https://api.github.com/repos/iqbalansari/emacs-emojify/issues/21","repository_url":"https://api.github.com/repos/iqbalansari/emacs-emojify","labels_url":"https://api.github.com/repos/iqbalansari/emacs-emojify/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/iqbalansari/emacs-emojify/issues/21/comments","events_url":"https://api.github.com/repos/iqbalansari/emacs-emojify/issues/21/events","html_url":"https://github.com/iqbalansari/emacs-emojify/issues/21","id":159495305,"number":21,"title":"emojify-program-contexts overwritten by emojify-prog-contexts?","user":{"login":"blaenk","id":84680,"avatar_url":"https://avatars.githubusercontent.com/u/84680?v=3","gravatar_id":"","url":"https://api.github.com/users/blaenk","html_url":"https://github.com/blaenk","followers_url":"https://api.github.com/users/blaenk/followers","following_url":"https://api.github.com/users/blaenk/following{/other_user}","gists_url":"https://api.github.com/users/blaenk/gists{/gist_id}","starred_url":"https://api.github.com/users/blaenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blaenk/subscriptions","organizations_url":"https://api.github.com/users/blaenk/orgs","repos_url":"https://api.github.com/users/blaenk/repos","events_url":"https://api.github.com/users/blaenk/events{/privacy}","received_events_url":"https://api.github.com/users/blaenk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-09T20:01:46Z","updated_at":"2016-06-10T05:16:38Z","closed_at":null,"body":"When I `(setq emojify-program-contexts '(comments))` before emojify loads, it still is given the default value. I think the way it's set up, the obsolete variable prog-contexts' `:set` behavior ends up overwriting the new variable when it's first set.\r\n\r\nI resolved it by putting the `setq` after the package loads, but it did take me a long while to realize that the variable was incorrect the whole time so perhaps you can fix it to save others the trouble. Maybe move the `:set` behavior to the new variable? That way since I `setq` the new variable, the old variable's wont have a `:set` behavior which overwrites it.\r\n\r\n``` elisp\r\n(defcustom emojify-prog-contexts\r\n  'both\r\n  \"Contexts where emojis can be displayed in programming modes.\r\n\r\nPossible values are\r\n`comments' - Display emojis only in comments\r\n`string'   - Display emojis only in strings\r\n`both'     - Display emojis in comments and strings\r\n`none'     - Do not display emojis in programming modes\"\r\n  :type '(radio :tag \"Contexts where emojis should be displayed in programming modes\"\r\n                (const :tag \"Only in comments\" comments)\r\n                (const :tag \"Only in string\" string)\r\n                (const :tag \"Both in comments and string\" both)\r\n                (const :tag \"Do not display emojis in programming modes\" none))\r\n  :set (lambda (_ value)\r\n         (setq emojify-program-contexts (pcase value\r\n                                          (`comments '(comments))\r\n                                          (`string '(string))\r\n                                          (`both '(comments string code))\r\n                                          (`none '()))))\r\n  :group 'emojify)\r\n```\r\n\r\nSo if I understand correctly, I setq the new variable, but when the old variable initializes it triggers its `:set` behavior (or does it not?), which ends up `setq`'ing the new variable with the default settings ('both)."},"comment":{"url":"https://api.github.com/repos/iqbalansari/emacs-emojify/issues/comments/225095106","html_url":"https://github.com/iqbalansari/emacs-emojify/issues/21#issuecomment-225095106","issue_url":"https://api.github.com/repos/iqbalansari/emacs-emojify/issues/21","id":225095106,"user":{"login":"iqbalansari","id":2726057,"avatar_url":"https://avatars.githubusercontent.com/u/2726057?v=3","gravatar_id":"","url":"https://api.github.com/users/iqbalansari","html_url":"https://github.com/iqbalansari","followers_url":"https://api.github.com/users/iqbalansari/followers","following_url":"https://api.github.com/users/iqbalansari/following{/other_user}","gists_url":"https://api.github.com/users/iqbalansari/gists{/gist_id}","starred_url":"https://api.github.com/users/iqbalansari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iqbalansari/subscriptions","organizations_url":"https://api.github.com/users/iqbalansari/orgs","repos_url":"https://api.github.com/users/iqbalansari/repos","events_url":"https://api.github.com/users/iqbalansari/events{/privacy}","received_events_url":"https://api.github.com/users/iqbalansari/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T05:16:37Z","updated_at":"2016-06-10T05:16:37Z","body":"Hi,\r\n\r\nThanks for the bug report and sorry for the inconvenience. `emojify-prog-contexts` has been deprecated for a while now, I am thinking I will remove it completely.\r\n\r\nThanks"}}
{"actor":{"display_login":"iqbalansari"}}